From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D51525BAC5 for ; Tue, 11 Mar 2025 14:41:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741704108; cv=none; b=tiWlOk+bLx9w6CfoWo9CtNJ+gOqABXQdQM8S2wzg4EQbVil3zQN5ltUIhrEJaJH/wQyBm8Lf4eUN59fdXJZHuR3xVjZLWO4o0Xb9oAlBj1L79rCPYvBq84g9rWTOfJlkbjBImD5EHpUgk3vaj7fhbV1rsKil0x38Vf/tpU6Haik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741704108; c=relaxed/simple; bh=0wJy52imLo2qXDWiF+jhnQ97P44N/d4jBfcViSPXOjg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pychdy0aja0fKD3N9ilFgC1ABMGto82odqDy1adhPTdrnXRI99rd1V/Yfhawl6NmIP81qe1ZPZmHg328YYjPmcAfSG1YniApZAl3g+vEFLFpf3iDn1wqtSezFm+aWssifJZHmqepV+lZUEty8nHiZfR024YiKGtaPb4z3TB/Pmo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com; spf=none smtp.mailfrom=foss.arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=foss.arm.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250311075143.61078-2-yangyicong@huawei.com> 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