History

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

Helge Deller committed 2 years ago

Commit 33f806d1 parent a80aeb81 file · +6 −3Browse files

Unified · Split

arch/parisc/include/asm/alternative.h+6−3
@@ -34,7 +34,8 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end, · 33 unmodified lines
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,7 +45,8 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end, · 3 unmodified lines
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 ! \
@@ -52,7 +54,8 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end, · 1 unmodified line
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 - .) ! \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t