Skip to contentSkip to conversation

PCI Express patches for 2.4.27-pre3

PATCH In review Greg KH 5 participants 15 messages May 24, 2004 – May 26, 2004

Subsystems (3)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 PCI Express patches for 2.4.27-pre3

Hi,

Now that the ACPI portion of PCI Express support is in the 2.4 kernel tree, I can send you the remaining portion to actually enable this feature to work properly. Here is the PCI Express support for i386 and x86_64 platforms backported from 2.6 to the 2.4 kernel.

Please pull from: bk://kernel.bkbits.net/gregkh/linux/pci-2.4

The raw patches will follow, for those who want to see them.

thanks,

greg k-h

 Documentation/Configure.help    |   13 +-
 arch/i386/config.in             |    4 
 arch/i386/kernel/Makefile       |    4 
 arch/i386/kernel/mmconfig.c     |  178 ++++++++++++++++++++++++++++++++++++++++
 arch/i386/kernel/pci-i386.h     |   10 ++
 arch/i386/kernel/pci-pc.c       |   38 ++++++++
 arch/x86_64/config.in           |   11 ++
 arch/x86_64/kernel/Makefile     |    4 
 arch/x86_64/kernel/mmconfig.c   |  170 ++++++++++++++++++++++++++++++++++++++
 arch/x86_64/kernel/pci-pc.c     |   46 ++++++++++
 arch/x86_64/kernel/pci-x86_64.h |    9 ++
 drivers/acpi/Config.in          |    2 
 drivers/pci/pci.c               |   23 +++++
 drivers/pci/proc.c              |   23 ++---
 include/asm-i386/fixmap.h       |    3 
 include/asm-x86_64/fixmap.h     |    3 
 include/linux/pci.h             |    1 
 17 files changed, 521 insertions(+), 21 deletions(-)

-----

<blujuice:us.ibm.com>:
o PCI: PCI Express help in 2.4

Dely Sy:
o PCI: PCI Express for 2.4

author
#1 lore raw

ChangeSet 1.1427, 2004/05/24 13:32:48-07:00, [email protected]

[PATCH] PCI: PCI Express for 2.4

Here is an updated patch for PCI Express support based off of the 2.6 code. Now that the ACPI support for this is in the 2.4 tree, this patch can be accepted.

 arch/i386/config.in             |    4 
 arch/i386/kernel/Makefile       |    4 
 arch/i386/kernel/mmconfig.c     |  178 ++++++++++++++++++++++++++++++++++++++++
 arch/i386/kernel/pci-i386.h     |   10 ++
 arch/i386/kernel/pci-pc.c       |   38 ++++++++
 arch/x86_64/config.in           |   11 ++
 arch/x86_64/kernel/Makefile     |    4 
 arch/x86_64/kernel/mmconfig.c   |  170 ++++++++++++++++++++++++++++++++++++++
 arch/x86_64/kernel/pci-pc.c     |   46 ++++++++++
 arch/x86_64/kernel/pci-x86_64.h |    9 ++
 drivers/acpi/Config.in          |    2 
 drivers/pci/pci.c               |   23 +++++
 drivers/pci/proc.c              |   23 ++---
 include/asm-i386/fixmap.h       |    3 
 include/asm-x86_64/fixmap.h     |    3 
 include/linux/pci.h             |    1 
 16 files changed, 514 insertions(+), 15 deletions(-)
