Skip to content

Commit

Permalink
alpha: kill off alpha_do_IRQ
Browse files Browse the repository at this point in the history
Good riddance... Nuke a pile of redundant handlers that the
generic code takes care of as well.

Tested-by: Michael Cree <[email protected]>
Signed-off-by: Kyle McMartin <[email protected]>
Signed-off-by: Matt Turner <[email protected]>
  • Loading branch information
jkkm authored and Matt Turner committed Jan 17, 2011
1 parent a891b39 commit 7d209c8
Show file tree
Hide file tree
Showing 21 changed files with 94 additions and 460 deletions.
3 changes: 0 additions & 3 deletions arch/alpha/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,4 @@ static __inline__ int irq_canonicalize(int irq)
struct pt_regs;
extern void (*perf_irq)(unsigned long, struct pt_regs *);

struct irq_desc;
extern void alpha_do_IRQ(unsigned int irq, struct irq_desc *desc);

#endif /* _ALPHA_IRQ_H */
6 changes: 1 addition & 5 deletions arch/alpha/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ handle_irq(int irq)

irq_enter();
/*
* __do_IRQ() must be called with IPL_MAX. Note that we do not
* handle_irq() must be called with IPL_MAX. Note that we do not
* explicitly enable interrupts afterwards - some MILO PALcode
* (namely LX164 one) seems to have severe problems with RTI
* at IPL 0.
Expand All @@ -172,7 +172,3 @@ handle_irq(int irq)
irq_exit();
}

void alpha_do_IRQ(unsigned int irq, struct irq_desc *desc)
{
__do_IRQ(irq);
}
16 changes: 2 additions & 14 deletions arch/alpha/kernel/irq_alpha.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,33 +219,21 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
* processed by PALcode, and comes in via entInt vector 1.
*/

static void rtc_enable_disable(unsigned int irq) { }
static unsigned int rtc_startup(unsigned int irq) { return 0; }

struct irqaction timer_irqaction = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED,
.name = "timer",
};

static struct irq_chip rtc_irq_type = {
.name = "RTC",
.startup = rtc_startup,
.shutdown = rtc_enable_disable,
.enable = rtc_enable_disable,
.disable = rtc_enable_disable,
.ack = rtc_enable_disable,
.end = rtc_enable_disable,
};

void __init
init_rtc_irq(void)
{
struct irq_desc *desc = irq_to_desc(RTC_IRQ);

if (desc) {
desc->status |= IRQ_DISABLED;
set_irq_chip(RTC_IRQ, &rtc_irq_type);
set_irq_chip_and_handler_name(RTC_IRQ, &no_irq_chip,
handle_simple_irq, "RTC");
setup_irq(RTC_IRQ, &timer_irqaction);
}
}
Expand Down
26 changes: 4 additions & 22 deletions arch/alpha/kernel/irq_i8259.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,11 @@ i8259a_mask_and_ack_irq(unsigned int irq)
spin_unlock(&i8259_irq_lock);
}

unsigned int
i8259a_startup_irq(unsigned int irq)
{
i8259a_enable_irq(irq);
return 0; /* never anything pending */
}

void
i8259a_end_irq(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);
if (desc || !(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
i8259a_enable_irq(irq);
}

struct irq_chip i8259a_irq_type = {
.name = "XT-PIC",
.startup = i8259a_startup_irq,
.shutdown = i8259a_disable_irq,
.enable = i8259a_enable_irq,
.disable = i8259a_disable_irq,
.ack = i8259a_mask_and_ack_irq,
.end = i8259a_end_irq,
.unmask = i8259a_enable_irq,
.mask = i8259a_disable_irq,
.mask_ack = i8259a_mask_and_ack_irq,
};

void __init
Expand All @@ -108,7 +90,7 @@ init_i8259a_irqs(void)
outb(0xff, 0xA1); /* mask all of 8259A-2 */

for (i = 0; i < 16; i++) {
set_irq_chip_and_handler(i, &i8259a_irq_type, alpha_do_IRQ);
set_irq_chip_and_handler(i, &i8259a_irq_type, handle_level_irq);
}

setup_irq(2, &cascade);
Expand Down
26 changes: 4 additions & 22 deletions arch/alpha/kernel/irq_pyxis.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,6 @@ pyxis_disable_irq(unsigned int irq)
pyxis_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16)));
}

static unsigned int
pyxis_startup_irq(unsigned int irq)
{
pyxis_enable_irq(irq);
return 0;
}

static void
pyxis_end_irq(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);
if (desc || !(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
pyxis_enable_irq(irq);
}

static void
pyxis_mask_and_ack_irq(unsigned int irq)
{
Expand All @@ -73,12 +58,9 @@ pyxis_mask_and_ack_irq(unsigned int irq)

static struct irq_chip pyxis_irq_type = {
.name = "PYXIS",
.startup = pyxis_startup_irq,
.shutdown = pyxis_disable_irq,
.enable = pyxis_enable_irq,
.disable = pyxis_disable_irq,
.ack = pyxis_mask_and_ack_irq,
.end = pyxis_end_irq,
.mask_ack = pyxis_mask_and_ack_irq,
.mask = pyxis_disable_irq,
.unmask = pyxis_enable_irq,
};

void
Expand Down Expand Up @@ -120,7 +102,7 @@ init_pyxis_irqs(unsigned long ignore_mask)
for (i = 16; i < 48; ++i) {
if ((ignore_mask >> i) & 1)
continue;
set_irq_chip_and_handler(i, &pyxis_irq_type, alpha_do_IRQ);
set_irq_chip_and_handler(i, &pyxis_irq_type, handle_level_irq);
irq_to_desc(i)->status |= IRQ_LEVEL;
}

Expand Down
25 changes: 4 additions & 21 deletions arch/alpha/kernel/irq_srm.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,12 @@ srm_disable_irq(unsigned int irq)
spin_unlock(&srm_irq_lock);
}

static unsigned int
srm_startup_irq(unsigned int irq)
{
srm_enable_irq(irq);
return 0;
}

static void
srm_end_irq(unsigned int irq)
{
if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
srm_enable_irq(irq);
}

/* Handle interrupts from the SRM, assuming no additional weirdness. */
static struct irq_chip srm_irq_type = {
.name = "SRM",
.startup = srm_startup_irq,
.shutdown = srm_disable_irq,
.enable = srm_enable_irq,
.disable = srm_disable_irq,
.ack = srm_disable_irq,
.end = srm_end_irq,
.unmask = srm_enable_irq,
.mask = srm_disable_irq,
.mask_ack = srm_disable_irq,
};

void __init
Expand All @@ -68,7 +51,7 @@ init_srm_irqs(long max, unsigned long ignore_mask)
for (i = 16; i < max; ++i) {
if (i < 64 && ((ignore_mask >> i) & 1))
continue;
set_irq_chip_and_handler(i, &srm_irq_type, alpha_do_IRQ);
set_irq_chip_and_handler(i, &srm_irq_type, handle_level_irq);
irq_to_desc(i)->status |= IRQ_LEVEL;
}
}
Expand Down
25 changes: 4 additions & 21 deletions arch/alpha/kernel/sys_alcor.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@ alcor_mask_and_ack_irq(unsigned int irq)
*(vuip)GRU_INT_CLEAR = 0; mb();
}

static unsigned int
alcor_startup_irq(unsigned int irq)
{
alcor_enable_irq(irq);
return 0;
}

static void
alcor_isa_mask_and_ack_irq(unsigned int irq)
{
Expand All @@ -82,21 +75,11 @@ alcor_isa_mask_and_ack_irq(unsigned int irq)
*(vuip)GRU_INT_CLEAR = 0; mb();
}

static void
alcor_end_irq(unsigned int irq)
{
if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
alcor_enable_irq(irq);
}

static struct irq_chip alcor_irq_type = {
.name = "ALCOR",
.startup = alcor_startup_irq,
.shutdown = alcor_disable_irq,
.enable = alcor_enable_irq,
.disable = alcor_disable_irq,
.ack = alcor_mask_and_ack_irq,
.end = alcor_end_irq,
.unmask = alcor_enable_irq,
.mask = alcor_disable_irq,
.mask_ack = alcor_mask_and_ack_irq,
};

