Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > updated patch attached. (from the MakeItBuild'n'Stuff dept) the one below is against current upstream. (previous ones were against x86.git) Ingo ---> Subject: x86: fix in/out_p delays From: Ingo Molnar <[EMAIL PROTECTED]>

Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Rene Herman
On 14-12-07 14:15, Ingo Molnar wrote: wow, cool fix! (I remember that there were other systems as well that are affected by port 0x80 muckery - i thought we had removed port 0x80 accesses long ago.) how about the simpler fix below, as a first-level approach? We can then remove the _p in/out

Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > wow, cool fix! (I remember that there were other systems as well that > are affected by port 0x80 muckery - i thought we had removed port 0x80 > accesses long ago.) > > how about the simpler fix below, as a first-level approach? We can > then remove

Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* David P. Reed <[EMAIL PROTECTED]> wrote: > Replace use of outb to "unused" diagnostic port 0x80 for time delay > with udelay based time delay on x86_64 architecture machines. Fix for > bugs 9511 and 6307 in bugzilla, plus bugs reported in > bugzilla.redhat.com. > > Derived from suggestion

Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread David P. Reed
Andi Kleen wrote: " With the additional call this should be completely out of line now to save code size. Similar for the in variant. Sure. Want me to make a new patch with the _p croutines out-of-line? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Andi Kleen
"David P. Reed" <[EMAIL PROTECTED]> writes: > > i386 family fixes (completely parallel) were not included, considering > that such machines might involve more risk of problems on legacy machines. They're needed because lots of people fomr some reason still boot 32bit kernels on 64bit machines. >

Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Rene Herman
On 14-12-07 03:59, David P. Reed wrote: Replace use of outb to "unused" diagnostic port 0x80 for time delay with udelay based time delay on x86_64 architecture machines. Fix for bugs 9511 and 6307 in bugzilla, plus bugs reported in bugzilla.redhat.com. Derived from suggestion (that didn't

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Rene Herman
On 14-12-07 03:59, David P. Reed wrote: Replace use of outb to unused diagnostic port 0x80 for time delay with udelay based time delay on x86_64 architecture machines. Fix for bugs 9511 and 6307 in bugzilla, plus bugs reported in bugzilla.redhat.com. Derived from suggestion (that didn't

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Andi Kleen
David P. Reed [EMAIL PROTECTED] writes: i386 family fixes (completely parallel) were not included, considering that such machines might involve more risk of problems on legacy machines. They're needed because lots of people fomr some reason still boot 32bit kernels on 64bit machines. +#define

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread David P. Reed
Andi Kleen wrote: With the additional call this should be completely out of line now to save code size. Similar for the in variant. Sure. Want me to make a new patch with the _p croutines out-of-line? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* Ingo Molnar [EMAIL PROTECTED] wrote: wow, cool fix! (I remember that there were other systems as well that are affected by port 0x80 muckery - i thought we had removed port 0x80 accesses long ago.) how about the simpler fix below, as a first-level approach? We can then remove the _p

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* Ingo Molnar [EMAIL PROTECTED] wrote: updated patch attached. (from the MakeItBuild'n'Stuff dept) the one below is against current upstream. (previous ones were against x86.git) Ingo --- Subject: x86: fix in/out_p delays From: Ingo Molnar [EMAIL PROTECTED] Debugged

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* Rene Herman [EMAIL PROTECTED] wrote: --- a/init/main.c +++ b/init/main.c @@ -229,10 +229,9 @@ static int __init obsolete_checksetup(char *line) } /* - * This should be approx 2 Bo*oMips to start (note initial shift), and will - * still work even if initially too large, it will just

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Rene Herman
On 14-12-07 14:15, Ingo Molnar wrote: wow, cool fix! (I remember that there were other systems as well that are affected by port 0x80 muckery - i thought we had removed port 0x80 accesses long ago.) how about the simpler fix below, as a first-level approach? We can then remove the _p in/out

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Rene Herman
On 14-12-07 15:46, Ingo Molnar wrote: * Rene Herman [EMAIL PROTECTED] wrote: /* - * This should be approx 2 Bo*oMips to start (note initial shift), and will - * still work even if initially too large, it will just take slightly longer + * Initial value roughly corresponds to a 1 GHz CPU */

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* Rene Herman [EMAIL PROTECTED] wrote: On 14-12-07 14:15, Ingo Molnar wrote: wow, cool fix! (I remember that there were other systems as well that are affected by port 0x80 muckery - i thought we had removed port 0x80 accesses long ago.) how about the simpler fix below, as a first-level

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Rene Herman
On 14-12-07 15:23, Ingo Molnar wrote: * Rene Herman [EMAIL PROTECTED] wrote: --- a/init/main.c +++ b/init/main.c @@ -229,10 +229,9 @@ static int __init obsolete_checksetup(char *line) } /* - * This should be approx 2 Bo*oMips to start (note initial shift), and will - * still work even if

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
updated patch attached. (from the MakeItBuild'n'Stuff dept) the one below is against current upstream. (previous ones were against x86.git) the last version is the one below. Pending further discussion and testing. And David, i nominate your fix as the coolest Linux kernel fix of 2007

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* Rene Herman [EMAIL PROTECTED] wrote: /* - * This should be approx 2 Bo*oMips to start (note initial shift), and will - * still work even if initially too large, it will just take slightly longer + * Initial value roughly corresponds to a 1 GHz CPU */ -unsigned long loops_per_jiffy =

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Avi Kivity
David P. Reed wrote: Replace use of outb to unused diagnostic port 0x80 for time delay with udelay based time delay on x86_64 architecture machines. Fix for bugs 9511 and 6307 in bugzilla, plus bugs reported in bugzilla.redhat.com. Derived from suggestion (that didn't compile) by Pavel Machek,

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* David P. Reed [EMAIL PROTECTED] wrote: Replace use of outb to unused diagnostic port 0x80 for time delay with udelay based time delay on x86_64 architecture machines. Fix for bugs 9511 and 6307 in bugzilla, plus bugs reported in bugzilla.redhat.com. Derived from suggestion (that

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* Rene Herman [EMAIL PROTECTED] wrote: And as to testing -- good luck finding a machine that cares at all ;-) actually, there's a whole lot more testing angle to a change like this than ancient boxes. Ingo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Rene Herman
On 14-12-07 15:03, Ingo Molnar wrote: yep, i have updated the delay to 2 usecs. The latest patch is below, as queued up in x86.git. (not yet queued up for .24 - it's pending testing and more feedback, etc.) Yes, I'd like feedback on the initial value thing:

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Rene Herman
On 14-12-07 19:02, H. Peter Anvin wrote: I believe this will suffer from the issue that was raised: this will use udelay() long before loop calibration (and no, we can't just be conservative since there is no conservative value we can use.) Worse, I suspect that at least the PIT, which may

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread H. Peter Anvin
Alan Cox wrote: i dont think this should matter: old systems that truly _need_ the ISA delay will be slow enough to not trip up. (nor are they really affected by these early delays - the delays were more for crappy ISA devices that get initialized later down, when the delay loop is already

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread H. Peter Anvin
Ingo Molnar wrote: wow, cool fix! (I remember that there were other systems as well that are affected by port 0x80 muckery - i thought we had removed port 0x80 accesses long ago.) how about the simpler fix below, as a first-level approach? We can then remove the _p in/out sequences after

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Alan Cox
i dont think this should matter: old systems that truly _need_ the ISA delay will be slow enough to not trip up. (nor are they really affected by these early delays - the delays were more for crappy ISA devices that get initialized later down, when the delay loop is already calibrated)

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Pavel Machek
On Fri 2007-12-14 10:02:57, H. Peter Anvin wrote: Ingo Molnar wrote: wow, cool fix! (I remember that there were other systems as well that are affected by port 0x80 muckery - i thought we had removed port 0x80 accesses long ago.) how about the simpler fix below, as a first-level approach?

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Pavel Machek
On Fri 2007-12-14 18:36:26, Alan Cox wrote: i dont think this should matter: old systems that truly _need_ the ISA delay will be slow enough to not trip up. (nor are they really affected by these early delays - the delays were more for crappy ISA devices that get initialized later

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread H. Peter Anvin
Pavel Machek wrote: On Fri 2007-12-14 10:02:57, H. Peter Anvin wrote: Ingo Molnar wrote: wow, cool fix! (I remember that there were other systems as well that are affected by port 0x80 muckery - i thought we had removed port 0x80 accesses long ago.) how about the simpler fix below, as a

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Alan Cox
On Fri, 14 Dec 2007 14:13:46 -0800 H. Peter Anvin [EMAIL PROTECTED] wrote: Pavel Machek wrote: On Fri 2007-12-14 10:02:57, H. Peter Anvin wrote: Ingo Molnar wrote: wow, cool fix! (I remember that there were other systems as well that are affected by port 0x80 muckery - i thought we had

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread David P. Reed
Avi Kivity wrote: kvm will forward a virtual machine's writes to port 0x80 to the real port. The reason is that the write is much faster than exiting and emulating it; the difference is measurable when compiling kernels. Now if the cause is simply writing to port 0x80, then we must stop

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread H. Peter Anvin
David P. Reed wrote: I believe (though no one seems to have confirming documentation from the chipset or motherboard vendor) that port 80 is actually functional for some unknown function on these machines. (They do respond to in instructions faster than a bus cycle abort does - more

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread David P. Reed
Just a thought for a way to fix the very early timing needed to set up udelay to work in a way that works on all machines. Perhaps we haven't exploited the BIOS enough: The PC BIOS since the PC AT (286) has always had a standard countdown timer way to delay for n microseconds, which as far

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread H. Peter Anvin
David P. Reed wrote: Just a thought for a way to fix the very early timing needed to set up udelay to work in a way that works on all machines. Perhaps we haven't exploited the BIOS enough: The PC BIOS since the PC AT (286) has always had a standard countdown timer way to delay for n

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-14 Thread Ingo Molnar
* H. Peter Anvin [EMAIL PROTECTED] wrote: I believe this will suffer from the issue that was raised: this will use udelay() long before loop calibration (and no, we can't just be conservative since there is no conservative value we can use.) Worse, I suspect that at least the PIT, which

Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-13 Thread Yinghai Lu
On Dec 13, 2007 6:59 PM, David P. Reed <[EMAIL PROTECTED]> wrote: > Replace use of outb to "unused" diagnostic port 0x80 for time delay > with udelay based time delay on x86_64 architecture machines. Fix for > bugs 9511 and 6307 in bugzilla, plus bugs reported in > bugzilla.redhat.com. > >

[PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.

2007-12-13 Thread David P. Reed
Replace use of outb to "unused" diagnostic port 0x80 for time delay with udelay based time delay on x86_64 architecture machines. Fix for bugs 9511 and 6307 in bugzilla, plus bugs reported in bugzilla.redhat.com. Derived from suggestion (that didn't compile) by Pavel Machek, and tested, also

[PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-13 Thread David P. Reed
Replace use of outb to unused diagnostic port 0x80 for time delay with udelay based time delay on x86_64 architecture machines. Fix for bugs 9511 and 6307 in bugzilla, plus bugs reported in bugzilla.redhat.com. Derived from suggestion (that didn't compile) by Pavel Machek, and tested, also

Re: [PATCH] x86_64: fix problems due to use of outb to port 80 on some AMD64x2 laptops, etc.

2007-12-13 Thread Yinghai Lu
On Dec 13, 2007 6:59 PM, David P. Reed [EMAIL PROTECTED] wrote: Replace use of outb to unused diagnostic port 0x80 for time delay with udelay based time delay on x86_64 architecture machines. Fix for bugs 9511 and 6307 in bugzilla, plus bugs reported in bugzilla.redhat.com. Derived from

<    1   2