summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/cpudata.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-04 15:40:53 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:11:45 -0800
commitd96b81533ba3d5775e45aee6986b2aa33c10801c (patch)
tree334af39452d650cc14b389c58a30cc54e9e130dd /include/asm-sparc64/cpudata.h
parente1c21c4f476f2270c98aad1fe55e5f33e25f77f5 (diff)
downloadlinux-d96b81533ba3d5775e45aee6986b2aa33c10801c.tar.gz
linux-d96b81533ba3d5775e45aee6986b2aa33c10801c.tar.bz2
linux-d96b81533ba3d5775e45aee6986b2aa33c10801c.zip
[SPARC64]: Add sun4v case to __GET_CPUID() patch tables.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/cpudata.h')
-rw-r--r--include/asm-sparc64/cpudata.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h
index c15514f82c33..4f28a85c1043 100644
--- a/include/asm-sparc64/cpudata.h
+++ b/include/asm-sparc64/cpudata.h
@@ -68,6 +68,7 @@ struct cpuid_patch_entry {
unsigned int cheetah_safari[4];
unsigned int cheetah_jbus[4];
unsigned int starfire[4];
+ unsigned int sun4v[4];
};
extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
#endif
@@ -79,6 +80,8 @@ extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
#define TRAP_BLOCK_SZ_SHIFT 6
+#include <asm/scratchpad.h>
+
#ifdef CONFIG_SMP
#define __GET_CPUID(REG) \
@@ -105,6 +108,11 @@ extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
sllx REG, 9, REG; \
or REG, 0xd0, REG; \
lduwa [REG] ASI_PHYS_BYPASS_EC_E, REG;\
+ /* sun4v implementation. */ \
+ mov SCRATCHPAD_CPUID, REG; \
+ nop; \
+ ldxa [REG] ASI_SCRATCHPAD, REG; \
+ nop; \
.previous;
/* Clobbers TMP, current address space PGD phys address into DEST. */