All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, numa: exit early on numa_reset_distance()
@ 2011-02-16 20:56 Yinghai Lu
  2011-02-16 20:57 ` [PATCH] x86, numa: seperate alloc_numa_distance from numa_reset_distance Yinghai Lu
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Yinghai Lu @ 2011-02-16 20:56 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
  Cc: Tejun Heo, David Rientjes, linux-kernel


Do not call __pa(numa_distance), if it is not allocated before.

it will get BUG_ON if VIRTUAL_DEBUG is on.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/mm/numa_64.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: linux-2.6/arch/x86/mm/numa_64.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/numa_64.c
+++ linux-2.6/arch/x86/mm/numa_64.c
@@ -371,6 +371,12 @@ static void __init numa_reset_distance(v
 {
 	size_t size;
 
+	if (!numa_distance_cnt) {
+		numa_distance = NULL;
+
+		return;
+	}
+
 	size = numa_distance_cnt * sizeof(numa_distance[0]);
 	memblock_x86_free_range(__pa(numa_distance),
 				__pa(numa_distance) + size);

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

end of thread, other threads:[~2011-02-24 14:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-16 20:56 [PATCH] x86, numa: exit early on numa_reset_distance() Yinghai Lu
2011-02-16 20:57 ` [PATCH] x86, numa: seperate alloc_numa_distance from numa_reset_distance Yinghai Lu
2011-02-16 21:44   ` Cyrill Gorcunov
2011-02-16 22:29     ` Yinghai Lu
2011-02-16 22:47       ` Cyrill Gorcunov
2011-02-16 22:51   ` Tejun Heo
2011-02-16 20:58 ` [PATCH] x86, numa: refactoring numa_register_memblks Yinghai Lu
2011-02-16 22:43   ` Tejun Heo
2011-02-16 22:53     ` Yinghai Lu
2011-02-16 23:03       ` Tejun Heo
2011-02-16 22:30 ` [PATCH] x86, numa: put dummy_numa_init in init section Yinghai Lu
2011-02-16 22:44   ` Tejun Heo
     [not found]     ` <20110217130526.GB27911@elte.hu>
     [not found]       ` <20110217132435.GV19830@htj.dyndns.org>
     [not found]         ` <20110217135628.GB7018@elte.hu>
     [not found]           ` <4D5D48DA.6020908@kernel.org>
     [not found]             ` <20110217161649.GD14168@elte.hu>
2011-02-24  7:21               ` [PATCH -v2] x86: Rename e820_table_* to pgt_buf_* Yinghai Lu
2011-02-24 13:59                 ` [PATCH] " Tejun Heo
2011-02-16 22:31 ` [PATCH] x86, numa: cleanup x86_acpi_numa_init() Yinghai Lu
2011-02-16 22:49   ` Tejun Heo
2011-02-16 22:55     ` Yinghai Lu
2011-02-16 22:39 ` [PATCH] x86, numa: exit early on numa_reset_distance() Tejun Heo
2011-02-16 23:08   ` Yinghai Lu
2011-02-16 23:15     ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.