Skip to content

Commit d2a5cd8

Browse files
chleroympe
authored andcommitted
powerpc: Drop SYNC_601() ISYNC_601() and SYNC()
Those macros are now empty at all time. Drop them. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/7990bb63fc53e460bfa94f8040184881d9e6fbc3.1601362098.git.christophe.leroy@csgroup.eu
1 parent e42a640 commit d2a5cd8

7 files changed

Lines changed: 2 additions & 45 deletions

File tree

‎arch/powerpc/include/asm/ppc_asm.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,6 @@ GLUE(.,name):
382382
#endif
383383

384384
/* various errata or part fixups */
385-
#define SYNC
386-
#define SYNC_601
387-
#define ISYNC_601
388-
389385
#if defined(CONFIG_PPC_CELL) || defined(CONFIG_PPC_FSL_BOOK3E)
390386
#define MFTB(dest) \
391387
90: mfspr dest, SPRN_TBRL; \

‎arch/powerpc/kernel/entry_32.S‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ transfer_to_handler_cont:
234234
mtspr SPRN_SRR0,r11
235235
mtspr SPRN_SRR1,r10
236236
mtlr r9
237-
SYNC
238237
RFI /* jump to handler, enable MMU */
239238

240239
#if defined (CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)
@@ -264,7 +263,6 @@ _ASM_NOKPROBE_SYMBOL(transfer_to_handler_cont)
264263
LOAD_REG_IMMEDIATE(r0, MSR_KERNEL)
265264
mtspr SPRN_SRR0,r12
266265
mtspr SPRN_SRR1,r0
267-
SYNC
268266
RFI
269267

270268
reenable_mmu:
@@ -323,7 +321,6 @@ stack_ovf:
323321
#endif
324322
mtspr SPRN_SRR0,r9
325323
mtspr SPRN_SRR1,r10
326-
SYNC
327324
RFI
328325
_ASM_NOKPROBE_SYMBOL(stack_ovf)
329326
#endif
@@ -411,7 +408,6 @@ ret_from_syscall:
411408
/* disable interrupts so current_thread_info()->flags can't change */
412409
LOAD_REG_IMMEDIATE(r10,MSR_KERNEL) /* doesn't include MSR_EE */
413410
/* Note: We don't bother telling lockdep about it */
414-
SYNC
415411
mtmsr r10
416412
lwz r9,TI_FLAGS(r2)
417413
li r8,-MAX_ERRNO
@@ -474,7 +470,6 @@ syscall_exit_finish:
474470
#endif
475471
mtspr SPRN_SRR0,r7
476472
mtspr SPRN_SRR1,r8
477-
SYNC
478473
RFI
479474
_ASM_NOKPROBE_SYMBOL(syscall_exit_finish)
480475
#ifdef CONFIG_44x
@@ -567,7 +562,6 @@ syscall_exit_work:
567562
* lockdep as we are supposed to have IRQs on at this point
568563
*/
569564
ori r10,r10,MSR_EE
570-
SYNC
571565
mtmsr r10
572566

573567
/* Save NVGPRS if they're not saved already */
@@ -606,7 +600,6 @@ ret_from_kernel_syscall:
606600
#endif
607601
mtspr SPRN_SRR0, r9
608602
mtspr SPRN_SRR1, r10
609-
SYNC
610603
RFI
611604
_ASM_NOKPROBE_SYMBOL(ret_from_kernel_syscall)
612605

@@ -810,7 +803,6 @@ fast_exception_return:
810803
REST_GPR(9, r11)
811804
REST_GPR(12, r11)
812805
lwz r11,GPR11(r11)
813-
SYNC
814806
RFI
815807
_ASM_NOKPROBE_SYMBOL(fast_exception_return)
816808

@@ -872,7 +864,6 @@ ret_from_except:
872864
* from the interrupt. */
873865
/* Note: We don't bother telling lockdep about it */
874866
LOAD_REG_IMMEDIATE(r10,MSR_KERNEL)
875-
SYNC /* Some chip revs have problems here... */
876867
mtmsr r10 /* disable interrupts */
877868

878869
lwz r3,_MSR(r1) /* Returning to user mode? */
@@ -1035,7 +1026,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
10351026
* exc_exit_restart below. -- paulus
10361027
*/
10371028
LOAD_REG_IMMEDIATE(r10,MSR_KERNEL & ~MSR_RI)
1038-
SYNC
10391029
mtmsr r10 /* clear the RI bit */
10401030
.globl exc_exit_restart
10411031
exc_exit_restart:
@@ -1046,7 +1036,6 @@ exc_exit_restart:
10461036
lwz r1,GPR1(r1)
10471037
.globl exc_exit_restart_end
10481038
exc_exit_restart_end:
1049-
SYNC
10501039
RFI
10511040
_ASM_NOKPROBE_SYMBOL(exc_exit_restart)
10521041
_ASM_NOKPROBE_SYMBOL(exc_exit_restart_end)
@@ -1274,7 +1263,6 @@ do_resched: /* r10 contains MSR_KERNEL here */
12741263
mfmsr r10
12751264
#endif
12761265
ori r10,r10,MSR_EE
1277-
SYNC
12781266
mtmsr r10 /* hard-enable interrupts */
12791267
bl schedule
12801268
recheck:
@@ -1283,7 +1271,6 @@ recheck:
12831271
* TI_FLAGS aren't advertised.
12841272
*/
12851273
LOAD_REG_IMMEDIATE(r10,MSR_KERNEL)
1286-
SYNC
12871274
mtmsr r10 /* disable interrupts */
12881275
lwz r9,TI_FLAGS(r2)
12891276
andi. r0,r9,_TIF_NEED_RESCHED
@@ -1292,7 +1279,6 @@ recheck:
12921279
beq restore_user
12931280
do_user_signal: /* r10 contains MSR_KERNEL here */
12941281
ori r10,r10,MSR_EE
1295-
SYNC
12961282
mtmsr r10 /* hard-enable interrupts */
12971283
/* save r13-r31 in the exception frame, if not already done */
12981284
lwz r3,_TRAP(r1)
@@ -1382,8 +1368,7 @@ _GLOBAL(enter_rtas)
13821368
mfmsr r9
13831369
stw r9,8(r1)
13841370
LOAD_REG_IMMEDIATE(r0,MSR_KERNEL)
1385-
SYNC /* disable interrupts so SRR0/1 */
1386-
mtmsr r0 /* don't get trashed */
1371+
mtmsr r0 /* disable interrupts so SRR0/1 don't get trashed */
13871372
li r9,MSR_KERNEL & ~(MSR_IR|MSR_DR)
13881373
mtlr r6
13891374
stw r7, THREAD + RTAS_SP(r2)

‎arch/powerpc/kernel/fpu.S‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ BEGIN_FTR_SECTION
8787
oris r5,r5,MSR_VSX@h
8888
END_FTR_SECTION_IFSET(CPU_FTR_VSX)
8989
#endif
90-
SYNC
9190
MTMSRD(r5) /* enable use of fpu now */
9291
isync
9392
/* enable use of FP after return */

‎arch/powerpc/kernel/head_32.S‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ turn_on_mmu:
219219
lis r0,start_here@h
220220
ori r0,r0,start_here@l
221221
mtspr SPRN_SRR0,r0
222-
SYNC
223222
RFI /* enables MMU */
224223

225224
/*
@@ -784,14 +783,12 @@ fast_hash_page_return:
784783
mtcr r11
785784
lwz r11, THR11(r10)
786785
mfspr r10, SPRN_SPRG_SCRATCH0
787-
SYNC
788786
RFI
789787

790788
1: /* ISI */
791789
mtcr r11
792790
mfspr r11, SPRN_SPRG_SCRATCH1
793791
mfspr r10, SPRN_SPRG_SCRATCH0
794-
SYNC
795792
RFI
796793

797794
stack_overflow:
@@ -882,7 +879,6 @@ __secondary_start_pmac_0:
882879
set to map the 0xf0000000 - 0xffffffff region */
883880
mfmsr r0
884881
rlwinm r0,r0,0,28,26 /* clear DR (0x10) */
885-
SYNC
886882
mtmsr r0
887883
isync
888884

@@ -930,7 +926,6 @@ __secondary_start:
930926
ori r3,r3,start_secondary@l
931927
mtspr SPRN_SRR0,r3
932928
mtspr SPRN_SRR1,r4
933-
SYNC
934929
RFI
935930
#endif /* CONFIG_SMP */
936931

@@ -1074,7 +1069,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_HPTE_TABLE)
10741069
.align 4
10751070
mtspr SPRN_SRR0,r4
10761071
mtspr SPRN_SRR1,r3
1077-
SYNC
10781072
RFI
10791073
/* Load up the kernel context */
10801074
2: bl load_up_mmu
@@ -1099,7 +1093,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_HPTE_TABLE)
10991093
ori r3,r3,start_kernel@l
11001094
mtspr SPRN_SRR0,r3
11011095
mtspr SPRN_SRR1,r4
1102-
SYNC
11031096
RFI
11041097

