Skip to content

Commit 556f12f

Browse files
committed
Merge tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas: "Host bridge hotplug - Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu) - Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu) - Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu) - Stop caching _PRT and make independent of bus numbers (Yinghai Lu) PCI device hotplug - Clean up cpqphp dead code (Sasha Levin) - Disable ARI unless device and upstream bridge support it (Yijing Wang) - Initialize all hot-added devices (not functions 0-7) (Yijing Wang) Power management - Don't touch ASPM if disabled (Joe Lawrence) - Fix ASPM link state management (Myron Stowe) Miscellaneous - Fix PCI_EXP_FLAGS accessor (Alex Williamson) - Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov) - Document hotplug resource and MPS parameters (Yijing Wang) - Add accessor for PCIe capabilities (Myron Stowe) - Drop pciehp suspend/resume messages (Paul Bolle) - Make pci_slot built-in only (not a module) (Jiang Liu) - Remove unused PCI/ACPI bind ops (Jiang Liu) - Removed used pci_root_bus (Bjorn Helgaas)" * tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits) PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS ACPI / PCI: Make pci_slot built-in only, not a module PCI/PM: Clear state_saved during suspend PCI: Use atomic_inc_return() rather than atomic_add_return() PCI: Catch attempts to disable already-disabled devices PCI: Disable Bus Master unconditionally in pci_device_shutdown() PCI: acpiphp: Remove dead code for PCI host bridge hotplug PCI: acpiphp: Create companion ACPI devices before creating PCI devices PCI: Remove unused "rc" in virtfn_add_bus() PCI: pciehp: Drop suspend/resume ENTRY messages PCI/ASPM: Don't touch ASPM if forcibly disabled PCI/ASPM: Deallocate upstream link state even if device is not PCIe PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc PCI: Document hpiosize= and hpmemsize= resource reservation parameters PCI: Use PCI Express Capability accessor PCI: Introduce accessor to retrieve PCIe Capabilities Register PCI: Put pci_dev in device tree as early as possible PCI: Skip attaching driver in device_add() PCI: acpiphp: Keep driver loaded even if no slots found ...
2 parents fffddfd + 018ba0a commit 556f12f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+679
-791
lines changed

Documentation/kernel-parameters.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
22622262
This sorting is done to get a device
22632263
order compatible with older (<= 2.4) kernels.
22642264
nobfsort Don't sort PCI devices into breadth-first order.
2265+
pcie_bus_tune_off Disable PCIe MPS (Max Payload Size)
2266+
tuning and use the BIOS-configured MPS defaults.
2267+
pcie_bus_safe Set every device's MPS to the largest value
2268+
supported by all devices below the root complex.
2269+
pcie_bus_perf Set device MPS to the largest allowable MPS
2270+
based on its parent bus. Also set MRRS (Max
2271+
Read Request Size) to the largest supported
2272+
value (no larger than the MPS that the device
2273+
or bus can support) for best performance.
2274+
pcie_bus_peer2peer Set every device's MPS to 128B, which
2275+
every device is guaranteed to support. This
2276+
configuration allows peer-to-peer DMA between
2277+
any pair of devices, possibly at the cost of
2278+
reduced performance. This also guarantees
2279+
that hot-added devices will work.
22652280
cbiosize=nn[KMG] The fixed amount of bus space which is
22662281
reserved for the CardBus bridge's IO window.
22672282
The default value is 256 bytes.
@@ -2283,6 +2298,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
22832298
the default.
22842299
off: Turn ECRC off
22852300
on: Turn ECRC on.
2301+
hpiosize=nn[KMG] The fixed amount of bus space which is
2302+
reserved for hotplug bridge's IO window.
2303+
Default size is 256 bytes.
2304+
hpmemsize=nn[KMG] The fixed amount of bus space which is
2305+
reserved for hotplug bridge's memory window.
2306+
Default size is 2 megabytes.
22862307
realloc= Enable/disable reallocating PCI bridge resources
22872308
if allocations done by BIOS are too small to
22882309
accommodate resources required by all child

arch/frv/mb93090-mb00/pci-frv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ void pcibios_resource_survey(void);
3131
/* pci-vdk.c */
3232

3333
extern int __nongpreldata pcibios_last_bus;
34-
extern struct pci_bus *__nongpreldata pci_root_bus;
3534
extern struct pci_ops *__nongpreldata pci_root_ops;
3635

3736
/* pci-irq.c */

arch/frv/mb93090-mb00/pci-vdk.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
unsigned int __nongpreldata pci_probe = 1;
2727

2828
int __nongpreldata pcibios_last_bus = -1;
29-
struct pci_bus *__nongpreldata pci_root_bus;
3029
struct pci_ops *__nongpreldata pci_root_ops;
3130

3231
/*
@@ -416,8 +415,7 @@ int __init pcibios_init(void)
416415
printk("PCI: Probing PCI hardware\n");
417416
pci_add_resource(&resources, &pci_ioport_resource);
418417
pci_add_resource(&resources, &pci_iomem_resource);
419-
pci_root_bus = pci_scan_root_bus(NULL, 0, pci_root_ops, NULL,
420-
&resources);
418+
pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, &resources);
421419

422420
pcibios_irq_init();
423421
pcibios_fixup_peer_bridges();

arch/ia64/pci/pci.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,14 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
393393
return NULL;
394394
}
395395

396+
int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
397+
{
398+
struct pci_controller *controller = bridge->bus->sysdata;
399+
400+
ACPI_HANDLE_SET(&bridge->dev, controller->acpi_handle);
401+
return 0;
402+
}
403+
396404
static int is_valid_resource(struct pci_dev *dev, int idx)
397405
{
398406
unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;

arch/mn10300/unit-asb2305/pci-asb2305.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ extern void pcibios_resource_survey(void);
3636
/* pci.c */
3737

3838
extern int pcibios_last_bus;
39-
extern struct pci_bus *pci_root_bus;
4039
extern struct pci_ops *pci_root_ops;
4140

4241
extern struct irq_routing_table *pcibios_get_irq_routing_table(void);

arch/mn10300/unit-asb2305/pci.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
unsigned int pci_probe = 1;
2525

2626
int pcibios_last_bus = -1;
27-
struct pci_bus *pci_root_bus;
2827
struct pci_ops *pci_root_ops;
2928

3029
/*
@@ -377,8 +376,7 @@ static int __init pcibios_init(void)
377376

378377
pci_add_resource_offset(&resources, &pci_ioport_resource, io_offset);
379378
pci_add_resource_offset(&resources, &pci_iomem_resource, mem_offset);
380-
pci_root_bus = pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL,
381-
&resources);
379+
pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL, &resources);
382380

383381
pcibios_irq_init();
384382
pcibios_fixup_irqs();

arch/x86/include/asm/pci.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
struct pci_sysdata {
1515
int domain; /* PCI domain */
1616
int node; /* NUMA node */
17+
#ifdef CONFIG_ACPI
18+
void *acpi; /* ACPI-specific data */
19+
#endif
1720
#ifdef CONFIG_X86_64
1821
void *iommu; /* IOMMU private data */
1922
#endif

arch/x86/include/asm/pci_x86.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ void pcibios_set_cache_line_size(void);
5454
/* pci-pc.c */
5555

5656
extern int pcibios_last_bus;
57-
extern struct pci_bus *pci_root_bus;
5857
extern struct pci_ops pci_root_ops;
5958

6059
void pcibios_scan_specific_bus(int busn);

arch/x86/pci/acpi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
521521
sd = &info->sd;
522522
sd->domain = domain;
523523
sd->node = node;
524+
sd->acpi = device->handle;
524525
/*
525526
* Maybe the desired pci bus has been already scanned. In such case
526527
* it is unnecessary to scan the pci bus with the given domain,busnum.
@@ -592,6 +593,14 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
592593
return bus;
593594
}
594595

596+
int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
597+
{
598+
struct pci_sysdata *sd = bridge->bus->sysdata;
599+
600+
ACPI_HANDLE_SET(&bridge->dev, sd->acpi);
601+
return 0;
602+
}
603+
595604
int __init pci_acpi_init(void)
596605
{
597606
struct pci_dev *dev = NULL;

arch/x86/pci/common.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ int noioapicreroute = 1;
3434
#endif
3535
int pcibios_last_bus = -1;
3636
unsigned long pirq_table_addr;
37-
struct pci_bus *pci_root_bus;
3837
const struct pci_raw_ops *__read_mostly raw_pci_ops;
3938
const struct pci_raw_ops *__read_mostly raw_pci_ext_ops;
4039

0 commit comments

Comments
 (0)