diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-03-04 09:20:43 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-03-04 09:25:21 +0100 |
commit | e1fc23f057822b54ae7dceedcca025febdf4dcc2 (patch) | |
tree | 90ef6e1807a121b5e95846e713e11c405762f0a0 /bsps | |
parent | bsp/altera-cyclone-v: Adjust Doxygen file groups (diff) | |
download | rtems-e1fc23f057822b54ae7dceedcca025febdf4dcc2.tar.bz2 |
bsps/powerpc: Fix PAGE_ALIGN() macros
Previous warning fixes which include <sys/param.h> broke this macro.
The definition of PAGE_MASK changed.
Diffstat (limited to 'bsps')
-rw-r--r-- | bsps/powerpc/motorola_powerpc/bootloader/misc.c | 2 | ||||
-rw-r--r-- | bsps/powerpc/motorola_powerpc/bootloader/mm.c | 2 | ||||
-rw-r--r-- | bsps/powerpc/shared/start/pgtbl_setup.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/bsps/powerpc/motorola_powerpc/bootloader/misc.c b/bsps/powerpc/motorola_powerpc/bootloader/misc.c index 40bd8a71fd..0b8e42c83a 100644 --- a/bsps/powerpc/motorola_powerpc/bootloader/misc.c +++ b/bsps/powerpc/motorola_powerpc/bootloader/misc.c @@ -25,7 +25,7 @@ #include <bsp.h> /* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) +#define PAGE_ALIGN(addr) (((addr) + PAGE_MASK) & ~PAGE_MASK) SPR_RO(PPC_PVR) diff --git a/bsps/powerpc/motorola_powerpc/bootloader/mm.c b/bsps/powerpc/motorola_powerpc/bootloader/mm.c index 13479cb106..1b3df41d49 100644 --- a/bsps/powerpc/motorola_powerpc/bootloader/mm.c +++ b/bsps/powerpc/motorola_powerpc/bootloader/mm.c @@ -45,7 +45,7 @@ #include <limits.h> /* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) +#define PAGE_ALIGN(addr) (((addr) + PAGE_MASK) & ~PAGE_MASK) extern void (tlb_handlers)(void); extern void (_handler_glue)(void); diff --git a/bsps/powerpc/shared/start/pgtbl_setup.c b/bsps/powerpc/shared/start/pgtbl_setup.c index f2543f5ff3..a52e73b380 100644 --- a/bsps/powerpc/shared/start/pgtbl_setup.c +++ b/bsps/powerpc/shared/start/pgtbl_setup.c @@ -16,7 +16,7 @@ * *pmemsize by the size of the page table. */ /* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) +#define PAGE_ALIGN(addr) (((addr) + PAGE_MASK) & ~PAGE_MASK) /* |