Skip to content

Commit 8248771

Browse files
Jaswinder Singh RajputIngo Molnar
authored andcommitted
x86, pci: move arch/x86/pci/pci.h to arch/x86/include/asm/pci_x86.h
Impact: cleanup Now that arch/x86/pci/pci.h is used in a number of other places as well, move the lowlevel x86 pci definitions into the architecture include files. (not to be confused with the existing arch/x86/include/asm/pci.h file, which provides public details about x86 PCI) Tested on: X86_32_UP, X86_32_SMP and X86_64_SMP Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent c854c91 commit 8248771

23 files changed

Lines changed: 33 additions & 39 deletions
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ extern struct pci_ops pci_root_ops;
5757
struct irq_info {
5858
u8 bus, devfn; /* Bus, device and function */
5959
struct {
60-
u8 link; /* IRQ line ID, chipset dependent, 0=not routed */
60+
u8 link; /* IRQ line ID, chipset dependent,
61+
0 = not routed */
6162
u16 bitmap; /* Available IRQs */
6263
} __attribute__((packed)) irq[4];
6364
u8 slot; /* Slot number, 0=onboard */
@@ -69,11 +70,13 @@ struct irq_routing_table {
6970
u16 version; /* PIRQ_VERSION */
7071
u16 size; /* Table size in bytes */
7172
u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
72-
u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
73-
u16 rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */
73+
u16 exclusive_irqs; /* IRQs devoted exclusively to
74+
PCI usage */
75+
u16 rtr_vendor, rtr_device; /* Vendor and device ID of
76+
interrupt router */
7477
u32 miniport_data; /* Crap */
7578
u8 rfu[11];
76-
u8 checksum; /* Modulo 256 checksum must give zero */
79+
u8 checksum; /* Modulo 256 checksum must give 0 */
7780
struct irq_info slots[0];
7881
} __attribute__((packed));
7982

@@ -148,15 +151,15 @@ static inline unsigned int mmio_config_readl(void __iomem *pos)
148151

149152
static inline void mmio_config_writeb(void __iomem *pos, u8 val)
150153
{
151-
asm volatile("movb %%al,(%1)" :: "a" (val), "r" (pos) : "memory");
154+
asm volatile("movb %%al,(%1)" : : "a" (val), "r" (pos) : "memory");
152155
}
153156

154157
static inline void mmio_config_writew(void __iomem *pos, u16 val)
155158
{
156-
asm volatile("movw %%ax,(%1)" :: "a" (val), "r" (pos) : "memory");
159+
asm volatile("movw %%ax,(%1)" : : "a" (val), "r" (pos) : "memory");
157160
}
158161

159162
static inline void mmio_config_writel(void __iomem *pos, u32 val)
160163
{
161-
asm volatile("movl %%eax,(%1)" :: "a" (val), "r" (pos) : "memory");
164+
asm volatile("movl %%eax,(%1)" : : "a" (val), "r" (pos) : "memory");
162165
}

‎arch/x86/kernel/mmconf-fam10h_64.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
#include <asm/msr.h>
1414
#include <asm/acpi.h>
1515
#include <asm/mmconfig.h>
16-
17-
#include "../pci/pci.h"
16+
#include <asm/pci_x86.h>
1817

1918
struct pci_hostbridge_probe {
2019
u32 bus;

‎arch/x86/kernel/reboot.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <asm/proto.h>
1313
#include <asm/reboot_fixups.h>
1414
#include <asm/reboot.h>
15+
#include <asm/pci_x86.h>
1516

1617
#ifdef CONFIG_X86_32
1718
# include <linux/dmi.h>
@@ -22,8 +23,6 @@
2223
#endif
2324

2425
#include <mach_ipi.h>
25-
#include "../pci/pci.h"
26-
2726

2827
/*
2928
* Power off function, if any

‎arch/x86/pci/acpi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <linux/irq.h>
55
#include <linux/dmi.h>
66
#include <asm/numa.h>
7-
#include "pci.h"
7+
#include <asm/pci_x86.h>
88

99
struct pci_root_info {
1010
char *name;

‎arch/x86/pci/amd_bus.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <linux/pci.h>
33
#include <linux/topology.h>
44
#include <linux/cpu.h>
5-
#include "pci.h"
5+
#include <asm/pci_x86.h>
66

77
#ifdef CONFIG_X86_64
88
#include <asm/pci-direct.h>

‎arch/x86/pci/common.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
#include <asm/segment.h>
1515
#include <asm/io.h>
1616
#include <asm/smp.h>
17-
18-
#include "pci.h"
17+
#include <asm/pci_x86.h>
1918

2019
unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
2120
PCI_PROBE_MMCONF;

‎arch/x86/pci/direct.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <linux/pci.h>
66
#include <linux/init.h>
77
#include <linux/dmi.h>
8-
#include "pci.h"
8+
#include <asm/pci_x86.h>
99

1010
/*
1111
* Functions for accessing PCI base (first 256 bytes) and extended

‎arch/x86/pci/early.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <linux/pci.h>
33
#include <asm/pci-direct.h>
44
#include <asm/io.h>
5-
#include "pci.h"
5+
#include <asm/pci_x86.h>
66

77
/* Direct PCI access. This is used for PCI accesses in early boot before
88
the PCI subsystem works. */

‎arch/x86/pci/fixup.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
#include <linux/dmi.h>
77
#include <linux/pci.h>
88
#include <linux/init.h>
9-
#include "pci.h"
10-
9+
#include <asm/pci_x86.h>
1110

1211
static void __devinit pci_fixup_i450nx(struct pci_dev *d)
1312
{

‎arch/x86/pci/i386.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
#include <asm/pat.h>
3636
#include <asm/e820.h>
37+
#include <asm/pci_x86.h>
3738

38-
#include "pci.h"
3939

4040
static int
4141
skip_isa_ioresource_align(struct pci_dev *dev) {

0 commit comments

Comments
 (0)