Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: Mark altinstructions read-only and 32-bit aligned

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v6.0+

+6 -3
+6 -3
arch/parisc/include/asm/alternative.h
··· 34 34 35 35 /* Alternative SMP implementation. */ 36 36 #define ALTERNATIVE(cond, replacement) "!0:" \ 37 - ".section .altinstructions, \"aw\" !" \ 37 + ".section .altinstructions, \"a\" !" \ 38 + ".align 4 !" \ 38 39 ".word (0b-4-.) !" \ 39 40 ".hword 1, " __stringify(cond) " !" \ 40 41 ".word " __stringify(replacement) " !" \ ··· 45 44 46 45 /* to replace one single instructions by a new instruction */ 47 46 #define ALTERNATIVE(from, to, cond, replacement)\ 48 - .section .altinstructions, "aw" ! \ 47 + .section .altinstructions, "a" ! \ 48 + .align 4 ! \ 49 49 .word (from - .) ! \ 50 50 .hword (to - from)/4, cond ! \ 51 51 .word replacement ! \ ··· 54 52 55 53 /* to replace multiple instructions by new code */ 56 54 #define ALTERNATIVE_CODE(from, num_instructions, cond, new_instr_ptr)\ 57 - .section .altinstructions, "aw" ! \ 55 + .section .altinstructions, "a" ! \ 56 + .align 4 ! \ 58 57 .word (from - .) ! \ 59 58 .hword -num_instructions, cond ! \ 60 59 .word (new_instr_ptr - .) ! \