kernel-fxtec-pro1x/arch/x86/boot
Rene Herman b02aae9cf5 x86: provide a DMI based port 0x80 I/O delay override.
x86: provide a DMI based port 0x80 I/O delay override.

Certain (HP) laptops experience trouble from our port 0x80 I/O delay
writes. This patch provides for a DMI based switch to the "alternate
diagnostic port" 0xed (as used by some BIOSes as well) for these.

David P. Reed confirmed that port 0xed works for him and provides a
proper delay. The symptoms of _not_ working are a hanging machine,
with "hwclock" use being a direct trigger.

Earlier versions of this attempted to simply use udelay(2), with the
2 being a value tested to be a nicely conservative upper-bound with
help from many on the linux-kernel mailinglist but that approach has
two problems.

First, pre-loops_per_jiffy calibration (which is post PIT init while
some implementations of the PIT are actually one of the historically
problematic devices that need the delay) udelay() isn't particularly
well-defined. We could initialise loops_per_jiffy conservatively (and
based on CPU family so as to not unduly delay old machines) which
would sort of work, but...

Second, delaying isn't the only effect that a write to port 0x80 has.
It's also a PCI posting barrier which some devices may be explicitly
or implicitly relying on. Alan Cox did a survey and found evidence
that additionally some drivers may be racy on SMP without the bus
locking outb.

Switching to an inb() makes the timing too unpredictable and as such,
this DMI based switch should be the safest approach for now. Any more
invasive changes should get more rigid testing first. It's moreover
only very few machines with the problem and a DMI based hack seems
to fit that situation.

This also introduces a command-line parameter "io_delay" to override
the DMI based choice again:

	io_delay=<standard|alternate>

where "standard" means using the standard port 0x80 and "alternate"
port 0xed.

This retains the udelay method as a config (CONFIG_UDELAY_IO_DELAY) and
command-line ("io_delay=udelay") choice for testing purposes as well.

This does not change the io_delay() in the boot code which is using
the same port 0x80 I/O delay but those do not appear to be a problem
as David P. Reed reported the problem was already gone after using the
udelay version. He moreover reported that booting with "acpi=off" also
fixed things and seeing as how ACPI isn't touched until after this DMI
based I/O port switch I believe it's safe to leave the ones in the boot
code be.

The DMI strings from David's HP Pavilion dv9000z are in there already
and we need to get/verify the DMI info from other machines with the
problem, notably the HP Pavilion dv6000z.

This patch is partly based on earlier patches from Pavel Machek and
David P. Reed.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:30:05 +01:00
..
compressed x86: provide a DMI based port 0x80 I/O delay override. 2008-01-30 13:30:05 +01:00
tools i386: move boot 2007-10-11 11:16:41 +02:00
.gitignore i386: move boot 2007-10-11 11:16:45 +02:00
a20.c i386: move boot 2007-10-11 11:16:45 +02:00
apm.c i386: move boot 2007-10-11 11:16:45 +02:00
bitops.h i386: move boot 2007-10-11 11:16:45 +02:00
boot.h x86 setup: sizeof() is unsigned, unbreak comparisons 2007-10-25 20:20:06 -07:00
cmdline.c i386: move boot 2007-10-11 11:16:45 +02:00
code16gcc.h i386: move boot 2007-10-11 11:16:45 +02:00
copy.S i386: move boot 2007-10-11 11:16:45 +02:00
cpu.c i386: move boot 2007-10-11 11:16:45 +02:00
cpucheck.c x86: arch/x86/Kconfig.cpu unification 2007-11-12 21:02:19 +01:00
edd.c i386: move boot 2007-10-11 11:16:45 +02:00
header.S x86 setup: don't recalculate ss:esp unless really necessary 2007-11-28 18:17:17 -08:00
install.sh i386: move boot 2007-10-11 11:16:45 +02:00
main.c x86: clean up setup.h and the boot code 2007-10-23 22:37:25 +02:00
Makefile x86: do not use $(ARCH) when not needed 2007-11-12 21:02:20 +01:00
mca.c i386: move boot 2007-10-11 11:16:45 +02:00
memory.c i386: move boot 2007-10-11 11:16:45 +02:00
mtools.conf.in i386: move boot 2007-10-11 11:16:45 +02:00
pm.c i386: move boot 2007-10-11 11:16:45 +02:00
pmjump.S x86 setup: set %ebx == %ebp == %edi == 0 on protected mode entry 2007-11-04 19:48:04 -08:00
printf.c i386: move boot 2007-10-11 11:16:45 +02:00
setup.ld i386: move boot 2007-10-11 11:16:45 +02:00
string.c i386: move boot 2007-10-11 11:16:45 +02:00
tty.c i386: move boot 2007-10-11 11:16:45 +02:00
version.c i386: move boot 2007-10-11 11:16:45 +02:00
vesa.h i386: move boot 2007-10-11 11:16:45 +02:00
video-bios.c x86 setup: sizeof() is unsigned, unbreak comparisons 2007-10-25 20:20:06 -07:00
video-vesa.c x86 setup: sizeof() is unsigned, unbreak comparisons 2007-10-25 20:20:06 -07:00
video-vga.c i386: move boot 2007-10-11 11:16:45 +02:00
video.c x86 setup: sizeof() is unsigned, unbreak comparisons 2007-10-25 20:20:06 -07:00
video.h i386: move boot 2007-10-11 11:16:45 +02:00
voyager.c i386: move boot 2007-10-11 11:16:45 +02:00