include: remove unused macros from include/arch/*/arch.h
All architecture defines OCTET_TO_SIZEOFUNIT and SIZEOFUNIT_TO_OCTET as identity functions. But the only user is tests/benchmarks/app_kernel. It's effectively a no-op. Remove them. Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
This commit is contained in:
parent
cf9bfb20f1
commit
064608b429
11 changed files with 4 additions and 33 deletions
|
@ -20,11 +20,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* APIs need to support non-byte addressable architectures */
|
|
||||||
|
|
||||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
|
||||||
#define SIZEOFUNIT_TO_OCTET(X) (X)
|
|
||||||
|
|
||||||
#include <generated_dts_board.h>
|
#include <generated_dts_board.h>
|
||||||
#include <sw_isr_table.h>
|
#include <sw_isr_table.h>
|
||||||
#ifdef CONFIG_CPU_ARCV2
|
#ifdef CONFIG_CPU_ARCV2
|
||||||
|
|
|
@ -26,11 +26,6 @@ extern "C" {
|
||||||
/* ARM GPRs are often designated by two different names */
|
/* ARM GPRs are often designated by two different names */
|
||||||
#define sys_define_gpr_with_alias(name1, name2) union { u32_t name1, name2; }
|
#define sys_define_gpr_with_alias(name1, name2) union { u32_t name1, name2; }
|
||||||
|
|
||||||
/* APIs need to support non-byte addressable architectures */
|
|
||||||
|
|
||||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
|
||||||
#define SIZEOFUNIT_TO_OCTET(X) (X)
|
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_CORTEX_M
|
#ifdef CONFIG_CPU_CORTEX_M
|
||||||
#include <arch/arm/cortex_m/exc.h>
|
#include <arch/arm/cortex_m/exc.h>
|
||||||
#include <arch/arm/cortex_m/irq.h>
|
#include <arch/arm/cortex_m/irq.h>
|
||||||
|
|
|
@ -32,11 +32,6 @@ extern "C" {
|
||||||
#define _NANO_ERR_KERNEL_OOPS (5) /* Kernel oops (fatal to thread) */
|
#define _NANO_ERR_KERNEL_OOPS (5) /* Kernel oops (fatal to thread) */
|
||||||
#define _NANO_ERR_KERNEL_PANIC (6) /* Kernel panic (fatal to system) */
|
#define _NANO_ERR_KERNEL_PANIC (6) /* Kernel panic (fatal to system) */
|
||||||
|
|
||||||
/* APIs need to support non-byte addressable architectures */
|
|
||||||
|
|
||||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
|
||||||
#define SIZEOFUNIT_TO_OCTET(X) (X)
|
|
||||||
|
|
||||||
#ifndef _ASMLANGUAGE
|
#ifndef _ASMLANGUAGE
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
#include <irq.h>
|
#include <irq.h>
|
||||||
|
|
|
@ -29,8 +29,6 @@ extern "C" {
|
||||||
|
|
||||||
#define STACK_ALIGN 4
|
#define STACK_ALIGN 4
|
||||||
#define STACK_ALIGN_SIZE 4
|
#define STACK_ALIGN_SIZE 4
|
||||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
|
||||||
#define SIZEOFUNIT_TO_OCTET(X) (X)
|
|
||||||
|
|
||||||
#define _NANO_ERR_CPU_EXCEPTION (0) /* Any unhandled exception */
|
#define _NANO_ERR_CPU_EXCEPTION (0) /* Any unhandled exception */
|
||||||
#define _NANO_ERR_INVALID_TASK_EXIT (1) /* Invalid task exit */
|
#define _NANO_ERR_INVALID_TASK_EXIT (1) /* Invalid task exit */
|
||||||
|
|
|
@ -36,11 +36,6 @@ extern "C" {
|
||||||
#define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN)
|
#define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN)
|
||||||
#define STACK_ROUND_DOWN(x) ROUND_DOWN(x, STACK_ALIGN)
|
#define STACK_ROUND_DOWN(x) ROUND_DOWN(x, STACK_ALIGN)
|
||||||
|
|
||||||
/* APIs need to support non-byte addressable architectures */
|
|
||||||
|
|
||||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
|
||||||
#define SIZEOFUNIT_TO_OCTET(X) (X)
|
|
||||||
|
|
||||||
/* macros convert value of it's argument to a string */
|
/* macros convert value of it's argument to a string */
|
||||||
#define DO_TOSTR(s) #s
|
#define DO_TOSTR(s) #s
|
||||||
#define TOSTR(s) DO_TOSTR(s)
|
#define TOSTR(s) DO_TOSTR(s)
|
||||||
|
|
|
@ -30,11 +30,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* APIs need to support non-byte addressable architectures */
|
|
||||||
|
|
||||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
|
||||||
#define SIZEOFUNIT_TO_OCTET(X) (X)
|
|
||||||
|
|
||||||
/* GDT layout */
|
/* GDT layout */
|
||||||
#define CODE_SEG 0x08
|
#define CODE_SEG 0x08
|
||||||
#define DATA_SEG 0x10
|
#define DATA_SEG 0x10
|
||||||
|
|
|
@ -28,8 +28,6 @@ extern "C" {
|
||||||
#include <xtensa/config/core.h>
|
#include <xtensa/config/core.h>
|
||||||
|
|
||||||
#define STACK_ALIGN 16
|
#define STACK_ALIGN 16
|
||||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
|
||||||
#define SIZEOFUNIT_TO_OCTET(X) (X)
|
|
||||||
|
|
||||||
#define _NANO_ERR_HW_EXCEPTION (0) /* MPU/Bus/Usage fault */
|
#define _NANO_ERR_HW_EXCEPTION (0) /* MPU/Bus/Usage fault */
|
||||||
#define _NANO_ERR_STACK_CHK_FAIL (2) /* Stack corruption detected */
|
#define _NANO_ERR_STACK_CHK_FAIL (2) /* Stack corruption detected */
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "master.h"
|
#include "master.h"
|
||||||
|
|
||||||
char msg[MAX_MSG];
|
char msg[MAX_MSG];
|
||||||
char data_bench[OCTET_TO_SIZEOFUNIT(MESSAGE_SIZE)];
|
char data_bench[MESSAGE_SIZE];
|
||||||
|
|
||||||
#ifdef PIPE_BENCH
|
#ifdef PIPE_BENCH
|
||||||
struct k_pipe *test_pipes[] = {&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF};
|
struct k_pipe *test_pipes[] = {&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF};
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
#define SEMA_WAIT_TIME (5000)
|
#define SEMA_WAIT_TIME (5000)
|
||||||
/* global data */
|
/* global data */
|
||||||
extern char msg[MAX_MSG];
|
extern char msg[MAX_MSG];
|
||||||
extern char data_bench[OCTET_TO_SIZEOFUNIT(MESSAGE_SIZE)];
|
extern char data_bench[MESSAGE_SIZE];
|
||||||
extern struct k_pipe *test_pipes[];
|
extern struct k_pipe *test_pipes[];
|
||||||
extern FILE *output_file;
|
extern FILE *output_file;
|
||||||
extern const char newline[];
|
extern const char newline[];
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "receiver.h"
|
#include "receiver.h"
|
||||||
|
|
||||||
char data_recv[OCTET_TO_SIZEOFUNIT(MESSAGE_SIZE)] = { 0 };
|
char data_recv[MESSAGE_SIZE] = { 0 };
|
||||||
|
|
||||||
void dequtask(void);
|
void dequtask(void);
|
||||||
void waittask(void);
|
void waittask(void);
|
||||||
|
|
|
@ -22,6 +22,6 @@ struct getinfo{
|
||||||
};
|
};
|
||||||
|
|
||||||
/* global data */
|
/* global data */
|
||||||
extern char data_recv[OCTET_TO_SIZEOFUNIT(MESSAGE_SIZE)];
|
extern char data_recv[MESSAGE_SIZE];
|
||||||
|
|
||||||
#endif /* _RECEIVER_H */
|
#endif /* _RECEIVER_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue