[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <14baa8db-1989-4d9b-d6fb-ada9a9f1137b@intel.com>
Date: Mon, 10 Jun 2019 10:31:31 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Uros Bizjak <ubizjak@...il.com>, linux-kernel@...r.kernel.org,
x86@...nel.org, acme@...nel.org,
Thomas Gleixner <tglx@...utronix.de>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Subject: Re: [PATCH] x86/resctrl: Use _ASM_BX to avoid #ifdef CONFIG_X86_64
Hi Uros,
On 6/6/2019 1:00 PM, Uros Bizjak wrote:
> Depending on CONFIG_X86_64 _ASM_BX expands to either rbx or ebx.
>
> Cc: Fenghua Yu <fenghua.yu@...el.com>
> Cc: Reinette Chatre <reinette.chatre@...el.com>
> Cc: x86@...nel.org
> Signed-off-by: Uros Bizjak <ubizjak@...il.com>
> ---
> arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
> index 604c0e3bcc83..09408794eab2 100644
> --- a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
> +++ b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
> @@ -431,11 +431,7 @@ static int pseudo_lock_fn(void *_rdtgrp)
> #else
> register unsigned int line_size asm("esi");
> register unsigned int size asm("edi");
> -#ifdef CONFIG_X86_64
> - register void *mem_r asm("rbx");
> -#else
> - register void *mem_r asm("ebx");
> -#endif /* CONFIG_X86_64 */
> + register void *mem_r asm(_ASM_BX);
> #endif /* CONFIG_KASAN */
>
> /*
>
Thank you very much for catching this. I was not aware of this macro.
Acked-by: Reinette Chatre <reinette.chatre@...el.com>
Reinette
Powered by blists - more mailing lists