Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

iomap_virt.h 747B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _IPXE_IOMAP_VIRT_H
  2. #define _IPXE_IOMAP_VIRT_H
  3. /** @file
  4. *
  5. * iPXE I/O mapping API using phys_to_virt()
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #ifdef IOMAP_VIRT
  10. #define IOMAP_PREFIX_virt
  11. #else
  12. #define IOMAP_PREFIX_virt __virt_
  13. #endif
  14. static inline __always_inline void *
  15. IOMAP_INLINE ( virt, ioremap ) ( unsigned long bus_addr, size_t len __unused ) {
  16. return ( bus_addr ? phys_to_virt ( bus_addr ) : NULL );
  17. }
  18. static inline __always_inline void
  19. IOMAP_INLINE ( virt, iounmap ) ( volatile const void *io_addr __unused ) {
  20. /* Nothing to do */
  21. }
  22. static inline __always_inline unsigned long
  23. IOMAP_INLINE ( virt, io_to_bus ) ( volatile const void *io_addr ) {
  24. return virt_to_phys ( io_addr );
  25. }
  26. #endif /* _IPXE_IOMAP_VIRT_H */