mbox series

[0/7] ALSA/ASoC/SOF/SoundWire: fix Kconfig issues

Message ID 20210302003125.1178419-1-pierre-louis.bossart@linux.intel.com
Headers show
Series ALSA/ASoC/SOF/SoundWire: fix Kconfig issues | expand

Message

Pierre-Louis Bossart March 2, 2021, 12:31 a.m. UTC
In January, Intel kbuild bot and Arnd Bergmann reported multiple
issues with randconfig. This patchset builds on Arnd's suggestions to

a) expose ACPI and PCI devices in separate modules, while sof-acpi-dev
and sof-pci-dev become helpers. This will result in minor changes
required for developers/testers, i.e. modprobe snd-sof-pci will no
longer result in a probe. The SOF CI was already updated to deal with
this module dependency change and introduction of new modules.

b) Fix SOF/SoundWire/DSP_config dependencies by moving the code
required to detect SoundWire presence in ACPI tables to sound/hda.

Integration note:
This patchset touches directories maintained by Vinod, Takashi and
Mark in separate trees, and will impact additional changes to use the
auxiliary bus in drivers/soundwire/.
I can think of two options, both of which are fine:
1. Mark merges the patches with Vinod and Takashi Acked-by tags, then
Mark provides an immutable tag to Vinod.
2. Vinod merges the patches with Mark and Takashi Acked-by tags, then
Vinod provides an immutable tag to Mark

Acknowledgements:
Thanks to Arnd for suggesting fixes and testing these patches with
more randconfigs.
Thanks to Vinod Koul for his feedback on the move of this common
helper to sound/hda/

Arnd Bergmann (1):
  ASoC: SOF: ACPI: avoid reverse module dependency

Pierre-Louis Bossart (6):
  ASoC: soc-acpi: allow for partial match in parent name
  ASoC: SOF: pci: split PCI into different drivers
  ASoC: SOF: pci: move DSP_CONFIG use to platform-specific drivers
  ASoC: SOF: Intel: SoundWire: simplify Kconfig
  ALSA: hda: move Intel SoundWire ACPI scan to dedicated module
  ALSA: hda: intel-sdw-acpi: add missing include files

 drivers/soundwire/intel.h           |   2 -
 drivers/soundwire/intel_init.c      | 158 -------------
 include/linux/soundwire/sdw_intel.h |   2 +
 include/sound/soc-acpi.h            |   2 +-
 sound/hda/Kconfig                   |   4 +
 sound/hda/Makefile                  |   3 +
 sound/hda/intel-dsp-config.c        |   2 +-
 sound/hda/intel-sdw-acpi.c          | 179 +++++++++++++++
 sound/soc/sof/Kconfig               |  15 +-
 sound/soc/sof/Makefile              |   4 +-
 sound/soc/sof/intel/Kconfig         | 254 +++++++--------------
 sound/soc/sof/intel/Makefile        |  20 +-
 sound/soc/sof/intel/bdw.c           |  67 +++++-
 sound/soc/sof/intel/byt.c           | 106 ++++++++-
 sound/soc/sof/intel/hda.c           |  18 ++
 sound/soc/sof/intel/hda.h           |   3 +
 sound/soc/sof/intel/pci-apl.c       |  81 +++++++
 sound/soc/sof/intel/pci-cnl.c       | 104 +++++++++
 sound/soc/sof/intel/pci-icl.c       |  84 +++++++
 sound/soc/sof/intel/pci-tgl.c       | 121 ++++++++++
 sound/soc/sof/intel/pci-tng.c       |  70 ++++++
 sound/soc/sof/intel/shim.h          |   6 -
 sound/soc/sof/sof-acpi-dev.c        | 130 +----------
 sound/soc/sof/sof-acpi-dev.h        |  16 ++
 sound/soc/sof/sof-pci-dev.c         | 340 +---------------------------
 sound/soc/sof/sof-pci-dev.h         |  17 ++
 26 files changed, 998 insertions(+), 810 deletions(-)
 create mode 100644 sound/hda/intel-sdw-acpi.c
 create mode 100644 sound/soc/sof/intel/pci-apl.c
 create mode 100644 sound/soc/sof/intel/pci-cnl.c
 create mode 100644 sound/soc/sof/intel/pci-icl.c
 create mode 100644 sound/soc/sof/intel/pci-tgl.c
 create mode 100644 sound/soc/sof/intel/pci-tng.c
 create mode 100644 sound/soc/sof/sof-acpi-dev.h
 create mode 100644 sound/soc/sof/sof-pci-dev.h

Comments

