net/ice/base: add more macros for FDID priority
[dpdk.git] / drivers / common / dpaax / dpaax_iova_table.h
index 1109a36..fc3b9e7 100644 (file)
@@ -45,6 +45,8 @@ extern struct dpaax_iova_table *dpaax_iova_table_p;
  * is SoC dependent, or even Uboot fixup dependent.
  */
 #define MEM_NODE_PATH_GLOB "/proc/device-tree/memory[@0-9]*/reg"
+/* For Virtual Machines memory node is at different path (below) */
+#define MEM_NODE_PATH_GLOB_VM "/proc/device-tree/memory/reg"
 /* Device file should be multiple of 16 bytes, each containing 8 byte of addr
  * and its length. Assuming max of 5 entries.
  */
@@ -64,7 +66,7 @@ void dpaax_iova_table_depopulate(void);
 int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
 void dpaax_iova_table_dump(void);
 
-static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __attribute__((hot));
+static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
 
 static inline void *
 dpaax_iova_table_get_va(phys_addr_t paddr) {
@@ -74,6 +76,9 @@ dpaax_iova_table_get_va(phys_addr_t paddr) {
        size_t offset = paddr & DPAAX_MEM_SPLIT_MASK_OFF;
        struct dpaax_iovat_element *entry;
 
+       if (unlikely(dpaax_iova_table_p == NULL))
+               return NULL;
+
        entry = dpaax_iova_table_p->entries;
 
        do {