[Cbe-oss-dev] [patch 01/11] powerpc/cell: add support for power button of future IBM cell blades
Arnd Bergmann
arnd at arndb.de
Mon Jul 7 18:40:20 EST 2008
On Monday 07 July 2008, Stephen Rothwell wrote:
> > Signed-off-by: Christian Krafft <krafft at de.ibm.com>
> > Signed-off-by: Arnd Bergmann <arnd at arndb.de>
>
> Was this written by you or Christian?
It's from Christian. For some reason, the author is reflected correctly
in my git tree, but git-format-patch/quilt-mail must have lost that
information. I need to check my scripts.
> > @@ -105,10 +110,21 @@ static int cbe_system_reset_exception(struct pt_regs *regs)
> > */
> > if (sysreset_hack && (cpu = smp_processor_id()) == 0) {
> > pmd = cbe_get_cpu_pmd_regs(cpu);
> > - if (in_be64(&pmd->ras_esc_0) & 0xffff) {
> > + if (in_be64(&pmd->ras_esc_0) & 0x0000ffff) {
> > out_be64(&pmd->ras_esc_0, 0);
> > return 0;
> > }
> > + if (in_be64(&pmd->ras_esc_0) & 0x00010000) {
>
> Do we really want to read that register twice? (Just asking, I don't
> know how the hardware works ...) Also, do we want to recognise this bit
> even if some lower order bits are set? (this code won't)
It would probably be cleaner to read it just once, but it's safe to
read it multiple times. It only gets written by the BMC when a button
gets pressed.
The lower bits are for system-reset, i.e. for entering xmon or kdump,
while the higher bits are for soft power off, and we certainly don't want
to trigger a soft powerp off at the same time as an xmon entry.
Arnd <><
More information about the cbe-oss-dev
mailing list