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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF8D0C282EC for ; Tue, 11 Mar 2025 14:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9sGCh5e4a8Av+BTXu+TbisFIn3CL2BaF8ghukzBXizQ=; b=CwiCG3olRTBqEpDBwTV97zlZsv v/V4ZKYqE5y2JAepO1xxo5KsubFErYl245cAmQ6p8J9dGii5MGNvjzaduZGS6/0lx4LoHBmLo8AFL u6vt3xtj7IJQ7HgDtAR1HT8uoMxh7KCD3HFDzKXObzUKxw9R5LCF0OmDWOzMHtJO53+sAmXf8nXoz +307ejzTZ2yj3OlPMHqlpCnGm6pp05hEffyV4ykmXzmvA992MamA9cd7WhIjq/j/hNCBjxOM0yceW G9CSYtKEcdSpRv/jSe8jgq7GY9vNMcjFDt7sdrBwllHhWIfLoin+TWBN6Gp3+44MPf1ELXY+Xcv7u o/u9jKTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ts0rh-000000061rh-2Fha; Tue, 11 Mar 2025 14:45:53 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ts0nj-000000060zd-0Qle for linux-arm-kernel@lists.infradead.org; Tue, 11 Mar 2025 14:41:48 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CE9EE1762; Tue, 11 Mar 2025 07:41:57 -0700 (PDT) Received: from bogus (e133711.arm.com [10.1.196.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A5C703F694; Tue, 11 Mar 2025 07:41:42 -0700 (PDT) Date: Tue, 11 Mar 2025 14:41:39 +0000 From: Sudeep Holla To: Yicong Yang Cc: , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v12 1/4] cpu/SMT: Provide a default topology_is_primary_thread() Message-ID: References: <20250311075143.61078-1-yangyicong@huawei.com> <20250311075143.61078-2-yangyicong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250311075143.61078-2-yangyicong@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250311_074147_180866_10742261 X-CRM114-Status: GOOD ( 13.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 11, 2025 at 03:51:40PM +0800, Yicong Yang wrote: > From: Yicong Yang > > Currently if architectures want to support HOTPLUG_SMT they need to > provide a topology_is_primary_thread() telling the framework which > thread in the SMT cannot offline. However arm64 doesn't have a > restriction on which thread in the SMT cannot offline, a simplest > choice is that just make 1st thread as the "primary" thread. So > just make this as the default implementation in the framework and > let architectures like x86 that have special primary thread to > override this function (which they've already done). > > There's no need to provide a stub function if !CONFIG_SMP or > !CONFIG_HOTPLUG_SMT. In such case the testing CPU is already > the 1st CPU in the SMT so it's always the primary thread. > LGTM: Reviewed-by: Sudeep Holla > + * enabled/active. Architectures do have a special primary thread If you respin ^^ s/do/that/ or s/do/that do/ -- Regards, Sudeep