From: Chuck Ebbert <cebbert@redhat.com>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: Linux-acpi@vger.kernel.org, lenb@kernel.org,
Andi Kleen <ak@suse.de>, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC] [PATCH] ACPI :Modify timer override connection in Some NVIDIA systems
Date: Mon, 15 Oct 2007 12:30:13 -0400 [thread overview]
Message-ID: <47139595.2040505@redhat.com> (raw)
In-Reply-To: <1192172655.27194.29.camel@yakui_zhao.sh.intel.com>
On 10/12/2007 03:04 AM, Zhao Yakui wrote:
> Hi, All
> The BIOS of some systems using NVIDIA chipset gives the uncorrect
> timer override connection, which will cause that I/O APIC and timer
> can't be connected and kernel panic.
> There are two ways to fix this bug. One is to use the following patch and
> the other is to add a new boot option of acpi_force_timer_override.
>
> 1. Use the following patch.
> The basic flowchart of patch is that:(unnecessary to add new boot option)
> a. When NVIDIA chipset is detected and hpet timer exist,
> acpi_use_timer_override will be set.
> (Skip this when boot option of acpi_use_timer_override is given).
> b. Check whether uncorrect timer connection(IRQ0, Pin0) exists when
> acpi_use_timer_override is set and HPET timer exists.
> If error exists, timer will be forced to route to the Pin2.
>
> 2. Add a new boot option of acpi_force_timer_override
> The basic flowchart of this method is that:
> a. When NVIDIA chipset is detected and HPET timer exists,
> acpi_force_timer_override will be set.
> (skip this when boot option of acpi_force_timer_override is given)
> b. Check whether uncorrect timer connection(IRQ0,Pin0) exists when
> acpi_force_timer_override is set.
> If the error exists, modify the timer override connection.
>
> Welcome the comments.
> Thanks.
>
> Subject: ACPI :Modify timer override connection in Some NVIDIA systems
>>From : Zhao Yakui <yakui.zhao@intel.com>
>
> BIOS defines the uncorrect timeroverride connection in some NVIDIA
> systems
> on which HPET timer exists. When the uncorrect connection is deteced,
> the timer will be forced to route to the Pin 2 of I/O APIC instead of
> Pin 0.
>
> http://bugzilla.kernel.org/show_bug.cgi?id=8956
>
> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
> ---
> arch/i386/kernel/acpi/boot.c | 17 +++++++++++++++++
> arch/i386/kernel/acpi/earlyquirk.c | 7 ++++++-
> arch/x86_64/kernel/early-quirks.c | 2 ++
> 3 files changed, 25 insertions(+), 1 deletion(-)
>
> Index: linux-2.6.23-rc9/arch/i386/kernel/acpi/boot.c
> ===================================================================
> --- linux-2.6.23-rc9.orig/arch/i386/kernel/acpi/boot.c
> +++ linux-2.6.23-rc9/arch/i386/kernel/acpi/boot.c
> @@ -351,6 +351,11 @@ static void __init acpi_sci_ioapic_setup
> return;
> }
>
> +static int __init acpi_hpet_check(struct acpi_table_header *header)
> +{
> + return 0;
> +}
> +
> static int __init
> acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
> const unsigned long end)
> @@ -371,6 +376,18 @@ acpi_parse_int_src_ovr(struct acpi_subta
> return 0;
> }
>
> + if (acpi_use_timer_override &&
> + intsrc->source_irq == 0 && intsrc->global_irq == 0 &&
> + !acpi_table_parse(ACPI_SIG_HPET, acpi_hpet_check)) {
> + mp_override_legacy_irq(intsrc->source_irq,
> + intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
> + (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2,
> + 2);
> + printk(PREFIX "BIOS IRQ0 pin0 override ignored."
> + "Force to use IRQ0 pin2 \n");
> + return 0;
> + }
> +
> if (acpi_skip_timer_override &&
> intsrc->source_irq == 0 && intsrc->global_irq == 2) {
> printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
> Index: linux-2.6.23-rc9/arch/i386/kernel/acpi/earlyquirk.c
> ===================================================================
> --- linux-2.6.23-rc9.orig/arch/i386/kernel/acpi/earlyquirk.c
> +++ linux-2.6.23-rc9/arch/i386/kernel/acpi/earlyquirk.c
> @@ -26,7 +26,8 @@ static int __init check_bridge(int vendo
> /* According to Nvidia all timer overrides are bogus unless HPET
> is enabled. */
> if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
> - if (!warned && acpi_table_parse(ACPI_SIG_HPET,
> + if (!warned) {
> + if (acpi_table_parse(ACPI_SIG_HPET,
> nvidia_hpet_check)) {
> warned = 1;
> acpi_skip_timer_override = 1;
> @@ -36,6 +37,10 @@ static int __init check_bridge(int vendo
> printk(KERN_INFO "If you got timer trouble "
> "try acpi_use_timer_override\n");
>
> + } else {
> + warned = 1;
> + acpi_use_timer_override = 1;
> + }
> }
> }
> #endif
> Index: linux-2.6.23-rc9/arch/x86_64/kernel/early-quirks.c
> ===================================================================
> --- linux-2.6.23-rc9.orig/arch/x86_64/kernel/early-quirks.c
> +++ linux-2.6.23-rc9/arch/x86_64/kernel/early-quirks.c
> @@ -57,6 +57,8 @@ static void __init nvidia_bugs(void)
> "timer override.\n");
> printk(KERN_INFO "If you got timer trouble "
> "try acpi_use_timer_override\n");
> + } else {
> + acpi_use_timer_override = 1;
> }
> #endif
> /* RED-PEN skip them on mptables too? */
cc: added
next prev parent reply other threads:[~2007-10-15 16:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 7:04 [RFC] [PATCH] ACPI :Modify timer override connection in Some NVIDIA systems Zhao Yakui
2007-10-15 16:30 ` Chuck Ebbert [this message]
2007-10-15 16:32 ` Andi Kleen
2007-10-16 21:07 ` Chuck Ebbert
2007-10-16 21:51 ` Andi Kleen
2007-10-16 21:57 ` Chuck Ebbert
2007-10-16 22:17 ` Andi Kleen
2007-10-17 9:00 ` Zhao Yakui
2007-10-17 9:58 ` Andi Kleen
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=47139595.2040505@redhat.com \
--to=cebbert@redhat.com \
--cc=Linux-acpi@vger.kernel.org \
--cc=ak@suse.de \
--cc=lenb@kernel.org \
--cc=tglx@linutronix.de \
--cc=yakui.zhao@intel.com \
/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