From patchwork Tue Aug 3 14:15:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12416459 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 C39E1C43214 for ; Tue, 3 Aug 2021 14:17:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACC0D60BD3 for ; Tue, 3 Aug 2021 14:17:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236448AbhHCORW (ORCPT ); Tue, 3 Aug 2021 10:17:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236531AbhHCORT (ORCPT ); Tue, 3 Aug 2021 10:17:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC168C061757; Tue, 3 Aug 2021 07:17:08 -0700 (PDT) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628000227; 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=zSsgkQyidqugKoRNTCZP5yDbH8jFazmpZt2/KUW+F/s=; b=Du4JS+BH/HTAUJZ9X5NLJmre8MxpiFP/Ky8LWI+7DJsTNnRtHowyOY3k+u//f7klolcEzJ H1f1allRSJNn7Y2Bzxdtkjy8ioxWmdhYKqJnfT1bpqav5nvYGCFUJniaVckcffZruPpP5V uH9xk5eRoPNBpvhh8fClS7mzvdorAvu6wDsUSRYbnSN/3PZbjLbnPbCUWPguu8E5SPJVcN jtWE9FqwMCvBIrYFYuo/5d7cMVKo4wf6EuLqEIh8KFSpsjxFdDEJ7XSjdCl6SaKFzMDF2d rlxmGrg7hQ09ySwpkJPQw5o++U0A9krvNw7v6nI6u1TtU6Knqo0HQv8HH1OTKQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628000227; 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=zSsgkQyidqugKoRNTCZP5yDbH8jFazmpZt2/KUW+F/s=; b=TGFVzas8ZsvkHvnkzz1TPwkqatK6j3kL5fnP32YZBs7HleTJS8N0vMc2HMFhWDedNsYQPZ 6P/3UrscLGsb+QAQ== To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Peter Zijlstra , Sebastian Andrzej Siewior , Tony Luck , Borislav Petkov , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , linux-edac@vger.kernel.org Subject: [PATCH 09/38] x86/mce/inject: Replace deprecated CPU-hotplug functions. Date: Tue, 3 Aug 2021 16:15:52 +0200 Message-Id: <20210803141621.780504-10-bigeasy@linutronix.de> In-Reply-To: <20210803141621.780504-1-bigeasy@linutronix.de> References: <20210803141621.780504-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-edac@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: Tony Luck Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: linux-edac@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- arch/x86/kernel/cpu/mce/inject.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c index 4e86d97f96530..0bfc14041bbb4 100644 --- a/arch/x86/kernel/cpu/mce/inject.c +++ b/arch/x86/kernel/cpu/mce/inject.c @@ -235,7 +235,7 @@ static void __maybe_unused raise_mce(struct mce *m) unsigned long start; int cpu; - get_online_cpus(); + cpus_read_lock(); cpumask_copy(mce_inject_cpumask, cpu_online_mask); cpumask_clear_cpu(get_cpu(), mce_inject_cpumask); for_each_online_cpu(cpu) { @@ -269,7 +269,7 @@ static void __maybe_unused raise_mce(struct mce *m) } raise_local(); put_cpu(); - put_online_cpus(); + cpus_read_unlock(); } else { preempt_disable(); raise_local(); @@ -529,7 +529,7 @@ static void do_inject(void) cpu = get_nbc_for_node(topology_die_id(cpu)); } - get_online_cpus(); + cpus_read_lock(); if (!cpu_online(cpu)) goto err; @@ -553,7 +553,7 @@ static void do_inject(void) } err: - put_online_cpus(); + cpus_read_unlock(); }