27 #include <linux/types.h>
28 #include <linux/kernel.h>
29 #include <linux/export.h>
30 #include <linux/pci.h>
33 #include <linux/errno.h>
60 WARN_ON_SMP(!spin_is_locked(&pcibios_fwaddrmap_lock));
76 map = pcibios_fwaddrmap_lookup(dev);
78 spin_unlock_irqrestore(&pcibios_fwaddrmap_lock, flags);
85 INIT_LIST_HEAD(&map->
list);
91 spin_unlock_irqrestore(&pcibios_fwaddrmap_lock, flags);
101 map = pcibios_fwaddrmap_lookup(dev);
104 spin_unlock_irqrestore(&pcibios_fwaddrmap_lock, flags);
109 static void pcibios_fw_addr_list_del(
void)
120 spin_unlock_irqrestore(&pcibios_fwaddrmap_lock, flags);
124 skip_isa_ioresource_align(
struct pci_dev *dev) {
153 if (skip_isa_ioresource_align(dev))
156 start = (start + 0x3ff) & ~0x3ff;
205 if ((dev = bus->
self)) {
233 static void __init pcibios_allocate_resources(
int pass)
236 int idx, disabled,
i;
242 #ifdef CONFIG_PCI_IOV
243 { PCI_IOV_RESOURCES, PCI_IOV_RESOURCE_END },
250 for (idx = idx_range[i].
start; idx <= idx_range[
i].
end; idx++) {
260 if (pass == disabled) {
262 "BAR %d: reserving %pr (d=%d, p=%d)\n",
263 idx, r, disabled, pass);
266 pcibios_save_fw_addr(dev,
281 pci_read_config_dword(dev,
290 static int __init pcibios_assign_resources(
void)
313 pcibios_fw_addr_list_del();
320 DBG(
"PCI: Allocating resources\n");
322 pcibios_allocate_resources(0);
323 pcibios_allocate_resources(1);
340 static const struct vm_operations_struct pci_mmap_ops = {
341 .access = generic_access_phys,
362 if (!pat_enabled && write_combine)
365 if (pat_enabled && write_combine)
384 vma->
vm_ops = &pci_mmap_ops;