Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2502b667 authored by Greg Ungerer's avatar Greg Ungerer Committed by Linus Torvalds
Browse files

m68knommu: generic irq handling



Change the m68knommu irq handling to use the generic irq framework.

Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f8af0bb8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -45,6 +45,10 @@ config GENERIC_HWEIGHT
	bool
	default y

config GENERIC_HARDIRQS
	bool
	default y

config GENERIC_CALIBRATE_DELAY
	bool
	default y
+2 −2
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@

extra-y := vmlinux.lds

obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
	 setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
obj-y += dma.o entry.o init_task.o irq.o m68k_ksyms.o process.o ptrace.o \
	 semaphore.o setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o

obj-$(CONFIG_MODULES)	+= module.o
obj-$(CONFIG_COMEMPCI)	+= comempci.o
+0 −5
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
#include <linux/hardirq.h>
#include <asm/bootinfo.h>
#include <asm/irq.h>
#include <asm/irqnode.h>
#include <asm/thread_info.h>

#define DEFINE(sym, val) \
@@ -72,10 +71,6 @@ int main(void)
#else
	/* bitfields are a bit difficult */
	DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4);
	/* offsets into the irq_handler struct */
	DEFINE(IRQ_HANDLER, offsetof(struct irq_node, handler));
	DEFINE(IRQ_DEVID, offsetof(struct irq_node, dev_id));
	DEFINE(IRQ_NEXT, offsetof(struct irq_node, next));
#endif

	/* offsets into the kernel_stat struct */
+82 −0
Original line number Diff line number Diff line
/*
 * irq.c
 *
 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file COPYING in the main directory of this archive
 * for more details.
 */

#include <linux/types.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kernel_stat.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/seq_file.h>
#include <asm/system.h>
#include <asm/traps.h>

asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
{
	struct pt_regs *oldregs = set_irq_regs(regs);

	irq_enter();
	__do_IRQ(irq);
	irq_exit();

	set_irq_regs(oldregs);
}

void ack_bad_irq(unsigned int irq)
{
	printk(KERN_ERR "IRQ: unexpected irq=%d\n", irq);
}

static struct irq_chip m_irq_chip = {
	.name		= "M68K-INTC",
	.enable		= enable_vector,
	.disable	= disable_vector,
	.ack		= ack_vector,
};

void __init init_IRQ(void)
{
	int irq;

	init_vectors();

	for (irq = 0; (irq < NR_IRQS); irq++) {
		irq_desc[irq].status = IRQ_DISABLED;
		irq_desc[irq].action = NULL;
		irq_desc[irq].depth = 1;
		irq_desc[irq].chip = &m_irq_chip;
	}
}

int show_interrupts(struct seq_file *p, void *v)
{
	struct irqaction *ap;
	int irq = *((loff_t *) v);

	if (irq == 0)
		seq_puts(p, "           CPU0\n");

	if (irq < NR_IRQS) {
		ap = irq_desc[irq].action;
		if (ap) {
			seq_printf(p, "%3d: ", irq);
			seq_printf(p, "%10u ", kstat_irqs(irq));
			seq_printf(p, "%14s  ", irq_desc[irq].chip->name);

			seq_printf(p, "%s", ap->name);
			for (ap = ap->next; ap; ap = ap->next)
				seq_printf(p, ", %s", ap->name);
			seq_putc(p, '\n');
		}
	}

	return 0;
}
+0 −2
Original line number Diff line number Diff line
@@ -62,8 +62,6 @@ static char const * const vec_names[] = {

void __init trap_init(void)
{
	if (mach_trap_init)
		mach_trap_init();
}

void die_if_kernel(char *str, struct pt_regs *fp, int nr)
Loading