* [PATCH] fix dynticks for voyager
@ 2007-04-30 16:38 James Bottomley
2007-04-30 22:13 ` Thomas Gleixner
2007-05-01 22:24 ` Matt Mackall
0 siblings, 2 replies; 5+ messages in thread
From: James Bottomley @ 2007-04-30 16:38 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linux-kernel
As usual voyager tripped over an explicit boot CPU is zero assumption in
the dynticks code. This is the fix I have queued in the voyager tree.
James
---
>From 5d3e489cf8fcf12eff92476098b9bfa0120ee3c7 Mon Sep 17 00:00:00 2001
From: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: Mon, 30 Apr 2007 11:27:25 -0500
Subject: [VOYAGER] clockevents: correct boot cpu is zero assumption
This isn't true for voyager, so alter setup_pit_timer() to initialise
the cpumask from the current processor id (which should be the boot
processor) rather than defaulting to zero.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
arch/i386/kernel/i8253.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c
index 10cef5c..f8a3c40 100644
--- a/arch/i386/kernel/i8253.c
+++ b/arch/i386/kernel/i8253.c
@@ -110,7 +110,7 @@ void __init setup_pit_timer(void)
* Start pit with the boot cpu mask and make it global after the
* IO_APIC has been initialized.
*/
- pit_clockevent.cpumask = cpumask_of_cpu(0);
+ pit_clockevent.cpumask = cpumask_of_cpu(smp_processor_id());
pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 32);
pit_clockevent.max_delta_ns =
clockevent_delta2ns(0x7FFF, &pit_clockevent);
--
1.4.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fix dynticks for voyager
2007-04-30 16:38 [PATCH] fix dynticks for voyager James Bottomley
@ 2007-04-30 22:13 ` Thomas Gleixner
2007-05-01 22:24 ` Matt Mackall
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2007-04-30 22:13 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-kernel
On Mon, 2007-04-30 at 11:38 -0500, James Bottomley wrote:
> As usual voyager tripped over an explicit boot CPU is zero assumption in
> the dynticks code. This is the fix I have queued in the voyager tree.
I expected some kind of voyager breakage. I desperately tried to find
one for testing in my museum of bizarre hardware to avoid this,
but ... :)
tglx
> ---
>
> >From 5d3e489cf8fcf12eff92476098b9bfa0120ee3c7 Mon Sep 17 00:00:00 2001
> From: James Bottomley <James.Bottomley@HansenPartnership.com>
> Date: Mon, 30 Apr 2007 11:27:25 -0500
> Subject: [VOYAGER] clockevents: correct boot cpu is zero assumption
>
> This isn't true for voyager, so alter setup_pit_timer() to initialise
> the cpumask from the current processor id (which should be the boot
> processor) rather than defaulting to zero.
>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> arch/i386/kernel/i8253.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c
> index 10cef5c..f8a3c40 100644
> --- a/arch/i386/kernel/i8253.c
> +++ b/arch/i386/kernel/i8253.c
> @@ -110,7 +110,7 @@ void __init setup_pit_timer(void)
> * Start pit with the boot cpu mask and make it global after the
> * IO_APIC has been initialized.
> */
> - pit_clockevent.cpumask = cpumask_of_cpu(0);
> + pit_clockevent.cpumask = cpumask_of_cpu(smp_processor_id());
> pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 32);
> pit_clockevent.max_delta_ns =
> clockevent_delta2ns(0x7FFF, &pit_clockevent);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix dynticks for voyager
2007-04-30 16:38 [PATCH] fix dynticks for voyager James Bottomley
2007-04-30 22:13 ` Thomas Gleixner
@ 2007-05-01 22:24 ` Matt Mackall
2007-05-02 0:26 ` Jeremy Fitzhardinge
1 sibling, 1 reply; 5+ messages in thread
From: Matt Mackall @ 2007-05-01 22:24 UTC (permalink / raw)
To: James Bottomley; +Cc: Thomas Gleixner, linux-kernel
On Mon, Apr 30, 2007 at 11:38:51AM -0500, James Bottomley wrote:
> As usual voyager tripped over an explicit boot CPU is zero assumption in
> the dynticks code. This is the fix I have queued in the voyager tree.
Can we flush out all these assumptions by adding a constant offset
somewhere? Or reversing the ordering?
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix dynticks for voyager
2007-05-01 22:24 ` Matt Mackall
@ 2007-05-02 0:26 ` Jeremy Fitzhardinge
2007-05-02 0:47 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Jeremy Fitzhardinge @ 2007-05-02 0:26 UTC (permalink / raw)
To: Matt Mackall; +Cc: James Bottomley, Thomas Gleixner, linux-kernel
Matt Mackall wrote:
> On Mon, Apr 30, 2007 at 11:38:51AM -0500, James Bottomley wrote:
>
>> As usual voyager tripped over an explicit boot CPU is zero assumption in
>> the dynticks code. This is the fix I have queued in the voyager tree.
>>
>
> Can we flush out all these assumptions by adding a constant offset
> somewhere? Or reversing the ordering?
>
My understanding is that the boot CPU is random depending on who wins
the "I get to boot" bunfight.
J
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix dynticks for voyager
2007-05-02 0:26 ` Jeremy Fitzhardinge
@ 2007-05-02 0:47 ` James Bottomley
0 siblings, 0 replies; 5+ messages in thread
From: James Bottomley @ 2007-05-02 0:47 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: Matt Mackall, Thomas Gleixner, linux-kernel
On Tue, 2007-05-01 at 17:26 -0700, Jeremy Fitzhardinge wrote:
> Matt Mackall wrote:
> > On Mon, Apr 30, 2007 at 11:38:51AM -0500, James Bottomley wrote:
> >
> >> As usual voyager tripped over an explicit boot CPU is zero assumption in
> >> the dynticks code. This is the fix I have queued in the voyager tree.
> >>
> >
> > Can we flush out all these assumptions by adding a constant offset
> > somewhere? Or reversing the ordering?
It might be useful to voyager, but unless the offset were random, people
would simply hardwire it.
> My understanding is that the boot CPU is random depending on who wins
> the "I get to boot" bunfight.
Not quite. On apic systems, the boot CPU can be an arbitrary physical
id but is conventionally logical id 0. On voyager, the CPU id actually
maps to a fixed location, so there's no sense in having a logical id.
The booting CPU on voyager is simply the lowest numbered CPU that comes
up through the SUS boot.
James
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-02 0:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30 16:38 [PATCH] fix dynticks for voyager James Bottomley
2007-04-30 22:13 ` Thomas Gleixner
2007-05-01 22:24 ` Matt Mackall
2007-05-02 0:26 ` Jeremy Fitzhardinge
2007-05-02 0:47 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox