aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/head.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-sparc64/head.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-sparc64/head.h')
-rw-r--r--include/asm-sparc64/head.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/include/asm-sparc64/head.h b/include/asm-sparc64/head.h
new file mode 100644
index 000000000000..b63a33cf4971
--- /dev/null
+++ b/include/asm-sparc64/head.h
@@ -0,0 +1,59 @@
1/* $Id: head.h,v 1.30 1997/08/08 08:34:33 jj Exp $ */
2#ifndef _SPARC64_HEAD_H
3#define _SPARC64_HEAD_H
4
5#include <asm/pstate.h>
6
7#define KERNBASE 0x400000
8
9#define PTREGS_OFF (STACK_BIAS + STACKFRAME_SZ)
10
11#define __CHEETAH_ID 0x003e0014
12#define __JALAPENO_ID 0x003e0016
13
14#define CHEETAH_MANUF 0x003e
15#define CHEETAH_IMPL 0x0014
16#define CHEETAH_PLUS_IMPL 0x0015
17#define JALAPENO_IMPL 0x0016
18
19#define BRANCH_IF_CHEETAH_BASE(tmp1,tmp2,label) \
20 rdpr %ver, %tmp1; \
21 sethi %hi(__CHEETAH_ID), %tmp2; \
22 srlx %tmp1, 32, %tmp1; \
23 or %tmp2, %lo(__CHEETAH_ID), %tmp2;\
24 cmp %tmp1, %tmp2; \
25 be,pn %icc, label; \
26 nop;
27
28#define BRANCH_IF_JALAPENO(tmp1,tmp2,label) \
29 rdpr %ver, %tmp1; \
30 sethi %hi(__JALAPENO_ID), %tmp2; \
31 srlx %tmp1, 32, %tmp1; \
32 or %tmp2, %lo(__JALAPENO_ID), %tmp2;\
33 cmp %tmp1, %tmp2; \
34 be,pn %icc, label; \
35 nop;
36
37#define BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(tmp1,tmp2,label) \
38 rdpr %ver, %tmp1; \
39 srlx %tmp1, (32 + 16), %tmp2; \
40 cmp %tmp2, CHEETAH_MANUF; \
41 bne,pt %xcc, 99f; \
42 sllx %tmp1, 16, %tmp1; \
43 srlx %tmp1, (32 + 16), %tmp2; \
44 cmp %tmp2, CHEETAH_PLUS_IMPL; \
45 bgeu,pt %xcc, label; \
4699: nop;
47
48#define BRANCH_IF_ANY_CHEETAH(tmp1,tmp2,label) \
49 rdpr %ver, %tmp1; \
50 srlx %tmp1, (32 + 16), %tmp2; \
51 cmp %tmp2, CHEETAH_MANUF; \
52 bne,pt %xcc, 99f; \
53 sllx %tmp1, 16, %tmp1; \
54 srlx %tmp1, (32 + 16), %tmp2; \
55 cmp %tmp2, CHEETAH_IMPL; \
56 bgeu,pt %xcc, label; \
5799: nop;
58
59#endif /* !(_SPARC64_HEAD_H) */