I'm not sure what that buys us, if anything you want more non-users of the function to be falling through to the function prototype rather than the static inline. The only place any of this matters (as long as the compiler/linker is tossing the static inline) is arm64 because its the only arch making a call to acpi_find_last_cache_level(). ACPI_PPTT is also only visible on arm64 at the moment due to being wrapped in a if ARM64 in the Kconfig
On 26/04/18 00:31, Jeremy Linton wrote:
Call ACPI cache parsing routines from base cacheinfo code if ACPI
is enable. Also stub out cache_setup_acpi() so that individual
architectures can enable ACPI topology parsing.
[...]
+#ifndef CONFIG_ACPI
+static inline int acpi_find_last_cache_level(unsigned int cpu)
+{
+ /* ACPI kernels should be built with PPTT support */
This sounds incorrect for x86. But I understand why you have it there.
Does it makes sense to change above to .. ?
#if !defined(CONFIG_ACPI) || (defined(CONFIG_ACPI) && !(CONFIG_ACPI_PPTT))