summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/irq.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-13 18:16:10 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:12:40 -0800
commite3999574b48125c9bb0c95e3e9f1c696bf96c3e3 (patch)
treea6651da06fa36c3dde33a7be5f0b7192b8442cd7 /arch/sparc64/kernel/irq.c
parent10804828fd06a43ce964e9d9852332e7ff1507b1 (diff)
downloadblackbird-op-linux-e3999574b48125c9bb0c95e3e9f1c696bf96c3e3.tar.gz
blackbird-op-linux-e3999574b48125c9bb0c95e3e9f1c696bf96c3e3.zip
[SPARC64]: Generic sun4v_build_irq().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r--arch/sparc64/kernel/irq.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 51f65054bf18..bcc889a53324 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -303,6 +303,38 @@ out:
return __irq(bucket);
}
+unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino, int pil, unsigned char flags)
+{
+ struct ino_bucket *bucket;
+ unsigned long sysino;
+
+ sysino = sun4v_devino_to_sysino(devhandle, devino);
+
+ printk(KERN_INFO "sun4v_irq: Mapping ( devh[%08x] devino[%08x] ) "
+ "--> sysino[%016lx]\n", devhandle, devino, sysino);
+
+ bucket = &ivector_table[sysino];
+
+ /* Catch accidental accesses to these things. IMAP/ICLR handling
+ * is done by hypervisor calls on sun4v platforms, not by direct
+ * register accesses.
+ */
+ bucket->imap = ~0UL;
+ bucket->iclr = ~0UL;
+
+ bucket->pil = pil;
+ bucket->flags = flags;
+
+ bucket->irq_info = kmalloc(sizeof(struct irq_desc), GFP_ATOMIC);
+ if (!bucket->irq_info) {
+ prom_printf("IRQ: Error, kmalloc(irq_desc) failed.\n");
+ prom_halt();
+ }
+ memset(bucket->irq_info, 0, sizeof(struct irq_desc));
+
+ return __irq(bucket);
+}
+
static void atomic_bucket_insert(struct ino_bucket *bucket)
{
unsigned long pstate;
OpenPOWER on IntegriCloud