Mark Brown March 2, 2021, 12:43 p.m. UTC | #1
On Mon, Mar 01, 2021 at 06:31:18PM -0600, Pierre-Louis Bossart wrote:
> In January, Intel kbuild bot and Arnd Bergmann reported multiple
> issues with randconfig. This patchset builds on Arnd's suggestions to

Acked-by: Mark Brown <broonie@kernel.org>
Vinod Koul March 2, 2021, 2:13 p.m. UTC | #2
On 02-03-21, 15:03, Takashi Iwai wrote:
> On Tue, 02 Mar 2021 01:31:18 +0100,
> Pierre-Louis Bossart wrote:
> > 
> > In January, Intel kbuild bot and Arnd Bergmann reported multiple
> > issues with randconfig. This patchset builds on Arnd's suggestions to
> > 
> > a) expose ACPI and PCI devices in separate modules, while sof-acpi-dev
> > and sof-pci-dev become helpers. This will result in minor changes
> > required for developers/testers, i.e. modprobe snd-sof-pci will no
> > longer result in a probe. The SOF CI was already updated to deal with
> > this module dependency change and introduction of new modules.
> > 
> > b) Fix SOF/SoundWire/DSP_config dependencies by moving the code
> > required to detect SoundWire presence in ACPI tables to sound/hda.
> > 
> > Integration note:
> > This patchset touches directories maintained by Vinod, Takashi and
> > Mark in separate trees, and will impact additional changes to use the
> > auxiliary bus in drivers/soundwire/.
> > I can think of two options, both of which are fine:
> > 1. Mark merges the patches with Vinod and Takashi Acked-by tags, then
> > Mark provides an immutable tag to Vinod.
> > 2. Vinod merges the patches with Mark and Takashi Acked-by tags, then
> > Vinod provides an immutable tag to Mark
> 
> Acked-by: Takashi Iwai <tiwai@suse.de>

Since most of the changes are sound/ it makes sense for this to go thru
sound tree. I have acked the sdw part..

Thanks
Pierre-Louis Bossart March 2, 2021, 2:52 p.m. UTC | #3
> OK, I applied those and pushed to topic/sound-sdw-kconfig-fixes
> immutable branch.   A signed tag, sound-sdw-kconfig-fixes, is found
> there, too.
> 
> Mark, Vinod, feel free to pull from:
>    git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-sdw-kconfig/fixes
> 

Thanks Takashi!

> I suppose those are supposed to be merged in 5.12?  If so, I'm going
> to merge to for-linus branch as well.

We finished those changes rather late in the cycle, so I didn't want to 
send this before 5.12-rc1 and create issues.

But we've been testing them for at least a month now, so the risk is low 
if this series was added in an 5.12-rcX branch.
Takashi Iwai March 2, 2021, 3:16 p.m. UTC | #4
On Tue, 02 Mar 2021 16:03:37 +0100,
Mark Brown wrote:
> 
> On Tue, Mar 02, 2021 at 03:43:23PM +0100, Takashi Iwai wrote:
> 
> > Mark, Vinod, feel free to pull from:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-sdw-kconfig/fixes
> 
> $ git pull git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-sdw-kconfig/fixes

Sorry, copy&paste error, it's  not with "/fixes" but "-fixes".

  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-sdw-kconfig-fixes


Takashi
Arnd Bergmann July 26, 2021, 6:59 p.m. UTC | #5
On Tue, Mar 2, 2021 at 1:31 AM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
> In January, Intel kbuild bot and Arnd Bergmann reported multiple
> issues with randconfig. This patchset builds on Arnd's suggestions to
>
> a) expose ACPI and PCI devices in separate modules, while sof-acpi-dev
> and sof-pci-dev become helpers. This will result in minor changes
> required for developers/testers, i.e. modprobe snd-sof-pci will no
> longer result in a probe. The SOF CI was already updated to deal with
> this module dependency change and introduction of new modules.
>
> b) Fix SOF/SoundWire/DSP_config dependencies by moving the code
> required to detect SoundWire presence in ACPI tables to sound/hda.
>
> Integration note:
> This patchset touches directories maintained by Vinod, Takashi and
> Mark in separate trees, and will impact additional changes to use the
> auxiliary bus in drivers/soundwire/.
> I can think of two options, both of which are fine:
> 1. Mark merges the patches with Vinod and Takashi Acked-by tags, then
> Mark provides an immutable tag to Vinod.
> 2. Vinod merges the patches with Mark and Takashi Acked-by tags, then
> Vinod provides an immutable tag to Mark
>
> Acknowledgements:
> Thanks to Arnd for suggesting fixes and testing these patches with
> more randconfigs.
> Thanks to Vinod Koul for his feedback on the move of this common
> helper to sound/hda/

