summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/numa.c
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2016-05-24 15:35:39 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-05-30 14:27:08 +0200
commite84025e274e66986277e11f0dda03373e246ffad (patch)
tree7a1e6837909c3e2b9590ed2f35fd60aaca32f858 /drivers/acpi/numa.c
parent2faeff1d507c21d262e8afca862243909970d567 (diff)
downloadop-kernel-dev-e84025e274e66986277e11f0dda03373e246ffad.zip
op-kernel-dev-e84025e274e66986277e11f0dda03373e246ffad.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> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.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 7e0649d..af0c8d5 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
OpenPOWER on IntegriCloud