Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Karolina Drobnik and committed by
Mike Rapoport
a2e3fe5f 93f4e871

+10
+10
tools/include/linux/pfn.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _TOOLS_LINUX_PFN_H_ 3 + #define _TOOLS_LINUX_PFN_H_ 4 + 5 + #include <linux/mm.h> 6 + 7 + #define PFN_UP(x) (((x) + PAGE_SIZE - 1) >> PAGE_SHIFT) 8 + #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) 9 + #define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT) 10 + #endif