mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
pageflags: get rid of FLAGS_RESERVED
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e268318149
commit
9223b4190f
5 changed files with 31 additions and 31 deletions
|
@ -820,25 +820,6 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist,
|
|||
#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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue