Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 422ECC433EF for ; Fri, 17 Dec 2021 22:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229768AbhLQWM1 (ORCPT ); Fri, 17 Dec 2021 17:12:27 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:45319 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhLQWM0 (ORCPT ); Fri, 17 Dec 2021 17:12:26 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7744032007E8; Fri, 17 Dec 2021 17:12:25 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 17 Dec 2021 17:12:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=i 72pxYgch0GKQxi1KRFw6/YrWp6fxCA2wazXup0+w90=; b=z3BYrw/kt8/7LtG9g Ms3+py9cW/VFt51s0Yonj+1GcesHcdlmt6SB97xzHOupjiHvp5wn1g40pQnPaMBk gEiiAhlMczahh9fTVi3h8ploSRB+Fw96H+UdYOYQ2NVaTyGol049nTQsfPToHL5Z CgNCxwDGP9UvZSZL9b+RryvOGiUAQCkZADrpGU88bDFeyrRBDnAf4cjeF8IUTdj6 g0WOLKH/dpxLxtMujmnHEoK+CULLsprBMtVrHe3GObCkRMQdfgK8+2i5c3mxmZC7 FXdSfCNTqa4VB9VoPCM2KbVNizAQRSO6wNQTbLzxW3fNkRE7nnl4s5zGF5T+dujG n4UVA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=i72pxYgch0GKQxi1KRFw6/YrWp6fxCA2wazXup0+w 90=; b=US0RSgjfJtR6lsT2/y2vlVaeLhoN6QLqep6K5e9D2TBM3bOxiomZ4fsoX 83eO3XC7/2q7csm42NAXlFq1ZJeI6dv7Y8U5P7GXqodyCE4BcYbqGKTChNvQPrkY kmG/tVBgy1ZWUvxHKMDvRK1pRAZ4tGUkQvU/VZVaEsWSDVldkHhlFbHPfTfm4Vhc Ip57zP8W/2AGphj9I6WIBL3gKApkMP6z1djeUX6VIwGoSuLFSpEKhh5558LRaFpA zo4F/VMAast2R/3u+LGHWBy8I4onUm1+9bDxmWPaUTCN0GV0w5ZGRgwjWUFbnkW+ 8vlzbuE2i8JXfImcsXunroM0mVS7Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeigdduheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheplfhirgig uhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqeenuc ggtffrrghtthgvrhhnpeehieduvdevhfekjeeftddtkeeitefhudekvdeiueeulefgleei jeeghedvkeduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Dec 2021 17:12:23 -0500 (EST) Message-ID: Date: Fri, 17 Dec 2021 22:12:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Thunderbird/96.0 Subject: Re: [PATCH] MIPS: generic: enable SMP on SMVP systems To: Sander Vanheule , linux-mips@vger.kernel.org Cc: Paul Burton , Thomas Bogendoerfer , linux-kernel@vger.kernel.org, INAGAKI Hiroshi References: <20211217183930.16192-1-sander@svanheule.net> From: Jiaxun Yang In-Reply-To: <20211217183930.16192-1-sander@svanheule.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/12/17 18:39, Sander Vanheule 写道: > In addition to CPS SMP setups, also try to initialise MT SMP setups with > multiple VPEs per CPU core. CMP SMP support is not provided as it is > considered deprecated. > > Additionally, rework the code by dropping the err variable and make it > similar to how other platforms perform this initialisation. Hi, Thanks for your patch :-) However there is a probem that register_vsmp_smp_ops never returns error if CONFIG_MIPS_MT_SMP is enabled. But generic kernel is supposed to run on systems with & without MT. So probably you need: diff --git a/arch/mips/include/asm/smp-ops.h b/arch/mips/include/asm/smp-ops.h index 65618ff1280c..864aea803984 100644 --- a/arch/mips/include/asm/smp-ops.h +++ b/arch/mips/include/asm/smp-ops.h @@ -101,6 +101,9 @@ static inline int register_vsmp_smp_ops(void)  #ifdef CONFIG_MIPS_MT_SMP         extern const struct plat_smp_ops vsmp_smp_ops; +       if (!cpu_has_mipsmt) +               return -ENODEV; +         register_smp_ops(&vsmp_smp_ops);         return 0; Thanks. - Jiaxun