move new files out from platform support patch
[openwrt/openwrt.git] / target / linux / ubicom32 / files / arch / ubicom32 / include / asm / hardirq.h
1 /*
2 * arch/ubicom32/include/asm/hardirq.h
3 * Definition of ack_bad_irq() for Ubicom32 architecture.
4 *
5 * (C) Copyright 2009, Ubicom, Inc.
6 * Copyright (C) 1997, 98, 99, 2000, 01, 05 Ralf Baechle (ralf@linux-mips.org)
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 *
10 * This file is part of the Ubicom32 Linux Kernel Port.
11 *
12 * The Ubicom32 Linux Kernel Port is free software: you can redistribute
13 * it and/or modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, either version 2 of the
15 * License, or (at your option) any later version.
16 *
17 * The Ubicom32 Linux Kernel Port is distributed in the hope that it
18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
19 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
20 * the GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with the Ubicom32 Linux Kernel Port. If not,
24 * see <http://www.gnu.org/licenses/>.
25 *
26 * Ubicom32 implementation derived from (with many thanks):
27 * arch/m68knommu
28 * arch/blackfin
29 * arch/parisc
30 */
31 #ifndef _ASM_UBICOM32_HARDIRQ_H
32 #define _ASM_UBICOM32_HARDIRQ_H
33
34 #include <linux/threads.h>
35 #include <linux/irq.h>
36
37 /*
38 * The hardirq mask has to be large enough to have space
39 * for potentially all IRQ sources in the system nesting
40 * on a single CPU. For Ubicom32, we have 64 IRQ sources.
41 */
42 #define HARDIRQ_BITS 6
43 #if (1 << HARDIRQ_BITS) < NR_IRQS
44 # error HARDIRQ_BITS is too low!
45 #endif
46
47 typedef struct {
48 unsigned int __softirq_pending;
49 } ____cacheline_aligned irq_cpustat_t;
50
51 #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
52
53 extern void ack_bad_irq(unsigned int irq);
54
55 #endif /* _ASM_UBICOM32_HARDIRQ_H */