Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105342
b: refs/heads/master
c: af370fb
h: refs/heads/master
v: v3
  • Loading branch information
Yasunori Goto authored and Linus Torvalds committed Jul 24, 2008
1 parent 53a5884 commit 0719520
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 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: 48c906823f3927b981db9f0b03c2e2499977ee93
refs/heads/master: af370fb8cb3031f20438f246798d5f0d98089f29
8 changes: 4 additions & 4 deletions trunk/include/linux/memory_hotplug.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ struct mem_section;
#ifdef CONFIG_MEMORY_HOTPLUG

/*
* Magic number for free bootmem.
* Types for free bootmem.
* The normal smallest mapcount is -1. Here is smaller value than it.
*/
#define SECTION_INFO 0xfffffffe
#define MIX_INFO 0xfffffffd
#define NODE_INFO 0xfffffffc
#define SECTION_INFO (-1 - 1)
#define MIX_SECTION_INFO (-1 - 2)
#define NODE_INFO (-1 - 3)

/*
* pgdat resizing functions
Expand Down
12 changes: 6 additions & 6 deletions trunk/mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ static void release_memory_resource(struct resource *res)

#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
#ifndef CONFIG_SPARSEMEM_VMEMMAP
static void get_page_bootmem(unsigned long info, struct page *page, int magic)
static void get_page_bootmem(unsigned long info, struct page *page, int type)
{
atomic_set(&page->_mapcount, magic);
atomic_set(&page->_mapcount, type);
SetPagePrivate(page);
set_page_private(page, info);
atomic_inc(&page->_count);
}

void put_page_bootmem(struct page *page)
{
int magic;
int type;

magic = atomic_read(&page->_mapcount);
BUG_ON(magic >= -1);
type = atomic_read(&page->_mapcount);
BUG_ON(type >= -1);

if (atomic_dec_return(&page->_count) == 1) {
ClearPagePrivate(page);
Expand Down Expand Up @@ -119,7 +119,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT;

for (i = 0; i < mapsize; i++, page++)
get_page_bootmem(section_nr, page, MIX_INFO);
get_page_bootmem(section_nr, page, MIX_SECTION_INFO);

}

Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ static void __free_pages_ok(struct page *page, unsigned int order)
/*
* permit the bootmem allocator to evade page validation on high-order frees
*/
void __free_pages_bootmem(struct page *page, unsigned int order)
void __meminit __free_pages_bootmem(struct page *page, unsigned int order)
{
if (order == 0) {
__ClearPageReserved(page);
Expand Down

0 comments on commit 0719520

Please sign in to comment.