diff options
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 32 |
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: | |||
303 | return __irq(bucket); | 303 | return __irq(bucket); |
304 | } | 304 | } |
305 | 305 | ||
306 | unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino, int pil, unsigned char flags) | ||
307 | { | ||
308 | struct ino_bucket *bucket; | ||
309 | unsigned long sysino; | ||
310 | |||
311 | sysino = sun4v_devino_to_sysino(devhandle, devino); | ||
312 | |||
313 | printk(KERN_INFO "sun4v_irq: Mapping ( devh[%08x] devino[%08x] ) " | ||
314 | "--> sysino[%016lx]\n", devhandle, devino, sysino); | ||
315 | |||
316 | bucket = &ivector_table[sysino]; | ||
317 | |||
318 | /* Catch accidental accesses to these things. IMAP/ICLR handling | ||
319 | * is done by hypervisor calls on sun4v platforms, not by direct | ||
320 | * register accesses. | ||
321 | */ | ||
322 | bucket->imap = ~0UL; | ||
323 | bucket->iclr = ~0UL; | ||
324 | |||
325 | bucket->pil = pil; | ||
326 | bucket->flags = flags; | ||
327 | |||
328 | bucket->irq_info = kmalloc(sizeof(struct irq_desc), GFP_ATOMIC); | ||
329 | if (!bucket->irq_info) { | ||
330 | prom_printf("IRQ: Error, kmalloc(irq_desc) failed.\n"); | ||
331 | prom_halt(); | ||
332 | } | ||
333 | memset(bucket->irq_info, 0, sizeof(struct irq_desc)); | ||
334 | |||
335 | return __irq(bucket); | ||
336 | } | ||
337 | |||
306 | static void atomic_bucket_insert(struct ino_bucket *bucket) | 338 | static void atomic_bucket_insert(struct ino_bucket *bucket) |
307 | { | 339 | { |
308 | unsigned long pstate; | 340 | unsigned long pstate; |