All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@wdc.com>
To: Romain Naour <romain.naour@gmail.com>
Cc: linux-mips@vger.kernel.org, "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [PATCHv3] mips: Do not include hi and lo in clobber list for R6
Date: Mon, 3 Aug 2020 00:59:51 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.21.2008030044230.24175@redsun52.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <20200801154401.4177009-1-romain.naour@gmail.com>

On Sat, 1 Aug 2020, Romain Naour wrote:

> v3 Avoid duplicate code (Maciej W. Rozycki)
> v2 use MIPS_ISA_REV instead of __mips_isa_rev (Alexander Lobakin)
> ---
>  arch/mips/include/asm/vdso/gettimeofday.h | 30 +++++++++++++++++++----
>  1 file changed, 25 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
> index c63ddcaea54c..93008551282e 100644
> --- a/arch/mips/include/asm/vdso/gettimeofday.h
> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
> @@ -35,7 +35,11 @@ static __always_inline long gettimeofday_fallback(
>  	: "=r" (ret), "=r" (error)
>  	: "r" (tv), "r" (tz), "r" (nr)
>  	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
> -	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
> +	  "$14", "$15", "$24", "$25",
> +#if MIPS_ISA_REV < 6
> +	  "hi", "lo",
> +#endif
> +          "memory");

 Can you please use a helper macro, say GCC_REGS_HI_LO, moving the details 
into a separate header, just as I suggested with examples given?  My very 
point was to avoid `#if MIPS_ISA_REV < 6' sprinkled throughout code.

 Also I note all the clobbers are the same across all the syscalls used 
here, so another possibility is to have a macro like VDSO_SYSCALL_CLOBBERS 
defined in a single place according to the architecture level, and then 
just use it throughout avoiding code duplication.

  Maciej

      reply	other threads:[~2020-08-02 23:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01 15:44 [PATCHv3] mips: Do not include hi and lo in clobber list for R6 Romain Naour
2020-08-02 23:59 ` Maciej W. Rozycki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.2008030044230.24175@redsun52.ssa.fujisawa.hgst.com \
    --to=macro@wdc.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=romain.naour@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.