Skip to content

Commit a885a9d

Browse files
Gu Zitaoopsiff
authored andcommitted
sw64: adapt to the upstream changes in arch_static_branch*
Fix it according to upstream commit 4356e9f ("work around gcc bugs with 'asm goto' with outputs"). Signed-off-by: Gu Zitao <guzitao@wxiat.com> Reviewed-by: He Sheng <hesheng@wxiat.com> Signed-off-by: Gu Zitao <guzitao@wxiat.com> (cherry picked from commit 53d4150)
1 parent 959b4c8 commit a885a9d

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

arch/sw_64/include/asm/jump_label.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
1414
{
15-
asm_volatile_goto("1: nop\n\t"
16-
".pushsection __jump_table, \"aw\"\n\t"
17-
".align 3\n\t"
18-
".quad 1b, %l[l_yes], %0\n\t"
19-
".popsection\n\t"
20-
: : "i"(&((char *)key)[branch]) : : l_yes);
15+
asm goto("1: nop\n\t"
16+
".pushsection __jump_table, \"aw\"\n\t"
17+
".align 3\n\t"
18+
".quad 1b, %l[l_yes], %0\n\t"
19+
".popsection\n\t"
20+
: : "i"(&((char *)key)[branch]) : : l_yes);
2121

2222
return false;
2323
l_yes:
@@ -26,12 +26,12 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran
2626

2727
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
2828
{
29-
asm_volatile_goto("1: br %l[l_yes]\n\t"
30-
".pushsection __jump_table, \"aw\"\n\t"
31-
".align 3\n\t"
32-
".quad 1b, %l[l_yes], %0\n\t"
33-
".popsection\n\t"
34-
: : "i"(&((char *)key)[branch]) : : l_yes);
29+
asm goto("1: br %l[l_yes]\n\t"
30+
".pushsection __jump_table, \"aw\"\n\t"
31+
".align 3\n\t"
32+
".quad 1b, %l[l_yes], %0\n\t"
33+
".popsection\n\t"
34+
: : "i"(&((char *)key)[branch]) : : l_yes);
3535

3636
return false;
3737
l_yes:

0 commit comments

Comments
 (0)