Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21374
b: refs/heads/master
c: d96b815
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Mar 20, 2006
1 parent d864e64 commit 9911eee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1c21c4f476f2270c98aad1fe55e5f33e25f77f5
refs/heads/master: d96b81533ba3d5775e45aee6986b2aa33c10801c
3 changes: 3 additions & 0 deletions trunk/arch/sparc64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@ static void __init per_cpu_patch(void)
else
insns = &p->cheetah_safari[0];
break;
case hypervisor:
insns = &p->sun4v[0];
break;
default:
prom_printf("Unknown cpu type, halting.\n");
prom_halt();
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/asm-sparc64/cpudata.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) \
Expand All @@ -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. */
Expand Down

0 comments on commit 9911eee

Please sign in to comment.