public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Enable pci=bfsort by default on future Dell systems
@ 2010-12-14 17:57 Narendra_K
  2010-12-14 19:54 ` Matt Domsch
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Narendra_K @ 2010-12-14 17:57 UTC (permalink / raw)
  To: linux-kernel, linux-pci; +Cc: Matt_Domsch, Jordan_Hargrave, Charles_Rose

Hello,

This patch enables pci=bfsort by default on future Dell systems.
Please consider for inclusion if acceptable.

From: Jordan Hargrave <jordan_hargrave@dell.com>
Subject: [PATCH] Enable pci=bfsort by default on future Dell systems

This patch enables pci=bfsort by default on future Dell systems.
It reads SMBIOS type 0xB1 vendor specific record and sets pci=bfsort accordingly.

Offset  Name    Length  Value   Description

04      Flags0  Word    Varies  Bits 9-10
                                - 10:9 = 00  Unknown
                                - 10:9 = 01  Breadth First
                                - 10:9 = 10  Depth First
                                - 10:9 = 11  Reserved

1. Any time pci=bfsort has to be enabled on a system, we need to add the model
number of the system to the white list. With this patch, that is not required.

2. Typically, model number has to be added to the white list when the system is
under development. With this change, that is not required.

Signed-off-by: Jordan Hargrave <jordan_hargrave@dell.com>
Signed-off-by: Narendra K <narendra_k@dell.com>
---
 arch/x86/pci/common.c |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index f7c8a39..5fe7502 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -22,6 +22,7 @@ unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
 
 unsigned int pci_early_dump_regs;
 static int pci_bf_sort;
+static int smbios_type_b1_flag;
 int pci_routeirq;
 int noioapicquirk;
 #ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
@@ -185,6 +186,39 @@ static int __devinit set_bf_sort(const struct dmi_system_id *d)
 	return 0;
 }
 
+static void __devinit read_dmi_type_b1(const struct dmi_header *dm,
+				       void *private_data)
+{
+	u8 *d = (u8 *)dm + 4;
+
+	if (dm->type != 0xB1)
+		return;
+	switch (((*(u32 *)d) >> 9) & 0x03) {
+	case 0x00:
+		printk(KERN_INFO "dmi type 0xB1 record - unknown flag\n");
+		break;
+	case 0x01: /* set pci=bfsort */
+		smbios_type_b1_flag = 1;
+		break;
+	case 0x02: /* do not set pci=bfsort */
+		smbios_type_b1_flag = 2;
+		break;
+	default:
+		break;
+	}
+}
+
+static int __devinit find_sort_method(const struct dmi_system_id *d)
+{
+	dmi_walk(read_dmi_type_b1, NULL);
+
+	if (smbios_type_b1_flag == 1) {
+		set_bf_sort(d);
+		return 0;
+	}
+	return -1;
+}
+
 /*
  * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus)
  */
@@ -213,6 +247,13 @@ static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = {
 	},
 #endif		/* __i386__ */
 	{
+		.callback = find_sort_method,
+		.ident = "Dell System",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+		},
+	},
+	{
 		.callback = set_bf_sort,
 		.ident = "Dell PowerEdge 1950",
 		.matches = {
-- 
1.7.1

-- 
With regards,
Narendra K

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

* Re: [PATCH] Enable pci=bfsort by default on future Dell systems
  2010-12-14 17:57 [PATCH] Enable pci=bfsort by default on future Dell systems Narendra_K
@ 2010-12-14 19:54 ` Matt Domsch
  2010-12-14 20:12   ` Matthew Wilcox
  2010-12-17 16:17 ` Narendra_K
  2011-01-07 22:27 ` Jesse Barnes
  2 siblings, 1 reply; 8+ messages in thread
From: Matt Domsch @ 2010-12-14 19:54 UTC (permalink / raw)
  To: Narendra_K; +Cc: linux-kernel, linux-pci, Jordan_Hargrave, Charles_Rose

On Tue, Dec 14, 2010 at 09:57:12AM -0800, Narendra_K@Dell.com wrote:
> Hello,
> 
> This patch enables pci=bfsort by default on future Dell systems.
> Please consider for inclusion if acceptable.
> 
> From: Jordan Hargrave <jordan_hargrave@dell.com>
> Subject: [PATCH] Enable pci=bfsort by default on future Dell systems

You may be asking "why is this necessary with the biosdevname work
going on?".  Short story is, yes, biosdevname continues to be the
medium-term strategy, and we are addressing as much as we can in that,
getting into all the distributions future releases, adding it in the
distro installer environments.  However, biosdevname adoption has been
slow (I started writing it 5 years ago), and there's a good chance it
won't be picked up by all older distribution releases in Service
Packs, Updates, or the like.  By continuing to use the pci=bfsort
workaround, we can more likely get this small patch into older
distribution update relesaes where we are already doing hardware
enablement, as it can only affect future Dell servers, no impact to
existing systems or installations.  It also gives flexibility to
current kernels and distribution releases on when they pick up
biosdevname.  The two (pci=bfsort and biosdevname) do not conflict in
any way.

So, I encourage adoption of this small kernel patch, and then
encourage distros to pick up biosdevname also.

Thanks,
Matt

-- 
Matt Domsch
Technology Strategist
Dell | Office of the CTO

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

* Re: [PATCH] Enable pci=bfsort by default on future Dell systems
  2010-12-14 19:54 ` Matt Domsch
