diff options
author | Matthew Wilcox (Oracle) <[email protected]> | 2021-10-04 14:46:48 +0100 |
---|---|---|
committer | Vlastimil Babka <[email protected]> | 2022-01-06 12:27:03 +0100 |
commit | c5e97ed154589524a1df4ae2be55c4cfdb0d0573 (patch) | |
tree | 95cb494d3206da298e780e77ad9a8699d21548b6 /arch/x86/mm/init_64.c | |
parent | ffedd09fa9b06d0d79e123bbf4ec81125456d982 (diff) |
bootmem: Use page->index instead of page->freelist
page->freelist is for the use of slab. Using page->index is the same
set of bits as page->freelist, and by using an integer instead of a
pointer, we can avoid casts.
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Vlastimil Babka <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 36098226a957..96d34ebb20a9 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -981,7 +981,7 @@ static void __meminit free_pagetable(struct page *page, int order) if (PageReserved(page)) { __ClearPageReserved(page); - magic = (unsigned long)page->freelist; + magic = page->index; if (magic == SECTION_INFO || magic == MIX_SECTION_INFO) { while (nr_pages--) put_page_bootmem(page++); |