diff options
| author | Jens Axboe <jens.axboe@oracle.com> | 2010-04-29 09:36:24 +0200 |
|---|---|---|
| committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-29 09:36:24 +0200 |
| commit | 7407cf355fdf5500430be966dbbde84a27293bad (patch) | |
| tree | 922861288ff38558ed721a79653f52b17b13bb95 /arch/sparc/include/asm/irqflags_64.h | |
| parent | 6a47dc1418682c83d603b491df1d048f73aa973e (diff) | |
| parent | 79dba2eaa771c3173957eccfd288e0e0d12e4d3f (diff) | |
Merge branch 'master' into for-2.6.35
Conflicts:
fs/block_dev.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'arch/sparc/include/asm/irqflags_64.h')
| -rw-r--r-- | arch/sparc/include/asm/irqflags_64.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/irqflags_64.h b/arch/sparc/include/asm/irqflags_64.h index 8b49bf920df3..bfa1ea45b4cd 100644 --- a/arch/sparc/include/asm/irqflags_64.h +++ b/arch/sparc/include/asm/irqflags_64.h @@ -76,9 +76,26 @@ static inline int raw_irqs_disabled(void) */ static inline unsigned long __raw_local_irq_save(void) { - unsigned long flags = __raw_local_save_flags(); - - raw_local_irq_disable(); + unsigned long flags, tmp; + + /* Disable interrupts to PIL_NORMAL_MAX unless we already + * are using PIL_NMI, in which case PIL_NMI is retained. + * + * The only values we ever program into the %pil are 0, + * PIL_NORMAL_MAX and PIL_NMI. + * + * Since PIL_NMI is the largest %pil value and all bits are + * set in it (0xf), it doesn't matter what PIL_NORMAL_MAX + * actually is. + */ + __asm__ __volatile__( + "rdpr %%pil, %0\n\t" + "or %0, %2, %1\n\t" + "wrpr %1, 0x0, %%pil" + : "=r" (flags), "=r" (tmp) + : "i" (PIL_NORMAL_MAX) + : "memory" + ); return flags; } |
