03c0c29aff
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (63 commits) of/platform: Register of_platform_drivers with an "of:" prefix of/address: Clean up function declarations of/spi: call of_register_spi_devices() from spi core code of: Provide default of_node_to_nid() implementation. of/device: Make of_device_make_bus_id() usable by other code. of/irq: Fix endian issues in parsing interrupt specifiers of: Fix phandle endian issues of/flattree: fix of_flat_dt_is_compatible() to match the full compatible string of: remove of_default_bus_ids of: make of_find_device_by_node generic microblaze: remove references to of_device and to_of_device sparc: remove references to of_device and to_of_device powerpc: remove references to of_device and to_of_device of/device: Replace of_device with platform_device in includes and core code of/device: Protect against binding of_platform_drivers to non-OF devices of: remove asm/of_device.h of: remove asm/of_platform.h of/platform: remove all of_bus_type and of_platform_bus_type references of: Merge of_platform_bus_type with platform_bus_type drivercore/of: Add OF style matching to platform bus ... Fix up trivial conflicts in arch/microblaze/kernel/Makefile due to just some obj-y removals by the devicetree branch, while the microblaze updates added a new file.
104 lines
2.4 KiB
C
104 lines
2.4 KiB
C
/*
|
|
* Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
|
|
* Copyright (C) 2007-2009 PetaLogix
|
|
* Copyright (C) 2006 Atmark Techno, Inc.
|
|
*
|
|
* 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/init.h>
|
|
#include <linux/ftrace.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/hardirq.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/irqflags.h>
|
|
#include <linux/seq_file.h>
|
|
#include <linux/kernel_stat.h>
|
|
#include <linux/irq.h>
|
|
#include <linux/of_irq.h>
|
|
|
|
#include <asm/prom.h>
|
|
|
|
static u32 concurrent_irq;
|
|
|
|
void __irq_entry do_IRQ(struct pt_regs *regs)
|
|
{
|
|
unsigned int irq;
|
|
struct pt_regs *old_regs = set_irq_regs(regs);
|
|
trace_hardirqs_off();
|
|
|
|
irq_enter();
|
|
irq = get_irq(regs);
|
|
next_irq:
|
|
BUG_ON(irq == -1U);
|
|
generic_handle_irq(irq);
|
|
|
|
irq = get_irq(regs);
|
|
if (irq != -1U) {
|
|
pr_debug("next irq: %d\n", irq);
|
|
++concurrent_irq;
|
|
goto next_irq;
|
|
}
|
|
|
|
irq_exit();
|
|
set_irq_regs(old_regs);
|
|
trace_hardirqs_on();
|
|
}
|
|
|
|
int show_interrupts(struct seq_file *p, void *v)
|
|
{
|
|
int i = *(loff_t *) v, j;
|
|
struct irqaction *action;
|
|
unsigned long flags;
|
|
|
|
if (i == 0) {
|
|
seq_printf(p, " ");
|
|
for_each_online_cpu(j)
|
|
seq_printf(p, "CPU%-8d", j);
|
|
seq_putc(p, '\n');
|
|
}
|
|
|
|
if (i < nr_irq) {
|
|
raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
|
|
action = irq_desc[i].action;
|
|
if (!action)
|
|
goto skip;
|
|
seq_printf(p, "%3d: ", i);
|
|
#ifndef CONFIG_SMP
|
|
seq_printf(p, "%10u ", kstat_irqs(i));
|
|
#else
|
|
for_each_online_cpu(j)
|
|
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
|
|
#endif
|
|
seq_printf(p, " %8s", irq_desc[i].status &
|
|
IRQ_LEVEL ? "level" : "edge");
|
|
seq_printf(p, " %8s", irq_desc[i].chip->name);
|
|
seq_printf(p, " %s", action->name);
|
|
|
|
for (action = action->next; action; action = action->next)
|
|
seq_printf(p, ", %s", action->name);
|
|
|
|
seq_putc(p, '\n');
|
|
skip:
|
|
raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/* MS: There is no any advance mapping mechanism. We are using simple 32bit
|
|
intc without any cascades or any connection that's why mapping is 1:1 */
|
|
unsigned int irq_create_mapping(struct irq_host *host, irq_hw_number_t hwirq)
|
|
{
|
|
return hwirq;
|
|
}
|
|
EXPORT_SYMBOL_GPL(irq_create_mapping);
|
|
|
|
unsigned int irq_create_of_mapping(struct device_node *controller,
|
|
const u32 *intspec, unsigned int intsize)
|
|
{
|
|
return intspec[0];
|
|
}
|
|
EXPORT_SYMBOL_GPL(irq_create_of_mapping);
|