All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: stable@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <paul.burton@mips.com>
Subject: Re: [PATCH 4.18] MIPS: memset: Fix CPU_DADDI_WORKAROUNDS `small_fixup' regression
Date: Sat, 10 Nov 2018 18:00:08 -0800	[thread overview]
Message-ID: <20181111020008.GD18060@kroah.com> (raw)
In-Reply-To: <alpine.LFD.2.21.1810162222590.16498@eddie.linux-mips.org>

On Tue, Oct 16, 2018 at 10:51:10PM +0100, Maciej W. Rozycki wrote:
> Fix a commit 8a8158c85e1e ("MIPS: memset.S: EVA & fault support for 
> small_memset") regression and remove assembly warnings:
> 
> arch/mips/lib/memset.S: Assembler messages:
> arch/mips/lib/memset.S:243: Warning: Macro instruction expanded into multiple instructions in a branch delay slot
> 
> triggering with the CPU_DADDI_WORKAROUNDS option set and this code:
> 
> 	PTR_SUBU	a2, t1, a0
> 	jr		ra
> 	 PTR_ADDIU	a2, 1
> 
> This is because with that option in place the DADDIU instruction, which 
> the PTR_ADDIU CPP macro expands to, becomes a GAS macro, which in turn 
> expands to an LI/DADDU (or actually ADDIU/DADDU) sequence:
> 
>  13c:	01a4302f 	dsubu	a2,t1,a0
>  140:	03e00008 	jr	ra
>  144:	24010001 	li	at,1
>  148:	00c1302d 	daddu	a2,a2,at
> 	...
> 
> Correct this by switching off the `noreorder' assembly mode and letting 
> GAS schedule this jump's delay slot, as there is nothing special about 
> it that would require manual scheduling.  With this change in place 
> correct code is produced:
> 
>  13c:	01a4302f 	dsubu	a2,t1,a0
>  140:	24010001 	li	at,1
>  144:	03e00008 	jr	ra
>  148:	00c1302d 	daddu	a2,a2,at
> 	...
> 
> Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
> Fixes: 8a8158c85e1e ("MIPS: memset.S: EVA & fault support for small_memset")
> Cc: stable@vger.kernel.org # 4.17+
> ---
> Hi,
> 
>  This is a version (one I originally made actually) of commit 148b9aba99e0 
> for 4.18-stable and before.  No functional changes.  Please apply.

Now queued up, thanks.

greg k-h

      reply	other threads:[~2018-11-11 13:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 21:51 [PATCH 4.18] MIPS: memset: Fix CPU_DADDI_WORKAROUNDS `small_fixup' regression Maciej W. Rozycki
2018-11-11  2:00 ` Greg KH [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=20181111020008.GD18060@kroah.com \
    --to=greg@kroah.com \
    --cc=macro@linux-mips.org \
    --cc=paul.burton@mips.com \
    --cc=ralf@linux-mips.org \
    --cc=stable@vger.kernel.org \
    /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.