Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq cleanups from Ingo Molnar: "This is a multi-arch cleanup series from Thomas Gleixner, which we kept to near the end of the merge window, to not interfere with architecture updates. This series (motivated by the -rt kernel) unifies more aspects of IRQ handling and generalizes PREEMPT_ACTIVE" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: preempt: Make PREEMPT_ACTIVE generic sparc: Use preempt_schedule_irq ia64: Use preempt_schedule_irq m32r: Use preempt_schedule_irq hardirq: Make hardirq bits generic m68k: Simplify low level interrupt handling code genirq: Prevent spurious detection for unconditionally polled interrupts
This commit is contained in:
@@ -5,17 +5,6 @@
|
||||
#include <linux/cache.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
#define HARDIRQ_BITS 8
|
||||
|
||||
/*
|
||||
* The hardirq mask has to be large enough to have
|
||||
* space for potentially all IRQ sources in the system
|
||||
* nesting on a single CPU:
|
||||
*/
|
||||
#if (1 << HARDIRQ_BITS) < NR_IRQS
|
||||
# error HARDIRQ_BITS is too low!
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
static inline void ack_bad_irq(unsigned int irq)
|
||||
|
@@ -35,8 +35,6 @@ struct thread_info {
|
||||
};
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#define PREEMPT_ACTIVE 0x4000000
|
||||
|
||||
#define INIT_THREAD_INFO(tsk) \
|
||||
{ \
|
||||
.task = &tsk, \
|
||||
|
@@ -45,7 +45,7 @@
|
||||
.globl system_call, buserr, trap, resume
|
||||
.globl sys_call_table
|
||||
.globl __sys_fork, __sys_clone, __sys_vfork
|
||||
.globl ret_from_interrupt, bad_interrupt
|
||||
.globl bad_interrupt
|
||||
.globl auto_irqhandler_fixup
|
||||
.globl user_irqvec_fixup
|
||||
|
||||
@@ -275,8 +275,6 @@ do_delayed_trace:
|
||||
ENTRY(auto_inthandler)
|
||||
SAVE_ALL_INT
|
||||
GET_CURRENT(%d0)
|
||||
movel %d0,%a1
|
||||
addqb #1,%a1@(TINFO_PREEMPT+1)
|
||||
| put exception # in d0
|
||||
bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0
|
||||
subw #VEC_SPUR,%d0
|
||||
@@ -286,32 +284,13 @@ ENTRY(auto_inthandler)
|
||||
auto_irqhandler_fixup = . + 2
|
||||
jsr do_IRQ | process the IRQ
|
||||
addql #8,%sp | pop parameters off stack
|
||||
|
||||
ret_from_interrupt:
|
||||
movel %curptr@(TASK_STACK),%a1
|
||||
subqb #1,%a1@(TINFO_PREEMPT+1)
|
||||
jeq ret_from_last_interrupt
|
||||
2: RESTORE_ALL
|
||||
|
||||
ALIGN
|
||||
ret_from_last_interrupt:
|
||||
moveq #(~ALLOWINT>>8)&0xff,%d0
|
||||
andb %sp@(PT_OFF_SR),%d0
|
||||
jne 2b
|
||||
|
||||
/* check if we need to do software interrupts */
|
||||
tstl irq_stat+CPUSTAT_SOFTIRQ_PENDING
|
||||
jeq .Lret_from_exception
|
||||
pea ret_from_exception
|
||||
jra do_softirq
|
||||
jra ret_from_exception
|
||||
|
||||
/* Handler for user defined interrupt vectors */
|
||||
|
||||
ENTRY(user_inthandler)
|
||||
SAVE_ALL_INT
|
||||
GET_CURRENT(%d0)
|
||||
movel %d0,%a1
|
||||
addqb #1,%a1@(TINFO_PREEMPT+1)
|
||||
| put exception # in d0
|
||||
bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0
|
||||
user_irqvec_fixup = . + 2
|
||||
@@ -321,29 +300,18 @@ user_irqvec_fixup = . + 2
|
||||
movel %d0,%sp@- | put vector # on stack
|
||||
jsr do_IRQ | process the IRQ
|
||||
addql #8,%sp | pop parameters off stack
|
||||
|
||||
movel %curptr@(TASK_STACK),%a1
|
||||
subqb #1,%a1@(TINFO_PREEMPT+1)
|
||||
jeq ret_from_last_interrupt
|
||||
RESTORE_ALL
|
||||
jra ret_from_exception
|
||||
|
||||
/* Handler for uninitialized and spurious interrupts */
|
||||
|
||||
ENTRY(bad_inthandler)
|
||||
SAVE_ALL_INT
|
||||
GET_CURRENT(%d0)
|
||||
movel %d0,%a1
|
||||
addqb #1,%a1@(TINFO_PREEMPT+1)
|
||||
|
||||
movel %sp,%sp@-
|
||||
jsr handle_badint
|
||||
addql #4,%sp
|
||||
|
||||
movel %curptr@(TASK_STACK),%a1
|
||||
subqb #1,%a1@(TINFO_PREEMPT+1)
|
||||
jeq ret_from_last_interrupt
|
||||
RESTORE_ALL
|
||||
|
||||
jra ret_from_exception
|
||||
|
||||
resume:
|
||||
/*
|
||||
|
@@ -58,12 +58,6 @@ void __init init_IRQ(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* assembly irq entry code relies on this... */
|
||||
if (HARDIRQ_MASK != 0x00ff0000) {
|
||||
extern void hardirq_mask_is_broken(void);
|
||||
hardirq_mask_is_broken();
|
||||
}
|
||||
|
||||
for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
|
||||
irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);
|
||||
|
||||
|
@@ -27,7 +27,6 @@
|
||||
.globl ret_from_exception
|
||||
.globl ret_from_signal
|
||||
.globl sys_call_table
|
||||
.globl ret_from_interrupt
|
||||
.globl bad_interrupt
|
||||
.globl inthandler1
|
||||
.globl inthandler2
|
||||
@@ -137,7 +136,7 @@ inthandler1:
|
||||
movel #65,%sp@- /* put vector # on stack*/
|
||||
jbsr process_int /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
bra ret_from_exception
|
||||
|
||||
inthandler2:
|
||||
SAVE_ALL_INT
|
||||
@@ -148,7 +147,7 @@ inthandler2:
|
||||
movel #66,%sp@- /* put vector # on stack*/
|
||||
jbsr process_int /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
bra ret_from_exception
|
||||
|
||||
inthandler3:
|
||||
SAVE_ALL_INT
|
||||
@@ -159,7 +158,7 @@ inthandler3:
|
||||
movel #67,%sp@- /* put vector # on stack*/
|
||||
jbsr process_int /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
bra ret_from_exception
|
||||
|
||||
inthandler4:
|
||||
SAVE_ALL_INT
|
||||
@@ -170,7 +169,7 @@ inthandler4:
|
||||
movel #68,%sp@- /* put vector # on stack*/
|
||||
jbsr process_int /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
bra ret_from_exception
|
||||
|
||||
inthandler5:
|
||||
SAVE_ALL_INT
|
||||
@@ -181,7 +180,7 @@ inthandler5:
|
||||
movel #69,%sp@- /* put vector # on stack*/
|
||||
jbsr process_int /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
bra ret_from_exception
|
||||
|
||||
inthandler6:
|
||||
SAVE_ALL_INT
|
||||
@@ -192,7 +191,7 @@ inthandler6:
|
||||
movel #70,%sp@- /* put vector # on stack*/
|
||||
jbsr process_int /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
bra ret_from_exception
|
||||
|
||||
inthandler7:
|
||||
SAVE_ALL_INT
|
||||
@@ -203,7 +202,7 @@ inthandler7:
|
||||
movel #71,%sp@- /* put vector # on stack*/
|
||||
jbsr process_int /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
bra ret_from_exception
|
||||
|
||||
inthandler:
|
||||
SAVE_ALL_INT
|
||||
@@ -214,23 +213,7 @@ inthandler:
|
||||
movel %d0,%sp@- /* put vector # on stack*/
|
||||
jbsr process_int /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
|
||||
ret_from_interrupt:
|
||||
jeq 1f
|
||||
2:
|
||||
RESTORE_ALL
|
||||
1:
|
||||
moveb %sp@(PT_OFF_SR), %d0
|
||||
and #7, %d0
|
||||
jhi 2b
|
||||
|
||||
/* check if we need to do software interrupts */
|
||||
jeq ret_from_exception
|
||||
|
||||
pea ret_from_exception
|
||||
jra do_softirq
|
||||
|
||||
bra ret_from_exception
|
||||
|
||||
/*
|
||||
* Handler for uninitialized and spurious interrupts.
|
||||
|
@@ -29,7 +29,6 @@
|
||||
.globl ret_from_exception
|
||||
.globl ret_from_signal
|
||||
.globl sys_call_table
|
||||
.globl ret_from_interrupt
|
||||
.globl bad_interrupt
|
||||
.globl inthandler
|
||||
|
||||
@@ -132,26 +131,9 @@ inthandler:
|
||||
|
||||
movel %sp,%sp@-
|
||||
movel %d0,%sp@- /* put vector # on stack*/
|
||||
jbsr do_IRQ /* process the IRQ*/
|
||||
3: addql #8,%sp /* pop parameters off stack*/
|
||||
bra ret_from_interrupt
|
||||
|
||||
ret_from_interrupt:
|
||||
jeq 1f
|
||||
2:
|
||||
RESTORE_ALL
|
||||
1:
|
||||
moveb %sp@(PT_OFF_SR), %d0
|
||||
and #7, %d0
|
||||
jhi 2b
|
||||
/* check if we need to do software interrupts */
|
||||
|
||||
movel irq_stat+CPUSTAT_SOFTIRQ_PENDING,%d0
|
||||
jeq ret_from_exception
|
||||
|
||||
pea ret_from_exception
|
||||
jra do_softirq
|
||||
|
||||
jbsr do_IRQ /* process the IRQ */
|
||||
addql #8,%sp /* pop parameters off stack*/
|
||||
jra ret_from_exception
|
||||
|
||||
/*
|
||||
* Handler for uninitialized and spurious interrupts.
|
||||
|
Reference in New Issue
Block a user