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 95986C3DA4A for ; Mon, 5 Aug 2024 14:45:46 +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=IVTgUnqA1DRjAXDtFl9V+2EIBOm9zJFYvJDOhyvkKjA=; b=hGFbbY8dmrJEttfEp9bgTzZpUg 7YLkU8CxsXZclhmHhlrYW8LXKaqalwVNbkBqHuTy4JyLMBYxFj1h3QNpXr8FCCe8pA5jx2c8B4NSX NMSKxYoAyYI7LxDup5kBiY6701mgXjGpWMSej79TKgnpW1Vk5/rBKs6KantfNT2y1tMjeyzryaGZV xASYFq5gGoh6snpWeX7VD5qsYLYUu2cTqYtvK2AiqGMU423DDuV7N/OiPQLgtrtb1A5JP6JGGnPgG SGuarYKYuWsudx3WS533fUu8fW1Brym6TxpXoI0xGuyELM2MPZQQp0z4mqKtX8c4MKY+mxULt13fu rD3Erj6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sayxt-0000000GBu4-3TMA; Mon, 05 Aug 2024 14:45:37 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sayxN-0000000GBp2-04v0 for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2024 14:45:06 +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 B58D4106F; Mon, 5 Aug 2024 07:45:26 -0700 (PDT) Received: from e133380.arm.com (e133380.arm.com [10.1.197.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AABAE3F5A1; Mon, 5 Aug 2024 07:44:59 -0700 (PDT) Date: Mon, 5 Aug 2024 15:44:53 +0100 From: Dave Martin To: Frederic Weisbecker Cc: LKML , Russell King , linux-arm-kernel@lists.infradead.org, Andrew Morton , Peter Zijlstra , Thomas Gleixner , Nicolas Pitre Subject: Re: [PATCH 01/20] arm/bL_switcher: Use kthread_run_on_cpu() Message-ID: References: <20240726215701.19459-1-frederic@kernel.org> <20240726215701.19459-2-frederic@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240726215701.19459-2-frederic@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_074505_126220_B9F8C730 X-CRM114-Status: GOOD ( 18.77 ) 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 Hi, On Fri, Jul 26, 2024 at 11:56:37PM +0200, Frederic Weisbecker wrote: > Use the proper API instead of open coding it. > > Signed-off-by: Frederic Weisbecker > --- > arch/arm/common/bL_switcher.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c > index 9a9aa53547a6..d1e82a318e3b 100644 > --- a/arch/arm/common/bL_switcher.c > +++ b/arch/arm/common/bL_switcher.c > @@ -307,13 +307,11 @@ static struct task_struct *bL_switcher_thread_create(int cpu, void *arg) > { > struct task_struct *task; > > - task = kthread_create_on_node(bL_switcher_thread, arg, > - cpu_to_node(cpu), "kswitcher_%d", cpu); > - if (!IS_ERR(task)) { > - kthread_bind(task, cpu); > - wake_up_process(task); > - } else > + task = kthread_run_on_cpu(bL_switcher_thread, arg, > + cpu, "kswitcher_%d"); > + if (IS_ERR(task)) > pr_err("%s failed for CPU %d\n", __func__, cpu); > + > return task; > } It's ages since I worked on this, but it looks like this is pure refactoring. So far as I can see, it does the right thing, so, FWIW: Reviewed-by: Dave Martin I don't currently have hardware I can test this on, though. Nico (Cc added) might just possibly have an opinion on it, though this looks uncontroversial. Cheers ---Dave