[PATCH 1/1] x86: leave initial __cpu_pda array in place until cpus are booted

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Wednesday, April 30, 2008 - 11:02 am

Ingo Molnar wrote:
...
...
Here's the fixup...  This one should follow the previous patches.

Thanks,
Mike
---
Subject: [PATCH 1/1] x86: leave initial __cpu_pda array in place until cpus are booted

  * The __cpu_pda table must be a set of NULL entries (except for the boot cpu)
    to indicate to numa_set_node during early system initialization that the
    cpu pdas are not yet setup.  The pda nodenumber is set later in pda_init().

Based on:
	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    +   sched-devel/latest  .../mingo/linux-2.6-sched-devel.git


Signed-off-by: Mike Travis <travis@sgi.com>
---
 arch/x86/kernel/head64.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

--- linux-2.6.sched.orig/arch/x86/kernel/head64.c
+++ linux-2.6.sched/arch/x86/kernel/head64.c
@@ -29,17 +29,13 @@
 static struct x8664_pda _boot_cpu_pda __read_mostly;
 
 #ifdef CONFIG_SMP
-#ifdef CONFIG_DEBUG_PER_CPU_MAPS
 /*
- * We install an empty cpu_pda pointer table to trap references before
- * the actual cpu_pda pointer table is created in setup_cpu_pda_map().
+ * We install an empty cpu_pda pointer table to indicate to early users
+ * (numa_set_node) that the cpu_pda pointer table for cpus other than
+ * the boot cpu is not yet setup.
  */
 static struct x8664_pda *__cpu_pda[NR_CPUS] __initdata;
 #else
-static struct x8664_pda *__cpu_pda[1] __read_mostly;
-#endif
-
-#else /* !CONFIG_SMP (NR_CPUS will be 1) */
 static struct x8664_pda *__cpu_pda[NR_CPUS] __read_mostly;
 #endif
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Mon Apr 28, 5:09 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Ingo Molnar, (Mon Apr 28, 5:45 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Tue Apr 29, 1:38 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Tue Apr 29, 2:53 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Ingo Molnar, (Tue Apr 29, 5:44 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Ingo Molnar, (Wed Apr 30, 2:04 am)
[PATCH 1/1] x86: leave initial __cpu_pda array in place unti..., Mike Travis, (Wed Apr 30, 11:02 am)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Wed Apr 30, 10:15 am)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Tue Apr 29, 12:07 pm)