blob: 01f9b39e65f5b05376f7dce1471b05aae00df7b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright IBM Corp. 2008
*
* Guest page hinting for unused pages.
*
* Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
*/
#include <linux/mm.h>
#include <asm/page-states.h>
#include <asm/sections.h>
#include <asm/page.h>
int __bootdata_preserved(cmma_flag);
void arch_free_page(struct page *page, int order)
{
if (!cmma_flag)
return;
__set_page_unused(page_to_virt(page), 1UL << order);
}
void arch_alloc_page(struct page *page, int order)
{
if (!cmma_flag)
return;
if (cmma_flag < 2)
__set_page_stable_dat(page_to_virt(page), 1UL << order);
else
__set_page_stable_nodat(page_to_virt(page), 1UL << order);
}
|