Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions arch/riscv/include/kernel_arch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#ifndef ZEPHYR_ARCH_RISCV_INCLUDE_KERNEL_ARCH_DATA_H_
#define ZEPHYR_ARCH_RISCV_INCLUDE_KERNEL_ARCH_DATA_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <toolchain.h>
#include <linker/sections.h>
#include <arch/cpu.h>
Expand All @@ -31,8 +27,16 @@ extern "C" {
#include <sys/dlist.h>
#include <kernel_internal.h>

#ifdef __cplusplus
extern "C" {
#endif

extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE);

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_RISCV_INCLUDE_KERNEL_ARCH_DATA_H_ */
15 changes: 8 additions & 7 deletions include/arch/riscv/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
#include <soc.h>
#include <generated_dts_board.h>

#ifdef __cplusplus
extern "C" {
#endif

/* stacks, for RISCV architecture stack should be 16byte-aligned */
#define STACK_ALIGN 16

Expand All @@ -46,6 +42,10 @@ extern "C" {
#ifndef _ASMLANGUAGE
#include <sys/util.h>

#ifdef __cplusplus
extern "C" {
#endif

#define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN)
#define STACK_ROUND_DOWN(x) ROUND_DOWN(x, STACK_ALIGN)

Expand Down Expand Up @@ -157,14 +157,15 @@ static ALWAYS_INLINE void arch_nop(void)
extern u32_t z_timer_cycle_get_32(void);
#define z_arch_k_cycle_get_32() z_timer_cycle_get_32()

#ifdef __cplusplus
}
#endif

#endif /*_ASMLANGUAGE */

#if defined(CONFIG_SOC_FAMILY_RISCV_PRIVILEGE)
#include <arch/riscv/riscv-privilege/asm_inline.h>
#endif

#ifdef __cplusplus
}
#endif

#endif
11 changes: 6 additions & 5 deletions include/arch/riscv/exp.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#ifndef ZEPHYR_INCLUDE_ARCH_RISCV_EXP_H_
#define ZEPHYR_INCLUDE_ARCH_RISCV_EXP_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _ASMLANGUAGE
#include <zephyr/types.h>
#include <toolchain.h>
Expand All @@ -27,6 +23,10 @@ extern "C" {
#include <soc_context.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

/*
* The name of the structure which contains soc-specific state, if
* any, as well as the soc_esf_t typedef below, are part of the RISC-V
Expand Down Expand Up @@ -75,10 +75,11 @@ typedef struct __esf z_arch_esf_t;
#ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE
typedef struct soc_esf soc_esf_t;
#endif
#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_INCLUDE_ARCH_RISCV_EXP_H_ */
9 changes: 0 additions & 9 deletions include/arch/riscv/riscv-privilege/asm_inline_gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
#ifndef ZEPHYR_INCLUDE_ARCH_RISCV_RISCV_PRIVILEGE_ASM_INLINE_GCC_H_
#define ZEPHYR_INCLUDE_ARCH_RISCV_RISCV_PRIVILEGE_ASM_INLINE_GCC_H_

#ifdef __cplusplus
extern "C" {
#endif

/*
* The file must not be included directly
* Include arch/cpu.h instead
Expand All @@ -21,11 +17,6 @@ extern "C" {

#include <toolchain.h>


#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_INCLUDE_ARCH_RISCV_RISCV_PRIVILEGE_ASM_INLINE_GCC_H_ */