diff options
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r-- | include/linux/efi.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 14813b595802..a5f359a7ad0e 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/proc_fs.h> | 18 | #include <linux/proc_fs.h> |
19 | #include <linux/rtc.h> | 19 | #include <linux/rtc.h> |
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/pfn.h> | ||
21 | 22 | ||
22 | #include <asm/page.h> | 23 | #include <asm/page.h> |
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
@@ -394,4 +395,10 @@ struct efi_generic_dev_path { | |||
394 | u16 length; | 395 | u16 length; |
395 | } __attribute ((packed)); | 396 | } __attribute ((packed)); |
396 | 397 | ||
398 | static inline void memrange_efi_to_native(u64 *addr, u64 *npages) | ||
399 | { | ||
400 | *npages = PFN_UP(*addr + (*npages<<EFI_PAGE_SHIFT)) - PFN_DOWN(*addr); | ||
401 | *addr &= PAGE_MASK; | ||
402 | } | ||
403 | |||
397 | #endif /* _LINUX_EFI_H */ | 404 | #endif /* _LINUX_EFI_H */ |