summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2019-06-27 12:52:59 -0700
committerPaul Walmsley <paul.walmsley@sifive.com>2019-07-22 09:36:18 -0700
commitca74b316df96d7c40ee3e8301065607c11c60c27 (patch)
treeaa844dce33617488ae8d2699856fa1a90f1854c4 /drivers/base
parent60c1b220d8bc6baeaf837cd60f94a331b25c26bc (diff)
arm: Use common cpu_topology structure and functions.
Currently, ARM32 and ARM64 uses different data structures to represent their cpu topologies. Since, we are moving the ARM64 topology to common code to be used by other architectures, we can reuse that for ARM32 as well. Take this opprtunity to remove the redundant functions from ARM32 and reuse the common code instead. To: Russell King <linux@armlinux.org.uk> Signed-off-by: Atish Patra <atish.patra@wdc.com> Tested-by: Sudeep Holla <sudeep.holla@arm.com> (on TC2) Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/arch_topology.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 5dc0e1ddd080..b54d241a2ff5 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -423,6 +423,7 @@ out:
of_node_put(cn);
return ret;
}
+#endif
/*
* cpu topology table
@@ -488,7 +489,7 @@ static void clear_cpu_topology(int cpu)
cpumask_set_cpu(cpu, &cpu_topo->thread_sibling);
}
-static void __init reset_cpu_topology(void)
+void __init reset_cpu_topology(void)
{
unsigned int cpu;
@@ -523,6 +524,7 @@ __weak int __init parse_acpi_topology(void)
return 0;
}
+#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV)
void __init init_cpu_topology(void)
{
reset_cpu_topology();