Re: [PATCH v6 02/90] ASoC: Intel: avs: Include CPUID header at file scope

From: Cezary Rojewski

Date: Fri Mar 27 2026 - 05:34:04 EST


On 2026-03-27 3:15 AM, Ahmed S. Darwish wrote:
Commit

cbe37a4d2b3c ("ASoC: Intel: avs: Configure basefw on TGL-based platforms")

includes the main CPUID header from within a C function. This works by
luck and forbids valid refactorings inside that header.

Include the CPUID header at file scope instead.

Remove the COMPILE_TEST build flag so that the CONFIG_X86 conditionals can
be removed. The driver gets enough compilation testing already on x86.

For clarity, refactor the CPUID(0x15) code into its own function without
changing any of the driver's logic.

Suggested-by: Borislav Petkov <bp@xxxxxxxxx> # CONFIG_X86 removal
Signed-off-by: Ahmed S. Darwish <darwi@xxxxxxxxxxxxx>
Fixes: cbe37a4d2b3c ("ASoC: Intel: avs: Configure basefw on TGL-based platforms")
References: 47a1886a610a ("ASoC: Intel: avs: Enable AVS driver only on x86 platforms")
Link: https://lore.kernel.org/r/20251016105514.GCaPDPEu016XyDocfY@fat_crate.local
Link: https://lore.kernel.org/r/da5bf77b-5bdb-440f-92b5-db35d8687987@xxxxxxxxx

Thank you for sorting this out, looks good.

Acked-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>