arch/i386/config.in +4 -0
diff -Nru a/arch/i386/config.in b/arch/i386/config.in
@@ -286,12 +286,16 @@
       choice '  PCI access mode' \
 	"BIOS		CONFIG_PCI_GOBIOS	\
 	 Direct		CONFIG_PCI_GODIRECT	\
+	 MMConfig 	CONFIG_PCI_GOMMCONFIG	\
 	 Any		CONFIG_PCI_GOANY"	Any
       if [ "$CONFIG_PCI_GOBIOS" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
          define_bool CONFIG_PCI_BIOS y
       fi
       if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
          define_bool CONFIG_PCI_DIRECT y
+      fi
+      if [ "$CONFIG_PCI_GOMMCONFIG" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
+         define_bool CONFIG_PCI_MMCONFIG y
       fi
    fi
    bool 'ISA bus support' CONFIG_ISA
arch/i386/kernel/Makefile +4 -0
diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
@@ -30,6 +30,10 @@
 endif
 endif
 
+ifdef CONFIG_PCI_MMCONFIG
+obj-y			+= mmconfig.o
+endif
+
 obj-$(CONFIG_MCA)		+= mca.o
 obj-$(CONFIG_MTRR)		+= mtrr.o
 obj-$(CONFIG_X86_MSR)		+= msr.o
arch/i386/kernel/mmconfig.c new file +178 -0

178 lines not on this page · raw message

arch/i386/kernel/pci-i386.h +10 -0
diff -Nru a/arch/i386/kernel/pci-i386.h b/arch/i386/kernel/pci-i386.h
@@ -15,6 +15,8 @@
 #define PCI_PROBE_BIOS		0x0001
 #define PCI_PROBE_CONF1		0x0002
 #define PCI_PROBE_CONF2		0x0004
+#define PCI_PROBE_MMCONF	0x0008
+#define PCI_PROBE_MASK		0x000f
 #define PCI_NO_SORT		0x0100
 #define PCI_BIOS_SORT		0x0200
 #define PCI_NO_CHECKS		0x0400
@@ -23,6 +25,7 @@
 #define PCI_ASSIGN_ALL_BUSSES	0x4000
 
 extern unsigned int pci_probe;
+extern spinlock_t pci_config_lock;
 
 /* pci-i386.c */
 
@@ -69,3 +72,10 @@
 void pcibios_irq_init(void);
 void pcibios_fixup_irqs(void);
 void pcibios_enable_irq(struct pci_dev *dev);
+
+/* mmconfig.c */
+int pci_mcfg_read(int seg, int bus, int dev, int fn, int reg, int len, 
+				u32 *value);
+int pci_mcfg_write(int seg, int bus, int dev, int fn, int reg, int len, 
+				u32 *value);
+struct pci_ops * __devinit pci_mmcfg_init(void);
arch/i386/kernel/pci-pc.c +36 -2
diff -Nru a/arch/i386/kernel/pci-pc.c b/arch/i386/kernel/pci-pc.c
@@ -20,7 +20,8 @@
 
 #include "pci-i386.h"
 
-unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2;
+unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
+				PCI_PROBE_MMCONF;
 
 int pcibios_last_bus = -1;
 struct pci_bus *pci_root_bus = NULL;
@@ -45,7 +46,7 @@
  * This interrupt-safe spinlock protects all accesses to PCI
  * configuration space.
  */
-static spinlock_t pci_config_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t pci_config_lock = SPIN_LOCK_UNLOCKED;
 
 
 /*
@@ -1446,6 +1447,33 @@
 	}
 #endif
 
+#ifdef CONFIG_PCI_MMCONFIG
+	pci_root_ops = pci_mmcfg_init();
+	if (pci_root_ops){
+		pci_config_read = pci_mcfg_read;
+		pci_config_write = pci_mcfg_write;
+		return;
+	}
+#ifdef CONFIG_PCI_DIRECT
+	/*
+	 * PCI Express option is enabled in NON-PCI Express
+	 * platforms. Reset the PCI root ops
+	 */
+	if ((pci_probe & (PCI_PROBE_CONF1 | PCI_PROBE_CONF2)) 
+		&& (tmp = pci_check_direct())) {
+		pci_root_ops = tmp;
+		if (pci_root_ops == &pci_direct_conf1) {
+			pci_config_read = pci_conf1_read;
+			pci_config_write = pci_conf1_write;
+		}
+		else {
+			pci_config_read = pci_conf2_read;
+			pci_config_write = pci_conf2_write;
+		}
+	}
+#endif
+#endif
+
 	return;
 }
 
@@ -1520,6 +1548,12 @@
 	}
 	else if (!strcmp(str, "conf2")) {
 		pci_probe = PCI_PROBE_CONF2 | PCI_NO_CHECKS;
+		return NULL;
+	}
+#endif
+#ifdef CONFIG_PCI_MMCONFIG
+	else if (!strcmp(str, "nommconf")) {
+		pci_probe &= ~PCI_PROBE_MMCONF;
 		return NULL;
 	}
 #endif
