Re: [kvm-unit-tests PATCH v2 2/5] x86: realmode: mark exec_in_big_real_mode as noinline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 08, 2021, Bill Wendling wrote:
> exec_in_big_real_mode() uses inline asm that has labels. Clang decides

_global_ labels.  Inlining functions with local labels, including asm goto labels,
is not problematic, the issue is specific to labels that must be unique for a
given compilation unit.

> that it can inline this function, which causes the assembler to complain
> about duplicate symbols. Mark the function as "noinline" to prevent
> this.
> 
> Signed-off-by: Bill Wendling <morbo@xxxxxxxxxx>
> ---
>  x86/realmode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/realmode.c b/x86/realmode.c
> index b4fa603..07a477f 100644
> --- a/x86/realmode.c
> +++ b/x86/realmode.c
> @@ -178,7 +178,7 @@ static inline void init_inregs(struct regs *regs)
>  		inregs.esp = (unsigned long)&tmp_stack.top;
>  }
>  
> -static void exec_in_big_real_mode(struct insn_desc *insn)
> +static __attribute__((noinline)) void exec_in_big_real_mode(struct insn_desc *insn)

Forgot to use the new define in this patch :-)

>  {
>  	unsigned long tmp;
>  	static struct regs save;
> -- 
> 2.33.0.309.g3052b89438-goog
> 



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux