diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/efi.h | 7 | ||||
-rw-r--r-- | include/linux/irqflags.h | 6 | ||||
-rw-r--r-- | include/linux/prctl.h | 6 |
3 files changed, 16 insertions, 3 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 */ |
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h index 412e025bc5c7..e600c4e9b8c5 100644 --- a/include/linux/irqflags.h +++ b/include/linux/irqflags.h | |||
@@ -84,10 +84,10 @@ | |||
84 | 84 | ||
85 | #define irqs_disabled() \ | 85 | #define irqs_disabled() \ |
86 | ({ \ | 86 | ({ \ |
87 | unsigned long flags; \ | 87 | unsigned long _flags; \ |
88 | \ | 88 | \ |
89 | raw_local_save_flags(flags); \ | 89 | raw_local_save_flags(_flags); \ |
90 | raw_irqs_disabled_flags(flags); \ | 90 | raw_irqs_disabled_flags(_flags); \ |
91 | }) | 91 | }) |
92 | 92 | ||
93 | #define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags) | 93 | #define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags) |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 3800639775ae..5c80b1939636 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
@@ -67,4 +67,10 @@ | |||
67 | #define PR_CAPBSET_READ 23 | 67 | #define PR_CAPBSET_READ 23 |
68 | #define PR_CAPBSET_DROP 24 | 68 | #define PR_CAPBSET_DROP 24 |
69 | 69 | ||
70 | /* Get/set the process' ability to use the timestamp counter instruction */ | ||
71 | #define PR_GET_TSC 25 | ||
72 | #define PR_SET_TSC 26 | ||
73 | # define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */ | ||
74 | # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ | ||
75 | |||
70 | #endif /* _LINUX_PRCTL_H */ | 76 | #endif /* _LINUX_PRCTL_H */ |