Skip to content

Commit 4e284e3

Browse files
committed
powerpc/64s: Use .machine power4 around dcbt
There are multiple decodings for the "dcbt" mnemonic, so the assembler has to pick one. That requires passing -many to the assembler, which is not recommended. Without -many the clang 14 / binutils 2.38 build fails with: arch/powerpc/kernel/exceptions-64s.S:2976: Error: junk at end of line: `0b01010' clang: error: assembler command failed with exit code 1 (use -v to see invocation) Fix it by adding .machine directives around the use of dcbt to specify which encoding is desired. Acked-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240229122521.762431-2-mpe@ellerman.id.au
1 parent 8488cdc commit 4e284e3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

arch/powerpc/include/asm/ppc_asm.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,19 +508,25 @@ END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96)
508508
*/
509509
#define DCBT_BOOK3S_STOP_ALL_STREAM_IDS(scratch) \
510510
lis scratch,0x60000000@h; \
511-
dcbt 0,scratch,0b01010
511+
.machine push; \
512+
.machine power4; \
513+
dcbt 0,scratch,0b01010; \
514+
.machine pop;
512515

513516
#define DCBT_SETUP_STREAMS(from, from_parms, to, to_parms, scratch) \
514517
lis scratch,0x8000; /* GO=1 */ \
515518
clrldi scratch,scratch,32; \
519+
.machine push; \
520+
.machine power4; \
516521
/* setup read stream 0 */ \
517522
dcbt 0,from,0b01000; /* addr from */ \
518523
dcbt 0,from_parms,0b01010; /* length and depth from */ \
519524
/* setup write stream 1 */ \
520525
dcbtst 0,to,0b01000; /* addr to */ \
521526
dcbtst 0,to_parms,0b01010; /* length and depth to */ \
522527
eieio; \
523-
dcbt 0,scratch,0b01010; /* all streams GO */
528+
dcbt 0,scratch,0b01010; /* all streams GO */ \
529+
.machine pop;
524530

525531
/*
526532
* toreal/fromreal/tophys/tovirt macros. 32-bit BookE makes them

0 commit comments

Comments
 (0)