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 D763A13C67E for ; Mon, 5 Aug 2024 14:45:01 +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=1722869103; cv=none; b=Lzi2FS5pFVYQC/q4i3kNG2Vvut6HyU9G+YJ1bd3v5PhKTsAL8yCJB93TmL6oFU0pOmiUZwLSF2j+QpSEb5NiKzZeXeOQX7zqEJUapCvkfmWoikLvo28diZk4ngU7+CYNDvWmAoryG2BYcuXzPs3l8U6Wb+9nCOiSPq3IyhNIKPg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722869103; c=relaxed/simple; bh=vC6nX0apxBLoU6EqUiVEoO9ic/umJEX70x5GeL9NS2Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jsQdQOCLZXKylEvY7tYUFL55J4EWsf9xz4CpM2/ZOjexp/+fh39YwtcHeNS+kAxcrRt9ZHot1QcxUhrIM0E1Pooj8ctiHT7Ii1/eOyLKq+JjtXpOokGOtGrSbgXoPfEDse6vL29KCV/OAipMD5pUDPobyJ6VclWIT/Z9uJneSpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=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 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> 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: <20240726215701.19459-2-frederic@kernel.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