bsps/powerpc: Fix PAGE_ALIGN() macros

Previous warning fixes which include <sys/param.h> broke this macro.
The definition of PAGE_MASK changed.
This commit is contained in:
Sebastian Huber
2019-03-04 09:20:43 +01:00
parent 9d41fca725
commit e1fc23f057
3 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@
#include <bsp.h> #include <bsp.h>
/* to align the pointer to the (next) page boundary */ /* 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) SPR_RO(PPC_PVR)

View File

@@ -45,7 +45,7 @@
#include <limits.h> #include <limits.h>
/* to align the pointer to the (next) page boundary */ /* 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 (tlb_handlers)(void);
extern void (_handler_glue)(void); extern void (_handler_glue)(void);

View File

@@ -16,7 +16,7 @@
* *pmemsize by the size of the page table. * *pmemsize by the size of the page table.
*/ */
/* to align the pointer to the (next) page boundary */ /* 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)
/* /*