diff options
-rw-r--r-- | include/linux/memory_hotplug.h | 8 | ||||
-rw-r--r-- | mm/memory_hotplug.c | 12 | ||||
-rw-r--r-- | mm/page_alloc.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index ea9f5ad9ec8e..3628e5088f64 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -13,12 +13,12 @@ struct mem_section; | |||
13 | #ifdef CONFIG_MEMORY_HOTPLUG | 13 | #ifdef CONFIG_MEMORY_HOTPLUG |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Magic number for free bootmem. | 16 | * Types for free bootmem. |
17 | * The normal smallest mapcount is -1. Here is smaller value than it. | 17 | * The normal smallest mapcount is -1. Here is smaller value than it. |
18 | */ | 18 | */ |
19 | #define SECTION_INFO 0xfffffffe | 19 | #define SECTION_INFO (-1 - 1) |
20 | #define MIX_INFO 0xfffffffd | 20 | #define MIX_SECTION_INFO (-1 - 2) |
21 | #define NODE_INFO 0xfffffffc | 21 | #define NODE_INFO (-1 - 3) |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * pgdat resizing functions | 24 | * pgdat resizing functions |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index ec85c37dcfb9..0fb05b258f0c 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -62,9 +62,9 @@ static void release_memory_resource(struct resource *res) | |||
62 | 62 | ||
63 | #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE | 63 | #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE |
64 | #ifndef CONFIG_SPARSEMEM_VMEMMAP | 64 | #ifndef CONFIG_SPARSEMEM_VMEMMAP |
65 | static void get_page_bootmem(unsigned long info, struct page *page, int magic) | 65 | static void get_page_bootmem(unsigned long info, struct page *page, int type) |
66 | { | 66 | { |
67 | atomic_set(&page->_mapcount, magic); | 67 | atomic_set(&page->_mapcount, type); |
68 | SetPagePrivate(page); | 68 | SetPagePrivate(page); |
69 | set_page_private(page, info); | 69 | set_page_private(page, info); |
70 | atomic_inc(&page->_count); | 70 | atomic_inc(&page->_count); |
@@ -72,10 +72,10 @@ static void get_page_bootmem(unsigned long info, struct page *page, int magic) | |||
72 | 72 | ||
73 | void put_page_bootmem(struct page *page) | 73 | void put_page_bootmem(struct page *page) |
74 | { | 74 | { |
75 | int magic; | 75 | int type; |
76 | 76 | ||
77 | magic = atomic_read(&page->_mapcount); | 77 | type = atomic_read(&page->_mapcount); |
78 | BUG_ON(magic >= -1); | 78 | BUG_ON(type >= -1); |
79 | 79 | ||
80 | if (atomic_dec_return(&page->_count) == 1) { | 80 | if (atomic_dec_return(&page->_count) == 1) { |
81 | ClearPagePrivate(page); | 81 | ClearPagePrivate(page); |
@@ -119,7 +119,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn) | |||
119 | mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT; | 119 | mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT; |
120 | 120 | ||
121 | for (i = 0; i < mapsize; i++, page++) | 121 | for (i = 0; i < mapsize; i++, page++) |
122 | get_page_bootmem(section_nr, page, MIX_INFO); | 122 | get_page_bootmem(section_nr, page, MIX_SECTION_INFO); |
123 | 123 | ||
124 | } | 124 | } |
125 | 125 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index cd4c41432ef6..6da667274df5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -533,7 +533,7 @@ static void __free_pages_ok(struct page *page, unsigned int order) | |||
533 | /* | 533 | /* |
534 | * permit the bootmem allocator to evade page validation on high-order frees | 534 | * permit the bootmem allocator to evade page validation on high-order frees |
535 | */ | 535 | */ |
536 | void __free_pages_bootmem(struct page *page, unsigned int order) | 536 | void __meminit __free_pages_bootmem(struct page *page, unsigned int order) |
537 | { | 537 | { |
538 | if (order == 0) { | 538 | if (order == 0) { |
539 | __ClearPageReserved(page); | 539 | __ClearPageReserved(page); |