Re: [RFC PATCH] PCI: remove initial bios sort of PCI devices on x86

2008-02-13 Thread Greg KH
On Wed, Feb 13, 2008 at 11:07:53PM -0600, Matt Domsch wrote:
> On Wed, Feb 13, 2008 at 03:40:29PM -0800, Greg KH wrote:
> 
> Good plan.  I'll be glad when the vestigal internal PCI device list is
> gone too.

With this patch, it's the last major step, I have a series of follow-up
patches that will remove it entirely.  I'll post them when they've been
tested better.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC PATCH] PCI: remove initial bios sort of PCI devices on x86

2008-02-13 Thread Matt Domsch
On Wed, Feb 13, 2008 at 03:40:29PM -0800, Greg KH wrote:
> We currently keep 2 lists of PCI devices in the system, one in the
> driver core, and one all on its own.  This second list is sorted at boot
> time, in "BIOS" order, to try to remain compatible with older kernels
> (2.2 and earlier days).  There was also a "nosort" option to turn this
> sorting off, to remain compatible with even older kernel versions, but
> that just ends up being what we have been doing from 2.5 days...
> 
> Unfortunately, the second list of devices is not really ever used to
> determine the probing order of PCI devices or drivers[1].  That is done
> using the driver core list instead.  This change happened back in the
> early 2.5 days.
> 
> Relying on BIOS ording for the binding of drivers to specific device
> names is problematic for many reasons, and userspace tools like udev
> exist to properly name devices in a persistant manner if that is needed,
> no reliance on the BIOS is needed.
>
> Matt Domsch and others at Dell noticed this back in 2006, and added a
> boot option to sort the PCI device lists (both of them) in a
> breadth-first manner to help remain compatible with the 2.4 order, if
> needed for any reason.  This option is not going away, as some systems
> rely on them.
> 
> This patch removes the sorting of the internal PCI device list in "BIOS"
> mode, as it's not needed at all anymore, and hasn't for many years.
> I've also removed the PCI flags for this from some other arches that for
> some reason defined them, but never used them.
> 
> This should not change the ordering of any drivers or device probing.


Good plan.  I'll be glad when the vestigal internal PCI device list is
gone too.

Thanks,
Matt

-- 
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC PATCH] PCI: remove initial bios sort of PCI devices on x86

2008-02-13 Thread Greg KH
We currently keep 2 lists of PCI devices in the system, one in the
driver core, and one all on its own.  This second list is sorted at boot
time, in "BIOS" order, to try to remain compatible with older kernels
(2.2 and earlier days).  There was also a "nosort" option to turn this
sorting off, to remain compatible with even older kernel versions, but
that just ends up being what we have been doing from 2.5 days...

Unfortunately, the second list of devices is not really ever used to
determine the probing order of PCI devices or drivers[1].  That is done
using the driver core list instead.  This change happened back in the
early 2.5 days.

Relying on BIOS ording for the binding of drivers to specific device
names is problematic for many reasons, and userspace tools like udev
exist to properly name devices in a persistant manner if that is needed,
no reliance on the BIOS is needed.

Matt Domsch and others at Dell noticed this back in 2006, and added a
boot option to sort the PCI device lists (both of them) in a
breadth-first manner to help remain compatible with the 2.4 order, if
needed for any reason.  This option is not going away, as some systems
rely on them.

This patch removes the sorting of the internal PCI device list in "BIOS"
mode, as it's not needed at all anymore, and hasn't for many years.
I've also removed the PCI flags for this from some other arches that for
some reason defined them, but never used them.

This should not change the ordering of any drivers or device probing.

[1] The old-style pci_get_device and pci_find_device() still used this
sorting order, but there are very few drivers that use these functions,
as they are deprecated for use in this manner.  If for some reason, a
driver rely on the order and uses these functions, the breadth-first
boot option will resolve any problem.

Cc: Matt Domsch <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---
 Documentation/kernel-parameters.txt |4 -
 arch/frv/mb93090-mb00/pci-frv.h |2 
 arch/mn10300/unit-asb2305/pci-asb2305.h |2 
 arch/sh/drivers/pci/pci-sh4.h   |2 
 arch/x86/pci/common.c   |7 ---
 arch/x86/pci/pcbios.c   |   72 
 arch/x86/pci/pci.h  |3 -
 include/asm-sh/mpc1211/pci.h|2 
 8 files changed, 94 deletions(-)

--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1393,10 +1393,6 @@ and is between 256 and 4096 characters. 
nomsi   [MSI] If the PCI_MSI kernel config parameter is
enabled, this kernel boot option can be used to
disable the use of MSI interrupts system-wide.
-   nosort  [X86-32] Don't sort PCI devices according to
-   order given by the PCI BIOS. This sorting is
-   done to get a device order compatible with
-   older kernels.
biosirq [X86-32] Use PCI BIOS calls to get the interrupt
routing table. These calls are known to be buggy
on several machines and they hang the machine
--- a/arch/frv/mb93090-mb00/pci-frv.h
+++ b/arch/frv/mb93090-mb00/pci-frv.h
@@ -17,8 +17,6 @@
 #define PCI_PROBE_BIOS 0x0001
 #define PCI_PROBE_CONF10x0002
 #define PCI_PROBE_CONF20x0004
