public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: don't reallocate pgt for node0
@ 2008-07-01  1:34 Yinghai Lu
  2008-07-01  8:44 ` Ingo Molnar
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Yinghai Lu @ 2008-07-01  1:34 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: LKML


kva ram already mapped right after away, so don't need to get that for low ram.
avoid wasting one copy pgdat.

also add node id in early_res name in case get it from find_e820_area.

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

---
 arch/x86/mm/discontig_32.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/x86/mm/discontig_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/discontig_32.c
+++ linux-2.6/arch/x86/mm/discontig_32.c
@@ -156,17 +156,20 @@ static void __init propagate_e820_map_no
  */
 static void __init allocate_pgdat(int nid)
 {
-	if (nid && node_has_online_mem(nid) && node_remap_start_vaddr[nid])
+	char buf[16];
+
+	if (node_has_online_mem(nid) && node_remap_start_vaddr[nid])
 		NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid];
 	else {
 		unsigned long pgdat_phys;
 		pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT,
-				 (nid ? max_low_pfn:max_pfn_mapped)<<PAGE_SHIFT,
+				 max_pfn_mapped<<PAGE_SHIFT,
 				 sizeof(pg_data_t),
 				 PAGE_SIZE);
 		NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT));
-		reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t),
-			      "NODE_DATA");
+		memset(buf, 0, sizeof(buf));
+		sprintf(buf, "NODE_DATA %d",  nid);
+		reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t), buf);
 	}
 	printk(KERN_DEBUG "allocate_pgdat: node %d NODE_DATA %08lx\n",
 		nid, (unsigned long)NODE_DATA(nid));

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] x86: don't reallocate pgt for node0
  2008-07-01  1:34 [PATCH] x86: don't reallocate pgt for node0 Yinghai Lu
@ 2008-07-01  8:44 ` Ingo Molnar
  2008-07-02  3:02 ` [PATCH] x86: change copy_e820_map to append_e820_map Yinghai Lu
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2008-07-01  8:44 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, LKML


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> kva ram already mapped right after away, so don't need to get that for 
> low ram. avoid wasting one copy pgdat.
> 
> also add node id in early_res name in case get it from find_e820_area.

applied to tip/x86/unify-setup - thanks Yinghai.

	Ingo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH] x86: change copy_e820_map to append_e820_map
  2008-07-01  1:34 [PATCH] x86: don't reallocate pgt for node0 Yinghai Lu
  2008-07-01  8:44 ` Ingo Molnar
