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=-20.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,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 30DFAC4338F for ; Tue, 10 Aug 2021 12:52:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09A9B60FC4 for ; Tue, 10 Aug 2021 12:52:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240893AbhHJMwa (ORCPT ); Tue, 10 Aug 2021 08:52:30 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:43190 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240849AbhHJMwZ (ORCPT ); Tue, 10 Aug 2021 08:52:25 -0400 Date: Tue, 10 Aug 2021 12:52:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628599922; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ekcc/ZwUVRvQ8FzJXJCuaiO/RfFX3ZEu6ubLcv4NSKk=; b=uNBjxaURk/sJh1cNtVh9c8G/tF80EJTy2UTmP5CZDzom033ZPGMCbLP8WvUbjRF8DiSIA9 U3cqAQqKikKAb/gS5RK8oqPp388TOJo4I7Kn9Fsvw1ZFQD+uUZkuSsAi9VeetYDjg+wXDx wd5WWxFML/gNZsoJ9NoSTjcQB7Mt/EPszGZzIyI5MTXI7BgVI43IDOT2zRIHdeo5JsnuI1 anRbQV0r5DU1YVMRbwPSBJ8+xxLA9AkagvskFBksZiwZTPuzbePd+BUOJAT/QnO3QLGAWm EzOlD6378SIDRltK3XGQeTdqjA3DL3odls2xOc6wL5b41ZQ9I2CaJPYkH/b0rA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628599922; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ekcc/ZwUVRvQ8FzJXJCuaiO/RfFX3ZEu6ubLcv4NSKk=; b=2i3rFW64nLsGaxW2pl4XDBZ9diLkFVp3DJrnQAuSfwIGbxQi3jQc+FMaQ9CdfdupIhPmGv Z6BZllFn6QMUdDDw== From: "tip-bot2 for Sebastian Andrzej Siewior" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/mtrr: Replace deprecated CPU-hotplug functions. Cc: Sebastian Andrzej Siewior , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210803141621.780504-8-bigeasy@linutronix.de> References: <20210803141621.780504-8-bigeasy@linutronix.de> MIME-Version: 1.0 Message-ID: <162859992162.395.6019915739574272273.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 1a351eefd4acc97145903b1c07e4d8b626854b82 Gitweb: https://git.kernel.org/tip/1a351eefd4acc97145903b1c07e4d8b626854b82 Author: Sebastian Andrzej Siewior AuthorDate: Tue, 03 Aug 2021 16:15:50 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 10 Aug 2021 14:46:27 +02:00 x86/mtrr: Replace deprecated CPU-hotplug functions. 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. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210803141621.780504-8-bigeasy@linutronix.de --- arch/x86/kernel/cpu/mtrr/mtrr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c index a76694b..2746cac 100644 --- a/arch/x86/kernel/cpu/mtrr/mtrr.c +++ b/arch/x86/kernel/cpu/mtrr/mtrr.c @@ -336,7 +336,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, replace = -1; /* No CPU hotplug when we change MTRR entries */ - get_online_cpus(); + cpus_read_lock(); /* Search for existing MTRR */ mutex_lock(&mtrr_mutex); @@ -398,7 +398,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, error = i; out: mutex_unlock(&mtrr_mutex); - put_online_cpus(); + cpus_read_unlock(); return error; } @@ -485,7 +485,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) max = num_var_ranges; /* No CPU hotplug when we change MTRR entries */ - get_online_cpus(); + cpus_read_lock(); mutex_lock(&mtrr_mutex); if (reg < 0) { /* Search for existing MTRR */ @@ -520,7 +520,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) error = reg; out: mutex_unlock(&mtrr_mutex); - put_online_cpus(); + cpus_read_unlock(); return error; }