diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 18:14:43 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 18:14:43 -0400 |
| commit | b5aef682e00c424bb2f55639168083b61803a012 (patch) | |
| tree | b7b69146e8331f96db02b766fc139d8a0907d446 /include/linux | |
| parent | 90f8908127b55aa22f5a995880d5ac8cd23fbe1e (diff) | |
| parent | 9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff) | |
Merge 3.10-rc7 into driver-core-next
We want the firmware merge fixes, and other bits, in here now.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/context_tracking.h | 35 | ||||
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/kvm_host.h | 37 | ||||
| -rw-r--r-- | include/linux/perf_event.h | 3 | ||||
| -rw-r--r-- | include/linux/preempt.h | 18 | ||||
| -rw-r--r-- | include/linux/splice.h | 1 | ||||
| -rw-r--r-- | include/linux/vtime.h | 4 |
7 files changed, 57 insertions, 43 deletions
diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h index 365f4a61bf04..fc09d7b0dacf 100644 --- a/include/linux/context_tracking.h +++ b/include/linux/context_tracking.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
| 5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
| 6 | #include <linux/vtime.h> | ||
| 6 | #include <asm/ptrace.h> | 7 | #include <asm/ptrace.h> |
| 7 | 8 | ||
| 8 | struct context_tracking { | 9 | struct context_tracking { |
| @@ -19,6 +20,26 @@ struct context_tracking { | |||
| 19 | } state; | 20 | } state; |
| 20 | }; | 21 | }; |
| 21 | 22 | ||
| 23 | static inline void __guest_enter(void) | ||
| 24 | { | ||
| 25 | /* | ||
| 26 | * This is running in ioctl context so we can avoid | ||
| 27 | * the call to vtime_account() with its unnecessary idle check. | ||
| 28 | */ | ||
| 29 | vtime_account_system(current); | ||
| 30 | current->flags |= PF_VCPU; | ||
| 31 | } | ||
| 32 | |||
| 33 | static inline void __guest_exit(void) | ||
| 34 | { | ||
| 35 | /* | ||
| 36 | * This is running in ioctl context so we can avoid | ||
| 37 | * the call to vtime_account() with its unnecessary idle check. | ||
| 38 | */ | ||
| 39 | vtime_account_system(current); | ||
| 40 | current->flags &= ~PF_VCPU; | ||
| 41 | } | ||
| 42 | |||
| 22 | #ifdef CONFIG_CONTEXT_TRACKING | 43 | #ifdef CONFIG_CONTEXT_TRACKING |
| 23 | DECLARE_PER_CPU(struct context_tracking, context_tracking); | 44 | DECLARE_PER_CPU(struct context_tracking, context_tracking); |
| 24 | 45 | ||
| @@ -35,6 +56,9 @@ static inline bool context_tracking_active(void) | |||
| 35 | extern void user_enter(void); | 56 | extern void user_enter(void); |
| 36 | extern void user_exit(void); | 57 | extern void user_exit(void); |
| 37 | 58 | ||
| 59 | extern void guest_enter(void); | ||
| 60 | extern void guest_exit(void); | ||
| 61 | |||
| 38 | static inline enum ctx_state exception_enter(void) | 62 | static inline enum ctx_state exception_enter(void) |
| 39 | { | 63 | { |
| 40 | enum ctx_state prev_ctx; | 64 | enum ctx_state prev_ctx; |
| @@ -57,6 +81,17 @@ extern void context_tracking_task_switch(struct task_struct *prev, | |||
| 57 | static inline bool context_tracking_in_user(void) { return false; } | 81 | static inline bool context_tracking_in_user(void) { return false; } |
| 58 | static inline void user_enter(void) { } | 82 | static inline void user_enter(void) { } |
| 59 | static inline void user_exit(void) { } | 83 | static inline void user_exit(void) { } |
| 84 | |||
| 85 | static inline void guest_enter(void) | ||
| 86 | { | ||
| 87 | __guest_enter(); | ||
| 88 | } | ||
| 89 | |||
| 90 | static inline void guest_exit(void) | ||
| 91 | { | ||
| 92 | __guest_exit(); | ||
| 93 | } | ||
| 94 | |||
| 60 | static inline enum ctx_state exception_enter(void) { return 0; } | 95 | static inline enum ctx_state exception_enter(void) { return 0; } |
| 61 | static inline void exception_exit(enum ctx_state prev_ctx) { } | 96 | static inline void exception_exit(enum ctx_state prev_ctx) { } |
| 62 | static inline void context_tracking_task_switch(struct task_struct *prev, | 97 | static inline void context_tracking_task_switch(struct task_struct *prev, |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 43db02e9c9fa..65c2be22b601 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2414,8 +2414,6 @@ extern ssize_t generic_file_splice_write(struct pipe_inode_info *, | |||
| 2414 | struct file *, loff_t *, size_t, unsigned int); | 2414 | struct file *, loff_t *, size_t, unsigned int); |
| 2415 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | 2415 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, |
| 2416 | struct file *out, loff_t *, size_t len, unsigned int flags); | 2416 | struct file *out, loff_t *, size_t len, unsigned int flags); |
| 2417 | extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | ||
| 2418 | size_t len, unsigned int flags); | ||
| 2419 | 2417 | ||
| 2420 | extern void | 2418 | extern void |
| 2421 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 2419 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index f0eea07d2c2b..8db53cfaccdb 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/ratelimit.h> | 23 | #include <linux/ratelimit.h> |
| 24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
| 25 | #include <linux/irqflags.h> | 25 | #include <linux/irqflags.h> |
| 26 | #include <linux/context_tracking.h> | ||
| 26 | #include <asm/signal.h> | 27 | #include <asm/signal.h> |
| 27 | 28 | ||
| 28 | #include <linux/kvm.h> | 29 | #include <linux/kvm.h> |
| @@ -760,42 +761,6 @@ static inline int kvm_iommu_unmap_guest(struct kvm *kvm) | |||
| 760 | } | 761 | } |
| 761 | #endif | 762 | #endif |
| 762 | 763 | ||
| 763 | static inline void __guest_enter(void) | ||
| 764 | { | ||
| 765 | /* | ||
| 766 | * This is running in ioctl context so we can avoid | ||
| 767 | * the call to vtime_account() with its unnecessary idle check. | ||
| 768 | */ | ||
| 769 | vtime_account_system(current); | ||
| 770 | current->flags |= PF_VCPU; | ||
| 771 | } | ||
| 772 | |||
| 773 | static inline void __guest_exit(void) | ||
| 774 | { | ||
| 775 | /* | ||
| 776 | * This is running in ioctl context so we can avoid | ||
| 777 | * the call to vtime_account() with its unnecessary idle check. | ||
| 778 | */ | ||
| 779 | vtime_account_system(current); | ||
| 780 | current->flags &= ~PF_VCPU; | ||
| 781 | } | ||
| 782 | |||
| 783 | #ifdef CONFIG_CONTEXT_TRACKING | ||
| 784 | extern void guest_enter(void); | ||
| 785 | extern void guest_exit(void); | ||
| 786 | |||
| 787 | #else /* !CONFIG_CONTEXT_TRACKING */ | ||
| 788 | static inline void guest_enter(void) | ||
| 789 | { | ||
| 790 | __guest_enter(); | ||
| 791 | } | ||
| 792 | |||
| 793 | static inline void guest_exit(void) | ||
| 794 | { | ||
| 795 | __guest_exit(); | ||
| 796 | } | ||
| 797 | #endif /* !CONFIG_CONTEXT_TRACKING */ | ||
| 798 | |||
| 799 | static inline void kvm_guest_enter(void) | 764 | static inline void kvm_guest_enter(void) |
| 800 | { | 765 | { |
| 801 | unsigned long flags; | 766 | unsigned long flags; |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f463a46424e2..c5b6dbf9c2fc 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -389,8 +389,7 @@ struct perf_event { | |||
| 389 | /* mmap bits */ | 389 | /* mmap bits */ |
| 390 | struct mutex mmap_mutex; | 390 | struct mutex mmap_mutex; |
| 391 | atomic_t mmap_count; | 391 | atomic_t mmap_count; |
| 392 | int mmap_locked; | 392 | |
| 393 | struct user_struct *mmap_user; | ||
| 394 | struct ring_buffer *rb; | 393 | struct ring_buffer *rb; |
| 395 | struct list_head rb_entry; | 394 | struct list_head rb_entry; |
| 396 | 395 | ||
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 87a03c746f17..f5d4723cdb3d 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
| @@ -33,9 +33,25 @@ do { \ | |||
| 33 | preempt_schedule(); \ | 33 | preempt_schedule(); \ |
| 34 | } while (0) | 34 | } while (0) |
| 35 | 35 | ||
| 36 | #ifdef CONFIG_CONTEXT_TRACKING | ||
| 37 | |||
| 38 | void preempt_schedule_context(void); | ||
| 39 | |||
| 40 | #define preempt_check_resched_context() \ | ||
| 41 | do { \ | ||
| 42 | if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \ | ||
| 43 | preempt_schedule_context(); \ | ||
| 44 | } while (0) | ||
| 45 | #else | ||
| 46 | |||
| 47 | #define preempt_check_resched_context() preempt_check_resched() | ||
| 48 | |||
| 49 | #endif /* CONFIG_CONTEXT_TRACKING */ | ||
| 50 | |||
| 36 | #else /* !CONFIG_PREEMPT */ | 51 | #else /* !CONFIG_PREEMPT */ |
| 37 | 52 | ||
| 38 | #define preempt_check_resched() do { } while (0) | 53 | #define preempt_check_resched() do { } while (0) |
| 54 | #define preempt_check_resched_context() do { } while (0) | ||
| 39 | 55 | ||
| 40 | #endif /* CONFIG_PREEMPT */ | 56 | #endif /* CONFIG_PREEMPT */ |
| 41 | 57 | ||
| @@ -88,7 +104,7 @@ do { \ | |||
| 88 | do { \ | 104 | do { \ |
| 89 | preempt_enable_no_resched_notrace(); \ | 105 | preempt_enable_no_resched_notrace(); \ |
| 90 | barrier(); \ | 106 | barrier(); \ |
| 91 | preempt_check_resched(); \ | 107 | preempt_check_resched_context(); \ |
| 92 | } while (0) | 108 | } while (0) |
| 93 | 109 | ||
| 94 | #else /* !CONFIG_PREEMPT_COUNT */ | 110 | #else /* !CONFIG_PREEMPT_COUNT */ |
diff --git a/include/linux/splice.h b/include/linux/splice.h index 09a545a7dfa3..74575cbf2d6f 100644 --- a/include/linux/splice.h +++ b/include/linux/splice.h | |||
| @@ -35,6 +35,7 @@ struct splice_desc { | |||
| 35 | void *data; /* cookie */ | 35 | void *data; /* cookie */ |
| 36 | } u; | 36 | } u; |
| 37 | loff_t pos; /* file position */ | 37 | loff_t pos; /* file position */ |
| 38 | loff_t *opos; /* sendfile: output position */ | ||
| 38 | size_t num_spliced; /* number of bytes already spliced */ | 39 | size_t num_spliced; /* number of bytes already spliced */ |
| 39 | bool need_wakeup; /* need to wake up writer */ | 40 | bool need_wakeup; /* need to wake up writer */ |
| 40 | }; | 41 | }; |
diff --git a/include/linux/vtime.h b/include/linux/vtime.h index 71a5782d8c59..b1dd2db80076 100644 --- a/include/linux/vtime.h +++ b/include/linux/vtime.h | |||
| @@ -34,7 +34,7 @@ static inline void vtime_user_exit(struct task_struct *tsk) | |||
| 34 | } | 34 | } |
| 35 | extern void vtime_guest_enter(struct task_struct *tsk); | 35 | extern void vtime_guest_enter(struct task_struct *tsk); |
| 36 | extern void vtime_guest_exit(struct task_struct *tsk); | 36 | extern void vtime_guest_exit(struct task_struct *tsk); |
| 37 | extern void vtime_init_idle(struct task_struct *tsk); | 37 | extern void vtime_init_idle(struct task_struct *tsk, int cpu); |
| 38 | #else | 38 | #else |
| 39 | static inline void vtime_account_irq_exit(struct task_struct *tsk) | 39 | static inline void vtime_account_irq_exit(struct task_struct *tsk) |
| 40 | { | 40 | { |
| @@ -45,7 +45,7 @@ static inline void vtime_user_enter(struct task_struct *tsk) { } | |||
| 45 | static inline void vtime_user_exit(struct task_struct *tsk) { } | 45 | static inline void vtime_user_exit(struct task_struct *tsk) { } |
| 46 | static inline void vtime_guest_enter(struct task_struct *tsk) { } | 46 | static inline void vtime_guest_enter(struct task_struct *tsk) { } |
| 47 | static inline void vtime_guest_exit(struct task_struct *tsk) { } | 47 | static inline void vtime_guest_exit(struct task_struct *tsk) { } |
| 48 | static inline void vtime_init_idle(struct task_struct *tsk) { } | 48 | static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { } |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING | 51 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING |
