License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / arch / parisc / include / asm / irq.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1da177e4
LT
2/*
3 * include/asm-parisc/irq.h
4 *
5 * Copyright 2005 Matthew Wilcox <matthew@wil.cx>
6 */
7
8#ifndef _ASM_PARISC_IRQ_H
9#define _ASM_PARISC_IRQ_H
10
c2ab64d0 11#include <linux/cpumask.h>
1da177e4
LT
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
30static __inline__ int irq_canonicalize(int irq)
31{
32 return (irq == 2) ? 9 : irq;
33}
34
5cfe87d3 35struct irq_chip;
4c4231ea 36struct irq_data;
1da177e4 37
4c4231ea
TG
38void cpu_ack_irq(struct irq_data *d);
39void cpu_eoi_irq(struct irq_data *d);
1da177e4
LT
40
41extern int txn_alloc_irq(unsigned int nbits);
42extern int txn_claim_irq(int);
43extern unsigned int txn_alloc_data(unsigned int);
44extern unsigned long txn_alloc_addr(unsigned int);
c2ab64d0 45extern unsigned long txn_affinity_addr(unsigned int irq, int cpu);
1da177e4 46
5cfe87d3 47extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *);
4c4231ea 48extern int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest);
1da177e4
LT
49
50/* soft power switch support (power.c) */
51extern struct tasklet_struct power_tasklet;
52
53#endif /* _ASM_PARISC_IRQ_H */