Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94007
b: refs/heads/master
c: 308c05e
h: refs/heads/master
i:
  94005: d9f8cf1
  94003: 95e8114
  93999: 02a0858
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Apr 28, 2008
1 parent 4847091 commit 13c7b55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2301696932b55e2ea2085cefc84f7b94fa2dd54b
refs/heads/master: 308c05e35e3517d19bb67a7e97772235c9e15cd7
13 changes: 9 additions & 4 deletions trunk/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,11 @@ static inline void set_compound_order(struct page *page, unsigned long order)
* we have run out of space and have to fall back to an
* alternate (slower) way of determining the node.
*
* No sparsemem: | NODE | ZONE | ... | FLAGS |
* with space for node: | SECTION | NODE | ZONE | ... | FLAGS |
* no space for node: | SECTION | ZONE | ... | FLAGS |
* No sparsemem or sparsemem vmemmap: | NODE | ZONE | ... | FLAGS |
* classic sparse with space for node:| SECTION | NODE | ZONE | ... | FLAGS |
* classic sparse no space for node: | SECTION | ZONE | ... | FLAGS |
*/
#ifdef CONFIG_SPARSEMEM
#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
#define SECTIONS_WIDTH SECTIONS_SHIFT
#else
#define SECTIONS_WIDTH 0
Expand All @@ -410,6 +410,9 @@ static inline void set_compound_order(struct page *page, unsigned long order)
#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= FLAGS_RESERVED
#define NODES_WIDTH NODES_SHIFT
#else
#ifdef CONFIG_SPARSEMEM_VMEMMAP
#error "Vmemmap: No space for nodes field in page flags"
#endif
#define NODES_WIDTH 0
#endif

Expand Down Expand Up @@ -502,10 +505,12 @@ static inline struct zone *page_zone(struct page *page)
return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)];
}

#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
static inline unsigned long page_to_section(struct page *page)
{
return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
}
#endif

static inline void set_page_zone(struct page *page, enum zone_type zone)
{
Expand Down

0 comments on commit 13c7b55

Please sign in to comment.