kernel.org linux-2.6.10
[linux-2.6.git] / include / asm-m68knommu / hardirq.h
1 #ifndef __M68K_HARDIRQ_H
2 #define __M68K_HARDIRQ_H
3
4 #include <linux/config.h>
5 #include <linux/cache.h>
6 #include <linux/threads.h>
7
8 typedef struct {
9         unsigned int __softirq_pending;
10         unsigned int __syscall_count;
11         struct task_struct * __ksoftirqd_task;
12 } ____cacheline_aligned irq_cpustat_t;
13
14 #include <linux/irq_cpustat.h>  /* Standard mappings for irq_cpustat_t above */
15
16 #define HARDIRQ_BITS    8
17
18 /*
19  * The hardirq mask has to be large enough to have
20  * space for potentially all IRQ sources in the system
21  * nesting on a single CPU:
22  */
23 #if (1 << HARDIRQ_BITS) < NR_IRQS
24 # error HARDIRQ_BITS is too low!
25 #endif
26
27 #define irq_enter()             (preempt_count() += HARDIRQ_OFFSET)
28 #define irq_exit()                                                      \
29 do {                                                                    \
30                 preempt_count() -= IRQ_EXIT_OFFSET;                     \
31                 if (!in_interrupt() && softirq_pending(smp_processor_id())) \
32                         do_softirq();                                   \
33                 preempt_enable_no_resched();                            \
34 } while (0)
35
36 #endif /* __M68K_HARDIRQ_H */