From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E848F1FF7B4 for ; Tue, 12 Nov 2024 14:23:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731421393; cv=none; b=ARqW22jqHQACtK0ew95lgG4lAq768sf/hqx42mQqlenLipXXi20EemEZb5Pq1EbgazYm7XTOtsrQILCOkcapgzlrTWGlO6T78/Kx10Kf/N74nxrgk0fFK7xRq9buu0hBXHvXk/SXU7DRBXJ/6Nu1/3fztohS5sqdmK0ciVaOd9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731421393; c=relaxed/simple; bh=bRL09e91cC7LQEEs/ysPp5d5gcrpXYKGy36AOC6GrXg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CXM01NLfCfHot8/fZPj5LyXDEr85nDR4ADH/nBabye1sKz3pZExuxG2c4juKmzFYDEN6qZ69InRYvGEyqZ8B5MOdvyrcIWsdPG4+Pnz359ldbhtRm0REl9tbumyiOyDfe94dmtqMsO8DtWkZBk3FrEvpCuebkFbXLDVjGLw+Ci0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FGhTRjlX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FGhTRjlX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42C81C4CED0; Tue, 12 Nov 2024 14:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731421392; bh=bRL09e91cC7LQEEs/ysPp5d5gcrpXYKGy36AOC6GrXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FGhTRjlXzf9QiP2GqFP1n90Yp6Gy7ImytAGPN2sgtkGb2yFXEkeux54f8ZtKbY6o6 a4wcjzEOo9cwkepshRkUQYk1BfaFTtOX2XW+4syhItoE8tbJzybrx32h8m9Ut/0r3f R+Xd12RHGsFv7Y3QLffEjH4uGVjnG1+FKoSbc32spUwStbwoEDLSRhpmXHKhkl0r9p eVnGHCcHmhCT8KUCs3qGDTShB3Bzjjn6j0Fgo5iPCXZibgHfeKeFiNV2mBrdxo/78Z 9gUkf3mruDYOIZBZQIe/RbPw8wpI5jt2y9RFLkg0FLYZHP4jApEqyLTwn/d4JNZ1n7 oLrZxre4KRLug== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Andrew Morton , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 07/21] soc/qman: test: Use kthread_run_on_cpu() Date: Tue, 12 Nov 2024 15:22:31 +0100 Message-ID: <20241112142248.20503-8-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241112142248.20503-1-frederic@kernel.org> References: <20241112142248.20503-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use the proper API instead of open coding it. However it looks like kthreads here could be replaced by the use of a per-cpu workqueue instead. Signed-off-by: Frederic Weisbecker --- drivers/soc/fsl/qbman/qman_test_stash.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman_test_stash.c b/drivers/soc/fsl/qbman/qman_test_stash.c index b7e8e5ec884c..f4d3c2146f4f 100644 --- a/drivers/soc/fsl/qbman/qman_test_stash.c +++ b/drivers/soc/fsl/qbman/qman_test_stash.c @@ -108,14 +108,12 @@ static int on_all_cpus(int (*fn)(void)) .fn = fn, .started = ATOMIC_INIT(0) }; - struct task_struct *k = kthread_create(bstrap_fn, &bstrap, - "hotpotato%d", cpu); + struct task_struct *k = kthread_run_on_cpu(bstrap_fn, &bstrap, + cpu, "hotpotato%d"); int ret; if (IS_ERR(k)) return -ENOMEM; - kthread_bind(k, cpu); - wake_up_process(k); /* * If we call kthread_stop() before the "wake up" has had an * effect, then the thread may exit with -EINTR without ever -- 2.46.0