summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-08 02:59:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-08 02:59:00 +0000
commit1fcb7623bc138d780101d7a70cfe29b11f7c67ef (patch)
treee1ec9bb6aa19db16a405fb4393e2a90c38b4c75d /include/asm-sparc64
parent458fe58677afb17219d864e100131728038b4f1b (diff)
Merge with Linux 2.4.0-test3-pre5. 64-bit kernel are still not
-Werror clean.
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/asm_offsets.h246
-rw-r--r--include/asm-sparc64/bitops.h17
-rw-r--r--include/asm-sparc64/fcntl.h2
-rw-r--r--include/asm-sparc64/hardirq.h20
-rw-r--r--include/asm-sparc64/softirq.h11
5 files changed, 150 insertions, 146 deletions
diff --git a/include/asm-sparc64/asm_offsets.h b/include/asm-sparc64/asm_offsets.h
index 70e1356fd..832e22fa3 100644
--- a/include/asm-sparc64/asm_offsets.h
+++ b/include/asm-sparc64/asm_offsets.h
@@ -105,96 +105,96 @@
#define AOFF_task_it_virt_incr 0x00000168
#define ASIZ_task_it_virt_incr 0x00000008
#define AOFF_task_real_timer 0x00000170
-#define ASIZ_task_real_timer 0x00000030
-#define AOFF_task_times 0x000001a0
+#define ASIZ_task_real_timer 0x00000028
+#define AOFF_task_times 0x00000198
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x000001c0
+#define AOFF_task_start_time 0x000001b8
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001c8
+#define AOFF_task_per_cpu_utime 0x000001c0
#define ASIZ_task_per_cpu_utime 0x00000008
-#define AOFF_task_min_flt 0x000001d8
+#define AOFF_task_min_flt 0x000001d0
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000001e0
+#define AOFF_task_maj_flt 0x000001d8
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000001e8
+#define AOFF_task_nswap 0x000001e0
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000001f0
+#define AOFF_task_cmin_flt 0x000001e8
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000001f8
+#define AOFF_task_cmaj_flt 0x000001f0
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x00000200
+#define AOFF_task_cnswap 0x000001f8
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x0000020c
+#define AOFF_task_uid 0x00000204
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000210
+#define AOFF_task_euid 0x00000208
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x00000214
+#define AOFF_task_suid 0x0000020c
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000218
+#define AOFF_task_fsuid 0x00000210
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x0000021c
+#define AOFF_task_gid 0x00000214
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000220
+#define AOFF_task_egid 0x00000218
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x00000224
+#define AOFF_task_sgid 0x0000021c
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000228
+#define AOFF_task_fsgid 0x00000220
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x0000022c
+#define AOFF_task_ngroups 0x00000224
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000230
+#define AOFF_task_groups 0x00000228
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000002b0
+#define AOFF_task_cap_effective 0x000002a8
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000002b4
+#define AOFF_task_cap_inheritable 0x000002ac
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000002b8
+#define AOFF_task_cap_permitted 0x000002b0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000002c0
+#define AOFF_task_user 0x000002b8
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x000002c8
+#define AOFF_task_rlim 0x000002c0
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000368
+#define AOFF_task_used_math 0x00000360
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000036a
+#define AOFF_task_comm 0x00000362
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000037c
+#define AOFF_task_link_count 0x00000374
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000380
+#define AOFF_task_tty 0x00000378
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000388
+#define AOFF_task_semundo 0x00000380
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000390
+#define AOFF_task_semsleeping 0x00000388
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x000003a0
+#define AOFF_task_thread 0x00000390
#define ASIZ_task_thread 0x00000450
-#define AOFF_task_fs 0x000007f0
+#define AOFF_task_fs 0x000007e0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000007f8
+#define AOFF_task_files 0x000007e8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_sigmask_lock 0x00000800
+#define AOFF_task_sigmask_lock 0x000007f0
#define ASIZ_task_sigmask_lock 0x00000004
-#define AOFF_task_sig 0x00000808
+#define AOFF_task_sig 0x000007f8
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x00000810
+#define AOFF_task_signal 0x00000800
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000818
+#define AOFF_task_blocked 0x00000808
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000820
+#define AOFF_task_sigqueue 0x00000810
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000828
+#define AOFF_task_sigqueue_tail 0x00000818
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000830
+#define AOFF_task_sas_ss_sp 0x00000820
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000838
+#define AOFF_task_sas_ss_size 0x00000828
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000840
+#define AOFF_task_parent_exec_id 0x00000830
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000844
+#define AOFF_task_self_exec_id 0x00000834
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_alloc_lock 0x00000848
+#define AOFF_task_alloc_lock 0x00000838
#define ASIZ_task_alloc_lock 0x00000004
-#define ASIZ_task 0x00000850
+#define ASIZ_task 0x00000840
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
@@ -401,96 +401,96 @@
#define AOFF_task_it_virt_incr 0x00000168
#define ASIZ_task_it_virt_incr 0x00000008
#define AOFF_task_real_timer 0x00000170
-#define ASIZ_task_real_timer 0x00000030
-#define AOFF_task_times 0x000001a0
+#define ASIZ_task_real_timer 0x00000028
+#define AOFF_task_times 0x00000198
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x000001c0
+#define AOFF_task_start_time 0x000001b8
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001c8
+#define AOFF_task_per_cpu_utime 0x000001c0
#define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x000003c8
+#define AOFF_task_min_flt 0x000003c0
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003d0
+#define AOFF_task_maj_flt 0x000003c8
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003d8
+#define AOFF_task_nswap 0x000003d0
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003e0
+#define AOFF_task_cmin_flt 0x000003d8
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003e8
+#define AOFF_task_cmaj_flt 0x000003e0
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003f0
+#define AOFF_task_cnswap 0x000003e8
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000003fc
+#define AOFF_task_uid 0x000003f4
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000400
+#define AOFF_task_euid 0x000003f8
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x00000404
+#define AOFF_task_suid 0x000003fc
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000408
+#define AOFF_task_fsuid 0x00000400
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x0000040c
+#define AOFF_task_gid 0x00000404
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000410
+#define AOFF_task_egid 0x00000408
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x00000414
+#define AOFF_task_sgid 0x0000040c
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000418
+#define AOFF_task_fsgid 0x00000410
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x0000041c
+#define AOFF_task_ngroups 0x00000414
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000420
+#define AOFF_task_groups 0x00000418
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000004a0
+#define AOFF_task_cap_effective 0x00000498
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000004a4
+#define AOFF_task_cap_inheritable 0x0000049c
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000004a8
+#define AOFF_task_cap_permitted 0x000004a0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000004b0
+#define AOFF_task_user 0x000004a8
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x000004b8
+#define AOFF_task_rlim 0x000004b0
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000558
+#define AOFF_task_used_math 0x00000550
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000055a
+#define AOFF_task_comm 0x00000552
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000056c
+#define AOFF_task_link_count 0x00000564
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000570
+#define AOFF_task_tty 0x00000568
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000578
+#define AOFF_task_semundo 0x00000570
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000580
+#define AOFF_task_semsleeping 0x00000578
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x00000590
+#define AOFF_task_thread 0x00000580
#define ASIZ_task_thread 0x00000450
-#define AOFF_task_fs 0x000009e0
+#define AOFF_task_fs 0x000009d0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000009e8
+#define AOFF_task_files 0x000009d8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_sigmask_lock 0x000009f0
+#define AOFF_task_sigmask_lock 0x000009e0
#define ASIZ_task_sigmask_lock 0x00000001
-#define AOFF_task_sig 0x000009f8
+#define AOFF_task_sig 0x000009e8
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x00000a00
+#define AOFF_task_signal 0x000009f0
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000a08
+#define AOFF_task_blocked 0x000009f8
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000a10
+#define AOFF_task_sigqueue 0x00000a00
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000a18
+#define AOFF_task_sigqueue_tail 0x00000a08
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000a20
+#define AOFF_task_sas_ss_sp 0x00000a10
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000a28
+#define AOFF_task_sas_ss_size 0x00000a18
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000a30
+#define AOFF_task_parent_exec_id 0x00000a20
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000a34
+#define AOFF_task_self_exec_id 0x00000a24
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_alloc_lock 0x00000a38
+#define AOFF_task_alloc_lock 0x00000a28
#define ASIZ_task_alloc_lock 0x00000001
-#define ASIZ_task 0x00000a40
+#define ASIZ_task 0x00000a30
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
@@ -695,66 +695,66 @@
#define AOFF_task_it_virt_incr 0x00000170
#define ASIZ_task_it_virt_incr 0x00000008
#define AOFF_task_real_timer 0x00000178
-#define ASIZ_task_real_timer 0x00000030
-#define AOFF_task_times 0x000001a8
+#define ASIZ_task_real_timer 0x00000028
+#define AOFF_task_times 0x000001a0
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x000001c8
+#define AOFF_task_start_time 0x000001c0
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001d0
+#define AOFF_task_per_cpu_utime 0x000001c8
#define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x000003d0
+#define AOFF_task_min_flt 0x000003c8
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003d8
+#define AOFF_task_maj_flt 0x000003d0
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003e0
+#define AOFF_task_nswap 0x000003d8
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003e8
+#define AOFF_task_cmin_flt 0x000003e0
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003f0
+#define AOFF_task_cmaj_flt 0x000003e8
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003f8
+#define AOFF_task_cnswap 0x000003f0
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x00000404
+#define AOFF_task_uid 0x000003fc
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000408
+#define AOFF_task_euid 0x00000400
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x0000040c
+#define AOFF_task_suid 0x00000404
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000410
+#define AOFF_task_fsuid 0x00000408
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x00000414
+#define AOFF_task_gid 0x0000040c
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000418
+#define AOFF_task_egid 0x00000410
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x0000041c
+#define AOFF_task_sgid 0x00000414
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000420
+#define AOFF_task_fsgid 0x00000418
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x00000424
+#define AOFF_task_ngroups 0x0000041c
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000428
+#define AOFF_task_groups 0x00000420
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000004a8
+#define AOFF_task_cap_effective 0x000004a0
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000004ac
+#define AOFF_task_cap_inheritable 0x000004a4
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000004b0
+#define AOFF_task_cap_permitted 0x000004a8
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000004b8
+#define AOFF_task_user 0x000004b0
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x000004c0
+#define AOFF_task_rlim 0x000004b8
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000560
+#define AOFF_task_used_math 0x00000558
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x00000562
+#define AOFF_task_comm 0x0000055a
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x00000574
+#define AOFF_task_link_count 0x0000056c
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000578
+#define AOFF_task_tty 0x00000570
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000580
+#define AOFF_task_semundo 0x00000578
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000588
+#define AOFF_task_semsleeping 0x00000580
#define ASIZ_task_semsleeping 0x00000008
#define AOFF_task_thread 0x00000590
#define ASIZ_task_thread 0x00000450
diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h
index 512d16410..0f42cad91 100644
--- a/include/asm-sparc64/bitops.h
+++ b/include/asm-sparc64/bitops.h
@@ -1,4 +1,4 @@
-/* $Id: bitops.h,v 1.28 2000/03/27 10:38:56 davem Exp $
+/* $Id: bitops.h,v 1.29 2000/06/30 10:18:39 davem Exp $
* bitops.h: Bit string operations on the V9.
*
* Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -9,9 +9,9 @@
#include <asm/byteorder.h>
-extern long __test_and_set_bit(unsigned long nr, void *addr);
-extern long __test_and_clear_bit(unsigned long nr, void *addr);
-extern long __test_and_change_bit(unsigned long nr, void *addr);
+extern long __test_and_set_bit(unsigned long nr, volatile void *addr);
+extern long __test_and_clear_bit(unsigned long nr, volatile void *addr);
+extern long __test_and_change_bit(unsigned long nr, volatile void *addr);
#define test_and_set_bit(nr,addr) (__test_and_set_bit(nr,addr)!=0)
#define test_and_clear_bit(nr,addr) (__test_and_clear_bit(nr,addr)!=0)
@@ -165,8 +165,8 @@ found_middle:
#define find_first_zero_bit(addr, size) \
find_next_zero_bit((addr), (size), 0)
-extern long __test_and_set_le_bit(int nr, void *addr);
-extern long __test_and_clear_le_bit(int nr, void *addr);
+extern long __test_and_set_le_bit(int nr, volatile void *addr);
+extern long __test_and_clear_le_bit(int nr, volatile void *addr);
#define test_and_set_le_bit(nr,addr) (__test_and_set_le_bit(nr,addr)!=0)
#define test_and_clear_le_bit(nr,addr) (__test_and_clear_le_bit(nr,addr)!=0)
@@ -230,8 +230,9 @@ found_middle:
#define ext2_find_next_zero_bit find_next_zero_le_bit
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h
index cd8cc2124..8c7935dec 100644
--- a/include/asm-sparc64/fcntl.h
+++ b/include/asm-sparc64/fcntl.h
@@ -1,4 +1,4 @@
-/* $Id: fcntl.h,v 1.7 2000/01/04 23:54:58 davem Exp $ */
+/* $Id: fcntl.h,v 1.8 2000/07/06 01:41:45 davem Exp $ */
#ifndef _SPARC64_FCNTL_H
#define _SPARC64_FCNTL_H
diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h
index 92b419aff..090239035 100644
--- a/include/asm-sparc64/hardirq.h
+++ b/include/asm-sparc64/hardirq.h
@@ -12,11 +12,12 @@
#include <linux/spinlock.h>
#ifndef CONFIG_SMP
-extern unsigned int local_irq_count;
-#define irq_enter(cpu, irq) (local_irq_count++)
-#define irq_exit(cpu, irq) (local_irq_count--)
+extern unsigned int __local_irq_count;
+#define local_irq_count(cpu) __local_irq_count
+#define irq_enter(cpu, irq) (__local_irq_count++)
+#define irq_exit(cpu, irq) (__local_irq_count--)
#else
-#define local_irq_count (__brlock_array[smp_processor_id()][BR_GLOBALIRQ_LOCK])
+#define local_irq_count(cpu) (__brlock_array[cpu][BR_GLOBALIRQ_LOCK])
#define irq_enter(cpu, irq) br_read_lock(BR_GLOBALIRQ_LOCK)
#define irq_exit(cpu, irq) br_read_unlock(BR_GLOBALIRQ_LOCK)
#endif
@@ -25,18 +26,19 @@ extern unsigned int local_irq_count;
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing? On any cpu?
*/
-#define in_interrupt() ((local_irq_count + local_bh_count) != 0)
+#define in_interrupt() ((local_irq_count(smp_processor_id()) + \
+ local_bh_count(smp_processor_id())) != 0)
/* This tests only the local processors hw IRQ context disposition. */
-#define in_irq() (local_irq_count != 0)
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
#ifndef CONFIG_SMP
-#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count == 0)
+#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count(smp_processor_id()) == 0)
#define hardirq_endlock(cpu) do { (void)(cpu); } while(0)
-#define hardirq_enter(cpu) ((void)(cpu), local_irq_count++)
-#define hardirq_exit(cpu) ((void)(cpu), local_irq_count--)
+#define hardirq_enter(cpu) ((void)(cpu), local_irq_count(smp_processor_id())++)
+#define hardirq_exit(cpu) ((void)(cpu), local_irq_count(smp_processor_id())--)
#define synchronize_irq() barrier()
diff --git a/include/asm-sparc64/softirq.h b/include/asm-sparc64/softirq.h
index 9a4f442ff..b224a279a 100644
--- a/include/asm-sparc64/softirq.h
+++ b/include/asm-sparc64/softirq.h
@@ -12,14 +12,15 @@
#include <asm/system.h> /* for membar() */
#ifndef CONFIG_SMP
-extern unsigned int local_bh_count;
+extern unsigned int __local_bh_count;
+#define local_bh_count(cpu) __local_bh_count
#else
-#define local_bh_count (cpu_data[smp_processor_id()].bh_count)
+#define local_bh_count(cpu) (cpu_data[cpu].bh_count)
#endif
-#define local_bh_disable() (local_bh_count++)
-#define local_bh_enable() (local_bh_count--)
+#define local_bh_disable() (local_bh_count(smp_processor_id())++)
+#define local_bh_enable() (local_bh_count(smp_processor_id())--)
-#define in_softirq() (local_bh_count != 0)
+#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
#endif /* !(__SPARC64_SOFTIRQ_H) */