aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/numa.c
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2016-05-24 15:35:39 -0700
committerGraeme Gregory <graeme.gregory@linaro.org>2016-06-07 14:07:21 +0100
commit17f2c650a523614ad817d371db9f40a829cb29de (patch)
treec6b1610c490ec45913183db7eaca4d601139d86c /drivers/acpi/numa.c
parenta68f9ff3de88d837d5e25f1d082bf0fd3768ad58 (diff)
downloadleg-kernel-17f2c650a523614ad817d371db9f40a829cb29de.tar.gz
acpi, numa: move bad_srat() and srat_disabled() to drivers/acpi/numa.c
bad_srat() and srat_disabled() are shared by x86 and follow-on arm64 patches. Move them to drivers/acpi/numa.c in preparation for arm64 support. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Robert Richter <rrichter@cavium.com> [david.daney@cavium.com moved definitions to drivers/acpi/numa.c] Signed-off-by: David Daney <david.daney@cavium.com>
Diffstat (limited to 'drivers/acpi/numa.c')
-rw-r--r--drivers/acpi/numa.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 7e0649d11da2..af0c8d5c845b 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -40,6 +40,7 @@ static int node_to_pxm_map[MAX_NUMNODES]
= { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
unsigned char acpi_srat_revision __initdata;
+int acpi_numa __initdata;
int pxm_to_node(int pxm)
{
@@ -197,6 +198,17 @@ static int __init slit_valid(struct acpi_table_slit *slit)
return 1;
}
+void __init bad_srat(void)
+{
+ pr_err("SRAT: SRAT not used.\n");
+ acpi_numa = -1;
+}
+
+int __init srat_disabled(void)
+{
+ return acpi_numa < 0;
+}
+
#if defined(CONFIG_X86) || defined(CONFIG_ARM64)
/*
* Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for