1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
2 * Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
13 #include <rte_common.h>
14 #include <rte_debug.h>
15 #include <rte_cycles.h>
17 #include <rte_byteorder.h>
19 #include <rte_memory.h>
21 #include "ionic_logs.h"
23 #define BIT(nr) (1UL << (nr))
24 #define BIT_ULL(nr) (1ULL << (nr))
28 #define PAGE_SIZE (1 << PAGE_SHIFT)
38 typedef uint16_t __le16;
39 typedef uint32_t __le32;
40 typedef uint64_t __le64;
42 #define ioread8(reg) rte_read8(reg)
43 #define ioread32(reg) rte_read32(rte_le_to_cpu_32(reg))
44 #define iowrite8(value, reg) rte_write8(value, reg)
45 #define iowrite32(value, reg) rte_write32(rte_cpu_to_le_32(value), reg)