Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315554 > unrolled thread
| Started by | Hanjun Guo <guohanjun@huawei.com> |
|---|---|
| First post | 2016-01-23 10:50 +0100 |
| Last post | 2016-01-24 06:00 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 04/12] acpi, numa: introduce ACPI_HAS_NUMA_ARCH_FIXUP Hanjun Guo <guohanjun@huawei.com> - 2016-01-23 10:50 +0100
Re: [PATCH v3 04/12] acpi, numa: introduce ACPI_HAS_NUMA_ARCH_FIXUP Robert Richter <robert.richter@caviumnetworks.com> - 2016-01-23 11:30 +0100
Re: [PATCH v3 04/12] acpi, numa: introduce ACPI_HAS_NUMA_ARCH_FIXUP Hanjun Guo <hanjun.guo@linaro.org> - 2016-01-24 06:00 +0100
| From | Hanjun Guo <guohanjun@huawei.com> |
|---|---|
| Date | 2016-01-23 10:50 +0100 |
| Subject | [PATCH v3 04/12] acpi, numa: introduce ACPI_HAS_NUMA_ARCH_FIXUP |
| Message-ID | <qU2Zs-K2-17@gated-at.bofh.it> |
From: Hanjun Guo <hanjun.guo@linaro.org>
acpi_numa_arch_fixup() is only used for IA64, x86 introduce a dummy
function for it, when we came to a new architecture (such as ARM64),
we need to introduce another dummy one to make the code compile.
That's pretty boring so introduce ACPI_HAS_NUMA_ARCH_FIXUP and
select it for IA64, introduce a stub function for acpi_numa_arch_fixup()
then it's pretty clean for x86 and ARM64.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
arch/ia64/Kconfig | 1 +
arch/x86/mm/srat.c | 2 --
drivers/acpi/Kconfig | 3 +++
include/linux/acpi.h | 5 +++++
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index eb0249e..1285cef 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -17,6 +17,7 @@ config IA64
select ACPI if (!IA64_HP_SIM)
select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
+ select ACPI_HAS_NUMA_ARCH_FIXUP if ACPI
select HAVE_UNSTABLE_SCHED_CLOCK
select HAVE_IDE
select HAVE_OPROFILE
diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
index c2aea63..9fa1746 100644
--- a/arch/x86/mm/srat.c
+++ b/arch/x86/mm/srat.c
@@ -210,8 +210,6 @@ out_err:
return -1;
}
-void __init acpi_numa_arch_fixup(void) {}
-
int __init x86_acpi_numa_init(void)
{
int ret;
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 5eef4cb..d6d5749 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -57,6 +57,9 @@ config ACPI_SYSTEM_POWER_STATES_SUPPORT
config ACPI_CCA_REQUIRED
bool
+config ACPI_HAS_NUMA_ARCH_FIXUP
+ bool
+
config ACPI_DEBUGGER
bool "AML debugger interface (EXPERIMENTAL)"
select ACPI_DEBUG
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 1991aea..574d829 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -173,7 +173,12 @@ void acpi_numa_slit_init (struct acpi_table_slit *slit);
void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa);
int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
+
+#ifdef CONFIG_ACPI_HAS_NUMA_ARCH_FIXUP
void acpi_numa_arch_fixup(void);
+#else
+static inline void acpi_numa_arch_fixup(void) { }
+#endif
#ifndef PHYS_CPUID_INVALID
typedef u32 phys_cpuid_t;
--
1.9.1
[toc] | [next] | [standalone]
| From | Robert Richter <robert.richter@caviumnetworks.com> |
|---|---|
| Date | 2016-01-23 11:30 +0100 |
| Message-ID | <qU3C9-1go-17@gated-at.bofh.it> |
| In reply to | #1315554 |
On 23.01.16 17:39:19, Hanjun Guo wrote: > From: Hanjun Guo <hanjun.guo@linaro.org> > > acpi_numa_arch_fixup() is only used for IA64, x86 introduce a dummy > function for it, when we came to a new architecture (such as ARM64), > we need to introduce another dummy one to make the code compile. > > That's pretty boring so introduce ACPI_HAS_NUMA_ARCH_FIXUP and > select it for IA64, introduce a stub function for acpi_numa_arch_fixup() > then it's pretty clean for x86 and ARM64. > > Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> > --- > arch/ia64/Kconfig | 1 + I see an implementation of acpi_numa_arch_fixup() only for ia64. Why not move it to arch/ia64 then and call it from setup_arch() in arch/ia64/kernel/setup.c after acpi_numa_init()? It looks like we don't need a generic solution for this. This avoids any kconfig handling for this at all. -Robert
[toc] | [prev] | [next] | [standalone]
| From | Hanjun Guo <hanjun.guo@linaro.org> |
|---|---|
| Date | 2016-01-24 06:00 +0100 |
| Message-ID | <qUkWl-81Y-5@gated-at.bofh.it> |
| In reply to | #1315569 |
On 01/23/2016 06:25 PM, Robert Richter wrote: > On 23.01.16 17:39:19, Hanjun Guo wrote: >> From: Hanjun Guo <hanjun.guo@linaro.org> >> >> acpi_numa_arch_fixup() is only used for IA64, x86 introduce a dummy >> function for it, when we came to a new architecture (such as ARM64), >> we need to introduce another dummy one to make the code compile. >> >> That's pretty boring so introduce ACPI_HAS_NUMA_ARCH_FIXUP and >> select it for IA64, introduce a stub function for acpi_numa_arch_fixup() >> then it's pretty clean for x86 and ARM64. >> >> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> >> --- >> arch/ia64/Kconfig | 1 + > > I see an implementation of acpi_numa_arch_fixup() only for ia64. Why > not move it to arch/ia64 then and call it from setup_arch() in > arch/ia64/kernel/setup.c after acpi_numa_init()? It looks like we > don't need a generic solution for this. This avoids any kconfig > handling for this at all. It's much simpler as you suggested, I will update it in next version, thank you Robert :) Hanjun
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web