Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2471645pxy; Tue, 3 Aug 2021 07:19:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu5dTiZ6rN0V6NGHDuFJzBo9cUgXC4tusA9laHUdlxf9D1so9lpDfsZYseNGNVJQFQxMfW X-Received: by 2002:a6b:3e8b:: with SMTP id l133mr223886ioa.137.1628000386528; Tue, 03 Aug 2021 07:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628000386; cv=none; d=google.com; s=arc-20160816; b=LbJKvqcr2hPyZcKcqFFchDfhmc0MxhF4SabqtO/h+mqwo5ODW0PEPsIv5n5MCUsokT Dx3V/nFrOpXOb7dak0O5MKasP1rMd14kccxdp4dNDAo6hZ25adzdYeggdMoDRTuo8WJm JHTcMv5As7gmJjlECDK8w4mBMhzmVzyPt+qIpyqylx7BG8k6kn1mt3EY8hOW2xDKQURr SRo8xcHhI/LctB7zzHOT/6plos7H//F0O34os9BfS7l9+Vk8CHrUmJ1HpN2kei+dux0j 48DxGkHv9h3SZd06icQ/67TuwB0oWVZFA9yINmhaRmrIUcd+YkSy2MLYYK9giS3jF3zw gSNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=P65i0gbKnhTxPKHg3SSzE6N4pinsJNni4QQoI0J6eF8=; b=OlxNyRfHoPBkP8ueBwmWfHx9wdwKukdtFKjUAE8SusBo/o3u5fJBuRiQl8V/hvKWCD lrR6Wh1epUQzE0/N7G8SZlCKlTE5cGUZRhfJbvnlyaTcBGiA2rUur++ChHwEpxVxipmS wlTYFyB4IiV4sT5XoCKTGyNZV4E508lQGVCA5dLX5rCxNFS0ZzBknWpDMoh1w0O0os+E NxM7AS/2RDWlsgA2K2XuvvurV6zMiJ4d/rQySSDFMwi4BZK+4Ao5S1XSsm8ZnO/iOTUN O21KdCVWO7oWJgI75bLBQ0S2eLEpXKsK/B+buxQEFp+ypQjc06QcV/00s+dbgbohxtHh t12w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JiWp6P+5; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si14801687iod.50.2021.08.03.07.19.34; Tue, 03 Aug 2021 07:19:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JiWp6P+5; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236626AbhHCOS2 (ORCPT + 99 others); Tue, 3 Aug 2021 10:18:28 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:57148 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236592AbhHCORY (ORCPT ); Tue, 3 Aug 2021 10:17:24 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628000232; 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=P65i0gbKnhTxPKHg3SSzE6N4pinsJNni4QQoI0J6eF8=; b=JiWp6P+50wwCOHKHwPEHFju5X3ZiQT/XoOY6uZNPAfn3hQwYToLffVzzJ8adMxohpPtxU5 5vQyThrPq9M8LQCvg2oEgPoNU6asA2PyUbVP24207B6YPp86tHqxG5+e+c2zkvCanHO8m5 /4dAe1N/myW+AdFkF+/sjUy7bJFs0kW0DvHZlOyrDkVsw/D4yqRlVSOKj56XqT+FIWkhka K20jSKCEollkUB22ENzheBNqnTKzUrg1oM0zCRaA1TltOlb2VKhvYXAnabo6BOsYiDdrq4 WfGjFeWCh+WY0svH1pztdh5HBMlJBrM28op9j/Z4yNdWOmaov1jinvEpqGLsOA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628000232; 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=P65i0gbKnhTxPKHg3SSzE6N4pinsJNni4QQoI0J6eF8=; b=mESumFs4eF6qYKUducYMb0eOx+3AjcXP187Herw9jmTdz2xqxRqKdIZoffpc/Ux+I2KTmB ykvLmw2cTGQ085Cg== To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Peter Zijlstra , Sebastian Andrzej Siewior , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , live-patching@vger.kernel.org Subject: [PATCH 26/38] livepatch: Replace deprecated CPU-hotplug functions. Date: Tue, 3 Aug 2021 16:16:09 +0200 Message-Id: <20210803141621.780504-27-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: Josh Poimboeuf Cc: Jiri Kosina Cc: Miroslav Benes Cc: Petr Mladek Cc: Joe Lawrence Cc: live-patching@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- kernel/livepatch/transition.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c index 3a4beb9395c48..291b857a6e201 100644 --- a/kernel/livepatch/transition.c +++ b/kernel/livepatch/transition.c @@ -411,7 +411,7 @@ void klp_try_complete_transition(void) /* * Ditto for the idle "swapper" tasks. */ - get_online_cpus(); + cpus_read_lock(); for_each_possible_cpu(cpu) { task =3D idle_task(cpu); if (cpu_online(cpu)) { @@ -423,7 +423,7 @@ void klp_try_complete_transition(void) task->patch_state =3D klp_target_state; } } - put_online_cpus(); + cpus_read_unlock(); =20 if (!complete) { if (klp_signals_cnt && !(klp_signals_cnt % SIGNALS_TIMEOUT)) --=20 2.32.0