Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * include/asm-parisc/irq.h |
| 3 | * |
| 4 | * Copyright 2005 Matthew Wilcox <matthew@wil.cx> |
| 5 | */ |
| 6 | |
| 7 | #ifndef _ASM_PARISC_IRQ_H |
| 8 | #define _ASM_PARISC_IRQ_H |
| 9 | |
| 10 | #include <linux/config.h> |
James Bottomley | c2ab64d | 2005-11-17 16:28:37 -0500 | [diff] [blame] | 11 | #include <linux/cpumask.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <asm/types.h> |
| 13 | |
| 14 | #define NO_IRQ (-1) |
| 15 | |
| 16 | #ifdef CONFIG_GSC |
| 17 | #define GSC_IRQ_BASE 16 |
| 18 | #define GSC_IRQ_MAX 63 |
| 19 | #define CPU_IRQ_BASE 64 |
| 20 | #else |
| 21 | #define CPU_IRQ_BASE 16 |
| 22 | #endif |
| 23 | |
| 24 | #define TIMER_IRQ (CPU_IRQ_BASE + 0) |
| 25 | #define IPI_IRQ (CPU_IRQ_BASE + 1) |
| 26 | #define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1)) |
| 27 | |
| 28 | #define NR_IRQS (CPU_IRQ_MAX + 1) |
| 29 | |
Karsten Wiese | f26fdd5 | 2005-09-06 15:17:25 -0700 | [diff] [blame] | 30 | /* |
| 31 | * IRQ line status macro IRQ_PER_CPU is used |
| 32 | */ |
| 33 | #define ARCH_HAS_IRQ_PER_CPU |
| 34 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | static __inline__ int irq_canonicalize(int irq) |
| 36 | { |
| 37 | return (irq == 2) ? 9 : irq; |
| 38 | } |
| 39 | |
| 40 | struct hw_interrupt_type; |
| 41 | |
| 42 | /* |
| 43 | * Some useful "we don't have to do anything here" handlers. Should |
| 44 | * probably be provided by the generic code. |
| 45 | */ |
| 46 | void no_ack_irq(unsigned int irq); |
| 47 | void no_end_irq(unsigned int irq); |
| 48 | |
| 49 | extern int txn_alloc_irq(unsigned int nbits); |
| 50 | extern int txn_claim_irq(int); |
| 51 | extern unsigned int txn_alloc_data(unsigned int); |
| 52 | extern unsigned long txn_alloc_addr(unsigned int); |
James Bottomley | c2ab64d | 2005-11-17 16:28:37 -0500 | [diff] [blame] | 53 | extern unsigned long txn_affinity_addr(unsigned int irq, int cpu); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | |
| 55 | extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *); |
James Bottomley | c2ab64d | 2005-11-17 16:28:37 -0500 | [diff] [blame] | 56 | extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | |
| 58 | /* soft power switch support (power.c) */ |
| 59 | extern struct tasklet_struct power_tasklet; |
| 60 | |
| 61 | #endif /* _ASM_PARISC_IRQ_H */ |