summaryrefslogtreecommitdiffstats
path: root/src/spdk/dpdk/drivers/common/octeontx2/otx2_io_generic.h
blob: b1d754008909a7aba3cf73b13eebf1e5a0e8d0ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(C) 2019 Marvell International Ltd.
 */

#ifndef _OTX2_IO_GENERIC_H_
#define _OTX2_IO_GENERIC_H_

#define otx2_load_pair(val0, val1, addr)			\
do {								\
	val0 = rte_read64_relaxed((void *)(addr));		\
	val1 = rte_read64_relaxed((uint8_t *)(addr) + 8);	\
} while (0)

#define otx2_store_pair(val0, val1, addr)			\
do {								\
	rte_write64_relaxed(val0, (void *)(addr));		\
	rte_write64_relaxed(val1, (((uint8_t *)(addr)) + 8));	\
} while (0)

#define otx2_prefetch_store_keep(ptr) do {} while (0)

static inline uint64_t
otx2_atomic64_add_nosync(int64_t incr, int64_t *ptr)
{
	RTE_SET_USED(ptr);
	RTE_SET_USED(incr);

	return 0;
}

static inline uint64_t
otx2_atomic64_add_sync(int64_t incr, int64_t *ptr)
{
	RTE_SET_USED(ptr);
	RTE_SET_USED(incr);

	return 0;
}

static inline int64_t
otx2_lmt_submit(uint64_t io_address)
{
	RTE_SET_USED(io_address);

	return 0;
}

static __rte_always_inline void
otx2_lmt_mov(void *out, const void *in, const uint32_t lmtext)
{
	RTE_SET_USED(out);
	RTE_SET_USED(in);
	RTE_SET_USED(lmtext);
}

static __rte_always_inline void
otx2_lmt_mov_seg(void *out, const void *in, const uint16_t segdw)
{
	RTE_SET_USED(out);
	RTE_SET_USED(in);
	RTE_SET_USED(segdw);
}
#endif /* _OTX2_IO_GENERIC_H_ */