Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1860513pxb; Mon, 12 Apr 2021 08:19:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyieHJDG36Tw/B38iicumxB28rV3pFPPLPf4Yd635ePs5MrRXYOQbQeQOgl4WUevZD8mU/D X-Received: by 2002:a62:7d46:0:b029:247:baa2:d95c with SMTP id y67-20020a627d460000b0290247baa2d95cmr14496830pfc.15.1618240745774; Mon, 12 Apr 2021 08:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618240745; cv=none; d=google.com; s=arc-20160816; b=kqXlTooQyG+gTU80FCOD1uK3ZV4jo56ZJkt2VkOIGvkH8CpRHdGNxGAUS8eh3g7J/w ifhj40Om2cJEGcQz8w4w50v+35mI3srAJzyMdQSbONDU8WX1r/FwNUwy6xIVm0hj92sn dLju7yeFzQYdZeqSsdvslNQNBvGXriILAxHjFLs/0ozntwWB+ahrwTbUSs1Z+pAp5+mm spEYYjzx7UsfzwLIdQr7j4BuUX0HBYjb/lWCV/nRqCDBugHRipaN7uy/ivomnMO3Y/0U 2IMMWUp36ntzp7MXGd0nl74Lg0vyl0yYh/IlDWeFFNnp97FxXJ/kjzBkQ1uLWui6icyR JVlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=3D1dA5fhp/1LiWAzV2tQ1Z5nbvPukQYxuirNKJFb67o=; b=bAwvAG0kcFC+vHVPTfh1knm960AFAhqACnxWhnL4RYDRBSP8VPq3CZcxO81h/IFymS 2C2Mxqh93EcfSu1e8GpksXgMKLAv+XWTe4T1wKLSGa36VEVpE+n8RdTir9NR+v3dUjJD ffabD4B4WNlxjMgKUulc6jEcAxW/Dzen8zQXKHaxQ5eh4TfHmq6fDqfgwVHkk+Xt1s5/ SQoA0cjnCFTqBz806C1BquWo/I29VDyXYDiCz3XwAFHbYy6XbnFDpSdx9BkBHQ1bE+ot ncV56LHTXYqZCJXCinZnTObcZt73YWgXVnK1gdEJqVc6f2O7Bfm31H5rmqIRrAlDbRjj SWNQ== 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 g5si14754792pgc.99.2021.04.12.08.18.53; Mon, 12 Apr 2021 08:19:05 -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 S242760AbhDLPRL (ORCPT + 99 others); Mon, 12 Apr 2021 11:17:11 -0400 Received: from elvis.franken.de ([193.175.24.41]:45485 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239508AbhDLPRI (ORCPT ); Mon, 12 Apr 2021 11:17:08 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1lVyIy-0006wH-00; Mon, 12 Apr 2021 17:16:48 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 80B45C029E; Mon, 12 Apr 2021 17:03:24 +0200 (CEST) Date: Mon, 12 Apr 2021 17:03:24 +0200 From: Thomas Bogendoerfer To: Ilya Lipnitskiy Cc: macro@orcam.me.uk, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, liwei391@huawei.com, nbd@nbd.name, yangtiezhu@loongson.cn Subject: Re: [PATCH v3] MIPS: add support for buggy MT7621S core detection Message-ID: <20210412150324.GA23632@alpha.franken.de> References: <20210407200738.149207-1-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407200738.149207-1-ilya.lipnitskiy@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 01:07:38PM -0700, Ilya Lipnitskiy wrote: > Most MT7621 SoCs have 2 cores, which is detected and supported properly > by CPS. > > Unfortunately, MT7621 SoC has a less common S variant with only one core. > On MT7621S, GCR_CONFIG still reports 2 cores, which leads to hangs when > starting SMP. CPULAUNCH registers can be used in that case to detect the > absence of the second core and override the GCR_CONFIG PCORES field. > > Rework a long-standing OpenWrt patch to override the value of > mips_cps_numcores on single-core MT7621 systems. > > Tested on a dual-core MT7621 device (Ubiquiti ER-X) and a single-core > MT7621 device (Netgear R6220). > > Original 4.14 OpenWrt patch: > Link: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4cdbc90a376dd0555201c1434a2081e055e9ceb7 > Current 5.10 OpenWrt patch: > Link: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ramips/patches-5.10/320-mt7621-core-detect-hack.patch;h=c63f0f4c1ec742e24d8480e80553863744b58f6a;hb=10267e17299806f9885d086147878f6c492cb904 > > Suggested-by: Felix Fietkau > Signed-off-by: Ilya Lipnitskiy > --- > arch/mips/include/asm/mips-cps.h | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]