1/* softirq.h: 32-bit Sparc soft IRQ support. 2 * 3 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1998-99 Anton Blanchard (anton@progsoc.uts.edu.au) 5 */ 6 7#ifndef __SPARC_SOFTIRQ_H 8#define __SPARC_SOFTIRQ_H 9 10#include <linux/threads.h> /* For NR_CPUS */ 11 12#include <asm/atomic.h> 13#include <asm/smp.h> 14#include <asm/hardirq.h> 15 16#define local_bh_disable() (local_bh_count(smp_processor_id())++) 17#define __local_bh_enable() (local_bh_count(smp_processor_id())--) 18#define local_bh_enable() \ 19do { if (!--local_bh_count(smp_processor_id()) && \ 20 softirq_pending(smp_processor_id())) { \ 21 do_softirq(); \ 22 __sti(); \ 23 } \ 24} while (0) 25#define in_softirq() (local_bh_count(smp_processor_id()) != 0) 26 27#endif /* __SPARC_SOFTIRQ_H */ 28