Skip to content

Commit e509204

Browse files
mmindpalmer-dabbelt
authored andcommitted
riscv: extend concatenated alternatives-lines to the same length
ALT_NEW_CONTENT already uses same-length assembler lines, so extend this to the other elements as well. This makes it more readable when these elements need to be extended in the future. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Link: https://lore.kernel.org/r/20220511192921.2223629-6-heiko@sntech.de Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent fbdba60 commit e509204

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

arch/riscv/include/asm/alternative-macros.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@
6262
#include <asm/asm.h>
6363
#include <linux/stringify.h>
6464

65-
#define ALT_ENTRY(oldptr, newptr, vendor_id, errata_id, newlen) \
66-
RISCV_PTR " " oldptr "\n" \
67-
RISCV_PTR " " newptr "\n" \
68-
REG_ASM " " vendor_id "\n" \
69-
REG_ASM " " newlen "\n" \
65+
#define ALT_ENTRY(oldptr, newptr, vendor_id, errata_id, newlen) \
66+
RISCV_PTR " " oldptr "\n" \
67+
RISCV_PTR " " newptr "\n" \
68+
REG_ASM " " vendor_id "\n" \
69+
REG_ASM " " newlen "\n" \
7070
".word " errata_id "\n"
7171

72-
#define ALT_NEW_CONTENT(vendor_id, errata_id, enable, new_c) \
72+
#define ALT_NEW_CONTENT(vendor_id, errata_id, enable, new_c) \
7373
".if " __stringify(enable) " == 1\n" \
7474
".pushsection .alternative, \"a\"\n" \
7575
ALT_ENTRY("886b", "888f", __stringify(vendor_id), __stringify(errata_id), "889f - 888f") \
@@ -83,10 +83,10 @@
8383
".org . - (889b - 888b) + (887b - 886b)\n" \
8484
".endif\n"
8585

86-
#define __ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, enable) \
87-
"886 :\n" \
88-
old_c "\n" \
89-
"887 :\n" \
86+
#define __ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, enable) \
87+
"886 :\n" \
88+
old_c "\n" \
89+
"887 :\n" \
9090
ALT_NEW_CONTENT(vendor_id, errata_id, enable, new_c)
9191

9292
#define _ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, CONFIG_k) \

0 commit comments

Comments
 (0)