arch/x86_64/config.in +10 -1
diff -Nru a/arch/x86_64/config.in b/arch/x86_64/config.in
@@ -95,7 +95,16 @@
 bool 'Networking support' CONFIG_NET
 bool 'PCI support' CONFIG_PCI
 if [ "$CONFIG_PCI" = "y" ]; then
-   define_bool CONFIG_PCI_DIRECT y 
+      choice '  PCI access mode' \
+	"Direct		CONFIG_PCI_GODIRECT 	\
+	 MMConfig 	CONFIG_PCI_GOMMCONFIG 	\
+	 Any		CONFIG_PCI_GOANY"	Any
+      if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
+         define_bool CONFIG_PCI_DIRECT y
+      fi
+      if [ "$CONFIG_PCI_GOMMCONFIG" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
+         define_bool CONFIG_PCI_MMCONFIG y
+      fi
 fi
 
 source drivers/pci/Config.in
arch/x86_64/kernel/Makefile +4 -0
diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
@@ -21,6 +21,10 @@
 		pci-dma.o x8664_ksyms.o i387.o syscall.o vsyscall.o \
 		setup64.o e820.o warmreboot.o
 
+ifdef CONFIG_PCI_MMCONFIG
+obj-y			+= mmconfig.o
+endif
+
 ifdef CONFIG_PCI
 obj-y			+= pci-x86_64.o
 obj-y			+= pci-pc.o pci-irq.o
arch/x86_64/kernel/mmconfig.c new file +170 -0

170 lines not on this page · raw message

arch/x86_64/kernel/pci-pc.c +45 -1

70 lines not on this page · raw message

arch/x86_64/kernel/pci-x86_64.h +9 -0
diff -Nru a/arch/x86_64/kernel/pci-x86_64.h b/arch/x86_64/kernel/pci-x86_64.h
@@ -15,6 +15,8 @@
 #define PCI_PROBE_BIOS		0x0001
 #define PCI_PROBE_CONF1		0x0002
 #define PCI_PROBE_CONF2		0x0004
+#define PCI_PROBE_MMCONF	0x0008
+#define PCI_PROBE_MASK		0x000f
 #define PCI_NO_SORT		0x0100
 #define PCI_BIOS_SORT		0x0200
 #define PCI_NO_CHECKS		0x0400
@@ -74,3 +76,10 @@
 void pcibios_enable_irq(struct pci_dev *dev);
 
 void pci_iommu_init(void);
+
+/* mmconfig.c */
+int pci_mcfg_read(int seg, int bus, int dev, int fn, int reg, int len, 
+				u32 *value);
+int pci_mcfg_write(int seg, int bus, int dev, int fn, int reg, int len, 
+				u32 *value);
+struct pci_ops * __devinit pci_mmcfg_init(void);
drivers/acpi/Config.in +2 -0
diff -Nru a/drivers/acpi/Config.in b/drivers/acpi/Config.in
@@ -14,6 +14,7 @@
     define_bool CONFIG_ACPI_INTERPRETER		y
     define_bool CONFIG_ACPI_EC			y
     define_bool CONFIG_ACPI_POWER		y
+    define_bool CONFIG_ACPI_MMCONFIG		y
     if [ "$CONFIG_PCI" = "y" ]; then
       define_bool CONFIG_ACPI_PCI		y
       define_bool CONFIG_ACPI_MMCONFIG		y
@@ -73,6 +74,7 @@
     define_bool CONFIG_ACPI_BUS		y
     define_bool CONFIG_ACPI_INTERPRETER y
     define_bool CONFIG_ACPI_POWER 	y
+    define_bool CONFIG_ACPI_MMCONFIG	y
     define_bool CONFIG_ACPI_SYSTEM 	y
     tristate     '  Button'		CONFIG_ACPI_BUTTON
     tristate     '  Fan'		CONFIG_ACPI_FAN
drivers/pci/pci.c +23 -0
diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c
@@ -36,6 +36,9 @@
 #define DBG(x...)
 #endif
 
+#define PCI_CFG_SPACE_SIZE	256
+#define PCI_CFG_SPACE_EXP_SIZE	4096
+
 LIST_HEAD(pci_root_buses);
 LIST_HEAD(pci_devices);
 
@@ -165,6 +168,8 @@
  *  %PCI_CAP_ID_CHSWP        CompactPCI HotSwap 
  *
  *  %PCI_CAP_ID_PCIX         PCI-X
+ *
+ *  %PCI_CAP_ID_EXP          PCI Express
  */
 int
 pci_find_capability(struct pci_dev *dev, int cap)
@@ -199,6 +204,21 @@
 	return 0;
 }
 
+/**
+ * pci_cfg_space_size - get the configuration space size of the PCI device.
+ * Regular PCI devices have 256 bytes, but PCI-X 2 and PCI Express devices
+ * have 4096 bytes.
+ */
+static int pci_cfg_space_size(struct pci_dev *dev)
+{
+	int pos;
+
+	pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+	if (pos)
+		return PCI_CFG_SPACE_EXP_SIZE;
+	
+	return PCI_CFG_SPACE_SIZE;
+}
 
 /**
  * pci_find_parent_resource - return resource region of parent bus of given region
@@ -1426,6 +1446,9 @@
 		       dev->slot_name, class, dev->hdr_type);
 		dev->class = PCI_CLASS_NOT_DEFINED;
 	}
+
+	/* Get the config space size */
+	dev->cfg_size = pci_cfg_space_size(dev);
 
 	/* We found a fine healthy device, go go go... */
 	return 0;
drivers/pci/proc.c +12 -11
diff -Nru a/drivers/pci/proc.c b/drivers/pci/proc.c
@@ -16,12 +16,13 @@
 #include <asm/uaccess.h>
 #include <asm/byteorder.h>
 
-#define PCI_CFG_SPACE_SIZE 256
-
 static loff_t
 proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
 {
 	loff_t new;
+	const struct inode *ino = file->f_dentry->d_inode;
+	const struct proc_dir_entry *dp = ino->u.generic_ip;
+	struct pci_dev *dev = dp->data;
 
 	switch (whence) {
 	case 0:
@@ -31,12 +32,12 @@
 		new = file->f_pos + off;
 		break;
 	case 2:
-		new = PCI_CFG_SPACE_SIZE + off;
+		new = dev->cfg_size + off;
 		break;
 	default:
 		return -EINVAL;
 	}
-	if (new < 0 || new > PCI_CFG_SPACE_SIZE)
+	if (new < 0 || new > dev->cfg_size)
 		return -EINVAL;
 	return (file->f_pos = new);
 }
@@ -57,7 +58,7 @@
 	 */
 
 	if (capable(CAP_SYS_ADMIN))
-		size = PCI_CFG_SPACE_SIZE;
+		size = dev->cfg_size;
 	else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
 		size = 128;
 	else
@@ -132,12 +133,12 @@
 	int pos = *ppos;
 	int cnt;
 
-	if (pos >= PCI_CFG_SPACE_SIZE)
+	if (pos >= dev->cfg_size)
 		return 0;
-	if (nbytes >= PCI_CFG_SPACE_SIZE)
-		nbytes = PCI_CFG_SPACE_SIZE;
-	if (pos + nbytes > PCI_CFG_SPACE_SIZE)
-		nbytes = PCI_CFG_SPACE_SIZE - pos;
+	if (nbytes >= dev->cfg_size)
+		nbytes = dev->cfg_size;
+	if (pos + nbytes > dev->cfg_size)
+		nbytes = dev->cfg_size - pos;
 	cnt = nbytes;
 
 	if (!access_ok(VERIFY_READ, buf, cnt))
@@ -389,7 +390,7 @@
 		return -ENOMEM;
 	e->proc_fops = &proc_bus_pci_operations;
 	e->data = dev;
-	e->size = PCI_CFG_SPACE_SIZE;
+	e->size = dev->cfg_size;
 	return 0;
 }
 
include/asm-i386/fixmap.h +3 -0
diff -Nru a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h
@@ -76,6 +76,9 @@
 	FIX_ACPI_BEGIN,
 	FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
 #endif
+#ifdef CONFIG_PCI_MMCONFIG
+	FIX_PCIE_MCFG,
+#endif
 	__end_of_permanent_fixed_addresses,
 	/* temporary boot-time mappings, used before ioremap() is functional */
 #define NR_FIX_BTMAPS	16