static void
Expand Down Expand Up @@ -142,7 +125,7 @@ alcor_init_irq(void)
on while IRQ probing. */
if (i >= 16+20 && i <= 16+30)
continue;
set_irq_chip_and_handler(i, &alcor_irq_type, alpha_do_IRQ);
set_irq_chip_and_handler(i, &alcor_irq_type, handle_level_irq);
irq_to_desc(i)->status |= IRQ_LEVEL;
}
i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq;
Expand Down
25 changes: 4 additions & 21 deletions arch/alpha/kernel/sys_cabriolet.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,11 @@ cabriolet_disable_irq(unsigned int irq)
cabriolet_update_irq_hw(irq, cached_irq_mask |= 1UL << irq);
}

static unsigned int
cabriolet_startup_irq(unsigned int irq)
{
cabriolet_enable_irq(irq);
return 0; /* never anything pending */
}

static void
cabriolet_end_irq(unsigned int irq)
{
if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
cabriolet_enable_irq(irq);
}

static struct irq_chip cabriolet_irq_type = {
.name = "CABRIOLET",
.startup = cabriolet_startup_irq,
.shutdown = cabriolet_disable_irq,
.enable = cabriolet_enable_irq,
.disable = cabriolet_disable_irq,
.ack = cabriolet_disable_irq,
.end = cabriolet_end_irq,
.unmask = cabriolet_enable_irq,
.mask = cabriolet_disable_irq,
.mask_ack = cabriolet_disable_irq,
};

static void
Expand Down Expand Up @@ -123,7 +106,7 @@ common_init_irq(void (*srm_dev_int)(unsigned long v))

for (i = 16; i < 35; ++i) {
set_irq_chip_and_handler(i, &cabriolet_irq_type,
alpha_do_IRQ);
handle_level_irq);
irq_to_desc(i)->status |= IRQ_LEVEL;
}
}
Expand Down
48 changes: 7 additions & 41 deletions arch/alpha/kernel/sys_dp264.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,6 @@ dp264_disable_irq(unsigned int irq)
spin_unlock(&dp264_irq_lock);
}

static unsigned int
dp264_startup_irq(unsigned int irq)
{
dp264_enable_irq(irq);
return 0; /* never anything pending */
}

static void
dp264_end_irq(unsigned int irq)
{
if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
dp264_enable_irq(irq);
}

static void
clipper_enable_irq(unsigned int irq)
{
Expand All @@ -147,20 +133,6 @@ clipper_disable_irq(unsigned int irq)
spin_unlock(&dp264_irq_lock);
}

static unsigned int
clipper_startup_irq(unsigned int irq)
{
clipper_enable_irq(irq);
return 0; /* never anything pending */
}

static void
clipper_end_irq(unsigned int irq)
{
if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
clipper_enable_irq(irq);
}

static void
cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
{
Expand Down Expand Up @@ -200,23 +172,17 @@ clipper_set_affinity(unsigned int irq, const struct cpumask *affinity)

static struct irq_chip dp264_irq_type = {
.name = "DP264",
.startup = dp264_startup_irq,
.shutdown = dp264_disable_irq,
.enable = dp264_enable_irq,
.disable = dp264_disable_irq,
.ack = dp264_disable_irq,
.end = dp264_end_irq,
.unmask = dp264_enable_irq,
.mask = dp264_disable_irq,
.mask_ack = dp264_disable_irq,
.set_affinity = dp264_set_affinity,
};

static struct irq_chip clipper_irq_type = {
.name = "CLIPPER",
.startup = clipper_startup_irq,
.shutdown = clipper_disable_irq,
.enable = clipper_enable_irq,
.disable = clipper_disable_irq,
.ack = clipper_disable_irq,
.end = clipper_end_irq,
.unmask = clipper_enable_irq,
.mask = clipper_disable_irq,
.mask_ack = clipper_disable_irq,
.set_affinity = clipper_set_affinity,
};

Expand Down Expand Up @@ -303,7 +269,7 @@ init_tsunami_irqs(struct irq_chip * ops, int imin, int imax)
long i;
for (i = imin; i <= imax; ++i) {
irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, ops, alpha_do_IRQ);
set_irq_chip_and_handler(i, ops, handle_level_irq);
}
}

Expand Down
Loading

0 comments on commit 7d209c8

Please sign in to comment.