Commit 6b41fb92 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] generic irq subsystem: ppc64 port

ppc64 port of generic hardirq handling.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 52e7fccd
......@@ -207,6 +207,13 @@ config PREEMPT
Say Y here if you are building a kernel for a desktop, embedded
or real-time system. Say N if you are unsure.
#
# Use the generic interrupt handling code in kernel/hardirq.c:
#
config GENERIC_HARDIRQS
bool
default y
config MSCHUNKS
bool
depends on PPC_ISERIES
......
This diff is collapsed.
......@@ -115,12 +115,12 @@ _GLOBAL(call_do_softirq)
mtlr r0
blr
_GLOBAL(call_handle_irq_event)
_GLOBAL(call_handle_IRQ_event)
mflr r0
std r0,16(r1)
stdu r1,THREAD_SIZE-112(r6)
mr r1,r6
bl .handle_irq_event
bl .handle_IRQ_event
ld r1,0(r1)
ld r0,16(r1)
mtlr r0
......
......@@ -19,45 +19,10 @@ typedef struct {
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
/*
* We put the hardirq and softirq counter into the preemption
* counter. The bitmask has the following meaning:
*
* - bits 0-7 are the preemption count (max preemption depth: 256)
* - bits 8-15 are the softirq count (max # of softirqs: 256)
* - bits 16-24 are the hardirq count (max # of hardirqs: 512)
*
* - ( bit 26 is the PREEMPT_ACTIVE flag. )
*
* PREEMPT_MASK: 0x000000ff
* SOFTIRQ_MASK: 0x0000ff00
* HARDIRQ_MASK: 0x01ff0000
*/
#define PREEMPT_BITS 8
#define SOFTIRQ_BITS 8
#define HARDIRQ_BITS 9
#define PREEMPT_SHIFT 0
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
/*
* 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
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#define irq_exit() \
do { \
preempt_count() -= IRQ_EXIT_OFFSET; \
if (!in_interrupt() && softirq_pending(smp_processor_id())) \
do_softirq(); \
preempt_enable_no_resched(); \
} while (0)
static inline void ack_bad_irq(int irq)
{
printk(KERN_CRIT "illegal vector %d received!\n", irq);
BUG();
}
#endif /* __ASM_HARDIRQ_H */
......@@ -17,10 +17,6 @@
*/
#define NR_IRQS 512
extern void disable_irq(unsigned int);
extern void disable_irq_nosync(unsigned int);
extern void enable_irq(unsigned int);
/* this number is used when no interrupt has been assigned */
#define NO_IRQ (-1)
......@@ -80,7 +76,6 @@ static __inline__ int irq_canonicalize(int irq)
struct irqaction;
struct pt_regs;
int handle_irq_event(int, struct pt_regs *, struct irqaction *);
#ifdef CONFIG_IRQSTACKS
/*
......@@ -91,7 +86,7 @@ extern struct thread_info *softirq_ctx[NR_CPUS];
extern void irq_ctx_init(void);
extern void call_do_softirq(struct thread_info *tp);
extern int call_handle_irq_event(int irq, struct pt_regs *regs,
extern int call_handle_IRQ_event(int irq, struct pt_regs *regs,
struct irqaction *action, struct thread_info *tp);
#define __ARCH_HAS_DO_SOFTIRQ
......
......@@ -52,8 +52,6 @@ extern cpumask_t cpu_sibling_map[NR_CPUS];
#endif
#define PPC_MSG_DEBUGGER_BREAK 3
extern cpumask_t irq_affinity[];
void smp_init_iSeries(void);
void smp_init_pSeries(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment