Skip to content

Commit baea32b

Browse files
ubizjakbp3tk0v
authored andcommitted
x86/paravirt: Remove trailing semicolons from alternative asm templates
GCC inline asm treats semicolons as instruction separators, so a semicolon after the last instruction is not required. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Juergen Gross <jgross@suse.com> Acked-by: Alexey Makhalov <alexey.makhalov@broadcom.com> Link: https://patch.msgid.link/20260114211948.74774-1-ubizjak@gmail.com
1 parent b0b449e commit baea32b

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

arch/x86/include/asm/paravirt-spinlock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ static __always_inline void pv_queued_spin_lock_slowpath(struct qspinlock *lock,
3838
static __always_inline void pv_queued_spin_unlock(struct qspinlock *lock)
3939
{
4040
PVOP_ALT_VCALLEE1(pv_ops_lock, queued_spin_unlock, lock,
41-
"movb $0, (%%" _ASM_ARG1 ");",
41+
"movb $0, (%%" _ASM_ARG1 ")",
4242
ALT_NOT(X86_FEATURE_PVUNLOCK));
4343
}
4444

4545
static __always_inline bool pv_vcpu_is_preempted(long cpu)
4646
{
4747
return PVOP_ALT_CALLEE1(bool, pv_ops_lock, vcpu_is_preempted, cpu,
48-
"xor %%" _ASM_AX ", %%" _ASM_AX ";",
48+
"xor %%" _ASM_AX ", %%" _ASM_AX,
4949
ALT_NOT(X86_FEATURE_VCPUPREEMPT));
5050
}
5151

arch/x86/include/asm/paravirt.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static inline void write_cr0(unsigned long x)
117117
static __always_inline unsigned long read_cr2(void)
118118
{
119119
return PVOP_ALT_CALLEE0(unsigned long, pv_ops, mmu.read_cr2,
120-
"mov %%cr2, %%rax;", ALT_NOT_XEN);
120+
"mov %%cr2, %%rax", ALT_NOT_XEN);
121121
}
122122

123123
static __always_inline void write_cr2(unsigned long x)
@@ -128,7 +128,7 @@ static __always_inline void write_cr2(unsigned long x)
128128
static inline unsigned long __read_cr3(void)
129129
{
130130
return PVOP_ALT_CALL0(unsigned long, pv_ops, mmu.read_cr3,
131-
"mov %%cr3, %%rax;", ALT_NOT_XEN);
131+
"mov %%cr3, %%rax", ALT_NOT_XEN);
132132
}
133133

134134
static inline void write_cr3(unsigned long x)
@@ -516,18 +516,18 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
516516

517517
static __always_inline unsigned long arch_local_save_flags(void)
518518
{
519-
return PVOP_ALT_CALLEE0(unsigned long, pv_ops, irq.save_fl, "pushf; pop %%rax;",
519+
return PVOP_ALT_CALLEE0(unsigned long, pv_ops, irq.save_fl, "pushf; pop %%rax",
520520
ALT_NOT_XEN);
521521
}
522522

523523
static __always_inline void arch_local_irq_disable(void)
524524
{
525-
PVOP_ALT_VCALLEE0(pv_ops, irq.irq_disable, "cli;", ALT_NOT_XEN);
525+
PVOP_ALT_VCALLEE0(pv_ops, irq.irq_disable, "cli", ALT_NOT_XEN);
526526
}
527527

528528
static __always_inline void arch_local_irq_enable(void)
529529
{
530-
PVOP_ALT_VCALLEE0(pv_ops, irq.irq_enable, "sti;", ALT_NOT_XEN);
530+
PVOP_ALT_VCALLEE0(pv_ops, irq.irq_enable, "sti", ALT_NOT_XEN);
531531
}
532532

533533
static __always_inline unsigned long arch_local_irq_save(void)
@@ -553,9 +553,9 @@ static __always_inline unsigned long arch_local_irq_save(void)
553553
call PARA_INDIRECT(pv_ops+PV_IRQ_save_fl);
554554
.endm
555555

556-
#define SAVE_FLAGS ALTERNATIVE_2 "PARA_IRQ_save_fl;", \
557-
"ALT_CALL_INSTR;", ALT_CALL_ALWAYS, \
558-
"pushf; pop %rax;", ALT_NOT_XEN
556+
#define SAVE_FLAGS ALTERNATIVE_2 "PARA_IRQ_save_fl", \
557+
"ALT_CALL_INSTR", ALT_CALL_ALWAYS, \
558+
"pushf; pop %rax", ALT_NOT_XEN
559559
#endif
560560
#endif /* CONFIG_PARAVIRT_XXL */
561561
#endif /* CONFIG_X86_64 */

arch/x86/include/asm/paravirt_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ extern struct paravirt_patch_template pv_ops;
210210
*/
211211
#define PARAVIRT_CALL \
212212
ANNOTATE_RETPOLINE_SAFE "\n\t" \
213-
"call *%[paravirt_opptr];"
213+
"call *%[paravirt_opptr]"
214214

215215
/*
216216
* These macros are intended to wrap calls through one of the paravirt

0 commit comments

Comments
 (0)