aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2013-02-22 19:34:30 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-23 20:50:17 -0500
commitbbeae5b05ef6e40bf54db05ceb8635824153b9e2 (patch)
tree293d8b4e4bfc06367908df1915460905a5f8408b /include/linux/mmzone.h
parent3c0ff4689630b280704666833e9539d84cddc373 (diff)
mm: move page flags layout to separate header
This is a preparation patch for moving page->_last_nid into page->flags that moves page flag layout information to a separate header. This patch is necessary because otherwise there would be a circular dependency between mm_types.h and mm.h. Signed-off-by: Mel Gorman <mgorman@suse.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Simon Jeons <simon.jeons@gmail.com> Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 4f4c8c26fa9d..6c80d0ac14dd 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -15,7 +15,7 @@
15#include <linux/seqlock.h> 15#include <linux/seqlock.h>
16#include <linux/nodemask.h> 16#include <linux/nodemask.h>
17#include <linux/pageblock-flags.h> 17#include <linux/pageblock-flags.h>
18#include <generated/bounds.h> 18#include <linux/page-flags-layout.h>
19#include <linux/atomic.h> 19#include <linux/atomic.h>
20#include <asm/page.h> 20#include <asm/page.h>
21 21
@@ -310,24 +310,6 @@ enum zone_type {
310 310
311#ifndef __GENERATING_BOUNDS_H 311#ifndef __GENERATING_BOUNDS_H
312 312
313/*
314 * When a memory allocation must conform to specific limitations (such
315 * as being suitable for DMA) the caller will pass in hints to the
316 * allocator in the gfp_mask, in the zone modifier bits. These bits
317 * are used to select a priority ordered list of memory zones which
318 * match the requested limits. See gfp_zone() in include/linux/gfp.h
319 */
320
321#if MAX_NR_ZONES < 2
322#define ZONES_SHIFT 0
323#elif MAX_NR_ZONES <= 2
324#define ZONES_SHIFT 1
325#elif MAX_NR_ZONES <= 4
326#define ZONES_SHIFT 2
327#else
328#error ZONES_SHIFT -- too many zones configured adjust calculation
329#endif
330
331struct zone { 313struct zone {
332 /* Fields commonly accessed by the page allocator */ 314 /* Fields commonly accessed by the page allocator */
333 315
@@ -1055,8 +1037,6 @@ static inline unsigned long early_pfn_to_nid(unsigned long pfn)
1055 * PA_SECTION_SHIFT physical address to/from section number 1037 * PA_SECTION_SHIFT physical address to/from section number
1056 * PFN_SECTION_SHIFT pfn to/from section number 1038 * PFN_SECTION_SHIFT pfn to/from section number
1057 */ 1039 */
1058#define SECTIONS_SHIFT (MAX_PHYSMEM_BITS - SECTION_SIZE_BITS)
1059
1060#define PA_SECTION_SHIFT (SECTION_SIZE_BITS) 1040#define PA_SECTION_SHIFT (SECTION_SIZE_BITS)
1061#define PFN_SECTION_SHIFT (SECTION_SIZE_BITS - PAGE_SHIFT) 1041#define PFN_SECTION_SHIFT (SECTION_SIZE_BITS - PAGE_SHIFT)
1062 1042