Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] lockdep: annotate enable_in_hardirq()

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 <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Ingo Molnar and committed by
Linus Torvalds
366c7f55 0a9da4bd

+9 -9
+1 -1
arch/i386/kernel/nmi.c
··· 107 107 static __init void nmi_cpu_busy(void *data) 108 108 { 109 109 volatile int *endflag = data; 110 - local_irq_enable(); 110 + local_irq_enable_in_hardirq(); 111 111 /* Intentionally don't use cpu_relax here. This is 112 112 to make sure that the performance counter really ticks, 113 113 even if there is a simulator or similar that catches the
+1 -1
arch/x86_64/kernel/nmi.c
··· 127 127 static __init void nmi_cpu_busy(void *data) 128 128 { 129 129 volatile int *endflag = data; 130 - local_irq_enable(); 130 + local_irq_enable_in_hardirq(); 131 131 /* Intentionally don't use cpu_relax here. This is 132 132 to make sure that the performance counter really ticks, 133 133 even if there is a simulator or similar that catches the
+1 -1
drivers/ide/ide-floppy.c
··· 838 838 "transferred\n", pc->actually_transferred); 839 839 clear_bit(PC_DMA_IN_PROGRESS, &pc->flags); 840 840 841 - local_irq_enable(); 841 + local_irq_enable_in_hardirq(); 842 842 843 843 if (status.b.check || test_bit(PC_DMA_ERROR, &pc->flags)) { 844 844 /* Error detected */
+3 -3
drivers/ide/ide-io.c
··· 693 693 u8 stat = hwif->INB(IDE_STATUS_REG); 694 694 int retries = 10; 695 695 696 - local_irq_enable(); 696 + local_irq_enable_in_hardirq(); 697 697 if ((stat & DRQ_STAT) && args && args[3]) { 698 698 u8 io_32bit = drive->io_32bit; 699 699 drive->io_32bit = 0; ··· 1286 1286 if (masked_irq != IDE_NO_IRQ && hwif->irq != masked_irq) 1287 1287 disable_irq_nosync(hwif->irq); 1288 1288 spin_unlock(&ide_lock); 1289 - local_irq_enable(); 1289 + local_irq_enable_in_hardirq(); 1290 1290 /* allow other IRQs while we start this request */ 1291 1291 startstop = start_request(drive, rq); 1292 1292 spin_lock_irq(&ide_lock); ··· 1631 1631 spin_unlock(&ide_lock); 1632 1632 1633 1633 if (drive->unmask) 1634 - local_irq_enable(); 1634 + local_irq_enable_in_hardirq(); 1635 1635 /* service this interrupt, may set handler for next interrupt */ 1636 1636 startstop = handler(drive); 1637 1637 spin_lock_irq(&ide_lock);
+1 -1
drivers/ide/ide-taskfile.c
··· 222 222 ide_hwif_t *hwif = HWIF(drive); 223 223 u8 stat; 224 224 225 - local_irq_enable(); 225 + local_irq_enable_in_hardirq(); 226 226 if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG),READY_STAT,BAD_STAT)) { 227 227 return ide_error(drive, "task_no_data_intr", stat); 228 228 /* calls ide_end_drive_cmd */
+1 -1
include/linux/ide.h
··· 1359 1359 * ide_drive_t->hwif: constant, no locking 1360 1360 */ 1361 1361 1362 - #define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable(); } while (0) 1362 + #define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable_in_hardirq(); } while (0) 1363 1363 1364 1364 extern struct bus_type ide_bus_type; 1365 1365
+1 -1
kernel/irq/handle.c
··· 132 132 handle_dynamic_tick(action); 133 133 134 134 if (!(action->flags & IRQF_DISABLED)) 135 - local_irq_enable(); 135 + local_irq_enable_in_hardirq(); 136 136 137 137 do { 138 138 ret = action->handler(irq, action->dev_id, regs);