[SPARC64]: Add sun4v case to __GET_CPUID() patch tables.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e1c21c4f47
commit
d96b81533b
@ -520,6 +520,9 @@ static void __init per_cpu_patch(void)
|
|||||||
else
|
else
|
||||||
insns = &p->cheetah_safari[0];
|
insns = &p->cheetah_safari[0];
|
||||||
break;
|
break;
|
||||||
|
case hypervisor:
|
||||||
|
insns = &p->sun4v[0];
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
prom_printf("Unknown cpu type, halting.\n");
|
prom_printf("Unknown cpu type, halting.\n");
|
||||||
prom_halt();
|
prom_halt();
|
||||||
|
@ -68,6 +68,7 @@ struct cpuid_patch_entry {
|
|||||||
unsigned int cheetah_safari[4];
|
unsigned int cheetah_safari[4];
|
||||||
unsigned int cheetah_jbus[4];
|
unsigned int cheetah_jbus[4];
|
||||||
unsigned int starfire[4];
|
unsigned int starfire[4];
|
||||||
|
unsigned int sun4v[4];
|
||||||
};
|
};
|
||||||
extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
|
extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
|
||||||
#endif
|
#endif
|
||||||
@ -79,6 +80,8 @@ extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
|
|||||||
|
|
||||||
#define TRAP_BLOCK_SZ_SHIFT 6
|
#define TRAP_BLOCK_SZ_SHIFT 6
|
||||||
|
|
||||||
|
#include <asm/scratchpad.h>
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
|
||||||
#define __GET_CPUID(REG) \
|
#define __GET_CPUID(REG) \
|
||||||
@ -105,6 +108,11 @@ extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
|
|||||||
sllx REG, 9, REG; \
|
sllx REG, 9, REG; \
|
||||||
or REG, 0xd0, REG; \
|
or REG, 0xd0, REG; \
|
||||||
lduwa [REG] ASI_PHYS_BYPASS_EC_E, REG;\
|
lduwa [REG] ASI_PHYS_BYPASS_EC_E, REG;\
|
||||||
|
/* sun4v implementation. */ \
|
||||||
|
mov SCRATCHPAD_CPUID, REG; \
|
||||||
|
nop; \
|
||||||
|
ldxa [REG] ASI_SCRATCHPAD, REG; \
|
||||||
|
nop; \
|
||||||
.previous;
|
.previous;
|
||||||
|
|
||||||
/* Clobbers TMP, current address space PGD phys address into DEST. */
|
/* Clobbers TMP, current address space PGD phys address into DEST. */
|
||||||
|
Loading…
Reference in New Issue
Block a user