summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/asmmacro.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-01 03:16:17 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-01 03:16:17 +0000
commitd8d9b8f76f22b7a16a83e261e64f89ee611f49df (patch)
tree3067bc130b80d52808e6390c9fc7fc087ec1e33c /include/asm-sparc/asmmacro.h
parent19c9bba94152148523ba0f7ef7cffe3d45656b11 (diff)
Initial revision
Diffstat (limited to 'include/asm-sparc/asmmacro.h')
-rw-r--r--include/asm-sparc/asmmacro.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-sparc/asmmacro.h b/include/asm-sparc/asmmacro.h
index 25211c93f..40c71b0d6 100644
--- a/include/asm-sparc/asmmacro.h
+++ b/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;