All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PATCH] PCI patches for 2.6.12
@ 2005-06-28  5:30 Greg KH
  2005-06-28  5:32 ` [PATCH] PCI Allow OutOfRange PIRQ table address Greg KH
  0 siblings, 1 reply; 36+ messages in thread
From: Greg KH @ 2005-06-28  5:30 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, linux-pci

Here are a bunch of PCI patches against your latest git tree, and even a
merge (hey, it was my first, I was happy it all worked out ok...).  They
include:
	- acpi pci hotplug driver updates and reworks.
	- dma bursting help for drivers
	- msi minor cleanups
	- MCFG acpi table parsing for pci busses

All of these patches have been in the -mm tree for the past few months.
I have not included any of the pci patches in the -mm tree that were
causing people problems.  Those are still being worked on to get
correct.

Please pull from:
	rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/
or if master.kernel.org hasn't synced up yet:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/

The full patches will be sent to the linux-kernel and linux-pci mailing
lists, if anyone wants to see them.

thanks,

greg k-h


 Documentation/kernel-parameters.txt |    4 
 arch/i386/kernel/acpi/boot.c        |   57 +-
 arch/i386/pci/common.c              |    8 
 arch/i386/pci/irq.c                 |   51 +-
 arch/i386/pci/legacy.c              |    2 
 arch/i386/pci/mmconfig.c            |   41 +
 arch/i386/pci/numa.c                |    2 
 arch/i386/pci/pci.h                 |    1 
 arch/ia64/kernel/acpi.c             |   38 +
 arch/ia64/kernel/iosapic.c          |  134 ++++-
 arch/ia64/pci/pci.c                 |   38 +
 arch/ppc/kernel/pci.c               |   21 
 arch/ppc64/kernel/pci.c             |   22 
 arch/x86_64/pci/mmconfig.c          |   74 ++
 drivers/acpi/container.c            |    2 
 drivers/acpi/pci_bind.c             |   27 -
 drivers/acpi/pci_root.c             |   24 
 drivers/acpi/processor_core.c       |    2 
 drivers/acpi/scan.c                 |  126 ++++-
 drivers/char/moxa.c                 |    2 
 drivers/char/rio/rio_linux.c        |    4 
 drivers/message/fusion/mptfc.c      |    4 
 drivers/message/fusion/mptscsih.c   |   10 
 drivers/message/fusion/mptscsih.h   |    2 
 drivers/message/fusion/mptspi.c     |    4 
 drivers/net/e100.c                  |    9 
 drivers/net/via-rhine.c             |   11 
 drivers/parisc/dino.c               |    1 
 drivers/parisc/lba_pci.c            |    2 
 drivers/pci/bus.c                   |   11 
 drivers/pci/hotplug/Makefile        |    4 
 drivers/pci/hotplug/acpiphp.h       |   47 -
 drivers/pci/hotplug/acpiphp_core.c  |    9 
 drivers/pci/hotplug/acpiphp_glue.c  |  900 ++++++++++++++++++++----------------
 drivers/pci/hotplug/acpiphp_pci.c   |  449 -----------------
 drivers/pci/hotplug/acpiphp_res.c   |  700 ----------------------------
 drivers/pci/hotplug/cpqphp_core.c   |    5 
 drivers/pci/msi.c                   |   88 +--
 drivers/pci/msi.h                   |    9 
 drivers/pci/pci-sysfs.c             |   26 -
 drivers/pci/probe.c                 |   29 -
 drivers/pci/proc.c                  |   14 
 drivers/pci/remove.c                |   14 
 drivers/pci/setup-bus.c             |    5 
 drivers/scsi/3w-9xxx.c              |    8 
 drivers/scsi/3w-xxxx.c              |    8 
 drivers/scsi/ipr.c                  |   10 
 drivers/scsi/megaraid.c             |    8 
 include/acpi/acpi_bus.h             |   17 
 include/acpi/acpi_drivers.h         |    1 
 include/asm-alpha/pci.h             |   19 
 include/asm-arm/pci.h               |   10 
 include/asm-frv/pci.h               |   10 
 include/asm-i386/pci.h              |   10 
 include/asm-ia64/iosapic.h          |   12 
 include/asm-ia64/pci.h              |   19 
 include/asm-mips/pci.h              |   10 
 include/asm-parisc/pci.h            |   19 
 include/asm-ppc/pci.h               |   16 
 include/asm-ppc64/pci.h             |   26 +
 include/asm-sh/pci.h                |   10 
 include/asm-sh64/pci.h              |   10 
 include/asm-sparc/pci.h             |   10 
 include/asm-sparc64/pci.h           |   19 
 include/asm-v850/pci.h              |   10 
 include/asm-x86_64/pci.h            |   10 
 include/linux/acpi.h                |   19 
 include/linux/pci.h                 |   33 +
 include/linux/pci_ids.h             |    2 
 69 files changed, 1509 insertions(+), 1850 deletions(-)

---------------

Amit Gud:
  pci: remove deprecates
  pci: remove deprecates

Andrew Morton:
  PCI: fix up errors after dma bursting patch and CONFIG_PCI=n

David S. Miller:
  PCI: DMA bursting advice

Greg Kroah-Hartman:
  PCI: use the MCFG table to properly access pci devices (x86-64)
  PCI: use the MCFG table to properly access pci devices (i386)
  PCI: make drivers use the pci shutdown callback instead of the driver core callback.
  PCI: add proper MCFG table parsing to ACPI core.
  PCI: clean up the MSI code a bit.

jayalk@intworks.biz:
  PCI Allow OutOfRange PIRQ table address

Keith Moore:
  cpqphp: fix oops during unload without probe

Kenji Kaneshige:
  ACPI based I/O APIC hot-plug: acpiphp support
  ACPI based I/O APIC hot-plug: add interfaces
  ACPI based I/O APIC hot-plug: ia64 support

Michael Ellerman:
  PCI: fix-pci-mmap-on-ppc-and-ppc64.patch

Rajesh Shah:
  acpi hotplug: aCPI based root bridge hot-add
  acpi hotplug: decouple slot power state changes from physical hotplug
  acpi hotplug: fix slot power-down problem with acpiphp
  acpi bridge hotadd: Export the interface to get PCI id for an ACPI handle
  acpi hotplug: convert acpiphp to use generic resource code
  acpi bridge hotadd: Allow ACPI .add and .start operations to be done independently
  acpi hotplug: clean up notify handlers on acpiphp unload
  acpi bridge hotadd: Read bridge resources when fixing up the bus
  acpi bridge hotadd: Remove hot-plugged devices that could not be allocated resources
  acpi bridge hotadd: Make the PCI remove routines safe for failed hot-plug
  acpi bridge hotadd: Take the PCI lock when modifying pci bus or device lists
  acpi bridge hotadd: Prevent duplicate bus numbers when scanning PCI bridge
  acpi bridge hotadd: Link newly created pci child bus to its parent on creation
  acpi bridge hotadd: Fix pci_enable_device() for p2p bridges
  acpi bridge hotadd: ACPI based root bridge hot-add
  acpi bridge hotadd: Make pcibios_fixup_bus() hot-plug safe


^ permalink raw reply	[flat|nested] 36+ messages in thread
* resubmitting intr urb in 2.4 and 2.6 kernels
@ 2006-06-14 13:08 Sergej Pupykin
  2006-06-15  7:28 ` Greg KH
  0 siblings, 1 reply; 36+ messages in thread
From: Sergej Pupykin @ 2006-06-14 13:08 UTC (permalink / raw)
  To: linux-kernel


Hi!

Could anybody explain the reason why intr urb auto resubmitting was removed
from 2.6 kernels?

Or just tell me, it was removed because of some technical problems in it
or only for better architecure?

If it was architecure cleanup, why autoresubmitting was implemented in 2.4?

Thanks.


^ permalink raw reply	[flat|nested] 36+ messages in thread
* [PATCH] PCI: add proper MCFG table parsing to ACPI core.
@ 2005-06-14  6:37 Greg KH
       [not found] ` <20050614063745.GA19556-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 36+ messages in thread
From: Greg KH @ 2005-06-14  6:37 UTC (permalink / raw)
  To: len.brown-ral2JQCrhuEAvxtiuMwx3w, greg-U8xfFu+wG4EAvxtiuMwx3w
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-pci-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/, ak-l3A5Bk7waGM

In order to handle the MCFG ACPI table properly, we need to at least
parse the thing properly :)  So, here's a patch that adds support for
this.  It's against my latest PCI tree (which is included in -mm) but
will apply with a bit of fuzz against 2.6.12-rc6.

I've tested this out on boxes that only have 1 MCFG config table, if
anyone has access to ones that have more than this, I'd be interested to
see how well it works.  Based on the comments in the mmconfig.c file,
I'm guessing that various AMD boxes are like this...

Anyone have any objections to this patch?

thanks,

greg k-h

-----------------------

Subject: PCI: add proper MCFG table parsing to ACPI core.
From: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>

This patch is the first step in properly handling the MCFG PCI table.
It defines the structures properly, and saves off the table so that the
pci mmconfig code can access it.  It moves the parsing of the table a
little later in the boot process, but still before the information is
needed.


Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>

---
     
 arch/i386/kernel/acpi/boot.c |   33 +++++++++++++++++++++++++--------
 arch/i386/pci/mmconfig.c     |   12 +++++++++---
 arch/x86_64/pci/mmconfig.c   |   18 ++++++++++++------
 include/linux/acpi.h         |   16 +++++++++++++---
 4 files changed, 59 insertions(+), 20 deletions(-)

--- gregkh-2.6.orig/arch/i386/kernel/acpi/boot.c	2005-06-10 23:47:32.000000000 -0700
+++ gregkh-2.6/arch/i386/kernel/acpi/boot.c	2005-06-13 23:25:39.000000000 -0700
@@ -158,9 +158,10 @@
 #endif
 
 #ifdef CONFIG_PCI_MMCONFIG
-static int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
+int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
 {
 	struct acpi_table_mcfg *mcfg;
+	unsigned long i;
 
 	if (!phys_addr || !size)
 		return -EINVAL;
@@ -171,18 +172,35 @@
 		return -ENODEV;
 	}
 
-	if (mcfg->base_reserved) {
-		printk(KERN_ERR PREFIX "MMCONFIG not in low 4GB of memory\n");
+	/* how many config structures do we have */
+	pci_mmcfg_config_num = 0;
+	i = size - sizeof(struct acpi_table_mcfg);
+	while (i >= sizeof(struct acpi_table_mcfg_config)) {
+		++pci_mmcfg_config_num;
+		i -= sizeof(struct acpi_table_mcfg_config);
+	};
+	if (pci_mmcfg_config_num == 0) {
+		printk(KERN_ERR PREFIX "MMCONFIG has no entries\n");
 		return -ENODEV;
 	}
 
-	pci_mmcfg_base_addr = mcfg->base_address;
+	pci_mmcfg_config = kmalloc(pci_mmcfg_config_num * sizeof(*pci_mmcfg_config), GFP_KERNEL);
+	if (!pci_mmcfg_config) {
+		printk(KERN_WARNING PREFIX "No memory for MCFG config tables\n");
+		return -ENOMEM;
+	}
+
+	memcpy(pci_mmcfg_config, &mcfg->config, pci_mmcfg_config_num * sizeof(*pci_mmcfg_config));
+	for (i = 0; i < pci_mmcfg_config_num; ++i) {
+		if (mcfg->config[i].base_reserved) {
+			printk(KERN_ERR PREFIX "MMCONFIG not in low 4GB of memory\n");
+			return -ENODEV;
+		}
+	}
 
 	return 0;
 }
-#else
-#define	acpi_parse_mcfg NULL
-#endif /* !CONFIG_PCI_MMCONFIG */
+#endif /* CONFIG_PCI_MMCONFIG */
 
 #ifdef CONFIG_X86_LOCAL_APIC
 static int __init
@@ -923,7 +941,6 @@
 	acpi_process_madt();
 
 	acpi_table_parse(ACPI_HPET, acpi_parse_hpet);
-	acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
 
 	return 0;
 }
--- gregkh-2.6.orig/include/linux/acpi.h	2005-06-10 23:47:32.000000000 -0700
+++ gregkh-2.6/include/linux/acpi.h	2005-06-13 23:25:39.000000000 -0700
@@ -342,11 +342,19 @@
 
 /* PCI MMCONFIG */
 
+/* Defined in PCI Firmware Specification 3.0 */
+struct acpi_table_mcfg_config {
+	u32				base_address;
+	u32				base_reserved;
+	u16				pci_segment_group_number;
+	u8				start_bus_number;
+	u8				end_bus_number;
+	u8				reserved[4];
+} __attribute__ ((packed));
 struct acpi_table_mcfg {
 	struct acpi_table_header	header;
 	u8				reserved[8];
-	u32				base_address;
-	u32				base_reserved;
+	struct acpi_table_mcfg_config	config[0];
 } __attribute__ ((packed));
 
 /* Table Handlers */
@@ -391,6 +399,7 @@
 int acpi_get_table_header_early (enum acpi_table_id id, struct acpi_table_header **header);
 int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries);
 int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries);
+int acpi_parse_mcfg (unsigned long phys_addr, unsigned long size);
 void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr);
 void acpi_table_print_madt_entry (acpi_table_entry_header *madt);
 void acpi_table_print_srat_entry (acpi_table_entry_header *srat);
@@ -412,7 +421,8 @@
 
 extern int acpi_mp_config;
 
-extern u32 pci_mmcfg_base_addr;
+extern struct acpi_table_mcfg_config *pci_mmcfg_config;
+extern int pci_mmcfg_config_num;
 
 extern int sbf_port ;
 
--- gregkh-2.6.orig/arch/i386/pci/mmconfig.c	2005-06-06 12:08:31.000000000 -0700
+++ gregkh-2.6/arch/i386/pci/mmconfig.c	2005-06-13 23:25:39.000000000 -0700
@@ -11,10 +11,12 @@
 
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/acpi.h>
 #include "pci.h"
 
 /* The physical address of the MMCONFIG aperture.  Set from ACPI tables. */
-u32 pci_mmcfg_base_addr;
+struct acpi_table_mcfg_config *pci_mmcfg_config;
+int pci_mmcfg_config_num;
 
 #define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))
 
@@ -27,7 +29,7 @@
 
 static inline void pci_exp_set_dev_base(int bus, int devfn)
 {
-	u32 dev_base = pci_mmcfg_base_addr | (bus << 20) | (devfn << 12);
+	u32 dev_base = pci_mmcfg_config[0].base_address | (bus << 20) | (devfn << 12);
 	if (dev_base != mmcfg_last_accessed_device) {
 		mmcfg_last_accessed_device = dev_base;
 		set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);
@@ -101,7 +103,11 @@
 {
 	if ((pci_probe & PCI_PROBE_MMCONF) == 0)
 		goto out;
-	if (!pci_mmcfg_base_addr)
+
+	acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
+	if ((pci_mmcfg_config_num == 0) ||
+	    (pci_mmcfg_config == NULL) ||
+	    (pci_mmcfg_config[0].base_address == 0))
 		goto out;
 
 	/* Kludge for now. Don't use mmconfig on AMD systems because
--- gregkh-2.6.orig/arch/x86_64/pci/mmconfig.c	2005-06-06 12:08:36.000000000 -0700
+++ gregkh-2.6/arch/x86_64/pci/mmconfig.c	2005-06-13 23:25:39.000000000 -0700
@@ -7,15 +7,17 @@
 
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/acpi.h>
 #include "pci.h"
 
 #define MMCONFIG_APER_SIZE (256*1024*1024)
 
 /* The physical address of the MMCONFIG aperture.  Set from ACPI tables. */
-u32 pci_mmcfg_base_addr;
+struct acpi_table_mcfg_config *pci_mmcfg_config;
+int pci_mmcfg_config_num;
 
 /* Static virtual mapping of the MMCONFIG aperture */
-char *pci_mmcfg_virt;
+static char *pci_mmcfg_virt;
 
 static inline char *pci_dev_base(unsigned int bus, unsigned int devfn)
 {
@@ -77,8 +79,12 @@
 {
 	if ((pci_probe & PCI_PROBE_MMCONF) == 0)
 		return 0;
-	if (!pci_mmcfg_base_addr)
-		return 0;
+
+	acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
+	if ((pci_mmcfg_config_num == 0) ||
+	    (pci_mmcfg_config == NULL) ||
+	    (pci_mmcfg_config[0].base_address == 0))
+		goto out;
 
 	/* Kludge for now. Don't use mmconfig on AMD systems because
 	   those have some busses where mmconfig doesn't work,
@@ -88,13 +94,13 @@
 		return 0; 
 
 	/* RED-PEN i386 doesn't do _nocache right now */
-	pci_mmcfg_virt = ioremap_nocache(pci_mmcfg_base_addr, MMCONFIG_APER_SIZE);
+	pci_mmcfg_virt = ioremap_nocache(pci_mmcfg_config[0].base_address, MMCONFIG_APER_SIZE);
 	if (!pci_mmcfg_virt) { 
 		printk("PCI: Cannot map mmconfig aperture\n");
 		return 0;
 	}	
 
-	printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_base_addr);
+	printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[0].base_address);
 	raw_pci_ops = &pci_mmcfg;
 	pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
 


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20

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

end of thread, other threads:[~2006-06-15 16:08 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-28  5:30 [GIT PATCH] PCI patches for 2.6.12 Greg KH
2005-06-28  5:32 ` [PATCH] PCI Allow OutOfRange PIRQ table address Greg KH
2005-06-28  5:32   ` [PATCH] pci: remove deprecates Greg KH
2005-06-28  5:32     ` Greg KH
2005-06-28  5:32       ` [PATCH] acpi bridge hotadd: Make pcibios_fixup_bus() hot-plug safe Greg KH
2005-06-28  5:32         ` [PATCH] acpi bridge hotadd: ACPI based root bridge hot-add Greg KH
2005-06-28  5:32           ` [PATCH] acpi bridge hotadd: Fix pci_enable_device() for p2p bridges Greg KH
2005-06-28  5:32             ` [PATCH] acpi bridge hotadd: Link newly created pci child bus to its parent on creation Greg KH
2005-06-28  5:32               ` [PATCH] acpi bridge hotadd: Prevent duplicate bus numbers when scanning PCI bridge Greg KH
2005-06-28  5:32                 ` [PATCH] acpi bridge hotadd: Take the PCI lock when modifying pci bus or device lists Greg KH
2005-06-28  5:32                   ` [PATCH] acpi bridge hotadd: Make the PCI remove routines safe for failed hot-plug Greg KH
2005-06-28  5:32                     ` [PATCH] acpi bridge hotadd: Remove hot-plugged devices that could not be allocated resources Greg KH
2005-06-28  5:32                       ` [PATCH] acpi bridge hotadd: Read bridge resources when fixing up the bus Greg KH
2005-06-28  5:32                         ` [PATCH] acpi hotplug: clean up notify handlers on acpiphp unload Greg KH
2005-06-28  5:32                           ` [PATCH] acpi bridge hotadd: Allow ACPI .add and .start operations to be done independently Greg KH
2005-06-28  5:32                             ` [PATCH] acpi hotplug: convert acpiphp to use generic resource code Greg KH
2005-06-28  5:32                               ` [PATCH] acpi bridge hotadd: Export the interface to get PCI id for an ACPI handle Greg KH
2005-06-28  5:32                                 ` [PATCH] acpi hotplug: fix slot power-down problem with acpiphp Greg KH
2005-06-28  5:32                                   ` [PATCH] acpi hotplug: decouple slot power state changes from physical hotplug Greg KH
2005-06-28  5:32                                     ` [PATCH] acpi hotplug: aCPI based root bridge hot-add Greg KH
2005-06-28  5:32                                       ` [PATCH] ACPI based I/O APIC hot-plug: ia64 support Greg KH
2005-06-28  5:32                                         ` [PATCH] ACPI based I/O APIC hot-plug: add interfaces Greg KH
2005-06-28  5:32                                           ` [PATCH] PCI: fix-pci-mmap-on-ppc-and-ppc64.patch Greg KH
2005-06-28  5:32                                             ` [PATCH] ACPI based I/O APIC hot-plug: acpiphp support Greg KH
2005-06-28  5:32                                               ` [PATCH] PCI: DMA bursting advice Greg KH
2005-06-28  5:32                                                 ` [PATCH] cpqphp: fix oops during unload without probe Greg KH
2005-06-28  5:32                                                   ` [PATCH] PCI: clean up the MSI code a bit Greg KH
2005-06-28  5:32                                                     ` [PATCH] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n Greg KH
2005-06-28  5:32                                                       ` [PATCH] PCI: add proper MCFG table parsing to ACPI core Greg KH
2005-06-28  5:32                                                         ` [PATCH] PCI: make drivers use the pci shutdown callback instead of the driver core callback Greg KH
2005-06-28  5:32                                                           ` [PATCH] PCI: use the MCFG table to properly access pci devices (i386) Greg KH
2005-06-28  5:32                                                             ` [PATCH] PCI: use the MCFG table to properly access pci devices (x86-64) Greg KH
2005-06-29 16:33           ` [PATCH] acpi bridge hotadd: ACPI based root bridge hot-add Grant Grundler
  -- strict thread matches above, loose matches on Subject: below --
2006-06-14 13:08 resubmitting intr urb in 2.4 and 2.6 kernels Sergej Pupykin
2006-06-15  7:28 ` Greg KH
2006-06-15 16:08   ` [PATCH] PCI: add proper MCFG table parsing to ACPI core Konrad Rzeszutek
2005-06-14  6:37 Greg KH
     [not found] ` <20050614063745.GA19556-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2005-06-14  9:37   ` Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.