include/asm-x86_64/fixmap.h +3 -0
diff -Nru a/include/asm-x86_64/fixmap.h b/include/asm-x86_64/fixmap.h
@@ -46,6 +46,9 @@
 	FIX_IO_APIC_BASE_0,
 	FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1,
 #endif
+#ifdef CONFIG_PCI_MMCONFIG
+	FIX_PCIE_MCFG,
+#endif
 	__end_of_fixed_addresses
 };
 
include/linux/pci.h +1 -0
diff -Nru a/include/linux/pci.h b/include/linux/pci.h
@@ -401,6 +401,7 @@
 	/* device is compatible with these IDs */
 	unsigned short vendor_compatible[DEVICE_COUNT_COMPATIBLE];
 	unsigned short device_compatible[DEVICE_COUNT_COMPATIBLE];
+	int		cfg_size;	/* Size of configuration space */
 
 	/*
 	 * Instead of touching interrupt line and base address registers
author
#2 lore raw

ChangeSet 1.1428, 2004/05/24 13:33:53-07:00, [email protected]

[PATCH] PCI: PCI Express help in 2.4

Here is a patch for describing PCI access mode - help in 2.4. This aligns the help with what is in 2.6.

 Documentation/Configure.help |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
Documentation/Configure.help +7 -6
diff -Nru a/Documentation/Configure.help b/Documentation/Configure.help
@@ -4236,12 +4236,13 @@
   PCI-based systems don't have any BIOS at all. Linux can also try to
   detect the PCI hardware directly without using the BIOS.
 
-  With this option, you can specify how Linux should detect the PCI
-  devices. If you choose "BIOS", the BIOS will be used, if you choose
-  "Direct", the BIOS won't be used, and if you choose "Any", the
-  kernel will try the direct access method and falls back to the BIOS
-  if that doesn't work. If unsure, go with the default, which is
-  "Any".
+  With this option, you can specify how Linux should detect the
+  PCI devices. If you choose "BIOS", the BIOS will be used,
+  if you choose "Direct", the BIOS won't be used, and if you
+  choose "MMConfig", then PCI Express MMCONFIG will be used.
+  If you choose "Any", the kernel will try MMCONFIG, then the
+  direct access method and falls back to the BIOS if that doesn't
+  work. If unsure, go with the default, which is "Any".
 
 PCI device name database
 CONFIG_PCI_NAMES
#3 lore raw
In reply to Greg KH
Quoted 6 lines · Greg KH

Hi,

Now that the ACPI portion of PCI Express support is in the 2.4 kernel tree, I can send you the remaining portion to actually enable this feature to work properly. Here is the PCI Express support for i386 and x86_64 platforms backported from 2.6 to the 2.4 kernel.

how does this mesh with the "2.4 is now feature frozen"? Especially since you don't NEED this patch to run on pci express hardware, it's just that you can use a few performance tweaks.

author
#4 lore raw
Quoted 10 lines · Arjan van de Ven
Quoted 6 lines · Greg KH

Hi,

Now that the ACPI portion of PCI Express support is in the 2.4 kernel tree, I can send you the remaining portion to actually enable this feature to work properly. Here is the PCI Express support for i386 and x86_64 platforms backported from 2.6 to the 2.4 kernel.

how does this mesh with the "2.4 is now feature frozen"?

As the major chunk of ACPI support just got added to the tree, and the only reason that went in was for this patch, I assumed that it was acceptable. Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

Quoted 2 lines

Especially since you don't NEED this patch to run on pci express hardware, it's just that you can use a few performance tweaks.

I agree.

thanks,

greg k-h

#5 lore raw
Quoted 6 lines · Greg KH
Quoted 1 line

how does this mesh with the "2.4 is now feature frozen"?

As the major chunk of ACPI support just got added to the tree, and the only reason that went in was for this patch, I assumed that it was acceptable. Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

I assume it was added because Len tries to keep ACPI in 2.4 and 2.6 as close to identical as possible. It certainly doesn't hurt anyone to add the ACPI functionality without the MMConfig support.

Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
#6 lore raw

Hi kernel fellows,

Quoted 6 lines · Matthew Wilcox
Quoted 5 lines · Greg KH
Quoted 1 line

how does this mesh with the "2.4 is now feature frozen"?

As the major chunk of ACPI support just got added to the tree, and the only reason that went in was for this patch, I assumed that it was acceptable.

major? the MMConfig support is minimal as I can see?

Quoted 2 lines
Quoted 2 lines

Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

Is this code necessary for PCI-Express devices/busses to work properly?

Quoted 3 lines

I assume it was added because Len tries to keep ACPI in 2.4 and 2.6 as close to identical as possible. It certainly doesn't hurt anyone to add the ACPI functionality without the MMConfig support.

I've humbly asked Len to stop doing big updates whenever possible on the v2.4 ACPI code, and do bugfixes only instead. Is that a pain in the ass for you, Len?

I asked that because it is common to see new bugs introduced by an ACPI update, and you know that more than I do.

Thanks!

PS: Greg, about the PCI-Express hotplug drivers, I assume they are independant on any of this?

#7 lore raw
Quoted 4 lines · Marcelo Tosatti
Quoted 2 lines
Quoted 2 lines

Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

Is this code necessary for PCI-Express devices/busses to work properly?

afaik not. It's an enhancement to make config space access to them somewhat faster, but they just work using the existing method.

#8 lore raw
Quoted 9 lines · Arjan van de Ven
Quoted 4 lines · Marcelo Tosatti
Quoted 2 lines
Quoted 2 lines

Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

Is this code necessary for PCI-Express devices/busses to work properly?

afaik not. It's an enhancement to make config space access to them somewhat faster, but they just work using the existing method.

It also allows access to the top 3840 bytes of config space. The *spec* says you can't require access to that area for correct functioning of the device, but we all know how much people love to follow specs.

Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
author
#9 lore raw
Quoted 6 lines · Matthew Wilcox
Quoted 5 lines · Arjan van de Ven
Quoted 3 lines · Marcelo Tosatti
Quoted 2 lines
Quoted 2 lines

Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Is this code necessary for PCI-Express devices/busses to work properly?

afaik not. It's an enhancement to make config space access to them somewhat faster, but they just work using the existing method.

It also allows access to the top 3840 bytes of config space. The *spec* says you can't require access to that area for correct functioning of the device, but we all know how much people love to follow specs.

As no one really has PCI Express devices at this time, who knows how badly the vendors will mess them up :)

thanks,

greg k-h

#10 lore raw
Quoted 1 line · Greg KH

As no one really has PCI Express devices at this time, who knows how

This is not really true...

author
#11 lore raw
Quoted 4 lines · Jeff Garzik
Quoted 1 line · Greg KH

As no one really has PCI Express devices at this time, who knows how

This is not really true...

Ok, I have seen a few of them in labs, but I'm having a _real_ hard time finding one at the local Fry's to purchase :)

greg k-h

author
#12 lore raw
In reply to Marcelo Tosatti
Quoted 4 lines · Marcelo Tosatti

Hi kernel fellows,

On Tue, May 25, 2004 at 12:32:31PM +0100, Matthew Wilcox wrote:

Quoted 8 lines
Quoted 6 lines · Greg KH
Quoted 5 lines
Quoted 1 line

how does this mesh with the "2.4 is now feature frozen"?

As the major chunk of ACPI support just got added to the tree, and the only reason that went in was for this patch, I assumed that it was acceptable.

major? the MMConfig support is minimal as I can see?

It isn't that big of a patch, but it is make to core PCI code.

Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

Is this code necessary for PCI-Express devices/busses to work properly?

Not that I can tell, the main point is accessing the extended config space, and speeding up the access to the device to its natural speed.

Quoted 9 lines
Quoted 3 lines

I assume it was added because Len tries to keep ACPI in 2.4 and 2.6 as close to identical as possible. It certainly doesn't hurt anyone to add the ACPI functionality without the MMConfig support.

I've humbly asked Len to stop doing big updates whenever possible on the v2.4 ACPI code, and do bugfixes only instead. Is that a pain in the ass for you, Len?

I asked that because it is common to see new bugs introduced by an ACPI update, and you know that more than I do.

Yes, I know that quite well :)

So, because of this, you are saying that we should not apply these patches at this time?

If so, that's fine with me, as now any distro that wants to add this to their 2.4 kernel can, as the patches are public.

Quoted 2 lines

PS: Greg, about the PCI-Express hotplug drivers, I assume they are independant on any of this?

Yes, that is independant of these changes (that is required as there is no other way to control the pci hotplug controller of those systems, except with the driver I had submitted in the past to you.).

thanks,

greg k-h

#13 lore raw
Quoted 31 lines · Greg KH
Quoted 4 lines · Marcelo Tosatti

Hi kernel fellows,

On Tue, May 25, 2004 at 12:32:31PM +0100, Matthew Wilcox wrote:

Quoted 8 lines
Quoted 6 lines · Greg KH
Quoted 5 lines
Quoted 1 line

how does this mesh with the "2.4 is now feature frozen"?

As the major chunk of ACPI support just got added to the tree, and the only reason that went in was for this patch, I assumed that it was acceptable.

major? the MMConfig support is minimal as I can see?

It isn't that big of a patch, but it is make to core PCI code.

Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

Is this code necessary for PCI-Express devices/busses to work properly?

Not that I can tell, the main point is accessing the extended config space, and speeding up the access to the device to its natural speed.

Quoted 7 lines
Quoted 3 lines

I assume it was added because Len tries to keep ACPI in 2.4 and 2.6 as close to identical as possible. It certainly doesn't hurt anyone to add the ACPI functionality without the MMConfig support.

I've humbly asked Len to stop doing big updates whenever possible on the v2.4 ACPI code, and do bugfixes only instead. Is that a pain in the ass for you, Len?

Quoted 7 lines
Quoted 2 lines

I asked that because it is common to see new bugs introduced by an ACPI update, and you know that more than I do.

Yes, I know that quite well :)

So, because of this, you are saying that we should not apply these patches at this time?

Yeap, I would prefer not to apply them at this time. For one, Arjan told me privately it can break XFree86 which accesses the PCI config space directly. Right?

Quoted 2 lines

If so, that's fine with me, as now any distro that wants to add this to their 2.4 kernel can, as the patches are public.

Yeap.

Quoted 10 lines
Quoted 2 lines

PS: Greg, about the PCI-Express hotplug drivers, I assume they are independant on any of this?

Yes, that is independant of these changes (that is required as there is no other way to control the pci hotplug controller of those systems, except with the driver I had submitted in the past to you.).

thanks,

greg k-h

author
#14 lore raw
Quoted 35 lines · Marcelo Tosatti
Quoted 34 lines · Greg KH
Quoted 4 lines · Marcelo Tosatti

Hi kernel fellows,

On Tue, May 25, 2004 at 12:32:31PM +0100, Matthew Wilcox wrote:

Quoted 8 lines
Quoted 6 lines · Greg KH
Quoted 5 lines
Quoted 1 line

how does this mesh with the "2.4 is now feature frozen"?

As the major chunk of ACPI support just got added to the tree, and the only reason that went in was for this patch, I assumed that it was acceptable.

major? the MMConfig support is minimal as I can see?

It isn't that big of a patch, but it is make to core PCI code.

Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

Marcelo, feel free to tell me otherwise if you do not want this in the 2.4 tree.

Is this code necessary for PCI-Express devices/busses to work properly?

Not that I can tell, the main point is accessing the extended config space, and speeding up the access to the device to its natural speed.

Quoted 9 lines
Quoted 3 lines

I assume it was added because Len tries to keep ACPI in 2.4 and 2.6 as close to identical as possible. It certainly doesn't hurt anyone to add the ACPI functionality without the MMConfig support.

I've humbly asked Len to stop doing big updates whenever possible on the v2.4 ACPI code, and do bugfixes only instead. Is that a pain in the ass for you, Len?

I asked that because it is common to see new bugs introduced by an ACPI update, and you know that more than I do.

Quoted 8 lines
Quoted 4 lines

Yes, I know that quite well :)

So, because of this, you are saying that we should not apply these patches at this time?

Yeap, I would prefer not to apply them at this time. For one, Arjan told me privately it can break XFree86 which accesses the PCI config space directly. Right?

Um, not that I know of. 2.6 has had this code for a while now with no reported problems.

Arjan, is there something I need to know about? :)

Quoted 4 lines
Quoted 2 lines

If so, that's fine with me, as now any distro that wants to add this to their 2.4 kernel can, as the patches are public.

Yeap.

Ok, no problem, thanks for looking at it.

greg k-h