Re: [PATCH] x86: use acpi_numa_init to parse on 32bit numa

Previous thread: [2.6.26 patch] fuse: fix thinko in max I/O size calucation by Miklos Szeredi on Tuesday, June 17, 2008 - 12:05 pm. (3 messages)

Next thread: none
To: Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>
Cc: linux-kernel@vger.kernel.org <linux-kernel@...>
Date: Tuesday, June 17, 2008 - 1:02 pm

so make it more like 64 bit

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

--- a/arch/x86/kernel/setup_32.c 2008-06-17 00:22:29.000000000 -0700
+++ b/arch/x86/kernel/setup_32.c 2008-06-17 00:25:42.000000000 -0700
@@ -624,21 +624,6 @@ void __init setup_bootmem_allocator(void
free_bootmem_with_active_regions(i, max_low_pfn);
early_res_to_bootmem(0, max_low_pfn<<PAGE_SHIFT);

-#ifdef CONFIG_ACPI_SLEEP
- /*
- * Reserve low memory region for sleep support.
- */
- acpi_reserve_bootmem();
-#endif
-#ifdef CONFIG_X86_FIND_SMP_CONFIG
- /*
- * Find and reserve possible boot-time SMP configuration:
- */
- find_smp_config();
-#endif
- reserve_crashkernel();
-
- reserve_ibft_region();
}

/*
@@ -804,6 +789,22 @@ void __init setup_arch(char **cmdline_p)

max_low_pfn = setup_memory();

+#ifdef CONFIG_ACPI_SLEEP
+ /*
+ * Reserve low memory region for sleep support.
+ */
+ acpi_reserve_bootmem();
+#endif
+#ifdef CONFIG_X86_FIND_SMP_CONFIG
+ /*
+ * Find and reserve possible boot-time SMP configuration:
+ */
+ find_smp_config();
+#endif
+ reserve_crashkernel();
+
+ reserve_ibft_region();
+
#ifdef CONFIG_KVM_CLOCK
kvmclock_init();
#endif
--

To: Yinghai Lu <yhlu.kernel@...>
Cc: Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, linux-kernel@vger.kernel.org <linux-kernel@...>
Date: Wednesday, June 18, 2008 - 10:26 am

applied to tip/x86/mpparse. Thanks,

Ingo
--

To: Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>
Cc: linux-kernel@vger.kernel.org <linux-kernel@...>
Date: Tuesday, June 17, 2008 - 6:41 pm

seperate that srat finding and parsing from get_memcfg_from_srat.
and let getmemcfg_from_srat only handle array from previous step.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

Index: linux-2.6/arch/x86/kernel/setup_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup_32.c
+++ linux-2.6/arch/x86/kernel/setup_32.c
@@ -60,6 +60,7 @@
#include <asm/setup.h>
#include <asm/arch_hooks.h>
#include <asm/sections.h>
+#include <asm/dmi.h>
#include <asm/io_apic.h>
#include <asm/ist.h>
#include <asm/io.h>
@@ -186,6 +187,12 @@ int bootloader_type;
static unsigned int highmem_pages = -1;

/*
+ * Early DMI memory
+ */
+int dmi_alloc_index;
+char dmi_alloc_data[DMI_MAX_DATA];
+
+/*
* Setup options
*/
struct screen_info screen_info;
@@ -787,6 +794,24 @@ void __init setup_arch(char **cmdline_p)
max_pfn = e820_end_of_ram();
}

+ dmi_scan_machine();
+
+ io_delay_init();
+
+#ifdef CONFIG_ACPI
+ /*
+ * Parse the ACPI tables for possible boot-time SMP configuration.
+ */
+ acpi_boot_table_init();
+#endif
+
+#ifdef CONFIG_ACPI_NUMA
+ /*
+ * Parse SRAT to discover nodes.
+ */
+ acpi_numa_init();
+#endif
+
max_low_pfn = setup_memory();

#ifdef CONFIG_ACPI_SLEEP
@@ -853,21 +878,10 @@ void __init setup_arch(char **cmdline_p)

paravirt_post_allocator_init();

- dmi_scan_machine();
-
- io_delay_init();
-
#ifdef CONFIG_X86_GENERICARCH
generic_apic_probe();
#endif

-#ifdef CONFIG_ACPI
- /*
- * Parse the ACPI tables for possible boot-time SMP configuration.
- */
- acpi_boot_table_init();
-#endif
-
early_quirks();

#ifdef CONFIG_ACPI
Index: linux-2.6/arch/x86/kernel/srat_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/srat_32.c
+++ linux-2.6/arch/x86/kernel/srat_32.c
@@ -42,7 +42,7 @@
#define BMAP_TEST(bmap, bit) ((bmap)[...

To: Yinghai Lu <yhlu.kernel@...>
Cc: Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, linux-kernel@vger.kernel.org <linux-kernel@...>
Date: Wednesday, June 18, 2008 - 10:21 am

applied to tip/x86/mpparse, thanks Yinghai.

Ingo
--

Previous thread: [2.6.26 patch] fuse: fix thinko in max I/O size calucation by Miklos Szeredi on Tuesday, June 17, 2008 - 12:05 pm. (3 messages)

Next thread: none