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 X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 748CDC432BE for ; Tue, 3 Aug 2021 14:18:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BF2E6054F for ; Tue, 3 Aug 2021 14:18:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236960AbhHCOSu (ORCPT ); Tue, 3 Aug 2021 10:18:50 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:57282 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236621AbhHCOR1 (ORCPT ); Tue, 3 Aug 2021 10:17:27 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628000235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cLNYZvkB9oPbv+OYlOENW8vHs/YtcFNEvPRXInFrNxg=; b=p2GZgGODoJgV6O1Gt5wTALBKfM1x5S1toYPdWsfoiln/Vm6ICCB4Spgpf9eZaZ5Gldibhs fNx5zTfPNm5ES8HG3U13MohTAJfS9IhF5HMGpcX0dS+zz4UJNzTNRcW2zsvSgM51I5lgg6 YdmgafM72YuB2MzMc+SCAkulBDoqXsavenBFnjjgLIf6KfV9oUjKUbamxIkxNpapTpRruV pE7/q37VhZj/tjQsLAx/JiWZCft2NfsvvcjBJ8ZXT7Mb+uAd8wtRocj7XPe/AVK6oeL1qV g7+ooeOFptzhPLU50H6c29XlE4zp+Rwn4r6axBnRMb0H0CCF+cymZV1Gv8ML2g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628000235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cLNYZvkB9oPbv+OYlOENW8vHs/YtcFNEvPRXInFrNxg=; b=1noN6pEqfnuvSl8tJY/49mUUk6dR81B5+AzqH5ftSWwFITHTy9aRXWxDNg7aJ0bkaSPMwv G7xdqdeH9hT7ogCA== To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Peter Zijlstra , Sebastian Andrzej Siewior , Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett Subject: [PATCH 35/38] torture: Replace deprecated CPU-hotplug functions. Date: Tue, 3 Aug 2021 16:16:18 +0200 Message-Id: <20210803141621.780504-36-bigeasy@linutronix.de> In-Reply-To: <20210803141621.780504-1-bigeasy@linutronix.de> References: <20210803141621.780504-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The functions get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_read_lock() and cpus_read_unlock(). Replace deprecated CPU-hotplug functions with the official version. The behavior remains unchanged. Cc: Davidlohr Bueso Cc: "Paul E. McKenney" Cc: Josh Triplett Signed-off-by: Sebastian Andrzej Siewior --- kernel/torture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/torture.c b/kernel/torture.c index 0a315c387bedb..bb8f411c974b8 100644 --- a/kernel/torture.c +++ b/kernel/torture.c @@ -521,11 +521,11 @@ static void torture_shuffle_tasks(void) struct shuffle_task *stp; =20 cpumask_setall(shuffle_tmp_mask); - get_online_cpus(); + cpus_read_lock(); =20 /* No point in shuffling if there is only one online CPU (ex: UP) */ if (num_online_cpus() =3D=3D 1) { - put_online_cpus(); + cpus_read_unlock(); return; } =20 @@ -541,7 +541,7 @@ static void torture_shuffle_tasks(void) set_cpus_allowed_ptr(stp->st_t, shuffle_tmp_mask); mutex_unlock(&shuffle_task_mutex); =20 - put_online_cpus(); + cpus_read_unlock(); } =20 /* Shuffle tasks across CPUs, with the intent of allowing each CPU in the --=20 2.32.0