From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18A45C43462 for ; Mon, 12 Apr 2021 15:16:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E458E6128C for ; Mon, 12 Apr 2021 15:16:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242768AbhDLPRM (ORCPT ); Mon, 12 Apr 2021 11:17:12 -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 ]