Re: [PATCH -v2 6/8] kexec jump: fix for lockdep

From: Huang Ying
Date: Sun Aug 10 2008 - 21:00:18 EST


On Fri, 2008-08-08 at 12:13 +0200, Peter Zijlstra wrote:
> On Fri, 2008-08-08 at 14:52 +0800, Huang Ying wrote:
> > Replace local_irq_disable() with raw_local_irq_disable() to prevent
> > lockdep complain.
> Uhhm, please provide more information - just using raw_* to silence
> lockdep is generally the wrong thing to do.

In traditional kexec, the new kernel will replace current one, so the
irq is simply disabled. But now jumping back from kexeced kernel is
supported, so the irq should be enabled again.

The code sequence of irq during kexec jump is as follow:

local_irq_disable(); /* in kernel_kexec() */
local_irq_disable(); /* in machine_kexec() */
local_irq_enable(); /* in kernel_kexec() */

The disable and enable is not match. Maybe another method is to use
local_irq_save(), local_irq_restore() pair in machine_kexec(), so the
disable and enable is matched.

Best Regrards,
Huang Ying


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/