.end = iSeries_end_IRQ
};
-void iSeries_init_irq_desc(irq_desc_t *desc)
-{
- desc->handler = &iSeries_IRQ_handler;
-}
+/* This maps virtual irq numbers to real irqs */
+unsigned int virt_irq_to_real_map[NR_IRQS];
+
+/* The next available virtual irq number */
+/* Note: the pcnet32 driver assumes irq numbers < 2 aren't valid. :( */
+static int next_virtual_irq = 2;
/* This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c */
void __init iSeries_init_IRQ(void)
{
/* Register PCI event handler and open an event path */
- PPCDBG(PPCDBG_BUSWALK,
- "Register PCI event handler and open an event path\n");
XmPciLpEvent_init();
- return;
}
/*
int __init iSeries_allocate_IRQ(HvBusNumber busNumber,
HvSubBusNumber subBusNumber, HvAgentId deviceId)
{
+ unsigned int realirq, virtirq;
u8 idsel = (deviceId >> 4);
u8 function = deviceId & 7;
- return ((busNumber - 1) << 6) + ((idsel - 1) << 3) + function + 1;
+ virtirq = next_virtual_irq++;
+ realirq = ((busNumber - 1) << 6) + ((idsel - 1) << 3) + function;
+ virt_irq_to_real_map[virtirq] = realirq;
+
+ irq_desc[virtirq].handler = &iSeries_IRQ_handler;
+ return virtirq;
}
-#define IRQ_TO_BUS(irq) (((((irq) - 1) >> 6) & 0xff) + 1)
-#define IRQ_TO_IDSEL(irq) (((((irq) - 1) >> 3) & 7) + 1)
-#define IRQ_TO_FUNC(irq) (((irq) - 1) & 7)
+#define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1)
+#define REAL_IRQ_TO_IDSEL(irq) ((((irq) >> 3) & 7) + 1)
+#define REAL_IRQ_TO_FUNC(irq) ((irq) & 7)
/* This is called by iSeries_activate_IRQs */
static unsigned int iSeries_startup_IRQ(unsigned int irq)
{
u32 bus, deviceId, function, mask;
const u32 subBus = 0;
+ unsigned int rirq = virt_irq_to_real_map[irq];
- bus = IRQ_TO_BUS(irq);
- function = IRQ_TO_FUNC(irq);
- deviceId = (IRQ_TO_IDSEL(irq) << 4) + function;
+ bus = REAL_IRQ_TO_BUS(rirq);
+ function = REAL_IRQ_TO_FUNC(rirq);
+ deviceId = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function;
/* Link the IRQ number to the bridge */
HvCallXm_connectBusUnit(bus, subBus, deviceId, irq);
/* Unmask bridge interrupts in the FISR */
mask = 0x01010000 << function;
HvCallPci_unmaskFisr(bus, subBus, deviceId, mask);
- PPCDBG(PPCDBG_BUSWALK, "iSeries_activate_IRQ 0x%02X.%02X.%02X Irq:0x%02X\n",
- bus, subBus, deviceId, irq);
return 0;
}
-/*
- * Temporary hack
- */
-#define get_irq_desc(irq) &irq_desc[(irq)]
-
/*
* This is called out of iSeries_fixup to activate interrupt
* generation for usable slots
unsigned long flags;
for (irq = 0; irq < NR_IRQS; irq++) {
- irq_desc_t *desc = get_irq_desc(irq);
+ irq_desc_t *desc = &irq_desc[irq];
if (desc && desc->handler && desc->handler->startup) {
spin_lock_irqsave(&desc->lock, flags);
{
u32 bus, deviceId, function, mask;
const u32 subBus = 0;
+ unsigned int rirq = virt_irq_to_real_map[irq];
/* irq should be locked by the caller */
- bus = IRQ_TO_BUS(irq);
- function = IRQ_TO_FUNC(irq);
- deviceId = (IRQ_TO_IDSEL(irq) << 4) + function;
+ bus = REAL_IRQ_TO_BUS(rirq);
+ function = REAL_IRQ_TO_FUNC(rirq);
+ deviceId = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function;
/* Invalidate the IRQ number in the bridge */
HvCallXm_connectBusUnit(bus, subBus, deviceId, 0);
{
u32 bus, deviceId, function, mask;
const u32 subBus = 0;
+ unsigned int rirq = virt_irq_to_real_map[irq];
/* The IRQ has already been locked by the caller */
- bus = IRQ_TO_BUS(irq);
- function = IRQ_TO_FUNC(irq);
- deviceId = (IRQ_TO_IDSEL(irq) << 4) + function;
+ bus = REAL_IRQ_TO_BUS(rirq);
+ function = REAL_IRQ_TO_FUNC(rirq);
+ deviceId = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function;
/* Mask secondary INTA */
mask = 0x80000000;
{
u32 bus, deviceId, function, mask;
const u32 subBus = 0;
+ unsigned int rirq = virt_irq_to_real_map[irq];
/* The IRQ has already been locked by the caller */
- bus = IRQ_TO_BUS(irq);
- function = IRQ_TO_FUNC(irq);
- deviceId = (IRQ_TO_IDSEL(irq) << 4) + function;
+ bus = REAL_IRQ_TO_BUS(rirq);
+ function = REAL_IRQ_TO_FUNC(rirq);
+ deviceId = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function;
/* Unmask secondary INTA */
mask = 0x80000000;
} else
printk("PCI: Device Tree not found for 0x%016lX\n",
(unsigned long)pdev);
+ pdev->irq = node->Irq;
}
iSeries_IoMmTable_Status();
iSeries_activate_IRQs();
Bus, SubBus, AgentId, HvRc);
continue;
}
- printk("connected bus unit at bus %d subbus 0x%x agentid 0x%x (idsel=%d func=%d)\n",
- Bus, SubBus, AgentId, IdSel, Function);
HvRc = HvCallPci_configLoad16(Bus, SubBus, AgentId,
PCI_VENDOR_ID, &VendorId);
/* FoundDevice: 0x18.28.10 = 0x12AE */
PPCDBG(PPCDBG_BUSWALK,
- "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X\n",
- Bus, SubBus, AgentId, VendorId);
+ "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X, irq %d\n",
+ Bus, SubBus, AgentId, VendorId, Irq);
HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId,
PCI_INTERRUPT_LINE, Irq);
if (HvRc != 0)
if (!shared) {
desc->depth = 0;
desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
+ if (desc->handler && desc->handler->startup)
+ desc->handler->startup(irq);
unmask_irq(irq);
}
spin_unlock_irqrestore(&desc->lock,flags);
{
return IRQ_NONE;
}
+
+#ifndef CONFIG_PPC_ISERIES
+/*
+ * Virtual IRQ mapping code, used on systems with XICS interrupt controllers.
+ */
+
+#define UNDEFINED_IRQ 0xffffffff
+unsigned int virt_irq_to_real_map[NR_IRQS];
+
+/*
+ * Don't use virtual irqs 0, 1, 2 for devices.
+ * The pcnet32 driver considers interrupt numbers < 2 to be invalid,
+ * and 2 is the XICS IPI interrupt.
+ * We limit virtual irqs to 17 less than NR_IRQS so that when we
+ * offset them by 16 (to reserve the first 16 for ISA interrupts)
+ * we don't end up with an interrupt number >= NR_IRQS.
+ */
+#define MIN_VIRT_IRQ 3
+#define MAX_VIRT_IRQ (NR_IRQS - NUM_8259_INTERRUPTS - 1)
+#define NR_VIRT_IRQS (MAX_VIRT_IRQ - MIN_VIRT_IRQ + 1)
+
+void
+virt_irq_init(void)
+{
+ int i;
+ for (i = 0; i < NR_IRQS; i++)
+ virt_irq_to_real_map[i] = UNDEFINED_IRQ;
+}
+
+/* Create a mapping for a real_irq if it doesn't already exist.
+ * Return the virtual irq as a convenience.
+ */
+int virt_irq_create_mapping(unsigned int real_irq)
+{
+ unsigned int virq, first_virq;
+ static int warned;
+
+ if (naca->interrupt_controller == IC_OPEN_PIC)
+ return real_irq; /* no mapping for openpic (for now) */
+
+ /* don't map interrupts < MIN_VIRT_IRQ */
+ if (real_irq < MIN_VIRT_IRQ) {
+ virt_irq_to_real_map[real_irq] = real_irq;
+ return real_irq;
+ }
+
+ /* map to a number between MIN_VIRT_IRQ and MAX_VIRT_IRQ */
+ virq = real_irq;
+ if (virq > MAX_VIRT_IRQ)
+ virq = (virq % NR_VIRT_IRQS) + MIN_VIRT_IRQ;
+
+ /* search for this number or a free slot */
+ first_virq = virq;
+ while (virt_irq_to_real_map[virq] != UNDEFINED_IRQ) {
+ if (virt_irq_to_real_map[virq] == real_irq)
+ return virq;
+ if (++virq > MAX_VIRT_IRQ)
+ virq = MIN_VIRT_IRQ;
+ if (virq == first_virq)
+ goto nospace; /* oops, no free slots */
+ }
+
+ virt_irq_to_real_map[virq] = real_irq;
+ return virq;
+
+ nospace:
+ if (!warned) {
+ printk(KERN_CRIT "Interrupt table is full\n");
+ printk(KERN_CRIT "Increase NR_IRQS (currently %d) "
+ "in your kernel sources and rebuild.\n", NR_IRQS);
+ warned = 1;
+ }
+ return NO_IRQ;
+}
+
+#endif
*/
static rwlock_t devtree_lock = RW_LOCK_UNLOCKED;
-#define UNDEFINED_IRQ 0xffff
-unsigned short real_irq_to_virt_map[NR_HW_IRQS];
-unsigned short virt_irq_to_real_map[NR_IRQS];
-int last_virt_irq = 2; /* index of last virt_irq. Skip through IPI */
-
static unsigned long call_prom(const char *service, int nargs, int nret, ...);
static void prom_panic(const char *reason);
static unsigned long copy_device_tree(unsigned long);
return DOUBLEWORD_ALIGN(mem);
}
-void
-virt_irq_init(void)
-{
- int i;
- for (i = 0; i < NR_IRQS; i++)
- virt_irq_to_real_map[i] = UNDEFINED_IRQ;
- for (i = 0; i < NR_HW_IRQS; i++)
- real_irq_to_virt_map[i] = UNDEFINED_IRQ;
-}
-
-/* Create a mapping for a real_irq if it doesn't already exist.
- * Return the virtual irq as a convenience.
- */
-unsigned long
-virt_irq_create_mapping(unsigned long real_irq)
-{
- unsigned long virq;
- if (naca->interrupt_controller == IC_OPEN_PIC)
- return real_irq; /* no mapping for openpic (for now) */
- virq = real_irq_to_virt(real_irq);
- if (virq == UNDEFINED_IRQ) {
- /* Assign a virtual IRQ number */
- if (real_irq < NR_IRQS && virt_irq_to_real(real_irq) == UNDEFINED_IRQ) {
- /* A 1-1 mapping will work. */
- virq = real_irq;
- } else {
- while (last_virt_irq < NR_IRQS &&
- virt_irq_to_real(++last_virt_irq) != UNDEFINED_IRQ)
- /* skip irq's in use */;
- if (last_virt_irq >= NR_IRQS)
- panic("Too many IRQs are required on this system. NR_IRQS=%d\n", NR_IRQS);
- virq = last_virt_irq;
- }
- virt_irq_to_real_map[virq] = real_irq;
- real_irq_to_virt_map[real_irq] = virq;
- }
- return virq;
-}
-
static int __init
prom_next_node(phandle *nodep)
unsigned int *ints;
int intlen, intrcells;
int i, j, n;
- unsigned int *irq;
+ unsigned int *irq, virq;
struct device_node *ic;
ints = (unsigned int *) get_property(np, "interrupts", &intlen);
n = map_interrupt(&irq, &ic, np, ints, intrcells);
if (n <= 0)
continue;
- np->intrs[i].line = openpic_to_irq(virt_irq_create_mapping(irq[0]));
+ virq = virt_irq_create_mapping(irq[0]);
+ if (virq == NO_IRQ) {
+ printk(KERN_CRIT "Could not allocate interrupt "
+ "number for %s\n", np->full_name);
+ } else
+ np->intrs[i].line = openpic_to_irq(virq);
+
/* We offset irq numbers for the u3 MPIC by 128 in PowerMac */
if (systemcfg->platform == PLATFORM_POWERMAC && ic && ic->parent) {
char *name = get_property(ic->parent, "name", NULL);
unsigned int *ints;
int intlen, intrcells;
int i, j, n, err = 0;
- unsigned int *irq;
+ unsigned int *irq, virq;
struct device_node *ic;
node->name = get_property(node, "name", 0);
n = map_interrupt(&irq, &ic, node, ints, intrcells);
if (n <= 0)
continue;
- node->intrs[i].line = openpic_to_irq(virt_irq_create_mapping(irq[0]));
+ virq = virt_irq_create_mapping(irq[0]);
+ if (virq == NO_IRQ) {
+ printk(KERN_CRIT "Could not allocate interrupt "
+ "number for %s\n", node->full_name);
+ } else
+ node->intrs[i].line = openpic_to_irq(virq);
if (n > 1)
node->intrs[i].sense = irq[1];
if (n > 2) {
{
struct device_node *np;
unsigned int *ireg, len, i;
+ int virq;
if ((np = of_find_node_by_path("/event-sources/internal-errors")) &&
(ireg = (unsigned int *)get_property(np, "open-pic-interrupt",
&len))) {
for (i=0; i<(len / sizeof(*ireg)); i++) {
- request_irq(virt_irq_create_mapping(*(ireg)) + NUM_8259_INTERRUPTS,
+ virq = virt_irq_create_mapping(*(ireg));
+ if (virq == NO_IRQ) {
+ printk(KERN_ERR "Unable to allocate interrupt "
+ "number for %s\n", np->full_name);
+ break;
+ }
+ request_irq(virq + NUM_8259_INTERRUPTS,
ras_error_interrupt, 0,
"RAS_ERROR", NULL);
ireg++;
(ireg = (unsigned int *)get_property(np, "open-pic-interrupt",
&len))) {
for (i=0; i<(len / sizeof(*ireg)); i++) {
- request_irq(virt_irq_create_mapping(*(ireg)) + NUM_8259_INTERRUPTS,
+ virq = virt_irq_create_mapping(*(ireg));
+ if (virq == NO_IRQ) {
+ printk(KERN_ERR "Unable to allocate interrupt "
+ " number for %s\n", np->full_name);
+ break;
+ }
+ request_irq(virq + NUM_8259_INTERRUPTS,
ras_epow_interrupt, 0,
"RAS_EPOW", NULL);
ireg++;
viodev->unit_address = *unit_address;
viodev->tce_table = vio_build_tce_table(viodev);
- viodev->irq = (unsigned int) -1;
+ viodev->irq = NO_IRQ;
irq_p = (unsigned int *)get_property(of_node, "interrupts", 0);
if (irq_p) {
- viodev->irq = openpic_to_irq(virt_irq_create_mapping(*irq_p));
+ int virq = virt_irq_create_mapping(*irq_p);
+ if (virq == NO_IRQ) {
+ printk(KERN_ERR "Unable to allocate interrupt "
+ "number for %s\n", of_node->full_name);
+ } else
+ viodev->irq = openpic_to_irq(virq);
}
/* init generic 'struct device' fields: */
#include <linux/interrupt.h>
#include <linux/signal.h>
#include <linux/init.h>
+#include <linux/gfp.h>
+#include <linux/radix-tree.h>
#include <asm/prom.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include "i8259.h"
-void xics_enable_irq(u_int irq);
-void xics_disable_irq(u_int irq);
-void xics_mask_and_ack_irq(u_int irq);
-void xics_end_irq(u_int irq);
-void xics_set_affinity(unsigned int irq_nr, cpumask_t cpumask);
+static unsigned int xics_startup(unsigned int irq);
+static void xics_enable_irq(unsigned int irq);
+static void xics_disable_irq(unsigned int irq);
+static void xics_mask_and_ack_irq(unsigned int irq);
+static void xics_end_irq(unsigned int irq);
+static void xics_set_affinity(unsigned int irq_nr, cpumask_t cpumask);
struct hw_interrupt_type xics_pic = {
- " XICS ",
- NULL,
- NULL,
- xics_enable_irq,
- xics_disable_irq,
- xics_mask_and_ack_irq,
- xics_end_irq,
- xics_set_affinity
+ .typename = " XICS ",
+ .startup = xics_startup,
+ .enable = xics_enable_irq,
+ .disable = xics_disable_irq,
+ .ack = xics_mask_and_ack_irq,
+ .end = xics_end_irq,
+ .set_affinity = xics_set_affinity
};
struct hw_interrupt_type xics_8259_pic = {
- " XICS/8259",
- NULL,
- NULL,
- NULL,
- NULL,
- xics_mask_and_ack_irq,
- NULL
+ .typename = " XICS/8259",
+ .ack = xics_mask_and_ack_irq,
};
+/* This is used to map real irq numbers to virtual */
+static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_KERNEL);
+
#define XICS_IPI 2
#define XICS_IRQ_OFFSET 0x10
#define XICS_IRQ_SPURIOUS 0
pSeriesLP_qirr_info
};
-void xics_enable_irq(u_int virq)
+static unsigned int xics_startup(unsigned int virq)
+{
+ virq -= XICS_IRQ_OFFSET;
+ if (radix_tree_insert(&irq_map, virt_irq_to_real(virq),
+ &virt_irq_to_real_map[virq]) == -ENOMEM)
+ printk(KERN_CRIT "Out of memory creating real -> virtual"
+ " IRQ mapping for irq %u (real 0x%x)\n",
+ virq, virt_irq_to_real(virq));
+ return 0; /* return value is ignored */
+}
+
+static unsigned int real_irq_to_virt(unsigned int real_irq)
{
- u_int irq;
+ unsigned int *ptr;
+
+ ptr = radix_tree_lookup(&irq_map, real_irq);
+ if (ptr == NULL)
+ return NO_IRQ;
+ return ptr - virt_irq_to_real_map;
+}
+
+static void xics_enable_irq(unsigned int virq)
+{
+ unsigned int irq;
long call_status;
unsigned int server;
call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server,
DEFAULT_PRIORITY);
if (call_status != 0) {
- printk("xics_enable_irq: irq=%x: ibm_set_xive returned %lx\n",
- irq, call_status);
+ printk(KERN_ERR "xics_enable_irq: irq=%x: ibm_set_xive "
+ "returned %lx\n", irq, call_status);
return;
}
/* Now unmask the interrupt (often a no-op) */
call_status = rtas_call(ibm_int_on, 1, 1, NULL, irq);
if (call_status != 0) {
- printk("xics_enable_irq: irq=%x: ibm_int_on returned %lx\n",
- irq, call_status);
+ printk(KERN_ERR "xics_enable_irq: irq=%x: ibm_int_on "
+ "returned %lx\n", irq, call_status);
return;
}
}
-void xics_disable_irq(u_int virq)
+static void xics_disable_real_irq(unsigned int irq)
{
- u_int irq;
long call_status;
- virq -= XICS_IRQ_OFFSET;
- irq = virt_irq_to_real(virq);
if (irq == XICS_IPI)
return;
call_status = rtas_call(ibm_int_off, 1, 1, NULL, irq);
if (call_status != 0) {
- printk("xics_disable_irq: irq=%x: ibm_int_off returned %lx\n",
- irq, call_status);
+ printk(KERN_ERR "xics_disable_real_irq: irq=%x: "
+ "ibm_int_off returned %lx\n", irq, call_status);
return;
}
call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, default_server,
0xff);
if (call_status != 0) {
- printk("xics_disable_irq: irq=%x: ibm_set_xive(0xff) returned %lx\n",
- irq, call_status);
+ printk(KERN_ERR "xics_disable_irq: irq=%x: ibm_set_xive(0xff)"
+ " returned %lx\n", irq, call_status);
return;
}
}
-void xics_end_irq(u_int irq)
+static void xics_disable_irq(unsigned int virq)
+{
+ unsigned int irq;
+
+ virq -= XICS_IRQ_OFFSET;
+ irq = virt_irq_to_real(virq);
+ xics_disable_real_irq(irq);
+}
+
+static void xics_end_irq(unsigned int irq)
{
int cpu = smp_processor_id();
(virt_irq_to_real(irq-XICS_IRQ_OFFSET))));
}
-void xics_mask_and_ack_irq(u_int irq)
+static void xics_mask_and_ack_irq(unsigned int irq)
{
int cpu = smp_processor_id();
int xics_get_irq(struct pt_regs *regs)
{
- u_int cpu = smp_processor_id();
- u_int vec;
+ unsigned int cpu = smp_processor_id();
+ unsigned int vec;
int irq;
vec = ops->xirr_info_get(cpu);
} else if (vec == XICS_IRQ_SPURIOUS) {
irq = -1;
} else {
- irq = real_irq_to_virt(vec) + XICS_IRQ_OFFSET;
+ irq = real_irq_to_virt(vec);
+ if (irq == NO_IRQ) {
+ printk(KERN_ERR "Interrupt 0x%x (real) is invalid,"
+ " disabling it.\n", vec);
+ xics_disable_real_irq(vec);
+ } else
+ irq += XICS_IRQ_OFFSET;
}
return irq;
}
while (1);
}
xics_irq_8259_cascade_real = *ireg;
- xics_irq_8259_cascade = virt_irq_create_mapping(xics_irq_8259_cascade_real);
+ xics_irq_8259_cascade
+ = virt_irq_create_mapping(xics_irq_8259_cascade_real);
of_node_put(np);
}
#ifdef CONFIG_SMP
void xics_request_IPIs(void)
{
- real_irq_to_virt_map[XICS_IPI] = virt_irq_to_real_map[XICS_IPI] =
- XICS_IPI;
+ virt_irq_to_real_map[XICS_IPI] = XICS_IPI;
+
/* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */
request_irq(XICS_IPI + XICS_IRQ_OFFSET, xics_ipi_action, SA_INTERRUPT,
"IPI", 0);
}
#endif
-void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
+static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
{
irq_desc_t *desc = irq_desc + virq;
unsigned int irq;
status = rtas_call(ibm_get_xive, 1, 3, (void *)&xics_status, irq);
if (status) {
- printk("xics_set_affinity: irq=%d ibm,get-xive returns %ld\n",
- irq, status);
+ printk(KERN_ERR "xics_set_affinity: irq=%d ibm,get-xive "
+ "returns %ld\n", irq, status);
goto out;
}
irq, newmask, xics_status[1]);
if (status) {
- printk("xics_set_affinity irq=%d ibm,set-xive returns %ld\n",
- irq, status);
+ printk(KERN_ERR "xics_set_affinity irq=%d ibm,set-xive "
+ "returns %ld\n", irq, status);
goto out;
}
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)
+
/*
* this is the maximum number of virtual irqs we will use.
*/
/* Interrupt numbers are virtual in case they are sparsely
* distributed by the hardware.
*/
-#define NR_HW_IRQS 8192
-extern unsigned short real_irq_to_virt_map[NR_HW_IRQS];
-extern unsigned short virt_irq_to_real_map[NR_IRQS];
+extern unsigned int virt_irq_to_real_map[NR_IRQS];
+
/* Create a mapping for a real_irq if it doesn't already exist.
* Return the virtual irq as a convenience.
*/
-unsigned long virt_irq_create_mapping(unsigned long real_irq);
+int virt_irq_create_mapping(unsigned int real_irq);
+void virt_irq_init(void);
-/* These funcs map irqs between real and virtual */
-static inline unsigned long real_irq_to_virt(unsigned long real_irq) {
- return real_irq_to_virt_map[real_irq];
-}
-static inline unsigned long virt_irq_to_real(unsigned long virt_irq) {
+static inline unsigned int virt_irq_to_real(unsigned int virt_irq)
+{
return virt_irq_to_real_map[virt_irq];
}