[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180925195757.glglc6q3ghn3dhs5@pburton-laptop>
Date: Tue, 25 Sep 2018 19:57:59 +0000
From: Paul Burton <paul.burton@...s.com>
To: Yasha Cherikovsky <yasha.che3@...il.com>
CC: Ralf Baechle <ralf@...ux-mips.org>,
James Hogan <jhogan@...nel.org>,
"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] MIPS: Add new Kconfig variable to avoid unaligned
access instructions
Hi Yasha,
On Tue, Sep 25, 2018 at 10:30:52PM +0300, Yasha Cherikovsky wrote:
> On Tue, 2018-09-25 at 17:45 +0000, Paul Burton wrote:
> > How about we:
> >
> > - Add a Kconfig option CONFIG_CPU_SUPPORTS_LOAD_STORE_LR, and
> > select
> > it for all existing pre-r6 targets (probably from CONFIG_CPU_*).
> >
> > - Change CONFIG_GENERIC_CSUM to default y if
> > !CONFIG_CPU_SUPPORTS_LOAD_STORE_LR, and drop the selects of it.
> >
> > That would avoid the double-negative ("if we don't not support this")
> > that the #ifndef's currently represent. It would also mean any future
> > architecture/ISA targets beyond MIPSr6 automatically avoid the
> > instructions.
>
> Thanks for your feedback, I'll start preparing v2.
>
> Looking in arch/mips/Kconfig, some CPU options start
> with CPU_SUPPORTS_ and some with CPU_HAS_.
> Which perfix should we use here?
That's a good question :)
To be honest I don't think either of them is perfect, since what we're
really describing is what's supported by the ISA that the kernel build
is targeting - and in theory the CPU we actually run on could support
extra things.
But considering it I think CPU_HAS_ is probably the best choice for
this, since it's already used similarly to indicate support for pref &
sync instructions.
Thanks,
Paul
Powered by blists - more mailing lists