Commit dc50b4b2 authored by Gu Zitao's avatar Gu Zitao Committed by guzitao
Browse files

sw64: work around gcc bugs with 'asm goto' with output

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB73UR



--------------------------------

Add this patch according to upstream.

Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 6e710f43
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@

static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{
	asm_volatile_goto("1: nop\n\t"
	asm goto("1: nop\n\t"
		".pushsection __jump_table,  \"aw\"\n\t"
		".align 3\n\t"
		".quad 1b, %l[l_yes], %0\n\t"
@@ -26,7 +26,7 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran

static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
{
	asm_volatile_goto("1: br %l[l_yes]\n\t"
	asm goto("1: br %l[l_yes]\n\t"
		".pushsection __jump_table,  \"aw\"\n\t"
		".align 3\n\t"
		".quad 1b, %l[l_yes], %0\n\t"