diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/processor.h | 4 | ||||
-rw-r--r-- | include/asm-i386/thread_info.h | 5 | ||||
-rw-r--r-- | include/linux/seccomp.h | 10 |
3 files changed, 8 insertions, 11 deletions
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 94e0c14..422cffe 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -228,6 +228,10 @@ extern int bootloader_type; #define HAVE_ARCH_PICK_MMAP_LAYOUT +extern void hard_disable_TSC(void); +extern void disable_TSC(void); +extern void hard_enable_TSC(void); + /* * Size of io_bitmap. */ diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 4cb0f91..54424e0 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h @@ -137,6 +137,7 @@ static inline struct thread_info *current_thread_info(void) #define TIF_DEBUG 17 /* uses debug registers */ #define TIF_IO_BITMAP 18 /* uses I/O bitmap */ #define TIF_FREEZE 19 /* is freezing for suspend */ +#define TIF_NOTSC 20 /* TSC is not accessible in userland */ #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) @@ -151,6 +152,7 @@ static inline struct thread_info *current_thread_info(void) #define _TIF_DEBUG (1<<TIF_DEBUG) #define _TIF_IO_BITMAP (1<<TIF_IO_BITMAP) #define _TIF_FREEZE (1<<TIF_FREEZE) +#define _TIF_NOTSC (1<<TIF_NOTSC) /* work to do on interrupt/exception return */ #define _TIF_WORK_MASK \ @@ -160,7 +162,8 @@ static inline struct thread_info *current_thread_info(void) #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) /* flags to check in __switch_to() */ -#define _TIF_WORK_CTXSW (_TIF_DEBUG|_TIF_IO_BITMAP) +#define _TIF_WORK_CTXSW_NEXT (_TIF_IO_BITMAP | _TIF_NOTSC | _TIF_DEBUG) +#define _TIF_WORK_CTXSW_PREV (_TIF_IO_BITMAP | _TIF_NOTSC) /* * Thread-synchronous status. diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index d708974..262a8dc 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -16,11 +16,6 @@ static inline void secure_computing(int this_syscall) __secure_computing(this_syscall); } -static inline int has_secure_computing(struct thread_info *ti) -{ - return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP)); -} - extern long prctl_get_seccomp(void); extern long prctl_set_seccomp(unsigned long); @@ -29,11 +24,6 @@ extern long prctl_set_seccomp(unsigned long); typedef struct { } seccomp_t; #define secure_computing(x) do { } while (0) -/* static inline to preserve typechecking */ -static inline int has_secure_computing(struct thread_info *ti) -{ - return 0; -} static inline long prctl_get_seccomp(void) { |