From: Ingo Molnar make use of local_irq_enable_in_hardirq() API to annotate places that enable hardirqs in hardirq context. Has no effect on non-lockdep kernels. Signed-off-by: Ingo Molnar Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton --- arch/i386/kernel/nmi.c | 2 +- arch/x86_64/kernel/nmi.c | 2 +- drivers/ide/ide-floppy.c | 2 +- drivers/ide/ide-io.c | 6 +++--- drivers/ide/ide-taskfile.c | 2 +- include/linux/ide.h | 2 +- kernel/irq/handle.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff -puN arch/i386/kernel/nmi.c~lockdep-annotate-enable_in_hardirq arch/i386/kernel/nmi.c --- a/arch/i386/kernel/nmi.c~lockdep-annotate-enable_in_hardirq +++ a/arch/i386/kernel/nmi.c @@ -107,7 +107,7 @@ int nmi_active; static __init void nmi_cpu_busy(void *data) { volatile int *endflag = data; - local_irq_enable(); + local_irq_enable_in_hardirq(); /* Intentionally don't use cpu_relax here. This is to make sure that the performance counter really ticks, even if there is a simulator or similar that catches the diff -puN arch/x86_64/kernel/nmi.c~lockdep-annotate-enable_in_hardirq arch/x86_64/kernel/nmi.c --- a/arch/x86_64/kernel/nmi.c~lockdep-annotate-enable_in_hardirq +++ a/arch/x86_64/kernel/nmi.c @@ -128,7 +128,7 @@ void __cpuinit nmi_watchdog_default(void static __init void nmi_cpu_busy(void *data) { volatile int *endflag = data; - local_irq_enable(); + local_irq_enable_in_hardirq(); /* Intentionally don't use cpu_relax here. This is to make sure that the performance counter really ticks, even if there is a simulator or similar that catches the diff -puN drivers/ide/ide-floppy.c~lockdep-annotate-enable_in_hardirq drivers/ide/ide-floppy.c --- a/drivers/ide/ide-floppy.c~lockdep-annotate-enable_in_hardirq +++ a/drivers/ide/ide-floppy.c @@ -839,7 +839,7 @@ static ide_startstop_t idefloppy_pc_intr "transferred\n", pc->actually_transferred); clear_bit(PC_DMA_IN_PROGRESS, &pc->flags); - local_irq_enable(); + local_irq_enable_in_hardirq(); if (status.b.check || test_bit(PC_DMA_ERROR, &pc->flags)) { /* Error detected */ diff -puN drivers/ide/ide-io.c~lockdep-annotate-enable_in_hardirq drivers/ide/ide-io.c --- a/drivers/ide/ide-io.c~lockdep-annotate-enable_in_hardirq +++ a/drivers/ide/ide-io.c @@ -693,7 +693,7 @@ static ide_startstop_t drive_cmd_intr (i u8 stat = hwif->INB(IDE_STATUS_REG); int retries = 10; - local_irq_enable(); + local_irq_enable_in_hardirq(); if ((stat & DRQ_STAT) && args && args[3]) { u8 io_32bit = drive->io_32bit; drive->io_32bit = 0; @@ -1286,7 +1286,7 @@ static void ide_do_request (ide_hwgroup_ if (masked_irq != IDE_NO_IRQ && hwif->irq != masked_irq) disable_irq_nosync(hwif->irq); spin_unlock(&ide_lock); - local_irq_enable(); + local_irq_enable_in_hardirq(); /* allow other IRQs while we start this request */ startstop = start_request(drive, rq); spin_lock_irq(&ide_lock); @@ -1635,7 +1635,7 @@ irqreturn_t ide_intr (int irq, void *dev spin_unlock(&ide_lock); if (drive->unmask) - local_irq_enable(); + local_irq_enable_in_hardirq(); /* service this interrupt, may set handler for next interrupt */ startstop = handler(drive); spin_lock_irq(&ide_lock); diff -puN drivers/ide/ide-taskfile.c~lockdep-annotate-enable_in_hardirq drivers/ide/ide-taskfile.c --- a/drivers/ide/ide-taskfile.c~lockdep-annotate-enable_in_hardirq +++ a/drivers/ide/ide-taskfile.c @@ -223,7 +223,7 @@ ide_startstop_t task_no_data_intr (ide_d ide_hwif_t *hwif = HWIF(drive); u8 stat; - local_irq_enable(); + local_irq_enable_in_hardirq(); if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG),READY_STAT,BAD_STAT)) { return ide_error(drive, "task_no_data_intr", stat); /* calls ide_end_drive_cmd */ diff -puN include/linux/ide.h~lockdep-annotate-enable_in_hardirq include/linux/ide.h --- a/include/linux/ide.h~lockdep-annotate-enable_in_hardirq +++ a/include/linux/ide.h @@ -1361,7 +1361,7 @@ extern struct semaphore ide_cfg_sem; * ide_drive_t->hwif: constant, no locking */ -#define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable(); } while (0) +#define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable_in_hardirq(); } while (0) extern struct bus_type ide_bus_type; diff -puN kernel/irq/handle.c~lockdep-annotate-enable_in_hardirq kernel/irq/handle.c --- a/kernel/irq/handle.c~lockdep-annotate-enable_in_hardirq +++ a/kernel/irq/handle.c @@ -114,7 +114,7 @@ irqreturn_t handle_IRQ_event(unsigned in unsigned int status = 0; if (!(action->flags & SA_INTERRUPT)) - local_irq_enable(); + local_irq_enable_in_hardirq(); do { ret = action->handler(irq, action->dev_id, regs); _