Skip to content

Commit 33f806d

Browse files
committed
parisc: Mark altinstructions read-only and 32-bit aligned
Signed-off-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org # v6.0+
1 parent a80aeb8 commit 33f806d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

arch/parisc/include/asm/alternative.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end,
3434

3535
/* Alternative SMP implementation. */
3636
#define ALTERNATIVE(cond, replacement) "!0:" \
37-
".section .altinstructions, \"aw\" !" \
37+
".section .altinstructions, \"a\" !" \
38+
".align 4 !" \
3839
".word (0b-4-.) !" \
3940
".hword 1, " __stringify(cond) " !" \
4041
".word " __stringify(replacement) " !" \
@@ -44,15 +45,17 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end,
4445

4546
/* to replace one single instructions by a new instruction */
4647
#define ALTERNATIVE(from, to, cond, replacement)\
47-
.section .altinstructions, "aw" ! \
48+
.section .altinstructions, "a" ! \
49+
.align 4 ! \
4850
.word (from - .) ! \
4951
.hword (to - from)/4, cond ! \
5052
.word replacement ! \
5153
.previous
5254

5355
/* to replace multiple instructions by new code */
5456
#define ALTERNATIVE_CODE(from, num_instructions, cond, new_instr_ptr)\
55-
.section .altinstructions, "aw" ! \
57+
.section .altinstructions, "a" ! \
58+
.align 4 ! \
5659
.word (from - .) ! \
5760
.hword -num_instructions, cond ! \
5861
.word (new_instr_ptr - .) ! \

0 commit comments

Comments
 (0)