@ 2010-12-14 20:12   ` Matthew Wilcox
  2010-12-15  2:51     ` Matt Domsch
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew Wilcox @ 2010-12-14 20:12 UTC (permalink / raw)
  To: Matt Domsch
  Cc: Narendra_K, linux-kernel, linux-pci, Jordan_Hargrave,
	Charles_Rose

On Tue, Dec 14, 2010 at 01:54:45PM -0600, Matt Domsch wrote:
> You may be asking "why is this necessary with the biosdevname work
> going on?".  Short story is, yes, biosdevname continues to be the
> medium-term strategy, and we are addressing as much as we can in that,
> getting into all the distributions future releases, adding it in the
> distro installer environments.  However, biosdevname adoption has been
> slow (I started writing it 5 years ago), and there's a good chance it
> won't be picked up by all older distribution releases in Service
> Packs, Updates, or the like.  By continuing to use the pci=bfsort
> workaround, we can more likely get this small patch into older
> distribution update relesaes where we are already doing hardware
> enablement, as it can only affect future Dell servers, no impact to
> existing systems or installations.  It also gives flexibility to
> current kernels and distribution releases on when they pick up
> biosdevname.  The two (pci=bfsort and biosdevname) do not conflict in
> any way.

Actually, how about we introduce a smaller patch that just makes
bfsort the default for all machines with a BIOS date of 2011 or later?
bfsort was what we always intended; it was unintentionally broken for,
what, five years, and the only reason not to revert it was to not break
setups that had come to rely on it.

So just make it the default for all future systems, no matter what
manufacturer.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

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

* Re: [PATCH] Enable pci=bfsort by default on future Dell systems
  2010-12-14 20:12   ` Matthew Wilcox
@ 2010-12-15  2:51     ` Matt Domsch
  0 siblings, 0 replies; 8+ messages in thread
From: Matt Domsch @ 2010-12-15  2:51 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Narendra_K, linux-kernel, linux-pci, Jordan_Hargrave,
	Charles_Rose

On Tue, Dec 14, 2010 at 01:12:43PM -0700, Matthew Wilcox wrote:
> Actually, how about we introduce a smaller patch that just makes
> bfsort the default for all machines with a BIOS date of 2011 or later?
> bfsort was what we always intended; it was unintentionally broken for,
> what, five years, and the only reason not to revert it was to not break
> setups that had come to rely on it.
> 
> So just make it the default for all future systems, no matter what
> manufacturer.

This approach would hit all systems that install a newly issued BIOS
after 2010, which could cause a change in behaviour for such systems.
I don't know how to get a "system manufactured" date or "system first
powered on" date generically (IIRC these might be exposed in
vendor-specific fields on Dell systems).

I'm not opposed, but it could result in a change of behavior for
still-maintained (as evidenced by newly issued BIOSes) systems.

-- 
Matt Domsch
Technology Strategist
Dell | Office of the CTO

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

* Re: [PATCH] Enable pci=bfsort by default on future Dell systems
  2010-12-14 17:57 [PATCH] Enable pci=bfsort by default on future Dell systems Narendra_K
  2010-12-14 19:54 ` Matt Domsch
@ 2010-12-17 16:17 ` Narendra_K
  2010-12-17 18:06   ` Jesse Barnes
  2011-01-07 22:27 ` Jesse Barnes
  2 siblings, 1 reply; 8+ messages in thread
From: Narendra_K @ 2010-12-17 16:17 UTC (permalink / raw)
  To: linux-kernel, linux-pci; +Cc: Matt_Domsch, Jordan_Hargrave, Charles_Rose

On Tue, Dec 14, 2010 at 11:21:19PM +0530, K, Narendra wrote:
> Hello,
> 
> This patch enables pci=bfsort by default on future Dell systems.
> Please consider for inclusion if acceptable.
> 
> From: Jordan Hargrave <jordan_hargrave@dell.com>
> Subject: [PATCH] Enable pci=bfsort by default on future Dell systems
> 
> This patch enables pci=bfsort by default on future Dell systems.
> It reads SMBIOS type 0xB1 vendor specific record and sets pci=bfsort accordingly.
> 
> Offset  Name    Length  Value   Description
> 
> 04      Flags0  Word    Varies  Bits 9-10
>                                 - 10:9 = 00  Unknown
>                                 - 10:9 = 01  Breadth First
>                                 - 10:9 = 10  Depth First
>                                 - 10:9 = 11  Reserved
> 
> 1. Any time pci=bfsort has to be enabled on a system, we need to add the model
> number of the system to the white list. With this patch, that is not required.
> 
> 2. Typically, model number has to be added to the white list when the system is
> under development. With this change, that is not required.
> 
> Signed-off-by: Jordan Hargrave <jordan_hargrave@dell.com>
> Signed-off-by: Narendra K <narendra_k@dell.com>
> ---

Hello Jesse,

Please let us know if there are any concerns with this patch. If the
patch is acceptable, please consider it for inclusion.

With regards,
Narendra K

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

* Re: [PATCH] Enable pci=bfsort by default on future Dell systems
  2010-12-17 16:17 ` Narendra_K
@ 2010-12-17 18:06   ` Jesse Barnes
  2010-12-20  6:54     ` Narendra_K
  0 siblings, 1 reply; 8+ messages in thread
From: Jesse Barnes @ 2010-12-17 18:06 UTC (permalink / raw)
  To: Narendra_K
  Cc: linux-kernel, linux-pci, Matt_Domsch, Jordan_Hargrave,
	Charles_Rose

On Fri, 17 Dec 2010 08:17:29 -0800
<Narendra_K@Dell.com> wrote:

> On Tue, Dec 14, 2010 at 11:21:19PM +0530, K, Narendra wrote:
> > Hello,
> > 
> > This patch enables pci=bfsort by default on future Dell systems.
> > Please consider for inclusion if acceptable.
> > 
> > From: Jordan Hargrave <jordan_hargrave@dell.com>
> > Subject: [PATCH] Enable pci=bfsort by default on future Dell systems
> > 
> > This patch enables pci=bfsort by default on future Dell systems.
> > It reads SMBIOS type 0xB1 vendor specific record and sets pci=bfsort accordingly.
> > 
> > Offset  Name    Length  Value   Description
> > 
> > 04      Flags0  Word    Varies  Bits 9-10
> >                                 - 10:9 = 00  Unknown
> >                                 - 10:9 = 01  Breadth First
> >                                 - 10:9 = 10  Depth First
> >                                 - 10:9 = 11  Reserved
> > 
> > 1. Any time pci=bfsort has to be enabled on a system, we need to add the model
> > number of the system to the white list. With this patch, that is not required.
> > 
> > 2. Typically, model number has to be added to the white list when the system is
> > under development. With this change, that is not required.
> > 
> > Signed-off-by: Jordan Hargrave <jordan_hargrave@dell.com>
> > Signed-off-by: Narendra K <narendra_k@dell.com>
> > ---
> 
> Hello Jesse,
> 
> Please let us know if there are any concerns with this patch. If the
> patch is acceptable, please consider it for inclusion.

Yeah, I don't have a problem with it; I'll queue it up in the -next
branch.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: [PATCH] Enable pci=bfsort by default on future Dell systems
  2010-12-17 18:06   ` Jesse Barnes
@ 2010-12-20  6:54     ` Narendra_K
  0 siblings, 0 replies; 8+ messages in thread
From: Narendra_K @ 2010-12-20  6:54 UTC (permalink / raw)
  To: jbarnes; +Cc: linux-kernel, linux-pci, Matt_Domsch, Jordan_Hargrave,
	Charles_Rose

On Fri, Dec 17, 2010 at 11:36:00PM +0530, Jesse Barnes wrote:
> > Hello Jesse,
> > 
> > Please let us know if there are any concerns with this patch. If the
> > patch is acceptable, please consider it for inclusion.
> 
> Yeah, I don't have a problem with it; I'll queue it up in the -next
> branch.
> 

Jesse,

Thank you.

-- 
With regards,
Narendra K

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

* Re: [PATCH] Enable pci=bfsort by default on future Dell systems
  2010-12-14 17:57 [PATCH] Enable pci=bfsort by default on future Dell systems Narendra_K
  2010-12-14 19:54 ` Matt Domsch
  2010-12-17 16:17 ` Narendra_K
@ 2011-01-07 22:27 ` Jesse Barnes
  2 siblings, 0 replies; 8+ messages in thread
From: Jesse Barnes @ 2011-01-07 22:27 UTC (permalink / raw)
  To: Narendra_K
  Cc: linux-kernel, linux-pci, Matt_Domsch, Jordan_Hargrave,
	Charles_Rose

On Tue, 14 Dec 2010 09:57:12 -0800
<Narendra_K@Dell.com> wrote:

> Hello,
> 
> This patch enables pci=bfsort by default on future Dell systems.
> Please consider for inclusion if acceptable.
> 
> From: Jordan Hargrave <jordan_hargrave@dell.com>
> Subject: [PATCH] Enable pci=bfsort by default on future Dell systems
> 
> This patch enables pci=bfsort by default on future Dell systems.
> It reads SMBIOS type 0xB1 vendor specific record and sets pci=bfsort accordingly.
> 
> Offset  Name    Length  Value   Description
> 
> 04      Flags0  Word    Varies  Bits 9-10
>                                 - 10:9 = 00  Unknown
>                                 - 10:9 = 01  Breadth First
>                                 - 10:9 = 10  Depth First
>                                 - 10:9 = 11  Reserved
> 
> 1. Any time pci=bfsort has to be enabled on a system, we need to add the model
> number of the system to the white list. With this patch, that is not required.
> 
> 2. Typically, model number has to be added to the white list when the system is
> under development. With this change, that is not required.
> 
> Signed-off-by: Jordan Hargrave <jordan_hargrave@dell.com>
> Signed-off-by: Narendra K <narendra_k@dell.com>
> ---

Applied, thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

end of thread, other threads:[~2011-01-07 22:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 17:57 [PATCH] Enable pci=bfsort by default on future Dell systems Narendra_K
2010-12-14 19:54 ` Matt Domsch
2010-12-14 20:12   ` Matthew Wilcox
2010-12-15  2:51     ` Matt Domsch
2010-12-17 16:17 ` Narendra_K
2010-12-17 18:06   ` Jesse Barnes
2010-12-20  6:54     ` Narendra_K
2011-01-07 22:27 ` Jesse Barnes

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