Re: [PATCH v2] MIPS: R10000: Split R10000 definitions from R12000 and up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/31/2015 08:17, Ralf Baechle wrote:
> On Wed, Jan 21, 2015 at 07:51:43AM -0500, Joshua Kinard wrote:
> 
>>  up
>> Content-Type: text/plain; charset=utf-8
>>
>> From: Joshua Kinard <kumba@xxxxxxxxxx>
>>
>> This patch splits the old R10000 definitions so that the R10000_LLSC_WAR can be
>> disabled and -mno-fix-r10000 passed to CFLAGS for systems running R12000 CPUs
>> and greater.  This allows the kernel to build without branch-likely
>> instructions, which are considered deprecated in current MIPS implementations.
>>  Only R10000 systems with R2.6 and lower CPUs require branch-likely to work
>> around a known hardware errata item.
> 
> The kernel doesn't use -mfix-r10000 rsp. -mno-fix-r10000 or any code that
> would rely on the default setting for this option.  The kernel rather
> opencodes all these atomic sequences in inline assembler.

True, though I added that on the off chance the compiler decides to emit its
own ll/sc pair somewhere and thus could use normal beq/beqz insns instead of
the branch-likely variants.  Couldn't hurt.


> Only platforms which are known to be equipped with R10000 v2.6 processors
> enable R10000_LLSC_WAR and I've done so quite intentionally not just for
> some CPU configuration but the entire platforms which at this time are IP27
> and IP28.

This allows one to override this on IP27 at least.  I've got both R12K and R14K
node boards, neither of which require the branch-likely workarounds, so it's
safe to disable the WAR there.  And although it's not in the tree yet, IP30
also benefits from this as well.  I am not sure how old the IP30 R10000 CPU
revs can go, so it might need the WAR in limited circumstances, too.  It also
sets things up to further separate R12K from R14K should any beneficial
enhancements be discovered in the future (or if I can ever figure out why R14K
seems weirder in some instances than R12K).

-- 
Joshua Kinard
Gentoo/MIPS
kumba@xxxxxxxxxx
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And our
lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux