ACPI: Add LoongArch support for ACPI_PROCESSOR/ACPI_NUMA
authorHuacai Chen <chenhuacai@loongson.cn>
Mon, 5 Jul 2021 12:42:04 +0000 (20:42 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 16 Jul 2021 17:09:20 +0000 (19:09 +0200)
We are preparing to add new Loongson (based on LoongArch, not MIPS)
support. LoongArch use ACPI other than DT as its boot protocol, so
add its support for ACPI_PROCESSOR/ACPI_NUMA.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/Kconfig
drivers/acpi/numa/Kconfig
drivers/acpi/numa/srat.c
include/linux/acpi.h

index 9d872ea..9efd27e 100644 (file)
@@ -280,9 +280,9 @@ config ACPI_CPPC_LIB
 
 config ACPI_PROCESSOR
        tristate "Processor"
-       depends on X86 || IA64 || ARM64
+       depends on X86 || IA64 || ARM64 || LOONGARCH
        select ACPI_PROCESSOR_IDLE
-       select ACPI_CPU_FREQ_PSS if X86 || IA64
+       select ACPI_CPU_FREQ_PSS if X86 || IA64 || LOONGARCH
        default y
        help
          This driver adds support for the ACPI Processor package. It is required
index fcf2e55..39b1f34 100644 (file)
@@ -2,7 +2,7 @@
 config ACPI_NUMA
        bool "NUMA support"
        depends on NUMA
-       depends on (X86 || IA64 || ARM64)
+       depends on (X86 || IA64 || ARM64 || LOONGARCH)
        default y if IA64 || ARM64
 
 config ACPI_HMAT
index 6021a10..b8795fc 100644 (file)
@@ -206,7 +206,7 @@ int __init srat_disabled(void)
        return acpi_numa < 0;
 }
 
-#if defined(CONFIG_X86) || defined(CONFIG_ARM64)
+#if defined(CONFIG_X86) || defined(CONFIG_ARM64) || defined(CONFIG_LOONGARCH)
 /*
  * Callback for SLIT parsing.  pxm_to_node() returns NUMA_NO_NODE for
  * I/O localities since SRAT does not list them.  I/O localities are
index 72e4f7f..3e48056 100644 (file)
@@ -249,7 +249,7 @@ void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
 /* the following numa functions are architecture-dependent */
 void acpi_numa_slit_init (struct acpi_table_slit *slit);
 
-#if defined(CONFIG_X86) || defined(CONFIG_IA64)
+#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_LOONGARCH)
 void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
 #else
 static inline void