patch-2.1.37 linux/include/asm-sparc/asmmacro.h
Next file: linux/include/asm-sparc/auxio.h
Previous file: linux/include/asm-sparc/asm_offsets.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Mon May 12 10:35:43 1997
- Orig file:
v2.1.36/linux/include/asm-sparc/asmmacro.h
- Orig date:
Sun Jan 26 02:07:47 1997
diff -u --recursive --new-file v2.1.36/linux/include/asm-sparc/asmmacro.h linux/include/asm-sparc/asmmacro.h
@@ -6,22 +6,22 @@
#ifndef _SPARC_ASMMACRO_H
#define _SPARC_ASMMACRO_H
-/* #define SMP_DEBUG */
-
#define GET_PROCESSOR_ID(reg) \
rd %tbr, %reg; \
srl %reg, 12, %reg; \
and %reg, 3, %reg;
#define GET_PROCESSOR_MID(reg, tmp) \
- GET_PROCESSOR_ID(reg) \
- set C_LABEL(mid_xlate), %tmp; \
+ rd %tbr, %reg; \
+ sethi C_LABEL(mid_xlate), %tmp; \
+ srl %reg, 12, %reg; \
+ or %tmp, %lo(C_LABEL(mid_xlate)), %tmp; \
+ and %reg, 3, %reg; \
ldub [%tmp + %reg], %reg;
#define GET_PROCESSOR_OFFSET(reg) \
- rd %tbr, %reg; \
- srl %reg, 10, %reg; \
- and %reg, 0xc, %reg;
+ GET_PROCESSOR_ID(reg) \
+ sll %reg, 2, %reg;
#define PROCESSOR_OFFSET_TO_ID(reg) \
srl %reg, 2, %reg;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov