aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/asmmacro.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sparc/asmmacro.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-sparc/asmmacro.h')
-rw-r--r--include/asm-sparc/asmmacro.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/asm-sparc/asmmacro.h b/include/asm-sparc/asmmacro.h
new file mode 100644
index 000000000000..0d4b65bd252b
--- /dev/null
+++ b/include/asm-sparc/asmmacro.h
@@ -0,0 +1,46 @@
1/* asmmacro.h: Assembler macros.
2 *
3 * Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
4 */
5
6#ifndef _SPARC_ASMMACRO_H
7#define _SPARC_ASMMACRO_H
8
9#include <linux/config.h>
10#include <asm/btfixup.h>
11#include <asm/asi.h>
12
13#define GET_PROCESSOR4M_ID(reg) \
14 rd %tbr, %reg; \
15 srl %reg, 12, %reg; \
16 and %reg, 3, %reg;
17
18#define GET_PROCESSOR4D_ID(reg) \
19 lda [%g0] ASI_M_VIKING_TMP1, %reg;
20
21/* All trap entry points _must_ begin with this macro or else you
22 * lose. It makes sure the kernel has a proper window so that
23 * c-code can be called.
24 */
25#define SAVE_ALL_HEAD \
26 sethi %hi(trap_setup), %l4; \
27 jmpl %l4 + %lo(trap_setup), %l6;
28#define SAVE_ALL \
29 SAVE_ALL_HEAD \
30 nop;
31
32/* All traps low-level code here must end with this macro. */
33#define RESTORE_ALL b ret_trap_entry; clr %l6;
34
35/* sun4 probably wants half word accesses to ASI_SEGMAP, while sun4c+
36 likes byte accesses. These are to avoid ifdef mania. */
37
38#ifdef CONFIG_SUN4
39#define lduXa lduha
40#define stXa stha
41#else
42#define lduXa lduba
43#define stXa stba
44#endif
45
46#endif /* !(_SPARC_ASMMACRO_H) */