pfn.h 275 B

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