Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp411334pxa; Fri, 31 Jul 2020 15:52:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6A8Ncyt2e0vDQ+AsBmYf4vUroM6vKXqmvwm/8QZCqzGupqy/DwhyujudJLyzNT31tVisQ X-Received: by 2002:a17:906:9392:: with SMTP id l18mr6160352ejx.357.1596235939490; Fri, 31 Jul 2020 15:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596235939; cv=none; d=google.com; s=arc-20160816; b=Hd8WV76Ba+CMFIcp24hP8wWDgKL7B/ssZYNBHiSZtlXONEp7a9UC/VJ9dqkchoDwID V2uoVD6XQcRofHM5y5v1IVIRjazOtgNi8pm5W8ytHfeqpRH1D5VmSawRQV9d2tYRma0z ZsGQmaty1iD3RtO3zMALh3N0xwwXQV5biTsXpN8IaV7JWT/+IhNrAAm8uLwKVHpNnMUH DPpayp7tx8qHzYG+9ry4typSpp92/duCDbjZ1NE/o5LpOXV5DdJuytkBzhzWtQjRA6yM iMN+BtX9KHHqnB/zMX3Xc33JnZc1SZj8R/LUzZ/MhVL2TiOZZgNdtq/Nk61VdDNbV5EO slfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=KldUXxywDI2lybh6bj7T/diBCppFO1Ycr5/0d2oq2Kw=; b=gv7YPfgIDrfiLu+afDfGJrDBB0VT4ooPlhbLzrOnZaPYZihkp1fryofc3Quclq+mKt rjXwYEGXzDb2ikxLumZutU7B/VofoicPSTZ1+qHkQuBB3I39o19PxbNv9Xht4CVkUaSp X1KejsYDaGwYkGTr4MJKxqQF++LVK5ecQWORp64SDCw32Wamt/EkxXUbLTsk1TNh8D4+ Dels8S+dDr/KvBGasIhLwzZTBfx4v78TLyvQhaKt6O+Mb5qtmX57A05ZxeWhnPSsG6wQ 6YdKK0c/ktXoDfNr29lcY5uHOUxeGGQ3H3ZR2htBOgsidx9MOD00q18JlyQJ9nrMUipf rrwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f0PbYsZp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si4573250edx.215.2020.07.31.15.51.56; Fri, 31 Jul 2020 15:52:19 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f0PbYsZp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727041AbgGaWtj (ORCPT + 99 others); Fri, 31 Jul 2020 18:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbgGaWti (ORCPT ); Fri, 31 Jul 2020 18:49:38 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AF04C06174A; Fri, 31 Jul 2020 15:49:38 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id b14so28628070qkn.4; Fri, 31 Jul 2020 15:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KldUXxywDI2lybh6bj7T/diBCppFO1Ycr5/0d2oq2Kw=; b=f0PbYsZpguL0x4cQoCXf/NJ0Fgg1tekz7mQomMv/Y4eD3nk6O/K16CNToj7A6ZB8u6 hD4U8hnkjkDZZZzrNnXXgJoCu8VsCVEMEMons8FqGjzYBT23GS9UwHzdcna69VD+E3uL ZXN5WxKdhNE5dxTbe6odKZgUfVCBAlK3NgO/DNBfAErKZDvBsPZYpN+uftz6+WYWYDPy qdEy9nCci5AeM1YvkTbGE6LzUydZ85LmbFNmwI1PcX5DA6eZe6/dMoDp2fk+Vr9FUWri 75YHg/FKacuNh9KybVZISAodoHsif/mM4PfITRzvpr5UHemuKULCR4UP5BT9NMkiB5R7 9wGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=KldUXxywDI2lybh6bj7T/diBCppFO1Ycr5/0d2oq2Kw=; b=Pv1jUR4D4WOh4Hl3V3ZBsrbhzxcPcF5TJWFgVMQSWA8P9vcVXakj1XRnZYEdyXLkH/ gnRJcPah4fH7vSyVy9vLhQNT5um1WDBSpxbHEZr/A3ssvKyxnYs6LLmdnfJbFvYvWnBl WxJgoCTdPtJffwH9tYS3nYYYBhuW6ynnSlIqB2W9Uyikt1MW57+3wGQ+UZ9fImvaIrKF kWF+zLoeMv85+41An5nglZMxF2t09std4PK0OMI70TyBk/CqWjTidlSC3PE9pAKjP0L+ Sy9QaT/beqFjNjnl/Jdy7fjiWnfc2z84J4fHsUng2vSUJDwrWteZedjwkyzLBECZz9Vj 5XUg== X-Gm-Message-State: AOAM531v3eKff8qWVP4ozSdsJdlH+xZiPKdRy1XY8TnQsPtlmqChmH9k NeIGgA7iRDTwecSZK5HoQanWjD+8 X-Received: by 2002:a05:620a:48c:: with SMTP id 12mr6399491qkr.452.1596235777420; Fri, 31 Jul 2020 15:49:37 -0700 (PDT) Received: from [10.67.50.75] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id r6sm9953894qtt.81.2020.07.31.15.49.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Jul 2020 15:49:36 -0700 (PDT) Subject: Re: [PATCH] MIPS: BMIPS: Disable pref 30 for buggy CPUs To: Jiaxun Yang , Florian Fainelli , linux-mips@linux-mips.org Cc: Thomas Bogendoerfer , "open list:BROADCOM BMIPS MIPS ARCHITECTURE" , "open list:BROADCOM BMIPS MIPS ARCHITECTURE" , open list References: <20200731042401.22871-1-f.fainelli@gmail.com> <21ad5472-1287-acba-5604-09f2e633c043@flygoat.com> From: Florian Fainelli Autocrypt: addr=f.fainelli@gmail.com; prefer-encrypt=mutual; keydata= xsDiBEjPuBIRBACW9MxSJU9fvEOCTnRNqG/13rAGsj+vJqontvoDSNxRgmafP8d3nesnqPyR xGlkaOSDuu09rxuW+69Y2f1TzjFuGpBk4ysWOR85O2Nx8AJ6fYGCoeTbovrNlGT1M9obSFGQ X3IzRnWoqlfudjTO5TKoqkbOgpYqIo5n1QbEjCCwCwCg3DOH/4ug2AUUlcIT9/l3pGvoRJ0E AICDzi3l7pmC5IWn2n1mvP5247urtHFs/uusE827DDj3K8Upn2vYiOFMBhGsxAk6YKV6IP0d ZdWX6fqkJJlu9cSDvWtO1hXeHIfQIE/xcqvlRH783KrihLcsmnBqOiS6rJDO2x1eAgC8meAX SAgsrBhcgGl2Rl5gh/jkeA5ykwbxA/9u1eEuL70Qzt5APJmqVXR+kWvrqdBVPoUNy/tQ8mYc nzJJ63ng3tHhnwHXZOu8hL4nqwlYHRa9eeglXYhBqja4ZvIvCEqSmEukfivk+DlIgVoOAJbh qIWgvr3SIEuR6ayY3f5j0f2ejUMYlYYnKdiHXFlF9u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RxrlLs7/himep7MrCc= Message-ID: <46de49ec-cc8b-708a-0cdd-82389b041078@gmail.com> Date: Fri, 31 Jul 2020 15:49:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <21ad5472-1287-acba-5604-09f2e633c043@flygoat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >>   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