Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / include / linux / pfn.h
blobf77a30d701527e334cb48eac38785c7ae63a833a
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _TOOLS_LINUX_PFN_H_
3 #define _TOOLS_LINUX_PFN_H_
5 #include <linux/mm.h>
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 #define PHYS_PFN(x) ((unsigned long)((x) >> PAGE_SHIFT))
11 #endif