From 36bcd39dbca824daffe16d607ae574b6edc7d31a Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Sat, 10 Nov 2007 19:16:55 +0900 Subject: sh: Split out 29-bit and 32-bit physical mode definitions. Signed-off-by: Paul Mundt --- include/asm-sh/pgtable.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/asm-sh/pgtable.h') diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 8f1e8be8d15..6ab3ba82d25 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h @@ -28,6 +28,23 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; #endif /* !__ASSEMBLY__ */ +/* + * Effective and physical address definitions, to aid with sign + * extension. + */ +#define NEFF 32 +#define NEFF_SIGN (1LL << (NEFF - 1)) +#define NEFF_MASK (-1LL << NEFF) + +#ifdef CONFIG_29BIT +#define NPHYS 29 +#else +#define NPHYS 32 +#endif + +#define NPHYS_SIGN (1LL << (NPHYS - 1)) +#define NPHYS_MASK (-1LL << NPHYS) + /* * traditional two-level paging structure */ -- cgit v1.2.3-70-g09d2