Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2521464ybg; Fri, 31 Jul 2020 02:10:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOcZsJc1fwZNjBvBZE8UH67Kc8HYT/KDsu9Fgjy5DyruaoxC7dcKY4tqHDKuJgw5DoREOI X-Received: by 2002:a17:906:a209:: with SMTP id r9mr3145457ejy.413.1596186642257; Fri, 31 Jul 2020 02:10:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596186642; cv=none; d=google.com; s=arc-20160816; b=ZO6m6LXYHm65D8CQqGOoPK1AoeR/OgLZ3Yp8jLfLlkuxNrJSiEb3Wj8t078kQCp8eS zcHAfjQugJ6DNeyTffnQEaEHny4bqiE3DLt1wN0Ooj6vq/36fLc9/Ns0T7FUYd3fZ66y DX74zswJWWz6h6PYFAdksRLqdZpMwKEhEqlzAmBmZstByGws1c+NjEHI/xBVK1uxJsln eWthbSGUAtB/rkCPXKDlbaAGxcetQI3iThNoCsxt88dLHWJV+1MSOin9uTORXXCBGoIV Ho523a7o21IhlvNRjVwTRrAYEIKFkU5jeuKCbGTB1t2F0NMYcIXGeO7cCE5EZ/MRucnh Mxtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BJUw3b6rbgpzgXn3DNot0gQIUySVJ9OrfczvzIt84Kk=; b=V9fgFPh/F+VlIby/l5XQ7NBhrIk1ayxilGS1hPgOzuicDJOUFBJ/pZHPyg9pVycXfF NL4LcNqyngnezK6uz77NxRKuKko0e9mirBGz4kJOnSHgJ0YWPmp8BOEGGr5sFYa1+b29 KzPOr2DLLvtiLE7jvyLqQOI3MeiDidbpdM7vTtKPke3EWSihmkB9tSg89P08DG2rOK5l cgs3SGHk2CToGVxZQwIMrM+rDwOIjvweSd7WvvQnDljOAextz7LzQwUxs+HQHRNFBywN PlFKB0ma9QUamaGpKWlt2+nx1sfcInvbrL4TOIlV0cexFMWG7EtSKBrLtz9hFYPuRtyY 346Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si5400146ejs.414.2020.07.31.02.10.20; Fri, 31 Jul 2020 02:10:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732014AbgGaJJz (ORCPT + 99 others); Fri, 31 Jul 2020 05:09:55 -0400 Received: from elvis.franken.de ([193.175.24.41]:56277 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731818AbgGaJJz (ORCPT ); Fri, 31 Jul 2020 05:09:55 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1k1R33-0005K6-01; Fri, 31 Jul 2020 11:09:53 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id DD277C0B21; Fri, 31 Jul 2020 11:05:26 +0200 (CEST) Date: Fri, 31 Jul 2020 11:05:26 +0200 From: Thomas Bogendoerfer To: Florian Fainelli Cc: linux-mips@linux-mips.org, "open list:BROADCOM BMIPS MIPS ARCHITECTURE" , "open list:BROADCOM BMIPS MIPS ARCHITECTURE" , open list Subject: Re: [PATCH] MIPS: BMIPS: Disable pref 30 for buggy CPUs Message-ID: <20200731090526.GB7946@alpha.franken.de> References: <20200731042401.22871-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200731042401.22871-1-f.fainelli@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 09:24:01PM -0700, Florian Fainelli wrote: > Disable pref 30 by utilizing the standard quirk method and matching the > affected SoCs: 7344, 7346, 7425. > > Signed-off-by: Florian Fainelli > --- > 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"); what's the reason for not using mfc/mtc here ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]