@ 2008-07-02  3:02 ` Yinghai Lu
  2008-07-03 13:58   ` Ingo Molnar
  2008-07-02  3:03 ` [PATCH] x86: make early_res_to_bootmem print out less 80 width chars Yinghai Lu
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2008-07-02  3:02 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: LKML


so it has meaningfull name.
also change it to static

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

---
 arch/x86/kernel/e820.c |   15 ++++++++-------
 include/asm-x86/e820.h |    1 -
 2 files changed, 8 insertions(+), 8 deletions(-)

Index: linux-2.6/arch/x86/kernel/e820.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/e820.c
+++ linux-2.6/arch/x86/kernel/e820.c
@@ -360,7 +360,7 @@ int __init sanitize_e820_map(struct e820
 	return 0;
 }
 
-static int __init __copy_e820_map(struct e820entry *biosmap, int nr_map)
+static int __init __append_e820_map(struct e820entry *biosmap, int nr_map)
 {
 	while (nr_map) {
 		u64 start = biosmap->addr;
@@ -389,13 +389,13 @@ static int __init __copy_e820_map(struct
  * will have given us a memory map that we can use to properly
  * set up memory.  If we aren't, we'll fake a memory map.
  */
-int __init copy_e820_map(struct e820entry *biosmap, int nr_map)
+static int __init append_e820_map(struct e820entry *biosmap, int nr_map)
 {
 	/* Only one memory region (or negative)? Ignore it */
 	if (nr_map < 2)
 		return -1;
 
-	return __copy_e820_map(biosmap, nr_map);
+	return __append_e820_map(biosmap, nr_map);
 }
 
 u64 __init e820_update_range(u64 start, u64 size, unsigned old_type,
@@ -581,7 +581,7 @@ void __init parse_e820_ext(struct setup_
 	if (map_len > PAGE_SIZE)
 		sdata = early_ioremap(pa_data, map_len);
 	extmap = (struct e820entry *)(sdata->data);
-	__copy_e820_map(extmap, entries);
+	__append_e820_map(extmap, entries);
 	sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
 	if (map_len > PAGE_SIZE)
 		early_iounmap(sdata, map_len);
@@ -1245,7 +1245,8 @@ char *__init default_machine_specific_me
 			ARRAY_SIZE(boot_params.e820_map),
 			&new_nr);
 	boot_params.e820_entries = new_nr;
-	if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) < 0) {
+	if (append_e820_map(boot_params.e820_map, boot_params.e820_entries)
+	  < 0) {
 		u64 mem_size;
 
 		/* compare results from other methods and take the greater */
Index: linux-2.6/include/asm-x86/e820.h
===================================================================
--- linux-2.6.orig/include/asm-x86/e820.h
+++ linux-2.6/include/asm-x86/e820.h
@@ -67,7 +67,6 @@ extern void e820_add_region(u64 start, u
 extern void e820_print_map(char *who);
 extern int
 sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map);
-extern int copy_e820_map(struct e820entry *biosmap, int nr_map);
 extern u64 e820_update_range(u64 start, u64 size, unsigned old_type,
 			       unsigned new_type);
 extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type,

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH] x86: make early_res_to_bootmem print out less 80 width chars
  2008-07-01  1:34 [PATCH] x86: don't reallocate pgt for node0 Yinghai Lu
  2008-07-01  8:44 ` Ingo Molnar
  2008-07-02  3:02 ` [PATCH] x86: change copy_e820_map to append_e820_map Yinghai Lu
@ 2008-07-02  3:03 ` Yinghai Lu
  2008-07-03 13:58   ` Ingo Molnar
  2008-07-02  3:04 ` [PATCH] x86: not printout if not finding setup_data Yinghai Lu
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2008-07-02  3:03 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: LKML


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

---
 arch/x86/kernel/e820.c |   15 ++++++++-------
 include/asm-x86/e820.h |    1 -
 2 files changed, 8 insertions(+), 8 deletions(-)

