- patches.fixes/patch-2.6.11-rc1: 2.6.11-rc1.
[linux-flexiantxendom0-3.2.10.git] / include / asm-s390 / hardirq.h
1 /*
2  *  include/asm-s390/hardirq.h
3  *
4  *  S390 version
5  *    Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
6  *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
7  *               Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
8  *
9  *  Derived from "include/asm-i386/hardirq.h"
10  */
11
12 #ifndef __ASM_HARDIRQ_H
13 #define __ASM_HARDIRQ_H
14
15 #include <linux/config.h>
16 #include <linux/threads.h>
17 #include <linux/sched.h>
18 #include <linux/cache.h>
19 #include <linux/interrupt.h>
20 #include <asm/lowcore.h>
21
22 /* irq_cpustat_t is unused currently, but could be converted
23  * into a percpu variable instead of storing softirq_pending
24  * on the lowcore */
25 typedef struct {
26         unsigned int __softirq_pending;
27 } irq_cpustat_t;
28
29 #define local_softirq_pending() (S390_lowcore.softirq_pending)
30
31 /* this is always called with cpu == smp_processor_id() at the moment */
32 static inline __u32
33 softirq_pending(unsigned int cpu)
34 {
35         if (cpu == smp_processor_id())
36                 return local_softirq_pending();
37         return lowcore_ptr[cpu]->softirq_pending;
38 }
39
40 #define __ARCH_IRQ_STAT
41 #define __ARCH_HAS_DO_SOFTIRQ
42
43 #define HARDIRQ_BITS    8
44
45 extern void account_ticks(struct pt_regs *);
46
47 #endif /* __ASM_HARDIRQ_H */