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 | |
James Bottomley | c2ab64d | 2005-11-17 16:28:37 -0500 | [diff] [blame] | 10 | #include <linux/cpumask.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | #include <asm/types.h> |
| 12 | |
| 13 | #define NO_IRQ (-1) |
| 14 | |
| 15 | #ifdef CONFIG_GSC |
| 16 | #define GSC_IRQ_BASE 16 |
| 17 | #define GSC_IRQ_MAX 63 |
| 18 | #define CPU_IRQ_BASE 64 |
| 19 | #else |
| 20 | #define CPU_IRQ_BASE 16 |
| 21 | #endif |
| 22 | |
| 23 | #define TIMER_IRQ (CPU_IRQ_BASE + 0) |
| 24 | #define IPI_IRQ (CPU_IRQ_BASE + 1) |
| 25 | #define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1)) |
| 26 | |
| 27 | #define NR_IRQS (CPU_IRQ_MAX + 1) |
| 28 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | static __inline__ int irq_canonicalize(int irq) |
| 30 | { |
| 31 | return (irq == 2) ? 9 : irq; |
| 32 | } |
| 33 | |
Kyle McMartin | 5cfe87d | 2006-08-13 22:25:45 -0400 | [diff] [blame] | 34 | struct irq_chip; |
Thomas Gleixner | 4c4231e | 2011-02-06 20:45:52 +0000 | [diff] [blame] | 35 | struct irq_data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | |
Thomas Gleixner | 4c4231e | 2011-02-06 20:45:52 +0000 | [diff] [blame] | 37 | void cpu_ack_irq(struct irq_data *d); |
| 38 | void cpu_eoi_irq(struct irq_data *d); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | |
| 40 | extern int txn_alloc_irq(unsigned int nbits); |
| 41 | extern int txn_claim_irq(int); |
| 42 | extern unsigned int txn_alloc_data(unsigned int); |
| 43 | extern unsigned long txn_alloc_addr(unsigned int); |
James Bottomley | c2ab64d | 2005-11-17 16:28:37 -0500 | [diff] [blame] | 44 | extern unsigned long txn_affinity_addr(unsigned int irq, int cpu); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | |
Kyle McMartin | 5cfe87d | 2006-08-13 22:25:45 -0400 | [diff] [blame] | 46 | extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *); |
Thomas Gleixner | 4c4231e | 2011-02-06 20:45:52 +0000 | [diff] [blame] | 47 | extern int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | |
| 49 | /* soft power switch support (power.c) */ |
| 50 | extern struct tasklet_struct power_tasklet; |
| 51 | |
| 52 | #endif /* _ASM_PARISC_IRQ_H */ |