Index: linux-2.6/arch/x86/kernel/e820.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/e820.c
+++ linux-2.6/arch/x86/kernel/e820.c
@@ -839,7 +839,7 @@ void __init early_res_to_bootmem(u64 sta
 	printk(KERN_INFO "(%d early reservations) ==> bootmem\n", count);
 	for (i = 0; i < count; i++) {
 		struct early_res *r = &early_res[i];
-		printk(KERN_INFO "  #%d [ %010llx - %010llx ] %16s", i,
+		printk(KERN_INFO "  #%d [%010llx - %010llx] %16s", i,
 			r->start, r->end, r->name);
 		final_start = max(start, r->start);
 		final_end = min(end, r->end);
@@ -847,7 +847,7 @@ void __init early_res_to_bootmem(u64 sta
 			printk(KERN_CONT "\n");
 			continue;
 		}
-		printk(KERN_CONT " ===> [ %010llx - %010llx ]\n",
+		printk(KERN_CONT " ==> [%010llx - %010llx]\n",
 			final_start, final_end);
 		reserve_bootmem_generic(final_start, final_end - final_start,
 				BOOTMEM_DEFAULT);

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH] x86: not printout if not finding setup_data
  2008-07-01  1:34 [PATCH] x86: don't reallocate pgt for node0 Yinghai Lu
                   ` (2 preceding siblings ...)
  2008-07-02  3:03 ` [PATCH] x86: make early_res_to_bootmem print out less 80 width chars Yinghai Lu
@ 2008-07-02  3:04 ` Yinghai Lu
  2008-07-03 13:55   ` Ingo Molnar
  2008-07-02  7:31 ` [PATCH] x86: merge zones_sizes_init for numa and non numa on 32bit Yinghai Lu
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2008-07-02  3:04 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: LKML


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

---
 arch/x86/kernel/setup.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -399,6 +399,7 @@ static void __init reserve_setup_data(vo
 	struct setup_data *data;
 	u64 pa_data;
 	char buf[32];
+	int found = 0;
 
 	if (boot_params.hdr.version < 0x0209)
 		return;
@@ -409,9 +410,13 @@ static void __init reserve_setup_data(vo
 		reserve_early(pa_data, pa_data+sizeof(*data)+data->len, buf);
 		e820_update_range(pa_data, sizeof(*data)+data->len,
 			 E820_RAM, E820_RESERVED_KERN);
+		found = 1;
 		pa_data = data->next;
 		early_iounmap(data, sizeof(*data));
 	}
+	if (!found)
+		return;
+
 	sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
 	printk(KERN_INFO "extended physical RAM map:\n");
 	e820_print_map("reserve setup_data");

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH] x86: merge zones_sizes_init for numa and non numa on 32bit
  2008-07-01  1:34 [PATCH] x86: don't reallocate pgt for node0 Yinghai Lu
                   ` (3 preceding siblings ...)
  2008-07-02  3:04 ` [PATCH] x86: not printout if not finding setup_data Yinghai Lu
@ 2008-07-02  7:31 ` Yinghai Lu
  2008-07-03 13:54   ` Ingo Molnar
  2008-07-03  1:53 ` [PATCH] x86: move init_cpu_to_node after get_smp_config Yinghai Lu
       [not found] ` <200807021851.02301.yinghai.lu@sun.com>
  6 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2008-07-02  7:31 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: LKML


move out e820_register_active_regions from non numa zones_sizes_init()
and remove numa version zones_sizes_init().

and let 32 bit call remove_all_active_ranges in setup_arch directly like 64 bit

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

---
 arch/x86/kernel/setup.c    |    2 --
 arch/x86/mm/discontig_32.c |   16 ----------------
 arch/x86/mm/init_32.c      |   10 ++++------
 include/asm-x86/page_32.h  |    1 -
 4 files changed, 4 insertions(+), 25 deletions(-)

Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -719,10 +719,8 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	acpi_boot_table_init();
 
-#ifdef CONFIG_X86_64
 	/* Remove active ranges so rediscovery with NUMA-awareness happens */
 	remove_all_active_ranges();
-#endif
 
 #ifdef CONFIG_ACPI_NUMA
 	/*
Index: linux-2.6/arch/x86/mm/discontig_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/discontig_32.c
+++ linux-2.6/arch/x86/mm/discontig_32.c
@@ -327,7 +327,6 @@ void __init initmem_init(unsigned long s
 	 * and ZONE_HIGHMEM.
 	 */
 
-	remove_all_active_ranges();
 	get_memcfg_numa();
 
 	kva_pages = round_up(calculate_numa_remap_pages(), PTRS_PER_PTE);
@@ -390,21 +389,6 @@ void __init initmem_init(unsigned long s
 	setup_bootmem_allocator();
 }
 
-void __init zone_sizes_init(void)
-{
-	unsigned long max_zone_pfns[MAX_NR_ZONES];
-	memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
-	max_zone_pfns[ZONE_DMA] =
-		virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
-	max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
-#ifdef CONFIG_HIGHMEM
-	max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
-#endif
-
-	free_area_init_nodes(max_zone_pfns);
-	return;
-}
-
 void __init set_highmem_pages_init(void)
 {
 #ifdef CONFIG_HIGHMEM
Index: linux-2.6/arch/x86/mm/init_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_32.c
+++ linux-2.6/arch/x86/mm/init_32.c
@@ -660,12 +660,14 @@ void __init initmem_init(unsigned long s
 	if (max_pfn > max_low_pfn)
 		highstart_pfn = max_low_pfn;
 	memory_present(0, 0, highend_pfn);
+	e820_register_active_regions(0, 0, highend_pfn);
 	printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
 		pages_to_mb(highend_pfn - highstart_pfn));
 	num_physpages = highend_pfn;
 	high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
 #else
 	memory_present(0, 0, max_low_pfn);
+	e820_register_active_regions(0, 0, max_low_pfn);
 	num_physpages = max_low_pfn;
 	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
 #endif
@@ -677,25 +679,21 @@ void __init initmem_init(unsigned long s
 
 	setup_bootmem_allocator();
 }
+#endif /* !CONFIG_NEED_MULTIPLE_NODES */
 
-void __init zone_sizes_init(void)
+static void __init zone_sizes_init(void)
 {
 	unsigned long max_zone_pfns[MAX_NR_ZONES];
 	memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
 	max_zone_pfns[ZONE_DMA] =
 		virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
 	max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
-	remove_all_active_ranges();
 #ifdef CONFIG_HIGHMEM
 	max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
-	e820_register_active_regions(0, 0, highend_pfn);
-#else
-	e820_register_active_regions(0, 0, max_low_pfn);
 #endif
 
 	free_area_init_nodes(max_zone_pfns);
 }
-#endif /* !CONFIG_NEED_MULTIPLE_NODES */
 
 void __init setup_bootmem_allocator(void)
 {
Index: linux-2.6/include/asm-x86/page_32.h
===================================================================
--- linux-2.6.orig/include/asm-x86/page_32.h
+++ linux-2.6/include/asm-x86/page_32.h
@@ -101,7 +101,6 @@ extern void find_low_pfn_range(void);
 extern unsigned long init_memory_mapping(unsigned long start,
 					 unsigned long end);
 extern void initmem_init(unsigned long, unsigned long);
-extern void zone_sizes_init(void);
 extern void setup_bootmem_allocator(void);
 
 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH] x86: move init_cpu_to_node after get_smp_config
  2008-07-01  1:34 [PATCH] x86: don't reallocate pgt for node0 Yinghai Lu
                   ` (4 preceding siblings ...)
  2008-07-02  7:31 ` [PATCH] x86: merge zones_sizes_init for numa and non numa on 32bit Yinghai Lu
@ 2008-07-03  1:53 ` Yinghai Lu
  2008-07-03 13:54   ` Ingo Molnar
       [not found] ` <200807021851.02301.yinghai.lu@sun.com>
  6 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2008-07-03  1:53 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: LKML


when acpi=off, cpu_to_apicid is ready after get_smp_config
so need to move init_cpu_to_node after it.

otherwise, we will get wrong cpu->node mapping. and it will rely on
amd_detect_cmp to correct it. but that is too late.
setup_per_cpu_data is already called before that.
we will get per_cpu_data on wrong node.

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

---
 arch/x86/kernel/setup.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -780,10 +780,6 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	acpi_boot_init();
 
-#ifdef CONFIG_X86_64
-	init_cpu_to_node();
-#endif
-
 #if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS)
 	/*
 	 * get boot-time SMP configuration:
@@ -792,6 +788,10 @@ void __init setup_arch(char **cmdline_p)
 		get_smp_config();
 #endif
 
+#ifdef CONFIG_X86_64
+	init_cpu_to_node();
+#endif
+
 	init_apic_mappings();
 	ioapic_init_mappings();

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH] x86: move prefill_possible_map calling early
       [not found] ` <200807021851.02301.yinghai.lu@sun.com>
@ 2008-07-03  1:54   ` Yinghai Lu
  2008-07-03 13:54     ` Ingo Molnar
  0 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2008-07-03  1:54 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: LKML


call it right after we done with MADT/mptable handling, instead of doing that
in setup_per_cpu_areas later...
so for_possible_cpu could be used early.

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

---
 arch/x86/kernel/setup.c        |    1 +
 arch/x86/kernel/setup_percpu.c |   10 ----------
 arch/x86/kernel/smpboot.c      |    8 ++++++++
 include/asm-x86/smp.h          |    4 ++++
 4 files changed, 13 insertions(+), 10 deletions(-)

Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -788,6 +788,7 @@ void __init setup_arch(char **cmdline_p)
 		get_smp_config();
 #endif
 
+	prefill_possible_map();
 #ifdef CONFIG_X86_64
 	init_cpu_to_node();
 #endif
Index: linux-2.6/arch/x86/kernel/setup_percpu.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup_percpu.c
+++ linux-2.6/arch/x86/kernel/setup_percpu.c
@@ -162,16 +162,6 @@ void __init setup_per_cpu_areas(void)
 	char *ptr;
 	int cpu;
 
-	/* no processor from mptable or madt */
-	if (!num_processors)
-		num_processors = 1;
-
-#ifdef CONFIG_HOTPLUG_CPU
-	prefill_possible_map();
-#else
-	nr_cpu_ids = num_processors;
-#endif
-
 	/* Setup cpu_pda map */
 	setup_cpu_pda_map();
 
Index: linux-2.6/arch/x86/kernel/smpboot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/smpboot.c
+++ linux-2.6/arch/x86/kernel/smpboot.c
@@ -1278,12 +1278,20 @@ __init void prefill_possible_map(void)
 	int i;
 	int possible;
 
+	/* no processor from mptable or madt */
+	if (!num_processors)
+		num_processors = 1;
+
+#ifdef CONFIG_HOTPLUG_CPU
 	if (additional_cpus == -1) {
 		if (disabled_cpus > 0)
 			additional_cpus = disabled_cpus;
 		else
 			additional_cpus = 0;
 	}
+#else
+	additional_cpus = 0;
+#endif
 	possible = num_processors + additional_cpus;
 	if (possible > NR_CPUS)
 		possible = NR_CPUS;
Index: linux-2.6/include/asm-x86/smp.h
===================================================================
--- linux-2.6.orig/include/asm-x86/smp.h
+++ linux-2.6/include/asm-x86/smp.h
@@ -124,6 +124,10 @@ static inline int num_booting_cpus(void)
 {
 	return cpus_weight(cpu_callout_map);
 }
+#else
+static inline void prefill_possible_map(void)
+{
+}
 #endif /* CONFIG_SMP */
 
 extern unsigned disabled_cpus __cpuinitdata;

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] x86: move prefill_possible_map calling early
  2008-07-03  1:54   ` [PATCH] x86: move prefill_possible_map calling early Yinghai Lu
@ 2008-07-03 13:54     ` Ingo Molnar
  2008-07-03 14:03       ` Ingo Molnar
  0 siblings, 1 reply; 15+ messages in thread
From: Ingo Molnar @ 2008-07-03 13:54 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, LKML


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> call it right after we done with MADT/mptable handling, instead of 
> doing that in setup_per_cpu_areas later... so for_possible_cpu could 
> be used early.

applied to tip/x86/unify-setup - thanks Yinghai,

	Ingo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] x86: move init_cpu_to_node after get_smp_config
  2008-07-03  1:53 ` [PATCH] x86: move init_cpu_to_node after get_smp_config Yinghai Lu
@ 2008-07-03 13:54   ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2008-07-03 13:54 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, LKML


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> when acpi=off, cpu_to_apicid is ready after get_smp_config so need to 
> move init_cpu_to_node after it.
> 
> otherwise, we will get wrong cpu->node mapping. and it will rely on 
> amd_detect_cmp to correct it. but that is too late. setup_per_cpu_data 
> is already called before that. we will get per_cpu_data on wrong node.

applied to tip/x86/unify-setup - thanks Yinghai,

        Ingo


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] x86: merge zones_sizes_init for numa and non numa on 32bit
  2008-07-02  7:31 ` [PATCH] x86: merge zones_sizes_init for numa and non numa on 32bit Yinghai Lu
@ 2008-07-03 13:54   ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2008-07-03 13:54 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, LKML


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> move out e820_register_active_regions from non numa zones_sizes_init() 
> and remove numa version zones_sizes_init().
> 
> and let 32 bit call remove_all_active_ranges in setup_arch directly 
> like 64 bit

applied to tip/x86/unify-setup - thanks,

	Ingo


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] x86: not printout if not finding setup_data
  2008-07-02  3:04 ` [PATCH] x86: not printout if not finding setup_data Yinghai Lu
@ 2008-07-03 13:55   ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2008-07-03 13:55 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, LKML


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

>  		reserve_early(pa_data, pa_data+sizeof(*data)+data->len, buf);
>  		e820_update_range(pa_data, sizeof(*data)+data->len,
>  			 E820_RAM, E820_RESERVED_KERN);
> +		found = 1;
>  		pa_data = data->next;
>  		early_iounmap(data, sizeof(*data));
>  	}
> +	if (!found)
> +		return;
> +
>  	sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
>  	printk(KERN_INFO "extended physical RAM map:\n");
>  	e820_print_map("reserve setup_data");

