aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc64/kernel/setup.c3
-rw-r--r--include/asm-sparc64/cpudata.h8
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index f751d11926bc..2918ed3eb1ba 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -520,6 +520,9 @@ static void __init per_cpu_patch(void)
520 else 520 else
521 insns = &p->cheetah_safari[0]; 521 insns = &p->cheetah_safari[0];
522 break; 522 break;
523 case hypervisor:
524 insns = &p->sun4v[0];
525 break;
523 default: 526 default:
524 prom_printf("Unknown cpu type, halting.\n"); 527 prom_printf("Unknown cpu type, halting.\n");
525 prom_halt(); 528 prom_halt();
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 {
68 unsigned int cheetah_safari[4]; 68 unsigned int cheetah_safari[4];
69 unsigned int cheetah_jbus[4]; 69 unsigned int cheetah_jbus[4];
70 unsigned int starfire[4]; 70 unsigned int starfire[4];
71 unsigned int sun4v[4];
71}; 72};
72extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end; 73extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
73#endif 74#endif
@@ -79,6 +80,8 @@ extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
79 80
80#define TRAP_BLOCK_SZ_SHIFT 6 81#define TRAP_BLOCK_SZ_SHIFT 6
81 82
83#include <asm/scratchpad.h>
84
82#ifdef CONFIG_SMP 85#ifdef CONFIG_SMP
83 86
84#define __GET_CPUID(REG) \ 87#define __GET_CPUID(REG) \
@@ -105,6 +108,11 @@ extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
105 sllx REG, 9, REG; \ 108 sllx REG, 9, REG; \
106 or REG, 0xd0, REG; \ 109 or REG, 0xd0, REG; \
107 lduwa [REG] ASI_PHYS_BYPASS_EC_E, REG;\ 110 lduwa [REG] ASI_PHYS_BYPASS_EC_E, REG;\
111 /* sun4v implementation. */ \
112 mov SCRATCHPAD_CPUID, REG; \
113 nop; \
114 ldxa [REG] ASI_SCRATCHPAD, REG; \
115 nop; \
108 .previous; 116 .previous;
109 117
110/* Clobbers TMP, current address space PGD phys address into DEST. */ 118/* Clobbers TMP, current address space PGD phys address into DEST. */