-#define PCI_NO_SORT0x0100
-#define PCI_BIOS_SORT  0x0200
 #define PCI_NO_CHECKS  0x0400
 #define PCI_ASSIGN_ROMS0x1000
 #define PCI_BIOS_IRQ_SCAN  0x2000
--- a/arch/mn10300/unit-asb2305/pci-asb2305.h
+++ b/arch/mn10300/unit-asb2305/pci-asb2305.h
@@ -23,8 +23,6 @@
 #define PCI_PROBE_BIOS 1
 #define PCI_PROBE_CONF1 2
 #define PCI_PROBE_CONF2 4
-#define PCI_NO_SORT 0x100
-#define PCI_BIOS_SORT 0x200
 #define PCI_NO_CHECKS 0x400
 #define PCI_ASSIGN_ROMS 0x1000
 #define PCI_BIOS_IRQ_SCAN 0x2000
--- a/arch/sh/drivers/pci/pci-sh4.h
+++ b/arch/sh/drivers/pci/pci-sh4.h
@@ -15,8 +15,6 @@
 #define PCI_PROBE_BIOS 1
 #define PCI_PROBE_CONF12
 #define PCI_PROBE_CONF24
-#define PCI_NO_SORT0x100
-#define PCI_BIOS_SORT  0x200
 #define PCI_NO_CHECKS  0x400
 #define PCI_ASSIGN_ROMS0x1000
 #define PCI_BIOS_IRQ_SCAN  0x2000
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -427,10 +427,6 @@ static int __init pcibios_init(void)
 
if (pci_bf_sort >= pci_force_bf)
pci_sort_breadthfirst();
-#ifdef CONFIG_PCI_BIOS
-   if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
-   pcibios_sort();
-#endif
return 0;
 }
 
@@ -455,9 +451,6 @@ char * __devinit  pcibios_setup(char *st
} else if (!strcmp(str, "nobios")) {
pci_probe &= ~PCI_PROBE_BIOS;

[RFC PATCH] PCI: remove initial bios sort of PCI devices on x86

2008-02-13 Thread Greg KH
We currently keep 2 lists of PCI devices in the system, one in the
driver core, and one all on its own.  This second list is sorted at boot
time, in BIOS order, to try to remain compatible with older kernels
(2.2 and earlier days).  There was also a nosort option to turn this
sorting off, to remain compatible with even older kernel versions, but
that just ends up being what we have been doing from 2.5 days...

Unfortunately, the second list of devices is not really ever used to
determine the probing order of PCI devices or drivers[1].  That is done
using the driver core list instead.  This change happened back in the
early 2.5 days.

Relying on BIOS ording for the binding of drivers to specific device
names is problematic for many reasons, and userspace tools like udev
exist to properly name devices in a persistant manner if that is needed,
no reliance on the BIOS is needed.

Matt Domsch and others at Dell noticed this back in 2006, and added a
boot option to sort the PCI device lists (both of them) in a
breadth-first manner to help remain compatible with the 2.4 order, if
needed for any reason.  This option is not going away, as some systems
rely on them.

This patch removes the sorting of the internal PCI device list in BIOS
mode, as it's not needed at all anymore, and hasn't for many years.
I've also removed the PCI flags for this from some other arches that for
some reason defined them, but never used them.

This should not change the ordering of any drivers or device probing.

[1] The old-style pci_get_device and pci_find_device() still used this
sorting order, but there are very few drivers that use these functions,
as they are deprecated for use in this manner.  If for some reason, a
driver rely on the order and uses these functions, the breadth-first
boot option will resolve any problem.

Cc: Matt Domsch [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]

---
 Documentation/kernel-parameters.txt |4 -
 arch/frv/mb93090-mb00/pci-frv.h |2 
 arch/mn10300/unit-asb2305/pci-asb2305.h |2 
 arch/sh/drivers/pci/pci-sh4.h   |2 
 arch/x86/pci/common.c   |7 ---
 arch/x86/pci/pcbios.c   |   72 
 arch/x86/pci/pci.h  |3 -
 include/asm-sh/mpc1211/pci.h|2 
 8 files changed, 94 deletions(-)

--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1393,10 +1393,6 @@ and is between 256 and 4096 characters. 
nomsi   [MSI] If the PCI_MSI kernel config parameter is
enabled, this kernel boot option can be used to
disable the use of MSI interrupts system-wide.
-   nosort  [X86-32] Don't sort PCI devices according to
-   order given by the PCI BIOS. This sorting is
-   done to get a device order compatible with
-   older kernels.
biosirq [X86-32] Use PCI BIOS calls to get the interrupt
routing table. These calls are known to be buggy
on several machines and they hang the machine
--- a/arch/frv/mb93090-mb00/pci-frv.h
+++ b/arch/frv/mb93090-mb00/pci-frv.h
@@ -17,8 +17,6 @@
 #define PCI_PROBE_BIOS 0x0001
 #define PCI_PROBE_CONF10x0002
 #define PCI_PROBE_CONF20x0004
-#define PCI_NO_SORT0x0100
-#define PCI_BIOS_SORT  0x0200
 #define PCI_NO_CHECKS  0x0400
 #define PCI_ASSIGN_ROMS0x1000
 #define PCI_BIOS_IRQ_SCAN  0x2000
--- a/arch/mn10300/unit-asb2305/pci-asb2305.h
+++ b/arch/mn10300/unit-asb2305/pci-asb2305.h
@@ -23,8 +23,6 @@
 #define PCI_PROBE_BIOS 1
 #define PCI_PROBE_CONF1 2
 #define PCI_PROBE_CONF2 4
-#define PCI_NO_SORT 0x100
-#define PCI_BIOS_SORT 0x200
 #define PCI_NO_CHECKS 0x400
 #define PCI_ASSIGN_ROMS 0x1000
 #define PCI_BIOS_IRQ_SCAN 0x2000
--- a/arch/sh/drivers/pci/pci-sh4.h
+++ b/arch/sh/drivers/pci/pci-sh4.h
@@ -15,8 +15,6 @@
 #define PCI_PROBE_BIOS 1
 #define PCI_PROBE_CONF12
 #define PCI_PROBE_CONF24
-#define PCI_NO_SORT0x100
-#define PCI_BIOS_SORT  0x200
 #define PCI_NO_CHECKS  0x400
 #define PCI_ASSIGN_ROMS0x1000
 #define PCI_BIOS_IRQ_SCAN  0x2000
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -427,10 +427,6 @@ static int __init pcibios_init(void)
 
if (pci_bf_sort = pci_force_bf)
pci_sort_breadthfirst();
-#ifdef CONFIG_PCI_BIOS
-   if ((pci_probe  PCI_BIOS_SORT)  !(pci_probe  PCI_NO_SORT))
-   pcibios_sort();
-#endif
return 0;
 }
 
