From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Len Brown <lenb@kernel.org>,
Jason Vas Dias <jason.vas.dias@gmail.com>
Subject: Re: [PATCH] x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC
Date: Tue, 7 Oct 2008 22:31:23 +0200 [thread overview]
Message-ID: <200810072231.29891.rjw@sisk.pl> (raw)
In-Reply-To: <20081006221122.GC22097@alberich.amd.com>
On Tuesday, 7 of October 2008, Andreas Herrmann wrote:
> On Mon, Oct 06, 2008 at 10:39:25PM +0100, Maciej W. Rozycki wrote:
> > On Mon, 6 Oct 2008, Andi Kleen wrote:
> >
> > > The real reason is actually a workaround in the BIOS for problems
> > > in the older Linux code that caused duplicated timer interrupts. The
> > > old Linux would fall into "enable both IO-APIC and 8259" fallback mode
> > > and the resulted in duplicated timer events, which made everything unhappy.
> > > They instead configured the northbridge in a way that one of the inputs
> > > is ignored.
> >
> > Hmm, working around Linux problems in the BIOS is a new and truly odd
> > concept to me. It's not that we are unresponsive or do not take
> > responsibility for our bugs, is it?
>
> So, let's work around BIOS bugs in Linux then ...
>
> Following patch is almost untested -- especially I didn't get my
> hands on one of the HP Laptops with broken DSDT.
The patch works on my nx6325. I removed the DMI workarouds for this test, so
I'm quite sure. :-)
You can add my Tested-by to it too.
Thanks,
Rafael
> --
>
> On some HP nx6... laptops (e.g. nx6325) BIOS reports an IRQ0 override
> but the SB450 chipset is configured such that timer interrupts goe to
> INT0 of IOAPIC.
>
> Check IRQ0 routing and if it is routed to INT0 of IOAPIC skip the
> timer override.
>
> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
> ---
> arch/x86/kernel/early-quirks.c | 48 ++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 48 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index 4353cf5..6b839b1 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -95,6 +95,52 @@ static void __init nvidia_bugs(int num, int slot, int func)
>
> }
>
> +static u32 ati_ixp4x0_rev(int num, int slot, int func)
> +{
> + u32 d;
> + u8 b;
> +
> + b = read_pci_config_byte(num, slot, func, 0xac);
> + b &= ~(1<<5);
> + write_pci_config_byte(num, slot, func, 0xac, b);
> +
> + d = read_pci_config(num, slot, func, 0x70);
> + d |= 1<<8;
> + write_pci_config(num, slot, func, 0x70, d);
> +
> + d = read_pci_config(num, slot, func, 0x8);
> + d &= 0xff;
> + return d;
> +}
> +
> +static void __init ati_bugs(int num, int slot, int func)
> +{
> +#if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC)
> + u32 d;
> + u8 b;
> +
> + if (acpi_use_timer_override)
> + return;
> +
> + d = ati_ixp4x0_rev(num, slot, func);
> + if (d < 0x82)
> + acpi_skip_timer_override = 1;
> + else {
> + /* check for IRQ0 interrupt swap */
> + outb(0x72, 0xcd6); b = inb(0xcd7);
> + if (!(b & 0x2))
> + acpi_skip_timer_override = 1;
> + }
> +
> + if (acpi_skip_timer_override) {
> + printk(KERN_INFO "SB4X0 revision 0x%x\n", d);
> + printk(KERN_INFO "Ignoring ACPI timer override.\n");
> + printk(KERN_INFO "If you got timer trouble "
> + "try acpi_use_timer_override\n");
> + }
> +#endif
> +}
> +
> #define QFLAG_APPLY_ONCE 0x1
> #define QFLAG_APPLIED 0x2
> #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
> @@ -114,6 +160,8 @@ static struct chipset early_qrk[] __initdata = {
> PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs },
> { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
> PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
> + { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS,
> + PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
> {}
> };
>
next prev parent reply other threads:[~2008-10-07 20:27 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-05 18:36 2.6.27-rc8+ - first impressions Dmitry Torokhov
2008-10-05 18:59 ` Rafael J. Wysocki
2008-10-05 19:06 ` Dmitry Torokhov
2008-10-05 19:19 ` Rafael J. Wysocki
2008-10-05 19:27 ` Thomas Gleixner
2008-10-05 21:18 ` Dmitry Torokhov
2008-10-05 21:40 ` Parag Warudkar
2008-10-05 22:29 ` Rafael J. Wysocki
2008-10-06 6:23 ` Dmitry Torokhov
2008-10-06 9:59 ` [PATCH] x86 ACPI: Blacklist two HP machines with buggy BIOSes (Re: 2.6.27-rc8+ - first impressions) Rafael J. Wysocki
2008-10-06 14:54 ` Linus Torvalds
2008-10-06 15:00 ` Ingo Molnar
2008-10-06 17:17 ` Rafael J. Wysocki
2008-10-06 17:51 ` Maciej W. Rozycki
2008-10-06 17:54 ` Ingo Molnar
2008-10-06 20:59 ` Andi Kleen
2008-10-06 21:39 ` Maciej W. Rozycki
2008-10-06 22:11 ` [PATCH] x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC Andreas Herrmann
2008-10-07 3:41 ` Ingo Molnar
2008-10-07 3:51 ` Dmitry Torokhov
2008-10-07 4:57 ` Ingo Molnar
2008-10-07 11:19 ` Dmitry Torokhov
2008-10-07 15:25 ` Maciej W. Rozycki
2008-10-07 20:31 ` Rafael J. Wysocki [this message]
2008-10-06 23:10 ` [PATCH] x86 ACPI: Blacklist two HP machines with buggy BIOSes (Re: 2.6.27-rc8+ - first impressions) Andi Kleen
2008-10-07 1:35 ` Maciej W. Rozycki
2008-10-07 4:42 ` Ingo Molnar
2008-10-07 5:38 ` Andi Kleen
2008-10-07 11:45 ` Matthew Garrett
2008-10-07 12:04 ` Ingo Molnar
2008-10-08 8:23 ` Peter Zijlstra
2008-10-06 17:15 ` Rafael J. Wysocki
2008-10-06 17:54 ` Maciej W. Rozycki
2008-10-05 19:10 ` 2.6.27-rc8+ - first impressions Arjan van de Ven
2008-10-06 6:28 ` Dmitry Torokhov
2008-10-06 19:53 ` Andreas Herrmann
2008-10-07 3:42 ` Dmitry Torokhov
2008-10-07 9:10 ` Andreas Herrmann
2008-10-07 11:37 ` Dmitry Torokhov
2008-10-07 12:07 ` Parag Warudkar
2008-10-08 1:07 ` Dmitry Torokhov
2008-10-07 13:19 ` Andreas Herrmann
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=200810072231.29891.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=andreas.herrmann3@amd.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jason.vas.dias@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
/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
Powered by JetHome