1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2deae26bfSKyle McMartin /* 3deae26bfSKyle McMartin * include/asm-parisc/irq.h 4deae26bfSKyle McMartin * 5deae26bfSKyle McMartin * Copyright 2005 Matthew Wilcox <matthew@wil.cx> 6deae26bfSKyle McMartin */ 7deae26bfSKyle McMartin 8deae26bfSKyle McMartin #ifndef _ASM_PARISC_IRQ_H 9deae26bfSKyle McMartin #define _ASM_PARISC_IRQ_H 10deae26bfSKyle McMartin 11deae26bfSKyle McMartin #include <linux/cpumask.h> 12deae26bfSKyle McMartin #include <asm/types.h> 13deae26bfSKyle McMartin 14deae26bfSKyle McMartin #define NO_IRQ (-1) 15deae26bfSKyle McMartin 16deae26bfSKyle McMartin #ifdef CONFIG_GSC 17deae26bfSKyle McMartin #define GSC_IRQ_BASE 16 18deae26bfSKyle McMartin #define GSC_IRQ_MAX 63 19deae26bfSKyle McMartin #define CPU_IRQ_BASE 64 20deae26bfSKyle McMartin #else 21deae26bfSKyle McMartin #define CPU_IRQ_BASE 16 22deae26bfSKyle McMartin #endif 23deae26bfSKyle McMartin 24deae26bfSKyle McMartin #define TIMER_IRQ (CPU_IRQ_BASE + 0) 25deae26bfSKyle McMartin #define IPI_IRQ (CPU_IRQ_BASE + 1) 26deae26bfSKyle McMartin #define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1)) 27deae26bfSKyle McMartin 28deae26bfSKyle McMartin #define NR_IRQS (CPU_IRQ_MAX + 1) 29deae26bfSKyle McMartin 30deae26bfSKyle McMartin static __inline__ int irq_canonicalize(int irq) 31deae26bfSKyle McMartin { 32deae26bfSKyle McMartin return (irq == 2) ? 9 : irq; 33deae26bfSKyle McMartin } 34deae26bfSKyle McMartin 35deae26bfSKyle McMartin struct irq_chip; 364c4231eaSThomas Gleixner struct irq_data; 37deae26bfSKyle McMartin 384c4231eaSThomas Gleixner void cpu_ack_irq(struct irq_data *d); 394c4231eaSThomas Gleixner void cpu_eoi_irq(struct irq_data *d); 40deae26bfSKyle McMartin 41deae26bfSKyle McMartin extern int txn_alloc_irq(unsigned int nbits); 42deae26bfSKyle McMartin extern int txn_claim_irq(int); 43deae26bfSKyle McMartin extern unsigned int txn_alloc_data(unsigned int); 44deae26bfSKyle McMartin extern unsigned long txn_alloc_addr(unsigned int); 45deae26bfSKyle McMartin extern unsigned long txn_affinity_addr(unsigned int irq, int cpu); 46deae26bfSKyle McMartin 47deae26bfSKyle McMartin extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *); 484c4231eaSThomas Gleixner extern int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest); 49deae26bfSKyle McMartin 50deae26bfSKyle McMartin /* soft power switch support (power.c) */ 51deae26bfSKyle McMartin extern struct tasklet_struct power_tasklet; 52deae26bfSKyle McMartin 53deae26bfSKyle McMartin #endif /* _ASM_PARISC_IRQ_H */ 54