From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org, jejb@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
"Theodore Ts'o" <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
Chuck Ebbert <cebbert@redhat.com>,
Domenico Andreoli <cavokz@gmail.com>, Willy Tarreau <w@1wt.eu>,
Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
Jake Edge <jake@lwn.net>, Eugene Teo <eteo@redhat.com>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Joerg Roedel <joro@8bytes.org>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>
Subject: [patch 53/60] x86: fix setup code crashes on my old 486 box
Date: Mon, 18 Aug 2008 11:45:30 -0700 [thread overview]
Message-ID: <20080818184530.GB29394@suse.de> (raw)
In-Reply-To: <20080818184035.GA29394@suse.de>
[-- Attachment #1: x86-fix-setup-code-crashes-on-my-old-486-box.patch --]
[-- Type: text/plain, Size: 3012 bytes --]
2.6.26-stable review patch. If anyone has any objections, please let us know.
------------------
From: Joerg Roedel <joro@8bytes.org>
commit 7b27718bdb1b70166383dec91391df5534d449ee upstream
yesterday I tried to reactivate my old 486 box and wanted to install a
current Linux with latest kernel on it. But it turned out that the
latest kernel does not boot because the machine crashes early in the
setup code.
After some debugging it turned out that the problem is the query_ist()
function. If this interrupt with that function is called the machine
simply locks up. It looks like a BIOS bug. Looking for a workaround for
this problem I wrote the attached patch. It checks for the CPUID
instruction and if it is not implemented it does not call the speedstep
BIOS function. As far as I know speedstep should be available since some
Pentium earliest.
Alan Cox observed that it's available since the Pentium II, so cpuid
levels 4 and 5 can be excluded altogether.
H. Peter Anvin cleaned up the code some more:
> Right in concept, but I dislike the implementation (duplication of the
> CPU detect code we already have). Could you try this patch and see if
> it works for you?
which, with a small modification to fix a build error with it the
resulting kernel boots on my machine.
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/boot/boot.h | 8 ++++++++
arch/x86/boot/cpucheck.c | 8 +-------
arch/x86/boot/main.c | 4 ++++
3 files changed, 13 insertions(+), 7 deletions(-)
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -25,6 +25,8 @@
#include <asm/boot.h>
#include <asm/setup.h>
+#define NCAPINTS 8
+
/* Useful macros */
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
@@ -242,6 +244,12 @@ int cmdline_find_option(const char *opti
int cmdline_find_option_bool(const char *option);
/* cpu.c, cpucheck.c */
+struct cpu_features {
+ int level; /* Family, or 64 for x86-64 */
+ int model;
+ u32 flags[NCAPINTS];
+};
+extern struct cpu_features cpu;
int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr);
int validate_cpu(void);
--- a/arch/x86/boot/cpucheck.c
+++ b/arch/x86/boot/cpucheck.c
@@ -30,13 +30,7 @@
#include <asm/required-features.h>
#include <asm/msr-index.h>
-struct cpu_features {
- int level; /* Family, or 64 for x86-64 */
- int model;
- u32 flags[NCAPINTS];
-};
-
-static struct cpu_features cpu;
+struct cpu_features cpu;
static u32 cpu_vendor[3];
static u32 err_flags[NCAPINTS];
--- a/arch/x86/boot/main.c
+++ b/arch/x86/boot/main.c
@@ -73,6 +73,10 @@ static void keyboard_set_repeat(void)
*/
static void query_ist(void)
{
+ /* Some 486 BIOSes apparently crash on this call */
+ if (cpu.level < 6)
+ return;
+
asm("int $0x15"
: "=a" (boot_params.ist_info.signature),
"=b" (boot_params.ist_info.command),
--
next prev parent reply other threads:[~2008-08-18 19:11 UTC|newest]
Thread overview: 113+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080818191012.663450219@mini.kroah.org>
[not found] ` <20080818183230.966310219@mini.kroah.org>
2008-08-18 18:40 ` [patch 00/60] 2.6.26-stable review Greg KH
2008-08-18 18:41 ` [patch 01/60] mlock() fix return values Greg KH
2008-08-18 18:41 ` [patch 02/60] SCSI: ses: fix VPD inquiry overrun Greg KH
2008-08-18 18:41 ` [patch 03/60] SCSI: scsi_transport_spi: fix oops in revalidate Greg KH
2008-08-18 18:41 ` [patch 04/60] SCSI: block: Fix miscalculation of sg_io timeout in CDROM_SEND_PACKET handler Greg KH
2008-08-18 18:41 ` [patch 05/60] SCSI: hptiop: add more PCI device IDs Greg KH
2008-08-18 18:41 ` [patch 06/60] vt8623fb: fix kernel oops Greg KH
2008-08-18 18:41 ` [patch 07/60] relay: fix "full buffer with exactly full last subbuffer" accounting problem Greg KH
2008-08-18 18:41 ` [patch 08/60] ide-cd: fix endianity for the error message in cdrom_read_capacity Greg KH
2008-08-18 18:41 ` [patch 09/60] posix-timers: do_schedule_next_timer: fix the setting of ->si_overrun Greg KH
2008-08-18 18:41 ` [patch 10/60] posix-timers: fix posix_timer_event() vs dequeue_signal() race Greg KH
2008-08-18 18:42 ` [patch 11/60] radeonfb: fix accel engine hangs Greg KH
2008-08-18 18:42 ` [patch 12/60] matrox maven: fix a broken error path Greg KH
2008-08-18 18:42 ` [patch 13/60] USB: pl2023: Remove USB id (4348:5523) handled by ch341 Greg KH
2008-08-18 18:42 ` [patch 14/60] USB: fix interface unregistration logic Greg KH
2008-08-18 18:42 ` [patch 15/60] usb-storage: unusual_devs entries for iRiver T10 and Datafab CF+SM reader Greg KH
2008-08-18 18:43 ` [patch 16/60] USB: usb-storage: quirk around v1.11 firmware on Nikon D4 Greg KH
2008-08-18 18:43 ` [patch 17/60] usb-serial: dont release unregistered minors Greg KH
2008-08-18 18:43 ` [patch 18/60] USB: ftdi_sio: add support for Luminance Stellaris Evaluation/Development Kits Greg KH
2008-08-18 18:43 ` [patch 19/60] USB: ftdi_sio: Add USB Product Id for ELV HS485 Greg KH
2008-08-18 18:43 ` [patch 20/60] ipvs: Fix possible deadlock in estimator code Greg KH
2008-08-19 0:31 ` Simon Horman
2008-08-18 18:43 ` [patch 21/60] acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops Greg KH
2008-08-18 18:43 ` [patch 22/60] CIFS: mount of IPC$ breaks with iget patch Greg KH
2008-08-18 18:43 ` [patch 23/60] CIFS: if get root inode fails during mount, cleanup tree connection Greg KH
2008-08-18 18:43 ` [patch 24/60] dccp: change L/R must have at least one byte in the dccpsf_val field Greg KH
2008-08-18 18:43 ` [patch 25/60] syncookies: Make sure ECN is disabled Greg KH
2008-08-18 18:43 ` [patch 26/60] random32: seeding improvement Greg KH
2008-08-18 18:43 ` [patch 27/60] ipv6: Fix ip6_xmit to send fragments if ipfragok is true Greg KH
2008-08-18 18:44 ` [patch 28/60] sparc64: FUTEX_OP_ANDN fix Greg KH
2008-08-18 18:44 ` [patch 29/60] sparc64: Fix global reg snapshotting on self-cpu Greg KH
2008-08-18 18:44 ` [patch 30/60] sparc64: Do not clobber %g7 in setcontext() trap Greg KH
2008-08-18 18:44 ` [patch 31/60] KVM: task switch: segment base is linear address Greg KH
2008-08-18 18:44 ` [patch 32/60] KVM: task switch: use seg regs provided by subarch instead of reading from GDT Greg KH
2008-08-18 18:44 ` [patch 33/60] KVM: Avoid instruction emulation when event delivery is pending Greg KH
2008-08-18 18:44 ` [patch 34/60] KVM: task switch: translate guest segment limit to virt-extension byte granular field Greg KH
2008-08-18 18:44 ` [patch 35/60] KVM: ia64: Fix irq disabling leak in error handling code Greg KH
2008-08-18 18:44 ` [patch 36/60] r8169: avoid thrashing PCI conf space above RTL_GIGA_MAC_VER_06 Greg KH
2008-08-18 18:44 ` [patch 37/60] ALSA: asoc: restrict sample rate and size in Freescale MPC8610 sound drivers Greg KH
2008-08-18 18:44 ` [patch 38/60] i2c: Fix NULL pointer dereference in i2c_new_probed_device Greg KH
2008-08-18 18:44 ` [patch 39/60] i2c: Let users select algorithm drivers manually again Greg KH
2008-08-18 18:44 ` [patch 40/60] ALSA: ASoC: fix SNDCTL_DSP_SYNC support in Freescale 8610 sound drivers Greg KH
2008-08-18 18:44 ` [patch 41/60] x86: amd opteron TOM2 mask val fix Greg KH
2008-08-18 18:45 ` [patch 42/60] ide: it821x in pass-through mode segfaults in 2.6.26-stable Greg KH
2008-08-18 18:45 ` [patch 43/60] CIFS: Fix compiler warning on 64-bit Greg KH
2008-08-18 18:45 ` [patch 44/60] radeon: misc corrections Greg KH
2008-08-18 18:45 ` [patch 45/60] cs5520: add enablebits checking Greg KH
2008-08-18 18:45 ` [patch 46/60] rtl8187: Fix lockups due to concurrent access to config routine Greg KH
2008-08-18 18:45 ` [patch 47/60] sparc64: Fix end-of-stack checking in save_stack_trace() Greg KH
2008-08-18 18:45 ` [patch 48/60] sparc64: Fix recursion in stack overflow detection handling Greg KH
2008-08-18 18:45 ` [patch 49/60] sparc64: Make global reg dumping even more useful Greg KH
2008-08-18 18:45 ` [patch 50/60] sparc64: Implement IRQ stacks Greg KH
2008-08-18 18:45 ` [patch 51/60] sparc64: Handle stack trace attempts before irqstacks are setup Greg KH
2008-08-18 18:45 ` [patch 52/60] x86: fix spin_is_contended() Greg KH
2008-08-18 18:45 ` Greg KH [this message]
2008-08-18 19:17 ` [patch 53/60] x86: fix setup code crashes on my old 486 box H. Peter Anvin
2008-08-18 18:45 ` [patch 54/60] qla2xxx: Add dev_loss_tmo_callbk/terminate_rport_io callback support Greg KH
2008-08-18 18:45 ` [patch 55/60] qla2xxx: Set an rports dev_loss_tmo value in a consistent manner Greg KH
2008-08-18 18:45 ` [patch 56/60] usb-storage: revert DMA-alignment change for Wireless USB Greg KH
2008-08-18 18:45 ` [patch 57/60] usb-storage: automatically recognize bad residues Greg KH
2008-08-18 18:45 ` [patch 58/60] CIFS: properly account for new user= field in SPNEGO upcall string allocation Greg KH
2008-08-18 18:45 ` [patch 59/60] PCI: Limit VPD length for Broadcom 5708S Greg KH
2008-08-18 18:45 ` [patch 60/60] crypto: padlock - fix VIA PadLock instruction usage with irq_ts_save/restore() Greg KH
2008-08-18 19:18 ` [patch 00/49] 2.6.25-stable review Greg KH
2008-08-18 19:19 ` [patch 01/49] USB: usb-storage: quirk around v1.11 firmware on Nikon D4 Greg KH
2008-08-18 19:19 ` [patch 02/49] usb-storage: unusual_devs entries for iRiver T10 and Datafab CF+SM reader Greg KH
2008-08-18 19:19 ` [patch 03/49] usb-serial: dont release unregistered minors Greg KH
2008-08-18 19:19 ` [patch 04/49] USB: pl2023: Remove USB id (4348:5523) handled by ch341 Greg KH
2008-08-18 19:19 ` [patch 05/49] USB: ftdi_sio: Add USB Product Id for ELV HS485 Greg KH
2008-08-18 19:19 ` [patch 06/49] USB: ftdi_sio: add support for Luminance Stellaris Evaluation/Development Kits Greg KH
2008-08-18 19:19 ` [patch 07/49] SCSI: ses: fix VPD inquiry overrun Greg KH
2008-08-18 19:19 ` [patch 08/49] SCSI: scsi_transport_spi: fix oops in revalidate Greg KH
2008-08-18 19:19 ` [patch 09/49] SCSI: hptiop: add more PCI device IDs Greg KH
2008-08-18 19:19 ` [patch 10/49] SCSI: block: Fix miscalculation of sg_io timeout in CDROM_SEND_PACKET handler Greg KH
2008-08-18 19:19 ` [patch 11/49] relay: fix "full buffer with exactly full last subbuffer" accounting problem Greg KH
2008-08-18 19:19 ` [patch 12/49] radeonfb: fix accel engine hangs Greg KH
2008-08-18 19:19 ` [patch 13/49] posix-timers: fix posix_timer_event() vs dequeue_signal() race Greg KH
2008-08-18 19:19 ` [patch 14/49] posix-timers: do_schedule_next_timer: fix the setting of ->si_overrun Greg KH
2008-08-18 19:19 ` [patch 15/49] mlock() fix return values Greg KH
2008-08-18 19:19 ` [patch 16/49] matrox maven: fix a broken error path Greg KH
2008-08-18 19:19 ` [patch 17/49] ipvs: Fix possible deadlock in estimator code Greg KH
2008-08-18 19:19 ` [patch 18/49] ide-cd: fix endianity for the error message in cdrom_read_capacity Greg KH
2008-08-18 19:19 ` [patch 19/49] CIFS: mount of IPC$ breaks with iget patch Greg KH
2008-08-18 19:20 ` [patch 20/49] CIFS: if get root inode fails during mount, cleanup tree connection Greg KH
2008-08-18 19:20 ` [patch 21/49] acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops Greg KH
2008-08-18 19:20 ` [patch 22/49] dccp: change L/R must have at least one byte in the dccpsf_val field Greg KH
2008-08-18 19:20 ` [patch 23/49] random32: seeding improvement Greg KH
2008-08-18 19:20 ` [patch 24/49] ipv6: Fix ip6_xmit to send fragments if ipfragok is true Greg KH
2008-08-18 19:20 ` [patch 25/49] sparc64: FUTEX_OP_ANDN fix Greg KH
2008-08-18 19:20 ` [patch 26/49] sparc64: Do not clobber %g7 in setcontext() trap Greg KH
2008-08-18 19:20 ` [patch 27/49] uml: fix build when SLOB is enabled Greg KH
2008-08-18 19:20 ` [patch 28/49] uml: fix bad NTP interaction with clock Greg KH
2008-08-18 19:20 ` [patch 29/49] uml: physical memory shouldnt include initial stack Greg KH
2008-08-18 19:20 ` [patch 30/49] uml: track and make up lost ticks Greg KH
2008-08-18 19:20 ` [patch 31/49] uml: missed kmalloc() in pcap_user.c Greg KH
2008-08-18 19:20 ` [patch 32/49] uml: deal with host time going backwards Greg KH
2008-08-18 19:20 ` [patch 33/49] uml: deal with inaccessible address space start Greg KH
2008-08-18 19:20 ` [patch 34/49] uml: missing export of csum_partial() on uml/amd64 Greg KH
2008-08-18 19:20 ` [patch 35/49] uml: memcpy export needs to follow host declaration Greg KH
2008-08-18 19:20 ` [patch 36/49] uml: stub needs to tolerate SIGWINCH Greg KH
2008-08-18 19:20 ` [patch 37/49] uml: work around broken host PTRACE_SYSEMU Greg KH
2008-08-18 19:20 ` [patch 38/49] uml: fix gcc ICEs and unresolved externs Greg KH
2008-08-18 19:20 ` [patch 39/49] uml: Fix boot crash Greg KH
2008-08-18 19:20 ` [patch 40/49] uml: PATH_MAX needs limits.h Greg KH
2008-08-18 19:20 ` [patch 41/49] radeon: misc corrections Greg KH
2008-08-18 19:20 ` [patch 42/49] r8169: avoid thrashing PCI conf space above RTL_GIGA_MAC_VER_06 Greg KH
2008-08-18 19:20 ` [patch 43/49] netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP Greg KH
2008-08-18 19:20 ` [patch 44/49] i2c: Fix NULL pointer dereference in i2c_new_probed_device Greg KH
2008-08-18 19:20 ` [patch 45/49] CIFS: Fix compiler warning on 64-bit Greg KH
2008-08-18 19:21 ` [patch 46/49] x86: fix spin_is_contended() Greg KH
2008-08-18 19:21 ` [patch 47/49] x86: fix setup code crashes on my old 486 box Greg KH
2008-08-18 19:21 ` [patch 48/49] qla2xxx: Add dev_loss_tmo_callbk/terminate_rport_io callback support Greg KH
2008-08-18 19:21 ` [patch 49/49] qla2xxx: Set an rports dev_loss_tmo value in a consistent manner Greg KH
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=20080818184530.GB29394@suse.de \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cavokz@gmail.com \
--cc=cebbert@redhat.com \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=eteo@redhat.com \
--cc=hpa@zytor.com \
--cc=jake@lwn.net \
--cc=jejb@kernel.org \
--cc=jmforbes@linuxtx.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mkrufky@linuxtv.org \
--cc=rbranco@la.checkpoint.com \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=w@1wt.eu \
--cc=zwane@arm.linux.org.uk \
/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