Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
7715a1e
Documentation
arch
alpha
arm
avr32
blackfin
cris
frv
h8300
ia64
m32r
m68k
m68knommu
microblaze
mips
mn10300
parisc
powerpc
s390
sh
sparc
um
x86
boot
configs
crypto
ia32
include/asm
uv
visws
xen
Kbuild
a.out-core.h
a.out.h
acpi.h
aes.h
agp.h
alternative-asm.h
alternative.h
amd_iommu.h
amd_iommu_types.h
apic.h
apicdef.h
apicnum.h
apm.h
asm.h
atomic.h
atomic_32.h
atomic_64.h
auxvec.h
bios_ebda.h
bitops.h
bitsperlong.h
boot.h
bootparam.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
calgary.h
calling.h
checksum.h
checksum_32.h
checksum_64.h
cmpxchg.h
cmpxchg_32.h
cmpxchg_64.h
compat.h
cpu.h
cpu_debug.h
cpufeature.h
cpumask.h
cputime.h
current.h
debugreg.h
delay.h
desc.h
desc_defs.h
device.h
div64.h
dma-mapping.h
dma.h
dmi.h
do_timer.h
ds.h
dwarf2.h
e820.h
edac.h
efi.h
elf.h
emergency-restart.h
entry_arch.h
errno.h
fb.h
fcntl.h
fixmap.h
floppy.h
frame.h
ftrace.h
futex.h
gart.h
genapic.h
geode.h
gpio.h
hardirq.h
highmem.h
hpet.h
hugetlb.h
hw_irq.h
hypertransport.h
hypervisor.h
i387.h
i8253.h
i8259.h
ia32.h
ia32_unistd.h
idle.h
init.h
io.h
io_32.h
io_64.h
io_apic.h
ioctl.h
ioctls.h
iomap.h
iommu.h
ipcbuf.h
ipi.h
irq.h
irq_regs.h
irq_remapping.h
irq_vectors.h
irqflags.h
ist.h
k8.h
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kmemcheck.h
kprobes.h
kvm.h
kvm_emulate.h
kvm_host.h
kvm_para.h
ldt.h
lguest.h
lguest_hcall.h
linkage.h
local.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mca.h
mca_dma.h
mce.h
microcode.h
mman.h
mmconfig.h
mmu.h
mmu_context.h
mmx.h
mmzone.h
mmzone_32.h
mmzone_64.h
module.h
mpspec.h
mpspec_def.h
msgbuf.h
msidef.h
msr-index.h
msr.h
mtrr.h
mutex.h
mutex_32.h
mutex_64.h
nmi.h
nops.h
numa.h
numa_32.h
numa_64.h
numaq.h
olpc.h
page.h
page_32.h
page_32_types.h
page_64.h
page_64_types.h
page_types.h
param.h
paravirt.h
paravirt_types.h
parport.h
pat.h
pci-direct.h
pci-functions.h
pci.h
pci_64.h
pci_x86.h
percpu.h
perf_counter.h
pgalloc.h
pgtable-2level.h
pgtable-2level_types.h
pgtable-3level.h
pgtable-3level_types.h
pgtable.h
pgtable_32.h
pgtable_32_types.h
pgtable_64.h
pgtable_64_types.h
pgtable_types.h
poll.h
posix_types.h
posix_types_32.h
posix_types_64.h
prctl.h
processor-cyrix.h
processor-flags.h
processor.h
proto.h
ptrace-abi.h
ptrace.h
pvclock-abi.h
pvclock.h
rdc321x_defs.h
reboot.h
reboot_fixups.h
required-features.h
resource.h
resume-trace.h
rio.h
rtc.h
rwlock.h
rwsem.h
scatterlist.h
seccomp.h
seccomp_32.h
seccomp_64.h
sections.h
segment.h
sembuf.h
serial.h
setup.h
setup_arch.h
shmbuf.h
shmparam.h
sigcontext.h
sigcontext32.h
sigframe.h
siginfo.h
signal.h
smp.h
smpboot_hooks.h
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
srat.h
stackprotector.h
stacktrace.h
stat.h
statfs.h
string.h
string_32.h
string_64.h
suspend.h
suspend_32.h
suspend_64.h
svm.h
swab.h
swiotlb.h
sync_bitops.h
sys_ia32.h
syscall.h
syscalls.h
system.h
system_64.h
tce.h
termbits.h
termios.h
thread_info.h
time.h
timer.h
timex.h
tlb.h
tlbflush.h
topology.h
trampoline.h
traps.h
tsc.h
types.h
uaccess.h
uaccess_32.h
uaccess_64.h
ucontext.h
unaligned.h
unistd.h
unistd_32.h
unistd_64.h
user.h
user32.h
user_32.h
user_64.h
vdso.h
vga.h
vgtod.h
virtext.h
vm86.h
vmi.h
vmi_time.h
vmware.h
vmx.h
vsyscall.h
xcr.h
xor.h
xor_32.h
xor_64.h
xsave.h
kernel
kvm
lguest
lib
math-emu
mm
oprofile
pci
power
vdso
video
xen
Kbuild
Kconfig
Kconfig.cpu
Kconfig.debug
Makefile
Makefile_32.cpu
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
x86
/
include
/
asm
/
pci.h
Blame
Blame
Latest commit
History
History
154 lines (119 loc) · 4.03 KB
Breadcrumbs
linux
/
arch
/
x86
/
include
/
asm
/
pci.h
Top
File metadata and controls
Code
Blame
154 lines (119 loc) · 4.03 KB
Raw
#ifndef _ASM_X86_PCI_H #define _ASM_X86_PCI_H #include <linux/mm.h> /* for struct page */ #include <linux/types.h> #include <linux/slab.h> #include <linux/string.h> #include <asm/scatterlist.h> #include <asm/io.h> #ifdef __KERNEL__ struct pci_sysdata { int domain; /* PCI domain */ int node; /* NUMA node */ #ifdef CONFIG_X86_64 void *iommu; /* IOMMU private data */ #endif }; extern int pci_routeirq; extern int noioapicquirk; extern int noioapicreroute; /* scan a bus after allocating a pci_sysdata for it */ extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node); extern struct pci_bus *pci_scan_bus_with_sysdata(int busno); static inline int pci_domain_nr(struct pci_bus *bus) { struct pci_sysdata *sd = bus->sysdata; return sd->domain; } static inline int pci_proc_domain(struct pci_bus *bus) { return pci_domain_nr(bus); } /* Can be used to override the logic in pci_scan_bus for skipping already-configured bus numbers - to be used for buggy BIOSes or architectures with incomplete PCI setup by the loader */ #ifdef CONFIG_PCI extern unsigned int pcibios_assign_all_busses(void); #else #define pcibios_assign_all_busses() 0 #endif extern unsigned long pci_mem_start; #define PCIBIOS_MIN_IO 0x1000 #define PCIBIOS_MIN_MEM (pci_mem_start) #define PCIBIOS_MIN_CARDBUS_IO 0x4000 void pcibios_config_init(void); struct pci_bus *pcibios_scan_root(int bus); void pcibios_set_master(struct pci_dev *dev); void pcibios_penalize_isa_irq(int irq, int active); struct irq_routing_table *pcibios_get_irq_routing_table(void); int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq); #define HAVE_PCI_MMAP extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, enum pci_mmap_state mmap_state, int write_combine); #ifdef CONFIG_PCI extern void early_quirks(void); static inline void pci_dma_burst_advice(struct pci_dev *pdev, enum pci_dma_burst_strategy *strat, unsigned long *strategy_parameter) { *strat = PCI_DMA_BURST_INFINITY; *strategy_parameter = ~0UL; } #else static inline void early_quirks(void) { } #endif extern void pci_iommu_alloc(void); /* MSI arch hook */ #define arch_setup_msi_irqs arch_setup_msi_irqs #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) #if defined(CONFIG_X86_64) || defined(CONFIG_DMAR) || defined(CONFIG_DMA_API_DEBUG) #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ dma_addr_t ADDR_NAME; #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ __u32 LEN_NAME; #define pci_unmap_addr(PTR, ADDR_NAME) \ ((PTR)->ADDR_NAME) #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \ (((PTR)->ADDR_NAME) = (VAL)) #define pci_unmap_len(PTR, LEN_NAME) \ ((PTR)->LEN_NAME) #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ (((PTR)->LEN_NAME) = (VAL)) #else #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME[0]; #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) unsigned LEN_NAME[0]; #define pci_unmap_addr(PTR, ADDR_NAME) sizeof((PTR)->ADDR_NAME) #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \ do { break; } while (pci_unmap_addr(PTR, ADDR_NAME)) #define pci_unmap_len(PTR, LEN_NAME) sizeof((PTR)->LEN_NAME) #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ do { break; } while (pci_unmap_len(PTR, LEN_NAME)) #endif #endif /* __KERNEL__ */ #ifdef CONFIG_X86_64 #include "pci_64.h" #endif /* implement the pci_ DMA API in terms of the generic device dma_ one */ #include <asm-generic/pci-dma-compat.h> /* generic pci stuff */ #include <asm-generic/pci.h> #define PCIBIOS_MAX_MEM_32 0xffffffff #ifdef CONFIG_NUMA /* Returns the node based on pci bus */ static inline int __pcibus_to_node(const struct pci_bus *bus) { const struct pci_sysdata *sd = bus->sysdata; return sd->node; } static inline const struct cpumask * cpumask_of_pcibus(const struct pci_bus *bus) { int node; node = __pcibus_to_node(bus); return (node == -1) ? cpu_online_mask : cpumask_of_node(node); } #endif #endif /* _ASM_X86_PCI_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
You can’t perform that action at this time.