Skip to content

Commit 43cc31d

Browse files
committed
Merge branch 'pci/misc'
- Reorder struct pci_dev to avoid holes and reduce size (Christophe JAILLET) - Change pdev->rom_attr_enabled to single bit since it's only a boolean value (Christophe JAILLET) - Use struct_size() in pirq_convert_irt_table() instead of hand-writing it (Christophe JAILLET) - Explicitly include correct DT includes to untangle headers (Rob Herring) - Fix a DOE race between destroy_work_on_stack() and the stack-allocated task->work struct going out of scope in pci_doe() (Ira Weiny) - Use pci_dev_id() when possible instead of manually composing ID from dev->bus->number and dev->devfn (Xiongfeng Wang, Zheng Zengkai) - Move pci_create_resource_files() declarations to linux/pci.h for alpha build warnings (Arnd Bergmann) - Remove unused hotplug function declarations (Yue Haibing) - Remove unused mvebu struct mvebu_pcie.busn (Pali Rohár) - Unexport pcie_port_bus_type (Bjorn Helgaas) - Remove unnecessary sysfs ID local variable initialization (Bjorn Helgaas) - Fix BAR value printk formatting to accommodate 32-bit values (Bjorn Helgaas) - Use consistent pointer types for config access syscall get_user() and put_user() uses (Bjorn Helgaas) - Simplify AER_RECOVER_RING_SIZE definition (Bjorn Helgaas) - Simplify pci_pio_to_address() (Bjorn Helgaas) - Simplify pci_dev_driver() (Bjorn Helgaas) - Fix pci_bus_resetable(), pci_slot_resetable() name typos (Bjorn Helgaas) - Fix code and doc typos and code formatting (Bjorn Helgaas) - Tidy config space save/restore messages (Bjorn Helgaas) * pci/misc: PCI: Tidy config space save/restore messages PCI: Fix code formatting inconsistencies PCI: Fix typos in docs and comments PCI: Fix pci_bus_resetable(), pci_slot_resetable() name typos PCI: Simplify pci_dev_driver() PCI: Simplify pci_pio_to_address() PCI/AER: Simplify AER_RECOVER_RING_SIZE definition PCI: Use consistent put_user() pointer types PCI: Fix printk field formatting PCI: Remove unnecessary initializations PCI: Unexport pcie_port_bus_type PCI: mvebu: Remove unused busn member PCI: Remove unused function declarations PCI/sysfs: Move declarations to linux/pci.h PCI/P2PDMA: Use pci_dev_id() to simplify the code PCI/IOV: Use pci_dev_id() to simplify the code PCI/AER: Use pci_dev_id() to simplify the code PCI: apple: Use pci_dev_id() to simplify the code PCI/DOE: Fix destroy_work_on_stack() race PCI: Explicitly include correct DT includes x86/PCI: Use struct_size() in pirq_convert_irt_table() PCI: Change pdev->rom_attr_enabled to single bit PCI: Reorder pci_dev fields to reduce holes
2 parents c3ed70f + 1856d1a commit 43cc31d

Some content is hidden

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

51 files changed

+118
-148
lines changed

Documentation/PCI/pci-error-recovery.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ chipsets are able to deal with these errors; these include PCI-E chipsets,
1717
and the PCI-host bridges found on IBM Power4, Power5 and Power6-based
1818
pSeries boxes. A typical action taken is to disconnect the affected device,
1919
halting all I/O to it. The goal of a disconnection is to avoid system
20-
corruption; for example, to halt system memory corruption due to DMA's
20+
corruption; for example, to halt system memory corruption due to DMAs
2121
to "wild" addresses. Typically, a reconnection mechanism is also
2222
offered, so that the affected PCI device(s) are reset and put back
2323
into working condition. The reset phase requires coordination
@@ -178,9 +178,9 @@ is STEP 6 (Permanent Failure).
178178
complex and not worth implementing.
179179

180180
The current powerpc implementation doesn't much care if the device
181-
attempts I/O at this point, or not. I/O's will fail, returning
181+
attempts I/O at this point, or not. I/Os will fail, returning
182182
a value of 0xff on read, and writes will be dropped. If more than
183-
EEH_MAX_FAILS I/O's are attempted to a frozen adapter, EEH
183+
EEH_MAX_FAILS I/Os are attempted to a frozen adapter, EEH
184184
assumes that the device driver has gone into an infinite loop
185185
and prints an error to syslog. A reboot is then required to
186186
get the device working again.
@@ -204,7 +204,7 @@ instead will have gone directly to STEP 3 (Link Reset) or STEP 4 (Slot Reset)
204204
.. note::
205205

206206
The following is proposed; no platform implements this yet:
207-
Proposal: All I/O's should be done _synchronously_ from within
207+
Proposal: All I/Os should be done _synchronously_ from within
208208
this callback, errors triggered by them will be returned via
209209
the normal pci_check_whatever() API, no new error_detected()
210210
callback will be issued due to an error happening here. However,
@@ -258,7 +258,7 @@ Powerpc platforms implement two levels of slot reset:
258258
soft reset(default) and fundamental(optional) reset.
259259

260260
Powerpc soft reset consists of asserting the adapter #RST line and then
261-
restoring the PCI BAR's and PCI configuration header to a state
261+
restoring the PCI BARs and PCI configuration header to a state
262262
that is equivalent to what it would be after a fresh system
263263
power-on followed by power-on BIOS/system firmware initialization.
264264
Soft reset is also known as hot-reset.
@@ -362,7 +362,7 @@ permanent failure in some way. If the device is hotplug-capable,
362362
the operator will probably want to remove and replace the device.
363363
Note, however, not all failures are truly "permanent". Some are
364364
caused by over-heating, some by a poorly seated card. Many
365-
PCI error events are caused by software bugs, e.g. DMA's to
365+
PCI error events are caused by software bugs, e.g. DMAs to
366366
wild addresses or bogus split transactions due to programming
367367
errors. See the discussion in Documentation/powerpc/eeh-pci-error-recovery.rst
368368
for additional detail on real-life experience of the causes of

arch/alpha/include/asm/pci.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,4 @@ extern void pci_adjust_legacy_attr(struct pci_bus *bus,
8888
enum pci_mmap_state mmap_type);
8989
#define HAVE_PCI_LEGACY 1
9090

91-
extern int pci_create_resource_files(struct pci_dev *dev);
92-
extern void pci_remove_resource_files(struct pci_dev *dev);
93-
9491
#endif /* __ALPHA_PCI_H */

arch/x86/pci/irq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ static inline struct irq_routing_table *pirq_convert_irt_table(u8 *addr,
136136
if (ir->signature != IRT_SIGNATURE || !ir->used || ir->size < ir->used)
137137
return NULL;
138138

139-
size = sizeof(*ir) + ir->used * sizeof(ir->slots[0]);
139+
size = struct_size(ir, slots, ir->used);
140140
if (size > limit - addr)
141141
return NULL;
142142

143143
DBG(KERN_DEBUG "PCI: $IRT Interrupt Routing Table found at 0x%lx\n",
144144
__pa(ir));
145145

146-
size = sizeof(*rt) + ir->used * sizeof(rt->slots[0]);
146+
size = struct_size(rt, slots, ir->used);
147147
rt = kzalloc(size, GFP_KERNEL);
148148
if (!rt)
149149
return NULL;

drivers/pci/controller/cadence/pci-j721e.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include <linux/irqdomain.h>
1515
#include <linux/mfd/syscon.h>
1616
#include <linux/of.h>
17-
#include <linux/of_device.h>
1817
#include <linux/pci.h>
18+
#include <linux/platform_device.h>
1919
#include <linux/pm_runtime.h>
2020
#include <linux/regmap.h>
2121

drivers/pci/controller/cadence/pcie-cadence-plat.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
* Author: Tom Joseph <tjoseph@cadence.com>
77
*/
88
#include <linux/kernel.h>
9-
#include <linux/of_address.h>
9+
#include <linux/of.h>
1010
#include <linux/of_pci.h>
1111
#include <linux/platform_device.h>
1212
#include <linux/pm_runtime.h>
13-
#include <linux/of_device.h>
1413
#include "pcie-cadence.h"
1514

1615
#define CDNS_PLAT_CPU_TO_BUS_ADDR 0x0FFFFFFF

drivers/pci/controller/cadence/pcie-cadence.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Author: Cyrille Pitchen <cyrille.pitchen@free-electrons.com>
55

66
#include <linux/kernel.h>
7+
#include <linux/of.h>
78

89
#include "pcie-cadence.h"
910

drivers/pci/controller/cadence/pcie-cadence.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define CDNS_PCIE_LM_ID_SUBSYS(sub) \
3333
(((sub) << CDNS_PCIE_LM_ID_SUBSYS_SHIFT) & CDNS_PCIE_LM_ID_SUBSYS_MASK)
3434

35-
/* Root Port Requestor ID Register */
35+
/* Root Port Requester ID Register */
3636
#define CDNS_PCIE_LM_RP_RID (CDNS_PCIE_LM_BASE + 0x0228)
3737
#define CDNS_PCIE_LM_RP_RID_MASK GENMASK(15, 0)
3838
#define CDNS_PCIE_LM_RP_RID_SHIFT 0

drivers/pci/controller/dwc/pci-dra7xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <linux/irqdomain.h>
1717
#include <linux/kernel.h>
1818
#include <linux/module.h>
19-
#include <linux/of_device.h>
19+
#include <linux/of.h>
2020
#include <linux/of_gpio.h>
2121
#include <linux/of_pci.h>
2222
#include <linux/pci.h>

drivers/pci/controller/dwc/pci-exynos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
#include <linux/interrupt.h>
1515
#include <linux/kernel.h>
1616
#include <linux/init.h>
17-
#include <linux/of_device.h>
1817
#include <linux/pci.h>
1918
#include <linux/platform_device.h>
2019
#include <linux/phy/phy.h>
2120
#include <linux/regulator/consumer.h>
21+
#include <linux/mod_devicetable.h>
2222
#include <linux/module.h>
2323

2424
#include "pcie-designware.h"

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
1818
#include <linux/mfd/syscon/imx7-iomuxc-gpr.h>
1919
#include <linux/module.h>
20+
#include <linux/of.h>
2021
#include <linux/of_gpio.h>
21-
#include <linux/of_device.h>
2222
#include <linux/of_address.h>
2323
#include <linux/pci.h>
2424
#include <linux/platform_device.h>

0 commit comments

Comments
 (0)