@@ -455,9 +451,6 @@ char * __devinit  pcibios_setup(char *st
} else if (!strcmp(str, nobios)) {
pci_probe = ~PCI_PROBE_BIOS;
return NULL;
-

Re: [RFC PATCH] PCI: remove initial bios sort of PCI devices on x86

2008-02-13 Thread Matt Domsch
On Wed, Feb 13, 2008 at 03:40:29PM -0800, Greg KH wrote:
 We currently keep 2 lists of PCI devices in the system, one in the
 driver core, and one all on its own.  This second list is sorted at boot
 time, in BIOS order, to try to remain compatible with older kernels
 (2.2 and earlier days).  There was also a nosort option to turn this
 sorting off, to remain compatible with even older kernel versions, but
 that just ends up being what we have been doing from 2.5 days...
 
 Unfortunately, the second list of devices is not really ever used to
 determine the probing order of PCI devices or drivers[1].  That is done
 using the driver core list instead.  This change happened back in the
 early 2.5 days.
 
 Relying on BIOS ording for the binding of drivers to specific device
 names is problematic for many reasons, and userspace tools like udev
 exist to properly name devices in a persistant manner if that is needed,
 no reliance on the BIOS is needed.

 Matt Domsch and others at Dell noticed this back in 2006, and added a
 boot option to sort the PCI device lists (both of them) in a
 breadth-first manner to help remain compatible with the 2.4 order, if
 needed for any reason.  This option is not going away, as some systems
 rely on them.
 
 This patch removes the sorting of the internal PCI device list in BIOS
 mode, as it's not needed at all anymore, and hasn't for many years.
 I've also removed the PCI flags for this from some other arches that for
 some reason defined them, but never used them.
 
 This should not change the ordering of any drivers or device probing.


Good plan.  I'll be glad when the vestigal internal PCI device list is
gone too.

Thanks,
Matt

-- 
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com  www.dell.com/linux
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC PATCH] PCI: remove initial bios sort of PCI devices on x86

2008-02-13 Thread Greg KH
On Wed, Feb 13, 2008 at 11:07:53PM -0600, Matt Domsch wrote:
 On Wed, Feb 13, 2008 at 03:40:29PM -0800, Greg KH wrote:
 
 Good plan.  I'll be glad when the vestigal internal PCI device list is
 gone too.

With this patch, it's the last major step, I have a series of follow-up
patches that will remove it entirely.  I'll post them when they've been
tested better.

thanks,

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/