From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Chen-Yu Tsai <wens@csie.org>
Subject: Re: BUG?: kernel does not (re)set irq smp_affinity to reboot_cpu
Date: Mon, 27 Jun 2016 10:45:52 +0100 [thread overview]
Message-ID: <20160627094552.GE1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <5770EE21.90103@arm.com>
On Mon, Jun 27, 2016 at 10:13:05AM +0100, Marc Zyngier wrote:
> I'm wondering if that's not an effect of this patch:
>
> https://lkml.org/lkml/2015/9/24/138
>
> missing on the ARM side (the corresponding arm64 patch is 217d453d473c).
No, because we don't take the other CPUs offline through CPU hotplug at
reboot - we stop them. That's because CPU hotplug involves scheduling,
and a reboot can't be scheduled as it can happen from IRQ contexts.
For a long time, we have not supported IRQs on any CPU after the system
has gone down for halt/reboot/poweroff etc:
ipi_cpu_stop() disables IRQs and FIQs before entering an infinite loop.
machine_{halt,power_off,restart}() in arch/arm/kernel/reboot.c disables
IRQs on the requesting CPU.
So, IRQs get disabled on _all_ CPUs. Code after this point should not
re-enable IRQs to be able to use drivers, which it sounds like what's
happening in Hans scenario. Remember, as I've said above, these paths
should not even be scheduling, and should never be reliant on receiving
interrupts. *Especially* as they can themselves be called from IRQ
context.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-06-27 9:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-26 16:00 BUG?: kernel does not (re)set irq smp_affinity to reboot_cpu Hans de Goede
2016-06-27 9:13 ` Marc Zyngier
2016-06-27 9:45 ` Russell King - ARM Linux [this message]
2016-06-27 10:55 ` Hans de Goede
2016-06-27 11:31 ` Russell King - ARM Linux
2016-06-27 11:46 ` Russell King - ARM Linux
2016-06-27 12:53 ` Hans de Goede
2016-06-27 13:57 ` Russell King - ARM Linux
2016-06-27 14:37 ` Hans de Goede
2016-06-27 14:54 ` Mark Rutland
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=20160627094552.GE1041@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=tglx@linutronix.de \
--cc=wens@csie.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox