xen-mapcache.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2011 Citrix Ltd.
  3. *
  4. * This work is licensed under the terms of the GNU GPL, version 2. See
  5. * the COPYING file in the top-level directory.
  6. *
  7. */
  8. #ifndef XEN_MAPCACHE_H
  9. #define XEN_MAPCACHE_H
  10. #include <stdlib.h>
  11. #ifdef CONFIG_XEN
  12. void xen_map_cache_init(void);
  13. uint8_t *xen_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size,
  14. uint8_t lock);
  15. ram_addr_t xen_ram_addr_from_mapcache(void *ptr);
  16. void xen_invalidate_map_cache_entry(uint8_t *buffer);
  17. void xen_invalidate_map_cache(void);
  18. #else
  19. static inline void xen_map_cache_init(void)
  20. {
  21. }
  22. static inline uint8_t *xen_map_cache(target_phys_addr_t phys_addr,
  23. target_phys_addr_t size,
  24. uint8_t lock)
  25. {
  26. abort();
  27. }
  28. static inline ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
  29. {
  30. abort();
  31. }
  32. static inline void xen_invalidate_map_cache_entry(uint8_t *buffer)
  33. {
  34. }
  35. static inline void xen_invalidate_map_cache(void)
  36. {
  37. }
  38. #endif
  39. #endif /* !XEN_MAPCACHE_H */