linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	linux-mips@linux-mips.org
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	"open list:BROADCOM BMIPS MIPS ARCHITECTURE" 
	<bcm-kernel-feedback-list@broadcom.com>,
	"open list:BROADCOM BMIPS MIPS ARCHITECTURE" 
	<linux-mips@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] MIPS: BMIPS: Disable pref 30 for buggy CPUs
Date: Fri, 31 Jul 2020 15:49:28 -0700	[thread overview]
Message-ID: <46de49ec-cc8b-708a-0cdd-82389b041078@gmail.com> (raw)
In-Reply-To: <21ad5472-1287-acba-5604-09f2e633c043@flygoat.com>

On 7/31/20 3:34 AM, Jiaxun Yang wrote:
> 
> 
> 在 2020/7/31 下午12:24, Florian Fainelli 写道:
>> Disable pref 30 by utilizing the standard quirk method and matching the
>> affected SoCs: 7344, 7346, 7425.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>>   arch/mips/bmips/setup.c | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/arch/mips/bmips/setup.c b/arch/mips/bmips/setup.c
>> index 19308df5f577..df0efea12611 100644
>> --- a/arch/mips/bmips/setup.c
>> +++ b/arch/mips/bmips/setup.c
>> @@ -110,6 +110,20 @@ static void bcm6368_quirks(void)
>>       bcm63xx_fixup_cpu1();
>>   }
>>   +static void bmips5000_pref30_quirk(void)
>> +{
>> +    __asm__ __volatile__(
>> +    "    li    $8, 0x5a455048\n"
>> +    "    .word    0x4088b00f\n"    /* mtc0 $8, $22, 15 */
>> +    "    nop; nop; nop\n"
>> +    "    .word    0x4008b008\n"    /* mfc0 $8, $22, 8 */
>> +    /* disable "pref 30" on buggy CPUs */
>> +    "    lui    $9, 0x0800\n"
>> +    "    or    $8, $9\n"
>> +    "    .word    0x4088b008\n"    /* mtc0 $8, $22, 8 */
>> +    : : : "$8", "$9");
>> +}
> Hi,
> 
> Is there any toolchain issue blocking read_c0_**** family helpers being
> used?
> 
> Use .word looks unreasonable.

Yes, the assembler would be choking on the custom $22 selector, however
this patch should not be necessary given that the boot loader (CFE)
should have long been updated by now to disable pref 30.

Thanks
-- 
Florian

  reply	other threads:[~2020-07-31 22:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  4:24 [PATCH] MIPS: BMIPS: Disable pref 30 for buggy CPUs Florian Fainelli
2020-07-31  9:05 ` Thomas Bogendoerfer
2020-07-31 22:49   ` Florian Fainelli
2020-07-31 10:34 ` Jiaxun Yang
2020-07-31 22:49   ` Florian Fainelli [this message]
2020-08-03 11:30     ` Thomas Bogendoerfer
2020-08-03 17:16       ` Florian Fainelli
2020-08-05  2:06         ` Maciej W. Rozycki

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=46de49ec-cc8b-708a-0cdd-82389b041078@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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;
as well as URLs for NNTP newsgroup(s).