diff options
author | Helge Deller <deller@gmx.de> | 2019-04-02 12:13:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-17 08:38:49 +0200 |
commit | 41cf8111f3cbbc2be3a9f6e2b2e004b76a5784f0 (patch) | |
tree | b100421e25479ce21fdaa4315abb9a744294dfaf /arch/parisc/kernel/process.c | |
parent | ba5765a243ed004172dd1cd8174888c8eefec04c (diff) | |
download | linux-stable-41cf8111f3cbbc2be3a9f6e2b2e004b76a5784f0.tar.gz linux-stable-41cf8111f3cbbc2be3a9f6e2b2e004b76a5784f0.tar.bz2 linux-stable-41cf8111f3cbbc2be3a9f6e2b2e004b76a5784f0.zip |
parisc: Detect QEMU earlier in boot process
commit d006e95b5561f708d0385e9677ffe2c46f2ae345 upstream.
While adding LASI support to QEMU, I noticed that the QEMU detection in
the kernel happens much too late. For example, when a LASI chip is found
by the kernel, it registers the LASI LED driver as well. But when we
run on QEMU it makes sense to avoid spending unnecessary CPU cycles, so
we need to access the running_on_QEMU flag earlier than before.
This patch now makes the QEMU detection the fist task of the Linux
kernel by moving it to where the kernel enters the C-coding.
Fixes: 310d82784fb4 ("parisc: qemu idle sleep support")
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/parisc/kernel/process.c')
-rw-r--r-- | arch/parisc/kernel/process.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index eb39e7e380d7..841db71958cd 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -210,12 +210,6 @@ void __cpuidle arch_cpu_idle(void) static int __init parisc_idle_init(void) { - const char *marker; - - /* check QEMU/SeaBIOS marker in PAGE0 */ - marker = (char *) &PAGE0->pad0; - running_on_qemu = (memcmp(marker, "SeaBIOS", 8) == 0); - if (!running_on_qemu) cpu_idle_poll_ctrl(1); |