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:
Karolina Drobnik 2022-02-02 12:03:07 +01:00 committed by Mike Rapoport
parent 93f4e871e7
commit a2e3fe5f24
1 changed files with 10 additions and 0 deletions

10
tools/include/linux/pfn.h Normal file
View File

@ -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