[<prev] [next>] [day] [month] [year] [list]
Message-ID: <160243904845.7002.9242941989235213103.tip-bot2@tip-bot2>
Date: Sun, 11 Oct 2020 17:57:28 -0000
From: "tip-bot2 for Marc Zyngier" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Marc Zyngier <maz@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: irq/core] arm: Move ipi_teardown() to a CONFIG_HOTPLUG_CPU section
The following commit has been merged into the irq/core branch of tip:
Commit-ID: ac15a54e03d13686d2fc016a88311801b0734046
Gitweb: https://git.kernel.org/tip/ac15a54e03d13686d2fc016a88311801b0734046
Author: Marc Zyngier <maz@...nel.org>
AuthorDate: Fri, 18 Sep 2020 17:19:46 +01:00
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Fri, 18 Sep 2020 17:40:48 +01:00
arm: Move ipi_teardown() to a CONFIG_HOTPLUG_CPU section
ipi_teardown() is only used when CONFIG_HOTPLUG_CPU is enabled.
Move the function to a location guarded by this config option.
Signed-off-by: Marc Zyngier <maz@...nel.org>
---
arch/arm/kernel/smp.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 00327fa..8425da5 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -85,7 +85,6 @@ static int nr_ipi __read_mostly = NR_IPI;
static struct irq_desc *ipi_desc[MAX_IPI] __read_mostly;
static void ipi_setup(int cpu);
-static void ipi_teardown(int cpu);
static DECLARE_COMPLETION(cpu_running);
@@ -236,6 +235,17 @@ int platform_can_hotplug_cpu(unsigned int cpu)
return cpu != 0;
}
+static void ipi_teardown(int cpu)
+{
+ int i;
+
+ if (WARN_ON_ONCE(!ipi_irq_base))
+ return;
+
+ for (i = 0; i < nr_ipi; i++)
+ disable_percpu_irq(ipi_irq_base + i);
+}
+
/*
* __cpu_disable runs on the processor to be shutdown.
*/
@@ -707,17 +717,6 @@ static void ipi_setup(int cpu)
enable_percpu_irq(ipi_irq_base + i, 0);
}
-static void ipi_teardown(int cpu)
-{
- int i;
-
- if (WARN_ON_ONCE(!ipi_irq_base))
- return;
-
- for (i = 0; i < nr_ipi; i++)
- disable_percpu_irq(ipi_irq_base + i);
-}
-
void __init set_smp_ipi_range(int ipi_base, int n)
{
int i;
Powered by blists - more mailing lists