]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
arm64: topology: Use acpi_disabled for ACPI check
authorRobert Richter <rrichter@cavium.com>
Fri, 3 Jul 2015 17:47:12 +0000 (19:47 +0200)
committerJulien Grall <julien.grall@citrix.com>
Mon, 28 Sep 2015 11:05:22 +0000 (12:05 +0100)
Signed-off-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
arch/arm64/kernel/topology.c

index 8ca4ab288c426478002d9d483c1c6fe28e78e289..3f14ae97d96bd1f90cf3bfca2d5634347c1a89ea 100644 (file)
@@ -11,6 +11,7 @@
  * for more details.
  */
 
+#include <linux/acpi.h>
 #include <linux/cpu.h>
 #include <linux/cpumask.h>
 #include <linux/init.h>
@@ -257,20 +258,20 @@ void store_cpu_topology(unsigned int cpuid)
                cpuid_topo->core_id    = MPIDR_AFFINITY_LEVEL(mpidr, 1);
                cpuid_topo->cluster_id = MPIDR_AFFINITY_LEVEL(mpidr, 2) |
                                         MPIDR_AFFINITY_LEVEL(mpidr, 3) << 8;
-       } else {
 #ifdef CONFIG_ACPI
+       } else if (!acpi_disabled) {
                /* Multiprocessor system : Single-thread per core */
                cpuid_topo->thread_id  = -1;
                cpuid_topo->core_id    = (((mpidr >> 8) & 0xff) * 16) + (mpidr & 0xff);
                cpuid_topo->cluster_id = (cpuid_topo->core_id) > 47 ? 1:0;
-#else
+#endif
+       } else {
                /* Multiprocessor system : Single-thread per core */
                cpuid_topo->thread_id  = -1;
                cpuid_topo->core_id    = MPIDR_AFFINITY_LEVEL(mpidr, 0);
                cpuid_topo->cluster_id = MPIDR_AFFINITY_LEVEL(mpidr, 1) |
                                         MPIDR_AFFINITY_LEVEL(mpidr, 2) << 8 |
                                         MPIDR_AFFINITY_LEVEL(mpidr, 3) << 16;
-#endif
        }
 
        pr_debug("CPU%u: cluster %d core %d thread %d mpidr %#016llx\n",