[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4505F33E.3020009@goop.org>
Date: Mon, 11 Sep 2006 16:37:34 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Andrew Morton <akpm@...l.org>
CC: Andi Kleen <ak@...e.de>, Ingo Molnar <mingo@...e.hu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] i386-pda: Initialize the PDA early, before any C code
runs.
Jeremy Fitzhardinge wrote:
> Not sure, but I think this replicates the behaviour of the original
> code (ie, INIT_THREAD_INFO initializes cpu to 0, so smp_processor_id
> will return 0). Hm, Voyager will probably need a little patch to
> update the the PDA cpu_number properly in smp_setup_processor_id().
Something like this, perhaps:
Subject: set the boot CPU number in the boot_pda
Signed-off-by: Jeremy Fitzhardinge <jeremy@...source.com>
diff -r 97aa2356d521 arch/i386/mach-voyager/voyager_smp.c
--- a/arch/i386/mach-voyager/voyager_smp.c Mon Sep 11 14:52:11 2006 -0700
+++ b/arch/i386/mach-voyager/voyager_smp.c Mon Sep 11 16:34:09 2006 -0700
@@ -28,6 +28,7 @@
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
#include <asm/arch_hooks.h>
+#include <asm/pda.h>
/* TLB state -- visible externally, indexed physically */
DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate) ____cacheline_aligned = { &init_mm, 0 };
@@ -1949,4 +1950,5 @@ smp_setup_processor_id(void)
smp_setup_processor_id(void)
{
current_thread_info()->cpu = hard_smp_processor_id();
-}
+ write_pda(cpu_number, hard_smp_processor_id());
+}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists