Commit 22b14523 authored by Dan Williams's avatar Dan Williams Committed by Ralf Baechle

MIPS: Fix PAGE_MASK definition

Make PAGE_MASK an unsigned long, like it is on x86, to avoid:

In file included from arch/mips/kernel/asm-offsets.c:14:0:
include/linux/mm.h: In function '__pfn_to_pfn_t':
include/linux/mm.h:1050:2: warning: left shift count >= width of type
  pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), };

...where PFN_FLAGS_MASK is:

#define PFN_FLAGS_MASK (~PAGE_MASK << (BITS_PER_LONG - PAGE_SHIFT))
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
Cc: ross.zwisler@linux.intel.com
Cc: hch@lst.de
Cc: linux-mips@linux-mips.org
Cc: linux-nvdimm@lists.01.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Patchwork: https://patchwork.linux-mips.org/patch/11280/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 997effa0
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define PAGE_SHIFT 16 #define PAGE_SHIFT 16
#endif #endif
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) #define PAGE_MASK (~(PAGE_SIZE - 1))
/* /*
* This is used for calculating the real page sizes * This is used for calculating the real page sizes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment