All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	rt@linutronix.de, Richard Cochran <rcochran@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Len Brown <lenb@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-acpi@vger.kernel.org,
	Anna-Maria Gleixner <anna-maria@linutronix.de>
Subject: [patch V2 37/67] ACPI/processor: Avoid STARTING/DYING actions in a more logical way
Date: Wed, 13 Jul 2016 17:16:38 -0000	[thread overview]
Message-ID: <20160713153335.964962885@linutronix.de> (raw)
In-Reply-To: 20160713153219.128052238@linutronix.de

[-- Attachment #1: 0036-ACPI-processor-Avoid-STARTING-DYING-actions-in-a-mor.patch --]
[-- Type: text/plain, Size: 1819 bytes --]

From: Richard Cochran <rcochran@linutronix.de>

As part of the hotplug cleanup, the CPU_STARTING/DYING actions are going
away soon.  This driver needlessly uses those two macro, and so this patch
replaces that code with something more sensible.

Commit:

  8da8373447d6a57a5a9f55233d35beb15d92d0d2 ("ACPI / processor: Fix STARTING/DYING action in acpi_cpu_soft_notify()")

added checks for those two actions, because the notification callback can
sleep, causing a hung CPU. This patch instead checks for the ONLINE/DEAD
actions, which are the ones that are handled by the driver in the first
place.

Signed-off-by: Richard Cochran <rcochran@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Len Brown <lenb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-acpi@vger.kernel.org
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
---
 drivers/acpi/processor_driver.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index d2fa8cb..eecdb19 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -118,12 +118,13 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
 	struct acpi_device *device;
 	action &= ~CPU_TASKS_FROZEN;
 
-	/*
-	 * CPU_STARTING and CPU_DYING must not sleep. Return here since
-	 * acpi_bus_get_device() may sleep.
-	 */
-	if (action == CPU_STARTING || action == CPU_DYING)
+	switch (action) {
+	case CPU_ONLINE:
+	case CPU_DEAD:
+		break;
+	default:
 		return NOTIFY_DONE;
+	}
 
 	if (!pr || acpi_bus_get_device(pr->handle, &device))
 		return NOTIFY_DONE;
-- 
2.8.1




  parent reply	other threads:[~2016-07-13 17:18 UTC|newest]

Thread overview: 196+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 17:16 [patch V2 00/67] cpuhotplug: Convert all priority notifiers to the state machine Anna-Maria Gleixner
2016-07-13 17:16 ` [patch V2 02/67] x86/vdso: Convert to hotplug " Anna-Maria Gleixner
2016-07-19  6:58   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 01/67] cpuhotplug: Handle early registration gracefully Anna-Maria Gleixner
2016-07-19  6:57   ` [tip:smp/hotplug] cpu/hotplug: " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 03/67] irqchip/gic: Convert to hotplug state machine Anna-Maria Gleixner
2016-07-19  6:58   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 04/67] irqchip/gicv3: " Anna-Maria Gleixner
2016-07-19  6:59   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 05/67] irqchip/hip04: " Anna-Maria Gleixner
2016-07-19  6:59   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 07/67] irqchip/bcm2836: " Anna-Maria Gleixner
2016-07-19  7:00   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 06/67] irqchip/armada-370-xp: " Anna-Maria Gleixner
2016-07-19  7:00   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 08/67] ARM: mvebu: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:01   ` [tip:smp/hotplug] ARM/mvebu: " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 09/67] perf/core: " Anna-Maria Gleixner
2016-07-19  7:01   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 10/67] perf/x86: Convert the core to the " Anna-Maria Gleixner
2016-07-19  7:02   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 11/67] perf/x86/intel/uncore: Convert to " Anna-Maria Gleixner
2016-07-19  7:02   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 12/67] perf/x86/amd/uncore: " Anna-Maria Gleixner
2016-07-19  7:03   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 13/67] perf/x86/amd/ibs: " Anna-Maria Gleixner
2016-07-19  7:03   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 14/67] perf/x86/intel/rapl: " Anna-Maria Gleixner
2016-07-19  7:04   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 15/67] perf/x86/intel/cqm: Convert Intel CQM " Anna-Maria Gleixner
2016-07-19  7:04   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 16/67] perf/x86/intel/cstate: Convert Intel CSTATE " Anna-Maria Gleixner
2016-07-19  7:05   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 17/67] blackfin/perf: Convert hotplug notifier to " Anna-Maria Gleixner
2016-07-19  7:05   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 18/67] powerpc/perf: Convert book3s notifier to state machine callbacks Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:06   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 19/67] s390/perf: Convert the hotplug notifier to state machine callbacks (Counter) Anna-Maria Gleixner
2016-07-19  7:07   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 20/67] s390/perf: Convert the hotplug notifier to state machine callbacks (Sampling) Anna-Maria Gleixner
2016-07-19  7:07   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 21/67] sh/perf: Convert the hotplug notifiers to state machine callbacks Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:07   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 22/67] bus/arm-cci: Convert to hotplug statemachine Anna-Maria Gleixner
2016-07-15 12:38   ` Punit Agrawal
2016-07-19  7:08   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 23/67] bus/arm-ccn: " Anna-Maria Gleixner
2016-07-18 18:37   ` Pawel Moll
2016-07-19  7:09   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 24/67] xtensa/perf: Convert the hotplug notifier to state machine callbacks Anna-Maria Gleixner
2016-07-19  7:09   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 25/67] perf/x86/amd/power: Change hotplug notifier to a symmetric structure Anna-Maria Gleixner
2016-07-19  7:10   ` [tip:smp/hotplug] " tip-bot for Anna-Maria Gleixner
2016-07-13 17:16 ` [patch V2 26/67] perf/x86/amd/power: Convert the hotplug notifier to state machine Anna-Maria Gleixner
2016-07-19  7:11   ` [tip:smp/hotplug] " tip-bot for Anna-Maria Gleixner
2016-07-13 17:16 ` [patch V2 27/67] perf/core: Remove perf CPU notifier code Anna-Maria Gleixner
2016-07-19  7:11   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 28/67] workqueue: Convert to state machine callbacks Anna-Maria Gleixner
2016-07-19  7:12   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 29/67] x86/hpet: Convert to hotplug state machine Anna-Maria Gleixner
2016-07-19  7:13   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 30/67] powerpc/numa: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-14 21:42   ` Anton Blanchard
2016-07-14 23:37     ` Anna-Maria Gleixner
2016-07-15  0:28       ` Anton Blanchard
2016-07-15  8:43         ` Ingo Molnar
2016-07-15 12:14           ` Anton Blanchard
2016-07-15 16:20         ` Sebastian Andrzej Siewior
2016-07-15 16:20           ` Sebastian Andrzej Siewior
2016-07-18 14:07           ` [PATCH v2] " Sebastian Andrzej Siewior
2016-07-18 14:07             ` Sebastian Andrzej Siewior
2016-07-22 19:57             ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 31/67] KVM/x86: Remove superfluous SMP function call Anna-Maria Gleixner
2016-07-14  8:21   ` Paolo Bonzini
2016-07-19  7:13   ` [tip:smp/hotplug] " tip-bot for Anna-Maria Gleixner
2016-07-13 17:16 ` [patch V2 32/67] x86/kvm/kvmclock: Convert to hotplug state machine Anna-Maria Gleixner
2016-07-19  7:14   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 33/67] x86/apb_timer: " Anna-Maria Gleixner
2016-07-19  7:14   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 34/67] arm: Convert VFP hotplug notifiers to " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:15   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 35/67] arm/perf: Convert to hotplug " Anna-Maria Gleixner
2016-07-15 13:08   ` Mark Rutland
2016-07-15 15:26     ` Sebastian Andrzej Siewior
2016-07-15 16:16       ` Mark Rutland
2016-07-19  7:16   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-19  7:35     ` Sebastian Andrzej Siewior
2016-07-19  7:48       ` Ingo Molnar
2016-07-19  9:02         ` [PATCH v2] " Sebastian Andrzej Siewior
2016-07-19  9:57           ` Mark Rutland
2016-07-19 11:17             ` [PATCH v3] " Sebastian Andrzej Siewior
2016-07-20  8:01               ` Ingo Molnar
2016-07-20 10:41               ` [tip:smp/hotplug] arm/perf: Fix hotplug state machine conversion tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 36/67] virt: Convert kvm hotplug to state machine Anna-Maria Gleixner
2016-07-19  7:16   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` Anna-Maria Gleixner [this message]
2016-07-19  7:17   ` [tip:smp/hotplug] ACPI/processor: Avoid STARTING/DYING actions in a more logical way tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 38/67] clocksource/arm_arch_timer: Convert to hotplug state machine Anna-Maria Gleixner
2016-07-19  7:17   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 39/67] clocksource/dummy_timer: " Anna-Maria Gleixner
2016-07-19  7:18   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 40/67] clocksource/metag: " Anna-Maria Gleixner
2016-07-19  7:19   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 41/67] clocksource/qcom-timer: " Anna-Maria Gleixner
2016-07-19  7:19   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 42/67] clocksource/mips-gic: " Anna-Maria Gleixner
2016-07-19  7:20   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 43/67] leds/trigger/cpu: " Anna-Maria Gleixner
2016-07-14  7:19   ` Jacek Anaszewski
2016-07-14  7:47     ` Ingo Molnar
2016-07-14  8:10       ` Jacek Anaszewski
2016-07-14  9:41         ` Peter Zijlstra
2016-07-14 11:23           ` Jacek Anaszewski
2016-07-14 11:33             ` Thomas Gleixner
2016-07-14 11:55               ` Jacek Anaszewski
2016-07-15 14:10                 ` Sebastian Andrzej Siewior
2016-07-18  8:26                   ` Jacek Anaszewski
2016-07-19  7:20   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 44/67] arm/kvm/vgic: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:21   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 45/67] arm/kvm/arch_timer: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:21   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 46/67] metag/perf: " Anna-Maria Gleixner
2016-07-19  7:22   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 47/67] arm/l2c: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:22   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 48/67] arm/twd: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:23   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 49/67] arm/xen: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-13 18:21   ` Stefano Stabellini
2016-07-13 18:21     ` Stefano Stabellini
2016-07-13 18:21   ` Stefano Stabellini
2016-07-19  7:23   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 50/67] MIPS/Loongson-3: Convert oprofile " Anna-Maria Gleixner
2016-07-19  7:24   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 51/67] hwtracing/coresight-etm3x: Convert " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:24   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 52/67] hwtracing/coresight-etm4x: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:25   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 53/67] arm64/armv8 deprecated: " Anna-Maria Gleixner
2016-07-13 17:16   ` Anna-Maria Gleixner
2016-07-19  7:25   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 54/67] x86/tboot: " Anna-Maria Gleixner
2016-07-19  7:26   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:16 ` [patch V2 55/67] hrtimer: " Anna-Maria Gleixner
2016-07-19  7:26   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:16 ` [patch V2 57/67] profile: " Anna-Maria Gleixner
2016-07-19  7:27   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:16 ` [patch V2 56/67] timers/core: " Anna-Maria Gleixner
2016-07-19  7:27   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-27  9:08   ` [PATCH] timers/core: Correct callback order during CPU hot plug Richard Cochran
     [not found]     ` <1469610498-25914-1-git-send-email-rcochran-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2016-07-27  9:50       ` Jon Hunter
2016-07-27  9:50         ` Jon Hunter
2016-07-28 15:34     ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-28 16:57     ` tip-bot for Richard Cochran
2016-07-13 17:17 ` [patch V2 58/67] x86/x2apic: Convert to CPU hotplug state machine Anna-Maria Gleixner
2016-07-19  7:28   ` [tip:smp/hotplug] " tip-bot for Sebastian Andrzej Siewior
2016-07-13 17:17 ` [patch V2 59/67] smp: Convert core to " Anna-Maria Gleixner
2016-07-19  7:28   ` [tip:smp/hotplug] smp/cfd: " tip-bot for Richard Weinberger
2016-07-13 17:17 ` [patch V2 60/67] KVM/arm/arm64/vgic-new: Convert " Anna-Maria Gleixner
2016-07-13 17:17   ` Anna-Maria Gleixner
2016-07-13 17:17   ` Anna-Maria Gleixner
2016-07-14 13:08   ` Marc Zyngier
2016-07-14 13:08     ` Marc Zyngier
2016-07-19  7:29   ` [tip:smp/hotplug] " tip-bot for Anna-Maria Gleixner
2016-07-13 17:17 ` [patch V2 61/67] rcu: Convert rcutree " Anna-Maria Gleixner
2016-07-19  7:29   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2016-07-13 17:17 ` [patch V2 62/67] [PATCH] clocksource: arm_global_timer: Convert " Anna-Maria Gleixner
2016-07-13 17:17   ` Anna-Maria Gleixner
2016-07-19  7:30   ` [tip:smp/hotplug] clocksource/arm_global_timer: " tip-bot for Richard Cochran
2016-07-13 17:17 ` [patch V2 63/67] clocksource/exynos_mct: " Anna-Maria Gleixner
2016-07-19  7:31   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:17 ` [patch V2 64/67] clocksource/armada-370-xp: " Anna-Maria Gleixner
2016-07-19  7:31   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:17 ` [patch V2 65/67] clocksource/atlas7: " Anna-Maria Gleixner
2016-07-19  7:32   ` [tip:smp/hotplug] " tip-bot for Richard Cochran
2016-07-13 17:17 ` [patch V2 66/67] ARC/time: " Anna-Maria Gleixner
2016-07-13 17:17   ` Anna-Maria Gleixner
2016-07-19  7:32   ` [tip:smp/hotplug] " tip-bot for Anna-Maria Gleixner
2016-07-13 17:17 ` [patch V2 67/67] cpuhotplug: Remove CPU_STARTING and CPU_DYING notifier Anna-Maria Gleixner
2016-07-13 19:32 ` [patch V2 00/67] cpuhotplug: Convert all priority notifiers to the state machine Jason Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160713153335.964962885@linutronix.de \
    --to=anna-maria@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rcochran@linutronix.de \
    --cc=rjw@rjwysocki.net \
    --cc=rt@linutronix.de \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.