9
0
Fork 0

common: add PAGE_ALIGN_DOWN macro

Add PAGE_ALIGN_DOWN macro, which is like PAGE_ALIGN macro but
returns the lower page boundary of address.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Alexander Aring 2013-01-15 14:48:46 +01:00 committed by Sascha Hauer
parent d32b75f003
commit f8fd03225d
1 changed files with 1 additions and 0 deletions

View File

@ -226,6 +226,7 @@ int run_shell(void);
#define PAGE_SIZE 4096
#define PAGE_SHIFT 12
#define PAGE_ALIGN(s) (((s) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
#define PAGE_ALIGN_DOWN(x) ((x) & ~(PAGE_SIZE - 1))
int memory_display(char *addr, loff_t offs, ulong nbytes, int size, int swab);