public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86,pci: dmi check for mackpro 2.2 mmconf
@ 2008-07-18 16:41 Yinghai Lu
  2008-07-18 16:50 ` Jack Howarth
                   ` (3 more replies)
  0 siblings, 4 replies; 38+ messages in thread
From: Yinghai Lu @ 2008-07-18 16:41 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, jbarnes,
	Jack Howarth
  Cc: linux-kernel


change the mconf bus range from [0,0xff] to to [0, 0x3f]
to match range [0xf0000000, 0xf4000000) in e820 tables.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Tested-by: Jack Howarth <howarth@bromo.msbb.uc.edu>

---
 arch/x86/pci/mmconfig-shared.c |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

Index: linux-2.6/arch/x86/pci/mmconfig-shared.c
===================================================================
--- linux-2.6.orig/arch/x86/pci/mmconfig-shared.c
+++ linux-2.6/arch/x86/pci/mmconfig-shared.c
@@ -374,6 +374,40 @@ reject:
 
 static int __initdata known_bridge;
 
+static int __devinit check_mmconf(const struct dmi_system_id *d)
+{
+	typeof(pci_mmcfg_config[0]) *cfg;
+
+	if ((pci_mmcfg_config_num != 1) ||
+	    (pci_mmcfg_config == NULL) ||
+	    (pci_mmcfg_config[0].address == 0))
+		return 1;
+
+	cfg = &pci_mmcfg_config[0];
+
+	if (cfg->start_bus_number == 0 && cfg->end_bus_number > 0x3f)
+		cfg->end_bus_number = 0x3f;
+
+	return 0;
+}
+
+static struct dmi_system_id __devinitdata mmconf_dmi_table[] = {
+	{
+		.callback = check_mmconf,
+		.ident = "Apple",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro2"),
+		},
+	},
+	{}
+};
+
+void __init check_mmconf_dmi(void)
+{
+        dmi_check_system(mmconf_dmi_table);
+}
+
 static void __init __pci_mmcfg_init(int early)
 {
 	/* MMCONFIG disabled */
@@ -395,6 +429,7 @@ static void __init __pci_mmcfg_init(int
 
 	if (!known_bridge) {
 		acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
+		check_mmconf_dmi();
 		pci_mmcfg_reject_broken(early);
 	}
 

^ permalink raw reply	[flat|nested] 38+ messages in thread
* Re: [PATCH] x86,pci: dmi check for mackpro 2.2 mmconf
@ 2008-07-22 23:37 Jack Howarth
  2008-07-23  0:23 ` Jesse Barnes
  0 siblings, 1 reply; 38+ messages in thread
From: Jack Howarth @ 2008-07-22 23:37 UTC (permalink / raw)
  To: jbarnes; +Cc: linux-kernel

Jesse,
    I am unclear on what you want to push. Are you referring
to the mmconf_end_bus_num_detect.patch and mmconf_end_bus_num_detect_fix.patch
fixes that are already in -tip? These work fine in allowing MMCONFIG to work
on my MacBook Pro and should go into the stable kernel. If you are talking
about blacklisting pcie pre1.1 devices to solve the problems with ASPM,
I really don't understand how I do that (in terms of finding out what devices
to blacklist).
                     Jack
   

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2008-07-23  1:46 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 16:41 [PATCH] x86,pci: dmi check for mackpro 2.2 mmconf Yinghai Lu
2008-07-18 16:50 ` Jack Howarth
2008-07-18 17:44 ` H. Peter Anvin
2008-07-18 17:47   ` Yinghai Lu
2008-07-18 17:49     ` H. Peter Anvin
2008-07-18 17:54       ` Yinghai Lu
2008-07-18 20:19         ` Ingo Molnar
2008-07-18 20:21           ` Yinghai Lu
2008-07-18 20:21 ` Ingo Molnar
2008-07-18 20:26   ` Yinghai Lu
2008-07-19  0:58     ` Jack Howarth
2008-07-19  1:22       ` Yinghai Lu
2008-07-19  3:28         ` Jack Howarth
2008-07-19  3:43           ` Justin Mattock
2008-07-19  4:45           ` Yinghai Lu
2008-07-19  5:12             ` Jack Howarth
2008-07-19  5:28               ` Yinghai Lu
2008-07-19 17:26                 ` Jesse Barnes
2008-07-19 18:19                   ` Jack Howarth
2008-07-19 18:40                   ` Jack Howarth
2008-07-19 19:04                     ` Jesse Barnes
2008-07-19 19:14                       ` Jack Howarth
2008-07-21  6:49                         ` Shaohua Li
2008-07-22 21:15                           ` Jesse Barnes
2008-07-18 20:22 ` [PATCH] x86,pci: detect end_bus_number according to acpi/e820 reserved Yinghai Lu
2008-07-18 20:48   ` Ingo Molnar
2008-07-18 21:48   ` Jack Howarth
2008-07-18 22:27     ` Yinghai Lu
2008-07-18 22:42       ` Jesse Barnes
2008-07-20  6:48         ` Ingo Molnar
2008-07-19  9:16   ` [PATCH] x86,pci: detect end_bus_number according to acpi/e820 reserved - fix Yinghai Lu
2008-07-20  6:44     ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2008-07-22 23:37 [PATCH] x86,pci: dmi check for mackpro 2.2 mmconf Jack Howarth
2008-07-23  0:23 ` Jesse Barnes
2008-07-23  1:00   ` Jack Howarth
2008-07-23  1:32     ` Jesse Barnes
2008-07-23  1:41       ` Jack Howarth
2008-07-23  1:54         ` Shaohua Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox