Skip to contentSkip to conversation

ASoC: meson: fix missing REGMAP_MMIO dependencies

PATCH In review Jude Gyimah 2 participants 6 messages Nov 9

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover ASoC: meson: fix missing REGMAP_MMIO dependencies

Each of these drivers can be built into vmlinux while the code providing a symbol it calls is a module, which fails to link. The same shape in 4 drivers, so they are here as one series.

Affected: aiu, axg-pdm, axg-spdifin, axg-spdifout.

The fix is a select rather than a depends on: the providers have no prompt of their own and are only ever enabled by a select, so a depends on would leave these drivers unselectable.

Each was reproduced on v7.3, arm64 by a vmlinux link that failed on the named symbol, and each links once the select is added.

Found with kreach, a static check that compares what Kconfig allows against the symbols the compiled objects actually reference.

The checker is at https://github.com/JGyimah/kreach, and the reproducer configuration for each finding is published with it under results/.

v2: Patch 2/4 opened with "These three do not" without saying
which three it meant. That sentence predated the aiu patch, and the context was only in the cover letter, which git am leaves out. As a result, the commit message didn't make sense on its own. Reported by sashiko-bot. No functional
change: all four Kconfig diffs are byte-for-byte identical to v1.

Jude Gyimah (4):
ASoC: meson: aiu: select REGMAP_MMIO
ASoC: meson: axg-pdm: select REGMAP_MMIO
ASoC: meson: axg-spdifin: select REGMAP_MMIO
ASoC: meson: axg-spdifout: select REGMAP_MMIO

 sound/soc/meson/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/4 ASoC: meson: aiu: select REGMAP_MMIO

gx-formatter.o is part of snd-soc-meson-aiu:

sound/soc/meson/Makefile:7: snd-soc-meson-aiu-y += gx-formatter.o

so SND_MESON_AIU is the option that decides where its call lands, and the error below names gx-formatter.c rather than aiu.c.

aiu calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

gx-formatter.c:(.text+0x74): undefined reference to

    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is only ever enabled by a select, so a depends on would leave SND_MESON_AIU unselectable.

Reproduced on v7.3, arm64, with CONFIG_SND_MESON_AIU=y and CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows against the symbols the compiled objects actually reference.

Fixes 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support")
---
 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)
sound/soc/meson/Kconfig +1 -0
index d9a730994a2a..d0f60f8af2b5 100644
@@ -4,6 +4,7 @@ menu "Amlogic"
 
 config SND_MESON_AIU
 	tristate "Amlogic AIU"
+	select REGMAP_MMIO
 	select SND_MESON_CODEC_GLUE
 	select SND_PCM_IEC958
 	imply SND_SOC_MESON_T9015
Signature · 1 line
2.43.0
#2 lore raw

PATCH v2 2/4 ASoC: meson: axg-pdm: select REGMAP_MMIO

In reply to Jude Gyimah

Several stanzas in the same file already select REGMAP_MMIO, SND_MESON_G12A_TOACODEC among them. However, SND_MESON_AXG_PDM does not.

axg-pdm calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

axg-pdm.c:(.text+0xc4): undefined reference to

    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is only ever enabled by a select, so a depends on would leave SND_MESON_AXG_PDM unselectable.

Reproduced on v7.3, arm64, with CONFIG_SND_MESON_AXG_PDM=y and CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows against the symbols the compiled objects actually reference.

Fixes 2cfc123eea74 ("ASoC: meson: add axg pdm input")
---
 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)
sound/soc/meson/Kconfig +1 -0
index d0f60f8af2b5..4b06a9e7c72a 100644
@@ -92,6 +92,7 @@ config SND_MESON_AXG_SPDIFIN
 
 config SND_MESON_AXG_PDM
 	tristate "Amlogic AXG PDM Input Support"
+	select REGMAP_MMIO
 	imply SND_SOC_DMIC
 	imply COMMON_CLK_AXG_AUDIO
 	help
Signature · 1 line
2.43.0
#3 lore raw

PATCH v2 3/4 ASoC: meson: axg-spdifin: select REGMAP_MMIO

In reply to Jude Gyimah

axg-spdifin calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

axg-spdifin.c:(.text+0x154): undefined reference to

    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is only ever enabled by a select, so a depends on would leave SND_MESON_AXG_SPDIFIN unselectable.

Reproduced on v7.3, arm64, with CONFIG_SND_MESON_AXG_SPDIFIN=y and CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows against the symbols the compiled objects actually reference.

Fixes 5ce5658375e6 ("ASoC: meson: add axg spdif input")
---
 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)
sound/soc/meson/Kconfig +1 -0
index 4b06a9e7c72a..10c7d59a5ad1 100644
@@ -85,6 +85,7 @@ config SND_MESON_AXG_SPDIFOUT
 
 config SND_MESON_AXG_SPDIFIN
 	tristate "Amlogic AXG SPDIF Input Support"
+	select REGMAP_MMIO
 	imply SND_SOC_SPDIF
 	help
 	  Select Y or M to add support for SPDIF input embedded
Signature · 1 line
2.43.0
#4 lore raw

PATCH v2 4/4 ASoC: meson: axg-spdifout: select REGMAP_MMIO

In reply to Jude Gyimah

axg-spdifout calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

axg-spdifout.c:(.text+0x9c): undefined reference to

    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is only ever enabled by a select, so a depends on would leave SND_MESON_AXG_SPDIFOUT unselectable.

Reproduced on v7.3, arm64, with CONFIG_SND_MESON_AXG_SPDIFOUT=y and CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows against the symbols the compiled objects actually reference.

Fixes 53eb4b7aaa04 ("ASoC: meson: add axg spdif output")
---
 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)
sound/soc/meson/Kconfig +1 -0
index 10c7d59a5ad1..272639dd8eaf 100644
@@ -76,6 +76,7 @@ config SND_MESON_AXG_SOUND_CARD
 
 config SND_MESON_AXG_SPDIFOUT
 	tristate "Amlogic AXG SPDIF Output Support"
+	select REGMAP_MMIO
 	select SND_PCM_IEC958
 	imply SND_SOC_SPDIF
 	imply COMMON_CLK_AXG_AUDIO
Signature · 1 line
2.43.0
maintainer
#5 lore raw
In reply to Jude Gyimah
Quoted 9 lines · Jude Gyimah

ASoC: meson: fix missing REGMAP_MMIO dependencies

Each of these drivers can be built into vmlinux while the code providing a symbol it calls is a module, which fails to link. The same shape in 4 drivers, so they are here as one series.

Affected: aiu, axg-pdm, axg-spdifin, axg-spdifout.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.5

Thanks!

[1/4] ASoC: meson: aiu: select REGMAP_MMIO

      https://git.kernel.org/broonie/sound/c/cc2f13940cee
[2/4] ASoC: meson: axg-pdm: select REGMAP_MMIO
      https://git.kernel.org/broonie/sound/c/12d753e6ca1d
[3/4] ASoC: meson: axg-spdifin: select REGMAP_MMIO
      https://git.kernel.org/broonie/sound/c/4603b51f1dad
[4/4] ASoC: meson: axg-spdifout: select REGMAP_MMIO
      https://git.kernel.org/broonie/sound/c/10ac156211d2

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark