pci_32.h 931 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef ASM_X86__PCI_32_H
  2. #define ASM_X86__PCI_32_H
  3. #ifdef __KERNEL__
  4. /* Dynamic DMA mapping stuff.
  5. * i386 has everything mapped statically.
  6. */
  7. struct pci_dev;
  8. /* The PCI address space does equal the physical memory
  9. * address space. The networking and block device layers use
  10. * this boolean for bounce buffer decisions.
  11. */
  12. #define PCI_DMA_BUS_IS_PHYS (1)
  13. /* pci_unmap_{page,single} is a nop so... */
  14. #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME[0];
  15. #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) unsigned LEN_NAME[0];
  16. #define pci_unmap_addr(PTR, ADDR_NAME) sizeof((PTR)->ADDR_NAME)
  17. #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
  18. do { break; } while (pci_unmap_addr(PTR, ADDR_NAME))
  19. #define pci_unmap_len(PTR, LEN_NAME) sizeof((PTR)->LEN_NAME)
  20. #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
  21. do { break; } while (pci_unmap_len(PTR, LEN_NAME))
  22. #endif /* __KERNEL__ */
  23. #endif /* ASM_X86__PCI_32_H */