Hi Pierre-Louis,

I have not done as much randconfig tested recently as I used to, but
since I ramped up the rate again after the merge window, I have unfortunately
once more run into a variation of this problem, with
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m and
CONFIG_SND_SOC_SOF_HDA_COMMON=y:

x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function
`hda_dsp_interrupt_thread':
hda.c:(.text+0x739): undefined reference to `sdw_intel_thread'
x86_64-linux-ld: hda.c:(.text+0x764): undefined reference to
`sdw_intel_process_wakeen_event'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_int_enable':
hda.c:(.text+0x782): undefined reference to `sdw_intel_enable_irq'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_startup':
hda.c:(.text+0x7ac): undefined reference to `sdw_intel_startup'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function
`hda_sdw_process_wakeen':
hda.c:(.text+0x7dc): undefined reference to `sdw_intel_process_wakeen_event'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_probe':
hda.c:(.text+0xee1): undefined reference to `sdw_intel_probe'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_remove':
hda.c:(.text+0xf7f): undefined reference to `sdw_intel_enable_irq'
x86_64-linux-ld: hda.c:(.text+0xf8e): undefined reference to `sdw_intel_exit'

This only seems to appear very rarely, as I still did around 25000 randconfig
builds since you merged the series, but this config does show the problem
for any kernel version between the fix and the latest linux-next:

https://pastebin.com/raw/VCjcB3EU

I have only done the quick bisection but no analysis regarding what
we may have missed back in March. I hope you can figure this out.

       Arnd
Pierre-Louis Bossart July 26, 2021, 9:01 p.m. UTC | #6
> I have not done as much randconfig tested recently as I used to, but
> since I ramped up the rate again after the merge window, I have unfortunately
> once more run into a variation of this problem, with
> CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m and
> CONFIG_SND_SOC_SOF_HDA_COMMON=y:
> 
> x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function
> `hda_dsp_interrupt_thread':
> hda.c:(.text+0x739): undefined reference to `sdw_intel_thread'
> x86_64-linux-ld: hda.c:(.text+0x764): undefined reference to
> `sdw_intel_process_wakeen_event'
> x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_int_enable':
> hda.c:(.text+0x782): undefined reference to `sdw_intel_enable_irq'
> x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_startup':
> hda.c:(.text+0x7ac): undefined reference to `sdw_intel_startup'
> x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function
> `hda_sdw_process_wakeen':
> hda.c:(.text+0x7dc): undefined reference to `sdw_intel_process_wakeen_event'
> x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_probe':
> hda.c:(.text+0xee1): undefined reference to `sdw_intel_probe'
> x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_remove':
> hda.c:(.text+0xf7f): undefined reference to `sdw_intel_enable_irq'
> x86_64-linux-ld: hda.c:(.text+0xf8e): undefined reference to `sdw_intel_exit'
> 
> This only seems to appear very rarely, as I still did around 25000 randconfig
> builds since you merged the series, but this config does show the problem
> for any kernel version between the fix and the latest linux-next:
> 
> https://pastebin.com/raw/VCjcB3EU
> 
> I have only done the quick bisection but no analysis regarding what
> we may have missed back in March. I hope you can figure this out.

Thanks for this report Arnd.

I can reproduce the problem, the changes made 6 months back don't make
too much sense to me any longer. I have really no idea why I moved the
INTEL_SOUNDWIRE config to a boolean, that was asking for trouble.

I have a tentative fix being tested at
https://github.com/thesofproject/linux/pull/3066. I just moved the
select operations to a different option and reverted the INTEL_SOUNDWIRE
config to be an on/off switch from the user perspective, with
dependencies on built-in v. module checked inside.
Arnd Bergmann July 26, 2021, 9:33 p.m. UTC | #7
On Mon, Jul 26, 2021 at 11:01 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
> Thanks for this report Arnd.
>
> I can reproduce the problem, the changes made 6 months back don't make
> too much sense to me any longer. I have really no idea why I moved the
> INTEL_SOUNDWIRE config to a boolean, that was asking for trouble.
>
> I have a tentative fix being tested at
> https://github.com/thesofproject/linux/pull/3066. I just moved the
> select operations to a different option and reverted the INTEL_SOUNDWIRE
> config to be an on/off switch from the user perspective, with
> dependencies on built-in v. module checked inside.

Ah, I'm glad you at least came up with a patch quickly, even if neither of
us remembers what we were thinking then ;-)

I've added this to my test tree, and will be able to at least verify that this
doesn't break anything obvious over night.

         Arnd