-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): add rte header files to support building on aarch64 (#35)
Related to: openebs/openebs#1295 openebs-archive/maya#1493 Signed-off-by: wangzihao <[email protected]>
- Loading branch information
1 parent
4debd69
commit a534beb
Showing
15 changed files
with
168 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HEADER_H = \ | ||
$(top_srcdir)/include/arch/arm/rte_atomic.h \ | ||
$(top_srcdir)/include/arch/arm/rte_atomic_64.h \ | ||
$(top_srcdir)/include/arch/arm/rte_pause.h \ | ||
$(top_srcdir)/include/arch/arm/rte_pause_64.h | ||
|
||
libcstordir = $(includedir)/libcstor/arch/arm | ||
libcstor_HEADERS = $(HEADER_H) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause | ||
* Copyright(c) 2015 RehiveTech. All rights reserved. | ||
*/ | ||
|
||
#ifndef _RTE_ATOMIC_ARM_H_ | ||
#define _RTE_ATOMIC_ARM_H_ | ||
|
||
#include <arch/arm/rte_atomic_64.h> | ||
|
||
#endif /* _RTE_ATOMIC_ARM_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause | ||
* Copyright(c) 2015 Cavium, Inc | ||
* Copyright(c) 2019 Arm Limited | ||
*/ | ||
|
||
#ifndef _RTE_ATOMIC_ARM64_H_ | ||
#define _RTE_ATOMIC_ARM64_H_ | ||
|
||
/* | ||
* Platform must be built with CONFIG_RTE_FORCE_INTRINSICS | ||
*/ | ||
#ifndef RTE_FORCE_INTRINSICS | ||
#define RTE_FORCE_INTRINSICS | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include "generic/rte_atomic.h" | ||
|
||
#define dsb(opt) asm volatile("dsb " #opt : : : "memory") | ||
#define dmb(opt) asm volatile("dmb " #opt : : : "memory") | ||
|
||
#define rte_mb() dsb(sy) | ||
|
||
#define rte_wmb() dsb(st) | ||
|
||
#define rte_rmb() dsb(ld) | ||
|
||
#define rte_smp_mb() dmb(ish) | ||
|
||
#define rte_smp_wmb() dmb(ishst) | ||
|
||
#define rte_smp_rmb() dmb(ishld) | ||
|
||
#define rte_io_mb() rte_mb() | ||
|
||
#define rte_io_wmb() rte_wmb() | ||
|
||
#define rte_io_rmb() rte_rmb() | ||
|
||
#define rte_cio_wmb() dmb(oshst) | ||
|
||
#define rte_cio_rmb() dmb(oshld) | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* _RTE_ATOMIC_ARM64_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause | ||
* Copyright(c) 2017 Cavium, Inc | ||
*/ | ||
|
||
#ifndef _RTE_PAUSE_ARM_H_ | ||
#define _RTE_PAUSE_ARM_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <arch/arm/rte_pause_64.h> | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* _RTE_PAUSE_ARM_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause | ||
* Copyright(c) 2017 Cavium, Inc | ||
*/ | ||
|
||
#ifndef _RTE_PAUSE_ARM64_H_ | ||
#define _RTE_PAUSE_ARM64_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <rte_common.h> | ||
#include "generic/rte_pause.h" | ||
|
||
static inline void rte_pause(void) | ||
{ | ||
asm volatile("yield" ::: "memory"); | ||
} | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* _RTE_PAUSE_ARM64_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
HEADER_H = \ | ||
$(top_srcdir)/include/arch/x86/rte_atomic_64.h \ | ||
$(top_srcdir)/include/arch/x86/rte_atomic.h \ | ||
$(top_srcdir)/include/arch/x86/rte_pause.h | ||
|
||
libcstordir = $(includedir)/libcstor/arch/x86 | ||
libcstor_HEADERS = $(HEADER_H) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
HEADER_H = \ | ||
$(top_srcdir)/include/generic/rte_atomic.h \ | ||
$(top_srcdir)/include/generic/rte_pause.h | ||
|
||
libcstordir = $(includedir)/libcstor/generic | ||
libcstor_HEADERS = $(HEADER_H) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause | ||
* Copyright(c) 2017 Cavium, Inc | ||
*/ | ||
|
||
#ifndef _RTE_PAUSE_H_ | ||
#define _RTE_PAUSE_H_ | ||
|
||
/** | ||
* @file | ||
* | ||
* CPU pause operation. | ||
* | ||
*/ | ||
|
||
/** | ||
* Pause CPU execution for a short while | ||
* | ||
* This call is intended for tight loops which poll a shared resource or wait | ||
* for an event. A short pause within the loop may reduce the power consumption. | ||
*/ | ||
static inline void rte_pause(void); | ||
|
||
#endif /* _RTE_PAUSE_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters