mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yasha Cherikovsky <yasha.che3@gmail.com>
To: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	James Hogan <jhogan@kernel.org>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/1] MIPS: Add Kconfig variable for CPUs with unaligned load/store instructions
Date: Thu, 27 Sep 2018 01:31:42 +0300	[thread overview]
Message-ID: <7dfadae9a7896db71fabc71bc7c489791be27baa.camel@gmail.com> (raw)
In-Reply-To: <20180926221815.jfh7uv52oyry2gmq@pburton-laptop>

Hi Paul,

On Wed, 2018-09-26 at 22:18 +0000, Paul Burton wrote:
> Hi Yasha,
> 
> On Wed, Sep 26, 2018 at 02:16:15PM +0300, Yasha Cherikovsky wrote:
> > MIPSR6 CPUs do not support unaligned load/store instructions
> > (LWL, LWR, SWL, SWR and LDL, LDR, SDL, SDR for 64bit).
> > 
> > Currently the MIPS tree has some special cases to avoid these
> > instructions, and the code is testing for !CONFIG_CPU_MIPSR6.
> > 
> > This patch declares a new Kconfig variable:
> > CONFIG_CPU_HAS_LOAD_STORE_LR.
> > This variable indicates that the CPU supports these instructions.
> > 
> > Then, the patch does the following:
> > - Carefully selects this option on all CPUs except MIPSR6.
> > - Switches all the special cases to test for the new variable,
> >   and inverts the logic:
> >     '#ifndef CONFIG_CPU_MIPSR6' turns into
> >     '#ifdef CONFIG_CPU_HAS_LOAD_STORE_LR'
> >     and vice-versa.
> > 
> > Also, when this variable is NOT selected (e.g. MIPSR6),
> > CONFIG_GENERIC_CSUM will default to 'y', to compile generic
> > C checksum code (instead of special assembly code that uses the
> > unsupported instructions).
> > 
> > This commit should not affect any existing CPU, and is required
> > for future Lexra CPU support, that misses these instructions too.
> > 
> > Signed-off-by: Yasha Cherikovsky <yasha.che3@gmail.com>
> > Cc: Ralf Baechle <ralf@linux-mips.org>
> > Cc: Paul Burton <paul.burton@mips.com>
> > Cc: James Hogan <jhogan@kernel.org>
> > Cc: linux-mips@linux-mips.org
> > Cc: linux-kernel@vger.kernel.org
> > ---
> >  arch/mips/Kconfig            | 35 +++++++++++++++++++++++++--
> >  arch/mips/kernel/unaligned.c | 47 ++++++++++++++++++------------------
> >  arch/mips/lib/memcpy.S       | 10 ++++----
> >  arch/mips/lib/memset.S       | 12 ++++-----
> >  4 files changed, 67 insertions(+), 37 deletions(-)
> 
> Thanks - applied to mips-next for 4.20.
> 
> Paul

Thanks!

Yasha


      reply	other threads:[~2018-09-26 22:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 11:16 [PATCH v2 0/1] MIPS: Lexra CPU support, prerequisite patch Yasha Cherikovsky
2018-09-26 11:16 ` [PATCH v2 1/1] MIPS: Add Kconfig variable for CPUs with unaligned load/store instructions Yasha Cherikovsky
2018-09-26 22:18   ` Paul Burton
2018-09-26 22:31     ` Yasha Cherikovsky [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=7dfadae9a7896db71fabc71bc7c489791be27baa.camel@gmail.com \
    --to=yasha.che3@gmail.com \
    --cc=jhogan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@mips.com \
    --cc=ralf@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®