tools/include: Add pfn.h stub
Add a stubbed pfn header with definitions used in testing. Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com> Signed-off-by: Mike Rapoport <rppt@kernel.org> Link: https://lore.kernel.org/r/1bdc02125963f945bf90dd8cb37c404cc0688af2.1643796665.git.karolinadrobnik@gmail.com
This commit is contained in:
parent
93f4e871e7
commit
a2e3fe5f24
|
@ -0,0 +1,10 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#ifndef _TOOLS_LINUX_PFN_H_
|
||||||
|
#define _TOOLS_LINUX_PFN_H_
|
||||||
|
|
||||||
|
#include <linux/mm.h>
|
||||||
|
|
||||||
|
#define PFN_UP(x) (((x) + PAGE_SIZE - 1) >> PAGE_SHIFT)
|
||||||
|
#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
|
||||||
|
#define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT)
|
||||||
|
#endif
|
Loading…
Reference in New Issue