[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200703071206.52551.arnd@arndb.de>
Date: Wed, 7 Mar 2007 12:06:51 +0100
From: Arnd Bergmann <arnd@...db.de>
To: linuxppc-dev@...abs.org
Cc: Ingo Molnar <mingo@...e.hu>,
Tsutomu OWA <tsutomu.owa@...hiba.co.jp>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC] [patch 4/6 -rt] powerpc 2.6.20-rt8: fix a runtime warnings for xmon
On Wednesday 07 March 2007, Ingo Molnar wrote:
> i'm not an xmon expert, but maybe it might make more sense to first
> disable preemption, then interrupts - otherwise you could be preempted
> right after having disabled these interrupts (and be scheduled to
> another CPU, etc.). What is the difference between local_irq_save() and
> the above 'disable interrupts' sequence? If it's not the same and
> xmon_core() relied on having hardirqs disabled then it might make sense
> to do a local_irq_save() there, instead of a preempt_disable().
Since relatively recently, powerpc does no longer actually disable
the hardware interrupts with local_irq_disable(), but rather sets
a per-cpu flag that will be checked if an actual interrupt comes
in as part of the critical section.
The mtmsr() sequence in xmon corresponds to hard_irq_disable()
and should probably changed to that, but then you still need
the extra preempt_disable() / preempt_enable().
I think you're right about the sequence having to be
1. preempt_disable()
2. hard_irq_disable()
3.
4. hard_irq_enable()
5. preempt_enable()
Arnd <><
-
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