applied to tip/x86/unify-setup - thanks,

	Ingo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] x86: make early_res_to_bootmem print out less 80 width chars
  2008-07-02  3:03 ` [PATCH] x86: make early_res_to_bootmem print out less 80 width chars Yinghai Lu
@ 2008-07-03 13:58   ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2008-07-03 13:58 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, LKML


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

>  		struct early_res *r = &early_res[i];
> -		printk(KERN_INFO "  #%d [ %010llx - %010llx ] %16s", i,
> +		printk(KERN_INFO "  #%d [%010llx - %010llx] %16s", i,
>  			r->start, r->end, r->name);

applied to tip/x86/unify-setup - thanks,

	Ingo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] x86: change copy_e820_map to append_e820_map
  2008-07-02  3:02 ` [PATCH] x86: change copy_e820_map to append_e820_map Yinghai Lu
@ 2008-07-03 13:58   ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2008-07-03 13:58 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, LKML


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> so it has meaningfull name.
> also change it to static

applied to tip/x86/unify-setup - thanks,

	Ingo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] x86: move prefill_possible_map calling early
  2008-07-03 13:54     ` Ingo Molnar
@ 2008-07-03 14:03       ` Ingo Molnar
  0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2008-07-03 14:03 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, LKML


FYI, this one needed the small fixlet below. (prefill_possible_map() is 
dependent on both CONFIG_SMP and CONFIG_HOTPLUG_CPU - not just 
CONFIG_SMP)

	Ingo

