[MIPS] csum_partial and copy in parallel
[deliverable/linux.git] / include / asm-mips / irq.h
CommitLineData
1da177e4
LT
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994 by Waldorf GMBH, written by Ralf Baechle
7 * Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02, 03 by Ralf Baechle
8 */
9#ifndef _ASM_IRQ_H
10#define _ASM_IRQ_H
11
1da177e4 12#include <linux/linkage.h>
41c594ab
RB
13
14#include <asm/mipsmtregs.h>
15
1da177e4
LT
16#include <irq.h>
17
18#ifdef CONFIG_I8259
19static inline int irq_canonicalize(int irq)
20{
21 return ((irq == 2) ? 9 : irq);
22}
23#else
24#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
25#endif
26
41c594ab
RB
27#ifdef CONFIG_MIPS_MT_SMTC
28/*
29 * Clear interrupt mask handling "backstop" if irq_hwmask
30 * entry so indicates. This implies that the ack() or end()
31 * functions will take over re-enabling the low-level mask.
32 * Otherwise it will be done on return from exception.
33 */
34#define __DO_IRQ_SMTC_HOOK() \
35do { \
36 if (irq_hwmask[irq] & 0x0000ff00) \
37 write_c0_tccontext(read_c0_tccontext() & \
38 ~(irq_hwmask[irq] & 0x0000ff00)); \
39} while (0)
40#else
41#define __DO_IRQ_SMTC_HOOK() do { } while (0)
42#endif
43
1da177e4
LT
44/*
45 * do_IRQ handles all normal device IRQ's (the special
46 * SMP cross-CPU interrupts have their own specific
47 * handlers).
48 *
49 * Ideally there should be away to get this into kernel/irq/handle.c to
50 * avoid the overhead of a call for just a tiny function ...
51 */
937a8015 52#define do_IRQ(irq) \
1da177e4
LT
53do { \
54 irq_enter(); \
41c594ab 55 __DO_IRQ_SMTC_HOOK(); \
1417836e 56 generic_handle_irq(irq); \
1da177e4
LT
57 irq_exit(); \
58} while (0)
59
1da177e4 60extern void arch_init_irq(void);
937a8015 61extern void spurious_interrupt(void);
1da177e4 62
41c594ab
RB
63#ifdef CONFIG_MIPS_MT_SMTC
64struct irqaction;
65
66extern unsigned long irq_hwmask[];
67extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,
68 unsigned long hwmask);
69#endif /* CONFIG_MIPS_MT_SMTC */
70
4a4cf779
RB
71extern int allocate_irqno(void);
72extern void alloc_legacy_irqno(void);
73extern void free_irqno(unsigned int irq);
74
1da177e4 75#endif /* _ASM_IRQ_H */
This page took 0.221073 seconds and 5 git commands to generate.