* - pageflags-get-rid-of-flags_reserved.patch removed from -mm tree
@ 2008-03-06 4:08 akpm
0 siblings, 0 replies; 3+ messages in thread
From: akpm @ 2008-03-06 4:08 UTC (permalink / raw)
To: clameter, ak, apw, kamezawa.hiroyu, kosaki.motohiro, nickpiggin,
riel, mm-commits
The patch titled
pageflags: get rid of FLAGS_RESERVED
has been removed from the -mm tree. Its filename was
pageflags-get-rid-of-flags_reserved.patch
This patch was dropped because an updated version will be merged
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: pageflags: get rid of FLAGS_RESERVED
From: Christoph Lameter <clameter@sgi.com>
NR_PAGEFLAGS specifies the number of page flags we are using. >From that we
can calculate the number of bits leftover that can be used for zone, node (and
maybe the sections id). There is no need anymore for FLAGS_RESERVED if we use
NR_PAGEFLAGS.
Use the new methods to make NR_PAGEFLAGS available via the preprocessor.
NR_PAGEFLAGS is used to calculate field boundaries in the page flags fields.
These field widths have to be available to the preprocessor.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Andi Kleen <ak@suse.de>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/bounds.h | 2 ++
include/linux/mm.h | 6 +++---
include/linux/mmzone.h | 19 -------------------
include/linux/page-flags.h | 14 +++++++-------
kernel/bounds.c | 1 +
5 files changed, 13 insertions(+), 29 deletions(-)
diff -puN include/linux/bounds.h~pageflags-get-rid-of-flags_reserved include/linux/bounds.h
--- a/include/linux/bounds.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/bounds.h
@@ -7,4 +7,6 @@
*
*/
+#define NR_PAGEFLAGS 32 /* __NR_PAGEFLAGS # */
+
#endif
diff -puN include/linux/mm.h~pageflags-get-rid-of-flags_reserved include/linux/mm.h
--- a/include/linux/mm.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/mm.h
@@ -398,7 +398,7 @@ static inline void set_compound_order(st
#define ZONES_WIDTH ZONES_SHIFT
-#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= FLAGS_RESERVED
+#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS
#define NODES_WIDTH NODES_SHIFT
#else
#ifdef CONFIG_SPARSEMEM_VMEMMAP
@@ -446,8 +446,8 @@ static inline void set_compound_order(st
#define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
-#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
-#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
+#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
+#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
#endif
#define ZONES_MASK ((1UL << ZONES_WIDTH) - 1)
diff -puN include/linux/mmzone.h~pageflags-get-rid-of-flags_reserved include/linux/mmzone.h
--- a/include/linux/mmzone.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/mmzone.h
@@ -839,25 +839,6 @@ static inline struct zoneref *next_zones
#include <asm/sparsemem.h>
#endif
-#if BITS_PER_LONG == 32
-/*
- * with 32 bit page->flags field, we reserve 9 bits for node/zone info.
- * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes.
- */
-#define FLAGS_RESERVED 9
-
-#elif BITS_PER_LONG == 64
-/*
- * with 64 bit flags field, there's plenty of room.
- */
-#define FLAGS_RESERVED 32
-
-#else
-
-#error BITS_PER_LONG not defined
-
-#endif
-
#if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \
!defined(CONFIG_ARCH_POPULATES_NODE_MAP)
#define early_pfn_to_nid(nid) (0UL)
diff -puN include/linux/page-flags.h~pageflags-get-rid-of-flags_reserved include/linux/page-flags.h
--- a/include/linux/page-flags.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/page-flags.h
@@ -7,6 +7,7 @@
#include <linux/types.h>
#include <linux/mm_types.h>
+#include <linux/bounds.h>
/*
* Various page->flags bits:
@@ -59,13 +60,12 @@
* extends from the high bits downwards.
*
* | FIELD | ... | FLAGS |
- * N-1 ^ 0
- * (N-FLAGS_RESERVED)
+ * N-1 ^ 0
+ * (NR_PAGEFLAGS)
*
- * The fields area is reserved for fields mapping zone, node and SPARSEMEM
- * section. The boundry between these two areas is defined by
- * FLAGS_RESERVED which defines the width of the fields section
- * (see linux/mmzone.h). New flags must _not_ overlap with this area.
+ * The fields area is reserved for fields mapping zone, node (for NUMA) and
+ * SPARSEMEM section (for variants of SPARSEMEM that require section ids like
+ * SPARSEMEM_EXTREME with !SPARSEMEM_VMEMMAP).
*/
enum pageflags {
PG_locked, /* Page is locked. Don't touch. */
@@ -101,7 +101,7 @@ enum pageflags {
*/
PG_uncached = 31, /* Page has been mapped as uncached */
#endif
- NR_PAGEFLAGS
+ __NR_PAGEFLAGS
};
/*
diff -puN kernel/bounds.c~pageflags-get-rid-of-flags_reserved kernel/bounds.c
--- a/kernel/bounds.c~pageflags-get-rid-of-flags_reserved
+++ a/kernel/bounds.c
@@ -13,4 +13,5 @@
void foo(void)
{
+ DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
}
_
Patches currently in -mm which might be from clameter@sgi.com are
fix-mempolicy-reference-counting-bugs.patch
git-unionfs.patch
git-slub.patch
slab-pass-correct-flags-to-kmem_getpages.patch
ntfs-fix-nommu-build.patch
x86-cast-cmpxchg-and-cmpxchg_local-result-for-386-and-486.patch
remove-set_migrateflags.patch
mm-use-zonelists-instead-of-zones-when-direct-reclaiming-pages.patch
mm-introduce-node_zonelist-for-accessing-the-zonelist-for-a-gfp-mask.patch
mm-remember-what-the-preferred-zone-is-for-zone_statistics.patch
mm-use-two-zonelist-that-are-filtered-by-gfp-mask.patch
mm-have-zonelist-contains-structs-with-both-a-zone-pointer-and-zone_idx.patch
mm-filter-based-on-a-nodemask-as-well-as-a-gfp_mask.patch
mm-filter-based-on-a-nodemask-as-well-as-a-gfp_mask-doc-fixes.patch
mm-filter-based-on-a-nodemask-as-well-as-a-gfp_mask-make-dequeue_huge_page_vma-obey-mpol_bind-nodemask.patch
mm-move-cache_line_size-to-linux-cacheh.patch
mempolicy-convert-mpol-constants-to-enum.patch
mempolicy-support-optional-mode-flags.patch
mempolicy-add-mpol_f_static_nodes-flag.patch
mempolicy-add-bitmap_onto-and-bitmap_fold-operations.patch
mempolicy-add-mpol_f_relative_nodes-flag.patch
mempolicy-update-numa-memory-policy-documentation.patch
pageflags-get-rid-of-flags_reserved.patch
pageflags-introduce-macros-to-generate-page-flag-functions.patch
pageflags-convert-to-the-use-of-new-macros.patch
pageflags-use-proper-page-flag-functions-in-xen.patch
pageflags-eliminate-pg_xxx-aliases.patch
reiser4.patch
reiser4-portion-of-zero_user-cleanup-patch.patch
page-owner-tracking-leak-detector.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* - pageflags-get-rid-of-flags_reserved.patch removed from -mm tree
@ 2008-03-11 4:41 akpm
0 siblings, 0 replies; 3+ messages in thread
From: akpm @ 2008-03-11 4:41 UTC (permalink / raw)
To: clameter, mm-commits
The patch titled
pageflags: get rid of FLAGS_RESERVED
has been removed from the -mm tree. Its filename was
pageflags-get-rid-of-flags_reserved.patch
This patch was dropped because it had testing failures
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: pageflags: get rid of FLAGS_RESERVED
From: Christoph Lameter <clameter@sgi.com>
NR_PAGEFLAGS specifies the number of page flags we are using. >From that we
can calculate the number of bits leftover that can be used for zone, node (and
maybe the sections id). There is no need anymore for FLAGS_RESERVED if we use
NR_PAGEFLAGS.
Use the new methods to make NR_PAGEFLAGS available via the preprocessor.
NR_PAGEFLAGS is used to calculate field boundaries in the page flags fields.
These field widths have to be available to the preprocessor.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/mm.h | 6 +++---
include/linux/mmzone.h | 19 -------------------
include/linux/page-flags.h | 20 +++++++++++++-------
kernel/bounds.c | 1 +
4 files changed, 17 insertions(+), 29 deletions(-)
diff -puN include/linux/mm.h~pageflags-get-rid-of-flags_reserved include/linux/mm.h
--- a/include/linux/mm.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/mm.h
@@ -398,7 +398,7 @@ static inline void set_compound_order(st
#define ZONES_WIDTH ZONES_SHIFT
-#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= FLAGS_RESERVED
+#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS
#define NODES_WIDTH NODES_SHIFT
#else
#ifdef CONFIG_SPARSEMEM_VMEMMAP
@@ -446,8 +446,8 @@ static inline void set_compound_order(st
#define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
-#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
-#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
+#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
+#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
#endif
#define ZONES_MASK ((1UL << ZONES_WIDTH) - 1)
diff -puN include/linux/mmzone.h~pageflags-get-rid-of-flags_reserved include/linux/mmzone.h
--- a/include/linux/mmzone.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/mmzone.h
@@ -839,25 +839,6 @@ static inline struct zoneref *next_zones
#include <asm/sparsemem.h>
#endif
-#if BITS_PER_LONG == 32
-/*
- * with 32 bit page->flags field, we reserve 9 bits for node/zone info.
- * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes.
- */
-#define FLAGS_RESERVED 9
-
-#elif BITS_PER_LONG == 64
-/*
- * with 64 bit flags field, there's plenty of room.
- */
-#define FLAGS_RESERVED 32
-
-#else
-
-#error BITS_PER_LONG not defined
-
-#endif
-
#if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \
!defined(CONFIG_ARCH_POPULATES_NODE_MAP)
#define early_pfn_to_nid(nid) (0UL)
diff -puN include/linux/page-flags.h~pageflags-get-rid-of-flags_reserved include/linux/page-flags.h
--- a/include/linux/page-flags.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/page-flags.h
@@ -59,13 +59,12 @@
* extends from the high bits downwards.
*
* | FIELD | ... | FLAGS |
- * N-1 ^ 0
- * (N-FLAGS_RESERVED)
+ * N-1 ^ 0
+ * (NR_PAGEFLAGS)
*
- * The fields area is reserved for fields mapping zone, node and SPARSEMEM
- * section. The boundry between these two areas is defined by
- * FLAGS_RESERVED which defines the width of the fields section
- * (see linux/mmzone.h). New flags must _not_ overlap with this area.
+ * The fields area is reserved for fields mapping zone, node (for NUMA) and
+ * SPARSEMEM section (for variants of SPARSEMEM that require section ids like
+ * SPARSEMEM_EXTREME with !SPARSEMEM_VMEMMAP).
*/
enum pageflags {
PG_locked, /* Page is locked. Don't touch. */
@@ -101,9 +100,16 @@ enum pageflags {
*/
PG_uncached = 31, /* Page has been mapped as uncached */
#endif
- NR_PAGEFLAGS
+ __NR_PAGEFLAGS
};
+#ifndef __GENERATING_BOUNDS_H
+#include <linux/bounds.h>
+#else
+/* Dummy for use during bounds.h generation */
+#define NR_PAGEFLAGS 1
+#endif
+
/*
* Manipulation of page state flags
*/
diff -puN kernel/bounds.c~pageflags-get-rid-of-flags_reserved kernel/bounds.c
--- a/kernel/bounds.c~pageflags-get-rid-of-flags_reserved
+++ a/kernel/bounds.c
@@ -15,5 +15,6 @@
void foo(void)
{
/* The enum constants to put into include/linux/bounds.h */
+ DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
/* End of constants */
}
_
Patches currently in -mm which might be from clameter@sgi.com are
origin.patch
ntfs-fix-nommu-build.patch
git-net.patch
git-unionfs.patch
git-slub.patch
x86-cast-cmpxchg-and-cmpxchg_local-result-for-386-and-486.patch
remove-set_migrateflags.patch
mm-use-zonelists-instead-of-zones-when-direct-reclaiming-pages.patch
mm-introduce-node_zonelist-for-accessing-the-zonelist-for-a-gfp-mask.patch
mm-remember-what-the-preferred-zone-is-for-zone_statistics.patch
mm-use-two-zonelist-that-are-filtered-by-gfp-mask.patch
mm-have-zonelist-contains-structs-with-both-a-zone-pointer-and-zone_idx.patch
mm-filter-based-on-a-nodemask-as-well-as-a-gfp_mask.patch
mm-filter-based-on-a-nodemask-as-well-as-a-gfp_mask-doc-fixes.patch
mm-filter-based-on-a-nodemask-as-well-as-a-gfp_mask-make-dequeue_huge_page_vma-obey-mpol_bind-nodemask.patch
mm-filter-based-on-a-nodemask-as-well-as-a-gfp_mask-make-dequeue_huge_page_vma-obey-mpol_bind-nodemask-rework.patch
mm-move-cache_line_size-to-linux-cacheh.patch
mempolicy-convert-mpol-constants-to-enum.patch
mempolicy-support-optional-mode-flags.patch
mempolicy-add-mpol_f_static_nodes-flag.patch
mempolicy-add-bitmap_onto-and-bitmap_fold-operations.patch
mempolicy-add-mpol_f_relative_nodes-flag.patch
mempolicy-update-numa-memory-policy-documentation.patch
mempolicy-move-rebind-functions.patch
mempolicy-create-mempolicy_operations-structure.patch
mempolicy-create-mempolicy_operations-structure-fix.patch
mempolicy-small-header-file-cleanup.patch
pageflags-get-rid-of-flags_reserved.patch
pageflags-introduce-macros-to-generate-page-flag-functions.patch
pageflags-convert-to-the-use-of-new-macros.patch
pageflags-use-proper-page-flag-functions-in-xen.patch
pageflags-eliminate-pg_xxx-aliases.patch
get-rid-of-__zone_count.patch
dmapool-enable-debugging-for-config_slub_debug_on-too.patch
reiser4.patch
reiser4-portion-of-zero_user-cleanup-patch.patch
page-owner-tracking-leak-detector.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* - pageflags-get-rid-of-flags_reserved.patch removed from -mm tree
@ 2008-04-28 21:52 akpm
0 siblings, 0 replies; 3+ messages in thread
From: akpm @ 2008-04-28 21:52 UTC (permalink / raw)
To: clameter, apw, davem, jeremy, kamezawa.hiroyu, kosaki.motohiro,
mel, riel, mm-commits
The patch titled
pageflags: get rid of FLAGS_RESERVED
has been removed from the -mm tree. Its filename was
pageflags-get-rid-of-flags_reserved.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: pageflags: get rid of FLAGS_RESERVED
From: Christoph Lameter <clameter@sgi.com>
NR_PAGEFLAGS specifies the number of page flags we are using. From that we
can calculate the number of bits leftover that can be used for zone, node (and
maybe the sections id). There is no need anymore for FLAGS_RESERVED if we use
NR_PAGEFLAGS.
Use the new methods to make NR_PAGEFLAGS available via the preprocessor.
NR_PAGEFLAGS is used to calculate field boundaries in the page flags fields.
These field widths have to be available to the preprocessor.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: David Miller <davem@davemloft.net>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/sparc64/mm/init.c | 16 ++++++++++++++--
include/linux/mm.h | 6 +++---
include/linux/mmzone.h | 19 -------------------
include/linux/page-flags.h | 19 ++++++++++++-------
kernel/bounds.c | 2 ++
5 files changed, 31 insertions(+), 31 deletions(-)
diff -puN arch/sparc64/mm/init.c~pageflags-get-rid-of-flags_reserved arch/sparc64/mm/init.c
--- a/arch/sparc64/mm/init.c~pageflags-get-rid-of-flags_reserved
+++ a/arch/sparc64/mm/init.c
@@ -1699,9 +1699,21 @@ void __init paging_init(void)
* functions like clear_dcache_dirty_cpu use the cpu mask
* in 13-bit signed-immediate instruction fields.
*/
- BUILD_BUG_ON(FLAGS_RESERVED != 32);
+
+ /*
+ * Page flags must not reach into upper 32 bits that are used
+ * for the cpu number
+ */
+ BUILD_BUG_ON(NR_PAGEFLAGS > 32);
+
+ /*
+ * The bit fields placed in the high range must not reach below
+ * the 32 bit boundary. Otherwise we cannot place the cpu field
+ * at the 32 bit boundary.
+ */
BUILD_BUG_ON(SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH +
- ilog2(roundup_pow_of_two(NR_CPUS)) > FLAGS_RESERVED);
+ ilog2(roundup_pow_of_two(NR_CPUS)) > 32);
+
BUILD_BUG_ON(NR_CPUS > 4096);
kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL;
diff -puN include/linux/mm.h~pageflags-get-rid-of-flags_reserved include/linux/mm.h
--- a/include/linux/mm.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/mm.h
@@ -407,7 +407,7 @@ static inline void set_compound_order(st
#define ZONES_WIDTH ZONES_SHIFT
-#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= FLAGS_RESERVED
+#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS
#define NODES_WIDTH NODES_SHIFT
#else
#ifdef CONFIG_SPARSEMEM_VMEMMAP
@@ -455,8 +455,8 @@ static inline void set_compound_order(st
#define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
-#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
-#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
+#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
+#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
#endif
#define ZONES_MASK ((1UL << ZONES_WIDTH) - 1)
diff -puN include/linux/mmzone.h~pageflags-get-rid-of-flags_reserved include/linux/mmzone.h
--- a/include/linux/mmzone.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/mmzone.h
@@ -820,25 +820,6 @@ static inline struct zoneref *first_zone
#include <asm/sparsemem.h>
#endif
-#if BITS_PER_LONG == 32
-/*
- * with 32 bit page->flags field, we reserve 9 bits for node/zone info.
- * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes.
- */
-#define FLAGS_RESERVED 9
-
-#elif BITS_PER_LONG == 64
-/*
- * with 64 bit flags field, there's plenty of room.
- */
-#define FLAGS_RESERVED 32
-
-#else
-
-#error BITS_PER_LONG not defined
-
-#endif
-
#if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \
!defined(CONFIG_ARCH_POPULATES_NODE_MAP)
static inline unsigned long early_pfn_to_nid(unsigned long pfn)
diff -puN include/linux/page-flags.h~pageflags-get-rid-of-flags_reserved include/linux/page-flags.h
--- a/include/linux/page-flags.h~pageflags-get-rid-of-flags_reserved
+++ a/include/linux/page-flags.h
@@ -6,7 +6,10 @@
#define PAGE_FLAGS_H
#include <linux/types.h>
+#ifndef __GENERATING_BOUNDS_H
#include <linux/mm_types.h>
+#include <linux/bounds.h>
+#endif /* !__GENERATING_BOUNDS_H */
/*
* Various page->flags bits:
@@ -59,13 +62,12 @@
* extends from the high bits downwards.
*
* | FIELD | ... | FLAGS |
- * N-1 ^ 0
- * (N-FLAGS_RESERVED)
+ * N-1 ^ 0
+ * (NR_PAGEFLAGS)
*
- * The fields area is reserved for fields mapping zone, node and SPARSEMEM
- * section. The boundry between these two areas is defined by
- * FLAGS_RESERVED which defines the width of the fields section
- * (see linux/mmzone.h). New flags must _not_ overlap with this area.
+ * The fields area is reserved for fields mapping zone, node (for NUMA) and
+ * SPARSEMEM section (for variants of SPARSEMEM that require section ids like
+ * SPARSEMEM_EXTREME with !SPARSEMEM_VMEMMAP).
*/
enum pageflags {
PG_locked, /* Page is locked. Don't touch. */
@@ -101,9 +103,11 @@ enum pageflags {
*/
PG_uncached = 31, /* Page has been mapped as uncached */
#endif
- NR_PAGEFLAGS
+ __NR_PAGEFLAGS
};
+#ifndef __GENERATING_BOUNDS_H
+
/*
* Manipulation of page state flags
*/
@@ -304,4 +308,5 @@ static inline void set_page_writeback(st
test_set_page_writeback(page);
}
+#endif /* !__GENERATING_BOUNDS_H */
#endif /* PAGE_FLAGS_H */
diff -puN kernel/bounds.c~pageflags-get-rid-of-flags_reserved kernel/bounds.c
--- a/kernel/bounds.c~pageflags-get-rid-of-flags_reserved
+++ a/kernel/bounds.c
@@ -6,6 +6,7 @@
#define __GENERATING_BOUNDS_H
/* Include headers that define the enum constants of interest */
+#include <linux/page-flags.h>
#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -15,5 +16,6 @@
void foo(void)
{
/* The enum constants to put into include/linux/bounds.h */
+ DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
/* End of constants */
}
_
Patches currently in -mm which might be from clameter@sgi.com are
origin.patch
git-unionfs.patch
git-pekka.patch
page-allcoator-smarter-retry-of-costly-order-allocations.patch
page-allocator-explicitly-retry-hugepage-allocations.patch
ipc-add-definitions-of-ushort_max-and-others.patch
mm-add-nr_writeback_temp-counter.patch
remove-div_long_long_rem.patch
slab-add-a-flag-to-prevent-debug_free-checks-on-a-kmem_cache.patch
add-kbuildh-that-contains-common-definitions-for-kbuild-users.patch
x86-use-kbuildh.patch
mips-use-kbuildh-instead-of-macros-in-asm-offsetsc.patch
alpha-use-kbuildh-instead-of-macros-in-asm-offsetsc.patch
ia64-use-kbuildh-macros-instead-of-defining-macros-in-asm-offsetsc.patch
arm-use-kbuildh-instead-of-macros-in-asm-offsetsc.patch
xtensa-use-kbuildh-macros-instead-of-defining-them-in-asm-offsetsc.patch
sparc-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
avr32-use-kbuildh-macros-instead-of-defining-macros-in-asm-offsetsc.patch
blackfin-use-kbuildh-instead-of-defining-macros-in-asm-macrosc.patch
frv-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
h8300-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
m68k-m68kmmu-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
mn10300-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
parisc-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
ppc-powerpc-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
s390-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
s390-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc-update.patch
sh-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
v850-use-kbuildh-instead-of-defining-macros-in-asm-offsetsc.patch
reiser4.patch
reiser4-portion-of-zero_user-cleanup-patch.patch
page-owner-tracking-leak-detector.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-28 21:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 21:52 - pageflags-get-rid-of-flags_reserved.patch removed from -mm tree akpm
-- strict thread matches above, loose matches on Subject: below --
2008-03-11 4:41 akpm
2008-03-06 4:08 akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.