diff options
author | Karolina Drobnik <karolinadrobnik@gmail.com> | 2022-02-02 12:03:07 +0100 |
---|---|---|
committer | Mike Rapoport <rppt@linux.ibm.com> | 2022-02-20 08:44:37 +0200 |
commit | a2e3fe5f24f90e2bd98fa8bfabbf55962080b7b4 (patch) | |
tree | 2f9760a7ad81100cf4a2a50105632d7da1c4463c /tools/include | |
parent | 93f4e871e7e0fd0269e27f5122a70a39d8105924 (diff) | |
download | linux-a2e3fe5f24f90e2bd98fa8bfabbf55962080b7b4.tar.bz2 |
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
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/linux/pfn.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/include/linux/pfn.h b/tools/include/linux/pfn.h new file mode 100644 index 000000000000..7512a58189eb --- /dev/null +++ b/tools/include/linux/pfn.h @@ -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 |