linux/sound/soc
Amadeusz Sławiński 1e744351bc
ASoC: Intel: avs: Use lookup table to create modules
As reported by Nathan, when building avs driver using clang with:
  CONFIG_COMPILE_TEST=y
  CONFIG_FORTIFY_SOURCE=y
  CONFIG_KASAN=y
  CONFIG_PCI=y
  CONFIG_SOUND=y
  CONFIG_SND=y
  CONFIG_SND_SOC=y
  CONFIG_SND_SOC_INTEL_AVS=y

there are reports of too big stack use, like:
  sound/soc/intel/avs/path.c:815:18: error: stack frame size (2176) exceeds limit (2048) in 'avs_path_create' [-Werror,-Wframe-larger-than]
  struct avs_path *avs_path_create(struct avs_dev *adev, u32 dma_id,
                   ^
  1 error generated.

This is apparently caused by inlining many calls to guid_equal which
inlines fortified memcpy, using 2 size_t variables.

Instead of hardcoding many calls to guid_equal, use lookup table with
one call, this improves stack usage.

Link: https://lore.kernel.org/alsa-devel/YtlzY9aYdbS4Y3+l@dev-arch.thelio-3990X/T/
Link: https://github.com/ClangBuiltLinux/linux/issues/1642
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Build-tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220722111959.2588597-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-22 13:40:02 +01:00
..
adi
amd ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41 2022-07-22 13:40:01 +01:00
atmel ASoC: atmel_ssc_dai: remove #ifdef CONFIG_PM 2022-07-15 12:35:12 +01:00
au1x
bcm
cirrus
codecs ASoC: nau8821: Don't unconditionally free interrupt 2022-07-19 14:54:26 +01:00
dwc
fsl ASoC: imx-card: use snd_pcm_format_t type for asrc_format 2022-07-21 13:38:52 +01:00
generic ASoC: audio-graph-card: Add of_node_put() in fail path 2022-07-21 23:25:54 +01:00
hisilicon
img ASoC: Refactor non_legacy_dai_naming flag 2022-06-29 16:58:08 +01:00
intel ASoC: Intel: avs: Use lookup table to create modules 2022-07-22 13:40:02 +01:00
jz4740 ASoC: jz4740-i2s: Remove unused 'mem' resource 2022-07-20 21:43:53 +01:00
kirkwood
mediatek ASoC: mediatek: mt8186: add machine driver with mt6366, rt1019 and rt5682s 2022-07-20 17:42:27 +01:00
meson
mxs
pxa
qcom ASoC: qcom: q6dsp: Fix an off-by-one in q6adm_alloc_copp() 2022-07-21 13:38:55 +01:00
rockchip ASoC: Merge up fixes 2022-07-11 15:51:01 +01:00
samsung ASoC: samsung: change neo1973_audio from a global to static 2022-06-30 13:40:29 +01:00
sh ASoC: rsnd: care default case on rsnd_ssiu_busif_err_irq_ctrl() 2022-07-14 13:26:38 +01:00
sof ASoC: SOF: Intel: updates and cleanups 2022-07-19 19:16:21 +01:00
spear
sprd
sti
stm
sunxi ASoC: Refactor non_legacy_dai_naming flag 2022-06-29 16:58:08 +01:00
tegra ASoC: tegra: tegra20_das: Drop write-only driver data member 2022-07-05 19:54:00 +01:00
ti ASoC: Merge up fixes 2022-07-11 15:51:01 +01:00
uniphier
ux500
xilinx ASoC: xilinx: Suppress second error message about reset failure in .remove() 2022-07-05 16:44:31 +01:00
xtensa
Kconfig
Makefile ASoC: Makefile: Fix simultaneous build of KUNIT tests 2022-07-20 21:43:52 +01:00
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c
soc-compress.c
soc-core.c ASoC: soc-core.c: share code for snd_soc_of_get_dai_link_cpus/codecs() 2022-06-29 18:10:15 +01:00
soc-dai.c
soc-dapm.c ASoC: Merge up fixes 2022-06-27 18:27:03 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-jack.c
soc-link.c
soc-ops.c
soc-pcm.c ASoC: soc-pcm: demote warnings on non-atomic BE connection 2022-07-12 13:45:07 +01:00
soc-topology-test.c
soc-topology.c
soc-utils-test.c
soc-utils.c