]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ACPI / PPTT: fix build when CONFIG_ACPI_PPTT is not enabled
authorSudeep Holla <sudeep.holla@arm.com>
Tue, 5 Jun 2018 14:35:03 +0000 (15:35 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 5 Jun 2018 17:06:24 +0000 (18:06 +0100)
Though CONFIG_ACPI_PPTT is selected by platforms and nor user visible,
it may be useful to support the build with CONFIG_ACPI_PPTT disabled.

This patch adds the missing dummy/boiler plate implementation to fix
the build.

Acked-by: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
include/linux/acpi.h
include/linux/cacheinfo.h

index 032e12a2fdc289c9be4523b43eca549f07eb0d3d..d2639cd2eafcdf39bfa3f68e454461ae65e79739 100644 (file)
@@ -1297,8 +1297,23 @@ static inline int lpit_read_residency_count_address(u64 *address)
 }
 #endif
 
+#ifdef CONFIG_ACPI_PPTT
 int find_acpi_cpu_topology(unsigned int cpu, int level);
 int find_acpi_cpu_topology_package(unsigned int cpu);
 int find_acpi_cpu_cache_topology(unsigned int cpu, int level);
+#else
+static inline int find_acpi_cpu_topology(unsigned int cpu, int level)
+{
+       return -EINVAL;
+}
+static inline int find_acpi_cpu_topology_package(unsigned int cpu)
+{
+       return -EINVAL;
+}
+static inline int find_acpi_cpu_cache_topology(unsigned int cpu, int level)
+{
+       return -EINVAL;
+}
+#endif
 
 #endif /*_LINUX_ACPI_H*/
index 89397e30e2695ab48f8092eb8d8d965fb7e284d9..70e19bc6cc9fc29230a1b5774112414a2f75e89d 100644 (file)
@@ -98,7 +98,7 @@ struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu);
 int init_cache_level(unsigned int cpu);
 int populate_cache_leaves(unsigned int cpu);
 int cache_setup_acpi(unsigned int cpu);
-#ifndef CONFIG_ACPI
+#ifndef CONFIG_ACPI_PPTT
 /*
  * acpi_find_last_cache_level is only called on ACPI enabled
  * platforms using the PPTT for topology. This means that if