Relocate macros for supporting non-byte addressible architectures

Moves these macros to the main public API include file for each
supported architecture, since the <arch>type.h include file is
to be eliminated.

Change-Id: Ia87b9c0bed1501bcce7f363bd4155f7ef642376a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-06-01 13:39:43 -04:00 committed by Anas Nashif
commit 03a2abe737
6 changed files with 15 additions and 13 deletions

View file

@ -49,6 +49,11 @@ extern "C" {
#include <cputype.h>
#endif
/* APIs need to support non-byte addressible architectures */
#define OCTET_TO_SIZEOFUNIT(X) (X)
#define SIZEOFUNIT_TO_OCTET(X) (X)
#ifdef CONFIG_CPU_ARCV2
#include <arch/arc/v2/init.h>
#include <arch/arc/v2/exc.h>

View file

@ -50,11 +50,6 @@ extern "C" {
#include <misc/util.h>
#include <drivers/system_timer.h> /* timer_driver() needed by kernel_main.c */
/* sizes */
#define OCTET_TO_SIZEOFUNIT(X) (X)
#define SIZEOFUNIT_TO_OCTET(X) (X)
#ifdef __cplusplus
}
#endif

View file

@ -50,11 +50,6 @@ extern "C" {
#include <misc/util.h>
#include <drivers/system_timer.h> /* timer_driver() needed by kernel_main.c */
/* sizes */
#define OCTET_TO_SIZEOFUNIT(X) (X)
#define SIZEOFUNIT_TO_OCTET(X) (X)
#ifdef __cplusplus
}
#endif

View file

@ -49,6 +49,11 @@ extern "C" {
#include <cputype.h>
#endif
/* APIs need to support non-byte addressible architectures */
#define OCTET_TO_SIZEOFUNIT(X) (X)
#define SIZEOFUNIT_TO_OCTET(X) (X)
#ifdef CONFIG_CPU_CORTEXM
#include <arch/arm/CortexM/init.h>
#include <arch/arm/CortexM/exc.h>

View file

@ -46,9 +46,6 @@ extern "C"
{
#endif
#define OCTET_TO_SIZEOFUNIT(X) (X) /* byte addressing */
#define SIZEOFUNIT_TO_OCTET(X) (X)
#include <stdint.h>
#include <toolchain.h>
#include <misc/util.h>

View file

@ -45,6 +45,11 @@ by the generic nanokernel interface header (nanokernel.h)
#include <arch/x86/Intelprc.h>
#endif
/* APIs need to support non-byte addressible architectures */
#define OCTET_TO_SIZEOFUNIT(X) (X)
#define SIZEOFUNIT_TO_OCTET(X) (X)
/*
* Macro used internally by NANO_CPU_INT_REGISTER and NANO_CPU_INT_REGISTER_ASM.
* Not meant to be used explicitly by BSP, driver or application code.