lkml.org 
[lkml]   [2018]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] MIPS: Add new Kconfig variable to avoid unaligned access instructions
From
Date
On Tue, 2018-09-25 at 19:57 +0000, Paul Burton wrote:
> 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

OK, Thanks.


\
 
 \ /
  Last update: 2018-09-25 22:13    [W:0.301 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site