1 /* softirq.h: 64-bit Sparc soft IRQ support.
2  *
3  * Copyright (C) 1997, 1998 David S. Miller (davem@caip.rutgers.edu)
4  */
5 
6 #ifndef __SPARC64_SOFTIRQ_H
7 #define __SPARC64_SOFTIRQ_H
8 
9 #include <asm/atomic.h>
10 #include <asm/hardirq.h>
11 #include <asm/system.h>		/* for membar_safe() */
12 
13 #define local_bh_disable()	(local_bh_count(smp_processor_id())++)
14 #define __local_bh_enable()	(local_bh_count(smp_processor_id())--)
15 #define local_bh_enable()			  \
16 do { if (!--local_bh_count(smp_processor_id()) && \
17 	 softirq_pending(smp_processor_id())) {   \
18 		do_softirq();			  \
19 		__sti();			  \
20      }						  \
21 } while (0)
22 
23 #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
24 
25 #endif /* !(__SPARC64_SOFTIRQ_H) */
26