* [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms
@ 2006-06-02 3:18 akpm
2006-06-02 3:47 ` Andi Kleen
2006-06-06 15:06 ` Sergio Monteiro Basto
0 siblings, 2 replies; 6+ messages in thread
From: akpm @ 2006-06-02 3:18 UTC (permalink / raw)
To: len.brown; +Cc: linux-acpi, akpm, ACurrid, acurrid, ak, luming.yu
From: "Andy Currid" <ACurrid@nvidia.com>
This patch fixes a kernel panic during boot that occurs on NVIDIA platforms
that have HPET enabled.
When HPET is enabled, the standard timer IRQ is routed to IOAPIC pin 2 and is
advertised as such in the ACPI APIC table - but an earlier workaround in the
kernel was ignoring this override. The fix is to honor timer IRQ overrides
from ACPI when HPET is detected on an NVIDIA platform.
Signed-off-by: Andy Currid <acurrid@nvidia.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: "Yu, Luming" <luming.yu@intel.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
arch/x86_64/kernel/io_apic.c | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff -puN arch/x86_64/kernel/io_apic.c~fix-hpet-operation-on-64-bit-nvidia-platforms arch/x86_64/kernel/io_apic.c
--- devel/arch/x86_64/kernel/io_apic.c~fix-hpet-operation-on-64-bit-nvidia-platforms 2006-06-01 20:17:10.000000000 -0700
+++ devel-akpm/arch/x86_64/kernel/io_apic.c 2006-06-01 20:17:10.000000000 -0700
@@ -271,6 +271,18 @@ __setup("enable_8254_timer", setup_enabl
#include <linux/pci_ids.h>
#include <linux/pci.h>
+
+#ifdef CONFIG_ACPI
+
+static int nvidia_hpet_detected __initdata;
+
+static int __init nvidia_hpet_check(unsigned long phys, unsigned long size)
+{
+ nvidia_hpet_detected = 1;
+ return 0;
+}
+#endif
+
/* Temporary Hack. Nvidia and VIA boards currently only work with IO-APIC
off. Check for an Nvidia or VIA PCI bridge and turn it off.
Use pci direct infrastructure because this runs before the PCI subsystem.
@@ -317,11 +329,19 @@ void __init check_ioapic(void)
return;
case PCI_VENDOR_ID_NVIDIA:
#ifdef CONFIG_ACPI
- /* All timer overrides on Nvidia
- seem to be wrong. Skip them. */
- acpi_skip_timer_override = 1;
- printk(KERN_INFO
- "Nvidia board detected. Ignoring ACPI timer override.\n");
+ /*
+ * All timer overrides on Nvidia are
+ * wrong unless HPET is enabled.
+ */
+ nvidia_hpet_detected = 0;
+ acpi_table_parse(ACPI_HPET,
+ nvidia_hpet_check);
+ if (nvidia_hpet_detected == 0) {
+ acpi_skip_timer_override = 1;
+ printk(KERN_INFO "Nvidia board "
+ "detected. Ignoring ACPI "
+ "timer override.\n");
+ }
#endif
/* RED-PEN skip them on mptables too? */
return;
_
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms
2006-06-02 3:18 [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms akpm
@ 2006-06-02 3:47 ` Andi Kleen
2006-06-06 15:06 ` Sergio Monteiro Basto
1 sibling, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2006-06-02 3:47 UTC (permalink / raw)
To: akpm; +Cc: len.brown, linux-acpi, ACurrid, luming.yu
> #ifdef CONFIG_ACPI
> - /* All timer overrides on Nvidia
> - seem to be wrong. Skip them. */
> - acpi_skip_timer_override = 1;
> - printk(KERN_INFO
> - "Nvidia board detected. Ignoring ACPI timer override.\n");
> + /*
> + * All timer overrides on Nvidia are
> + * wrong unless HPET is enabled.
> + */
> + nvidia_hpet_detected = 0;
> + acpi_table_parse(ACPI_HPET,
> + nvidia_hpet_check);
I'm not sure it's safe to call acpi_table_parse() when the user passed acpi=off
Better would be probably to set a flag in the HPET callback in arch/i386/kernel/acpi/boot.c
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms
@ 2006-06-02 18:22 Andy Currid
2006-06-02 20:37 ` Andi Kleen
0 siblings, 1 reply; 6+ messages in thread
From: Andy Currid @ 2006-06-02 18:22 UTC (permalink / raw)
To: Andi Kleen, akpm; +Cc: len.brown, linux-acpi, luming.yu
As currently written, I think it's safe to call it. The sdt_entry table
will be empty if the user specified 'acpi=off', so the function will
return 0.
Andy
> -----Original Message-----
> From: Andi Kleen [mailto:ak@muc.de]
> Sent: Thursday, June 01, 2006 20:48
> To: akpm@osdl.org
> Cc: len.brown@intel.com; linux-acpi@vger.kernel.org; Andy
> Currid; luming.yu@intel.com
> Subject: Re: [patch 12/13] Fix HPET operation on 64-bit
> NVIDIA platforms
>
>
> > #ifdef CONFIG_ACPI
> > - /* All timer overrides on Nvidia
> > - seem to be wrong.
> Skip them. */
> > - acpi_skip_timer_override = 1;
> > - printk(KERN_INFO
> > - "Nvidia board detected. Ignoring ACPI timer override.\n");
> > + /*
> > + * All timer overrides
> on Nvidia are
> > + * wrong unless HPET is enabled.
> > + */
> > + nvidia_hpet_detected = 0;
> > + acpi_table_parse(ACPI_HPET,
> > +
> nvidia_hpet_check);
>
> I'm not sure it's safe to call acpi_table_parse() when the
> user passed acpi=off
>
> Better would be probably to set a flag in the HPET callback
> in arch/i386/kernel/acpi/boot.c
>
> -Andi
>
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms
2006-06-02 18:22 Andy Currid
@ 2006-06-02 20:37 ` Andi Kleen
0 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2006-06-02 20:37 UTC (permalink / raw)
To: Andy Currid; +Cc: akpm, len.brown, linux-acpi, luming.yu
On Fri, Jun 02, 2006 at 11:22:00AM -0700, Andy Currid wrote:
>
> As currently written, I think it's safe to call it. The sdt_entry table
> will be empty if the user specified 'acpi=off', so the function will
> return 0.
Ok. I guess it's a 2.6.17 candidate then (are systems with this issue
already shipping?)
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms
2006-06-02 3:18 [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms akpm
2006-06-02 3:47 ` Andi Kleen
@ 2006-06-06 15:06 ` Sergio Monteiro Basto
1 sibling, 0 replies; 6+ messages in thread
From: Sergio Monteiro Basto @ 2006-06-06 15:06 UTC (permalink / raw)
To: akpm; +Cc: len.brown, linux-acpi, ACurrid, ak, luming.yu
Hi,
I experience this "kernel panic during boot" with acpi=off and IIRC
pci=noacpi, but what I like to know if this can resolve any other
problems on my bug: http://bugzilla.kernel.org/show_bug.cgi?id=6419
http://bugzilla.kernel.org/show_bug.cgi?id=6419#c17
btw I will try this patch anyway
Thanks,
On Thu, 2006-06-01 at 20:18 -0700, akpm@osdl.org wrote:
> From: "Andy Currid" <ACurrid@nvidia.com>
>
> This patch fixes a kernel panic during boot that occurs on NVIDIA platforms
> that have HPET enabled.
>
> When HPET is enabled, the standard timer IRQ is routed to IOAPIC pin 2 and is
> advertised as such in the ACPI APIC table - but an earlier workaround in the
> kernel was ignoring this override. The fix is to honor timer IRQ overrides
> from ACPI when HPET is detected on an NVIDIA platform.
>
> Signed-off-by: Andy Currid <acurrid@nvidia.com>
> Cc: "Brown, Len" <len.brown@intel.com>
> Cc: "Yu, Luming" <luming.yu@intel.com>
> Cc: Andi Kleen <ak@muc.de>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> ---
>
> arch/x86_64/kernel/io_apic.c | 30 +++++++++++++++++++++++++-----
> 1 file changed, 25 insertions(+), 5 deletions(-)
>
> diff -puN arch/x86_64/kernel/io_apic.c~fix-hpet-operation-on-64-bit-nvidia-platforms arch/x86_64/kernel/io_apic.c
> --- devel/arch/x86_64/kernel/io_apic.c~fix-hpet-operation-on-64-bit-nvidia-platforms 2006-06-01 20:17:10.000000000 -0700
> +++ devel-akpm/arch/x86_64/kernel/io_apic.c 2006-06-01 20:17:10.000000000 -0700
> @@ -271,6 +271,18 @@ __setup("enable_8254_timer", setup_enabl
> #include <linux/pci_ids.h>
> #include <linux/pci.h>
>
> +
> +#ifdef CONFIG_ACPI
> +
> +static int nvidia_hpet_detected __initdata;
> +
> +static int __init nvidia_hpet_check(unsigned long phys, unsigned long size)
> +{
> + nvidia_hpet_detected = 1;
> + return 0;
> +}
> +#endif
> +
> /* Temporary Hack. Nvidia and VIA boards currently only work with IO-APIC
> off. Check for an Nvidia or VIA PCI bridge and turn it off.
> Use pci direct infrastructure because this runs before the PCI subsystem.
> @@ -317,11 +329,19 @@ void __init check_ioapic(void)
> return;
> case PCI_VENDOR_ID_NVIDIA:
> #ifdef CONFIG_ACPI
> - /* All timer overrides on Nvidia
> - seem to be wrong. Skip them. */
> - acpi_skip_timer_override = 1;
> - printk(KERN_INFO
> - "Nvidia board detected. Ignoring ACPI timer override.\n");
> + /*
> + * All timer overrides on Nvidia are
> + * wrong unless HPET is enabled.
> + */
> + nvidia_hpet_detected = 0;
> + acpi_table_parse(ACPI_HPET,
> + nvidia_hpet_check);
> + if (nvidia_hpet_detected == 0) {
> + acpi_skip_timer_override = 1;
> + printk(KERN_INFO "Nvidia board "
> + "detected. Ignoring ACPI "
> + "timer override.\n");
> + }
> #endif
> /* RED-PEN skip them on mptables too? */
> return;
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms
@ 2006-06-06 15:11 Andy Currid
0 siblings, 0 replies; 6+ messages in thread
From: Andy Currid @ 2006-06-06 15:11 UTC (permalink / raw)
To: Sergio Monteiro Basto, akpm; +Cc: len.brown, linux-acpi, ak, luming.yu
This patch won't have any affect on your system; you're running a
VIA-based Intel platform, and this patch only applies to NVIDIA-based
platforms (i.e. nForce chipset).
Andy
-----Original Message-----
From: Sergio Monteiro Basto [mailto:sergio@sergiomb.no-ip.org]
Sent: Tuesday, June 06, 2006 08:07
To: akpm@osdl.org
Cc: len.brown@intel.com; linux-acpi@vger.kernel.org; Andy Currid;
ak@muc.de; luming.yu@intel.com
Subject: Re: [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms
Hi,
I experience this "kernel panic during boot" with acpi=off and IIRC
pci=noacpi, but what I like to know if this can resolve any other
problems on my bug: http://bugzilla.kernel.org/show_bug.cgi?id=6419
http://bugzilla.kernel.org/show_bug.cgi?id=6419#c17
btw I will try this patch anyway
Thanks,
On Thu, 2006-06-01 at 20:18 -0700, akpm@osdl.org wrote:
> From: "Andy Currid" <ACurrid@nvidia.com>
>
> This patch fixes a kernel panic during boot that occurs on NVIDIA
> platforms that have HPET enabled.
>
> When HPET is enabled, the standard timer IRQ is routed to IOAPIC pin 2
> and is advertised as such in the ACPI APIC table - but an earlier
> workaround in the kernel was ignoring this override. The fix is to
> honor timer IRQ overrides from ACPI when HPET is detected on an NVIDIA
platform.
>
> Signed-off-by: Andy Currid <acurrid@nvidia.com>
> Cc: "Brown, Len" <len.brown@intel.com>
> Cc: "Yu, Luming" <luming.yu@intel.com>
> Cc: Andi Kleen <ak@muc.de>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> ---
>
> arch/x86_64/kernel/io_apic.c | 30 +++++++++++++++++++++++++-----
> 1 file changed, 25 insertions(+), 5 deletions(-)
>
> diff -puN
arch/x86_64/kernel/io_apic.c~fix-hpet-operation-on-64-bit-nvidia-platfor
ms arch/x86_64/kernel/io_apic.c
> ---
devel/arch/x86_64/kernel/io_apic.c~fix-hpet-operation-on-64-bit-nvidia-p
latforms 2006-06-01 20:17:10.000000000 -0700
> +++ devel-akpm/arch/x86_64/kernel/io_apic.c 2006-06-01
20:17:10.000000000 -0700
> @@ -271,6 +271,18 @@ __setup("enable_8254_timer", setup_enabl
> #include <linux/pci_ids.h> #include <linux/pci.h>
>
> +
> +#ifdef CONFIG_ACPI
> +
> +static int nvidia_hpet_detected __initdata;
> +
> +static int __init nvidia_hpet_check(unsigned long phys, unsigned long
> +size) {
> + nvidia_hpet_detected = 1;
> + return 0;
> +}
> +#endif
> +
> /* Temporary Hack. Nvidia and VIA boards currently only work with
IO-APIC
> off. Check for an Nvidia or VIA PCI bridge and turn it off.
> Use pci direct infrastructure because this runs before the PCI
subsystem.
> @@ -317,11 +329,19 @@ void __init check_ioapic(void)
> return;
> case PCI_VENDOR_ID_NVIDIA:
> #ifdef CONFIG_ACPI
> - /* All timer overrides on Nvidia
> - seem to be wrong. Skip them.
*/
> - acpi_skip_timer_override = 1;
> - printk(KERN_INFO
> - "Nvidia board detected. Ignoring ACPI timer override.\n");
> + /*
> + * All timer overrides on Nvidia
are
> + * wrong unless HPET is enabled.
> + */
> + nvidia_hpet_detected = 0;
> + acpi_table_parse(ACPI_HPET,
> +
nvidia_hpet_check);
> + if (nvidia_hpet_detected == 0) {
> + acpi_skip_timer_override
= 1;
> + printk(KERN_INFO "Nvidia
board "
> + "detected. Ignoring
ACPI "
> + "timer
override.\n");
> + }
> #endif
> /* RED-PEN skip them on mptables
too? */
> return;
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi"
> in the body of a message to majordomo@vger.kernel.org More majordomo
> info at http://vger.kernel.org/majordomo-info.html
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-06 15:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-02 3:18 [patch 12/13] Fix HPET operation on 64-bit NVIDIA platforms akpm
2006-06-02 3:47 ` Andi Kleen
2006-06-06 15:06 ` Sergio Monteiro Basto
-- strict thread matches above, loose matches on Subject: below --
2006-06-02 18:22 Andy Currid
2006-06-02 20:37 ` Andi Kleen
2006-06-06 15:11 Andy Currid
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox