“c0e44a94386ec2242898ab194c15448a2f2309f1”上不存在“src/macosx/git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 c40348fc 编写于 作者: H Hongchen Zhang 提交者: openeuler-sync-bot

LoongArch: save one instruction for arch_local_irq_{enable,disable}

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6BWFP

--------------------------------
Signed-off-by: NHongchen Zhang <zhanghongchen@loongson.cn>
Change-Id: I607e48f5abea1184b22326e772d809f6994603cc
(cherry picked from commit f5069ef5)
上级 52ca9446
...@@ -17,16 +17,15 @@ static inline void arch_local_irq_enable(void) ...@@ -17,16 +17,15 @@ static inline void arch_local_irq_enable(void)
__asm__ __volatile__( __asm__ __volatile__(
"csrxchg %[val], %[mask], %[reg]\n\t" "csrxchg %[val], %[mask], %[reg]\n\t"
: [val] "+r" (flags) : [val] "+r" (flags)
: [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD) : [mask] "r" (flags), [reg] "i" (LOONGARCH_CSR_CRMD)
: "memory"); : "memory");
} }
static inline void arch_local_irq_disable(void) static inline void arch_local_irq_disable(void)
{ {
u32 flags = 0;
__asm__ __volatile__( __asm__ __volatile__(
"csrxchg %[val], %[mask], %[reg]\n\t" "csrxchg $zero, %[mask], %[reg]\n\t"
: [val] "+r" (flags) :
: [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD) : [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD)
: "memory"); : "memory");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册