-------------->
commit bb42b7bdee9decad536c1e747e2ce2f3daebb76f
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Jul 3 15:57:47 2008 +0200

    x86: move prefill_possible_map calling early, fix
    
    fix:
    
    arch/x86/kernel/built-in.o: In function `setup_arch':
    : undefined reference to `prefill_possible_map'
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index bf6b5ee..c2784b3 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -114,8 +114,6 @@ void native_send_call_func_single_ipi(int cpu);
 extern int __cpu_disable(void);
 extern void __cpu_die(unsigned int cpu);
 
-extern void prefill_possible_map(void);
-
 void smp_store_cpu_info(int id);
 #define cpu_physical_id(cpu)	per_cpu(x86_cpu_to_apicid, cpu)
 
@@ -124,11 +122,15 @@ static inline int num_booting_cpus(void)
 {
 	return cpus_weight(cpu_callout_map);
 }
+#endif /* CONFIG_SMP */
+
+#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_CPU)
+extern void prefill_possible_map(void);
 #else
 static inline void prefill_possible_map(void)
 {
 }
-#endif /* CONFIG_SMP */
+#endif
 
 extern unsigned disabled_cpus __cpuinitdata;
 

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-07-03 14:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01  1:34 [PATCH] x86: don't reallocate pgt for node0 Yinghai Lu
2008-07-01  8:44 ` Ingo Molnar
2008-07-02  3:02 ` [PATCH] x86: change copy_e820_map to append_e820_map Yinghai Lu
2008-07-03 13:58   ` Ingo Molnar
2008-07-02  3:03 ` [PATCH] x86: make early_res_to_bootmem print out less 80 width chars Yinghai Lu
2008-07-03 13:58   ` Ingo Molnar
2008-07-02  3:04 ` [PATCH] x86: not printout if not finding setup_data Yinghai Lu
2008-07-03 13:55   ` Ingo Molnar
2008-07-02  7:31 ` [PATCH] x86: merge zones_sizes_init for numa and non numa on 32bit Yinghai Lu
2008-07-03 13:54   ` Ingo Molnar
2008-07-03  1:53 ` [PATCH] x86: move init_cpu_to_node after get_smp_config Yinghai Lu
2008-07-03 13:54   ` Ingo Molnar
     [not found] ` <200807021851.02301.yinghai.lu@sun.com>
2008-07-03  1:54   ` [PATCH] x86: move prefill_possible_map calling early Yinghai Lu
2008-07-03 13:54     ` Ingo Molnar
2008-07-03 14:03       ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox