aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-07 03:00:16 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:11:53 -0500
commitdf7d6aec96ab98cb182dd5138a85bdc363a9bf0d (patch)
treed71808a328639a32b16c53b24ce8a6b641f43ad2
parentd257d5da39a78b32721ca84b2ba7f461f2f7ed7f (diff)
[SPARC64]: Rename gl_{1,2}insn_patch --> sun4v_{1,2}insn_patch
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/etrap.S4
-rw-r--r--arch/sparc64/kernel/ktlb.S4
-rw-r--r--arch/sparc64/kernel/rtrap.S4
-rw-r--r--arch/sparc64/kernel/setup.c16
-rw-r--r--arch/sparc64/kernel/tsb.S12
-rw-r--r--arch/sparc64/kernel/vmlinux.lds.S12
-rw-r--r--arch/sparc64/mm/ultra.S4
-rw-r--r--include/asm-sparc64/cpudata.h11
8 files changed, 35 insertions, 32 deletions
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S
index 4d644949ad49..d8c062a1700c 100644
--- a/arch/sparc64/kernel/etrap.S
+++ b/arch/sparc64/kernel/etrap.S
@@ -105,7 +105,7 @@ etrap_save: save %g2, -STACK_BIAS, %sp
105 105
106 /* Go to trap time globals so we can save them. */ 106 /* Go to trap time globals so we can save them. */
107661: wrpr %g0, ETRAP_PSTATE1, %pstate 107661: wrpr %g0, ETRAP_PSTATE1, %pstate
108 .section .gl_1insn_patch, "ax" 108 .section .sun4v_1insn_patch, "ax"
109 .word 661b 109 .word 661b
110 SET_GL(0) 110 SET_GL(0)
111 .previous 111 .previous
@@ -206,7 +206,7 @@ etraptl1: /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself.
206 206
207 wrpr %g0, 1, %tl 207 wrpr %g0, 1, %tl
208661: nop 208661: nop
209 .section .gl_1insn_patch, "ax" 209 .section .sun4v_1insn_patch, "ax"
210 .word 661b 210 .word 661b
211 SET_GL(1) 211 SET_GL(1)
212 .previous 212 .previous
diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S
index 2e55084a0c12..f6bb2e08964a 100644
--- a/arch/sparc64/kernel/ktlb.S
+++ b/arch/sparc64/kernel/ktlb.S
@@ -67,7 +67,7 @@ kvmap_itlb_longpath:
67 67
68661: rdpr %pstate, %g5 68661: rdpr %pstate, %g5
69 wrpr %g5, PSTATE_AG | PSTATE_MG, %pstate 69 wrpr %g5, PSTATE_AG | PSTATE_MG, %pstate
70 .section .gl_2insn_patch, "ax" 70 .section .sun4v_2insn_patch, "ax"
71 .word 661b 71 .word 661b
72 nop 72 nop
73 nop 73 nop
@@ -179,7 +179,7 @@ kvmap_dtlb_longpath:
179 179
180661: rdpr %pstate, %g5 180661: rdpr %pstate, %g5
181 wrpr %g5, PSTATE_AG | PSTATE_MG, %pstate 181 wrpr %g5, PSTATE_AG | PSTATE_MG, %pstate
182 .section .gl_2insn_patch, "ax" 182 .section .sun4v_2insn_patch, "ax"
183 .word 661b 183 .word 661b
184 nop 184 nop
185 nop 185 nop
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S
index a2fa277da62b..a55d517e76aa 100644
--- a/arch/sparc64/kernel/rtrap.S
+++ b/arch/sparc64/kernel/rtrap.S
@@ -234,7 +234,7 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1
234 234
235 /* Normal globals are restored, go to trap globals. */ 235 /* Normal globals are restored, go to trap globals. */
236661: wrpr %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate 236661: wrpr %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate
237 .section .gl_1insn_patch, "ax" 237 .section .sun4v_1insn_patch, "ax"
238 .word 661b 238 .word 661b
239 SET_GL(1) 239 SET_GL(1)
240 .previous 240 .previous
@@ -316,7 +316,7 @@ user_rtt_fill_fixup:
316 wrpr %g0, RTRAP_PSTATE, %pstate 316 wrpr %g0, RTRAP_PSTATE, %pstate
317 317
318661: nop 318661: nop
319 .section .gl_1insn_patch, "ax" 319 .section .sun4v_1insn_patch, "ax"
320 .word 661b 320 .word 661b
321 SET_GL(0) 321 SET_GL(0)
322 .previous 322 .previous
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index 40acac5b8337..6d6178efd587 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -549,16 +549,16 @@ static void __init per_cpu_patch(void)
549#endif 549#endif
550} 550}
551 551
552static void __init gl_patch(void) 552static void __init sun4v_patch(void)
553{ 553{
554 struct gl_1insn_patch_entry *p1; 554 struct sun4v_1insn_patch_entry *p1;
555 struct gl_2insn_patch_entry *p2; 555 struct sun4v_2insn_patch_entry *p2;
556 556
557 if (tlb_type != hypervisor) 557 if (tlb_type != hypervisor)
558 return; 558 return;
559 559
560 p1 = &__gl_1insn_patch; 560 p1 = &__sun4v_1insn_patch;
561 while (p1 < &__gl_1insn_patch_end) { 561 while (p1 < &__sun4v_1insn_patch_end) {
562 unsigned long addr = p1->addr; 562 unsigned long addr = p1->addr;
563 563
564 *(unsigned int *) (addr + 0) = p1->insn; 564 *(unsigned int *) (addr + 0) = p1->insn;
@@ -568,8 +568,8 @@ static void __init gl_patch(void)
568 p1++; 568 p1++;
569 } 569 }
570 570
571 p2 = &__gl_2insn_patch; 571 p2 = &__sun4v_2insn_patch;
572 while (p2 < &__gl_2insn_patch_end) { 572 while (p2 < &__sun4v_2insn_patch_end) {
573 unsigned long addr = p2->addr; 573 unsigned long addr = p2->addr;
574 574
575 *(unsigned int *) (addr + 0) = p2->insns[0]; 575 *(unsigned int *) (addr + 0) = p2->insns[0];
@@ -606,7 +606,7 @@ void __init setup_arch(char **cmdline_p)
606 */ 606 */
607 per_cpu_patch(); 607 per_cpu_patch();
608 608
609 gl_patch(); 609 sun4v_patch();
610 610
611 boot_flags_init(*cmdline_p); 611 boot_flags_init(*cmdline_p);
612 612
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index 818bc9e9135a..819a6ef9799f 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -74,7 +74,7 @@ tsb_dtlb_load:
74 74
75661: stxa %g5, [%g0] ASI_DTLB_DATA_IN 75661: stxa %g5, [%g0] ASI_DTLB_DATA_IN
76 retry 76 retry
77 .section .gl_2insn_patch, "ax" 77 .section .sun4v_2insn_patch, "ax"
78 .word 661b 78 .word 661b
79 nop 79 nop
80 nop 80 nop
@@ -99,7 +99,7 @@ tsb_itlb_load:
99 99
100661: stxa %g5, [%g0] ASI_ITLB_DATA_IN 100661: stxa %g5, [%g0] ASI_ITLB_DATA_IN
101 retry 101 retry
102 .section .gl_2insn_patch, "ax" 102 .section .sun4v_2insn_patch, "ax"
103 .word 661b 103 .word 661b
104 nop 104 nop
105 nop 105 nop
@@ -130,7 +130,7 @@ tsb_do_fault:
130 130
131661: rdpr %pstate, %g5 131661: rdpr %pstate, %g5
132 wrpr %g5, PSTATE_AG | PSTATE_MG, %pstate 132 wrpr %g5, PSTATE_AG | PSTATE_MG, %pstate
133 .section .gl_2insn_patch, "ax" 133 .section .sun4v_2insn_patch, "ax"
134 .word 661b 134 .word 661b
135 nop 135 nop
136 nop 136 nop
@@ -145,7 +145,7 @@ tsb_do_dtlb_fault:
145 145
146661: mov TLB_TAG_ACCESS, %g4 146661: mov TLB_TAG_ACCESS, %g4
147 ldxa [%g4] ASI_DMMU, %g5 147 ldxa [%g4] ASI_DMMU, %g5
148 .section .gl_2insn_patch, "ax" 148 .section .sun4v_2insn_patch, "ax"
149 .word 661b 149 .word 661b
150 mov %g4, %g5 150 mov %g4, %g5
151 nop 151 nop
@@ -250,7 +250,7 @@ __tsb_context_switch:
250 250
251661: mov TSB_REG, %g1 251661: mov TSB_REG, %g1
252 stxa %o1, [%g1] ASI_DMMU 252 stxa %o1, [%g1] ASI_DMMU
253 .section .gl_2insn_patch, "ax" 253 .section .sun4v_2insn_patch, "ax"
254 .word 661b 254 .word 661b
255 mov SCRATCHPAD_UTSBREG1, %g1 255 mov SCRATCHPAD_UTSBREG1, %g1
256 stxa %o1, [%g1] ASI_SCRATCHPAD 256 stxa %o1, [%g1] ASI_SCRATCHPAD
@@ -260,7 +260,7 @@ __tsb_context_switch:
260 260
261661: stxa %o1, [%g1] ASI_IMMU 261661: stxa %o1, [%g1] ASI_IMMU
262 membar #Sync 262 membar #Sync
263 .section .gl_2insn_patch, "ax" 263 .section .sun4v_2insn_patch, "ax"
264 .word 661b 264 .word 661b
265 nop 265 nop
266 nop 266 nop
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S
index a09a8a2383dd..b097379a49a8 100644
--- a/arch/sparc64/kernel/vmlinux.lds.S
+++ b/arch/sparc64/kernel/vmlinux.lds.S
@@ -80,12 +80,12 @@ SECTIONS
80 __cpuid_patch = .; 80 __cpuid_patch = .;
81 .cpuid_patch : { *(.cpuid_patch) } 81 .cpuid_patch : { *(.cpuid_patch) }
82 __cpuid_patch_end = .; 82 __cpuid_patch_end = .;
83 __gl_1insn_patch = .; 83 __sun4v_1insn_patch = .;
84 .gl_1insn_patch : { *(.gl_1insn_patch) } 84 .sun4v_1insn_patch : { *(.sun4v_1insn_patch) }
85 __gl_1insn_patch_end = .; 85 __sun4v_1insn_patch_end = .;
86 __gl_2insn_patch = .; 86 __sun4v_2insn_patch = .;
87 .gl_2insn_patch : { *(.gl_2insn_patch) } 87 .sun4v_2insn_patch : { *(.sun4v_2insn_patch) }
88 __gl_2insn_patch_end = .; 88 __sun4v_2insn_patch_end = .;
89 . = ALIGN(8192); 89 . = ALIGN(8192);
90 __initramfs_start = .; 90 __initramfs_start = .;
91 .init.ramfs : { *(.init.ramfs) } 91 .init.ramfs : { *(.init.ramfs) }
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S
index 5dd86ad0d29f..8c244932b1c2 100644
--- a/arch/sparc64/mm/ultra.S
+++ b/arch/sparc64/mm/ultra.S
@@ -447,7 +447,7 @@ xcall_sync_tick:
447 447
448661: rdpr %pstate, %g2 448661: rdpr %pstate, %g2
449 wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate 449 wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate
450 .section .gl_2insn_patch, "ax" 450 .section .sun4v_2insn_patch, "ax"
451 .word 661b 451 .word 661b
452 nop 452 nop
453 nop 453 nop
@@ -478,7 +478,7 @@ xcall_report_regs:
478 478
479661: rdpr %pstate, %g2 479661: rdpr %pstate, %g2
480 wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate 480 wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate
481 .section .gl_2insn_patch, "ax" 481 .section .sun4v_2insn_patch, "ax"
482 .word 661b 482 .word 661b
483 nop 483 nop
484 nop 484 nop
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h
index a3dc4afc4b21..26b1dc9afbf1 100644
--- a/include/asm-sparc64/cpudata.h
+++ b/include/asm-sparc64/cpudata.h
@@ -78,17 +78,20 @@ struct cpuid_patch_entry {
78extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end; 78extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
79#endif 79#endif
80 80
81struct gl_1insn_patch_entry { 81struct sun4v_1insn_patch_entry {
82 unsigned int addr; 82 unsigned int addr;
83 unsigned int insn; 83 unsigned int insn;
84}; 84};
85extern struct gl_1insn_patch_entry __gl_1insn_patch, __gl_1insn_patch_end; 85extern struct sun4v_1insn_patch_entry __sun4v_1insn_patch,
86 __sun4v_1insn_patch_end;
86 87
87struct gl_2insn_patch_entry { 88struct sun4v_2insn_patch_entry {
88 unsigned int addr; 89 unsigned int addr;
89 unsigned int insns[2]; 90 unsigned int insns[2];
90}; 91};
91extern struct gl_2insn_patch_entry __gl_2insn_patch, __gl_2insn_patch_end; 92extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch,
93 __sun4v_2insn_patch_end;
94
92#endif /* !(__ASSEMBLY__) */ 95#endif /* !(__ASSEMBLY__) */
93 96
94#define TRAP_PER_CPU_THREAD 0x00 97#define TRAP_PER_CPU_THREAD 0x00