11051098
/*
@@ -1217,7 +1210,6 @@ _ENTRY(update_bats)
12171210
.align 4
12181211
mtspr SPRN_SRR0, r4
12191212
mtspr SPRN_SRR1, r3
1220-
SYNC
12211213
RFI
12221214
1: bl clear_bats
12231215
lis r3, BATS@ha
@@ -1237,7 +1229,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS)
12371229
mtmsr r3
12381230
mtspr SPRN_SRR0, r7
12391231
mtspr SPRN_SRR1, r6
1240-
SYNC
12411232
RFI
12421233

12431234
flush_tlbs:

‎arch/powerpc/kernel/head_32.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@
222222
#endif
223223
mtspr SPRN_SRR1,r10
224224
mtspr SPRN_SRR0,r11
225-
SYNC
226225
RFI /* jump to handler, enable MMU */
227226
99: b ret_from_kernel_syscall
228227
.endm

‎arch/powerpc/kernel/l2cr_6xx.S‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450)
256256
sync
257257

258258
/* Restore MSR (restores EE and DR bits to original state) */
259-
SYNC
260259
mtmsr r7
261260
isync
262261

@@ -377,7 +376,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L3CR)
377376
1: bdnz 1b
378377

379378
/* Restore MSR (restores EE and DR bits to original state) */
380-
4: SYNC
379+
4:
381380
mtmsr r7
382381
isync
383382
blr

‎arch/powerpc/mm/book3s32/hash_low.S‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,9 @@ _GLOBAL(add_hash_page)
199199
* covered by a BAT). -- paulus
200200
*/
201201
mfmsr r9
202-
SYNC
203202
rlwinm r0,r9,0,17,15 /* clear bit 16 (MSR_EE) */
204203
rlwinm r0,r0,0,28,26 /* clear MSR_DR */
205204
mtmsr r0
206-
SYNC_601
207205
isync
208206

209207
#ifdef CONFIG_SMP
@@ -262,7 +260,6 @@ _GLOBAL(add_hash_page)
262260

263261
/* reenable interrupts and DR */
264262
mtmsr r9
265-
SYNC_601
266263
isync
267264

268265
lwz r0,4(r1)
@@ -506,11 +503,9 @@ _GLOBAL(flush_hash_pages)
506503
* covered by a BAT). -- paulus
507504
*/
508505
mfmsr r10
509-
SYNC
510506
rlwinm r0,r10,0,17,15 /* clear bit 16 (MSR_EE) */
511507
rlwinm r0,r0,0,28,26 /* clear MSR_DR */
512508
mtmsr r0
513-
SYNC_601
514509
isync
515510

516511
/* First find a PTE in the range that has _PAGE_HASHPTE set */
@@ -629,7 +624,6 @@ _GLOBAL(flush_hash_pages)
629624
#endif
630625

631626
19: mtmsr r10
632-
SYNC_601
633627
isync
634628
blr
635629
EXPORT_SYMBOL(flush_hash_pages)
@@ -643,11 +637,9 @@ _GLOBAL(_tlbie)
643637
lwz r8,TASK_CPU(r2)
644638
oris r8,r8,11
645639
mfmsr r10
646-
SYNC
647640
rlwinm r0,r10,0,17,15 /* clear bit 16 (MSR_EE) */
648641
rlwinm r0,r0,0,28,26 /* clear DR */
649642
mtmsr r0
650-
SYNC_601
651643
isync
652644
lis r9,mmu_hash_lock@h
653645
ori r9,r9,mmu_hash_lock@l
@@ -664,7 +656,6 @@ _GLOBAL(_tlbie)
664656
li r0,0
665657
stw r0,0(r9) /* clear mmu_hash_lock */
666658
mtmsr r10
667-
SYNC_601
668659
isync
669660
#else /* CONFIG_SMP */
670661
tlbie r3
@@ -681,11 +672,9 @@ _GLOBAL(_tlbia)
681672
lwz r8,TASK_CPU(r2)
682673
oris r8,r8,10
683674
mfmsr r10
684-
SYNC
685675
rlwinm r0,r10,0,17,15 /* clear bit 16 (MSR_EE) */
686676
rlwinm r0,r0,0,28,26 /* clear DR */
687677
mtmsr r0
688-
SYNC_601
689678
isync
690679
lis r9,mmu_hash_lock@h
691680
ori r9,r9,mmu_hash_lock@l
@@ -709,7 +698,6 @@ _GLOBAL(_tlbia)
709698
li r0,0
710699
stw r0,0(r9) /* clear mmu_hash_lock */
711700
mtmsr r10
712-
SYNC_601
713701
isync
714702
#endif /* CONFIG_SMP */
715703
blr

0 commit comments

Comments
 (0)