* [PATCH] x86: Fix boot on Twinhead H12Y
@ 2012-05-15 17:44 Alan Cox
2012-05-15 16:52 ` Joe Perches
2012-05-17 18:22 ` [tip:x86/urgent] " tip-bot for Alan Cox
0 siblings, 2 replies; 6+ messages in thread
From: Alan Cox @ 2012-05-15 17:44 UTC (permalink / raw)
To: mingo, linux-kernel
From: Alan Cox <alan@linux.intel.com>
Despite lots of investigation into why this is needed we don't know or have
an elegant cure. The only answer found on this laptop is to mark a problem
region as used so that Linux doesn't put anything there.
Currently all the users add reserve= command lines and anyone not knowing this
needs to find the magic page that documents it. Automate it instead.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Tested-and-bugfixed-by: Arne Fitzenreiter <arne@fitzenreiter.de>
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=10231
---
arch/x86/pci/fixup.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index d0e6e40..40b3eb8 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -519,3 +519,22 @@ static void sb600_disable_hpet_bar(struct pci_dev *dev)
}
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, 0x4385, sb600_disable_hpet_bar);
+
+/*
+ * Twinhead H12Y needs us to block out a region otherwise we map devices
+ * there and any access kills the box.
+ * See: https://bugzilla.kernel.org/show_bug.cgi?id=10231
+ *
+ * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor)
+ */
+
+static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev)
+{
+ if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device ==
+ 0xA003) {
+ pr_info("Reserving memory on Twinhead H12Y\n");
+ request_mem_region(0xFFB00000, 0x100000, "twinhead");
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x27B9,
+ twinhead_reserve_killing_zone);
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] x86: Fix boot on Twinhead H12Y
2012-05-15 17:44 [PATCH] x86: Fix boot on Twinhead H12Y Alan Cox
@ 2012-05-15 16:52 ` Joe Perches
2012-05-15 17:09 ` Alan Cox
2012-05-17 18:22 ` [tip:x86/urgent] " tip-bot for Alan Cox
1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2012-05-15 16:52 UTC (permalink / raw)
To: Alan Cox; +Cc: mingo, linux-kernel
On Tue, 2012-05-15 at 18:44 +0100, Alan Cox wrote:
> Despite lots of investigation into why this is needed we don't know or have
> an elegant cure. The only answer found on this laptop is to mark a problem
> region as used so that Linux doesn't put anything there.
trivia:
> diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
[]
> @@ -519,3 +519,22 @@ static void sb600_disable_hpet_bar(struct pci_dev *dev)
[]
> +static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev)
> +{
> + if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device ==
> + 0xA003) {
Doesn't this look ugly to you?
Doesn't
if (dev->subsystem_vendor == 0x14FF &&
dev->subsystem_device == 0xA003) {
at least read more easily?
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] x86: Fix boot on Twinhead H12Y
2012-05-15 16:52 ` Joe Perches
@ 2012-05-15 17:09 ` Alan Cox
0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2012-05-15 17:09 UTC (permalink / raw)
To: Joe Perches; +Cc: mingo, linux-kernel
On Tue, 15 May 2012 09:52:07 -0700
Joe Perches <joe@perches.com> wrote:
> On Tue, 2012-05-15 at 18:44 +0100, Alan Cox wrote:
> > Despite lots of investigation into why this is needed we don't know or have
> > an elegant cure. The only answer found on this laptop is to mark a problem
> > region as used so that Linux doesn't put anything there.
>
> trivia:
>
> > diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
> []
> > @@ -519,3 +519,22 @@ static void sb600_disable_hpet_bar(struct pci_dev *dev)
> []
> > +static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev)
> > +{
> > + if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device ==
> > + 0xA003) {
>
> Doesn't this look ugly to you?
> Doesn't
>
> if (dev->subsystem_vendor == 0x14FF &&
> dev->subsystem_device == 0xA003) {
>
> at least read more easily?
Well I'd further indent the second half so your eyes drop across reading
left to right, but to be honest I'd have put it on one line but for the
80columnists.
If thats the only problem anyone has with it then I'm fine in adding a
tab or two.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip:x86/urgent] x86: Fix boot on Twinhead H12Y
2012-05-15 17:44 [PATCH] x86: Fix boot on Twinhead H12Y Alan Cox
2012-05-15 16:52 ` Joe Perches
@ 2012-05-17 18:22 ` tip-bot for Alan Cox
2012-05-17 18:29 ` H. Peter Anvin
1 sibling, 1 reply; 6+ messages in thread
From: tip-bot for Alan Cox @ 2012-05-17 18:22 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, alan, hpa, mingo, arne, tglx
Commit-ID: 80b3e557371205566a71e569fbfcce5b11f92dbe
Gitweb: http://git.kernel.org/tip/80b3e557371205566a71e569fbfcce5b11f92dbe
Author: Alan Cox <alan@linux.intel.com>
AuthorDate: Tue, 15 May 2012 18:44:15 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 17 May 2012 20:04:00 +0200
x86: Fix boot on Twinhead H12Y
Despite lots of investigation into why this is needed we don't
know or have an elegant cure. The only answer found on this
laptop is to mark a problem region as used so that Linux doesn't
put anything there.
Currently all the users add reserve= command lines and anyone
not knowing this needs to find the magic page that documents it.
Automate it instead.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Tested-and-bugfixed-by: Arne Fitzenreiter <arne@fitzenreiter.de>
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=10231
Link: http://lkml.kernel.org/r/20120515174347.5109.94551.stgit@bluebook
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/pci/fixup.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index d0e6e40..5dd467b 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -519,3 +519,20 @@ static void sb600_disable_hpet_bar(struct pci_dev *dev)
}
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, 0x4385, sb600_disable_hpet_bar);
+
+/*
+ * Twinhead H12Y needs us to block out a region otherwise we map devices
+ * there and any access kills the box.
+ *
+ * See: https://bugzilla.kernel.org/show_bug.cgi?id=10231
+ *
+ * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor)
+ */
+static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev)
+{
+ if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) {
+ pr_info("Reserving memory on Twinhead H12Y\n");
+ request_mem_region(0xFFB00000, 0x100000, "twinhead");
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x27B9, twinhead_reserve_killing_zone);
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [tip:x86/urgent] x86: Fix boot on Twinhead H12Y
2012-05-17 18:22 ` [tip:x86/urgent] " tip-bot for Alan Cox
@ 2012-05-17 18:29 ` H. Peter Anvin
2012-05-17 19:56 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: H. Peter Anvin @ 2012-05-17 18:29 UTC (permalink / raw)
To: mingo, hpa, alan, linux-kernel, tglx, arne; +Cc: linux-tip-commits
On 05/17/2012 11:22 AM, tip-bot for Alan Cox wrote:
> Commit-ID: 80b3e557371205566a71e569fbfcce5b11f92dbe
> Gitweb: http://git.kernel.org/tip/80b3e557371205566a71e569fbfcce5b11f92dbe
> Author: Alan Cox <alan@linux.intel.com>
> AuthorDate: Tue, 15 May 2012 18:44:15 +0100
> Committer: Ingo Molnar <mingo@kernel.org>
> CommitDate: Thu, 17 May 2012 20:04:00 +0200
>
> x86: Fix boot on Twinhead H12Y
>
> Despite lots of investigation into why this is needed we don't
> know or have an elegant cure. The only answer found on this
> laptop is to mark a problem region as used so that Linux doesn't
> put anything there.
>
> Currently all the users add reserve= command lines and anyone
> not knowing this needs to find the magic page that documents it.
> Automate it instead.
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Tested-and-bugfixed-by: Arne Fitzenreiter <arne@fitzenreiter.de>
> Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=10231
> Link: http://lkml.kernel.org/r/20120515174347.5109.94551.stgit@bluebook
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
> arch/x86/pci/fixup.c | 17 +++++++++++++++++
> 1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
> index d0e6e40..5dd467b 100644
> --- a/arch/x86/pci/fixup.c
> +++ b/arch/x86/pci/fixup.c
> @@ -519,3 +519,20 @@ static void sb600_disable_hpet_bar(struct pci_dev *dev)
> }
> }
> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, 0x4385, sb600_disable_hpet_bar);
> +
> +/*
> + * Twinhead H12Y needs us to block out a region otherwise we map devices
> + * there and any access kills the box.
> + *
> + * See: https://bugzilla.kernel.org/show_bug.cgi?id=10231
> + *
> + * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor)
> + */
> +static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev)
> +{
> + if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) {
> + pr_info("Reserving memory on Twinhead H12Y\n");
> + request_mem_region(0xFFB00000, 0x100000, "twinhead");
> + }
> +}
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x27B9, twinhead_reserve_killing_zone);
It seems to me that a DMI match might be more appropriate, since it
pretty much sounds like the BIOS fails to reserve a region it is using?
-hpa
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-05-17 19:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 17:44 [PATCH] x86: Fix boot on Twinhead H12Y Alan Cox
2012-05-15 16:52 ` Joe Perches
2012-05-15 17:09 ` Alan Cox
2012-05-17 18:22 ` [tip:x86/urgent] " tip-bot for Alan Cox
2012-05-17 18:29 ` H. Peter Anvin
2012-05-17 19:56 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox