diff options
Diffstat (limited to 'include')
125 files changed, 1634 insertions, 582 deletions
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 2bcc5c7c22a6..61e03dd7939e 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h | |||
@@ -30,6 +30,9 @@ typedef u64 cputime64_t; | |||
30 | #define cputime64_to_jiffies64(__ct) (__ct) | 30 | #define cputime64_to_jiffies64(__ct) (__ct) |
31 | #define jiffies64_to_cputime64(__jif) (__jif) | 31 | #define jiffies64_to_cputime64(__jif) (__jif) |
32 | #define cputime_to_cputime64(__ct) ((u64) __ct) | 32 | #define cputime_to_cputime64(__ct) ((u64) __ct) |
33 | #define cputime64_gt(__a, __b) ((__a) > (__b)) | ||
34 | |||
35 | #define nsecs_to_cputime64(__ct) nsecs_to_jiffies64(__ct) | ||
33 | 36 | ||
34 | 37 | ||
35 | /* | 38 | /* |
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h index 0fc16e3f0bfc..84793c7025e2 100644 --- a/include/asm-generic/fcntl.h +++ b/include/asm-generic/fcntl.h | |||
@@ -80,6 +80,10 @@ | |||
80 | #define O_SYNC (__O_SYNC|O_DSYNC) | 80 | #define O_SYNC (__O_SYNC|O_DSYNC) |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #ifndef O_PATH | ||
84 | #define O_PATH 010000000 | ||
85 | #endif | ||
86 | |||
83 | #ifndef O_NDELAY | 87 | #ifndef O_NDELAY |
84 | #define O_NDELAY O_NONBLOCK | 88 | #define O_NDELAY O_NONBLOCK |
85 | #endif | 89 | #endif |
diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h index 3c2344f48136..01f227e14254 100644 --- a/include/asm-generic/futex.h +++ b/include/asm-generic/futex.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <asm/errno.h> | 6 | #include <asm/errno.h> |
7 | 7 | ||
8 | static inline int | 8 | static inline int |
9 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | 9 | futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) |
10 | { | 10 | { |
11 | int op = (encoded_op >> 28) & 7; | 11 | int op = (encoded_op >> 28) & 7; |
12 | int cmp = (encoded_op >> 24) & 15; | 12 | int cmp = (encoded_op >> 24) & 15; |
@@ -16,7 +16,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
16 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 16 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
17 | oparg = 1 << oparg; | 17 | oparg = 1 << oparg; |
18 | 18 | ||
19 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | 19 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(u32))) |
20 | return -EFAULT; | 20 | return -EFAULT; |
21 | 21 | ||
22 | pagefault_disable(); | 22 | pagefault_disable(); |
@@ -48,7 +48,8 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | static inline int | 50 | static inline int |
51 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | 51 | futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, |
52 | u32 oldval, u32 newval) | ||
52 | { | 53 | { |
53 | return -ENOSYS; | 54 | return -ENOSYS; |
54 | } | 55 | } |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 31b6188df221..b4bfe338ea0e 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | #ifdef CONFIG_MMU | 5 | #ifdef CONFIG_MMU |
6 | 6 | ||
7 | #include <linux/mm_types.h> | ||
8 | |||
7 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 9 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
8 | extern int ptep_set_access_flags(struct vm_area_struct *vma, | 10 | extern int ptep_set_access_flags(struct vm_area_struct *vma, |
9 | unsigned long address, pte_t *ptep, | 11 | unsigned long address, pte_t *ptep, |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index b3bfabc258f3..c1a1216e29ce 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -11,6 +11,7 @@ extern char _sinittext[], _einittext[]; | |||
11 | extern char _end[]; | 11 | extern char _end[]; |
12 | extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[]; | 12 | extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[]; |
13 | extern char __kprobes_text_start[], __kprobes_text_end[]; | 13 | extern char __kprobes_text_start[], __kprobes_text_end[]; |
14 | extern char __entry_text_start[], __entry_text_end[]; | ||
14 | extern char __initdata_begin[], __initdata_end[]; | 15 | extern char __initdata_begin[], __initdata_end[]; |
15 | extern char __start_rodata[], __end_rodata[]; | 16 | extern char __start_rodata[], __end_rodata[]; |
16 | 17 | ||
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index b969770196c2..57af0338d270 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -646,9 +646,13 @@ __SYSCALL(__NR_prlimit64, sys_prlimit64) | |||
646 | __SYSCALL(__NR_fanotify_init, sys_fanotify_init) | 646 | __SYSCALL(__NR_fanotify_init, sys_fanotify_init) |
647 | #define __NR_fanotify_mark 263 | 647 | #define __NR_fanotify_mark 263 |
648 | __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) | 648 | __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) |
649 | #define __NR_name_to_handle_at 264 | ||
650 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | ||
651 | #define __NR_open_by_handle_at 265 | ||
652 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) | ||
649 | 653 | ||
650 | #undef __NR_syscalls | 654 | #undef __NR_syscalls |
651 | #define __NR_syscalls 264 | 655 | #define __NR_syscalls 266 |
652 | 656 | ||
653 | /* | 657 | /* |
654 | * All syscalls below here should go away really, | 658 | * All syscalls below here should go away really, |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 68649336c4ad..32c45e5fe0ab 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * HEAD_TEXT_SECTION | 15 | * HEAD_TEXT_SECTION |
16 | * INIT_TEXT_SECTION(PAGE_SIZE) | 16 | * INIT_TEXT_SECTION(PAGE_SIZE) |
17 | * INIT_DATA_SECTION(...) | 17 | * INIT_DATA_SECTION(...) |
18 | * PERCPU(PAGE_SIZE) | 18 | * PERCPU(CACHELINE_SIZE, PAGE_SIZE) |
19 | * __init_end = .; | 19 | * __init_end = .; |
20 | * | 20 | * |
21 | * _stext = .; | 21 | * _stext = .; |
@@ -124,7 +124,8 @@ | |||
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #ifdef CONFIG_EVENT_TRACING | 126 | #ifdef CONFIG_EVENT_TRACING |
127 | #define FTRACE_EVENTS() VMLINUX_SYMBOL(__start_ftrace_events) = .; \ | 127 | #define FTRACE_EVENTS() . = ALIGN(8); \ |
128 | VMLINUX_SYMBOL(__start_ftrace_events) = .; \ | ||
128 | *(_ftrace_events) \ | 129 | *(_ftrace_events) \ |
129 | VMLINUX_SYMBOL(__stop_ftrace_events) = .; | 130 | VMLINUX_SYMBOL(__stop_ftrace_events) = .; |
130 | #else | 131 | #else |
@@ -140,7 +141,8 @@ | |||
140 | #endif | 141 | #endif |
141 | 142 | ||
142 | #ifdef CONFIG_FTRACE_SYSCALLS | 143 | #ifdef CONFIG_FTRACE_SYSCALLS |
143 | #define TRACE_SYSCALLS() VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \ | 144 | #define TRACE_SYSCALLS() . = ALIGN(8); \ |
145 | VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \ | ||
144 | *(__syscalls_metadata) \ | 146 | *(__syscalls_metadata) \ |
145 | VMLINUX_SYMBOL(__stop_syscalls_metadata) = .; | 147 | VMLINUX_SYMBOL(__stop_syscalls_metadata) = .; |
146 | #else | 148 | #else |
@@ -165,10 +167,8 @@ | |||
165 | CPU_KEEP(exit.data) \ | 167 | CPU_KEEP(exit.data) \ |
166 | MEM_KEEP(init.data) \ | 168 | MEM_KEEP(init.data) \ |
167 | MEM_KEEP(exit.data) \ | 169 | MEM_KEEP(exit.data) \ |
168 | . = ALIGN(32); \ | 170 | STRUCT_ALIGN(); \ |
169 | VMLINUX_SYMBOL(__start___tracepoints) = .; \ | ||
170 | *(__tracepoints) \ | 171 | *(__tracepoints) \ |
171 | VMLINUX_SYMBOL(__stop___tracepoints) = .; \ | ||
172 | /* implement dynamic printk debug */ \ | 172 | /* implement dynamic printk debug */ \ |
173 | . = ALIGN(8); \ | 173 | . = ALIGN(8); \ |
174 | VMLINUX_SYMBOL(__start___verbose) = .; \ | 174 | VMLINUX_SYMBOL(__start___verbose) = .; \ |
@@ -176,13 +176,7 @@ | |||
176 | VMLINUX_SYMBOL(__stop___verbose) = .; \ | 176 | VMLINUX_SYMBOL(__stop___verbose) = .; \ |
177 | LIKELY_PROFILE() \ | 177 | LIKELY_PROFILE() \ |
178 | BRANCH_PROFILE() \ | 178 | BRANCH_PROFILE() \ |
179 | TRACE_PRINTKS() \ | 179 | TRACE_PRINTKS() |
180 | \ | ||
181 | STRUCT_ALIGN(); \ | ||
182 | FTRACE_EVENTS() \ | ||
183 | \ | ||
184 | STRUCT_ALIGN(); \ | ||
185 | TRACE_SYSCALLS() | ||
186 | 180 | ||
187 | /* | 181 | /* |
188 | * Data section helpers | 182 | * Data section helpers |
@@ -220,6 +214,10 @@ | |||
220 | VMLINUX_SYMBOL(__start_rodata) = .; \ | 214 | VMLINUX_SYMBOL(__start_rodata) = .; \ |
221 | *(.rodata) *(.rodata.*) \ | 215 | *(.rodata) *(.rodata.*) \ |
222 | *(__vermagic) /* Kernel version magic */ \ | 216 | *(__vermagic) /* Kernel version magic */ \ |
217 | . = ALIGN(8); \ | ||
218 | VMLINUX_SYMBOL(__start___tracepoints_ptrs) = .; \ | ||
219 | *(__tracepoints_ptrs) /* Tracepoints: pointer array */\ | ||
220 | VMLINUX_SYMBOL(__stop___tracepoints_ptrs) = .; \ | ||
223 | *(__markers_strings) /* Markers: strings */ \ | 221 | *(__markers_strings) /* Markers: strings */ \ |
224 | *(__tracepoints_strings)/* Tracepoints: strings */ \ | 222 | *(__tracepoints_strings)/* Tracepoints: strings */ \ |
225 | } \ | 223 | } \ |
@@ -364,6 +362,13 @@ | |||
364 | VMLINUX_SYMBOL(__start___param) = .; \ | 362 | VMLINUX_SYMBOL(__start___param) = .; \ |
365 | *(__param) \ | 363 | *(__param) \ |
366 | VMLINUX_SYMBOL(__stop___param) = .; \ | 364 | VMLINUX_SYMBOL(__stop___param) = .; \ |
365 | } \ | ||
366 | \ | ||
367 | /* Built-in module versions. */ \ | ||
368 | __modver : AT(ADDR(__modver) - LOAD_OFFSET) { \ | ||
369 | VMLINUX_SYMBOL(__start___modver) = .; \ | ||
370 | *(__modver) \ | ||
371 | VMLINUX_SYMBOL(__stop___modver) = .; \ | ||
367 | . = ALIGN((align)); \ | 372 | . = ALIGN((align)); \ |
368 | VMLINUX_SYMBOL(__end_rodata) = .; \ | 373 | VMLINUX_SYMBOL(__end_rodata) = .; \ |
369 | } \ | 374 | } \ |
@@ -419,6 +424,12 @@ | |||
419 | *(.kprobes.text) \ | 424 | *(.kprobes.text) \ |
420 | VMLINUX_SYMBOL(__kprobes_text_end) = .; | 425 | VMLINUX_SYMBOL(__kprobes_text_end) = .; |
421 | 426 | ||
427 | #define ENTRY_TEXT \ | ||
428 | ALIGN_FUNCTION(); \ | ||
429 | VMLINUX_SYMBOL(__entry_text_start) = .; \ | ||
430 | *(.entry.text) \ | ||
431 | VMLINUX_SYMBOL(__entry_text_end) = .; | ||
432 | |||
422 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 433 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
423 | #define IRQENTRY_TEXT \ | 434 | #define IRQENTRY_TEXT \ |
424 | ALIGN_FUNCTION(); \ | 435 | ALIGN_FUNCTION(); \ |
@@ -475,6 +486,8 @@ | |||
475 | KERNEL_CTORS() \ | 486 | KERNEL_CTORS() \ |
476 | *(.init.rodata) \ | 487 | *(.init.rodata) \ |
477 | MCOUNT_REC() \ | 488 | MCOUNT_REC() \ |
489 | FTRACE_EVENTS() \ | ||
490 | TRACE_SYSCALLS() \ | ||
478 | DEV_DISCARD(init.rodata) \ | 491 | DEV_DISCARD(init.rodata) \ |
479 | CPU_DISCARD(init.rodata) \ | 492 | CPU_DISCARD(init.rodata) \ |
480 | MEM_DISCARD(init.rodata) \ | 493 | MEM_DISCARD(init.rodata) \ |
@@ -676,13 +689,18 @@ | |||
676 | 689 | ||
677 | /** | 690 | /** |
678 | * PERCPU_VADDR - define output section for percpu area | 691 | * PERCPU_VADDR - define output section for percpu area |
692 | * @cacheline: cacheline size | ||
679 | * @vaddr: explicit base address (optional) | 693 | * @vaddr: explicit base address (optional) |
680 | * @phdr: destination PHDR (optional) | 694 | * @phdr: destination PHDR (optional) |
681 | * | 695 | * |
682 | * Macro which expands to output section for percpu area. If @vaddr | 696 | * Macro which expands to output section for percpu area. |
683 | * is not blank, it specifies explicit base address and all percpu | 697 | * |
684 | * symbols will be offset from the given address. If blank, @vaddr | 698 | * @cacheline is used to align subsections to avoid false cacheline |
685 | * always equals @laddr + LOAD_OFFSET. | 699 | * sharing between subsections for different purposes. |
700 | * | ||
701 | * If @vaddr is not blank, it specifies explicit base address and all | ||
702 | * percpu symbols will be offset from the given address. If blank, | ||
703 | * @vaddr always equals @laddr + LOAD_OFFSET. | ||
686 | * | 704 | * |
687 | * @phdr defines the output PHDR to use if not blank. Be warned that | 705 | * @phdr defines the output PHDR to use if not blank. Be warned that |
688 | * output PHDR is sticky. If @phdr is specified, the next output | 706 | * output PHDR is sticky. If @phdr is specified, the next output |
@@ -693,7 +711,7 @@ | |||
693 | * If there is no need to put the percpu section at a predetermined | 711 | * If there is no need to put the percpu section at a predetermined |
694 | * address, use PERCPU(). | 712 | * address, use PERCPU(). |
695 | */ | 713 | */ |
696 | #define PERCPU_VADDR(vaddr, phdr) \ | 714 | #define PERCPU_VADDR(cacheline, vaddr, phdr) \ |
697 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ | 715 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ |
698 | .data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ | 716 | .data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ |
699 | - LOAD_OFFSET) { \ | 717 | - LOAD_OFFSET) { \ |
@@ -701,7 +719,9 @@ | |||
701 | *(.data..percpu..first) \ | 719 | *(.data..percpu..first) \ |
702 | . = ALIGN(PAGE_SIZE); \ | 720 | . = ALIGN(PAGE_SIZE); \ |
703 | *(.data..percpu..page_aligned) \ | 721 | *(.data..percpu..page_aligned) \ |
722 | . = ALIGN(cacheline); \ | ||
704 | *(.data..percpu..readmostly) \ | 723 | *(.data..percpu..readmostly) \ |
724 | . = ALIGN(cacheline); \ | ||
705 | *(.data..percpu) \ | 725 | *(.data..percpu) \ |
706 | *(.data..percpu..shared_aligned) \ | 726 | *(.data..percpu..shared_aligned) \ |
707 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ | 727 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ |
@@ -710,18 +730,18 @@ | |||
710 | 730 | ||
711 | /** | 731 | /** |
712 | * PERCPU - define output section for percpu area, simple version | 732 | * PERCPU - define output section for percpu area, simple version |
733 | * @cacheline: cacheline size | ||
713 | * @align: required alignment | 734 | * @align: required alignment |
714 | * | 735 | * |
715 | * Align to @align and outputs output section for percpu area. This | 736 | * Align to @align and outputs output section for percpu area. This macro |
716 | * macro doesn't maniuplate @vaddr or @phdr and __per_cpu_load and | 737 | * doesn't manipulate @vaddr or @phdr and __per_cpu_load and |
717 | * __per_cpu_start will be identical. | 738 | * __per_cpu_start will be identical. |
718 | * | 739 | * |
719 | * This macro is equivalent to ALIGN(align); PERCPU_VADDR( , ) except | 740 | * This macro is equivalent to ALIGN(@align); PERCPU_VADDR(@cacheline,,) |
720 | * that __per_cpu_load is defined as a relative symbol against | 741 | * except that __per_cpu_load is defined as a relative symbol against |
721 | * .data..percpu which is required for relocatable x86_32 | 742 | * .data..percpu which is required for relocatable x86_32 configuration. |
722 | * configuration. | ||
723 | */ | 743 | */ |
724 | #define PERCPU(align) \ | 744 | #define PERCPU(cacheline, align) \ |
725 | . = ALIGN(align); \ | 745 | . = ALIGN(align); \ |
726 | .data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \ | 746 | .data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \ |
727 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ | 747 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ |
@@ -729,7 +749,9 @@ | |||
729 | *(.data..percpu..first) \ | 749 | *(.data..percpu..first) \ |
730 | . = ALIGN(PAGE_SIZE); \ | 750 | . = ALIGN(PAGE_SIZE); \ |
731 | *(.data..percpu..page_aligned) \ | 751 | *(.data..percpu..page_aligned) \ |
752 | . = ALIGN(cacheline); \ | ||
732 | *(.data..percpu..readmostly) \ | 753 | *(.data..percpu..readmostly) \ |
754 | . = ALIGN(cacheline); \ | ||
733 | *(.data..percpu) \ | 755 | *(.data..percpu) \ |
734 | *(.data..percpu..shared_aligned) \ | 756 | *(.data..percpu..shared_aligned) \ |
735 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ | 757 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index a4694c610330..348843b80150 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1101,7 +1101,7 @@ struct drm_device { | |||
1101 | struct platform_device *platformdev; /**< Platform device struture */ | 1101 | struct platform_device *platformdev; /**< Platform device struture */ |
1102 | 1102 | ||
1103 | struct drm_sg_mem *sg; /**< Scatter gather memory */ | 1103 | struct drm_sg_mem *sg; /**< Scatter gather memory */ |
1104 | int num_crtcs; /**< Number of CRTCs on this device */ | 1104 | unsigned int num_crtcs; /**< Number of CRTCs on this device */ |
1105 | void *dev_private; /**< device private data */ | 1105 | void *dev_private; /**< device private data */ |
1106 | void *mm_private; | 1106 | void *mm_private; |
1107 | struct address_space *dev_mapping; | 1107 | struct address_space *dev_mapping; |
@@ -1367,7 +1367,7 @@ extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq); | |||
1367 | extern u32 drm_vblank_count(struct drm_device *dev, int crtc); | 1367 | extern u32 drm_vblank_count(struct drm_device *dev, int crtc); |
1368 | extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc, | 1368 | extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc, |
1369 | struct timeval *vblanktime); | 1369 | struct timeval *vblanktime); |
1370 | extern void drm_handle_vblank(struct drm_device *dev, int crtc); | 1370 | extern bool drm_handle_vblank(struct drm_device *dev, int crtc); |
1371 | extern int drm_vblank_get(struct drm_device *dev, int crtc); | 1371 | extern int drm_vblank_get(struct drm_device *dev, int crtc); |
1372 | extern void drm_vblank_put(struct drm_device *dev, int crtc); | 1372 | extern void drm_vblank_put(struct drm_device *dev, int crtc); |
1373 | extern void drm_vblank_off(struct drm_device *dev, int crtc); | 1373 | extern void drm_vblank_off(struct drm_device *dev, int crtc); |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index acd7fade160d..801be59f4f15 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -275,6 +275,7 @@ struct drm_pending_vblank_event; | |||
275 | 275 | ||
276 | /** | 276 | /** |
277 | * drm_crtc_funcs - control CRTCs for a given device | 277 | * drm_crtc_funcs - control CRTCs for a given device |
278 | * @reset: reset CRTC after state has been invalidate (e.g. resume) | ||
278 | * @dpms: control display power levels | 279 | * @dpms: control display power levels |
279 | * @save: save CRTC state | 280 | * @save: save CRTC state |
280 | * @resore: restore CRTC state | 281 | * @resore: restore CRTC state |
@@ -302,6 +303,8 @@ struct drm_crtc_funcs { | |||
302 | void (*save)(struct drm_crtc *crtc); /* suspend? */ | 303 | void (*save)(struct drm_crtc *crtc); /* suspend? */ |
303 | /* Restore CRTC state */ | 304 | /* Restore CRTC state */ |
304 | void (*restore)(struct drm_crtc *crtc); /* resume? */ | 305 | void (*restore)(struct drm_crtc *crtc); /* resume? */ |
306 | /* Reset CRTC state */ | ||
307 | void (*reset)(struct drm_crtc *crtc); | ||
305 | 308 | ||
306 | /* cursor controls */ | 309 | /* cursor controls */ |
307 | int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv, | 310 | int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv, |
@@ -379,6 +382,7 @@ struct drm_crtc { | |||
379 | * @dpms: set power state (see drm_crtc_funcs above) | 382 | * @dpms: set power state (see drm_crtc_funcs above) |
380 | * @save: save connector state | 383 | * @save: save connector state |
381 | * @restore: restore connector state | 384 | * @restore: restore connector state |
385 | * @reset: reset connector after state has been invalidate (e.g. resume) | ||
382 | * @mode_valid: is this mode valid on the given connector? | 386 | * @mode_valid: is this mode valid on the given connector? |
383 | * @mode_fixup: try to fixup proposed mode for this connector | 387 | * @mode_fixup: try to fixup proposed mode for this connector |
384 | * @mode_set: set this mode | 388 | * @mode_set: set this mode |
@@ -396,6 +400,7 @@ struct drm_connector_funcs { | |||
396 | void (*dpms)(struct drm_connector *connector, int mode); | 400 | void (*dpms)(struct drm_connector *connector, int mode); |
397 | void (*save)(struct drm_connector *connector); | 401 | void (*save)(struct drm_connector *connector); |
398 | void (*restore)(struct drm_connector *connector); | 402 | void (*restore)(struct drm_connector *connector); |
403 | void (*reset)(struct drm_connector *connector); | ||
399 | 404 | ||
400 | /* Check to see if anything is attached to the connector. | 405 | /* Check to see if anything is attached to the connector. |
401 | * @force is set to false whilst polling, true when checking the | 406 | * @force is set to false whilst polling, true when checking the |
@@ -413,6 +418,7 @@ struct drm_connector_funcs { | |||
413 | }; | 418 | }; |
414 | 419 | ||
415 | struct drm_encoder_funcs { | 420 | struct drm_encoder_funcs { |
421 | void (*reset)(struct drm_encoder *encoder); | ||
416 | void (*destroy)(struct drm_encoder *encoder); | 422 | void (*destroy)(struct drm_encoder *encoder); |
417 | }; | 423 | }; |
418 | 424 | ||
@@ -656,6 +662,7 @@ extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev, | |||
656 | struct drm_display_mode *mode); | 662 | struct drm_display_mode *mode); |
657 | extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode); | 663 | extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode); |
658 | extern void drm_mode_config_init(struct drm_device *dev); | 664 | extern void drm_mode_config_init(struct drm_device *dev); |
665 | extern void drm_mode_config_reset(struct drm_device *dev); | ||
659 | extern void drm_mode_config_cleanup(struct drm_device *dev); | 666 | extern void drm_mode_config_cleanup(struct drm_device *dev); |
660 | extern void drm_mode_set_name(struct drm_display_mode *mode); | 667 | extern void drm_mode_set_name(struct drm_display_mode *mode); |
661 | extern bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2); | 668 | extern bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2); |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index fe29ae328bd9..5ff1194dc2ea 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -28,7 +28,6 @@ | |||
28 | {0x1002, 0x4156, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \ | 28 | {0x1002, 0x4156, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \ |
29 | {0x1002, 0x4237, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP}, \ | 29 | {0x1002, 0x4237, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP}, \ |
30 | {0x1002, 0x4242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \ | 30 | {0x1002, 0x4242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \ |
31 | {0x1002, 0x4243, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \ | ||
32 | {0x1002, 0x4336, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ | 31 | {0x1002, 0x4336, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ |
33 | {0x1002, 0x4337, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ | 32 | {0x1002, 0x4337, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ |
34 | {0x1002, 0x4437, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ | 33 | {0x1002, 0x4437, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index e95a86b8b689..e5c607a02d57 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -907,6 +907,7 @@ struct drm_radeon_cs { | |||
907 | #define RADEON_INFO_TILING_CONFIG 0x06 | 907 | #define RADEON_INFO_TILING_CONFIG 0x06 |
908 | #define RADEON_INFO_WANT_HYPERZ 0x07 | 908 | #define RADEON_INFO_WANT_HYPERZ 0x07 |
909 | #define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */ | 909 | #define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */ |
910 | #define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */ | ||
910 | 911 | ||
911 | struct drm_radeon_info { | 912 | struct drm_radeon_info { |
912 | uint32_t request; | 913 | uint32_t request; |
diff --git a/include/keys/rxrpc-type.h b/include/keys/rxrpc-type.h index 5cb86c307f5d..fc4875433817 100644 --- a/include/keys/rxrpc-type.h +++ b/include/keys/rxrpc-type.h | |||
@@ -99,7 +99,6 @@ struct rxrpc_key_token { | |||
99 | * structure of raw payloads passed to add_key() or instantiate key | 99 | * structure of raw payloads passed to add_key() or instantiate key |
100 | */ | 100 | */ |
101 | struct rxrpc_key_data_v1 { | 101 | struct rxrpc_key_data_v1 { |
102 | u32 kif_version; /* 1 */ | ||
103 | u16 security_index; | 102 | u16 security_index; |
104 | u16 ticket_length; | 103 | u16 ticket_length; |
105 | u32 expiry; /* time_t */ | 104 | u32 expiry; /* time_t */ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 2296d8b1931f..b0ada6f37dd6 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | header-y += byteorder/ | 1 | header-y += byteorder/ |
2 | header-y += can/ | 2 | header-y += can/ |
3 | header-y += caif/ | ||
3 | header-y += dvb/ | 4 | header-y += dvb/ |
4 | header-y += hdlc/ | 5 | header-y += hdlc/ |
5 | header-y += isdn/ | 6 | header-y += isdn/ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 0c4929fa34d3..32df2b6ef0e0 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -89,6 +89,7 @@ enum { | |||
89 | ATA_ID_SPG = 98, | 89 | ATA_ID_SPG = 98, |
90 | ATA_ID_LBA_CAPACITY_2 = 100, | 90 | ATA_ID_LBA_CAPACITY_2 = 100, |
91 | ATA_ID_SECTOR_SIZE = 106, | 91 | ATA_ID_SECTOR_SIZE = 106, |
92 | ATA_ID_WWN = 108, | ||
92 | ATA_ID_LOGICAL_SECTOR_SIZE = 117, /* and 118 */ | 93 | ATA_ID_LOGICAL_SECTOR_SIZE = 117, /* and 118 */ |
93 | ATA_ID_LAST_LUN = 126, | 94 | ATA_ID_LAST_LUN = 126, |
94 | ATA_ID_DLF = 128, | 95 | ATA_ID_DLF = 128, |
@@ -103,6 +104,7 @@ enum { | |||
103 | ATA_ID_SERNO_LEN = 20, | 104 | ATA_ID_SERNO_LEN = 20, |
104 | ATA_ID_FW_REV_LEN = 8, | 105 | ATA_ID_FW_REV_LEN = 8, |
105 | ATA_ID_PROD_LEN = 40, | 106 | ATA_ID_PROD_LEN = 40, |
107 | ATA_ID_WWN_LEN = 8, | ||
106 | 108 | ||
107 | ATA_PCI_CTL_OFS = 2, | 109 | ATA_PCI_CTL_OFS = 2, |
108 | 110 | ||
@@ -598,42 +600,42 @@ static inline bool ata_id_has_dipm(const u16 *id) | |||
598 | } | 600 | } |
599 | 601 | ||
600 | 602 | ||
601 | static inline int ata_id_has_fua(const u16 *id) | 603 | static inline bool ata_id_has_fua(const u16 *id) |
602 | { | 604 | { |
603 | if ((id[ATA_ID_CFSSE] & 0xC000) != 0x4000) | 605 | if ((id[ATA_ID_CFSSE] & 0xC000) != 0x4000) |
604 | return 0; | 606 | return false; |
605 | return id[ATA_ID_CFSSE] & (1 << 6); | 607 | return id[ATA_ID_CFSSE] & (1 << 6); |
606 | } | 608 | } |
607 | 609 | ||
608 | static inline int ata_id_has_flush(const u16 *id) | 610 | static inline bool ata_id_has_flush(const u16 *id) |
609 | { | 611 | { |
610 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) | 612 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
611 | return 0; | 613 | return false; |
612 | return id[ATA_ID_COMMAND_SET_2] & (1 << 12); | 614 | return id[ATA_ID_COMMAND_SET_2] & (1 << 12); |
613 | } | 615 | } |
614 | 616 | ||
615 | static inline int ata_id_flush_enabled(const u16 *id) | 617 | static inline bool ata_id_flush_enabled(const u16 *id) |
616 | { | 618 | { |
617 | if (ata_id_has_flush(id) == 0) | 619 | if (ata_id_has_flush(id) == 0) |
618 | return 0; | 620 | return false; |
619 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) | 621 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
620 | return 0; | 622 | return false; |
621 | return id[ATA_ID_CFS_ENABLE_2] & (1 << 12); | 623 | return id[ATA_ID_CFS_ENABLE_2] & (1 << 12); |
622 | } | 624 | } |
623 | 625 | ||
624 | static inline int ata_id_has_flush_ext(const u16 *id) | 626 | static inline bool ata_id_has_flush_ext(const u16 *id) |
625 | { | 627 | { |
626 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) | 628 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
627 | return 0; | 629 | return false; |
628 | return id[ATA_ID_COMMAND_SET_2] & (1 << 13); | 630 | return id[ATA_ID_COMMAND_SET_2] & (1 << 13); |
629 | } | 631 | } |
630 | 632 | ||
631 | static inline int ata_id_flush_ext_enabled(const u16 *id) | 633 | static inline bool ata_id_flush_ext_enabled(const u16 *id) |
632 | { | 634 | { |
633 | if (ata_id_has_flush_ext(id) == 0) | 635 | if (ata_id_has_flush_ext(id) == 0) |
634 | return 0; | 636 | return false; |
635 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) | 637 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
636 | return 0; | 638 | return false; |
637 | /* | 639 | /* |
638 | * some Maxtor disks have bit 13 defined incorrectly | 640 | * some Maxtor disks have bit 13 defined incorrectly |
639 | * so check bit 10 too | 641 | * so check bit 10 too |
@@ -686,64 +688,64 @@ static inline u16 ata_id_logical_sector_offset(const u16 *id, | |||
686 | return 0; | 688 | return 0; |
687 | } | 689 | } |
688 | 690 | ||
689 | static inline int ata_id_has_lba48(const u16 *id) | 691 | static inline bool ata_id_has_lba48(const u16 *id) |
690 | { | 692 | { |
691 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) | 693 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
692 | return 0; | 694 | return false; |
693 | if (!ata_id_u64(id, ATA_ID_LBA_CAPACITY_2)) | 695 | if (!ata_id_u64(id, ATA_ID_LBA_CAPACITY_2)) |
694 | return 0; | 696 | return false; |
695 | return id[ATA_ID_COMMAND_SET_2] & (1 << 10); | 697 | return id[ATA_ID_COMMAND_SET_2] & (1 << 10); |
696 | } | 698 | } |
697 | 699 | ||
698 | static inline int ata_id_lba48_enabled(const u16 *id) | 700 | static inline bool ata_id_lba48_enabled(const u16 *id) |
699 | { | 701 | { |
700 | if (ata_id_has_lba48(id) == 0) | 702 | if (ata_id_has_lba48(id) == 0) |
701 | return 0; | 703 | return false; |
702 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) | 704 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
703 | return 0; | 705 | return false; |
704 | return id[ATA_ID_CFS_ENABLE_2] & (1 << 10); | 706 | return id[ATA_ID_CFS_ENABLE_2] & (1 << 10); |
705 | } | 707 | } |
706 | 708 | ||
707 | static inline int ata_id_hpa_enabled(const u16 *id) | 709 | static inline bool ata_id_hpa_enabled(const u16 *id) |
708 | { | 710 | { |
709 | /* Yes children, word 83 valid bits cover word 82 data */ | 711 | /* Yes children, word 83 valid bits cover word 82 data */ |
710 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) | 712 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
711 | return 0; | 713 | return false; |
712 | /* And 87 covers 85-87 */ | 714 | /* And 87 covers 85-87 */ |
713 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) | 715 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
714 | return 0; | 716 | return false; |
715 | /* Check command sets enabled as well as supported */ | 717 | /* Check command sets enabled as well as supported */ |
716 | if ((id[ATA_ID_CFS_ENABLE_1] & (1 << 10)) == 0) | 718 | if ((id[ATA_ID_CFS_ENABLE_1] & (1 << 10)) == 0) |
717 | return 0; | 719 | return false; |
718 | return id[ATA_ID_COMMAND_SET_1] & (1 << 10); | 720 | return id[ATA_ID_COMMAND_SET_1] & (1 << 10); |
719 | } | 721 | } |
720 | 722 | ||
721 | static inline int ata_id_has_wcache(const u16 *id) | 723 | static inline bool ata_id_has_wcache(const u16 *id) |
722 | { | 724 | { |
723 | /* Yes children, word 83 valid bits cover word 82 data */ | 725 | /* Yes children, word 83 valid bits cover word 82 data */ |
724 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) | 726 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
725 | return 0; | 727 | return false; |
726 | return id[ATA_ID_COMMAND_SET_1] & (1 << 5); | 728 | return id[ATA_ID_COMMAND_SET_1] & (1 << 5); |
727 | } | 729 | } |
728 | 730 | ||
729 | static inline int ata_id_has_pm(const u16 *id) | 731 | static inline bool ata_id_has_pm(const u16 *id) |
730 | { | 732 | { |
731 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) | 733 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
732 | return 0; | 734 | return false; |
733 | return id[ATA_ID_COMMAND_SET_1] & (1 << 3); | 735 | return id[ATA_ID_COMMAND_SET_1] & (1 << 3); |
734 | } | 736 | } |
735 | 737 | ||
736 | static inline int ata_id_rahead_enabled(const u16 *id) | 738 | static inline bool ata_id_rahead_enabled(const u16 *id) |
737 | { | 739 | { |
738 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) | 740 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
739 | return 0; | 741 | return false; |
740 | return id[ATA_ID_CFS_ENABLE_1] & (1 << 6); | 742 | return id[ATA_ID_CFS_ENABLE_1] & (1 << 6); |
741 | } | 743 | } |
742 | 744 | ||
743 | static inline int ata_id_wcache_enabled(const u16 *id) | 745 | static inline bool ata_id_wcache_enabled(const u16 *id) |
744 | { | 746 | { |
745 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) | 747 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
746 | return 0; | 748 | return false; |
747 | return id[ATA_ID_CFS_ENABLE_1] & (1 << 5); | 749 | return id[ATA_ID_CFS_ENABLE_1] & (1 << 5); |
748 | } | 750 | } |
749 | 751 | ||
@@ -773,7 +775,7 @@ static inline unsigned int ata_id_major_version(const u16 *id) | |||
773 | return mver; | 775 | return mver; |
774 | } | 776 | } |
775 | 777 | ||
776 | static inline int ata_id_is_sata(const u16 *id) | 778 | static inline bool ata_id_is_sata(const u16 *id) |
777 | { | 779 | { |
778 | /* | 780 | /* |
779 | * See if word 93 is 0 AND drive is at least ATA-5 compatible | 781 | * See if word 93 is 0 AND drive is at least ATA-5 compatible |
@@ -782,37 +784,40 @@ static inline int ata_id_is_sata(const u16 *id) | |||
782 | * 0x0000 and 0xffff along with the earlier ATA revisions... | 784 | * 0x0000 and 0xffff along with the earlier ATA revisions... |
783 | */ | 785 | */ |
784 | if (id[ATA_ID_HW_CONFIG] == 0 && (short)id[ATA_ID_MAJOR_VER] >= 0x0020) | 786 | if (id[ATA_ID_HW_CONFIG] == 0 && (short)id[ATA_ID_MAJOR_VER] >= 0x0020) |
785 | return 1; | 787 | return true; |
786 | return 0; | 788 | return false; |
787 | } | 789 | } |
788 | 790 | ||
789 | static inline int ata_id_has_tpm(const u16 *id) | 791 | static inline bool ata_id_has_tpm(const u16 *id) |
790 | { | 792 | { |
791 | /* The TPM bits are only valid on ATA8 */ | 793 | /* The TPM bits are only valid on ATA8 */ |
792 | if (ata_id_major_version(id) < 8) | 794 | if (ata_id_major_version(id) < 8) |
793 | return 0; | 795 | return false; |
794 | if ((id[48] & 0xC000) != 0x4000) | 796 | if ((id[48] & 0xC000) != 0x4000) |
795 | return 0; | 797 | return false; |
796 | return id[48] & (1 << 0); | 798 | return id[48] & (1 << 0); |
797 | } | 799 | } |
798 | 800 | ||
799 | static inline int ata_id_has_dword_io(const u16 *id) | 801 | static inline bool ata_id_has_dword_io(const u16 *id) |
800 | { | 802 | { |
801 | /* ATA 8 reuses this flag for "trusted" computing */ | 803 | /* ATA 8 reuses this flag for "trusted" computing */ |
802 | if (ata_id_major_version(id) > 7) | 804 | if (ata_id_major_version(id) > 7) |
803 | return 0; | 805 | return false; |
804 | if (id[ATA_ID_DWORD_IO] & (1 << 0)) | 806 | return id[ATA_ID_DWORD_IO] & (1 << 0); |
805 | return 1; | ||
806 | return 0; | ||
807 | } | 807 | } |
808 | 808 | ||
809 | static inline int ata_id_has_unload(const u16 *id) | 809 | static inline bool ata_id_has_unload(const u16 *id) |
810 | { | 810 | { |
811 | if (ata_id_major_version(id) >= 7 && | 811 | if (ata_id_major_version(id) >= 7 && |
812 | (id[ATA_ID_CFSSE] & 0xC000) == 0x4000 && | 812 | (id[ATA_ID_CFSSE] & 0xC000) == 0x4000 && |
813 | id[ATA_ID_CFSSE] & (1 << 13)) | 813 | id[ATA_ID_CFSSE] & (1 << 13)) |
814 | return 1; | 814 | return true; |
815 | return 0; | 815 | return false; |
816 | } | ||
817 | |||
818 | static inline bool ata_id_has_wwn(const u16 *id) | ||
819 | { | ||
820 | return (id[ATA_ID_CSF_DEFAULT] & 0xC100) == 0x4100; | ||
816 | } | 821 | } |
817 | 822 | ||
818 | static inline int ata_id_form_factor(const u16 *id) | 823 | static inline int ata_id_form_factor(const u16 *id) |
@@ -843,25 +848,25 @@ static inline int ata_id_rotation_rate(const u16 *id) | |||
843 | return val; | 848 | return val; |
844 | } | 849 | } |
845 | 850 | ||
846 | static inline int ata_id_has_trim(const u16 *id) | 851 | static inline bool ata_id_has_trim(const u16 *id) |
847 | { | 852 | { |
848 | if (ata_id_major_version(id) >= 7 && | 853 | if (ata_id_major_version(id) >= 7 && |
849 | (id[ATA_ID_DATA_SET_MGMT] & 1)) | 854 | (id[ATA_ID_DATA_SET_MGMT] & 1)) |
850 | return 1; | 855 | return true; |
851 | return 0; | 856 | return false; |
852 | } | 857 | } |
853 | 858 | ||
854 | static inline int ata_id_has_zero_after_trim(const u16 *id) | 859 | static inline bool ata_id_has_zero_after_trim(const u16 *id) |
855 | { | 860 | { |
856 | /* DSM supported, deterministic read, and read zero after trim set */ | 861 | /* DSM supported, deterministic read, and read zero after trim set */ |
857 | if (ata_id_has_trim(id) && | 862 | if (ata_id_has_trim(id) && |
858 | (id[ATA_ID_ADDITIONAL_SUPP] & 0x4020) == 0x4020) | 863 | (id[ATA_ID_ADDITIONAL_SUPP] & 0x4020) == 0x4020) |
859 | return 1; | 864 | return true; |
860 | 865 | ||
861 | return 0; | 866 | return false; |
862 | } | 867 | } |
863 | 868 | ||
864 | static inline int ata_id_current_chs_valid(const u16 *id) | 869 | static inline bool ata_id_current_chs_valid(const u16 *id) |
865 | { | 870 | { |
866 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 871 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
867 | has not been issued to the device then the values of | 872 | has not been issued to the device then the values of |
@@ -873,11 +878,11 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
873 | id[ATA_ID_CUR_SECTORS]; /* sectors in current translation */ | 878 | id[ATA_ID_CUR_SECTORS]; /* sectors in current translation */ |
874 | } | 879 | } |
875 | 880 | ||
876 | static inline int ata_id_is_cfa(const u16 *id) | 881 | static inline bool ata_id_is_cfa(const u16 *id) |
877 | { | 882 | { |
878 | if ((id[ATA_ID_CONFIG] == 0x848A) || /* Traditional CF */ | 883 | if ((id[ATA_ID_CONFIG] == 0x848A) || /* Traditional CF */ |
879 | (id[ATA_ID_CONFIG] == 0x844A)) /* Delkin Devices CF */ | 884 | (id[ATA_ID_CONFIG] == 0x844A)) /* Delkin Devices CF */ |
880 | return 1; | 885 | return true; |
881 | /* | 886 | /* |
882 | * CF specs don't require specific value in the word 0 anymore and yet | 887 | * CF specs don't require specific value in the word 0 anymore and yet |
883 | * they forbid to report the ATA version in the word 80 and require the | 888 | * they forbid to report the ATA version in the word 80 and require the |
@@ -886,44 +891,40 @@ static inline int ata_id_is_cfa(const u16 *id) | |||
886 | * and while those that don't indicate CFA feature support need some | 891 | * and while those that don't indicate CFA feature support need some |
887 | * sort of quirk list, it seems impractical for the ones that do... | 892 | * sort of quirk list, it seems impractical for the ones that do... |
888 | */ | 893 | */ |
889 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004) | 894 | return (id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004; |
890 | return 1; | ||
891 | return 0; | ||
892 | } | 895 | } |
893 | 896 | ||
894 | static inline int ata_id_is_ssd(const u16 *id) | 897 | static inline bool ata_id_is_ssd(const u16 *id) |
895 | { | 898 | { |
896 | return id[ATA_ID_ROT_SPEED] == 0x01; | 899 | return id[ATA_ID_ROT_SPEED] == 0x01; |
897 | } | 900 | } |
898 | 901 | ||
899 | static inline int ata_id_pio_need_iordy(const u16 *id, const u8 pio) | 902 | static inline bool ata_id_pio_need_iordy(const u16 *id, const u8 pio) |
900 | { | 903 | { |
901 | /* CF spec. r4.1 Table 22 says no IORDY on PIO5 and PIO6. */ | 904 | /* CF spec. r4.1 Table 22 says no IORDY on PIO5 and PIO6. */ |
902 | if (pio > 4 && ata_id_is_cfa(id)) | 905 | if (pio > 4 && ata_id_is_cfa(id)) |
903 | return 0; | 906 | return false; |
904 | /* For PIO3 and higher it is mandatory. */ | 907 | /* For PIO3 and higher it is mandatory. */ |
905 | if (pio > 2) | 908 | if (pio > 2) |
906 | return 1; | 909 | return true; |
907 | /* Turn it on when possible. */ | 910 | /* Turn it on when possible. */ |
908 | if (ata_id_has_iordy(id)) | 911 | return ata_id_has_iordy(id); |
909 | return 1; | ||
910 | return 0; | ||
911 | } | 912 | } |
912 | 913 | ||
913 | static inline int ata_drive_40wire(const u16 *dev_id) | 914 | static inline bool ata_drive_40wire(const u16 *dev_id) |
914 | { | 915 | { |
915 | if (ata_id_is_sata(dev_id)) | 916 | if (ata_id_is_sata(dev_id)) |
916 | return 0; /* SATA */ | 917 | return false; /* SATA */ |
917 | if ((dev_id[ATA_ID_HW_CONFIG] & 0xE000) == 0x6000) | 918 | if ((dev_id[ATA_ID_HW_CONFIG] & 0xE000) == 0x6000) |
918 | return 0; /* 80 wire */ | 919 | return false; /* 80 wire */ |
919 | return 1; | 920 | return true; |
920 | } | 921 | } |
921 | 922 | ||
922 | static inline int ata_drive_40wire_relaxed(const u16 *dev_id) | 923 | static inline bool ata_drive_40wire_relaxed(const u16 *dev_id) |
923 | { | 924 | { |
924 | if ((dev_id[ATA_ID_HW_CONFIG] & 0x2000) == 0x2000) | 925 | if ((dev_id[ATA_ID_HW_CONFIG] & 0x2000) == 0x2000) |
925 | return 0; /* 80 wire */ | 926 | return false; /* 80 wire */ |
926 | return 1; | 927 | return true; |
927 | } | 928 | } |
928 | 929 | ||
929 | static inline int atapi_cdb_len(const u16 *dev_id) | 930 | static inline int atapi_cdb_len(const u16 *dev_id) |
@@ -936,12 +937,12 @@ static inline int atapi_cdb_len(const u16 *dev_id) | |||
936 | } | 937 | } |
937 | } | 938 | } |
938 | 939 | ||
939 | static inline int atapi_command_packet_set(const u16 *dev_id) | 940 | static inline bool atapi_command_packet_set(const u16 *dev_id) |
940 | { | 941 | { |
941 | return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f; | 942 | return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f; |
942 | } | 943 | } |
943 | 944 | ||
944 | static inline int atapi_id_dmadir(const u16 *dev_id) | 945 | static inline bool atapi_id_dmadir(const u16 *dev_id) |
945 | { | 946 | { |
946 | return ata_id_major_version(dev_id) >= 7 && (dev_id[62] & 0x8000); | 947 | return ata_id_major_version(dev_id) >= 7 && (dev_id[62] & 0x8000); |
947 | } | 948 | } |
@@ -954,13 +955,13 @@ static inline int atapi_id_dmadir(const u16 *dev_id) | |||
954 | * | 955 | * |
955 | * It is called only once for each device. | 956 | * It is called only once for each device. |
956 | */ | 957 | */ |
957 | static inline int ata_id_is_lba_capacity_ok(u16 *id) | 958 | static inline bool ata_id_is_lba_capacity_ok(u16 *id) |
958 | { | 959 | { |
959 | unsigned long lba_sects, chs_sects, head, tail; | 960 | unsigned long lba_sects, chs_sects, head, tail; |
960 | 961 | ||
961 | /* No non-LBA info .. so valid! */ | 962 | /* No non-LBA info .. so valid! */ |
962 | if (id[ATA_ID_CYLS] == 0) | 963 | if (id[ATA_ID_CYLS] == 0) |
963 | return 1; | 964 | return true; |
964 | 965 | ||
965 | lba_sects = ata_id_u32(id, ATA_ID_LBA_CAPACITY); | 966 | lba_sects = ata_id_u32(id, ATA_ID_LBA_CAPACITY); |
966 | 967 | ||
@@ -975,13 +976,13 @@ static inline int ata_id_is_lba_capacity_ok(u16 *id) | |||
975 | id[ATA_ID_SECTORS] == 63 && | 976 | id[ATA_ID_SECTORS] == 63 && |
976 | (id[ATA_ID_HEADS] == 15 || id[ATA_ID_HEADS] == 16) && | 977 | (id[ATA_ID_HEADS] == 15 || id[ATA_ID_HEADS] == 16) && |
977 | (lba_sects >= 16383 * 63 * id[ATA_ID_HEADS])) | 978 | (lba_sects >= 16383 * 63 * id[ATA_ID_HEADS])) |
978 | return 1; | 979 | return true; |
979 | 980 | ||
980 | chs_sects = id[ATA_ID_CYLS] * id[ATA_ID_HEADS] * id[ATA_ID_SECTORS]; | 981 | chs_sects = id[ATA_ID_CYLS] * id[ATA_ID_HEADS] * id[ATA_ID_SECTORS]; |
981 | 982 | ||
982 | /* perform a rough sanity check on lba_sects: within 10% is OK */ | 983 | /* perform a rough sanity check on lba_sects: within 10% is OK */ |
983 | if (lba_sects - chs_sects < chs_sects/10) | 984 | if (lba_sects - chs_sects < chs_sects/10) |
984 | return 1; | 985 | return true; |
985 | 986 | ||
986 | /* some drives have the word order reversed */ | 987 | /* some drives have the word order reversed */ |
987 | head = (lba_sects >> 16) & 0xffff; | 988 | head = (lba_sects >> 16) & 0xffff; |
@@ -990,10 +991,10 @@ static inline int ata_id_is_lba_capacity_ok(u16 *id) | |||
990 | 991 | ||
991 | if (lba_sects - chs_sects < chs_sects/10) { | 992 | if (lba_sects - chs_sects < chs_sects/10) { |
992 | *(__le32 *)&id[ATA_ID_LBA_CAPACITY] = __cpu_to_le32(lba_sects); | 993 | *(__le32 *)&id[ATA_ID_LBA_CAPACITY] = __cpu_to_le32(lba_sects); |
993 | return 1; /* LBA capacity is (now) good */ | 994 | return true; /* LBA capacity is (now) good */ |
994 | } | 995 | } |
995 | 996 | ||
996 | return 0; /* LBA capacity value may be bad */ | 997 | return false; /* LBA capacity value may be bad */ |
997 | } | 998 | } |
998 | 999 | ||
999 | static inline void ata_id_to_hd_driveid(u16 *id) | 1000 | static inline void ata_id_to_hd_driveid(u16 *id) |
@@ -1051,19 +1052,19 @@ static inline int is_multi_taskfile(struct ata_taskfile *tf) | |||
1051 | (tf->command == ATA_CMD_WRITE_MULTI_FUA_EXT); | 1052 | (tf->command == ATA_CMD_WRITE_MULTI_FUA_EXT); |
1052 | } | 1053 | } |
1053 | 1054 | ||
1054 | static inline int ata_ok(u8 status) | 1055 | static inline bool ata_ok(u8 status) |
1055 | { | 1056 | { |
1056 | return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR)) | 1057 | return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR)) |
1057 | == ATA_DRDY); | 1058 | == ATA_DRDY); |
1058 | } | 1059 | } |
1059 | 1060 | ||
1060 | static inline int lba_28_ok(u64 block, u32 n_block) | 1061 | static inline bool lba_28_ok(u64 block, u32 n_block) |
1061 | { | 1062 | { |
1062 | /* check the ending block number: must be LESS THAN 0x0fffffff */ | 1063 | /* check the ending block number: must be LESS THAN 0x0fffffff */ |
1063 | return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); | 1064 | return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); |
1064 | } | 1065 | } |
1065 | 1066 | ||
1066 | static inline int lba_48_ok(u64 block, u32 n_block) | 1067 | static inline bool lba_48_ok(u64 block, u32 n_block) |
1067 | { | 1068 | { |
1068 | /* check the ending block number */ | 1069 | /* check the ending block number */ |
1069 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); | 1070 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4d18ff34670a..d5063e1b5555 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -699,7 +699,7 @@ extern void blk_start_queue(struct request_queue *q); | |||
699 | extern void blk_stop_queue(struct request_queue *q); | 699 | extern void blk_stop_queue(struct request_queue *q); |
700 | extern void blk_sync_queue(struct request_queue *q); | 700 | extern void blk_sync_queue(struct request_queue *q); |
701 | extern void __blk_stop_queue(struct request_queue *q); | 701 | extern void __blk_stop_queue(struct request_queue *q); |
702 | extern void __blk_run_queue(struct request_queue *); | 702 | extern void __blk_run_queue(struct request_queue *q, bool force_kblockd); |
703 | extern void blk_run_queue(struct request_queue *); | 703 | extern void blk_run_queue(struct request_queue *); |
704 | extern int blk_rq_map_user(struct request_queue *, struct request *, | 704 | extern int blk_rq_map_user(struct request_queue *, struct request *, |
705 | struct rq_map_data *, void __user *, unsigned long, | 705 | struct rq_map_data *, void __user *, unsigned long, |
@@ -1088,7 +1088,6 @@ static inline void put_dev_sector(Sector p) | |||
1088 | 1088 | ||
1089 | struct work_struct; | 1089 | struct work_struct; |
1090 | int kblockd_schedule_work(struct request_queue *q, struct work_struct *work); | 1090 | int kblockd_schedule_work(struct request_queue *q, struct work_struct *work); |
1091 | int kblockd_schedule_delayed_work(struct request_queue *q, struct delayed_work *dwork, unsigned long delay); | ||
1092 | 1091 | ||
1093 | #ifdef CONFIG_BLK_CGROUP | 1092 | #ifdef CONFIG_BLK_CGROUP |
1094 | /* | 1093 | /* |
@@ -1136,7 +1135,6 @@ static inline uint64_t rq_io_start_time_ns(struct request *req) | |||
1136 | extern int blk_throtl_init(struct request_queue *q); | 1135 | extern int blk_throtl_init(struct request_queue *q); |
1137 | extern void blk_throtl_exit(struct request_queue *q); | 1136 | extern void blk_throtl_exit(struct request_queue *q); |
1138 | extern int blk_throtl_bio(struct request_queue *q, struct bio **bio); | 1137 | extern int blk_throtl_bio(struct request_queue *q, struct bio **bio); |
1139 | extern void throtl_schedule_delayed_work(struct request_queue *q, unsigned long delay); | ||
1140 | extern void throtl_shutdown_timer_wq(struct request_queue *q); | 1138 | extern void throtl_shutdown_timer_wq(struct request_queue *q); |
1141 | #else /* CONFIG_BLK_DEV_THROTTLING */ | 1139 | #else /* CONFIG_BLK_DEV_THROTTLING */ |
1142 | static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio) | 1140 | static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio) |
@@ -1146,7 +1144,6 @@ static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio) | |||
1146 | 1144 | ||
1147 | static inline int blk_throtl_init(struct request_queue *q) { return 0; } | 1145 | static inline int blk_throtl_init(struct request_queue *q) { return 0; } |
1148 | static inline int blk_throtl_exit(struct request_queue *q) { return 0; } | 1146 | static inline int blk_throtl_exit(struct request_queue *q) { return 0; } |
1149 | static inline void throtl_schedule_delayed_work(struct request_queue *q, unsigned long delay) {} | ||
1150 | static inline void throtl_shutdown_timer_wq(struct request_queue *q) {} | 1147 | static inline void throtl_shutdown_timer_wq(struct request_queue *q) {} |
1151 | #endif /* CONFIG_BLK_DEV_THROTTLING */ | 1148 | #endif /* CONFIG_BLK_DEV_THROTTLING */ |
1152 | 1149 | ||
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 3395cf7130f5..b22fb0d3db0f 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -245,7 +245,6 @@ static inline int blk_cmd_buf_len(struct request *rq) | |||
245 | 245 | ||
246 | extern void blk_dump_cmd(char *buf, struct request *rq); | 246 | extern void blk_dump_cmd(char *buf, struct request *rq); |
247 | extern void blk_fill_rwbs(char *rwbs, u32 rw, int bytes); | 247 | extern void blk_fill_rwbs(char *rwbs, u32 rw, int bytes); |
248 | extern void blk_fill_rwbs_rq(char *rwbs, struct request *rq); | ||
249 | 248 | ||
250 | #endif /* CONFIG_EVENT_TRACING && CONFIG_BLOCK */ | 249 | #endif /* CONFIG_EVENT_TRACING && CONFIG_BLOCK */ |
251 | 250 | ||
diff --git a/include/linux/caif/Kbuild b/include/linux/caif/Kbuild new file mode 100644 index 000000000000..a9cf250689dc --- /dev/null +++ b/include/linux/caif/Kbuild | |||
@@ -0,0 +1,2 @@ | |||
1 | header-y += caif_socket.h | ||
2 | header-y += if_caif.h | ||
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index c3011beac30d..31d91a64838b 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
@@ -123,6 +123,7 @@ struct ceph_msg_pos { | |||
123 | #define SOCK_CLOSED 11 /* socket state changed to closed */ | 123 | #define SOCK_CLOSED 11 /* socket state changed to closed */ |
124 | #define OPENING 13 /* open connection w/ (possibly new) peer */ | 124 | #define OPENING 13 /* open connection w/ (possibly new) peer */ |
125 | #define DEAD 14 /* dead, about to kfree */ | 125 | #define DEAD 14 /* dead, about to kfree */ |
126 | #define BACKOFF 15 | ||
126 | 127 | ||
127 | /* | 128 | /* |
128 | * A single connection with another host. | 129 | * A single connection with another host. |
@@ -160,7 +161,6 @@ struct ceph_connection { | |||
160 | struct list_head out_queue; | 161 | struct list_head out_queue; |
161 | struct list_head out_sent; /* sending or sent but unacked */ | 162 | struct list_head out_sent; /* sending or sent but unacked */ |
162 | u64 out_seq; /* last message queued for send */ | 163 | u64 out_seq; /* last message queued for send */ |
163 | bool out_keepalive_pending; | ||
164 | 164 | ||
165 | u64 in_seq, in_seq_acked; /* last message received, acked */ | 165 | u64 in_seq, in_seq_acked; /* last message received, acked */ |
166 | 166 | ||
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index ce104e33cd22..e654fa239916 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -474,7 +474,8 @@ struct cgroup_subsys { | |||
474 | struct cgroup *old_cgrp, struct task_struct *tsk, | 474 | struct cgroup *old_cgrp, struct task_struct *tsk, |
475 | bool threadgroup); | 475 | bool threadgroup); |
476 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); | 476 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); |
477 | void (*exit)(struct cgroup_subsys *ss, struct task_struct *task); | 477 | void (*exit)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
478 | struct cgroup *old_cgrp, struct task_struct *task); | ||
478 | int (*populate)(struct cgroup_subsys *ss, | 479 | int (*populate)(struct cgroup_subsys *ss, |
479 | struct cgroup *cgrp); | 480 | struct cgroup *cgrp); |
480 | void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 481 | void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
@@ -626,6 +627,7 @@ bool css_is_ancestor(struct cgroup_subsys_state *cg, | |||
626 | /* Get id and depth of css */ | 627 | /* Get id and depth of css */ |
627 | unsigned short css_id(struct cgroup_subsys_state *css); | 628 | unsigned short css_id(struct cgroup_subsys_state *css); |
628 | unsigned short css_depth(struct cgroup_subsys_state *css); | 629 | unsigned short css_depth(struct cgroup_subsys_state *css); |
630 | struct cgroup_subsys_state *cgroup_css_from_dir(struct file *f, int id); | ||
629 | 631 | ||
630 | #else /* !CONFIG_CGROUPS */ | 632 | #else /* !CONFIG_CGROUPS */ |
631 | 633 | ||
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index ccefff02b6cb..cdbfcb8780ec 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h | |||
@@ -65,4 +65,8 @@ SUBSYS(net_cls) | |||
65 | SUBSYS(blkio) | 65 | SUBSYS(blkio) |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #ifdef CONFIG_CGROUP_PERF | ||
69 | SUBSYS(perf) | ||
70 | #endif | ||
71 | |||
68 | /* */ | 72 | /* */ |
diff --git a/include/linux/console.h b/include/linux/console.h index 9774fe6a1a97..7453cfd593c8 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -139,9 +139,9 @@ extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_n | |||
139 | extern void register_console(struct console *); | 139 | extern void register_console(struct console *); |
140 | extern int unregister_console(struct console *); | 140 | extern int unregister_console(struct console *); |
141 | extern struct console *console_drivers; | 141 | extern struct console *console_drivers; |
142 | extern void acquire_console_sem(void); | 142 | extern void console_lock(void); |
143 | extern int try_acquire_console_sem(void); | 143 | extern int console_trylock(void); |
144 | extern void release_console_sem(void); | 144 | extern void console_unlock(void); |
145 | extern void console_conditional_schedule(void); | 145 | extern void console_conditional_schedule(void); |
146 | extern void console_unblank(void); | 146 | extern void console_unblank(void); |
147 | extern struct tty_driver *console_device(int *); | 147 | extern struct tty_driver *console_device(int *); |
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index 68cd248f6d3e..66900e3c6eb1 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h | |||
@@ -101,8 +101,8 @@ struct ieee_pfc { | |||
101 | */ | 101 | */ |
102 | struct dcb_app { | 102 | struct dcb_app { |
103 | __u8 selector; | 103 | __u8 selector; |
104 | __u32 protocol; | ||
105 | __u8 priority; | 104 | __u8 priority; |
105 | __u16 protocol; | ||
106 | }; | 106 | }; |
107 | 107 | ||
108 | struct dcbmsg { | 108 | struct dcbmsg { |
diff --git a/include/linux/debugobjects.h b/include/linux/debugobjects.h index 597692f1fc8d..65970b811e22 100644 --- a/include/linux/debugobjects.h +++ b/include/linux/debugobjects.h | |||
@@ -34,7 +34,10 @@ struct debug_obj { | |||
34 | 34 | ||
35 | /** | 35 | /** |
36 | * struct debug_obj_descr - object type specific debug description structure | 36 | * struct debug_obj_descr - object type specific debug description structure |
37 | * | ||
37 | * @name: name of the object typee | 38 | * @name: name of the object typee |
39 | * @debug_hint: function returning address, which have associated | ||
40 | * kernel symbol, to allow identify the object | ||
38 | * @fixup_init: fixup function, which is called when the init check | 41 | * @fixup_init: fixup function, which is called when the init check |
39 | * fails | 42 | * fails |
40 | * @fixup_activate: fixup function, which is called when the activate check | 43 | * @fixup_activate: fixup function, which is called when the activate check |
@@ -46,7 +49,7 @@ struct debug_obj { | |||
46 | */ | 49 | */ |
47 | struct debug_obj_descr { | 50 | struct debug_obj_descr { |
48 | const char *name; | 51 | const char *name; |
49 | 52 | void *(*debug_hint) (void *addr); | |
50 | int (*fixup_init) (void *addr, enum debug_obj_state state); | 53 | int (*fixup_init) (void *addr, enum debug_obj_state state); |
51 | int (*fixup_activate) (void *addr, enum debug_obj_state state); | 54 | int (*fixup_activate) (void *addr, enum debug_obj_state state); |
52 | int (*fixup_destroy) (void *addr, enum debug_obj_state state); | 55 | int (*fixup_destroy) (void *addr, enum debug_obj_state state); |
diff --git a/include/linux/device.h b/include/linux/device.h index 1bf5cf0b4513..ca5d25225aab 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -128,9 +128,7 @@ struct device_driver { | |||
128 | 128 | ||
129 | bool suppress_bind_attrs; /* disables bind/unbind via sysfs */ | 129 | bool suppress_bind_attrs; /* disables bind/unbind via sysfs */ |
130 | 130 | ||
131 | #if defined(CONFIG_OF) | ||
132 | const struct of_device_id *of_match_table; | 131 | const struct of_device_id *of_match_table; |
133 | #endif | ||
134 | 132 | ||
135 | int (*probe) (struct device *dev); | 133 | int (*probe) (struct device *dev); |
136 | int (*remove) (struct device *dev); | 134 | int (*remove) (struct device *dev); |
@@ -441,9 +439,8 @@ struct device { | |||
441 | override */ | 439 | override */ |
442 | /* arch specific additions */ | 440 | /* arch specific additions */ |
443 | struct dev_archdata archdata; | 441 | struct dev_archdata archdata; |
444 | #ifdef CONFIG_OF | 442 | |
445 | struct device_node *of_node; | 443 | struct device_node *of_node; /* associated device tree node */ |
446 | #endif | ||
447 | 444 | ||
448 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 445 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
449 | 446 | ||
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 28028988c862..33a42f24b275 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -8,6 +8,9 @@ struct inode; | |||
8 | struct super_block; | 8 | struct super_block; |
9 | struct vfsmount; | 9 | struct vfsmount; |
10 | 10 | ||
11 | /* limit the handle size to NFSv4 handle size now */ | ||
12 | #define MAX_HANDLE_SZ 128 | ||
13 | |||
11 | /* | 14 | /* |
12 | * The fileid_type identifies how the file within the filesystem is encoded. | 15 | * The fileid_type identifies how the file within the filesystem is encoded. |
13 | * In theory this is freely set and parsed by the filesystem, but we try to | 16 | * In theory this is freely set and parsed by the filesystem, but we try to |
@@ -121,8 +124,10 @@ struct fid { | |||
121 | * set, the encode_fh() should store sufficient information so that a good | 124 | * set, the encode_fh() should store sufficient information so that a good |
122 | * attempt can be made to find not only the file but also it's place in the | 125 | * attempt can be made to find not only the file but also it's place in the |
123 | * filesystem. This typically means storing a reference to de->d_parent in | 126 | * filesystem. This typically means storing a reference to de->d_parent in |
124 | * the filehandle fragment. encode_fh() should return the number of bytes | 127 | * the filehandle fragment. encode_fh() should return the fileid_type on |
125 | * stored or a negative error code such as %-ENOSPC | 128 | * success and on error returns 255 (if the space needed to encode fh is |
129 | * greater than @max_len*4 bytes). On error @max_len contains the minimum | ||
130 | * size(in 4 byte unit) needed to encode the file handle. | ||
126 | * | 131 | * |
127 | * fh_to_dentry: | 132 | * fh_to_dentry: |
128 | * @fh_to_dentry is given a &struct super_block (@sb) and a file handle | 133 | * @fh_to_dentry is given a &struct super_block (@sb) and a file handle |
diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h index a562fa5fb4e3..f550f894ba15 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h | |||
@@ -46,6 +46,7 @@ | |||
46 | unlinking file. */ | 46 | unlinking file. */ |
47 | #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ | 47 | #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ |
48 | #define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */ | 48 | #define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */ |
49 | #define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */ | ||
49 | 50 | ||
50 | #ifdef __KERNEL__ | 51 | #ifdef __KERNEL__ |
51 | 52 | ||
diff --git a/include/linux/file.h b/include/linux/file.h index e85baebf6279..21a79958541c 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -29,6 +29,8 @@ static inline void fput_light(struct file *file, int fput_needed) | |||
29 | 29 | ||
30 | extern struct file *fget(unsigned int fd); | 30 | extern struct file *fget(unsigned int fd); |
31 | extern struct file *fget_light(unsigned int fd, int *fput_needed); | 31 | extern struct file *fget_light(unsigned int fd, int *fput_needed); |
32 | extern struct file *fget_raw(unsigned int fd); | ||
33 | extern struct file *fget_raw_light(unsigned int fd, int *fput_needed); | ||
32 | extern void set_close_on_exec(unsigned int fd, int flag); | 34 | extern void set_close_on_exec(unsigned int fd, int flag); |
33 | extern void put_filp(struct file *); | 35 | extern void put_filp(struct file *); |
34 | extern int alloc_fd(unsigned start, unsigned flags); | 36 | extern int alloc_fd(unsigned start, unsigned flags); |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index da7e52b099f3..1effc8b56b4e 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -109,7 +109,7 @@ static inline void freezer_count(void) | |||
109 | } | 109 | } |
110 | 110 | ||
111 | /* | 111 | /* |
112 | * Check if the task should be counted as freezeable by the freezer | 112 | * Check if the task should be counted as freezable by the freezer |
113 | */ | 113 | */ |
114 | static inline int freezer_should_skip(struct task_struct *p) | 114 | static inline int freezer_should_skip(struct task_struct *p) |
115 | { | 115 | { |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 32b38cd829d3..13df14e2c42e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -102,6 +102,9 @@ struct inodes_stat_t { | |||
102 | /* File is huge (eg. /dev/kmem): treat loff_t as unsigned */ | 102 | /* File is huge (eg. /dev/kmem): treat loff_t as unsigned */ |
103 | #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) | 103 | #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) |
104 | 104 | ||
105 | /* File is opened with O_PATH; almost nothing can be done with it */ | ||
106 | #define FMODE_PATH ((__force fmode_t)0x4000) | ||
107 | |||
105 | /* File was opened by fanotify and shouldn't generate fanotify events */ | 108 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
106 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | 109 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) |
107 | 110 | ||
@@ -649,6 +652,7 @@ struct address_space { | |||
649 | spinlock_t private_lock; /* for use by the address_space */ | 652 | spinlock_t private_lock; /* for use by the address_space */ |
650 | struct list_head private_list; /* ditto */ | 653 | struct list_head private_list; /* ditto */ |
651 | struct address_space *assoc_mapping; /* ditto */ | 654 | struct address_space *assoc_mapping; /* ditto */ |
655 | struct mutex unmap_mutex; /* to protect unmapping */ | ||
652 | } __attribute__((aligned(sizeof(long)))); | 656 | } __attribute__((aligned(sizeof(long)))); |
653 | /* | 657 | /* |
654 | * On most architectures that alignment is already the case; but | 658 | * On most architectures that alignment is already the case; but |
@@ -977,6 +981,13 @@ struct file { | |||
977 | #endif | 981 | #endif |
978 | }; | 982 | }; |
979 | 983 | ||
984 | struct file_handle { | ||
985 | __u32 handle_bytes; | ||
986 | int handle_type; | ||
987 | /* file identifier */ | ||
988 | unsigned char f_handle[0]; | ||
989 | }; | ||
990 | |||
980 | #define get_file(x) atomic_long_inc(&(x)->f_count) | 991 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
981 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | 992 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) |
982 | #define file_count(x) atomic_long_read(&(x)->f_count) | 993 | #define file_count(x) atomic_long_read(&(x)->f_count) |
@@ -1400,6 +1411,7 @@ struct super_block { | |||
1400 | wait_queue_head_t s_wait_unfrozen; | 1411 | wait_queue_head_t s_wait_unfrozen; |
1401 | 1412 | ||
1402 | char s_id[32]; /* Informational name */ | 1413 | char s_id[32]; /* Informational name */ |
1414 | u8 s_uuid[16]; /* UUID */ | ||
1403 | 1415 | ||
1404 | void *s_fs_info; /* Filesystem private info */ | 1416 | void *s_fs_info; /* Filesystem private info */ |
1405 | fmode_t s_mode; | 1417 | fmode_t s_mode; |
@@ -1873,6 +1885,8 @@ extern void drop_collected_mounts(struct vfsmount *); | |||
1873 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | 1885 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, |
1874 | struct vfsmount *); | 1886 | struct vfsmount *); |
1875 | extern int vfs_statfs(struct path *, struct kstatfs *); | 1887 | extern int vfs_statfs(struct path *, struct kstatfs *); |
1888 | extern int user_statfs(const char __user *, struct kstatfs *); | ||
1889 | extern int fd_statfs(int, struct kstatfs *); | ||
1876 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); | 1890 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); |
1877 | extern int freeze_super(struct super_block *super); | 1891 | extern int freeze_super(struct super_block *super); |
1878 | extern int thaw_super(struct super_block *super); | 1892 | extern int thaw_super(struct super_block *super); |
@@ -1989,6 +2003,8 @@ extern int do_fallocate(struct file *file, int mode, loff_t offset, | |||
1989 | extern long do_sys_open(int dfd, const char __user *filename, int flags, | 2003 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
1990 | int mode); | 2004 | int mode); |
1991 | extern struct file *filp_open(const char *, int, int); | 2005 | extern struct file *filp_open(const char *, int, int); |
2006 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, | ||
2007 | const char *, int); | ||
1992 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | 2008 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, |
1993 | const struct cred *); | 2009 | const struct cred *); |
1994 | extern int filp_close(struct file *, fl_owner_t id); | 2010 | extern int filp_close(struct file *, fl_owner_t id); |
@@ -2139,7 +2155,7 @@ extern void check_disk_size_change(struct gendisk *disk, | |||
2139 | struct block_device *bdev); | 2155 | struct block_device *bdev); |
2140 | extern int revalidate_disk(struct gendisk *); | 2156 | extern int revalidate_disk(struct gendisk *); |
2141 | extern int check_disk_change(struct block_device *); | 2157 | extern int check_disk_change(struct block_device *); |
2142 | extern int __invalidate_device(struct block_device *); | 2158 | extern int __invalidate_device(struct block_device *, bool); |
2143 | extern int invalidate_partition(struct gendisk *, int); | 2159 | extern int invalidate_partition(struct gendisk *, int); |
2144 | #endif | 2160 | #endif |
2145 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 2161 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
@@ -2204,10 +2220,6 @@ extern struct file *create_read_pipe(struct file *f, int flags); | |||
2204 | extern struct file *create_write_pipe(int flags); | 2220 | extern struct file *create_write_pipe(int flags); |
2205 | extern void free_write_pipe(struct file *); | 2221 | extern void free_write_pipe(struct file *); |
2206 | 2222 | ||
2207 | extern struct file *do_filp_open(int dfd, const char *pathname, | ||
2208 | int open_flag, int mode, int acc_mode); | ||
2209 | extern int may_open(struct path *, int, int); | ||
2210 | |||
2211 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2223 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
2212 | extern struct file * open_exec(const char *); | 2224 | extern struct file * open_exec(const char *); |
2213 | 2225 | ||
@@ -2225,6 +2237,7 @@ extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); | |||
2225 | 2237 | ||
2226 | extern int inode_init_always(struct super_block *, struct inode *); | 2238 | extern int inode_init_always(struct super_block *, struct inode *); |
2227 | extern void inode_init_once(struct inode *); | 2239 | extern void inode_init_once(struct inode *); |
2240 | extern void address_space_init_once(struct address_space *mapping); | ||
2228 | extern void ihold(struct inode * inode); | 2241 | extern void ihold(struct inode * inode); |
2229 | extern void iput(struct inode *); | 2242 | extern void iput(struct inode *); |
2230 | extern struct inode * igrab(struct inode *); | 2243 | extern struct inode * igrab(struct inode *); |
@@ -2555,9 +2568,12 @@ int proc_nr_inodes(struct ctl_table *table, int write, | |||
2555 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2568 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2556 | int __init get_filesystem_list(char *buf); | 2569 | int __init get_filesystem_list(char *buf); |
2557 | 2570 | ||
2571 | #define __FMODE_EXEC ((__force int) FMODE_EXEC) | ||
2572 | #define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY) | ||
2573 | |||
2558 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) | 2574 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) |
2559 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ | 2575 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ |
2560 | (flag & FMODE_NONOTIFY))) | 2576 | (flag & __FMODE_NONOTIFY))) |
2561 | 2577 | ||
2562 | #endif /* __KERNEL__ */ | 2578 | #endif /* __KERNEL__ */ |
2563 | #endif /* _LINUX_FS_H */ | 2579 | #endif /* _LINUX_FS_H */ |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index dcd6a7c3a435..ca29e03c1fac 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -428,6 +428,7 @@ extern void unregister_ftrace_graph(void); | |||
428 | 428 | ||
429 | extern void ftrace_graph_init_task(struct task_struct *t); | 429 | extern void ftrace_graph_init_task(struct task_struct *t); |
430 | extern void ftrace_graph_exit_task(struct task_struct *t); | 430 | extern void ftrace_graph_exit_task(struct task_struct *t); |
431 | extern void ftrace_graph_init_idle_task(struct task_struct *t, int cpu); | ||
431 | 432 | ||
432 | static inline int task_curr_ret_stack(struct task_struct *t) | 433 | static inline int task_curr_ret_stack(struct task_struct *t) |
433 | { | 434 | { |
@@ -451,6 +452,7 @@ static inline void unpause_graph_tracing(void) | |||
451 | 452 | ||
452 | static inline void ftrace_graph_init_task(struct task_struct *t) { } | 453 | static inline void ftrace_graph_init_task(struct task_struct *t) { } |
453 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } | 454 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } |
455 | static inline void ftrace_graph_init_idle_task(struct task_struct *t, int cpu) { } | ||
454 | 456 | ||
455 | static inline int register_ftrace_graph(trace_func_graph_ret_t retfunc, | 457 | static inline int register_ftrace_graph(trace_func_graph_ret_t retfunc, |
456 | trace_func_graph_ent_t entryfunc) | 458 | trace_func_graph_ent_t entryfunc) |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 47e3997f7b5c..22b32af1b5ec 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -37,7 +37,6 @@ struct trace_entry { | |||
37 | unsigned char flags; | 37 | unsigned char flags; |
38 | unsigned char preempt_count; | 38 | unsigned char preempt_count; |
39 | int pid; | 39 | int pid; |
40 | int lock_depth; | ||
41 | }; | 40 | }; |
42 | 41 | ||
43 | #define FTRACE_MAX_EVENT \ | 42 | #define FTRACE_MAX_EVENT \ |
@@ -208,7 +207,6 @@ struct ftrace_event_call { | |||
208 | 207 | ||
209 | #define PERF_MAX_TRACE_SIZE 2048 | 208 | #define PERF_MAX_TRACE_SIZE 2048 |
210 | 209 | ||
211 | #define MAX_FILTER_PRED 32 | ||
212 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 210 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
213 | 211 | ||
214 | extern void destroy_preds(struct ftrace_event_call *call); | 212 | extern void destroy_preds(struct ftrace_event_call *call); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index a3b148a91874..dca31761b311 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -249,7 +249,7 @@ static inline enum zone_type gfp_zone(gfp_t flags) | |||
249 | ((1 << ZONES_SHIFT) - 1); | 249 | ((1 << ZONES_SHIFT) - 1); |
250 | 250 | ||
251 | if (__builtin_constant_p(bit)) | 251 | if (__builtin_constant_p(bit)) |
252 | MAYBE_BUILD_BUG_ON((GFP_ZONE_BAD >> bit) & 1); | 252 | BUILD_BUG_ON((GFP_ZONE_BAD >> bit) & 1); |
253 | else { | 253 | else { |
254 | #ifdef CONFIG_DEBUG_VM | 254 | #ifdef CONFIG_DEBUG_VM |
255 | BUG_ON((GFP_ZONE_BAD >> bit) & 1); | 255 | BUG_ON((GFP_ZONE_BAD >> bit) & 1); |
@@ -332,16 +332,19 @@ alloc_pages(gfp_t gfp_mask, unsigned int order) | |||
332 | return alloc_pages_current(gfp_mask, order); | 332 | return alloc_pages_current(gfp_mask, order); |
333 | } | 333 | } |
334 | extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, | 334 | extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, |
335 | struct vm_area_struct *vma, unsigned long addr); | 335 | struct vm_area_struct *vma, unsigned long addr, |
336 | int node); | ||
336 | #else | 337 | #else |
337 | #define alloc_pages(gfp_mask, order) \ | 338 | #define alloc_pages(gfp_mask, order) \ |
338 | alloc_pages_node(numa_node_id(), gfp_mask, order) | 339 | alloc_pages_node(numa_node_id(), gfp_mask, order) |
339 | #define alloc_pages_vma(gfp_mask, order, vma, addr) \ | 340 | #define alloc_pages_vma(gfp_mask, order, vma, addr, node) \ |
340 | alloc_pages(gfp_mask, order) | 341 | alloc_pages(gfp_mask, order) |
341 | #endif | 342 | #endif |
342 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) | 343 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) |
343 | #define alloc_page_vma(gfp_mask, vma, addr) \ | 344 | #define alloc_page_vma(gfp_mask, vma, addr) \ |
344 | alloc_pages_vma(gfp_mask, 0, vma, addr) | 345 | alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id()) |
346 | #define alloc_page_vma_node(gfp_mask, vma, addr, node) \ | ||
347 | alloc_pages_vma(gfp_mask, 0, vma, addr, node) | ||
345 | 348 | ||
346 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); | 349 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); |
347 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); | 350 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index f376ddc64c4d..62f500c724f9 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -54,11 +54,13 @@ enum hrtimer_restart { | |||
54 | * 0x00 inactive | 54 | * 0x00 inactive |
55 | * 0x01 enqueued into rbtree | 55 | * 0x01 enqueued into rbtree |
56 | * 0x02 callback function running | 56 | * 0x02 callback function running |
57 | * 0x04 timer is migrated to another cpu | ||
57 | * | 58 | * |
58 | * Special cases: | 59 | * Special cases: |
59 | * 0x03 callback function running and enqueued | 60 | * 0x03 callback function running and enqueued |
60 | * (was requeued on another CPU) | 61 | * (was requeued on another CPU) |
61 | * 0x09 timer was migrated on CPU hotunplug | 62 | * 0x05 timer was migrated on CPU hotunplug |
63 | * | ||
62 | * The "callback function running and enqueued" status is only possible on | 64 | * The "callback function running and enqueued" status is only possible on |
63 | * SMP. It happens for example when a posix timer expired and the callback | 65 | * SMP. It happens for example when a posix timer expired and the callback |
64 | * queued a signal. Between dropping the lock which protects the posix timer | 66 | * queued a signal. Between dropping the lock which protects the posix timer |
@@ -67,8 +69,11 @@ enum hrtimer_restart { | |||
67 | * as otherwise the timer could be removed before the softirq code finishes the | 69 | * as otherwise the timer could be removed before the softirq code finishes the |
68 | * the handling of the timer. | 70 | * the handling of the timer. |
69 | * | 71 | * |
70 | * The HRTIMER_STATE_ENQUEUED bit is always or'ed to the current state to | 72 | * The HRTIMER_STATE_ENQUEUED bit is always or'ed to the current state |
71 | * preserve the HRTIMER_STATE_CALLBACK bit in the above scenario. | 73 | * to preserve the HRTIMER_STATE_CALLBACK in the above scenario. This |
74 | * also affects HRTIMER_STATE_MIGRATE where the preservation is not | ||
75 | * necessary. HRTIMER_STATE_MIGRATE is cleared after the timer is | ||
76 | * enqueued on the new cpu. | ||
72 | * | 77 | * |
73 | * All state transitions are protected by cpu_base->lock. | 78 | * All state transitions are protected by cpu_base->lock. |
74 | */ | 79 | */ |
@@ -148,7 +153,12 @@ struct hrtimer_clock_base { | |||
148 | #endif | 153 | #endif |
149 | }; | 154 | }; |
150 | 155 | ||
151 | #define HRTIMER_MAX_CLOCK_BASES 2 | 156 | enum hrtimer_base_type { |
157 | HRTIMER_BASE_REALTIME, | ||
158 | HRTIMER_BASE_MONOTONIC, | ||
159 | HRTIMER_BASE_BOOTTIME, | ||
160 | HRTIMER_MAX_CLOCK_BASES, | ||
161 | }; | ||
152 | 162 | ||
153 | /* | 163 | /* |
154 | * struct hrtimer_cpu_base - the per cpu clock bases | 164 | * struct hrtimer_cpu_base - the per cpu clock bases |
@@ -308,6 +318,7 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer) | |||
308 | 318 | ||
309 | extern ktime_t ktime_get(void); | 319 | extern ktime_t ktime_get(void); |
310 | extern ktime_t ktime_get_real(void); | 320 | extern ktime_t ktime_get_real(void); |
321 | extern ktime_t ktime_get_boottime(void); | ||
311 | 322 | ||
312 | 323 | ||
313 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); | 324 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); |
@@ -370,8 +381,9 @@ extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); | |||
370 | extern ktime_t hrtimer_get_next_event(void); | 381 | extern ktime_t hrtimer_get_next_event(void); |
371 | 382 | ||
372 | /* | 383 | /* |
373 | * A timer is active, when it is enqueued into the rbtree or the callback | 384 | * A timer is active, when it is enqueued into the rbtree or the |
374 | * function is running. | 385 | * callback function is running or it's in the state of being migrated |
386 | * to another cpu. | ||
375 | */ | 387 | */ |
376 | static inline int hrtimer_active(const struct hrtimer *timer) | 388 | static inline int hrtimer_active(const struct hrtimer *timer) |
377 | { | 389 | { |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index 8e6c8c42bc3c..df29c8fde36b 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -57,7 +57,8 @@ extern pmd_t *page_check_address_pmd(struct page *page, | |||
57 | (transparent_hugepage_flags & \ | 57 | (transparent_hugepage_flags & \ |
58 | (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG) && \ | 58 | (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG) && \ |
59 | ((__vma)->vm_flags & VM_HUGEPAGE))) && \ | 59 | ((__vma)->vm_flags & VM_HUGEPAGE))) && \ |
60 | !((__vma)->vm_flags & VM_NOHUGEPAGE)) | 60 | !((__vma)->vm_flags & VM_NOHUGEPAGE) && \ |
61 | !is_vma_temporary_stack(__vma)) | ||
61 | #define transparent_hugepage_defrag(__vma) \ | 62 | #define transparent_hugepage_defrag(__vma) \ |
62 | ((transparent_hugepage_flags & \ | 63 | ((transparent_hugepage_flags & \ |
63 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)) || \ | 64 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)) || \ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 903576df88dc..06a8d9c7de98 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -258,9 +258,7 @@ struct i2c_board_info { | |||
258 | unsigned short addr; | 258 | unsigned short addr; |
259 | void *platform_data; | 259 | void *platform_data; |
260 | struct dev_archdata *archdata; | 260 | struct dev_archdata *archdata; |
261 | #ifdef CONFIG_OF | ||
262 | struct device_node *of_node; | 261 | struct device_node *of_node; |
263 | #endif | ||
264 | int irq; | 262 | int irq; |
265 | }; | 263 | }; |
266 | 264 | ||
diff --git a/include/linux/input/bu21013.h b/include/linux/input/bu21013.h index e470d387dd49..05e03284b92a 100644 --- a/include/linux/input/bu21013.h +++ b/include/linux/input/bu21013.h | |||
@@ -12,8 +12,6 @@ | |||
12 | * @cs_en: pointer to the cs enable function | 12 | * @cs_en: pointer to the cs enable function |
13 | * @cs_dis: pointer to the cs disable function | 13 | * @cs_dis: pointer to the cs disable function |
14 | * @irq_read_val: pointer to read the pen irq value function | 14 | * @irq_read_val: pointer to read the pen irq value function |
15 | * @x_max_res: xmax resolution | ||
16 | * @y_max_res: ymax resolution | ||
17 | * @touch_x_max: touch x max | 15 | * @touch_x_max: touch x max |
18 | * @touch_y_max: touch y max | 16 | * @touch_y_max: touch y max |
19 | * @cs_pin: chip select pin | 17 | * @cs_pin: chip select pin |
@@ -29,8 +27,6 @@ struct bu21013_platform_device { | |||
29 | int (*cs_en)(int reset_pin); | 27 | int (*cs_en)(int reset_pin); |
30 | int (*cs_dis)(int reset_pin); | 28 | int (*cs_dis)(int reset_pin); |
31 | int (*irq_read_val)(void); | 29 | int (*irq_read_val)(void); |
32 | int x_max_res; | ||
33 | int y_max_res; | ||
34 | int touch_x_max; | 30 | int touch_x_max; |
35 | int touch_y_max; | 31 | int touch_y_max; |
36 | unsigned int cs_pin; | 32 | unsigned int cs_pin; |
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 697474691749..fe7c4b9ae270 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
@@ -4,8 +4,8 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/input.h> | 5 | #include <linux/input.h> |
6 | 6 | ||
7 | #define MATRIX_MAX_ROWS 16 | 7 | #define MATRIX_MAX_ROWS 32 |
8 | #define MATRIX_MAX_COLS 16 | 8 | #define MATRIX_MAX_COLS 32 |
9 | 9 | ||
10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ | 10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ |
11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ | 11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 55e0d4253e49..59b72ca1c5d1 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
15 | #include <linux/percpu.h> | 15 | #include <linux/percpu.h> |
16 | #include <linux/hrtimer.h> | 16 | #include <linux/hrtimer.h> |
17 | #include <linux/kref.h> | ||
18 | #include <linux/workqueue.h> | ||
17 | 19 | ||
18 | #include <asm/atomic.h> | 20 | #include <asm/atomic.h> |
19 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
@@ -55,7 +57,8 @@ | |||
55 | * Used by threaded interrupts which need to keep the | 57 | * Used by threaded interrupts which need to keep the |
56 | * irq line disabled until the threaded handler has been run. | 58 | * irq line disabled until the threaded handler has been run. |
57 | * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend | 59 | * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend |
58 | * | 60 | * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set |
61 | * IRQF_NO_THREAD - Interrupt cannot be threaded | ||
59 | */ | 62 | */ |
60 | #define IRQF_DISABLED 0x00000020 | 63 | #define IRQF_DISABLED 0x00000020 |
61 | #define IRQF_SAMPLE_RANDOM 0x00000040 | 64 | #define IRQF_SAMPLE_RANDOM 0x00000040 |
@@ -67,22 +70,10 @@ | |||
67 | #define IRQF_IRQPOLL 0x00001000 | 70 | #define IRQF_IRQPOLL 0x00001000 |
68 | #define IRQF_ONESHOT 0x00002000 | 71 | #define IRQF_ONESHOT 0x00002000 |
69 | #define IRQF_NO_SUSPEND 0x00004000 | 72 | #define IRQF_NO_SUSPEND 0x00004000 |
73 | #define IRQF_FORCE_RESUME 0x00008000 | ||
74 | #define IRQF_NO_THREAD 0x00010000 | ||
70 | 75 | ||
71 | #define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND) | 76 | #define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) |
72 | |||
73 | /* | ||
74 | * Bits used by threaded handlers: | ||
75 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run | ||
76 | * IRQTF_DIED - handler thread died | ||
77 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed | ||
78 | * IRQTF_AFFINITY - irq thread is requested to adjust affinity | ||
79 | */ | ||
80 | enum { | ||
81 | IRQTF_RUNTHREAD, | ||
82 | IRQTF_DIED, | ||
83 | IRQTF_WARNED, | ||
84 | IRQTF_AFFINITY, | ||
85 | }; | ||
86 | 77 | ||
87 | /* | 78 | /* |
88 | * These values can be returned by request_any_context_irq() and | 79 | * These values can be returned by request_any_context_irq() and |
@@ -110,6 +101,7 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); | |||
110 | * @thread_fn: interupt handler function for threaded interrupts | 101 | * @thread_fn: interupt handler function for threaded interrupts |
111 | * @thread: thread pointer for threaded interrupts | 102 | * @thread: thread pointer for threaded interrupts |
112 | * @thread_flags: flags related to @thread | 103 | * @thread_flags: flags related to @thread |
104 | * @thread_mask: bitmask for keeping track of @thread activity | ||
113 | */ | 105 | */ |
114 | struct irqaction { | 106 | struct irqaction { |
115 | irq_handler_t handler; | 107 | irq_handler_t handler; |
@@ -120,6 +112,7 @@ struct irqaction { | |||
120 | irq_handler_t thread_fn; | 112 | irq_handler_t thread_fn; |
121 | struct task_struct *thread; | 113 | struct task_struct *thread; |
122 | unsigned long thread_flags; | 114 | unsigned long thread_flags; |
115 | unsigned long thread_mask; | ||
123 | const char *name; | 116 | const char *name; |
124 | struct proc_dir_entry *dir; | 117 | struct proc_dir_entry *dir; |
125 | } ____cacheline_internodealigned_in_smp; | 118 | } ____cacheline_internodealigned_in_smp; |
@@ -240,6 +233,35 @@ extern int irq_can_set_affinity(unsigned int irq); | |||
240 | extern int irq_select_affinity(unsigned int irq); | 233 | extern int irq_select_affinity(unsigned int irq); |
241 | 234 | ||
242 | extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m); | 235 | extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m); |
236 | |||
237 | /** | ||
238 | * struct irq_affinity_notify - context for notification of IRQ affinity changes | ||
239 | * @irq: Interrupt to which notification applies | ||
240 | * @kref: Reference count, for internal use | ||
241 | * @work: Work item, for internal use | ||
242 | * @notify: Function to be called on change. This will be | ||
243 | * called in process context. | ||
244 | * @release: Function to be called on release. This will be | ||
245 | * called in process context. Once registered, the | ||
246 | * structure must only be freed when this function is | ||
247 | * called or later. | ||
248 | */ | ||
249 | struct irq_affinity_notify { | ||
250 | unsigned int irq; | ||
251 | struct kref kref; | ||
252 | struct work_struct work; | ||
253 | void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask); | ||
254 | void (*release)(struct kref *ref); | ||
255 | }; | ||
256 | |||
257 | extern int | ||
258 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); | ||
259 | |||
260 | static inline void irq_run_affinity_notifiers(void) | ||
261 | { | ||
262 | flush_scheduled_work(); | ||
263 | } | ||
264 | |||
243 | #else /* CONFIG_SMP */ | 265 | #else /* CONFIG_SMP */ |
244 | 266 | ||
245 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) | 267 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) |
@@ -255,7 +277,7 @@ static inline int irq_can_set_affinity(unsigned int irq) | |||
255 | static inline int irq_select_affinity(unsigned int irq) { return 0; } | 277 | static inline int irq_select_affinity(unsigned int irq) { return 0; } |
256 | 278 | ||
257 | static inline int irq_set_affinity_hint(unsigned int irq, | 279 | static inline int irq_set_affinity_hint(unsigned int irq, |
258 | const struct cpumask *m) | 280 | const struct cpumask *m) |
259 | { | 281 | { |
260 | return -EINVAL; | 282 | return -EINVAL; |
261 | } | 283 | } |
@@ -314,16 +336,24 @@ static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long | |||
314 | } | 336 | } |
315 | 337 | ||
316 | /* IRQ wakeup (PM) control: */ | 338 | /* IRQ wakeup (PM) control: */ |
317 | extern int set_irq_wake(unsigned int irq, unsigned int on); | 339 | extern int irq_set_irq_wake(unsigned int irq, unsigned int on); |
340 | |||
341 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
342 | /* Please do not use: Use the replacement functions instead */ | ||
343 | static inline int set_irq_wake(unsigned int irq, unsigned int on) | ||
344 | { | ||
345 | return irq_set_irq_wake(irq, on); | ||
346 | } | ||
347 | #endif | ||
318 | 348 | ||
319 | static inline int enable_irq_wake(unsigned int irq) | 349 | static inline int enable_irq_wake(unsigned int irq) |
320 | { | 350 | { |
321 | return set_irq_wake(irq, 1); | 351 | return irq_set_irq_wake(irq, 1); |
322 | } | 352 | } |
323 | 353 | ||
324 | static inline int disable_irq_wake(unsigned int irq) | 354 | static inline int disable_irq_wake(unsigned int irq) |
325 | { | 355 | { |
326 | return set_irq_wake(irq, 0); | 356 | return irq_set_irq_wake(irq, 0); |
327 | } | 357 | } |
328 | 358 | ||
329 | #else /* !CONFIG_GENERIC_HARDIRQS */ | 359 | #else /* !CONFIG_GENERIC_HARDIRQS */ |
@@ -353,6 +383,13 @@ static inline int disable_irq_wake(unsigned int irq) | |||
353 | } | 383 | } |
354 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 384 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
355 | 385 | ||
386 | |||
387 | #ifdef CONFIG_IRQ_FORCED_THREADING | ||
388 | extern bool force_irqthreads; | ||
389 | #else | ||
390 | #define force_irqthreads (0) | ||
391 | #endif | ||
392 | |||
356 | #ifndef __ARCH_SET_SOFTIRQ_PENDING | 393 | #ifndef __ARCH_SET_SOFTIRQ_PENDING |
357 | #define set_softirq_pending(x) (local_softirq_pending() = (x)) | 394 | #define set_softirq_pending(x) (local_softirq_pending() = (x)) |
358 | #define or_softirq_pending(x) (local_softirq_pending() |= (x)) | 395 | #define or_softirq_pending(x) (local_softirq_pending() |= (x)) |
@@ -426,6 +463,13 @@ extern void raise_softirq(unsigned int nr); | |||
426 | */ | 463 | */ |
427 | DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list); | 464 | DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list); |
428 | 465 | ||
466 | DECLARE_PER_CPU(struct task_struct *, ksoftirqd); | ||
467 | |||
468 | static inline struct task_struct *this_cpu_ksoftirqd(void) | ||
469 | { | ||
470 | return this_cpu_read(ksoftirqd); | ||
471 | } | ||
472 | |||
429 | /* Try to send a softirq to a remote cpu. If this cannot be done, the | 473 | /* Try to send a softirq to a remote cpu. If this cannot be done, the |
430 | * work will be queued to the local cpu. | 474 | * work will be queued to the local cpu. |
431 | */ | 475 | */ |
@@ -645,6 +689,7 @@ static inline void init_irq_proc(void) | |||
645 | 689 | ||
646 | struct seq_file; | 690 | struct seq_file; |
647 | int show_interrupts(struct seq_file *p, void *v); | 691 | int show_interrupts(struct seq_file *p, void *v); |
692 | int arch_show_interrupts(struct seq_file *p, int prec); | ||
648 | 693 | ||
649 | extern int early_irq_init(void); | 694 | extern int early_irq_init(void); |
650 | extern int arch_probe_nr_irqs(void); | 695 | extern int arch_probe_nr_irqs(void); |
diff --git a/include/linux/irq.h b/include/linux/irq.h index abde2527c699..1d3577f30d45 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -29,60 +29,104 @@ | |||
29 | #include <asm/irq_regs.h> | 29 | #include <asm/irq_regs.h> |
30 | 30 | ||
31 | struct irq_desc; | 31 | struct irq_desc; |
32 | struct irq_data; | ||
32 | typedef void (*irq_flow_handler_t)(unsigned int irq, | 33 | typedef void (*irq_flow_handler_t)(unsigned int irq, |
33 | struct irq_desc *desc); | 34 | struct irq_desc *desc); |
34 | 35 | typedef void (*irq_preflow_handler_t)(struct irq_data *data); | |
35 | 36 | ||
36 | /* | 37 | /* |
37 | * IRQ line status. | 38 | * IRQ line status. |
38 | * | 39 | * |
39 | * Bits 0-7 are reserved for the IRQF_* bits in linux/interrupt.h | 40 | * Bits 0-7 are the same as the IRQF_* bits in linux/interrupt.h |
41 | * | ||
42 | * IRQ_TYPE_NONE - default, unspecified type | ||
43 | * IRQ_TYPE_EDGE_RISING - rising edge triggered | ||
44 | * IRQ_TYPE_EDGE_FALLING - falling edge triggered | ||
45 | * IRQ_TYPE_EDGE_BOTH - rising and falling edge triggered | ||
46 | * IRQ_TYPE_LEVEL_HIGH - high level triggered | ||
47 | * IRQ_TYPE_LEVEL_LOW - low level triggered | ||
48 | * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits | ||
49 | * IRQ_TYPE_SENSE_MASK - Mask for all the above bits | ||
50 | * IRQ_TYPE_PROBE - Special flag for probing in progress | ||
51 | * | ||
52 | * Bits which can be modified via irq_set/clear/modify_status_flags() | ||
53 | * IRQ_LEVEL - Interrupt is level type. Will be also | ||
54 | * updated in the code when the above trigger | ||
55 | * bits are modified via set_irq_type() | ||
56 | * IRQ_PER_CPU - Mark an interrupt PER_CPU. Will protect | ||
57 | * it from affinity setting | ||
58 | * IRQ_NOPROBE - Interrupt cannot be probed by autoprobing | ||
59 | * IRQ_NOREQUEST - Interrupt cannot be requested via | ||
60 | * request_irq() | ||
61 | * IRQ_NOAUTOEN - Interrupt is not automatically enabled in | ||
62 | * request/setup_irq() | ||
63 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) | ||
64 | * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context | ||
65 | * IRQ_NESTED_TRHEAD - Interrupt nests into another thread | ||
66 | * | ||
67 | * Deprecated bits. They are kept updated as long as | ||
68 | * CONFIG_GENERIC_HARDIRQS_NO_COMPAT is not set. Will go away soon. These bits | ||
69 | * are internal state of the core code and if you really need to acces | ||
70 | * them then talk to the genirq maintainer instead of hacking | ||
71 | * something weird. | ||
40 | * | 72 | * |
41 | * IRQ types | ||
42 | */ | 73 | */ |
43 | #define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */ | 74 | enum { |
44 | #define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */ | 75 | IRQ_TYPE_NONE = 0x00000000, |
45 | #define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */ | 76 | IRQ_TYPE_EDGE_RISING = 0x00000001, |
46 | #define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) | 77 | IRQ_TYPE_EDGE_FALLING = 0x00000002, |
47 | #define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */ | 78 | IRQ_TYPE_EDGE_BOTH = (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING), |
48 | #define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */ | 79 | IRQ_TYPE_LEVEL_HIGH = 0x00000004, |
49 | #define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */ | 80 | IRQ_TYPE_LEVEL_LOW = 0x00000008, |
50 | #define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ | 81 | IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH), |
51 | 82 | IRQ_TYPE_SENSE_MASK = 0x0000000f, | |
52 | /* Internal flags */ | 83 | |
53 | #define IRQ_INPROGRESS 0x00000100 /* IRQ handler active - do not enter! */ | 84 | IRQ_TYPE_PROBE = 0x00000010, |
54 | #define IRQ_DISABLED 0x00000200 /* IRQ disabled - do not enter! */ | 85 | |
55 | #define IRQ_PENDING 0x00000400 /* IRQ pending - replay on enable */ | 86 | IRQ_LEVEL = (1 << 8), |
56 | #define IRQ_REPLAY 0x00000800 /* IRQ has been replayed but not acked yet */ | 87 | IRQ_PER_CPU = (1 << 9), |
57 | #define IRQ_AUTODETECT 0x00001000 /* IRQ is being autodetected */ | 88 | IRQ_NOPROBE = (1 << 10), |
58 | #define IRQ_WAITING 0x00002000 /* IRQ not yet seen - for autodetection */ | 89 | IRQ_NOREQUEST = (1 << 11), |
59 | #define IRQ_LEVEL 0x00004000 /* IRQ level triggered */ | 90 | IRQ_NOAUTOEN = (1 << 12), |
60 | #define IRQ_MASKED 0x00008000 /* IRQ masked - shouldn't be seen again */ | 91 | IRQ_NO_BALANCING = (1 << 13), |
61 | #define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */ | 92 | IRQ_MOVE_PCNTXT = (1 << 14), |
62 | #define IRQ_NOPROBE 0x00020000 /* IRQ is not valid for probing */ | 93 | IRQ_NESTED_THREAD = (1 << 15), |
63 | #define IRQ_NOREQUEST 0x00040000 /* IRQ cannot be requested */ | 94 | |
64 | #define IRQ_NOAUTOEN 0x00080000 /* IRQ will not be enabled on request irq */ | 95 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT |
65 | #define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */ | 96 | IRQ_INPROGRESS = (1 << 16), |
66 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ | 97 | IRQ_REPLAY = (1 << 17), |
67 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ | 98 | IRQ_WAITING = (1 << 18), |
68 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ | 99 | IRQ_DISABLED = (1 << 19), |
69 | #define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ | 100 | IRQ_PENDING = (1 << 20), |
70 | #define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/ | 101 | IRQ_MASKED = (1 << 21), |
71 | #define IRQ_SUSPENDED 0x04000000 /* IRQ has gone through suspend sequence */ | 102 | IRQ_MOVE_PENDING = (1 << 22), |
72 | #define IRQ_ONESHOT 0x08000000 /* IRQ is not unmasked after hardirq */ | 103 | IRQ_AFFINITY_SET = (1 << 23), |
73 | #define IRQ_NESTED_THREAD 0x10000000 /* IRQ is nested into another, no own handler thread */ | 104 | IRQ_WAKEUP = (1 << 24), |
105 | #endif | ||
106 | }; | ||
74 | 107 | ||
75 | #define IRQF_MODIFY_MASK \ | 108 | #define IRQF_MODIFY_MASK \ |
76 | (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ | 109 | (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ |
77 | IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL) | 110 | IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \ |
111 | IRQ_PER_CPU | IRQ_NESTED_THREAD) | ||
78 | 112 | ||
79 | #ifdef CONFIG_IRQ_PER_CPU | 113 | #define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) |
80 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 114 | |
81 | # define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) | 115 | static inline __deprecated bool CHECK_IRQ_PER_CPU(unsigned int status) |
82 | #else | 116 | { |
83 | # define CHECK_IRQ_PER_CPU(var) 0 | 117 | return status & IRQ_PER_CPU; |
84 | # define IRQ_NO_BALANCING_MASK IRQ_NO_BALANCING | 118 | } |
85 | #endif | 119 | |
120 | /* | ||
121 | * Return value for chip->irq_set_affinity() | ||
122 | * | ||
123 | * IRQ_SET_MASK_OK - OK, core updates irq_data.affinity | ||
124 | * IRQ_SET_MASK_NOCPY - OK, chip did update irq_data.affinity | ||
125 | */ | ||
126 | enum { | ||
127 | IRQ_SET_MASK_OK = 0, | ||
128 | IRQ_SET_MASK_OK_NOCOPY, | ||
129 | }; | ||
86 | 130 | ||
87 | struct msi_desc; | 131 | struct msi_desc; |
88 | 132 | ||
@@ -90,6 +134,8 @@ struct msi_desc; | |||
90 | * struct irq_data - per irq and irq chip data passed down to chip functions | 134 | * struct irq_data - per irq and irq chip data passed down to chip functions |
91 | * @irq: interrupt number | 135 | * @irq: interrupt number |
92 | * @node: node index useful for balancing | 136 | * @node: node index useful for balancing |
137 | * @state_use_accessor: status information for irq chip functions. | ||
138 | * Use accessor functions to deal with it | ||
93 | * @chip: low level interrupt hardware access | 139 | * @chip: low level interrupt hardware access |
94 | * @handler_data: per-IRQ data for the irq_chip methods | 140 | * @handler_data: per-IRQ data for the irq_chip methods |
95 | * @chip_data: platform-specific per-chip private data for the chip | 141 | * @chip_data: platform-specific per-chip private data for the chip |
@@ -104,6 +150,7 @@ struct msi_desc; | |||
104 | struct irq_data { | 150 | struct irq_data { |
105 | unsigned int irq; | 151 | unsigned int irq; |
106 | unsigned int node; | 152 | unsigned int node; |
153 | unsigned int state_use_accessors; | ||
107 | struct irq_chip *chip; | 154 | struct irq_chip *chip; |
108 | void *handler_data; | 155 | void *handler_data; |
109 | void *chip_data; | 156 | void *chip_data; |
@@ -113,6 +160,80 @@ struct irq_data { | |||
113 | #endif | 160 | #endif |
114 | }; | 161 | }; |
115 | 162 | ||
163 | /* | ||
164 | * Bit masks for irq_data.state | ||
165 | * | ||
166 | * IRQD_TRIGGER_MASK - Mask for the trigger type bits | ||
167 | * IRQD_SETAFFINITY_PENDING - Affinity setting is pending | ||
168 | * IRQD_NO_BALANCING - Balancing disabled for this IRQ | ||
169 | * IRQD_PER_CPU - Interrupt is per cpu | ||
170 | * IRQD_AFFINITY_SET - Interrupt affinity was set | ||
171 | * IRQD_LEVEL - Interrupt is level triggered | ||
172 | * IRQD_WAKEUP_STATE - Interrupt is configured for wakeup | ||
173 | * from suspend | ||
174 | * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process | ||
175 | * context | ||
176 | */ | ||
177 | enum { | ||
178 | IRQD_TRIGGER_MASK = 0xf, | ||
179 | IRQD_SETAFFINITY_PENDING = (1 << 8), | ||
180 | IRQD_NO_BALANCING = (1 << 10), | ||
181 | IRQD_PER_CPU = (1 << 11), | ||
182 | IRQD_AFFINITY_SET = (1 << 12), | ||
183 | IRQD_LEVEL = (1 << 13), | ||
184 | IRQD_WAKEUP_STATE = (1 << 14), | ||
185 | IRQD_MOVE_PCNTXT = (1 << 15), | ||
186 | }; | ||
187 | |||
188 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) | ||
189 | { | ||
190 | return d->state_use_accessors & IRQD_SETAFFINITY_PENDING; | ||
191 | } | ||
192 | |||
193 | static inline bool irqd_is_per_cpu(struct irq_data *d) | ||
194 | { | ||
195 | return d->state_use_accessors & IRQD_PER_CPU; | ||
196 | } | ||
197 | |||
198 | static inline bool irqd_can_balance(struct irq_data *d) | ||
199 | { | ||
200 | return !(d->state_use_accessors & (IRQD_PER_CPU | IRQD_NO_BALANCING)); | ||
201 | } | ||
202 | |||
203 | static inline bool irqd_affinity_was_set(struct irq_data *d) | ||
204 | { | ||
205 | return d->state_use_accessors & IRQD_AFFINITY_SET; | ||
206 | } | ||
207 | |||
208 | static inline u32 irqd_get_trigger_type(struct irq_data *d) | ||
209 | { | ||
210 | return d->state_use_accessors & IRQD_TRIGGER_MASK; | ||
211 | } | ||
212 | |||
213 | /* | ||
214 | * Must only be called inside irq_chip.irq_set_type() functions. | ||
215 | */ | ||
216 | static inline void irqd_set_trigger_type(struct irq_data *d, u32 type) | ||
217 | { | ||
218 | d->state_use_accessors &= ~IRQD_TRIGGER_MASK; | ||
219 | d->state_use_accessors |= type & IRQD_TRIGGER_MASK; | ||
220 | } | ||
221 | |||
222 | static inline bool irqd_is_level_type(struct irq_data *d) | ||
223 | { | ||
224 | return d->state_use_accessors & IRQD_LEVEL; | ||
225 | } | ||
226 | |||
227 | static inline bool irqd_is_wakeup_set(struct irq_data *d) | ||
228 | { | ||
229 | return d->state_use_accessors & IRQD_WAKEUP_STATE; | ||
230 | } | ||
231 | |||
232 | static inline bool irqd_can_move_in_process_context(struct irq_data *d) | ||
233 | { | ||
234 | return d->state_use_accessors & IRQD_MOVE_PCNTXT; | ||
235 | } | ||
236 | |||
116 | /** | 237 | /** |
117 | * struct irq_chip - hardware interrupt chip descriptor | 238 | * struct irq_chip - hardware interrupt chip descriptor |
118 | * | 239 | * |
@@ -149,6 +270,7 @@ struct irq_data { | |||
149 | * @irq_set_wake: enable/disable power-management wake-on of an IRQ | 270 | * @irq_set_wake: enable/disable power-management wake-on of an IRQ |
150 | * @irq_bus_lock: function to lock access to slow bus (i2c) chips | 271 | * @irq_bus_lock: function to lock access to slow bus (i2c) chips |
151 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips | 272 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips |
273 | * @flags: chip specific flags | ||
152 | * | 274 | * |
153 | * @release: release function solely used by UML | 275 | * @release: release function solely used by UML |
154 | */ | 276 | */ |
@@ -195,12 +317,27 @@ struct irq_chip { | |||
195 | void (*irq_bus_lock)(struct irq_data *data); | 317 | void (*irq_bus_lock)(struct irq_data *data); |
196 | void (*irq_bus_sync_unlock)(struct irq_data *data); | 318 | void (*irq_bus_sync_unlock)(struct irq_data *data); |
197 | 319 | ||
320 | unsigned long flags; | ||
321 | |||
198 | /* Currently used only by UML, might disappear one day.*/ | 322 | /* Currently used only by UML, might disappear one day.*/ |
199 | #ifdef CONFIG_IRQ_RELEASE_METHOD | 323 | #ifdef CONFIG_IRQ_RELEASE_METHOD |
200 | void (*release)(unsigned int irq, void *dev_id); | 324 | void (*release)(unsigned int irq, void *dev_id); |
201 | #endif | 325 | #endif |
202 | }; | 326 | }; |
203 | 327 | ||
328 | /* | ||
329 | * irq_chip specific flags | ||
330 | * | ||
331 | * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type() | ||
332 | * IRQCHIP_EOI_IF_HANDLED: Only issue irq_eoi() when irq was handled | ||
333 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path | ||
334 | */ | ||
335 | enum { | ||
336 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | ||
337 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), | ||
338 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), | ||
339 | }; | ||
340 | |||
204 | /* This include will go away once we isolated irq_desc usage to core code */ | 341 | /* This include will go away once we isolated irq_desc usage to core code */ |
205 | #include <linux/irqdesc.h> | 342 | #include <linux/irqdesc.h> |
206 | 343 | ||
@@ -217,7 +354,7 @@ struct irq_chip { | |||
217 | # define ARCH_IRQ_INIT_FLAGS 0 | 354 | # define ARCH_IRQ_INIT_FLAGS 0 |
218 | #endif | 355 | #endif |
219 | 356 | ||
220 | #define IRQ_DEFAULT_INIT_FLAGS (IRQ_DISABLED | ARCH_IRQ_INIT_FLAGS) | 357 | #define IRQ_DEFAULT_INIT_FLAGS ARCH_IRQ_INIT_FLAGS |
221 | 358 | ||
222 | struct irqaction; | 359 | struct irqaction; |
223 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 360 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
@@ -228,9 +365,13 @@ extern void remove_irq(unsigned int irq, struct irqaction *act); | |||
228 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) | 365 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) |
229 | void move_native_irq(int irq); | 366 | void move_native_irq(int irq); |
230 | void move_masked_irq(int irq); | 367 | void move_masked_irq(int irq); |
368 | void irq_move_irq(struct irq_data *data); | ||
369 | void irq_move_masked_irq(struct irq_data *data); | ||
231 | #else | 370 | #else |
232 | static inline void move_native_irq(int irq) { } | 371 | static inline void move_native_irq(int irq) { } |
233 | static inline void move_masked_irq(int irq) { } | 372 | static inline void move_masked_irq(int irq) { } |
373 | static inline void irq_move_irq(struct irq_data *data) { } | ||
374 | static inline void irq_move_masked_irq(struct irq_data *data) { } | ||
234 | #endif | 375 | #endif |
235 | 376 | ||
236 | extern int no_irq_affinity; | 377 | extern int no_irq_affinity; |
@@ -266,23 +407,23 @@ extern struct irq_chip no_irq_chip; | |||
266 | extern struct irq_chip dummy_irq_chip; | 407 | extern struct irq_chip dummy_irq_chip; |
267 | 408 | ||
268 | extern void | 409 | extern void |
269 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | 410 | irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, |
270 | irq_flow_handler_t handle); | ||
271 | extern void | ||
272 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | ||
273 | irq_flow_handler_t handle, const char *name); | 411 | irq_flow_handler_t handle, const char *name); |
274 | 412 | ||
413 | static inline void irq_set_chip_and_handler(unsigned int irq, struct irq_chip *chip, | ||
414 | irq_flow_handler_t handle) | ||
415 | { | ||
416 | irq_set_chip_and_handler_name(irq, chip, handle, NULL); | ||
417 | } | ||
418 | |||
275 | extern void | 419 | extern void |
276 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | 420 | __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, |
277 | const char *name); | 421 | const char *name); |
278 | 422 | ||
279 | /* | ||
280 | * Set a highlevel flow handler for a given IRQ: | ||
281 | */ | ||
282 | static inline void | 423 | static inline void |
283 | set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | 424 | irq_set_handler(unsigned int irq, irq_flow_handler_t handle) |
284 | { | 425 | { |
285 | __set_irq_handler(irq, handle, 0, NULL); | 426 | __irq_set_handler(irq, handle, 0, NULL); |
286 | } | 427 | } |
287 | 428 | ||
288 | /* | 429 | /* |
@@ -291,14 +432,11 @@ set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | |||
291 | * IRQ_NOREQUEST and IRQ_NOPROBE) | 432 | * IRQ_NOREQUEST and IRQ_NOPROBE) |
292 | */ | 433 | */ |
293 | static inline void | 434 | static inline void |
294 | set_irq_chained_handler(unsigned int irq, | 435 | irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle) |
295 | irq_flow_handler_t handle) | ||
296 | { | 436 | { |
297 | __set_irq_handler(irq, handle, 1, NULL); | 437 | __irq_set_handler(irq, handle, 1, NULL); |
298 | } | 438 | } |
299 | 439 | ||
300 | extern void set_irq_nested_thread(unsigned int irq, int nest); | ||
301 | |||
302 | void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set); | 440 | void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set); |
303 | 441 | ||
304 | static inline void irq_set_status_flags(unsigned int irq, unsigned long set) | 442 | static inline void irq_set_status_flags(unsigned int irq, unsigned long set) |
@@ -311,16 +449,24 @@ static inline void irq_clear_status_flags(unsigned int irq, unsigned long clr) | |||
311 | irq_modify_status(irq, clr, 0); | 449 | irq_modify_status(irq, clr, 0); |
312 | } | 450 | } |
313 | 451 | ||
314 | static inline void set_irq_noprobe(unsigned int irq) | 452 | static inline void irq_set_noprobe(unsigned int irq) |
315 | { | 453 | { |
316 | irq_modify_status(irq, 0, IRQ_NOPROBE); | 454 | irq_modify_status(irq, 0, IRQ_NOPROBE); |
317 | } | 455 | } |
318 | 456 | ||
319 | static inline void set_irq_probe(unsigned int irq) | 457 | static inline void irq_set_probe(unsigned int irq) |
320 | { | 458 | { |
321 | irq_modify_status(irq, IRQ_NOPROBE, 0); | 459 | irq_modify_status(irq, IRQ_NOPROBE, 0); |
322 | } | 460 | } |
323 | 461 | ||
462 | static inline void irq_set_nested_thread(unsigned int irq, bool nest) | ||
463 | { | ||
464 | if (nest) | ||
465 | irq_set_status_flags(irq, IRQ_NESTED_THREAD); | ||
466 | else | ||
467 | irq_clear_status_flags(irq, IRQ_NESTED_THREAD); | ||
468 | } | ||
469 | |||
324 | /* Handle dynamic irq creation and destruction */ | 470 | /* Handle dynamic irq creation and destruction */ |
325 | extern unsigned int create_irq_nr(unsigned int irq_want, int node); | 471 | extern unsigned int create_irq_nr(unsigned int irq_want, int node); |
326 | extern int create_irq(void); | 472 | extern int create_irq(void); |
@@ -337,14 +483,14 @@ static inline void dynamic_irq_init(unsigned int irq) | |||
337 | } | 483 | } |
338 | 484 | ||
339 | /* Set/get chip/data for an IRQ: */ | 485 | /* Set/get chip/data for an IRQ: */ |
340 | extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); | 486 | extern int irq_set_chip(unsigned int irq, struct irq_chip *chip); |
341 | extern int set_irq_data(unsigned int irq, void *data); | 487 | extern int irq_set_handler_data(unsigned int irq, void *data); |
342 | extern int set_irq_chip_data(unsigned int irq, void *data); | 488 | extern int irq_set_chip_data(unsigned int irq, void *data); |
343 | extern int set_irq_type(unsigned int irq, unsigned int type); | 489 | extern int irq_set_irq_type(unsigned int irq, unsigned int type); |
344 | extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | 490 | extern int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry); |
345 | extern struct irq_data *irq_get_irq_data(unsigned int irq); | 491 | extern struct irq_data *irq_get_irq_data(unsigned int irq); |
346 | 492 | ||
347 | static inline struct irq_chip *get_irq_chip(unsigned int irq) | 493 | static inline struct irq_chip *irq_get_chip(unsigned int irq) |
348 | { | 494 | { |
349 | struct irq_data *d = irq_get_irq_data(irq); | 495 | struct irq_data *d = irq_get_irq_data(irq); |
350 | return d ? d->chip : NULL; | 496 | return d ? d->chip : NULL; |
@@ -355,7 +501,7 @@ static inline struct irq_chip *irq_data_get_irq_chip(struct irq_data *d) | |||
355 | return d->chip; | 501 | return d->chip; |
356 | } | 502 | } |
357 | 503 | ||
358 | static inline void *get_irq_chip_data(unsigned int irq) | 504 | static inline void *irq_get_chip_data(unsigned int irq) |
359 | { | 505 | { |
360 | struct irq_data *d = irq_get_irq_data(irq); | 506 | struct irq_data *d = irq_get_irq_data(irq); |
361 | return d ? d->chip_data : NULL; | 507 | return d ? d->chip_data : NULL; |
@@ -366,18 +512,18 @@ static inline void *irq_data_get_irq_chip_data(struct irq_data *d) | |||
366 | return d->chip_data; | 512 | return d->chip_data; |
367 | } | 513 | } |
368 | 514 | ||
369 | static inline void *get_irq_data(unsigned int irq) | 515 | static inline void *irq_get_handler_data(unsigned int irq) |
370 | { | 516 | { |
371 | struct irq_data *d = irq_get_irq_data(irq); | 517 | struct irq_data *d = irq_get_irq_data(irq); |
372 | return d ? d->handler_data : NULL; | 518 | return d ? d->handler_data : NULL; |
373 | } | 519 | } |
374 | 520 | ||
375 | static inline void *irq_data_get_irq_data(struct irq_data *d) | 521 | static inline void *irq_data_get_irq_handler_data(struct irq_data *d) |
376 | { | 522 | { |
377 | return d->handler_data; | 523 | return d->handler_data; |
378 | } | 524 | } |
379 | 525 | ||
380 | static inline struct msi_desc *get_irq_msi(unsigned int irq) | 526 | static inline struct msi_desc *irq_get_msi_desc(unsigned int irq) |
381 | { | 527 | { |
382 | struct irq_data *d = irq_get_irq_data(irq); | 528 | struct irq_data *d = irq_get_irq_data(irq); |
383 | return d ? d->msi_desc : NULL; | 529 | return d ? d->msi_desc : NULL; |
@@ -388,6 +534,89 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d) | |||
388 | return d->msi_desc; | 534 | return d->msi_desc; |
389 | } | 535 | } |
390 | 536 | ||
537 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
538 | /* Please do not use: Use the replacement functions instead */ | ||
539 | static inline int set_irq_chip(unsigned int irq, struct irq_chip *chip) | ||
540 | { | ||
541 | return irq_set_chip(irq, chip); | ||
542 | } | ||
543 | static inline int set_irq_data(unsigned int irq, void *data) | ||
544 | { | ||
545 | return irq_set_handler_data(irq, data); | ||
546 | } | ||
547 | static inline int set_irq_chip_data(unsigned int irq, void *data) | ||
548 | { | ||
549 | return irq_set_chip_data(irq, data); | ||
550 | } | ||
551 | static inline int set_irq_type(unsigned int irq, unsigned int type) | ||
552 | { | ||
553 | return irq_set_irq_type(irq, type); | ||
554 | } | ||
555 | static inline int set_irq_msi(unsigned int irq, struct msi_desc *entry) | ||
556 | { | ||
557 | return irq_set_msi_desc(irq, entry); | ||
558 | } | ||
559 | static inline struct irq_chip *get_irq_chip(unsigned int irq) | ||
560 | { | ||
561 | return irq_get_chip(irq); | ||
562 | } | ||
563 | static inline void *get_irq_chip_data(unsigned int irq) | ||
564 | { | ||
565 | return irq_get_chip_data(irq); | ||
566 | } | ||
567 | static inline void *get_irq_data(unsigned int irq) | ||
568 | { | ||
569 | return irq_get_handler_data(irq); | ||
570 | } | ||
571 | static inline void *irq_data_get_irq_data(struct irq_data *d) | ||
572 | { | ||
573 | return irq_data_get_irq_handler_data(d); | ||
574 | } | ||
575 | static inline struct msi_desc *get_irq_msi(unsigned int irq) | ||
576 | { | ||
577 | return irq_get_msi_desc(irq); | ||
578 | } | ||
579 | static inline void set_irq_noprobe(unsigned int irq) | ||
580 | { | ||
581 | irq_set_noprobe(irq); | ||
582 | } | ||
583 | static inline void set_irq_probe(unsigned int irq) | ||
584 | { | ||
585 | irq_set_probe(irq); | ||
586 | } | ||
587 | static inline void set_irq_nested_thread(unsigned int irq, int nest) | ||
588 | { | ||
589 | irq_set_nested_thread(irq, nest); | ||
590 | } | ||
591 | static inline void | ||
592 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | ||
593 | irq_flow_handler_t handle, const char *name) | ||
594 | { | ||
595 | irq_set_chip_and_handler_name(irq, chip, handle, name); | ||
596 | } | ||
597 | static inline void | ||
598 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | ||
599 | irq_flow_handler_t handle) | ||
600 | { | ||
601 | irq_set_chip_and_handler(irq, chip, handle); | ||
602 | } | ||
603 | static inline void | ||
604 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | ||
605 | const char *name) | ||
606 | { | ||
607 | __irq_set_handler(irq, handle, is_chained, name); | ||
608 | } | ||
609 | static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | ||
610 | { | ||
611 | irq_set_handler(irq, handle); | ||
612 | } | ||
613 | static inline void | ||
614 | set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle) | ||
615 | { | ||
616 | irq_set_chained_handler(irq, handle); | ||
617 | } | ||
618 | #endif | ||
619 | |||
391 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); | 620 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); |
392 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 621 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
393 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | 622 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index c1a95b7b58de..00218371518b 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -8,6 +8,7 @@ | |||
8 | * For now it's included from <linux/irq.h> | 8 | * For now it's included from <linux/irq.h> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | struct irq_affinity_notify; | ||
11 | struct proc_dir_entry; | 12 | struct proc_dir_entry; |
12 | struct timer_rand_state; | 13 | struct timer_rand_state; |
13 | /** | 14 | /** |
@@ -18,13 +19,16 @@ struct timer_rand_state; | |||
18 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] | 19 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] |
19 | * @action: the irq action chain | 20 | * @action: the irq action chain |
20 | * @status: status information | 21 | * @status: status information |
22 | * @core_internal_state__do_not_mess_with_it: core internal status information | ||
21 | * @depth: disable-depth, for nested irq_disable() calls | 23 | * @depth: disable-depth, for nested irq_disable() calls |
22 | * @wake_depth: enable depth, for multiple set_irq_wake() callers | 24 | * @wake_depth: enable depth, for multiple set_irq_wake() callers |
23 | * @irq_count: stats field to detect stalled irqs | 25 | * @irq_count: stats field to detect stalled irqs |
24 | * @last_unhandled: aging timer for unhandled count | 26 | * @last_unhandled: aging timer for unhandled count |
25 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 27 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
26 | * @lock: locking for SMP | 28 | * @lock: locking for SMP |
29 | * @affinity_notify: context for notification of affinity changes | ||
27 | * @pending_mask: pending rebalanced interrupts | 30 | * @pending_mask: pending rebalanced interrupts |
31 | * @threads_oneshot: bitfield to handle shared oneshot threads | ||
28 | * @threads_active: number of irqaction threads currently running | 32 | * @threads_active: number of irqaction threads currently running |
29 | * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers | 33 | * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers |
30 | * @dir: /proc/irq/ procfs entry | 34 | * @dir: /proc/irq/ procfs entry |
@@ -45,6 +49,7 @@ struct irq_desc { | |||
45 | struct { | 49 | struct { |
46 | unsigned int irq; | 50 | unsigned int irq; |
47 | unsigned int node; | 51 | unsigned int node; |
52 | unsigned int pad_do_not_even_think_about_it; | ||
48 | struct irq_chip *chip; | 53 | struct irq_chip *chip; |
49 | void *handler_data; | 54 | void *handler_data; |
50 | void *chip_data; | 55 | void *chip_data; |
@@ -59,9 +64,16 @@ struct irq_desc { | |||
59 | struct timer_rand_state *timer_rand_state; | 64 | struct timer_rand_state *timer_rand_state; |
60 | unsigned int __percpu *kstat_irqs; | 65 | unsigned int __percpu *kstat_irqs; |
61 | irq_flow_handler_t handle_irq; | 66 | irq_flow_handler_t handle_irq; |
67 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI | ||
68 | irq_preflow_handler_t preflow_handler; | ||
69 | #endif | ||
62 | struct irqaction *action; /* IRQ action list */ | 70 | struct irqaction *action; /* IRQ action list */ |
71 | #ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
72 | unsigned int status_use_accessors; | ||
73 | #else | ||
63 | unsigned int status; /* IRQ status */ | 74 | unsigned int status; /* IRQ status */ |
64 | 75 | #endif | |
76 | unsigned int core_internal_state__do_not_mess_with_it; | ||
65 | unsigned int depth; /* nested irq disables */ | 77 | unsigned int depth; /* nested irq disables */ |
66 | unsigned int wake_depth; /* nested wake enables */ | 78 | unsigned int wake_depth; /* nested wake enables */ |
67 | unsigned int irq_count; /* For detecting broken IRQs */ | 79 | unsigned int irq_count; /* For detecting broken IRQs */ |
@@ -70,10 +82,12 @@ struct irq_desc { | |||
70 | raw_spinlock_t lock; | 82 | raw_spinlock_t lock; |
71 | #ifdef CONFIG_SMP | 83 | #ifdef CONFIG_SMP |
72 | const struct cpumask *affinity_hint; | 84 | const struct cpumask *affinity_hint; |
85 | struct irq_affinity_notify *affinity_notify; | ||
73 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 86 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
74 | cpumask_var_t pending_mask; | 87 | cpumask_var_t pending_mask; |
75 | #endif | 88 | #endif |
76 | #endif | 89 | #endif |
90 | unsigned long threads_oneshot; | ||
77 | atomic_t threads_active; | 91 | atomic_t threads_active; |
78 | wait_queue_head_t wait_for_threads; | 92 | wait_queue_head_t wait_for_threads; |
79 | #ifdef CONFIG_PROC_FS | 93 | #ifdef CONFIG_PROC_FS |
@@ -95,10 +109,51 @@ static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node) | |||
95 | 109 | ||
96 | #ifdef CONFIG_GENERIC_HARDIRQS | 110 | #ifdef CONFIG_GENERIC_HARDIRQS |
97 | 111 | ||
98 | #define get_irq_desc_chip(desc) ((desc)->irq_data.chip) | 112 | static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) |
99 | #define get_irq_desc_chip_data(desc) ((desc)->irq_data.chip_data) | 113 | { |
100 | #define get_irq_desc_data(desc) ((desc)->irq_data.handler_data) | 114 | return &desc->irq_data; |
101 | #define get_irq_desc_msi(desc) ((desc)->irq_data.msi_desc) | 115 | } |
116 | |||
117 | static inline struct irq_chip *irq_desc_get_chip(struct irq_desc *desc) | ||
118 | { | ||
119 | return desc->irq_data.chip; | ||
120 | } | ||
121 | |||
122 | static inline void *irq_desc_get_chip_data(struct irq_desc *desc) | ||
123 | { | ||
124 | return desc->irq_data.chip_data; | ||
125 | } | ||
126 | |||
127 | static inline void *irq_desc_get_handler_data(struct irq_desc *desc) | ||
128 | { | ||
129 | return desc->irq_data.handler_data; | ||
130 | } | ||
131 | |||
132 | static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) | ||
133 | { | ||
134 | return desc->irq_data.msi_desc; | ||
135 | } | ||
136 | |||
137 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
138 | static inline struct irq_chip *get_irq_desc_chip(struct irq_desc *desc) | ||
139 | { | ||
140 | return irq_desc_get_chip(desc); | ||
141 | } | ||
142 | static inline void *get_irq_desc_data(struct irq_desc *desc) | ||
143 | { | ||
144 | return irq_desc_get_handler_data(desc); | ||
145 | } | ||
146 | |||
147 | static inline void *get_irq_desc_chip_data(struct irq_desc *desc) | ||
148 | { | ||
149 | return irq_desc_get_chip_data(desc); | ||
150 | } | ||
151 | |||
152 | static inline struct msi_desc *get_irq_desc_msi(struct irq_desc *desc) | ||
153 | { | ||
154 | return irq_desc_get_msi_desc(desc); | ||
155 | } | ||
156 | #endif | ||
102 | 157 | ||
103 | /* | 158 | /* |
104 | * Architectures call this to let the generic IRQ layer | 159 | * Architectures call this to let the generic IRQ layer |
@@ -123,6 +178,7 @@ static inline int irq_has_action(unsigned int irq) | |||
123 | return desc->action != NULL; | 178 | return desc->action != NULL; |
124 | } | 179 | } |
125 | 180 | ||
181 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
126 | static inline int irq_balancing_disabled(unsigned int irq) | 182 | static inline int irq_balancing_disabled(unsigned int irq) |
127 | { | 183 | { |
128 | struct irq_desc *desc; | 184 | struct irq_desc *desc; |
@@ -130,6 +186,7 @@ static inline int irq_balancing_disabled(unsigned int irq) | |||
130 | desc = irq_to_desc(irq); | 186 | desc = irq_to_desc(irq); |
131 | return desc->status & IRQ_NO_BALANCING_MASK; | 187 | return desc->status & IRQ_NO_BALANCING_MASK; |
132 | } | 188 | } |
189 | #endif | ||
133 | 190 | ||
134 | /* caller has locked the irq_desc and both params are valid */ | 191 | /* caller has locked the irq_desc and both params are valid */ |
135 | static inline void __set_irq_handler_unlocked(int irq, | 192 | static inline void __set_irq_handler_unlocked(int irq, |
@@ -140,6 +197,17 @@ static inline void __set_irq_handler_unlocked(int irq, | |||
140 | desc = irq_to_desc(irq); | 197 | desc = irq_to_desc(irq); |
141 | desc->handle_irq = handler; | 198 | desc->handle_irq = handler; |
142 | } | 199 | } |
200 | |||
201 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI | ||
202 | static inline void | ||
203 | __irq_set_preflow_handler(unsigned int irq, irq_preflow_handler_t handler) | ||
204 | { | ||
205 | struct irq_desc *desc; | ||
206 | |||
207 | desc = irq_to_desc(irq); | ||
208 | desc->preflow_handler = handler; | ||
209 | } | ||
210 | #endif | ||
143 | #endif | 211 | #endif |
144 | 212 | ||
145 | #endif | 213 | #endif |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 6811f4bfc6e7..922aa313c9f9 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -307,6 +307,7 @@ extern clock_t jiffies_to_clock_t(long x); | |||
307 | extern unsigned long clock_t_to_jiffies(unsigned long x); | 307 | extern unsigned long clock_t_to_jiffies(unsigned long x); |
308 | extern u64 jiffies_64_to_clock_t(u64 x); | 308 | extern u64 jiffies_64_to_clock_t(u64 x); |
309 | extern u64 nsec_to_clock_t(u64 x); | 309 | extern u64 nsec_to_clock_t(u64 x); |
310 | extern u64 nsecs_to_jiffies64(u64 n); | ||
310 | extern unsigned long nsecs_to_jiffies(u64 n); | 311 | extern unsigned long nsecs_to_jiffies(u64 n); |
311 | 312 | ||
312 | #define TIMESTAMP_SIZE 30 | 313 | #define TIMESTAMP_SIZE 30 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d07d8057e440..2fe6e84894a4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -575,12 +575,6 @@ struct sysinfo { | |||
575 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | 575 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
576 | }; | 576 | }; |
577 | 577 | ||
578 | /* Force a compilation error if condition is true */ | ||
579 | #define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition)) | ||
580 | |||
581 | /* Force a compilation error if condition is constant and true */ | ||
582 | #define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) | ||
583 | |||
584 | /* Force a compilation error if a constant expression is not a power of 2 */ | 578 | /* Force a compilation error if a constant expression is not a power of 2 */ |
585 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ | 579 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ |
586 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) | 580 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) |
@@ -592,6 +586,32 @@ struct sysinfo { | |||
592 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) | 586 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) |
593 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) | 587 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) |
594 | 588 | ||
589 | /** | ||
590 | * BUILD_BUG_ON - break compile if a condition is true. | ||
591 | * @condition: the condition which the compiler should know is false. | ||
592 | * | ||
593 | * If you have some code which relies on certain constants being equal, or | ||
594 | * other compile-time-evaluated condition, you should use BUILD_BUG_ON to | ||
595 | * detect if someone changes it. | ||
596 | * | ||
597 | * The implementation uses gcc's reluctance to create a negative array, but | ||
598 | * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments | ||
599 | * to inline functions). So as a fallback we use the optimizer; if it can't | ||
600 | * prove the condition is false, it will cause a link error on the undefined | ||
601 | * "__build_bug_on_failed". This error message can be harder to track down | ||
602 | * though, hence the two different methods. | ||
603 | */ | ||
604 | #ifndef __OPTIMIZE__ | ||
605 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | ||
606 | #else | ||
607 | extern int __build_bug_on_failed; | ||
608 | #define BUILD_BUG_ON(condition) \ | ||
609 | do { \ | ||
610 | ((void)sizeof(char[1 - 2*!!(condition)])); \ | ||
611 | if (condition) __build_bug_on_failed = 1; \ | ||
612 | } while(0) | ||
613 | #endif | ||
614 | |||
595 | /* Trap pasters of __FUNCTION__ at compile-time */ | 615 | /* Trap pasters of __FUNCTION__ at compile-time */ |
596 | #define __FUNCTION__ (__func__) | 616 | #define __FUNCTION__ (__func__) |
597 | 617 | ||
diff --git a/include/linux/klist.h b/include/linux/klist.h index e91a4e59b771..a370ce57cf1d 100644 --- a/include/linux/klist.h +++ b/include/linux/klist.h | |||
@@ -22,7 +22,7 @@ struct klist { | |||
22 | struct list_head k_list; | 22 | struct list_head k_list; |
23 | void (*get)(struct klist_node *); | 23 | void (*get)(struct klist_node *); |
24 | void (*put)(struct klist_node *); | 24 | void (*put)(struct klist_node *); |
25 | } __attribute__ ((aligned (4))); | 25 | } __attribute__ ((aligned (sizeof(void *)))); |
26 | 26 | ||
27 | #define KLIST_INIT(_name, _get, _put) \ | 27 | #define KLIST_INIT(_name, _get, _put) \ |
28 | { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ | 28 | { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ |
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index 08d7dc4ddf40..39f8453239f7 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h | |||
@@ -76,7 +76,7 @@ bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size); | |||
76 | \ | 76 | \ |
77 | _n = (long) &((ptr)->name##_end) \ | 77 | _n = (long) &((ptr)->name##_end) \ |
78 | - (long) &((ptr)->name##_begin); \ | 78 | - (long) &((ptr)->name##_begin); \ |
79 | MAYBE_BUILD_BUG_ON(_n < 0); \ | 79 | BUILD_BUG_ON(_n < 0); \ |
80 | \ | 80 | \ |
81 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ | 81 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ |
82 | } while (0) | 82 | } while (0) |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index ce0775aa64c3..7ff16f7d3ed4 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
@@ -64,7 +64,7 @@ struct kthread_work { | |||
64 | }; | 64 | }; |
65 | 65 | ||
66 | #define KTHREAD_WORKER_INIT(worker) { \ | 66 | #define KTHREAD_WORKER_INIT(worker) { \ |
67 | .lock = SPIN_LOCK_UNLOCKED, \ | 67 | .lock = __SPIN_LOCK_UNLOCKED((worker).lock), \ |
68 | .work_list = LIST_HEAD_INIT((worker).work_list), \ | 68 | .work_list = LIST_HEAD_INIT((worker).work_list), \ |
69 | } | 69 | } |
70 | 70 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index c9c5d7ad1a2b..c71f46960f39 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -179,10 +179,6 @@ enum { | |||
179 | ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ | 179 | ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ |
180 | /* (doesn't imply presence) */ | 180 | /* (doesn't imply presence) */ |
181 | ATA_FLAG_SATA = (1 << 1), | 181 | ATA_FLAG_SATA = (1 << 1), |
182 | ATA_FLAG_NO_LEGACY = (1 << 2), /* no legacy mode check */ | ||
183 | ATA_FLAG_MMIO = (1 << 3), /* use MMIO, not PIO */ | ||
184 | ATA_FLAG_SRST = (1 << 4), /* (obsolete) use ATA SRST, not E.D.D. */ | ||
185 | ATA_FLAG_SATA_RESET = (1 << 5), /* (obsolete) use COMRESET */ | ||
186 | ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */ | 182 | ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */ |
187 | ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ | 183 | ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ |
188 | ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */ | 184 | ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */ |
@@ -198,7 +194,6 @@ enum { | |||
198 | ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */ | 194 | ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */ |
199 | ATA_FLAG_AN = (1 << 18), /* controller supports AN */ | 195 | ATA_FLAG_AN = (1 << 18), /* controller supports AN */ |
200 | ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */ | 196 | ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */ |
201 | ATA_FLAG_LPM = (1 << 20), /* driver can handle LPM */ | ||
202 | ATA_FLAG_EM = (1 << 21), /* driver supports enclosure | 197 | ATA_FLAG_EM = (1 << 21), /* driver supports enclosure |
203 | * management */ | 198 | * management */ |
204 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity | 199 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity |
@@ -1050,6 +1045,8 @@ extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | |||
1050 | int queue_depth, int reason); | 1045 | int queue_depth, int reason); |
1051 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); | 1046 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); |
1052 | extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); | 1047 | extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); |
1048 | extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap); | ||
1049 | extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q); | ||
1053 | 1050 | ||
1054 | extern int ata_cable_40wire(struct ata_port *ap); | 1051 | extern int ata_cable_40wire(struct ata_port *ap); |
1055 | extern int ata_cable_80wire(struct ata_port *ap); | 1052 | extern int ata_cable_80wire(struct ata_port *ap); |
@@ -1613,6 +1610,9 @@ extern void ata_sff_irq_on(struct ata_port *ap); | |||
1613 | extern void ata_sff_irq_clear(struct ata_port *ap); | 1610 | extern void ata_sff_irq_clear(struct ata_port *ap); |
1614 | extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, | 1611 | extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, |
1615 | u8 status, int in_wq); | 1612 | u8 status, int in_wq); |
1613 | extern void ata_sff_queue_work(struct work_struct *work); | ||
1614 | extern void ata_sff_queue_delayed_work(struct delayed_work *dwork, | ||
1615 | unsigned long delay); | ||
1616 | extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay); | 1616 | extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay); |
1617 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); | 1617 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); |
1618 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); | 1618 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); |
diff --git a/include/linux/list.h b/include/linux/list.h index 9a5f8a71810c..3a54266a1e85 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -96,6 +96,11 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) | |||
96 | * in an undefined state. | 96 | * in an undefined state. |
97 | */ | 97 | */ |
98 | #ifndef CONFIG_DEBUG_LIST | 98 | #ifndef CONFIG_DEBUG_LIST |
99 | static inline void __list_del_entry(struct list_head *entry) | ||
100 | { | ||
101 | __list_del(entry->prev, entry->next); | ||
102 | } | ||
103 | |||
99 | static inline void list_del(struct list_head *entry) | 104 | static inline void list_del(struct list_head *entry) |
100 | { | 105 | { |
101 | __list_del(entry->prev, entry->next); | 106 | __list_del(entry->prev, entry->next); |
@@ -103,6 +108,7 @@ static inline void list_del(struct list_head *entry) | |||
103 | entry->prev = LIST_POISON2; | 108 | entry->prev = LIST_POISON2; |
104 | } | 109 | } |
105 | #else | 110 | #else |
111 | extern void __list_del_entry(struct list_head *entry); | ||
106 | extern void list_del(struct list_head *entry); | 112 | extern void list_del(struct list_head *entry); |
107 | #endif | 113 | #endif |
108 | 114 | ||
@@ -135,7 +141,7 @@ static inline void list_replace_init(struct list_head *old, | |||
135 | */ | 141 | */ |
136 | static inline void list_del_init(struct list_head *entry) | 142 | static inline void list_del_init(struct list_head *entry) |
137 | { | 143 | { |
138 | __list_del(entry->prev, entry->next); | 144 | __list_del_entry(entry); |
139 | INIT_LIST_HEAD(entry); | 145 | INIT_LIST_HEAD(entry); |
140 | } | 146 | } |
141 | 147 | ||
@@ -146,7 +152,7 @@ static inline void list_del_init(struct list_head *entry) | |||
146 | */ | 152 | */ |
147 | static inline void list_move(struct list_head *list, struct list_head *head) | 153 | static inline void list_move(struct list_head *list, struct list_head *head) |
148 | { | 154 | { |
149 | __list_del(list->prev, list->next); | 155 | __list_del_entry(list); |
150 | list_add(list, head); | 156 | list_add(list, head); |
151 | } | 157 | } |
152 | 158 | ||
@@ -158,7 +164,7 @@ static inline void list_move(struct list_head *list, struct list_head *head) | |||
158 | static inline void list_move_tail(struct list_head *list, | 164 | static inline void list_move_tail(struct list_head *list, |
159 | struct list_head *head) | 165 | struct list_head *head) |
160 | { | 166 | { |
161 | __list_del(list->prev, list->next); | 167 | __list_del_entry(list); |
162 | list_add_tail(list, head); | 168 | list_add_tail(list, head); |
163 | } | 169 | } |
164 | 170 | ||
diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h index 3fd36845ca45..ef4f0b6083a3 100644 --- a/include/linux/mfd/wm8994/core.h +++ b/include/linux/mfd/wm8994/core.h | |||
@@ -71,6 +71,7 @@ struct wm8994 { | |||
71 | u16 irq_masks_cache[WM8994_NUM_IRQ_REGS]; | 71 | u16 irq_masks_cache[WM8994_NUM_IRQ_REGS]; |
72 | 72 | ||
73 | /* Used over suspend/resume */ | 73 | /* Used over suspend/resume */ |
74 | bool suspended; | ||
74 | u16 ldo_regs[WM8994_NUM_LDO_REGS]; | 75 | u16 ldo_regs[WM8994_NUM_LDO_REGS]; |
75 | u16 gpio_regs[WM8994_NUM_GPIO_REGS]; | 76 | u16 gpio_regs[WM8994_NUM_GPIO_REGS]; |
76 | 77 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index f6385fc17ad4..679300c050f5 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1309,8 +1309,6 @@ int add_from_early_node_map(struct range *range, int az, | |||
1309 | int nr_range, int nid); | 1309 | int nr_range, int nid); |
1310 | u64 __init find_memory_core_early(int nid, u64 size, u64 align, | 1310 | u64 __init find_memory_core_early(int nid, u64 size, u64 align, |
1311 | u64 goal, u64 limit); | 1311 | u64 goal, u64 limit); |
1312 | void *__alloc_memory_core_early(int nodeid, u64 size, u64 align, | ||
1313 | u64 goal, u64 limit); | ||
1314 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); | 1312 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); |
1315 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); | 1313 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); |
1316 | extern void sparse_memory_present_with_active_regions(int nid); | 1314 | extern void sparse_memory_present_with_active_regions(int nid); |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index bf173502d744..38d393092812 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -94,12 +94,12 @@ struct sh_mmcif_plat_data { | |||
94 | 94 | ||
95 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) | 95 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) |
96 | { | 96 | { |
97 | return readl(addr + reg); | 97 | return __raw_readl(addr + reg); |
98 | } | 98 | } |
99 | 99 | ||
100 | static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | 100 | static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) |
101 | { | 101 | { |
102 | writel(val, addr + reg); | 102 | __raw_writel(val, addr + reg); |
103 | } | 103 | } |
104 | 104 | ||
105 | #define SH_MMCIF_BBS 512 /* boot block size */ | 105 | #define SH_MMCIF_BBS 512 /* boot block size */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 8b17fd8c790d..5de42043dff0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -58,6 +58,12 @@ struct module_attribute { | |||
58 | void (*free)(struct module *); | 58 | void (*free)(struct module *); |
59 | }; | 59 | }; |
60 | 60 | ||
61 | struct module_version_attribute { | ||
62 | struct module_attribute mattr; | ||
63 | const char *module_name; | ||
64 | const char *version; | ||
65 | } __attribute__ ((__aligned__(sizeof(void *)))); | ||
66 | |||
61 | struct module_kobject | 67 | struct module_kobject |
62 | { | 68 | { |
63 | struct kobject kobj; | 69 | struct kobject kobj; |
@@ -161,7 +167,28 @@ extern struct module __this_module; | |||
161 | Using this automatically adds a checksum of the .c files and the | 167 | Using this automatically adds a checksum of the .c files and the |
162 | local headers in "srcversion". | 168 | local headers in "srcversion". |
163 | */ | 169 | */ |
170 | |||
171 | #if defined(MODULE) || !defined(CONFIG_SYSFS) | ||
164 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) | 172 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) |
173 | #else | ||
174 | #define MODULE_VERSION(_version) \ | ||
175 | extern ssize_t __modver_version_show(struct module_attribute *, \ | ||
176 | struct module *, char *); \ | ||
177 | static struct module_version_attribute __modver_version_attr \ | ||
178 | __used \ | ||
179 | __attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \ | ||
180 | = { \ | ||
181 | .mattr = { \ | ||
182 | .attr = { \ | ||
183 | .name = "version", \ | ||
184 | .mode = S_IRUGO, \ | ||
185 | }, \ | ||
186 | .show = __modver_version_show, \ | ||
187 | }, \ | ||
188 | .module_name = KBUILD_MODNAME, \ | ||
189 | .version = _version, \ | ||
190 | } | ||
191 | #endif | ||
165 | 192 | ||
166 | /* Optional firmware file (or files) needed by the module | 193 | /* Optional firmware file (or files) needed by the module |
167 | * format is simply firmware file name. Multiple firmware | 194 | * format is simply firmware file name. Multiple firmware |
@@ -350,7 +377,7 @@ struct module | |||
350 | keeping pointers to this stuff */ | 377 | keeping pointers to this stuff */ |
351 | char *args; | 378 | char *args; |
352 | #ifdef CONFIG_TRACEPOINTS | 379 | #ifdef CONFIG_TRACEPOINTS |
353 | struct tracepoint *tracepoints; | 380 | struct tracepoint * const *tracepoints_ptrs; |
354 | unsigned int num_tracepoints; | 381 | unsigned int num_tracepoints; |
355 | #endif | 382 | #endif |
356 | #ifdef HAVE_JUMP_LABEL | 383 | #ifdef HAVE_JUMP_LABEL |
@@ -362,7 +389,7 @@ struct module | |||
362 | unsigned int num_trace_bprintk_fmt; | 389 | unsigned int num_trace_bprintk_fmt; |
363 | #endif | 390 | #endif |
364 | #ifdef CONFIG_EVENT_TRACING | 391 | #ifdef CONFIG_EVENT_TRACING |
365 | struct ftrace_event_call *trace_events; | 392 | struct ftrace_event_call **trace_events; |
366 | unsigned int num_trace_events; | 393 | unsigned int num_trace_events; |
367 | #endif | 394 | #endif |
368 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 395 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 112adf8bd47d..07b41951e3fa 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -16,15 +16,17 @@ | |||
16 | /* Chosen so that structs with an unsigned long line up. */ | 16 | /* Chosen so that structs with an unsigned long line up. */ |
17 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) | 17 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) |
18 | 18 | ||
19 | #ifdef MODULE | ||
20 | #define ___module_cat(a,b) __mod_ ## a ## b | 19 | #define ___module_cat(a,b) __mod_ ## a ## b |
21 | #define __module_cat(a,b) ___module_cat(a,b) | 20 | #define __module_cat(a,b) ___module_cat(a,b) |
21 | #ifdef MODULE | ||
22 | #define __MODULE_INFO(tag, name, info) \ | 22 | #define __MODULE_INFO(tag, name, info) \ |
23 | static const char __module_cat(name,__LINE__)[] \ | 23 | static const char __module_cat(name,__LINE__)[] \ |
24 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ | 24 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ |
25 | = __stringify(tag) "=" info | 25 | = __stringify(tag) "=" info |
26 | #else /* !MODULE */ | 26 | #else /* !MODULE */ |
27 | #define __MODULE_INFO(tag, name, info) | 27 | /* This struct is here for syntactic coherency, it is not used */ |
28 | #define __MODULE_INFO(tag, name, info) \ | ||
29 | struct __module_cat(name,__LINE__) {} | ||
28 | #endif | 30 | #endif |
29 | #define __MODULE_PARM_TYPE(name, _type) \ | 31 | #define __MODULE_PARM_TYPE(name, _type) \ |
30 | __MODULE_INFO(parmtype, name##type, #name ":" _type) | 32 | __MODULE_INFO(parmtype, name##type, #name ":" _type) |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 0fa7a3a874c8..b21d567692b2 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -150,6 +150,7 @@ static inline int ip_mroute_opt(int opt) | |||
150 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int); | 150 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int); |
151 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 151 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
152 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); | 152 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); |
153 | extern int ipmr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | ||
153 | extern int ip_mr_init(void); | 154 | extern int ip_mr_init(void); |
154 | #else | 155 | #else |
155 | static inline | 156 | static inline |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 6091ab77f388..9d2deb200f54 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
@@ -136,6 +136,7 @@ extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned int | |||
136 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 136 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
137 | extern int ip6_mr_input(struct sk_buff *skb); | 137 | extern int ip6_mr_input(struct sk_buff *skb); |
138 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); | 138 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); |
139 | extern int ip6mr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | ||
139 | extern int ip6_mr_init(void); | 140 | extern int ip6_mr_init(void); |
140 | extern void ip6_mr_cleanup(void); | 141 | extern void ip6_mr_cleanup(void); |
141 | #else | 142 | #else |
diff --git a/include/linux/namei.h b/include/linux/namei.h index f276d4fa01fc..9c8603872c36 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -19,7 +19,6 @@ struct nameidata { | |||
19 | struct path path; | 19 | struct path path; |
20 | struct qstr last; | 20 | struct qstr last; |
21 | struct path root; | 21 | struct path root; |
22 | struct file *file; | ||
23 | struct inode *inode; /* path.dentry.d_inode */ | 22 | struct inode *inode; /* path.dentry.d_inode */ |
24 | unsigned int flags; | 23 | unsigned int flags; |
25 | unsigned seq; | 24 | unsigned seq; |
@@ -63,6 +62,10 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
63 | #define LOOKUP_EXCL 0x0400 | 62 | #define LOOKUP_EXCL 0x0400 |
64 | #define LOOKUP_RENAME_TARGET 0x0800 | 63 | #define LOOKUP_RENAME_TARGET 0x0800 |
65 | 64 | ||
65 | #define LOOKUP_JUMPED 0x1000 | ||
66 | #define LOOKUP_ROOT 0x2000 | ||
67 | #define LOOKUP_EMPTY 0x4000 | ||
68 | |||
66 | extern int user_path_at(int, const char __user *, unsigned, struct path *); | 69 | extern int user_path_at(int, const char __user *, unsigned, struct path *); |
67 | 70 | ||
68 | #define user_path(name, path) user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW, path) | 71 | #define user_path(name, path) user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW, path) |
@@ -72,7 +75,7 @@ extern int user_path_at(int, const char __user *, unsigned, struct path *); | |||
72 | 75 | ||
73 | extern int kern_path(const char *, unsigned, struct path *); | 76 | extern int kern_path(const char *, unsigned, struct path *); |
74 | 77 | ||
75 | extern int path_lookup(const char *, unsigned, struct nameidata *); | 78 | extern int kern_path_parent(const char *, struct nameidata *); |
76 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, | 79 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
77 | const char *, unsigned int, struct nameidata *); | 80 | const char *, unsigned int, struct nameidata *); |
78 | 81 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d971346b0340..71caf7a5e6c6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2392,6 +2392,9 @@ extern int netdev_notice(const struct net_device *dev, const char *format, ...) | |||
2392 | extern int netdev_info(const struct net_device *dev, const char *format, ...) | 2392 | extern int netdev_info(const struct net_device *dev, const char *format, ...) |
2393 | __attribute__ ((format (printf, 2, 3))); | 2393 | __attribute__ ((format (printf, 2, 3))); |
2394 | 2394 | ||
2395 | #define MODULE_ALIAS_NETDEV(device) \ | ||
2396 | MODULE_ALIAS("netdev-" device) | ||
2397 | |||
2395 | #if defined(DEBUG) | 2398 | #if defined(DEBUG) |
2396 | #define netdev_dbg(__dev, format, args...) \ | 2399 | #define netdev_dbg(__dev, format, args...) \ |
2397 | netdev_printk(KERN_DEBUG, __dev, format, ##args) | 2400 | netdev_printk(KERN_DEBUG, __dev, format, ##args) |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index b197563913bf..3e112de12d8d 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -68,11 +68,7 @@ struct nfs_client { | |||
68 | unsigned char cl_id_uniquifier; | 68 | unsigned char cl_id_uniquifier; |
69 | u32 cl_cb_ident; /* v4.0 callback identifier */ | 69 | u32 cl_cb_ident; /* v4.0 callback identifier */ |
70 | const struct nfs4_minor_version_ops *cl_mvops; | 70 | const struct nfs4_minor_version_ops *cl_mvops; |
71 | #endif /* CONFIG_NFS_V4 */ | ||
72 | 71 | ||
73 | #ifdef CONFIG_NFS_V4_1 | ||
74 | /* clientid returned from EXCHANGE_ID, used by session operations */ | ||
75 | u64 cl_ex_clid; | ||
76 | /* The sequence id to use for the next CREATE_SESSION */ | 72 | /* The sequence id to use for the next CREATE_SESSION */ |
77 | u32 cl_seqid; | 73 | u32 cl_seqid; |
78 | /* The flags used for obtaining the clientid during EXCHANGE_ID */ | 74 | /* The flags used for obtaining the clientid during EXCHANGE_ID */ |
@@ -80,7 +76,7 @@ struct nfs_client { | |||
80 | struct nfs4_session *cl_session; /* sharred session */ | 76 | struct nfs4_session *cl_session; /* sharred session */ |
81 | struct list_head cl_layouts; | 77 | struct list_head cl_layouts; |
82 | struct pnfs_deviceid_cache *cl_devid_cache; /* pNFS deviceid cache */ | 78 | struct pnfs_deviceid_cache *cl_devid_cache; /* pNFS deviceid cache */ |
83 | #endif /* CONFIG_NFS_V4_1 */ | 79 | #endif /* CONFIG_NFS_V4 */ |
84 | 80 | ||
85 | #ifdef CONFIG_NFS_FSCACHE | 81 | #ifdef CONFIG_NFS_FSCACHE |
86 | struct fscache_cookie *fscache; /* client index cache cookie */ | 82 | struct fscache_cookie *fscache; /* client index cache cookie */ |
@@ -185,7 +181,7 @@ struct nfs_server { | |||
185 | /* maximum number of slots to use */ | 181 | /* maximum number of slots to use */ |
186 | #define NFS4_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE | 182 | #define NFS4_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE |
187 | 183 | ||
188 | #if defined(CONFIG_NFS_V4_1) | 184 | #if defined(CONFIG_NFS_V4) |
189 | 185 | ||
190 | /* Sessions */ | 186 | /* Sessions */ |
191 | #define SLOT_TABLE_SZ (NFS4_MAX_SLOT_TABLE/(8*sizeof(long))) | 187 | #define SLOT_TABLE_SZ (NFS4_MAX_SLOT_TABLE/(8*sizeof(long))) |
@@ -225,5 +221,5 @@ struct nfs4_session { | |||
225 | struct nfs_client *clp; | 221 | struct nfs_client *clp; |
226 | }; | 222 | }; |
227 | 223 | ||
228 | #endif /* CONFIG_NFS_V4_1 */ | 224 | #endif /* CONFIG_NFS_V4 */ |
229 | #endif | 225 | #endif |
diff --git a/include/linux/nfsacl.h b/include/linux/nfsacl.h index f321b578edeb..fabcb1e5c460 100644 --- a/include/linux/nfsacl.h +++ b/include/linux/nfsacl.h | |||
@@ -51,10 +51,10 @@ nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) | |||
51 | return w; | 51 | return w; |
52 | } | 52 | } |
53 | 53 | ||
54 | extern unsigned int | 54 | extern int |
55 | nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, | 55 | nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, |
56 | struct posix_acl *acl, int encode_entries, int typeflag); | 56 | struct posix_acl *acl, int encode_entries, int typeflag); |
57 | extern unsigned int | 57 | extern int |
58 | nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, | 58 | nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, |
59 | struct posix_acl **pacl); | 59 | struct posix_acl **pacl); |
60 | 60 | ||
diff --git a/include/linux/of.h b/include/linux/of.h index cad7cf0ab278..266db1d0baa9 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -23,8 +23,6 @@ | |||
23 | 23 | ||
24 | #include <asm/byteorder.h> | 24 | #include <asm/byteorder.h> |
25 | 25 | ||
26 | #ifdef CONFIG_OF | ||
27 | |||
28 | typedef u32 phandle; | 26 | typedef u32 phandle; |
29 | typedef u32 ihandle; | 27 | typedef u32 ihandle; |
30 | 28 | ||
@@ -65,11 +63,18 @@ struct device_node { | |||
65 | #endif | 63 | #endif |
66 | }; | 64 | }; |
67 | 65 | ||
66 | #ifdef CONFIG_OF | ||
67 | |||
68 | /* Pointer for first entry in chain of all nodes. */ | 68 | /* Pointer for first entry in chain of all nodes. */ |
69 | extern struct device_node *allnodes; | 69 | extern struct device_node *allnodes; |
70 | extern struct device_node *of_chosen; | 70 | extern struct device_node *of_chosen; |
71 | extern rwlock_t devtree_lock; | 71 | extern rwlock_t devtree_lock; |
72 | 72 | ||
73 | static inline bool of_have_populated_dt(void) | ||
74 | { | ||
75 | return allnodes != NULL; | ||
76 | } | ||
77 | |||
73 | static inline bool of_node_is_root(const struct device_node *node) | 78 | static inline bool of_node_is_root(const struct device_node *node) |
74 | { | 79 | { |
75 | return node && (node->parent == NULL); | 80 | return node && (node->parent == NULL); |
@@ -222,5 +227,12 @@ extern void of_attach_node(struct device_node *); | |||
222 | extern void of_detach_node(struct device_node *); | 227 | extern void of_detach_node(struct device_node *); |
223 | #endif | 228 | #endif |
224 | 229 | ||
230 | #else | ||
231 | |||
232 | static inline bool of_have_populated_dt(void) | ||
233 | { | ||
234 | return false; | ||
235 | } | ||
236 | |||
225 | #endif /* CONFIG_OF */ | 237 | #endif /* CONFIG_OF */ |
226 | #endif /* _LINUX_OF_H */ | 238 | #endif /* _LINUX_OF_H */ |
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h new file mode 100644 index 000000000000..85a27b650d76 --- /dev/null +++ b/include/linux/of_pci.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef __OF_PCI_H | ||
2 | #define __OF_PCI_H | ||
3 | |||
4 | #include <linux/pci.h> | ||
5 | |||
6 | struct pci_dev; | ||
7 | struct of_irq; | ||
8 | int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); | ||
9 | #endif | ||
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 32fb81212fd1..1ca64113efe8 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/errno.h> | ||
20 | #include <linux/printk.h> | ||
19 | #include <asm/atomic.h> | 21 | #include <asm/atomic.h> |
20 | 22 | ||
21 | /* Each escaped entry is prefixed by ESCAPE_CODE | 23 | /* Each escaped entry is prefixed by ESCAPE_CODE |
@@ -186,10 +188,17 @@ int oprofile_add_data(struct op_entry *entry, unsigned long val); | |||
186 | int oprofile_add_data64(struct op_entry *entry, u64 val); | 188 | int oprofile_add_data64(struct op_entry *entry, u64 val); |
187 | int oprofile_write_commit(struct op_entry *entry); | 189 | int oprofile_write_commit(struct op_entry *entry); |
188 | 190 | ||
189 | #ifdef CONFIG_PERF_EVENTS | 191 | #ifdef CONFIG_HW_PERF_EVENTS |
190 | int __init oprofile_perf_init(struct oprofile_operations *ops); | 192 | int __init oprofile_perf_init(struct oprofile_operations *ops); |
191 | void oprofile_perf_exit(void); | 193 | void oprofile_perf_exit(void); |
192 | char *op_name_from_perf_id(void); | 194 | char *op_name_from_perf_id(void); |
193 | #endif /* CONFIG_PERF_EVENTS */ | 195 | #else |
196 | static inline int __init oprofile_perf_init(struct oprofile_operations *ops) | ||
197 | { | ||
198 | pr_info("oprofile: hardware counters not available\n"); | ||
199 | return -ENODEV; | ||
200 | } | ||
201 | static inline void oprofile_perf_exit(void) { } | ||
202 | #endif /* CONFIG_HW_PERF_EVENTS */ | ||
194 | 203 | ||
195 | #endif /* OPROFILE_H */ | 204 | #endif /* OPROFILE_H */ |
diff --git a/include/linux/pata_arasan_cf_data.h b/include/linux/pata_arasan_cf_data.h new file mode 100644 index 000000000000..a6ee9aa898bb --- /dev/null +++ b/include/linux/pata_arasan_cf_data.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * include/linux/pata_arasan_cf_data.h | ||
3 | * | ||
4 | * Arasan Compact Flash host controller platform data header file | ||
5 | * | ||
6 | * Copyright (C) 2011 ST Microelectronics | ||
7 | * Viresh Kumar <viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef _PATA_ARASAN_CF_DATA_H | ||
15 | #define _PATA_ARASAN_CF_DATA_H | ||
16 | |||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | struct arasan_cf_pdata { | ||
20 | u8 cf_if_clk; | ||
21 | #define CF_IF_CLK_100M (0x0) | ||
22 | #define CF_IF_CLK_75M (0x1) | ||
23 | #define CF_IF_CLK_66M (0x2) | ||
24 | #define CF_IF_CLK_50M (0x3) | ||
25 | #define CF_IF_CLK_40M (0x4) | ||
26 | #define CF_IF_CLK_33M (0x5) | ||
27 | #define CF_IF_CLK_25M (0x6) | ||
28 | #define CF_IF_CLK_125M (0x7) | ||
29 | #define CF_IF_CLK_150M (0x8) | ||
30 | #define CF_IF_CLK_166M (0x9) | ||
31 | #define CF_IF_CLK_200M (0xA) | ||
32 | /* | ||
33 | * Platform specific incapabilities of CF controller is handled via | ||
34 | * quirks | ||
35 | */ | ||
36 | u32 quirk; | ||
37 | #define CF_BROKEN_PIO (1) | ||
38 | #define CF_BROKEN_MWDMA (1 << 1) | ||
39 | #define CF_BROKEN_UDMA (1 << 2) | ||
40 | /* This is platform specific data for the DMA controller */ | ||
41 | void *dma_priv; | ||
42 | }; | ||
43 | |||
44 | static inline void | ||
45 | set_arasan_cf_pdata(struct platform_device *pdev, struct arasan_cf_pdata *data) | ||
46 | { | ||
47 | pdev->dev.platform_data = data; | ||
48 | } | ||
49 | #endif /* _PATA_ARASAN_CF_DATA_H */ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3adb06ebf841..580de67f318b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -518,6 +518,7 @@ | |||
518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 | 518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 |
519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 | 519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 |
520 | #define PCI_DEVICE_ID_AMD_15H_NB_MISC 0x1603 | 520 | #define PCI_DEVICE_ID_AMD_15H_NB_MISC 0x1603 |
521 | #define PCI_DEVICE_ID_AMD_15H_NB_LINK 0x1604 | ||
521 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 | 522 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 |
522 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 523 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
523 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 524 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 27c3c6fcfad3..3a5c4449fd36 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -255,6 +255,30 @@ extern void __bad_size_call_parameter(void); | |||
255 | pscr2_ret__; \ | 255 | pscr2_ret__; \ |
256 | }) | 256 | }) |
257 | 257 | ||
258 | /* | ||
259 | * Special handling for cmpxchg_double. cmpxchg_double is passed two | ||
260 | * percpu variables. The first has to be aligned to a double word | ||
261 | * boundary and the second has to follow directly thereafter. | ||
262 | */ | ||
263 | #define __pcpu_double_call_return_bool(stem, pcp1, pcp2, ...) \ | ||
264 | ({ \ | ||
265 | bool pdcrb_ret__; \ | ||
266 | __verify_pcpu_ptr(&pcp1); \ | ||
267 | BUILD_BUG_ON(sizeof(pcp1) != sizeof(pcp2)); \ | ||
268 | VM_BUG_ON((unsigned long)(&pcp1) % (2 * sizeof(pcp1))); \ | ||
269 | VM_BUG_ON((unsigned long)(&pcp2) != \ | ||
270 | (unsigned long)(&pcp1) + sizeof(pcp1)); \ | ||
271 | switch(sizeof(pcp1)) { \ | ||
272 | case 1: pdcrb_ret__ = stem##1(pcp1, pcp2, __VA_ARGS__); break; \ | ||
273 | case 2: pdcrb_ret__ = stem##2(pcp1, pcp2, __VA_ARGS__); break; \ | ||
274 | case 4: pdcrb_ret__ = stem##4(pcp1, pcp2, __VA_ARGS__); break; \ | ||
275 | case 8: pdcrb_ret__ = stem##8(pcp1, pcp2, __VA_ARGS__); break; \ | ||
276 | default: \ | ||
277 | __bad_size_call_parameter(); break; \ | ||
278 | } \ | ||
279 | pdcrb_ret__; \ | ||
280 | }) | ||
281 | |||
258 | #define __pcpu_size_call(stem, variable, ...) \ | 282 | #define __pcpu_size_call(stem, variable, ...) \ |
259 | do { \ | 283 | do { \ |
260 | __verify_pcpu_ptr(&(variable)); \ | 284 | __verify_pcpu_ptr(&(variable)); \ |
@@ -501,6 +525,45 @@ do { \ | |||
501 | #endif | 525 | #endif |
502 | 526 | ||
503 | /* | 527 | /* |
528 | * cmpxchg_double replaces two adjacent scalars at once. The first | ||
529 | * two parameters are per cpu variables which have to be of the same | ||
530 | * size. A truth value is returned to indicate success or failure | ||
531 | * (since a double register result is difficult to handle). There is | ||
532 | * very limited hardware support for these operations, so only certain | ||
533 | * sizes may work. | ||
534 | */ | ||
535 | #define _this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
536 | ({ \ | ||
537 | int ret__; \ | ||
538 | preempt_disable(); \ | ||
539 | ret__ = __this_cpu_generic_cmpxchg_double(pcp1, pcp2, \ | ||
540 | oval1, oval2, nval1, nval2); \ | ||
541 | preempt_enable(); \ | ||
542 | ret__; \ | ||
543 | }) | ||
544 | |||
545 | #ifndef this_cpu_cmpxchg_double | ||
546 | # ifndef this_cpu_cmpxchg_double_1 | ||
547 | # define this_cpu_cmpxchg_double_1(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
548 | _this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
549 | # endif | ||
550 | # ifndef this_cpu_cmpxchg_double_2 | ||
551 | # define this_cpu_cmpxchg_double_2(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
552 | _this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
553 | # endif | ||
554 | # ifndef this_cpu_cmpxchg_double_4 | ||
555 | # define this_cpu_cmpxchg_double_4(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
556 | _this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
557 | # endif | ||
558 | # ifndef this_cpu_cmpxchg_double_8 | ||
559 | # define this_cpu_cmpxchg_double_8(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
560 | _this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
561 | # endif | ||
562 | # define this_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
563 | __pcpu_double_call_return_bool(this_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2)) | ||
564 | #endif | ||
565 | |||
566 | /* | ||
504 | * Generic percpu operations that do not require preemption handling. | 567 | * Generic percpu operations that do not require preemption handling. |
505 | * Either we do not care about races or the caller has the | 568 | * Either we do not care about races or the caller has the |
506 | * responsibility of handling preemptions issues. Arch code can still | 569 | * responsibility of handling preemptions issues. Arch code can still |
@@ -703,6 +766,39 @@ do { \ | |||
703 | __pcpu_size_call_return2(__this_cpu_cmpxchg_, pcp, oval, nval) | 766 | __pcpu_size_call_return2(__this_cpu_cmpxchg_, pcp, oval, nval) |
704 | #endif | 767 | #endif |
705 | 768 | ||
769 | #define __this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
770 | ({ \ | ||
771 | int __ret = 0; \ | ||
772 | if (__this_cpu_read(pcp1) == (oval1) && \ | ||
773 | __this_cpu_read(pcp2) == (oval2)) { \ | ||
774 | __this_cpu_write(pcp1, (nval1)); \ | ||
775 | __this_cpu_write(pcp2, (nval2)); \ | ||
776 | __ret = 1; \ | ||
777 | } \ | ||
778 | (__ret); \ | ||
779 | }) | ||
780 | |||
781 | #ifndef __this_cpu_cmpxchg_double | ||
782 | # ifndef __this_cpu_cmpxchg_double_1 | ||
783 | # define __this_cpu_cmpxchg_double_1(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
784 | __this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
785 | # endif | ||
786 | # ifndef __this_cpu_cmpxchg_double_2 | ||
787 | # define __this_cpu_cmpxchg_double_2(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
788 | __this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
789 | # endif | ||
790 | # ifndef __this_cpu_cmpxchg_double_4 | ||
791 | # define __this_cpu_cmpxchg_double_4(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
792 | __this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
793 | # endif | ||
794 | # ifndef __this_cpu_cmpxchg_double_8 | ||
795 | # define __this_cpu_cmpxchg_double_8(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
796 | __this_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
797 | # endif | ||
798 | # define __this_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
799 | __pcpu_double_call_return_bool(__this_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2)) | ||
800 | #endif | ||
801 | |||
706 | /* | 802 | /* |
707 | * IRQ safe versions of the per cpu RMW operations. Note that these operations | 803 | * IRQ safe versions of the per cpu RMW operations. Note that these operations |
708 | * are *not* safe against modification of the same variable from another | 804 | * are *not* safe against modification of the same variable from another |
@@ -823,4 +919,36 @@ do { \ | |||
823 | __pcpu_size_call_return2(irqsafe_cpu_cmpxchg_, (pcp), oval, nval) | 919 | __pcpu_size_call_return2(irqsafe_cpu_cmpxchg_, (pcp), oval, nval) |
824 | #endif | 920 | #endif |
825 | 921 | ||
922 | #define irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
923 | ({ \ | ||
924 | int ret__; \ | ||
925 | unsigned long flags; \ | ||
926 | local_irq_save(flags); \ | ||
927 | ret__ = __this_cpu_generic_cmpxchg_double(pcp1, pcp2, \ | ||
928 | oval1, oval2, nval1, nval2); \ | ||
929 | local_irq_restore(flags); \ | ||
930 | ret__; \ | ||
931 | }) | ||
932 | |||
933 | #ifndef irqsafe_cpu_cmpxchg_double | ||
934 | # ifndef irqsafe_cpu_cmpxchg_double_1 | ||
935 | # define irqsafe_cpu_cmpxchg_double_1(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
936 | irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
937 | # endif | ||
938 | # ifndef irqsafe_cpu_cmpxchg_double_2 | ||
939 | # define irqsafe_cpu_cmpxchg_double_2(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
940 | irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
941 | # endif | ||
942 | # ifndef irqsafe_cpu_cmpxchg_double_4 | ||
943 | # define irqsafe_cpu_cmpxchg_double_4(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
944 | irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
945 | # endif | ||
946 | # ifndef irqsafe_cpu_cmpxchg_double_8 | ||
947 | # define irqsafe_cpu_cmpxchg_double_8(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
948 | irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | ||
949 | # endif | ||
950 | # define irqsafe_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | ||
951 | __pcpu_double_call_return_int(irqsafe_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2)) | ||
952 | #endif | ||
953 | |||
826 | #endif /* __LINUX_PERCPU_H */ | 954 | #endif /* __LINUX_PERCPU_H */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index dda5b0a3ff60..614615b8d42b 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -225,8 +225,14 @@ struct perf_event_attr { | |||
225 | }; | 225 | }; |
226 | 226 | ||
227 | __u32 bp_type; | 227 | __u32 bp_type; |
228 | __u64 bp_addr; | 228 | union { |
229 | __u64 bp_len; | 229 | __u64 bp_addr; |
230 | __u64 config1; /* extension of config */ | ||
231 | }; | ||
232 | union { | ||
233 | __u64 bp_len; | ||
234 | __u64 config2; /* extension of config1 */ | ||
235 | }; | ||
230 | }; | 236 | }; |
231 | 237 | ||
232 | /* | 238 | /* |
@@ -464,6 +470,7 @@ enum perf_callchain_context { | |||
464 | 470 | ||
465 | #define PERF_FLAG_FD_NO_GROUP (1U << 0) | 471 | #define PERF_FLAG_FD_NO_GROUP (1U << 0) |
466 | #define PERF_FLAG_FD_OUTPUT (1U << 1) | 472 | #define PERF_FLAG_FD_OUTPUT (1U << 1) |
473 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ | ||
467 | 474 | ||
468 | #ifdef __KERNEL__ | 475 | #ifdef __KERNEL__ |
469 | /* | 476 | /* |
@@ -471,6 +478,7 @@ enum perf_callchain_context { | |||
471 | */ | 478 | */ |
472 | 479 | ||
473 | #ifdef CONFIG_PERF_EVENTS | 480 | #ifdef CONFIG_PERF_EVENTS |
481 | # include <linux/cgroup.h> | ||
474 | # include <asm/perf_event.h> | 482 | # include <asm/perf_event.h> |
475 | # include <asm/local64.h> | 483 | # include <asm/local64.h> |
476 | #endif | 484 | #endif |
@@ -539,6 +547,9 @@ struct hw_perf_event { | |||
539 | unsigned long event_base; | 547 | unsigned long event_base; |
540 | int idx; | 548 | int idx; |
541 | int last_cpu; | 549 | int last_cpu; |
550 | unsigned int extra_reg; | ||
551 | u64 extra_config; | ||
552 | int extra_alloc; | ||
542 | }; | 553 | }; |
543 | struct { /* software */ | 554 | struct { /* software */ |
544 | struct hrtimer hrtimer; | 555 | struct hrtimer hrtimer; |
@@ -716,6 +727,22 @@ struct swevent_hlist { | |||
716 | #define PERF_ATTACH_GROUP 0x02 | 727 | #define PERF_ATTACH_GROUP 0x02 |
717 | #define PERF_ATTACH_TASK 0x04 | 728 | #define PERF_ATTACH_TASK 0x04 |
718 | 729 | ||
730 | #ifdef CONFIG_CGROUP_PERF | ||
731 | /* | ||
732 | * perf_cgroup_info keeps track of time_enabled for a cgroup. | ||
733 | * This is a per-cpu dynamically allocated data structure. | ||
734 | */ | ||
735 | struct perf_cgroup_info { | ||
736 | u64 time; | ||
737 | u64 timestamp; | ||
738 | }; | ||
739 | |||
740 | struct perf_cgroup { | ||
741 | struct cgroup_subsys_state css; | ||
742 | struct perf_cgroup_info *info; /* timing info, one per cpu */ | ||
743 | }; | ||
744 | #endif | ||
745 | |||
719 | /** | 746 | /** |
720 | * struct perf_event - performance event kernel representation: | 747 | * struct perf_event - performance event kernel representation: |
721 | */ | 748 | */ |
@@ -832,6 +859,11 @@ struct perf_event { | |||
832 | struct event_filter *filter; | 859 | struct event_filter *filter; |
833 | #endif | 860 | #endif |
834 | 861 | ||
862 | #ifdef CONFIG_CGROUP_PERF | ||
863 | struct perf_cgroup *cgrp; /* cgroup event is attach to */ | ||
864 | int cgrp_defer_enabled; | ||
865 | #endif | ||
866 | |||
835 | #endif /* CONFIG_PERF_EVENTS */ | 867 | #endif /* CONFIG_PERF_EVENTS */ |
836 | }; | 868 | }; |
837 | 869 | ||
@@ -886,6 +918,7 @@ struct perf_event_context { | |||
886 | u64 generation; | 918 | u64 generation; |
887 | int pin_count; | 919 | int pin_count; |
888 | struct rcu_head rcu_head; | 920 | struct rcu_head rcu_head; |
921 | int nr_cgroups; /* cgroup events present */ | ||
889 | }; | 922 | }; |
890 | 923 | ||
891 | /* | 924 | /* |
@@ -905,6 +938,9 @@ struct perf_cpu_context { | |||
905 | struct list_head rotation_list; | 938 | struct list_head rotation_list; |
906 | int jiffies_interval; | 939 | int jiffies_interval; |
907 | struct pmu *active_pmu; | 940 | struct pmu *active_pmu; |
941 | #ifdef CONFIG_CGROUP_PERF | ||
942 | struct perf_cgroup *cgrp; | ||
943 | #endif | ||
908 | }; | 944 | }; |
909 | 945 | ||
910 | struct perf_output_handle { | 946 | struct perf_output_handle { |
@@ -1040,11 +1076,11 @@ have_event: | |||
1040 | __perf_sw_event(event_id, nr, nmi, regs, addr); | 1076 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
1041 | } | 1077 | } |
1042 | 1078 | ||
1043 | extern atomic_t perf_task_events; | 1079 | extern atomic_t perf_sched_events; |
1044 | 1080 | ||
1045 | static inline void perf_event_task_sched_in(struct task_struct *task) | 1081 | static inline void perf_event_task_sched_in(struct task_struct *task) |
1046 | { | 1082 | { |
1047 | COND_STMT(&perf_task_events, __perf_event_task_sched_in(task)); | 1083 | COND_STMT(&perf_sched_events, __perf_event_task_sched_in(task)); |
1048 | } | 1084 | } |
1049 | 1085 | ||
1050 | static inline | 1086 | static inline |
@@ -1052,7 +1088,7 @@ void perf_event_task_sched_out(struct task_struct *task, struct task_struct *nex | |||
1052 | { | 1088 | { |
1053 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); | 1089 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); |
1054 | 1090 | ||
1055 | COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next)); | 1091 | COND_STMT(&perf_sched_events, __perf_event_task_sched_out(task, next)); |
1056 | } | 1092 | } |
1057 | 1093 | ||
1058 | extern void perf_event_mmap(struct vm_area_struct *vma); | 1094 | extern void perf_event_mmap(struct vm_area_struct *vma); |
@@ -1083,6 +1119,10 @@ extern int sysctl_perf_event_paranoid; | |||
1083 | extern int sysctl_perf_event_mlock; | 1119 | extern int sysctl_perf_event_mlock; |
1084 | extern int sysctl_perf_event_sample_rate; | 1120 | extern int sysctl_perf_event_sample_rate; |
1085 | 1121 | ||
1122 | extern int perf_proc_update_handler(struct ctl_table *table, int write, | ||
1123 | void __user *buffer, size_t *lenp, | ||
1124 | loff_t *ppos); | ||
1125 | |||
1086 | static inline bool perf_paranoid_tracepoint_raw(void) | 1126 | static inline bool perf_paranoid_tracepoint_raw(void) |
1087 | { | 1127 | { |
1088 | return sysctl_perf_event_paranoid > -1; | 1128 | return sysctl_perf_event_paranoid > -1; |
diff --git a/include/linux/plist.h b/include/linux/plist.h index 7254eda078e5..c9b9f322c8d8 100644 --- a/include/linux/plist.h +++ b/include/linux/plist.h | |||
@@ -31,15 +31,17 @@ | |||
31 | * | 31 | * |
32 | * Simple ASCII art explanation: | 32 | * Simple ASCII art explanation: |
33 | * | 33 | * |
34 | * |HEAD | | 34 | * pl:prio_list (only for plist_node) |
35 | * | | | 35 | * nl:node_list |
36 | * |prio_list.prev|<------------------------------------| | 36 | * HEAD| NODE(S) |
37 | * |prio_list.next|<->|pl|<->|pl|<--------------->|pl|<-| | 37 | * | |
38 | * |10 | |10| |21| |21| |21| |40| (prio) | 38 | * ||------------------------------------| |
39 | * | | | | | | | | | | | | | 39 | * ||->|pl|<->|pl|<--------------->|pl|<-| |
40 | * | | | | | | | | | | | | | 40 | * | |10| |21| |21| |21| |40| (prio) |
41 | * |node_list.next|<->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<-| | 41 | * | | | | | | | | | | | |
42 | * |node_list.prev|<------------------------------------| | 42 | * | | | | | | | | | | | |
43 | * |->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<-| | ||
44 | * |-------------------------------------------| | ||
43 | * | 45 | * |
44 | * The nodes on the prio_list list are sorted by priority to simplify | 46 | * The nodes on the prio_list list are sorted by priority to simplify |
45 | * the insertion of new nodes. There are no nodes with duplicate | 47 | * the insertion of new nodes. There are no nodes with duplicate |
@@ -78,7 +80,6 @@ | |||
78 | #include <linux/spinlock_types.h> | 80 | #include <linux/spinlock_types.h> |
79 | 81 | ||
80 | struct plist_head { | 82 | struct plist_head { |
81 | struct list_head prio_list; | ||
82 | struct list_head node_list; | 83 | struct list_head node_list; |
83 | #ifdef CONFIG_DEBUG_PI_LIST | 84 | #ifdef CONFIG_DEBUG_PI_LIST |
84 | raw_spinlock_t *rawlock; | 85 | raw_spinlock_t *rawlock; |
@@ -88,7 +89,8 @@ struct plist_head { | |||
88 | 89 | ||
89 | struct plist_node { | 90 | struct plist_node { |
90 | int prio; | 91 | int prio; |
91 | struct plist_head plist; | 92 | struct list_head prio_list; |
93 | struct list_head node_list; | ||
92 | }; | 94 | }; |
93 | 95 | ||
94 | #ifdef CONFIG_DEBUG_PI_LIST | 96 | #ifdef CONFIG_DEBUG_PI_LIST |
@@ -100,7 +102,6 @@ struct plist_node { | |||
100 | #endif | 102 | #endif |
101 | 103 | ||
102 | #define _PLIST_HEAD_INIT(head) \ | 104 | #define _PLIST_HEAD_INIT(head) \ |
103 | .prio_list = LIST_HEAD_INIT((head).prio_list), \ | ||
104 | .node_list = LIST_HEAD_INIT((head).node_list) | 105 | .node_list = LIST_HEAD_INIT((head).node_list) |
105 | 106 | ||
106 | /** | 107 | /** |
@@ -133,7 +134,8 @@ struct plist_node { | |||
133 | #define PLIST_NODE_INIT(node, __prio) \ | 134 | #define PLIST_NODE_INIT(node, __prio) \ |
134 | { \ | 135 | { \ |
135 | .prio = (__prio), \ | 136 | .prio = (__prio), \ |
136 | .plist = { _PLIST_HEAD_INIT((node).plist) }, \ | 137 | .prio_list = LIST_HEAD_INIT((node).prio_list), \ |
138 | .node_list = LIST_HEAD_INIT((node).node_list), \ | ||
137 | } | 139 | } |
138 | 140 | ||
139 | /** | 141 | /** |
@@ -144,7 +146,6 @@ struct plist_node { | |||
144 | static inline void | 146 | static inline void |
145 | plist_head_init(struct plist_head *head, spinlock_t *lock) | 147 | plist_head_init(struct plist_head *head, spinlock_t *lock) |
146 | { | 148 | { |
147 | INIT_LIST_HEAD(&head->prio_list); | ||
148 | INIT_LIST_HEAD(&head->node_list); | 149 | INIT_LIST_HEAD(&head->node_list); |
149 | #ifdef CONFIG_DEBUG_PI_LIST | 150 | #ifdef CONFIG_DEBUG_PI_LIST |
150 | head->spinlock = lock; | 151 | head->spinlock = lock; |
@@ -160,7 +161,6 @@ plist_head_init(struct plist_head *head, spinlock_t *lock) | |||
160 | static inline void | 161 | static inline void |
161 | plist_head_init_raw(struct plist_head *head, raw_spinlock_t *lock) | 162 | plist_head_init_raw(struct plist_head *head, raw_spinlock_t *lock) |
162 | { | 163 | { |
163 | INIT_LIST_HEAD(&head->prio_list); | ||
164 | INIT_LIST_HEAD(&head->node_list); | 164 | INIT_LIST_HEAD(&head->node_list); |
165 | #ifdef CONFIG_DEBUG_PI_LIST | 165 | #ifdef CONFIG_DEBUG_PI_LIST |
166 | head->rawlock = lock; | 166 | head->rawlock = lock; |
@@ -176,7 +176,8 @@ plist_head_init_raw(struct plist_head *head, raw_spinlock_t *lock) | |||
176 | static inline void plist_node_init(struct plist_node *node, int prio) | 176 | static inline void plist_node_init(struct plist_node *node, int prio) |
177 | { | 177 | { |
178 | node->prio = prio; | 178 | node->prio = prio; |
179 | plist_head_init(&node->plist, NULL); | 179 | INIT_LIST_HEAD(&node->prio_list); |
180 | INIT_LIST_HEAD(&node->node_list); | ||
180 | } | 181 | } |
181 | 182 | ||
182 | extern void plist_add(struct plist_node *node, struct plist_head *head); | 183 | extern void plist_add(struct plist_node *node, struct plist_head *head); |
@@ -188,7 +189,7 @@ extern void plist_del(struct plist_node *node, struct plist_head *head); | |||
188 | * @head: the head for your list | 189 | * @head: the head for your list |
189 | */ | 190 | */ |
190 | #define plist_for_each(pos, head) \ | 191 | #define plist_for_each(pos, head) \ |
191 | list_for_each_entry(pos, &(head)->node_list, plist.node_list) | 192 | list_for_each_entry(pos, &(head)->node_list, node_list) |
192 | 193 | ||
193 | /** | 194 | /** |
194 | * plist_for_each_safe - iterate safely over a plist of given type | 195 | * plist_for_each_safe - iterate safely over a plist of given type |
@@ -199,7 +200,7 @@ extern void plist_del(struct plist_node *node, struct plist_head *head); | |||
199 | * Iterate over a plist of given type, safe against removal of list entry. | 200 | * Iterate over a plist of given type, safe against removal of list entry. |
200 | */ | 201 | */ |
201 | #define plist_for_each_safe(pos, n, head) \ | 202 | #define plist_for_each_safe(pos, n, head) \ |
202 | list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) | 203 | list_for_each_entry_safe(pos, n, &(head)->node_list, node_list) |
203 | 204 | ||
204 | /** | 205 | /** |
205 | * plist_for_each_entry - iterate over list of given type | 206 | * plist_for_each_entry - iterate over list of given type |
@@ -208,7 +209,7 @@ extern void plist_del(struct plist_node *node, struct plist_head *head); | |||
208 | * @mem: the name of the list_struct within the struct | 209 | * @mem: the name of the list_struct within the struct |
209 | */ | 210 | */ |
210 | #define plist_for_each_entry(pos, head, mem) \ | 211 | #define plist_for_each_entry(pos, head, mem) \ |
211 | list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) | 212 | list_for_each_entry(pos, &(head)->node_list, mem.node_list) |
212 | 213 | ||
213 | /** | 214 | /** |
214 | * plist_for_each_entry_safe - iterate safely over list of given type | 215 | * plist_for_each_entry_safe - iterate safely over list of given type |
@@ -220,7 +221,7 @@ extern void plist_del(struct plist_node *node, struct plist_head *head); | |||
220 | * Iterate over list of given type, safe against removal of list entry. | 221 | * Iterate over list of given type, safe against removal of list entry. |
221 | */ | 222 | */ |
222 | #define plist_for_each_entry_safe(pos, n, head, m) \ | 223 | #define plist_for_each_entry_safe(pos, n, head, m) \ |
223 | list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) | 224 | list_for_each_entry_safe(pos, n, &(head)->node_list, m.node_list) |
224 | 225 | ||
225 | /** | 226 | /** |
226 | * plist_head_empty - return !0 if a plist_head is empty | 227 | * plist_head_empty - return !0 if a plist_head is empty |
@@ -237,7 +238,7 @@ static inline int plist_head_empty(const struct plist_head *head) | |||
237 | */ | 238 | */ |
238 | static inline int plist_node_empty(const struct plist_node *node) | 239 | static inline int plist_node_empty(const struct plist_node *node) |
239 | { | 240 | { |
240 | return plist_head_empty(&node->plist); | 241 | return list_empty(&node->node_list); |
241 | } | 242 | } |
242 | 243 | ||
243 | /* All functions below assume the plist_head is not empty. */ | 244 | /* All functions below assume the plist_head is not empty. */ |
@@ -285,7 +286,7 @@ static inline int plist_node_empty(const struct plist_node *node) | |||
285 | static inline struct plist_node *plist_first(const struct plist_head *head) | 286 | static inline struct plist_node *plist_first(const struct plist_head *head) |
286 | { | 287 | { |
287 | return list_entry(head->node_list.next, | 288 | return list_entry(head->node_list.next, |
288 | struct plist_node, plist.node_list); | 289 | struct plist_node, node_list); |
289 | } | 290 | } |
290 | 291 | ||
291 | /** | 292 | /** |
@@ -297,7 +298,7 @@ static inline struct plist_node *plist_first(const struct plist_head *head) | |||
297 | static inline struct plist_node *plist_last(const struct plist_head *head) | 298 | static inline struct plist_node *plist_last(const struct plist_head *head) |
298 | { | 299 | { |
299 | return list_entry(head->node_list.prev, | 300 | return list_entry(head->node_list.prev, |
300 | struct plist_node, plist.node_list); | 301 | struct plist_node, node_list); |
301 | } | 302 | } |
302 | 303 | ||
303 | #endif | 304 | #endif |
diff --git a/include/linux/pm.h b/include/linux/pm.h index dd9c7ab38270..21415cc91cbb 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -431,6 +431,8 @@ struct dev_pm_info { | |||
431 | struct list_head entry; | 431 | struct list_head entry; |
432 | struct completion completion; | 432 | struct completion completion; |
433 | struct wakeup_source *wakeup; | 433 | struct wakeup_source *wakeup; |
434 | #else | ||
435 | unsigned int should_wakeup:1; | ||
434 | #endif | 436 | #endif |
435 | #ifdef CONFIG_PM_RUNTIME | 437 | #ifdef CONFIG_PM_RUNTIME |
436 | struct timer_list suspend_timer; | 438 | struct timer_list suspend_timer; |
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h index 9cff00dd6b63..03a67db03d01 100644 --- a/include/linux/pm_wakeup.h +++ b/include/linux/pm_wakeup.h | |||
@@ -109,11 +109,6 @@ static inline bool device_can_wakeup(struct device *dev) | |||
109 | return dev->power.can_wakeup; | 109 | return dev->power.can_wakeup; |
110 | } | 110 | } |
111 | 111 | ||
112 | static inline bool device_may_wakeup(struct device *dev) | ||
113 | { | ||
114 | return false; | ||
115 | } | ||
116 | |||
117 | static inline struct wakeup_source *wakeup_source_create(const char *name) | 112 | static inline struct wakeup_source *wakeup_source_create(const char *name) |
118 | { | 113 | { |
119 | return NULL; | 114 | return NULL; |
@@ -134,24 +129,32 @@ static inline void wakeup_source_unregister(struct wakeup_source *ws) {} | |||
134 | 129 | ||
135 | static inline int device_wakeup_enable(struct device *dev) | 130 | static inline int device_wakeup_enable(struct device *dev) |
136 | { | 131 | { |
137 | return -EINVAL; | 132 | dev->power.should_wakeup = true; |
133 | return 0; | ||
138 | } | 134 | } |
139 | 135 | ||
140 | static inline int device_wakeup_disable(struct device *dev) | 136 | static inline int device_wakeup_disable(struct device *dev) |
141 | { | 137 | { |
138 | dev->power.should_wakeup = false; | ||
142 | return 0; | 139 | return 0; |
143 | } | 140 | } |
144 | 141 | ||
145 | static inline int device_init_wakeup(struct device *dev, bool val) | 142 | static inline int device_set_wakeup_enable(struct device *dev, bool enable) |
146 | { | 143 | { |
147 | dev->power.can_wakeup = val; | 144 | dev->power.should_wakeup = enable; |
148 | return val ? -EINVAL : 0; | 145 | return 0; |
149 | } | 146 | } |
150 | 147 | ||
148 | static inline int device_init_wakeup(struct device *dev, bool val) | ||
149 | { | ||
150 | device_set_wakeup_capable(dev, val); | ||
151 | device_set_wakeup_enable(dev, val); | ||
152 | return 0; | ||
153 | } | ||
151 | 154 | ||
152 | static inline int device_set_wakeup_enable(struct device *dev, bool enable) | 155 | static inline bool device_may_wakeup(struct device *dev) |
153 | { | 156 | { |
154 | return -EINVAL; | 157 | return dev->power.can_wakeup && dev->power.should_wakeup; |
155 | } | 158 | } |
156 | 159 | ||
157 | static inline void __pm_stay_awake(struct wakeup_source *ws) {} | 160 | static inline void __pm_stay_awake(struct wakeup_source *ws) {} |
diff --git a/include/linux/posix-clock.h b/include/linux/posix-clock.h new file mode 100644 index 000000000000..369e19d3750b --- /dev/null +++ b/include/linux/posix-clock.h | |||
@@ -0,0 +1,150 @@ | |||
1 | /* | ||
2 | * posix-clock.h - support for dynamic clock devices | ||
3 | * | ||
4 | * Copyright (C) 2010 OMICRON electronics GmbH | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | #ifndef _LINUX_POSIX_CLOCK_H_ | ||
21 | #define _LINUX_POSIX_CLOCK_H_ | ||
22 | |||
23 | #include <linux/cdev.h> | ||
24 | #include <linux/fs.h> | ||
25 | #include <linux/poll.h> | ||
26 | #include <linux/posix-timers.h> | ||
27 | |||
28 | struct posix_clock; | ||
29 | |||
30 | /** | ||
31 | * struct posix_clock_operations - functional interface to the clock | ||
32 | * | ||
33 | * Every posix clock is represented by a character device. Drivers may | ||
34 | * optionally offer extended capabilities by implementing the | ||
35 | * character device methods. The character device file operations are | ||
36 | * first handled by the clock device layer, then passed on to the | ||
37 | * driver by calling these functions. | ||
38 | * | ||
39 | * @owner: The clock driver should set to THIS_MODULE | ||
40 | * @clock_adjtime: Adjust the clock | ||
41 | * @clock_gettime: Read the current time | ||
42 | * @clock_getres: Get the clock resolution | ||
43 | * @clock_settime: Set the current time value | ||
44 | * @timer_create: Create a new timer | ||
45 | * @timer_delete: Remove a previously created timer | ||
46 | * @timer_gettime: Get remaining time and interval of a timer | ||
47 | * @timer_setttime: Set a timer's initial expiration and interval | ||
48 | * @fasync: Optional character device fasync method | ||
49 | * @mmap: Optional character device mmap method | ||
50 | * @open: Optional character device open method | ||
51 | * @release: Optional character device release method | ||
52 | * @ioctl: Optional character device ioctl method | ||
53 | * @read: Optional character device read method | ||
54 | * @poll: Optional character device poll method | ||
55 | */ | ||
56 | struct posix_clock_operations { | ||
57 | struct module *owner; | ||
58 | |||
59 | int (*clock_adjtime)(struct posix_clock *pc, struct timex *tx); | ||
60 | |||
61 | int (*clock_gettime)(struct posix_clock *pc, struct timespec *ts); | ||
62 | |||
63 | int (*clock_getres) (struct posix_clock *pc, struct timespec *ts); | ||
64 | |||
65 | int (*clock_settime)(struct posix_clock *pc, | ||
66 | const struct timespec *ts); | ||
67 | |||
68 | int (*timer_create) (struct posix_clock *pc, struct k_itimer *kit); | ||
69 | |||
70 | int (*timer_delete) (struct posix_clock *pc, struct k_itimer *kit); | ||
71 | |||
72 | void (*timer_gettime)(struct posix_clock *pc, | ||
73 | struct k_itimer *kit, struct itimerspec *tsp); | ||
74 | |||
75 | int (*timer_settime)(struct posix_clock *pc, | ||
76 | struct k_itimer *kit, int flags, | ||
77 | struct itimerspec *tsp, struct itimerspec *old); | ||
78 | /* | ||
79 | * Optional character device methods: | ||
80 | */ | ||
81 | int (*fasync) (struct posix_clock *pc, | ||
82 | int fd, struct file *file, int on); | ||
83 | |||
84 | long (*ioctl) (struct posix_clock *pc, | ||
85 | unsigned int cmd, unsigned long arg); | ||
86 | |||
87 | int (*mmap) (struct posix_clock *pc, | ||
88 | struct vm_area_struct *vma); | ||
89 | |||
90 | int (*open) (struct posix_clock *pc, fmode_t f_mode); | ||
91 | |||
92 | uint (*poll) (struct posix_clock *pc, | ||
93 | struct file *file, poll_table *wait); | ||
94 | |||
95 | int (*release) (struct posix_clock *pc); | ||
96 | |||
97 | ssize_t (*read) (struct posix_clock *pc, | ||
98 | uint flags, char __user *buf, size_t cnt); | ||
99 | }; | ||
100 | |||
101 | /** | ||
102 | * struct posix_clock - represents a dynamic posix clock | ||
103 | * | ||
104 | * @ops: Functional interface to the clock | ||
105 | * @cdev: Character device instance for this clock | ||
106 | * @kref: Reference count. | ||
107 | * @mutex: Protects the 'zombie' field from concurrent access. | ||
108 | * @zombie: If 'zombie' is true, then the hardware has disappeared. | ||
109 | * @release: A function to free the structure when the reference count reaches | ||
110 | * zero. May be NULL if structure is statically allocated. | ||
111 | * | ||
112 | * Drivers should embed their struct posix_clock within a private | ||
113 | * structure, obtaining a reference to it during callbacks using | ||
114 | * container_of(). | ||
115 | */ | ||
116 | struct posix_clock { | ||
117 | struct posix_clock_operations ops; | ||
118 | struct cdev cdev; | ||
119 | struct kref kref; | ||
120 | struct mutex mutex; | ||
121 | bool zombie; | ||
122 | void (*release)(struct posix_clock *clk); | ||
123 | }; | ||
124 | |||
125 | /** | ||
126 | * posix_clock_register() - register a new clock | ||
127 | * @clk: Pointer to the clock. Caller must provide 'ops' and 'release' | ||
128 | * @devid: Allocated device id | ||
129 | * | ||
130 | * A clock driver calls this function to register itself with the | ||
131 | * clock device subsystem. If 'clk' points to dynamically allocated | ||
132 | * memory, then the caller must provide a 'release' function to free | ||
133 | * that memory. | ||
134 | * | ||
135 | * Returns zero on success, non-zero otherwise. | ||
136 | */ | ||
137 | int posix_clock_register(struct posix_clock *clk, dev_t devid); | ||
138 | |||
139 | /** | ||
140 | * posix_clock_unregister() - unregister a clock | ||
141 | * @clk: Clock instance previously registered via posix_clock_register() | ||
142 | * | ||
143 | * A clock driver calls this function to remove itself from the clock | ||
144 | * device subsystem. The posix_clock itself will remain (in an | ||
145 | * inactive state) until its reference count drops to zero, at which | ||
146 | * point it will be deallocated with its 'release' method. | ||
147 | */ | ||
148 | void posix_clock_unregister(struct posix_clock *clk); | ||
149 | |||
150 | #endif | ||
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 3e23844a6990..d51243ae0726 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/timex.h> | ||
7 | 8 | ||
8 | union cpu_time_count { | 9 | union cpu_time_count { |
9 | cputime_t cpu; | 10 | cputime_t cpu; |
@@ -17,10 +18,21 @@ struct cpu_timer_list { | |||
17 | int firing; | 18 | int firing; |
18 | }; | 19 | }; |
19 | 20 | ||
21 | /* | ||
22 | * Bit fields within a clockid: | ||
23 | * | ||
24 | * The most significant 29 bits hold either a pid or a file descriptor. | ||
25 | * | ||
26 | * Bit 2 indicates whether a cpu clock refers to a thread or a process. | ||
27 | * | ||
28 | * Bits 1 and 0 give the type: PROF=0, VIRT=1, SCHED=2, or FD=3. | ||
29 | * | ||
30 | * A clockid is invalid if bits 2, 1, and 0 are all set. | ||
31 | */ | ||
20 | #define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3)) | 32 | #define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3)) |
21 | #define CPUCLOCK_PERTHREAD(clock) \ | 33 | #define CPUCLOCK_PERTHREAD(clock) \ |
22 | (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0) | 34 | (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0) |
23 | #define CPUCLOCK_PID_MASK 7 | 35 | |
24 | #define CPUCLOCK_PERTHREAD_MASK 4 | 36 | #define CPUCLOCK_PERTHREAD_MASK 4 |
25 | #define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK) | 37 | #define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK) |
26 | #define CPUCLOCK_CLOCK_MASK 3 | 38 | #define CPUCLOCK_CLOCK_MASK 3 |
@@ -28,12 +40,17 @@ struct cpu_timer_list { | |||
28 | #define CPUCLOCK_VIRT 1 | 40 | #define CPUCLOCK_VIRT 1 |
29 | #define CPUCLOCK_SCHED 2 | 41 | #define CPUCLOCK_SCHED 2 |
30 | #define CPUCLOCK_MAX 3 | 42 | #define CPUCLOCK_MAX 3 |
43 | #define CLOCKFD CPUCLOCK_MAX | ||
44 | #define CLOCKFD_MASK (CPUCLOCK_PERTHREAD_MASK|CPUCLOCK_CLOCK_MASK) | ||
31 | 45 | ||
32 | #define MAKE_PROCESS_CPUCLOCK(pid, clock) \ | 46 | #define MAKE_PROCESS_CPUCLOCK(pid, clock) \ |
33 | ((~(clockid_t) (pid) << 3) | (clockid_t) (clock)) | 47 | ((~(clockid_t) (pid) << 3) | (clockid_t) (clock)) |
34 | #define MAKE_THREAD_CPUCLOCK(tid, clock) \ | 48 | #define MAKE_THREAD_CPUCLOCK(tid, clock) \ |
35 | MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK) | 49 | MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK) |
36 | 50 | ||
51 | #define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD) | ||
52 | #define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3)) | ||
53 | |||
37 | /* POSIX.1b interval timer structure. */ | 54 | /* POSIX.1b interval timer structure. */ |
38 | struct k_itimer { | 55 | struct k_itimer { |
39 | struct list_head list; /* free/ allocate list */ | 56 | struct list_head list; /* free/ allocate list */ |
@@ -67,10 +84,11 @@ struct k_itimer { | |||
67 | }; | 84 | }; |
68 | 85 | ||
69 | struct k_clock { | 86 | struct k_clock { |
70 | int res; /* in nanoseconds */ | ||
71 | int (*clock_getres) (const clockid_t which_clock, struct timespec *tp); | 87 | int (*clock_getres) (const clockid_t which_clock, struct timespec *tp); |
72 | int (*clock_set) (const clockid_t which_clock, struct timespec * tp); | 88 | int (*clock_set) (const clockid_t which_clock, |
89 | const struct timespec *tp); | ||
73 | int (*clock_get) (const clockid_t which_clock, struct timespec * tp); | 90 | int (*clock_get) (const clockid_t which_clock, struct timespec * tp); |
91 | int (*clock_adj) (const clockid_t which_clock, struct timex *tx); | ||
74 | int (*timer_create) (struct k_itimer *timer); | 92 | int (*timer_create) (struct k_itimer *timer); |
75 | int (*nsleep) (const clockid_t which_clock, int flags, | 93 | int (*nsleep) (const clockid_t which_clock, int flags, |
76 | struct timespec *, struct timespec __user *); | 94 | struct timespec *, struct timespec __user *); |
@@ -84,28 +102,14 @@ struct k_clock { | |||
84 | struct itimerspec * cur_setting); | 102 | struct itimerspec * cur_setting); |
85 | }; | 103 | }; |
86 | 104 | ||
87 | void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock); | 105 | extern struct k_clock clock_posix_cpu; |
106 | extern struct k_clock clock_posix_dynamic; | ||
88 | 107 | ||
89 | /* error handlers for timer_create, nanosleep and settime */ | 108 | void posix_timers_register_clock(const clockid_t clock_id, struct k_clock *new_clock); |
90 | int do_posix_clock_nonanosleep(const clockid_t, int flags, struct timespec *, | ||
91 | struct timespec __user *); | ||
92 | int do_posix_clock_nosettime(const clockid_t, struct timespec *tp); | ||
93 | 109 | ||
94 | /* function to call to trigger timer event */ | 110 | /* function to call to trigger timer event */ |
95 | int posix_timer_event(struct k_itimer *timr, int si_private); | 111 | int posix_timer_event(struct k_itimer *timr, int si_private); |
96 | 112 | ||
97 | int posix_cpu_clock_getres(const clockid_t which_clock, struct timespec *ts); | ||
98 | int posix_cpu_clock_get(const clockid_t which_clock, struct timespec *ts); | ||
99 | int posix_cpu_clock_set(const clockid_t which_clock, const struct timespec *ts); | ||
100 | int posix_cpu_timer_create(struct k_itimer *timer); | ||
101 | int posix_cpu_nsleep(const clockid_t which_clock, int flags, | ||
102 | struct timespec *rqtp, struct timespec __user *rmtp); | ||
103 | long posix_cpu_nsleep_restart(struct restart_block *restart_block); | ||
104 | int posix_cpu_timer_set(struct k_itimer *timer, int flags, | ||
105 | struct itimerspec *new, struct itimerspec *old); | ||
106 | int posix_cpu_timer_del(struct k_itimer *timer); | ||
107 | void posix_cpu_timer_get(struct k_itimer *timer, struct itimerspec *itp); | ||
108 | |||
109 | void posix_cpu_timer_schedule(struct k_itimer *timer); | 113 | void posix_cpu_timer_schedule(struct k_itimer *timer); |
110 | 114 | ||
111 | void run_posix_cpu_timers(struct task_struct *task); | 115 | void run_posix_cpu_timers(struct task_struct *task); |
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index d68283a898bb..54211c1cd926 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
@@ -71,6 +71,7 @@ posix_acl_release(struct posix_acl *acl) | |||
71 | 71 | ||
72 | /* posix_acl.c */ | 72 | /* posix_acl.c */ |
73 | 73 | ||
74 | extern void posix_acl_init(struct posix_acl *, int); | ||
74 | extern struct posix_acl *posix_acl_alloc(int, gfp_t); | 75 | extern struct posix_acl *posix_acl_alloc(int, gfp_t); |
75 | extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t); | 76 | extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t); |
76 | extern int posix_acl_valid(const struct posix_acl *); | 77 | extern int posix_acl_valid(const struct posix_acl *); |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 092a04f874a8..a1147e5dd245 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -102,11 +102,8 @@ | |||
102 | 102 | ||
103 | extern long arch_ptrace(struct task_struct *child, long request, | 103 | extern long arch_ptrace(struct task_struct *child, long request, |
104 | unsigned long addr, unsigned long data); | 104 | unsigned long addr, unsigned long data); |
105 | extern int ptrace_traceme(void); | ||
106 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); | 105 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); |
107 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 106 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
108 | extern int ptrace_attach(struct task_struct *tsk); | ||
109 | extern int ptrace_detach(struct task_struct *, unsigned int); | ||
110 | extern void ptrace_disable(struct task_struct *); | 107 | extern void ptrace_disable(struct task_struct *); |
111 | extern int ptrace_check_attach(struct task_struct *task, int kill); | 108 | extern int ptrace_check_attach(struct task_struct *task, int kill); |
112 | extern int ptrace_request(struct task_struct *child, long request, | 109 | extern int ptrace_request(struct task_struct *child, long request, |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index fcb9884df618..a5930cb66145 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -182,6 +182,26 @@ static inline bool res_counter_check_under_limit(struct res_counter *cnt) | |||
182 | return ret; | 182 | return ret; |
183 | } | 183 | } |
184 | 184 | ||
185 | /** | ||
186 | * res_counter_check_margin - check if the counter allows charging | ||
187 | * @cnt: the resource counter to check | ||
188 | * @bytes: the number of bytes to check the remaining space against | ||
189 | * | ||
190 | * Returns a boolean value on whether the counter can be charged | ||
191 | * @bytes or whether this would exceed the limit. | ||
192 | */ | ||
193 | static inline bool res_counter_check_margin(struct res_counter *cnt, | ||
194 | unsigned long bytes) | ||
195 | { | ||
196 | bool ret; | ||
197 | unsigned long flags; | ||
198 | |||
199 | spin_lock_irqsave(&cnt->lock, flags); | ||
200 | ret = cnt->limit - cnt->usage >= bytes; | ||
201 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
202 | return ret; | ||
203 | } | ||
204 | |||
185 | static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) | 205 | static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) |
186 | { | 206 | { |
187 | bool ret; | 207 | bool ret; |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 8d3a2486544d..ab38ac80b0f9 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -100,6 +100,8 @@ void ring_buffer_free(struct ring_buffer *buffer); | |||
100 | 100 | ||
101 | int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size); | 101 | int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size); |
102 | 102 | ||
103 | void ring_buffer_change_overwrite(struct ring_buffer *buffer, int val); | ||
104 | |||
103 | struct ring_buffer_event *ring_buffer_lock_reserve(struct ring_buffer *buffer, | 105 | struct ring_buffer_event *ring_buffer_lock_reserve(struct ring_buffer *buffer, |
104 | unsigned long length); | 106 | unsigned long length); |
105 | int ring_buffer_unlock_commit(struct ring_buffer *buffer, | 107 | int ring_buffer_unlock_commit(struct ring_buffer *buffer, |
diff --git a/include/linux/rio_regs.h b/include/linux/rio_regs.h index d63dcbaea169..9026b30238f3 100644 --- a/include/linux/rio_regs.h +++ b/include/linux/rio_regs.h | |||
@@ -14,10 +14,12 @@ | |||
14 | #define LINUX_RIO_REGS_H | 14 | #define LINUX_RIO_REGS_H |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * In RapidIO, each device has a 2MB configuration space that is | 17 | * In RapidIO, each device has a 16MB configuration space that is |
18 | * accessed via maintenance transactions. Portions of configuration | 18 | * accessed via maintenance transactions. Portions of configuration |
19 | * space are standardized and/or reserved. | 19 | * space are standardized and/or reserved. |
20 | */ | 20 | */ |
21 | #define RIO_MAINT_SPACE_SZ 0x1000000 /* 16MB of RapidIO mainenance space */ | ||
22 | |||
21 | #define RIO_DEV_ID_CAR 0x00 /* [I] Device Identity CAR */ | 23 | #define RIO_DEV_ID_CAR 0x00 /* [I] Device Identity CAR */ |
22 | #define RIO_DEV_INFO_CAR 0x04 /* [I] Device Information CAR */ | 24 | #define RIO_DEV_INFO_CAR 0x04 /* [I] Device Information CAR */ |
23 | #define RIO_ASM_ID_CAR 0x08 /* [I] Assembly Identity CAR */ | 25 | #define RIO_ASM_ID_CAR 0x08 /* [I] Assembly Identity CAR */ |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 3c995b4d742c..2ca7e8a78060 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -133,7 +133,6 @@ extern struct class *rtc_class; | |||
133 | * The (current) exceptions are mostly filesystem hooks: | 133 | * The (current) exceptions are mostly filesystem hooks: |
134 | * - the proc() hook for procfs | 134 | * - the proc() hook for procfs |
135 | * - non-ioctl() chardev hooks: open(), release(), read_callback() | 135 | * - non-ioctl() chardev hooks: open(), release(), read_callback() |
136 | * - periodic irq calls: irq_set_state(), irq_set_freq() | ||
137 | * | 136 | * |
138 | * REVISIT those periodic irq calls *do* have ops_lock when they're | 137 | * REVISIT those periodic irq calls *do* have ops_lock when they're |
139 | * issued through ioctl() ... | 138 | * issued through ioctl() ... |
@@ -148,11 +147,8 @@ struct rtc_class_ops { | |||
148 | int (*set_alarm)(struct device *, struct rtc_wkalrm *); | 147 | int (*set_alarm)(struct device *, struct rtc_wkalrm *); |
149 | int (*proc)(struct device *, struct seq_file *); | 148 | int (*proc)(struct device *, struct seq_file *); |
150 | int (*set_mmss)(struct device *, unsigned long secs); | 149 | int (*set_mmss)(struct device *, unsigned long secs); |
151 | int (*irq_set_state)(struct device *, int enabled); | ||
152 | int (*irq_set_freq)(struct device *, int freq); | ||
153 | int (*read_callback)(struct device *, int data); | 150 | int (*read_callback)(struct device *, int data); |
154 | int (*alarm_irq_enable)(struct device *, unsigned int enabled); | 151 | int (*alarm_irq_enable)(struct device *, unsigned int enabled); |
155 | int (*update_irq_enable)(struct device *, unsigned int enabled); | ||
156 | }; | 152 | }; |
157 | 153 | ||
158 | #define RTC_DEVICE_NAME_SIZE 20 | 154 | #define RTC_DEVICE_NAME_SIZE 20 |
@@ -203,6 +199,18 @@ struct rtc_device | |||
203 | struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */ | 199 | struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */ |
204 | int pie_enabled; | 200 | int pie_enabled; |
205 | struct work_struct irqwork; | 201 | struct work_struct irqwork; |
202 | |||
203 | |||
204 | #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL | ||
205 | struct work_struct uie_task; | ||
206 | struct timer_list uie_timer; | ||
207 | /* Those fields are protected by rtc->irq_lock */ | ||
208 | unsigned int oldsecs; | ||
209 | unsigned int uie_irq_active:1; | ||
210 | unsigned int stop_uie_polling:1; | ||
211 | unsigned int uie_task_active:1; | ||
212 | unsigned int uie_timer_active:1; | ||
213 | #endif | ||
206 | }; | 214 | }; |
207 | #define to_rtc_device(d) container_of(d, struct rtc_device, dev) | 215 | #define to_rtc_device(d) container_of(d, struct rtc_device, dev) |
208 | 216 | ||
@@ -215,6 +223,7 @@ extern void rtc_device_unregister(struct rtc_device *rtc); | |||
215 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); | 223 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); |
216 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); | 224 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); |
217 | extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); | 225 | extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); |
226 | int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); | ||
218 | extern int rtc_read_alarm(struct rtc_device *rtc, | 227 | extern int rtc_read_alarm(struct rtc_device *rtc, |
219 | struct rtc_wkalrm *alrm); | 228 | struct rtc_wkalrm *alrm); |
220 | extern int rtc_set_alarm(struct rtc_device *rtc, | 229 | extern int rtc_set_alarm(struct rtc_device *rtc, |
@@ -238,6 +247,7 @@ extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | |||
238 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | 247 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, |
239 | unsigned int enabled); | 248 | unsigned int enabled); |
240 | 249 | ||
250 | void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode); | ||
241 | void rtc_aie_update_irq(void *private); | 251 | void rtc_aie_update_irq(void *private); |
242 | void rtc_uie_update_irq(void *private); | 252 | void rtc_uie_update_irq(void *private); |
243 | enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer); | 253 | enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer); |
@@ -246,8 +256,6 @@ int rtc_register(rtc_task_t *task); | |||
246 | int rtc_unregister(rtc_task_t *task); | 256 | int rtc_unregister(rtc_task_t *task); |
247 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 257 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
248 | 258 | ||
249 | void rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer); | ||
250 | void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer); | ||
251 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); | 259 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); |
252 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, | 260 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, |
253 | ktime_t expires, ktime_t period); | 261 | ktime_t expires, ktime_t period); |
diff --git a/include/linux/rwlock_types.h b/include/linux/rwlock_types.h index bd31808c7d8e..cc0072e93e36 100644 --- a/include/linux/rwlock_types.h +++ b/include/linux/rwlock_types.h | |||
@@ -43,14 +43,6 @@ typedef struct { | |||
43 | RW_DEP_MAP_INIT(lockname) } | 43 | RW_DEP_MAP_INIT(lockname) } |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | /* | ||
47 | * RW_LOCK_UNLOCKED defeat lockdep state tracking and is hence | ||
48 | * deprecated. | ||
49 | * | ||
50 | * Please use DEFINE_RWLOCK() or __RW_LOCK_UNLOCKED() as appropriate. | ||
51 | */ | ||
52 | #define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init) | ||
53 | |||
54 | #define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x) | 46 | #define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x) |
55 | 47 | ||
56 | #endif /* __LINUX_RWLOCK_TYPES_H */ | 48 | #endif /* __LINUX_RWLOCK_TYPES_H */ |
diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h index bdfcc2527970..34701241b673 100644 --- a/include/linux/rwsem-spinlock.h +++ b/include/linux/rwsem-spinlock.h | |||
@@ -12,15 +12,7 @@ | |||
12 | #error "please don't include linux/rwsem-spinlock.h directly, use linux/rwsem.h instead" | 12 | #error "please don't include linux/rwsem-spinlock.h directly, use linux/rwsem.h instead" |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #include <linux/spinlock.h> | ||
16 | #include <linux/list.h> | ||
17 | |||
18 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
19 | |||
20 | #include <linux/types.h> | ||
21 | |||
22 | struct rwsem_waiter; | ||
23 | |||
24 | /* | 16 | /* |
25 | * the rw-semaphore definition | 17 | * the rw-semaphore definition |
26 | * - if activity is 0 then there are no active readers or writers | 18 | * - if activity is 0 then there are no active readers or writers |
@@ -37,28 +29,7 @@ struct rw_semaphore { | |||
37 | #endif | 29 | #endif |
38 | }; | 30 | }; |
39 | 31 | ||
40 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 32 | #define RWSEM_UNLOCKED_VALUE 0x00000000 |
41 | # define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname } | ||
42 | #else | ||
43 | # define __RWSEM_DEP_MAP_INIT(lockname) | ||
44 | #endif | ||
45 | |||
46 | #define __RWSEM_INITIALIZER(name) \ | ||
47 | { 0, __SPIN_LOCK_UNLOCKED(name.wait_lock), LIST_HEAD_INIT((name).wait_list) \ | ||
48 | __RWSEM_DEP_MAP_INIT(name) } | ||
49 | |||
50 | #define DECLARE_RWSEM(name) \ | ||
51 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | ||
52 | |||
53 | extern void __init_rwsem(struct rw_semaphore *sem, const char *name, | ||
54 | struct lock_class_key *key); | ||
55 | |||
56 | #define init_rwsem(sem) \ | ||
57 | do { \ | ||
58 | static struct lock_class_key __key; \ | ||
59 | \ | ||
60 | __init_rwsem((sem), #sem, &__key); \ | ||
61 | } while (0) | ||
62 | 33 | ||
63 | extern void __down_read(struct rw_semaphore *sem); | 34 | extern void __down_read(struct rw_semaphore *sem); |
64 | extern int __down_read_trylock(struct rw_semaphore *sem); | 35 | extern int __down_read_trylock(struct rw_semaphore *sem); |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index efd348fe8ca7..a8afe9cd000c 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -11,6 +11,9 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/list.h> | ||
15 | #include <linux/spinlock.h> | ||
16 | |||
14 | #include <asm/system.h> | 17 | #include <asm/system.h> |
15 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
16 | 19 | ||
@@ -19,9 +22,57 @@ struct rw_semaphore; | |||
19 | #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK | 22 | #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK |
20 | #include <linux/rwsem-spinlock.h> /* use a generic implementation */ | 23 | #include <linux/rwsem-spinlock.h> /* use a generic implementation */ |
21 | #else | 24 | #else |
22 | #include <asm/rwsem.h> /* use an arch-specific implementation */ | 25 | /* All arch specific implementations share the same struct */ |
26 | struct rw_semaphore { | ||
27 | long count; | ||
28 | spinlock_t wait_lock; | ||
29 | struct list_head wait_list; | ||
30 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
31 | struct lockdep_map dep_map; | ||
32 | #endif | ||
33 | }; | ||
34 | |||
35 | extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); | ||
36 | extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); | ||
37 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *); | ||
38 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); | ||
39 | |||
40 | /* Include the arch specific part */ | ||
41 | #include <asm/rwsem.h> | ||
42 | |||
43 | /* In all implementations count != 0 means locked */ | ||
44 | static inline int rwsem_is_locked(struct rw_semaphore *sem) | ||
45 | { | ||
46 | return sem->count != 0; | ||
47 | } | ||
48 | |||
49 | #endif | ||
50 | |||
51 | /* Common initializer macros and functions */ | ||
52 | |||
53 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
54 | # define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname } | ||
55 | #else | ||
56 | # define __RWSEM_DEP_MAP_INIT(lockname) | ||
23 | #endif | 57 | #endif |
24 | 58 | ||
59 | #define __RWSEM_INITIALIZER(name) \ | ||
60 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED(name.wait_lock), \ | ||
61 | LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } | ||
62 | |||
63 | #define DECLARE_RWSEM(name) \ | ||
64 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | ||
65 | |||
66 | extern void __init_rwsem(struct rw_semaphore *sem, const char *name, | ||
67 | struct lock_class_key *key); | ||
68 | |||
69 | #define init_rwsem(sem) \ | ||
70 | do { \ | ||
71 | static struct lock_class_key __key; \ | ||
72 | \ | ||
73 | __init_rwsem((sem), #sem, &__key); \ | ||
74 | } while (0) | ||
75 | |||
25 | /* | 76 | /* |
26 | * lock for reading | 77 | * lock for reading |
27 | */ | 78 | */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index d747f948b34e..c15936fe998b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1058,6 +1058,7 @@ struct sched_class { | |||
1058 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); | 1058 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); |
1059 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); | 1059 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); |
1060 | void (*yield_task) (struct rq *rq); | 1060 | void (*yield_task) (struct rq *rq); |
1061 | bool (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt); | ||
1061 | 1062 | ||
1062 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); | 1063 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); |
1063 | 1064 | ||
@@ -1084,12 +1085,10 @@ struct sched_class { | |||
1084 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); | 1085 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); |
1085 | void (*task_fork) (struct task_struct *p); | 1086 | void (*task_fork) (struct task_struct *p); |
1086 | 1087 | ||
1087 | void (*switched_from) (struct rq *this_rq, struct task_struct *task, | 1088 | void (*switched_from) (struct rq *this_rq, struct task_struct *task); |
1088 | int running); | 1089 | void (*switched_to) (struct rq *this_rq, struct task_struct *task); |
1089 | void (*switched_to) (struct rq *this_rq, struct task_struct *task, | ||
1090 | int running); | ||
1091 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, | 1090 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, |
1092 | int oldprio, int running); | 1091 | int oldprio); |
1093 | 1092 | ||
1094 | unsigned int (*get_rr_interval) (struct rq *rq, | 1093 | unsigned int (*get_rr_interval) (struct rq *rq, |
1095 | struct task_struct *task); | 1094 | struct task_struct *task); |
@@ -1715,7 +1714,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1715 | /* | 1714 | /* |
1716 | * Per process flags | 1715 | * Per process flags |
1717 | */ | 1716 | */ |
1718 | #define PF_KSOFTIRQD 0x00000001 /* I am ksoftirqd */ | ||
1719 | #define PF_STARTING 0x00000002 /* being created */ | 1717 | #define PF_STARTING 0x00000002 /* being created */ |
1720 | #define PF_EXITING 0x00000004 /* getting shut down */ | 1718 | #define PF_EXITING 0x00000004 /* getting shut down */ |
1721 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ | 1719 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ |
@@ -1744,7 +1742,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1744 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ | 1742 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ |
1745 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 1743 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
1746 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1744 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
1747 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ | 1745 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */ |
1748 | #define PF_FREEZER_NOSIG 0x80000000 /* Freezer won't send signals to it */ | 1746 | #define PF_FREEZER_NOSIG 0x80000000 /* Freezer won't send signals to it */ |
1749 | 1747 | ||
1750 | /* | 1748 | /* |
@@ -1945,8 +1943,6 @@ int sched_rt_handler(struct ctl_table *table, int write, | |||
1945 | void __user *buffer, size_t *lenp, | 1943 | void __user *buffer, size_t *lenp, |
1946 | loff_t *ppos); | 1944 | loff_t *ppos); |
1947 | 1945 | ||
1948 | extern unsigned int sysctl_sched_compat_yield; | ||
1949 | |||
1950 | #ifdef CONFIG_SCHED_AUTOGROUP | 1946 | #ifdef CONFIG_SCHED_AUTOGROUP |
1951 | extern unsigned int sysctl_sched_autogroup_enabled; | 1947 | extern unsigned int sysctl_sched_autogroup_enabled; |
1952 | 1948 | ||
@@ -1977,6 +1973,7 @@ static inline int rt_mutex_getprio(struct task_struct *p) | |||
1977 | # define rt_mutex_adjust_pi(p) do { } while (0) | 1973 | # define rt_mutex_adjust_pi(p) do { } while (0) |
1978 | #endif | 1974 | #endif |
1979 | 1975 | ||
1976 | extern bool yield_to(struct task_struct *p, bool preempt); | ||
1980 | extern void set_user_nice(struct task_struct *p, long nice); | 1977 | extern void set_user_nice(struct task_struct *p, long nice); |
1981 | extern int task_prio(const struct task_struct *p); | 1978 | extern int task_prio(const struct task_struct *p); |
1982 | extern int task_nice(const struct task_struct *p); | 1979 | extern int task_nice(const struct task_struct *p); |
@@ -2049,7 +2046,7 @@ extern void release_uids(struct user_namespace *ns); | |||
2049 | 2046 | ||
2050 | #include <asm/current.h> | 2047 | #include <asm/current.h> |
2051 | 2048 | ||
2052 | extern void do_timer(unsigned long ticks); | 2049 | extern void xtime_update(unsigned long ticks); |
2053 | 2050 | ||
2054 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); | 2051 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); |
2055 | extern int wake_up_process(struct task_struct *tsk); | 2052 | extern int wake_up_process(struct task_struct *tsk); |
@@ -2578,13 +2575,6 @@ static inline void inc_syscw(struct task_struct *tsk) | |||
2578 | #define TASK_SIZE_OF(tsk) TASK_SIZE | 2575 | #define TASK_SIZE_OF(tsk) TASK_SIZE |
2579 | #endif | 2576 | #endif |
2580 | 2577 | ||
2581 | /* | ||
2582 | * Call the function if the target task is executing on a CPU right now: | ||
2583 | */ | ||
2584 | extern void task_oncpu_function_call(struct task_struct *p, | ||
2585 | void (*func) (void *info), void *info); | ||
2586 | |||
2587 | |||
2588 | #ifdef CONFIG_MM_OWNER | 2578 | #ifdef CONFIG_MM_OWNER |
2589 | extern void mm_update_next_owner(struct mm_struct *mm); | 2579 | extern void mm_update_next_owner(struct mm_struct *mm); |
2590 | extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p); | 2580 | extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p); |
diff --git a/include/linux/security.h b/include/linux/security.h index c642bb8b8f5a..debbd97db7ab 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -53,7 +53,7 @@ struct audit_krule; | |||
53 | */ | 53 | */ |
54 | extern int cap_capable(struct task_struct *tsk, const struct cred *cred, | 54 | extern int cap_capable(struct task_struct *tsk, const struct cred *cred, |
55 | int cap, int audit); | 55 | int cap, int audit); |
56 | extern int cap_settime(struct timespec *ts, struct timezone *tz); | 56 | extern int cap_settime(const struct timespec *ts, const struct timezone *tz); |
57 | extern int cap_ptrace_access_check(struct task_struct *child, unsigned int mode); | 57 | extern int cap_ptrace_access_check(struct task_struct *child, unsigned int mode); |
58 | extern int cap_ptrace_traceme(struct task_struct *parent); | 58 | extern int cap_ptrace_traceme(struct task_struct *parent); |
59 | extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); | 59 | extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); |
@@ -1387,7 +1387,7 @@ struct security_operations { | |||
1387 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1387 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
1388 | int (*quota_on) (struct dentry *dentry); | 1388 | int (*quota_on) (struct dentry *dentry); |
1389 | int (*syslog) (int type); | 1389 | int (*syslog) (int type); |
1390 | int (*settime) (struct timespec *ts, struct timezone *tz); | 1390 | int (*settime) (const struct timespec *ts, const struct timezone *tz); |
1391 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); | 1391 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); |
1392 | 1392 | ||
1393 | int (*bprm_set_creds) (struct linux_binprm *bprm); | 1393 | int (*bprm_set_creds) (struct linux_binprm *bprm); |
@@ -1662,14 +1662,14 @@ int security_capset(struct cred *new, const struct cred *old, | |||
1662 | const kernel_cap_t *effective, | 1662 | const kernel_cap_t *effective, |
1663 | const kernel_cap_t *inheritable, | 1663 | const kernel_cap_t *inheritable, |
1664 | const kernel_cap_t *permitted); | 1664 | const kernel_cap_t *permitted); |
1665 | int security_capable(int cap); | 1665 | int security_capable(const struct cred *cred, int cap); |
1666 | int security_real_capable(struct task_struct *tsk, int cap); | 1666 | int security_real_capable(struct task_struct *tsk, int cap); |
1667 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); | 1667 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); |
1668 | int security_sysctl(struct ctl_table *table, int op); | 1668 | int security_sysctl(struct ctl_table *table, int op); |
1669 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1669 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
1670 | int security_quota_on(struct dentry *dentry); | 1670 | int security_quota_on(struct dentry *dentry); |
1671 | int security_syslog(int type); | 1671 | int security_syslog(int type); |
1672 | int security_settime(struct timespec *ts, struct timezone *tz); | 1672 | int security_settime(const struct timespec *ts, const struct timezone *tz); |
1673 | int security_vm_enough_memory(long pages); | 1673 | int security_vm_enough_memory(long pages); |
1674 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); | 1674 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); |
1675 | int security_vm_enough_memory_kern(long pages); | 1675 | int security_vm_enough_memory_kern(long pages); |
@@ -1856,9 +1856,9 @@ static inline int security_capset(struct cred *new, | |||
1856 | return cap_capset(new, old, effective, inheritable, permitted); | 1856 | return cap_capset(new, old, effective, inheritable, permitted); |
1857 | } | 1857 | } |
1858 | 1858 | ||
1859 | static inline int security_capable(int cap) | 1859 | static inline int security_capable(const struct cred *cred, int cap) |
1860 | { | 1860 | { |
1861 | return cap_capable(current, current_cred(), cap, SECURITY_CAP_AUDIT); | 1861 | return cap_capable(current, cred, cap, SECURITY_CAP_AUDIT); |
1862 | } | 1862 | } |
1863 | 1863 | ||
1864 | static inline int security_real_capable(struct task_struct *tsk, int cap) | 1864 | static inline int security_real_capable(struct task_struct *tsk, int cap) |
@@ -1904,7 +1904,8 @@ static inline int security_syslog(int type) | |||
1904 | return 0; | 1904 | return 0; |
1905 | } | 1905 | } |
1906 | 1906 | ||
1907 | static inline int security_settime(struct timespec *ts, struct timezone *tz) | 1907 | static inline int security_settime(const struct timespec *ts, |
1908 | const struct timezone *tz) | ||
1908 | { | 1909 | { |
1909 | return cap_settime(ts, tz); | 1910 | return cap_settime(ts, tz); |
1910 | } | 1911 | } |
diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h index 851b7783720d..73548eb13a5d 100644 --- a/include/linux/spinlock_types.h +++ b/include/linux/spinlock_types.h | |||
@@ -81,14 +81,6 @@ typedef struct spinlock { | |||
81 | #define __SPIN_LOCK_UNLOCKED(lockname) \ | 81 | #define __SPIN_LOCK_UNLOCKED(lockname) \ |
82 | (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname) | 82 | (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname) |
83 | 83 | ||
84 | /* | ||
85 | * SPIN_LOCK_UNLOCKED defeats lockdep state tracking and is hence | ||
86 | * deprecated. | ||
87 | * Please use DEFINE_SPINLOCK() or __SPIN_LOCK_UNLOCKED() as | ||
88 | * appropriate. | ||
89 | */ | ||
90 | #define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init) | ||
91 | |||
92 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | 84 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) |
93 | 85 | ||
94 | #include <linux/rwlock_types.h> | 86 | #include <linux/rwlock_types.h> |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index c50b458b8a3f..082884295f80 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -47,14 +47,6 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
47 | return 1; | 47 | return 1; |
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
51 | { | ||
52 | if (svc_is_backchannel(rqstp)) | ||
53 | return (struct nfs4_sessionid *) | ||
54 | rqstp->rq_server->sv_bc_xprt->xpt_bc_sid; | ||
55 | return NULL; | ||
56 | } | ||
57 | |||
58 | #else /* CONFIG_NFS_V4_1 */ | 50 | #else /* CONFIG_NFS_V4_1 */ |
59 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | 51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
60 | unsigned int min_reqs) | 52 | unsigned int min_reqs) |
@@ -67,11 +59,6 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
67 | return 0; | 59 | return 0; |
68 | } | 60 | } |
69 | 61 | ||
70 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
71 | { | ||
72 | return NULL; | ||
73 | } | ||
74 | |||
75 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | 62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) |
76 | { | 63 | { |
77 | } | 64 | } |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 88513fd8e208..d81db8012c63 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -212,6 +212,7 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *); | |||
212 | struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req, | 212 | struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req, |
213 | const struct rpc_call_ops *ops); | 213 | const struct rpc_call_ops *ops); |
214 | void rpc_put_task(struct rpc_task *); | 214 | void rpc_put_task(struct rpc_task *); |
215 | void rpc_put_task_async(struct rpc_task *); | ||
215 | void rpc_exit_task(struct rpc_task *); | 216 | void rpc_exit_task(struct rpc_task *); |
216 | void rpc_exit(struct rpc_task *, int); | 217 | void rpc_exit(struct rpc_task *, int); |
217 | void rpc_release_calldata(const struct rpc_call_ops *, void *); | 218 | void rpc_release_calldata(const struct rpc_call_ops *, void *); |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 059877b4d85b..7ad9751a0d87 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -77,7 +77,6 @@ struct svc_xprt { | |||
77 | size_t xpt_remotelen; /* length of address */ | 77 | size_t xpt_remotelen; /* length of address */ |
78 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ | 78 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ |
79 | struct list_head xpt_users; /* callbacks on free */ | 79 | struct list_head xpt_users; /* callbacks on free */ |
80 | void *xpt_bc_sid; /* back channel session ID */ | ||
81 | 80 | ||
82 | struct net *xpt_net; | 81 | struct net *xpt_net; |
83 | struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ | 82 | struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 18cd0684fc4e..1f5c18e6f4f1 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -62,6 +62,7 @@ struct robust_list_head; | |||
62 | struct getcpu_cache; | 62 | struct getcpu_cache; |
63 | struct old_linux_dirent; | 63 | struct old_linux_dirent; |
64 | struct perf_event_attr; | 64 | struct perf_event_attr; |
65 | struct file_handle; | ||
65 | 66 | ||
66 | #include <linux/types.h> | 67 | #include <linux/types.h> |
67 | #include <linux/aio_abi.h> | 68 | #include <linux/aio_abi.h> |
@@ -125,62 +126,66 @@ extern struct trace_event_functions enter_syscall_print_funcs; | |||
125 | extern struct trace_event_functions exit_syscall_print_funcs; | 126 | extern struct trace_event_functions exit_syscall_print_funcs; |
126 | 127 | ||
127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 128 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
128 | static struct syscall_metadata \ | 129 | static struct syscall_metadata __syscall_meta_##sname; \ |
129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
130 | static struct ftrace_event_call __used \ | 130 | static struct ftrace_event_call __used \ |
131 | __attribute__((__aligned__(4))) \ | ||
132 | __attribute__((section("_ftrace_events"))) \ | ||
133 | event_enter_##sname = { \ | 131 | event_enter_##sname = { \ |
134 | .name = "sys_enter"#sname, \ | 132 | .name = "sys_enter"#sname, \ |
135 | .class = &event_class_syscall_enter, \ | 133 | .class = &event_class_syscall_enter, \ |
136 | .event.funcs = &enter_syscall_print_funcs, \ | 134 | .event.funcs = &enter_syscall_print_funcs, \ |
137 | .data = (void *)&__syscall_meta_##sname,\ | 135 | .data = (void *)&__syscall_meta_##sname,\ |
136 | .flags = TRACE_EVENT_FL_CAP_ANY, \ | ||
138 | }; \ | 137 | }; \ |
139 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) | 138 | static struct ftrace_event_call __used \ |
139 | __attribute__((section("_ftrace_events"))) \ | ||
140 | *__event_enter_##sname = &event_enter_##sname; | ||
140 | 141 | ||
141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 142 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
142 | static struct syscall_metadata \ | 143 | static struct syscall_metadata __syscall_meta_##sname; \ |
143 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
144 | static struct ftrace_event_call __used \ | 144 | static struct ftrace_event_call __used \ |
145 | __attribute__((__aligned__(4))) \ | ||
146 | __attribute__((section("_ftrace_events"))) \ | ||
147 | event_exit_##sname = { \ | 145 | event_exit_##sname = { \ |
148 | .name = "sys_exit"#sname, \ | 146 | .name = "sys_exit"#sname, \ |
149 | .class = &event_class_syscall_exit, \ | 147 | .class = &event_class_syscall_exit, \ |
150 | .event.funcs = &exit_syscall_print_funcs, \ | 148 | .event.funcs = &exit_syscall_print_funcs, \ |
151 | .data = (void *)&__syscall_meta_##sname,\ | 149 | .data = (void *)&__syscall_meta_##sname,\ |
150 | .flags = TRACE_EVENT_FL_CAP_ANY, \ | ||
152 | }; \ | 151 | }; \ |
153 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) | 152 | static struct ftrace_event_call __used \ |
153 | __attribute__((section("_ftrace_events"))) \ | ||
154 | *__event_exit_##sname = &event_exit_##sname; | ||
154 | 155 | ||
155 | #define SYSCALL_METADATA(sname, nb) \ | 156 | #define SYSCALL_METADATA(sname, nb) \ |
156 | SYSCALL_TRACE_ENTER_EVENT(sname); \ | 157 | SYSCALL_TRACE_ENTER_EVENT(sname); \ |
157 | SYSCALL_TRACE_EXIT_EVENT(sname); \ | 158 | SYSCALL_TRACE_EXIT_EVENT(sname); \ |
158 | static struct syscall_metadata __used \ | 159 | static struct syscall_metadata __used \ |
159 | __attribute__((__aligned__(4))) \ | ||
160 | __attribute__((section("__syscalls_metadata"))) \ | ||
161 | __syscall_meta_##sname = { \ | 160 | __syscall_meta_##sname = { \ |
162 | .name = "sys"#sname, \ | 161 | .name = "sys"#sname, \ |
162 | .syscall_nr = -1, /* Filled in at boot */ \ | ||
163 | .nb_args = nb, \ | 163 | .nb_args = nb, \ |
164 | .types = types_##sname, \ | 164 | .types = types_##sname, \ |
165 | .args = args_##sname, \ | 165 | .args = args_##sname, \ |
166 | .enter_event = &event_enter_##sname, \ | 166 | .enter_event = &event_enter_##sname, \ |
167 | .exit_event = &event_exit_##sname, \ | 167 | .exit_event = &event_exit_##sname, \ |
168 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ | 168 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ |
169 | }; | 169 | }; \ |
170 | static struct syscall_metadata __used \ | ||
171 | __attribute__((section("__syscalls_metadata"))) \ | ||
172 | *__p_syscall_meta_##sname = &__syscall_meta_##sname; | ||
170 | 173 | ||
171 | #define SYSCALL_DEFINE0(sname) \ | 174 | #define SYSCALL_DEFINE0(sname) \ |
172 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ | 175 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ |
173 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ | 176 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ |
174 | static struct syscall_metadata __used \ | 177 | static struct syscall_metadata __used \ |
175 | __attribute__((__aligned__(4))) \ | ||
176 | __attribute__((section("__syscalls_metadata"))) \ | ||
177 | __syscall_meta__##sname = { \ | 178 | __syscall_meta__##sname = { \ |
178 | .name = "sys_"#sname, \ | 179 | .name = "sys_"#sname, \ |
180 | .syscall_nr = -1, /* Filled in at boot */ \ | ||
179 | .nb_args = 0, \ | 181 | .nb_args = 0, \ |
180 | .enter_event = &event_enter__##sname, \ | 182 | .enter_event = &event_enter__##sname, \ |
181 | .exit_event = &event_exit__##sname, \ | 183 | .exit_event = &event_exit__##sname, \ |
182 | .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ | 184 | .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ |
183 | }; \ | 185 | }; \ |
186 | static struct syscall_metadata __used \ | ||
187 | __attribute__((section("__syscalls_metadata"))) \ | ||
188 | *__p_syscall_meta_##sname = &__syscall_meta__##sname; \ | ||
184 | asmlinkage long sys_##sname(void) | 189 | asmlinkage long sys_##sname(void) |
185 | #else | 190 | #else |
186 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | 191 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) |
@@ -311,6 +316,8 @@ asmlinkage long sys_clock_settime(clockid_t which_clock, | |||
311 | const struct timespec __user *tp); | 316 | const struct timespec __user *tp); |
312 | asmlinkage long sys_clock_gettime(clockid_t which_clock, | 317 | asmlinkage long sys_clock_gettime(clockid_t which_clock, |
313 | struct timespec __user *tp); | 318 | struct timespec __user *tp); |
319 | asmlinkage long sys_clock_adjtime(clockid_t which_clock, | ||
320 | struct timex __user *tx); | ||
314 | asmlinkage long sys_clock_getres(clockid_t which_clock, | 321 | asmlinkage long sys_clock_getres(clockid_t which_clock, |
315 | struct timespec __user *tp); | 322 | struct timespec __user *tp); |
316 | asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags, | 323 | asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags, |
@@ -830,5 +837,10 @@ asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, | |||
830 | unsigned long prot, unsigned long flags, | 837 | unsigned long prot, unsigned long flags, |
831 | unsigned long fd, unsigned long pgoff); | 838 | unsigned long fd, unsigned long pgoff); |
832 | asmlinkage long sys_old_mmap(struct mmap_arg_struct __user *arg); | 839 | asmlinkage long sys_old_mmap(struct mmap_arg_struct __user *arg); |
833 | 840 | asmlinkage long sys_name_to_handle_at(int dfd, const char __user *name, | |
841 | struct file_handle __user *handle, | ||
842 | int __user *mnt_id, int flag); | ||
843 | asmlinkage long sys_open_by_handle_at(int mountdirfd, | ||
844 | struct file_handle __user *handle, | ||
845 | int flags); | ||
834 | #endif | 846 | #endif |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 7bb5cb64f3b8..11684d9e6bd2 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -930,6 +930,7 @@ enum | |||
930 | 930 | ||
931 | #ifdef __KERNEL__ | 931 | #ifdef __KERNEL__ |
932 | #include <linux/list.h> | 932 | #include <linux/list.h> |
933 | #include <linux/rcupdate.h> | ||
933 | 934 | ||
934 | /* For the /proc/sys support */ | 935 | /* For the /proc/sys support */ |
935 | struct ctl_table; | 936 | struct ctl_table; |
@@ -1037,10 +1038,15 @@ struct ctl_table_root { | |||
1037 | struct ctl_table trees. */ | 1038 | struct ctl_table trees. */ |
1038 | struct ctl_table_header | 1039 | struct ctl_table_header |
1039 | { | 1040 | { |
1040 | struct ctl_table *ctl_table; | 1041 | union { |
1041 | struct list_head ctl_entry; | 1042 | struct { |
1042 | int used; | 1043 | struct ctl_table *ctl_table; |
1043 | int count; | 1044 | struct list_head ctl_entry; |
1045 | int used; | ||
1046 | int count; | ||
1047 | }; | ||
1048 | struct rcu_head rcu; | ||
1049 | }; | ||
1044 | struct completion *unregistering; | 1050 | struct completion *unregistering; |
1045 | struct ctl_table *ctl_table_arg; | 1051 | struct ctl_table *ctl_table_arg; |
1046 | struct ctl_table_root *root; | 1052 | struct ctl_table_root *root; |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 387fa7d05c98..7faf933cced7 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -17,6 +17,9 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | 19 | ||
20 | /* Enable/disable SYSRQ support by default (0==no, 1==yes). */ | ||
21 | #define SYSRQ_DEFAULT_ENABLE 1 | ||
22 | |||
20 | /* Possible values of bitmask for enabling sysrq functions */ | 23 | /* Possible values of bitmask for enabling sysrq functions */ |
21 | /* 0x0001 is reserved for enable everything */ | 24 | /* 0x0001 is reserved for enable everything */ |
22 | #define SYSRQ_ENABLE_LOG 0x0002 | 25 | #define SYSRQ_ENABLE_LOG 0x0002 |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 8651556dbd52..d3ec89fb4122 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -172,6 +172,14 @@ void thermal_zone_device_update(struct thermal_zone_device *); | |||
172 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | 172 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, |
173 | const struct thermal_cooling_device_ops *); | 173 | const struct thermal_cooling_device_ops *); |
174 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | 174 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); |
175 | |||
176 | #ifdef CONFIG_NET | ||
175 | extern int generate_netlink_event(u32 orig, enum events event); | 177 | extern int generate_netlink_event(u32 orig, enum events event); |
178 | #else | ||
179 | static inline int generate_netlink_event(u32 orig, enum events event) | ||
180 | { | ||
181 | return 0; | ||
182 | } | ||
183 | #endif | ||
176 | 184 | ||
177 | #endif /* __THERMAL_H__ */ | 185 | #endif /* __THERMAL_H__ */ |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index c90696544176..20fc303947d3 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -18,9 +18,6 @@ struct compat_timespec; | |||
18 | struct restart_block { | 18 | struct restart_block { |
19 | long (*fn)(struct restart_block *); | 19 | long (*fn)(struct restart_block *); |
20 | union { | 20 | union { |
21 | struct { | ||
22 | unsigned long arg0, arg1, arg2, arg3; | ||
23 | }; | ||
24 | /* For futex_wait and futex_wait_requeue_pi */ | 21 | /* For futex_wait and futex_wait_requeue_pi */ |
25 | struct { | 22 | struct { |
26 | u32 __user *uaddr; | 23 | u32 __user *uaddr; |
diff --git a/include/linux/time.h b/include/linux/time.h index 1e6d3b59238d..454a26205787 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -113,8 +113,6 @@ static inline struct timespec timespec_sub(struct timespec lhs, | |||
113 | #define timespec_valid(ts) \ | 113 | #define timespec_valid(ts) \ |
114 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) | 114 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) |
115 | 115 | ||
116 | extern seqlock_t xtime_lock; | ||
117 | |||
118 | extern void read_persistent_clock(struct timespec *ts); | 116 | extern void read_persistent_clock(struct timespec *ts); |
119 | extern void read_boot_clock(struct timespec *ts); | 117 | extern void read_boot_clock(struct timespec *ts); |
120 | extern int update_persistent_clock(struct timespec now); | 118 | extern int update_persistent_clock(struct timespec now); |
@@ -125,8 +123,9 @@ extern int timekeeping_suspended; | |||
125 | unsigned long get_seconds(void); | 123 | unsigned long get_seconds(void); |
126 | struct timespec current_kernel_time(void); | 124 | struct timespec current_kernel_time(void); |
127 | struct timespec __current_kernel_time(void); /* does not take xtime_lock */ | 125 | struct timespec __current_kernel_time(void); /* does not take xtime_lock */ |
128 | struct timespec __get_wall_to_monotonic(void); /* does not take xtime_lock */ | ||
129 | struct timespec get_monotonic_coarse(void); | 126 | struct timespec get_monotonic_coarse(void); |
127 | void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, | ||
128 | struct timespec *wtom, struct timespec *sleep); | ||
130 | 129 | ||
131 | #define CURRENT_TIME (current_kernel_time()) | 130 | #define CURRENT_TIME (current_kernel_time()) |
132 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) | 131 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
@@ -147,8 +146,9 @@ static inline u32 arch_gettimeoffset(void) { return 0; } | |||
147 | #endif | 146 | #endif |
148 | 147 | ||
149 | extern void do_gettimeofday(struct timeval *tv); | 148 | extern void do_gettimeofday(struct timeval *tv); |
150 | extern int do_settimeofday(struct timespec *tv); | 149 | extern int do_settimeofday(const struct timespec *tv); |
151 | extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); | 150 | extern int do_sys_settimeofday(const struct timespec *tv, |
151 | const struct timezone *tz); | ||
152 | #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) | 152 | #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) |
153 | extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags); | 153 | extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags); |
154 | struct itimerval; | 154 | struct itimerval; |
@@ -162,12 +162,13 @@ extern void getnstime_raw_and_real(struct timespec *ts_raw, | |||
162 | struct timespec *ts_real); | 162 | struct timespec *ts_real); |
163 | extern void getboottime(struct timespec *ts); | 163 | extern void getboottime(struct timespec *ts); |
164 | extern void monotonic_to_bootbased(struct timespec *ts); | 164 | extern void monotonic_to_bootbased(struct timespec *ts); |
165 | extern void get_monotonic_boottime(struct timespec *ts); | ||
165 | 166 | ||
166 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 167 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
167 | extern int timekeeping_valid_for_hres(void); | 168 | extern int timekeeping_valid_for_hres(void); |
168 | extern u64 timekeeping_max_deferment(void); | 169 | extern u64 timekeeping_max_deferment(void); |
169 | extern void update_wall_time(void); | ||
170 | extern void timekeeping_leap_insert(int leapsecond); | 170 | extern void timekeeping_leap_insert(int leapsecond); |
171 | extern int timekeeping_inject_offset(struct timespec *ts); | ||
171 | 172 | ||
172 | struct tms; | 173 | struct tms; |
173 | extern void do_sys_times(struct tms *); | 174 | extern void do_sys_times(struct tms *); |
@@ -292,6 +293,7 @@ struct itimerval { | |||
292 | #define CLOCK_MONOTONIC_RAW 4 | 293 | #define CLOCK_MONOTONIC_RAW 4 |
293 | #define CLOCK_REALTIME_COARSE 5 | 294 | #define CLOCK_REALTIME_COARSE 5 |
294 | #define CLOCK_MONOTONIC_COARSE 6 | 295 | #define CLOCK_MONOTONIC_COARSE 6 |
296 | #define CLOCK_BOOTTIME 7 | ||
295 | 297 | ||
296 | /* | 298 | /* |
297 | * The IDs of various hardware clocks: | 299 | * The IDs of various hardware clocks: |
diff --git a/include/linux/timex.h b/include/linux/timex.h index d23999f9499d..aa60fe7b6ed6 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -73,7 +73,7 @@ struct timex { | |||
73 | long tolerance; /* clock frequency tolerance (ppm) | 73 | long tolerance; /* clock frequency tolerance (ppm) |
74 | * (read only) | 74 | * (read only) |
75 | */ | 75 | */ |
76 | struct timeval time; /* (read only) */ | 76 | struct timeval time; /* (read only, except for ADJ_SETOFFSET) */ |
77 | long tick; /* (modified) usecs between clock ticks */ | 77 | long tick; /* (modified) usecs between clock ticks */ |
78 | 78 | ||
79 | long ppsfreq; /* pps frequency (scaled ppm) (ro) */ | 79 | long ppsfreq; /* pps frequency (scaled ppm) (ro) */ |
@@ -102,6 +102,7 @@ struct timex { | |||
102 | #define ADJ_STATUS 0x0010 /* clock status */ | 102 | #define ADJ_STATUS 0x0010 /* clock status */ |
103 | #define ADJ_TIMECONST 0x0020 /* pll time constant */ | 103 | #define ADJ_TIMECONST 0x0020 /* pll time constant */ |
104 | #define ADJ_TAI 0x0080 /* set TAI offset */ | 104 | #define ADJ_TAI 0x0080 /* set TAI offset */ |
105 | #define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */ | ||
105 | #define ADJ_MICRO 0x1000 /* select microsecond resolution */ | 106 | #define ADJ_MICRO 0x1000 /* select microsecond resolution */ |
106 | #define ADJ_NANO 0x2000 /* select nanosecond resolution */ | 107 | #define ADJ_NANO 0x2000 /* select nanosecond resolution */ |
107 | #define ADJ_TICK 0x4000 /* tick value */ | 108 | #define ADJ_TICK 0x4000 /* tick value */ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index c6814616653b..97c84a58efb8 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -33,12 +33,7 @@ struct tracepoint { | |||
33 | void (*regfunc)(void); | 33 | void (*regfunc)(void); |
34 | void (*unregfunc)(void); | 34 | void (*unregfunc)(void); |
35 | struct tracepoint_func __rcu *funcs; | 35 | struct tracepoint_func __rcu *funcs; |
36 | } __attribute__((aligned(32))); /* | 36 | }; |
37 | * Aligned on 32 bytes because it is | ||
38 | * globally visible and gcc happily | ||
39 | * align these on the structure size. | ||
40 | * Keep in sync with vmlinux.lds.h. | ||
41 | */ | ||
42 | 37 | ||
43 | /* | 38 | /* |
44 | * Connect a probe to a tracepoint. | 39 | * Connect a probe to a tracepoint. |
@@ -61,15 +56,15 @@ extern void tracepoint_probe_update_all(void); | |||
61 | 56 | ||
62 | struct tracepoint_iter { | 57 | struct tracepoint_iter { |
63 | struct module *module; | 58 | struct module *module; |
64 | struct tracepoint *tracepoint; | 59 | struct tracepoint * const *tracepoint; |
65 | }; | 60 | }; |
66 | 61 | ||
67 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); | 62 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); |
68 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); | 63 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); |
69 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); | 64 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); |
70 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); | 65 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); |
71 | extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, | 66 | extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint, |
72 | struct tracepoint *begin, struct tracepoint *end); | 67 | struct tracepoint * const *begin, struct tracepoint * const *end); |
73 | 68 | ||
74 | /* | 69 | /* |
75 | * tracepoint_synchronize_unregister must be called between the last tracepoint | 70 | * tracepoint_synchronize_unregister must be called between the last tracepoint |
@@ -84,11 +79,13 @@ static inline void tracepoint_synchronize_unregister(void) | |||
84 | #define PARAMS(args...) args | 79 | #define PARAMS(args...) args |
85 | 80 | ||
86 | #ifdef CONFIG_TRACEPOINTS | 81 | #ifdef CONFIG_TRACEPOINTS |
87 | extern void tracepoint_update_probe_range(struct tracepoint *begin, | 82 | extern |
88 | struct tracepoint *end); | 83 | void tracepoint_update_probe_range(struct tracepoint * const *begin, |
84 | struct tracepoint * const *end); | ||
89 | #else | 85 | #else |
90 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, | 86 | static inline |
91 | struct tracepoint *end) | 87 | void tracepoint_update_probe_range(struct tracepoint * const *begin, |
88 | struct tracepoint * const *end) | ||
92 | { } | 89 | { } |
93 | #endif /* CONFIG_TRACEPOINTS */ | 90 | #endif /* CONFIG_TRACEPOINTS */ |
94 | 91 | ||
@@ -174,12 +171,20 @@ do_trace: \ | |||
174 | { \ | 171 | { \ |
175 | } | 172 | } |
176 | 173 | ||
174 | /* | ||
175 | * We have no guarantee that gcc and the linker won't up-align the tracepoint | ||
176 | * structures, so we create an array of pointers that will be used for iteration | ||
177 | * on the tracepoints. | ||
178 | */ | ||
177 | #define DEFINE_TRACE_FN(name, reg, unreg) \ | 179 | #define DEFINE_TRACE_FN(name, reg, unreg) \ |
178 | static const char __tpstrtab_##name[] \ | 180 | static const char __tpstrtab_##name[] \ |
179 | __attribute__((section("__tracepoints_strings"))) = #name; \ | 181 | __attribute__((section("__tracepoints_strings"))) = #name; \ |
180 | struct tracepoint __tracepoint_##name \ | 182 | struct tracepoint __tracepoint_##name \ |
181 | __attribute__((section("__tracepoints"), aligned(32))) = \ | 183 | __attribute__((section("__tracepoints"))) = \ |
182 | { __tpstrtab_##name, 0, reg, unreg, NULL } | 184 | { __tpstrtab_##name, 0, reg, unreg, NULL }; \ |
185 | static struct tracepoint * const __tracepoint_ptr_##name __used \ | ||
186 | __attribute__((section("__tracepoints_ptrs"))) = \ | ||
187 | &__tracepoint_##name; | ||
183 | 188 | ||
184 | #define DEFINE_TRACE(name) \ | 189 | #define DEFINE_TRACE(name) \ |
185 | DEFINE_TRACE_FN(name, NULL, NULL); | 190 | DEFINE_TRACE_FN(name, NULL, NULL); |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 5e86dc771da4..81a927930bfd 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -89,7 +89,7 @@ struct usb_cdc_acm_descriptor { | |||
89 | 89 | ||
90 | #define USB_CDC_COMM_FEATURE 0x01 | 90 | #define USB_CDC_COMM_FEATURE 0x01 |
91 | #define USB_CDC_CAP_LINE 0x02 | 91 | #define USB_CDC_CAP_LINE 0x02 |
92 | #define USB_CDC_CAP_BRK 0x04 | 92 | #define USB_CDC_CAP_BRK 0x04 |
93 | #define USB_CDC_CAP_NOTIFY 0x08 | 93 | #define USB_CDC_CAP_NOTIFY 0x08 |
94 | 94 | ||
95 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ | 95 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ |
@@ -271,6 +271,11 @@ struct usb_cdc_notification { | |||
271 | __le16 wLength; | 271 | __le16 wLength; |
272 | } __attribute__ ((packed)); | 272 | } __attribute__ ((packed)); |
273 | 273 | ||
274 | struct usb_cdc_speed_change { | ||
275 | __le32 DLBitRRate; /* contains the downlink bit rate (IN pipe) */ | ||
276 | __le32 ULBitRate; /* contains the uplink bit rate (OUT pipe) */ | ||
277 | } __attribute__ ((packed)); | ||
278 | |||
274 | /*-------------------------------------------------------------------------*/ | 279 | /*-------------------------------------------------------------------------*/ |
275 | 280 | ||
276 | /* | 281 | /* |
@@ -292,7 +297,7 @@ struct usb_cdc_ncm_ntb_parameters { | |||
292 | __le16 wNdpOutDivisor; | 297 | __le16 wNdpOutDivisor; |
293 | __le16 wNdpOutPayloadRemainder; | 298 | __le16 wNdpOutPayloadRemainder; |
294 | __le16 wNdpOutAlignment; | 299 | __le16 wNdpOutAlignment; |
295 | __le16 wPadding2; | 300 | __le16 wNtbOutMaxDatagrams; |
296 | } __attribute__ ((packed)); | 301 | } __attribute__ ((packed)); |
297 | 302 | ||
298 | /* | 303 | /* |
@@ -307,7 +312,7 @@ struct usb_cdc_ncm_nth16 { | |||
307 | __le16 wHeaderLength; | 312 | __le16 wHeaderLength; |
308 | __le16 wSequence; | 313 | __le16 wSequence; |
309 | __le16 wBlockLength; | 314 | __le16 wBlockLength; |
310 | __le16 wFpIndex; | 315 | __le16 wNdpIndex; |
311 | } __attribute__ ((packed)); | 316 | } __attribute__ ((packed)); |
312 | 317 | ||
313 | struct usb_cdc_ncm_nth32 { | 318 | struct usb_cdc_ncm_nth32 { |
@@ -315,7 +320,7 @@ struct usb_cdc_ncm_nth32 { | |||
315 | __le16 wHeaderLength; | 320 | __le16 wHeaderLength; |
316 | __le16 wSequence; | 321 | __le16 wSequence; |
317 | __le32 dwBlockLength; | 322 | __le32 dwBlockLength; |
318 | __le32 dwFpIndex; | 323 | __le32 dwNdpIndex; |
319 | } __attribute__ ((packed)); | 324 | } __attribute__ ((packed)); |
320 | 325 | ||
321 | /* | 326 | /* |
@@ -337,7 +342,7 @@ struct usb_cdc_ncm_dpe16 { | |||
337 | struct usb_cdc_ncm_ndp16 { | 342 | struct usb_cdc_ncm_ndp16 { |
338 | __le32 dwSignature; | 343 | __le32 dwSignature; |
339 | __le16 wLength; | 344 | __le16 wLength; |
340 | __le16 wNextFpIndex; | 345 | __le16 wNextNdpIndex; |
341 | struct usb_cdc_ncm_dpe16 dpe16[0]; | 346 | struct usb_cdc_ncm_dpe16 dpe16[0]; |
342 | } __attribute__ ((packed)); | 347 | } __attribute__ ((packed)); |
343 | 348 | ||
@@ -375,6 +380,7 @@ struct usb_cdc_ncm_ndp32 { | |||
375 | #define USB_CDC_NCM_NCAP_ENCAP_COMMAND (1 << 2) | 380 | #define USB_CDC_NCM_NCAP_ENCAP_COMMAND (1 << 2) |
376 | #define USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE (1 << 3) | 381 | #define USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE (1 << 3) |
377 | #define USB_CDC_NCM_NCAP_CRC_MODE (1 << 4) | 382 | #define USB_CDC_NCM_NCAP_CRC_MODE (1 << 4) |
383 | #define USB_CDC_NCM_NCAP_NTB_INPUT_SIZE (1 << 5) | ||
378 | 384 | ||
379 | /* CDC NCM subclass Table 6-3: NTB Parameter Structure */ | 385 | /* CDC NCM subclass Table 6-3: NTB Parameter Structure */ |
380 | #define USB_CDC_NCM_NTB16_SUPPORTED (1 << 0) | 386 | #define USB_CDC_NCM_NTB16_SUPPORTED (1 << 0) |
@@ -392,6 +398,13 @@ struct usb_cdc_ncm_ndp32 { | |||
392 | #define USB_CDC_NCM_NTB_MIN_IN_SIZE 2048 | 398 | #define USB_CDC_NCM_NTB_MIN_IN_SIZE 2048 |
393 | #define USB_CDC_NCM_NTB_MIN_OUT_SIZE 2048 | 399 | #define USB_CDC_NCM_NTB_MIN_OUT_SIZE 2048 |
394 | 400 | ||
401 | /* NTB Input Size Structure */ | ||
402 | struct usb_cdc_ncm_ndp_input_size { | ||
403 | __le32 dwNtbInMaxSize; | ||
404 | __le16 wNtbInMaxDatagrams; | ||
405 | __le16 wReserved; | ||
406 | } __attribute__ ((packed)); | ||
407 | |||
395 | /* CDC NCM subclass 6.2.11 SetCrcMode */ | 408 | /* CDC NCM subclass 6.2.11 SetCrcMode */ |
396 | #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00 | 409 | #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00 |
397 | #define USB_CDC_NCM_CRC_APPENDED 0x01 | 410 | #define USB_CDC_NCM_CRC_APPENDED 0x01 |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index dd6ee49a0844..a854fe89484e 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -112,6 +112,7 @@ struct usb_hcd { | |||
112 | /* Flags that get set only during HCD registration or removal. */ | 112 | /* Flags that get set only during HCD registration or removal. */ |
113 | unsigned rh_registered:1;/* is root hub registered? */ | 113 | unsigned rh_registered:1;/* is root hub registered? */ |
114 | unsigned rh_pollable:1; /* may we poll the root hub? */ | 114 | unsigned rh_pollable:1; /* may we poll the root hub? */ |
115 | unsigned msix_enabled:1; /* driver has MSI-X enabled? */ | ||
115 | 116 | ||
116 | /* The next flag is a stopgap, to be removed when all the HCDs | 117 | /* The next flag is a stopgap, to be removed when all the HCDs |
117 | * support the new root-hub polling mechanism. */ | 118 | * support the new root-hub polling mechanism. */ |
diff --git a/include/linux/usb/msm_hsusb_hw.h b/include/linux/usb/msm_hsusb_hw.h index b92e17349c7b..7d1babbff071 100644 --- a/include/linux/usb/msm_hsusb_hw.h +++ b/include/linux/usb/msm_hsusb_hw.h | |||
@@ -16,12 +16,8 @@ | |||
16 | #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__ | 16 | #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__ |
17 | #define __LINUX_USB_GADGET_MSM72K_UDC_H__ | 17 | #define __LINUX_USB_GADGET_MSM72K_UDC_H__ |
18 | 18 | ||
19 | #ifdef CONFIG_ARCH_MSM7X00A | ||
20 | #define USB_SBUSCFG (MSM_USB_BASE + 0x0090) | ||
21 | #else | ||
22 | #define USB_AHBBURST (MSM_USB_BASE + 0x0090) | 19 | #define USB_AHBBURST (MSM_USB_BASE + 0x0090) |
23 | #define USB_AHBMODE (MSM_USB_BASE + 0x0098) | 20 | #define USB_AHBMODE (MSM_USB_BASE + 0x0098) |
24 | #endif | ||
25 | #define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */ | 21 | #define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */ |
26 | 22 | ||
27 | #define USB_USBCMD (MSM_USB_BASE + 0x0140) | 23 | #define USB_USBCMD (MSM_USB_BASE + 0x0140) |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 16d682f4f7c3..c9049139a7a5 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -347,6 +347,9 @@ extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, | |||
347 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | 347 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, |
348 | unsigned int ch); | 348 | unsigned int ch); |
349 | extern int usb_serial_handle_break(struct usb_serial_port *port); | 349 | extern int usb_serial_handle_break(struct usb_serial_port *port); |
350 | extern void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | ||
351 | struct tty_struct *tty, | ||
352 | unsigned int status); | ||
350 | 353 | ||
351 | 354 | ||
352 | extern int usb_serial_bus_register(struct usb_serial_driver *device); | 355 | extern int usb_serial_bus_register(struct usb_serial_driver *device); |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 0093dd7c1d6f..800617b4ddd5 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -109,7 +109,10 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, | |||
109 | unsigned int fbit) | 109 | unsigned int fbit) |
110 | { | 110 | { |
111 | /* Did you forget to fix assumptions on max features? */ | 111 | /* Did you forget to fix assumptions on max features? */ |
112 | MAYBE_BUILD_BUG_ON(fbit >= 32); | 112 | if (__builtin_constant_p(fbit)) |
113 | BUILD_BUG_ON(fbit >= 32); | ||
114 | else | ||
115 | BUG_ON(fbit >= 32); | ||
113 | 116 | ||
114 | if (fbit < VIRTIO_TRANSPORT_F_START) | 117 | if (fbit < VIRTIO_TRANSPORT_F_START) |
115 | virtio_check_driver_offered_feature(vdev, fbit); | 118 | virtio_check_driver_offered_feature(vdev, fbit); |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index a85064db8f94..e4d333543a33 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
@@ -7,7 +7,8 @@ | |||
7 | * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | 7 | * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so |
8 | * anyone can use the definitions to implement compatible drivers/servers. | 8 | * anyone can use the definitions to implement compatible drivers/servers. |
9 | * | 9 | * |
10 | * Copyright (C) Red Hat, Inc., 2009, 2010 | 10 | * Copyright (C) Red Hat, Inc., 2009, 2010, 2011 |
11 | * Copyright (C) Amit Shah <amit.shah@redhat.com>, 2009, 2010, 2011 | ||
11 | */ | 12 | */ |
12 | 13 | ||
13 | /* Feature bits */ | 14 | /* Feature bits */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 1ac11586a2f5..f584aba78ca9 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -250,7 +250,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
250 | enum { | 250 | enum { |
251 | WQ_NON_REENTRANT = 1 << 0, /* guarantee non-reentrance */ | 251 | WQ_NON_REENTRANT = 1 << 0, /* guarantee non-reentrance */ |
252 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ | 252 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ |
253 | WQ_FREEZEABLE = 1 << 2, /* freeze during suspend */ | 253 | WQ_FREEZABLE = 1 << 2, /* freeze during suspend */ |
254 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ | 254 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ |
255 | WQ_HIGHPRI = 1 << 4, /* high priority */ | 255 | WQ_HIGHPRI = 1 << 4, /* high priority */ |
256 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ | 256 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ |
@@ -286,11 +286,15 @@ enum { | |||
286 | * any specific CPU, not concurrency managed, and all queued works are | 286 | * any specific CPU, not concurrency managed, and all queued works are |
287 | * executed immediately as long as max_active limit is not reached and | 287 | * executed immediately as long as max_active limit is not reached and |
288 | * resources are available. | 288 | * resources are available. |
289 | * | ||
290 | * system_freezable_wq is equivalent to system_wq except that it's | ||
291 | * freezable. | ||
289 | */ | 292 | */ |
290 | extern struct workqueue_struct *system_wq; | 293 | extern struct workqueue_struct *system_wq; |
291 | extern struct workqueue_struct *system_long_wq; | 294 | extern struct workqueue_struct *system_long_wq; |
292 | extern struct workqueue_struct *system_nrt_wq; | 295 | extern struct workqueue_struct *system_nrt_wq; |
293 | extern struct workqueue_struct *system_unbound_wq; | 296 | extern struct workqueue_struct *system_unbound_wq; |
297 | extern struct workqueue_struct *system_freezable_wq; | ||
294 | 298 | ||
295 | extern struct workqueue_struct * | 299 | extern struct workqueue_struct * |
296 | __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, | 300 | __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, |
@@ -318,7 +322,7 @@ __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, | |||
318 | /** | 322 | /** |
319 | * alloc_ordered_workqueue - allocate an ordered workqueue | 323 | * alloc_ordered_workqueue - allocate an ordered workqueue |
320 | * @name: name of the workqueue | 324 | * @name: name of the workqueue |
321 | * @flags: WQ_* flags (only WQ_FREEZEABLE and WQ_MEM_RECLAIM are meaningful) | 325 | * @flags: WQ_* flags (only WQ_FREEZABLE and WQ_MEM_RECLAIM are meaningful) |
322 | * | 326 | * |
323 | * Allocate an ordered workqueue. An ordered workqueue executes at | 327 | * Allocate an ordered workqueue. An ordered workqueue executes at |
324 | * most one work item at any given time in the queued order. They are | 328 | * most one work item at any given time in the queued order. They are |
@@ -335,8 +339,8 @@ alloc_ordered_workqueue(const char *name, unsigned int flags) | |||
335 | 339 | ||
336 | #define create_workqueue(name) \ | 340 | #define create_workqueue(name) \ |
337 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) | 341 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) |
338 | #define create_freezeable_workqueue(name) \ | 342 | #define create_freezable_workqueue(name) \ |
339 | alloc_workqueue((name), WQ_FREEZEABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1) | 343 | alloc_workqueue((name), WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1) |
340 | #define create_singlethread_workqueue(name) \ | 344 | #define create_singlethread_workqueue(name) \ |
341 | alloc_workqueue((name), WQ_UNBOUND | WQ_MEM_RECLAIM, 1) | 345 | alloc_workqueue((name), WQ_UNBOUND | WQ_MEM_RECLAIM, 1) |
342 | 346 | ||
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 071fd7a8d781..6b75a6971346 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -139,6 +139,8 @@ do { \ | |||
139 | */ | 139 | */ |
140 | 140 | ||
141 | enum p9_msg_t { | 141 | enum p9_msg_t { |
142 | P9_TSYNCFS = 0, | ||
143 | P9_RSYNCFS, | ||
142 | P9_TLERROR = 6, | 144 | P9_TLERROR = 6, |
143 | P9_RLERROR, | 145 | P9_RLERROR, |
144 | P9_TSTATFS = 8, | 146 | P9_TSTATFS = 8, |
@@ -688,7 +690,11 @@ struct p9_rwstat { | |||
688 | * @id: protocol operating identifier of type &p9_msg_t | 690 | * @id: protocol operating identifier of type &p9_msg_t |
689 | * @tag: transaction id of the request | 691 | * @tag: transaction id of the request |
690 | * @offset: used by marshalling routines to track currentposition in buffer | 692 | * @offset: used by marshalling routines to track currentposition in buffer |
691 | * @capacity: used by marshalling routines to track total capacity | 693 | * @capacity: used by marshalling routines to track total malloc'd capacity |
694 | * @pubuf: Payload user buffer given by the caller | ||
695 | * @pubuf: Payload kernel buffer given by the caller | ||
696 | * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write. | ||
697 | * @private: For transport layer's use. | ||
692 | * @sdata: payload | 698 | * @sdata: payload |
693 | * | 699 | * |
694 | * &p9_fcall represents the structure for all 9P RPC | 700 | * &p9_fcall represents the structure for all 9P RPC |
@@ -705,6 +711,10 @@ struct p9_fcall { | |||
705 | 711 | ||
706 | size_t offset; | 712 | size_t offset; |
707 | size_t capacity; | 713 | size_t capacity; |
714 | char __user *pubuf; | ||
715 | char *pkbuf; | ||
716 | size_t pbuf_size; | ||
717 | void *private; | ||
708 | 718 | ||
709 | uint8_t *sdata; | 719 | uint8_t *sdata; |
710 | }; | 720 | }; |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 83ba6a4d58a3..0a30977e3c1f 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -230,6 +230,7 @@ int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, | |||
230 | gid_t gid, struct p9_qid *qid); | 230 | gid_t gid, struct p9_qid *qid); |
231 | int p9_client_clunk(struct p9_fid *fid); | 231 | int p9_client_clunk(struct p9_fid *fid); |
232 | int p9_client_fsync(struct p9_fid *fid, int datasync); | 232 | int p9_client_fsync(struct p9_fid *fid, int datasync); |
233 | int p9_client_sync_fs(struct p9_fid *fid); | ||
233 | int p9_client_remove(struct p9_fid *fid); | 234 | int p9_client_remove(struct p9_fid *fid); |
234 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, | 235 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
235 | u64 offset, u32 count); | 236 | u64 offset, u32 count); |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 6d5886efb102..82868f18c573 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,11 +26,19 @@ | |||
26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
28 | 28 | ||
29 | #define P9_TRANS_PREF_PAYLOAD_MASK 0x1 | ||
30 | |||
31 | /* Default. Add Payload to PDU before sending it down to transport layer */ | ||
32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 | ||
33 | /* Send pay load seperately to transport layer along with PDU.*/ | ||
34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 | ||
35 | |||
29 | /** | 36 | /** |
30 | * struct p9_trans_module - transport module interface | 37 | * struct p9_trans_module - transport module interface |
31 | * @list: used to maintain a list of currently available transports | 38 | * @list: used to maintain a list of currently available transports |
32 | * @name: the human-readable name of the transport | 39 | * @name: the human-readable name of the transport |
33 | * @maxsize: transport provided maximum packet size | 40 | * @maxsize: transport provided maximum packet size |
41 | * @pref: Preferences of this transport | ||
34 | * @def: set if this transport should be considered the default | 42 | * @def: set if this transport should be considered the default |
35 | * @create: member function to create a new connection on this transport | 43 | * @create: member function to create a new connection on this transport |
36 | * @request: member function to issue a request to the transport | 44 | * @request: member function to issue a request to the transport |
@@ -47,6 +55,7 @@ struct p9_trans_module { | |||
47 | struct list_head list; | 55 | struct list_head list; |
48 | char *name; /* name of transport */ | 56 | char *name; /* name of transport */ |
49 | int maxsize; /* max message size of transport */ | 57 | int maxsize; /* max message size of transport */ |
58 | int pref; /* Preferences of this transport */ | ||
50 | int def; /* this transport should be default */ | 59 | int def; /* this transport should be default */ |
51 | struct module *owner; | 60 | struct module *owner; |
52 | int (*create)(struct p9_client *, const char *, char *); | 61 | int (*create)(struct p9_client *, const char *, char *); |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index a29feb01854e..d2cf88407690 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -184,6 +184,7 @@ struct hci_conn { | |||
184 | __u32 link_mode; | 184 | __u32 link_mode; |
185 | __u8 auth_type; | 185 | __u8 auth_type; |
186 | __u8 sec_level; | 186 | __u8 sec_level; |
187 | __u8 pending_sec_level; | ||
187 | __u8 power_save; | 188 | __u8 power_save; |
188 | __u16 disc_timeout; | 189 | __u16 disc_timeout; |
189 | unsigned long pend; | 190 | unsigned long pend; |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 8a64b811a39a..b4c7c1cbcf40 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -195,7 +195,8 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr) | |||
195 | */ | 195 | */ |
196 | static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) | 196 | static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) |
197 | { | 197 | { |
198 | nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | 198 | if (hdr) |
199 | nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | ||
199 | } | 200 | } |
200 | 201 | ||
201 | /** | 202 | /** |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 4a3cd2cd2f5e..96e50e0ce3ca 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -89,6 +89,18 @@ | |||
89 | #define IPV6_ADDR_SCOPE_GLOBAL 0x0e | 89 | #define IPV6_ADDR_SCOPE_GLOBAL 0x0e |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * Addr flags | ||
93 | */ | ||
94 | #ifdef __KERNEL__ | ||
95 | #define IPV6_ADDR_MC_FLAG_TRANSIENT(a) \ | ||
96 | ((a)->s6_addr[1] & 0x10) | ||
97 | #define IPV6_ADDR_MC_FLAG_PREFIX(a) \ | ||
98 | ((a)->s6_addr[1] & 0x20) | ||
99 | #define IPV6_ADDR_MC_FLAG_RENDEZVOUS(a) \ | ||
100 | ((a)->s6_addr[1] & 0x40) | ||
101 | #endif | ||
102 | |||
103 | /* | ||
92 | * fragmentation header | 104 | * fragmentation header |
93 | */ | 105 | */ |
94 | 106 | ||
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index 96ba5f7dcab6..349cefedc9f3 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
@@ -77,9 +77,6 @@ nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) | |||
77 | if (e == NULL) | 77 | if (e == NULL) |
78 | return; | 78 | return; |
79 | 79 | ||
80 | if (!(e->ctmask & (1 << event))) | ||
81 | return; | ||
82 | |||
83 | set_bit(event, &e->cache); | 80 | set_bit(event, &e->cache); |
84 | } | 81 | } |
85 | 82 | ||
diff --git a/include/net/netfilter/nf_tproxy_core.h b/include/net/netfilter/nf_tproxy_core.h index cd85b3bc8327..e505358d8999 100644 --- a/include/net/netfilter/nf_tproxy_core.h +++ b/include/net/netfilter/nf_tproxy_core.h | |||
@@ -201,18 +201,8 @@ nf_tproxy_get_sock_v6(struct net *net, const u8 protocol, | |||
201 | } | 201 | } |
202 | #endif | 202 | #endif |
203 | 203 | ||
204 | static inline void | ||
205 | nf_tproxy_put_sock(struct sock *sk) | ||
206 | { | ||
207 | /* TIME_WAIT inet sockets have to be handled differently */ | ||
208 | if ((sk->sk_protocol == IPPROTO_TCP) && (sk->sk_state == TCP_TIME_WAIT)) | ||
209 | inet_twsk_put(inet_twsk(sk)); | ||
210 | else | ||
211 | sock_put(sk); | ||
212 | } | ||
213 | |||
214 | /* assign a socket to the skb -- consumes sk */ | 204 | /* assign a socket to the skb -- consumes sk */ |
215 | int | 205 | void |
216 | nf_tproxy_assign_sock(struct sk_buff *skb, struct sock *sk); | 206 | nf_tproxy_assign_sock(struct sk_buff *skb, struct sock *sk); |
217 | 207 | ||
218 | #endif | 208 | #endif |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index e9eee99d8b1f..04f8556313d5 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -199,7 +199,7 @@ struct tcf_proto { | |||
199 | 199 | ||
200 | struct qdisc_skb_cb { | 200 | struct qdisc_skb_cb { |
201 | unsigned int pkt_len; | 201 | unsigned int pkt_len; |
202 | char data[]; | 202 | long data[]; |
203 | }; | 203 | }; |
204 | 204 | ||
205 | static inline int qdisc_qlen(struct Qdisc *q) | 205 | static inline int qdisc_qlen(struct Qdisc *q) |
@@ -445,7 +445,6 @@ static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | |||
445 | { | 445 | { |
446 | __skb_queue_tail(list, skb); | 446 | __skb_queue_tail(list, skb); |
447 | sch->qstats.backlog += qdisc_pkt_len(skb); | 447 | sch->qstats.backlog += qdisc_pkt_len(skb); |
448 | qdisc_bstats_update(sch, skb); | ||
449 | 448 | ||
450 | return NET_XMIT_SUCCESS; | 449 | return NET_XMIT_SUCCESS; |
451 | } | 450 | } |
@@ -460,8 +459,10 @@ static inline struct sk_buff *__qdisc_dequeue_head(struct Qdisc *sch, | |||
460 | { | 459 | { |
461 | struct sk_buff *skb = __skb_dequeue(list); | 460 | struct sk_buff *skb = __skb_dequeue(list); |
462 | 461 | ||
463 | if (likely(skb != NULL)) | 462 | if (likely(skb != NULL)) { |
464 | sch->qstats.backlog -= qdisc_pkt_len(skb); | 463 | sch->qstats.backlog -= qdisc_pkt_len(skb); |
464 | qdisc_bstats_update(sch, skb); | ||
465 | } | ||
465 | 466 | ||
466 | return skb; | 467 | return skb; |
467 | } | 468 | } |
@@ -474,10 +475,11 @@ static inline struct sk_buff *qdisc_dequeue_head(struct Qdisc *sch) | |||
474 | static inline unsigned int __qdisc_queue_drop_head(struct Qdisc *sch, | 475 | static inline unsigned int __qdisc_queue_drop_head(struct Qdisc *sch, |
475 | struct sk_buff_head *list) | 476 | struct sk_buff_head *list) |
476 | { | 477 | { |
477 | struct sk_buff *skb = __qdisc_dequeue_head(sch, list); | 478 | struct sk_buff *skb = __skb_dequeue(list); |
478 | 479 | ||
479 | if (likely(skb != NULL)) { | 480 | if (likely(skb != NULL)) { |
480 | unsigned int len = qdisc_pkt_len(skb); | 481 | unsigned int len = qdisc_pkt_len(skb); |
482 | sch->qstats.backlog -= len; | ||
481 | kfree_skb(skb); | 483 | kfree_skb(skb); |
482 | return len; | 484 | return len; |
483 | } | 485 | } |
diff --git a/include/net/sock.h b/include/net/sock.h index d884d268c704..bc1cf7d88ccb 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -753,6 +753,8 @@ struct proto { | |||
753 | int level, | 753 | int level, |
754 | int optname, char __user *optval, | 754 | int optname, char __user *optval, |
755 | int __user *option); | 755 | int __user *option); |
756 | int (*compat_ioctl)(struct sock *sk, | ||
757 | unsigned int cmd, unsigned long arg); | ||
756 | #endif | 758 | #endif |
757 | int (*sendmsg)(struct kiocb *iocb, struct sock *sk, | 759 | int (*sendmsg)(struct kiocb *iocb, struct sock *sk, |
758 | struct msghdr *msg, size_t len); | 760 | struct msghdr *msg, size_t len); |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 8479b66c067b..3fd5064dd43a 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -261,6 +261,7 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev); | |||
261 | #define CONF_ENABLE_ESR 0x0008 | 261 | #define CONF_ENABLE_ESR 0x0008 |
262 | #define CONF_ENABLE_IOCARD 0x0010 /* auto-enabled if IO resources or IRQ | 262 | #define CONF_ENABLE_IOCARD 0x0010 /* auto-enabled if IO resources or IRQ |
263 | * (CONF_ENABLE_IRQ) in use */ | 263 | * (CONF_ENABLE_IRQ) in use */ |
264 | #define CONF_ENABLE_ZVCARD 0x0020 | ||
264 | 265 | ||
265 | /* flags used by pcmcia_loop_config() autoconfiguration */ | 266 | /* flags used by pcmcia_loop_config() autoconfiguration */ |
266 | #define CONF_AUTO_CHECK_VCC 0x0100 /* check for matching Vcc? */ | 267 | #define CONF_AUTO_CHECK_VCC 0x0100 /* check for matching Vcc? */ |
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index c583193ae929..9c159f74c6d0 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h | |||
@@ -39,6 +39,11 @@ int sas_ata_init_host_and_port(struct domain_device *found_dev, | |||
39 | struct scsi_target *starget); | 39 | struct scsi_target *starget); |
40 | 40 | ||
41 | void sas_ata_task_abort(struct sas_task *task); | 41 | void sas_ata_task_abort(struct sas_task *task); |
42 | void sas_ata_strategy_handler(struct Scsi_Host *shost); | ||
43 | int sas_ata_timed_out(struct scsi_cmnd *cmd, struct sas_task *task, | ||
44 | enum blk_eh_timer_return *rtn); | ||
45 | int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, | ||
46 | struct list_head *done_q); | ||
42 | 47 | ||
43 | #else | 48 | #else |
44 | 49 | ||
@@ -55,6 +60,23 @@ static inline int sas_ata_init_host_and_port(struct domain_device *found_dev, | |||
55 | static inline void sas_ata_task_abort(struct sas_task *task) | 60 | static inline void sas_ata_task_abort(struct sas_task *task) |
56 | { | 61 | { |
57 | } | 62 | } |
63 | |||
64 | static inline void sas_ata_strategy_handler(struct Scsi_Host *shost) | ||
65 | { | ||
66 | } | ||
67 | |||
68 | static inline int sas_ata_timed_out(struct scsi_cmnd *cmd, | ||
69 | struct sas_task *task, | ||
70 | enum blk_eh_timer_return *rtn) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | static inline int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, | ||
75 | struct list_head *done_q) | ||
76 | { | ||
77 | return 0; | ||
78 | } | ||
79 | |||
58 | #endif | 80 | #endif |
59 | 81 | ||
60 | #endif /* _SAS_ATA_H_ */ | 82 | #endif /* _SAS_ATA_H_ */ |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 648d23358038..b76d4006e36d 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define _SCSI_SCSI_H | 9 | #define _SCSI_SCSI_H |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/scatterlist.h> | ||
12 | 13 | ||
13 | struct scsi_cmnd; | 14 | struct scsi_cmnd; |
14 | 15 | ||
diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h index b4a0db2307ef..1eeebd534f7e 100644 --- a/include/sound/wm8903.h +++ b/include/sound/wm8903.h | |||
@@ -17,13 +17,9 @@ | |||
17 | /* | 17 | /* |
18 | * R6 (0x06) - Mic Bias Control 0 | 18 | * R6 (0x06) - Mic Bias Control 0 |
19 | */ | 19 | */ |
20 | #define WM8903_MICDET_HYST_ENA 0x0080 /* MICDET_HYST_ENA */ | 20 | #define WM8903_MICDET_THR_MASK 0x0030 /* MICDET_THR - [5:4] */ |
21 | #define WM8903_MICDET_HYST_ENA_MASK 0x0080 /* MICDET_HYST_ENA */ | 21 | #define WM8903_MICDET_THR_SHIFT 4 /* MICDET_THR - [5:4] */ |
22 | #define WM8903_MICDET_HYST_ENA_SHIFT 7 /* MICDET_HYST_ENA */ | 22 | #define WM8903_MICDET_THR_WIDTH 2 /* MICDET_THR - [5:4] */ |
23 | #define WM8903_MICDET_HYST_ENA_WIDTH 1 /* MICDET_HYST_ENA */ | ||
24 | #define WM8903_MICDET_THR_MASK 0x0070 /* MICDET_THR - [6:4] */ | ||
25 | #define WM8903_MICDET_THR_SHIFT 4 /* MICDET_THR - [6:4] */ | ||
26 | #define WM8903_MICDET_THR_WIDTH 3 /* MICDET_THR - [6:4] */ | ||
27 | #define WM8903_MICSHORT_THR_MASK 0x000C /* MICSHORT_THR - [3:2] */ | 23 | #define WM8903_MICSHORT_THR_MASK 0x000C /* MICSHORT_THR - [3:2] */ |
28 | #define WM8903_MICSHORT_THR_SHIFT 2 /* MICSHORT_THR - [3:2] */ | 24 | #define WM8903_MICSHORT_THR_SHIFT 2 /* MICSHORT_THR - [3:2] */ |
29 | #define WM8903_MICSHORT_THR_WIDTH 2 /* MICSHORT_THR - [3:2] */ | 25 | #define WM8903_MICSHORT_THR_WIDTH 2 /* MICSHORT_THR - [3:2] */ |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 07fdfb6b9a9a..0828b6c8610a 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <scsi/scsi_cmnd.h> | 8 | #include <scsi/scsi_cmnd.h> |
9 | #include <net/sock.h> | 9 | #include <net/sock.h> |
10 | #include <net/tcp.h> | 10 | #include <net/tcp.h> |
11 | #include "target_core_mib.h" | ||
12 | 11 | ||
13 | #define TARGET_CORE_MOD_VERSION "v4.0.0-rc6" | 12 | #define TARGET_CORE_MOD_VERSION "v4.0.0-rc6" |
14 | #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) | 13 | #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) |
@@ -195,6 +194,21 @@ typedef enum { | |||
195 | SAM_TASK_ATTR_EMULATED | 194 | SAM_TASK_ATTR_EMULATED |
196 | } t10_task_attr_index_t; | 195 | } t10_task_attr_index_t; |
197 | 196 | ||
197 | /* | ||
198 | * Used for target SCSI statistics | ||
199 | */ | ||
200 | typedef enum { | ||
201 | SCSI_INST_INDEX, | ||
202 | SCSI_DEVICE_INDEX, | ||
203 | SCSI_AUTH_INTR_INDEX, | ||
204 | SCSI_INDEX_TYPE_MAX | ||
205 | } scsi_index_t; | ||
206 | |||
207 | struct scsi_index_table { | ||
208 | spinlock_t lock; | ||
209 | u32 scsi_mib_index[SCSI_INDEX_TYPE_MAX]; | ||
210 | } ____cacheline_aligned; | ||
211 | |||
198 | struct se_cmd; | 212 | struct se_cmd; |
199 | 213 | ||
200 | struct t10_alua { | 214 | struct t10_alua { |
@@ -578,8 +592,6 @@ struct se_node_acl { | |||
578 | spinlock_t stats_lock; | 592 | spinlock_t stats_lock; |
579 | /* Used for PR SPEC_I_PT=1 and REGISTER_AND_MOVE */ | 593 | /* Used for PR SPEC_I_PT=1 and REGISTER_AND_MOVE */ |
580 | atomic_t acl_pr_ref_count; | 594 | atomic_t acl_pr_ref_count; |
581 | /* Used for MIB access */ | ||
582 | atomic_t mib_ref_count; | ||
583 | struct se_dev_entry *device_list; | 595 | struct se_dev_entry *device_list; |
584 | struct se_session *nacl_sess; | 596 | struct se_session *nacl_sess; |
585 | struct se_portal_group *se_tpg; | 597 | struct se_portal_group *se_tpg; |
@@ -595,8 +607,6 @@ struct se_node_acl { | |||
595 | } ____cacheline_aligned; | 607 | } ____cacheline_aligned; |
596 | 608 | ||
597 | struct se_session { | 609 | struct se_session { |
598 | /* Used for MIB access */ | ||
599 | atomic_t mib_ref_count; | ||
600 | u64 sess_bin_isid; | 610 | u64 sess_bin_isid; |
601 | struct se_node_acl *se_node_acl; | 611 | struct se_node_acl *se_node_acl; |
602 | struct se_portal_group *se_tpg; | 612 | struct se_portal_group *se_tpg; |
@@ -806,7 +816,6 @@ struct se_hba { | |||
806 | /* Virtual iSCSI devices attached. */ | 816 | /* Virtual iSCSI devices attached. */ |
807 | u32 dev_count; | 817 | u32 dev_count; |
808 | u32 hba_index; | 818 | u32 hba_index; |
809 | atomic_t dev_mib_access_count; | ||
810 | atomic_t load_balance_queue; | 819 | atomic_t load_balance_queue; |
811 | atomic_t left_queue_depth; | 820 | atomic_t left_queue_depth; |
812 | /* Maximum queue depth the HBA can handle. */ | 821 | /* Maximum queue depth the HBA can handle. */ |
@@ -845,6 +854,12 @@ struct se_lun { | |||
845 | 854 | ||
846 | #define SE_LUN(c) ((struct se_lun *)(c)->se_lun) | 855 | #define SE_LUN(c) ((struct se_lun *)(c)->se_lun) |
847 | 856 | ||
857 | struct scsi_port_stats { | ||
858 | u64 cmd_pdus; | ||
859 | u64 tx_data_octets; | ||
860 | u64 rx_data_octets; | ||
861 | } ____cacheline_aligned; | ||
862 | |||
848 | struct se_port { | 863 | struct se_port { |
849 | /* RELATIVE TARGET PORT IDENTIFER */ | 864 | /* RELATIVE TARGET PORT IDENTIFER */ |
850 | u16 sep_rtpi; | 865 | u16 sep_rtpi; |
@@ -867,6 +882,7 @@ struct se_port { | |||
867 | } ____cacheline_aligned; | 882 | } ____cacheline_aligned; |
868 | 883 | ||
869 | struct se_tpg_np { | 884 | struct se_tpg_np { |
885 | struct se_portal_group *tpg_np_parent; | ||
870 | struct config_group tpg_np_group; | 886 | struct config_group tpg_np_group; |
871 | } ____cacheline_aligned; | 887 | } ____cacheline_aligned; |
872 | 888 | ||
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 66f44e56eb80..2e8ec51f0615 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h | |||
@@ -111,6 +111,8 @@ struct se_subsystem_api; | |||
111 | 111 | ||
112 | extern int init_se_global(void); | 112 | extern int init_se_global(void); |
113 | extern void release_se_global(void); | 113 | extern void release_se_global(void); |
114 | extern void init_scsi_index_table(void); | ||
115 | extern u32 scsi_get_new_index(scsi_index_t); | ||
114 | extern void transport_init_queue_obj(struct se_queue_obj *); | 116 | extern void transport_init_queue_obj(struct se_queue_obj *); |
115 | extern int transport_subsystem_check_init(void); | 117 | extern int transport_subsystem_check_init(void); |
116 | extern int transport_subsystem_register(struct se_subsystem_api *); | 118 | extern int transport_subsystem_register(struct se_subsystem_api *); |
@@ -133,6 +135,8 @@ extern void transport_complete_task(struct se_task *, int); | |||
133 | extern void transport_add_task_to_execute_queue(struct se_task *, | 135 | extern void transport_add_task_to_execute_queue(struct se_task *, |
134 | struct se_task *, | 136 | struct se_task *, |
135 | struct se_device *); | 137 | struct se_device *); |
138 | extern void transport_remove_task_from_execute_queue(struct se_task *, | ||
139 | struct se_device *); | ||
136 | unsigned char *transport_dump_cmd_direction(struct se_cmd *); | 140 | unsigned char *transport_dump_cmd_direction(struct se_cmd *); |
137 | extern void transport_dump_dev_state(struct se_device *, char *, int *); | 141 | extern void transport_dump_dev_state(struct se_device *, char *, int *); |
138 | extern void transport_dump_dev_info(struct se_device *, struct se_lun *, | 142 | extern void transport_dump_dev_info(struct se_device *, struct se_lun *, |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index aba421d68f6f..78f18adb49c8 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -31,7 +31,7 @@ DECLARE_EVENT_CLASS(block_rq_with_error, | |||
31 | 0 : blk_rq_sectors(rq); | 31 | 0 : blk_rq_sectors(rq); |
32 | __entry->errors = rq->errors; | 32 | __entry->errors = rq->errors; |
33 | 33 | ||
34 | blk_fill_rwbs_rq(__entry->rwbs, rq); | 34 | blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); |
35 | blk_dump_cmd(__get_str(cmd), rq); | 35 | blk_dump_cmd(__get_str(cmd), rq); |
36 | ), | 36 | ), |
37 | 37 | ||
@@ -118,7 +118,7 @@ DECLARE_EVENT_CLASS(block_rq, | |||
118 | __entry->bytes = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? | 118 | __entry->bytes = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? |
119 | blk_rq_bytes(rq) : 0; | 119 | blk_rq_bytes(rq) : 0; |
120 | 120 | ||
121 | blk_fill_rwbs_rq(__entry->rwbs, rq); | 121 | blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); |
122 | blk_dump_cmd(__get_str(cmd), rq); | 122 | blk_dump_cmd(__get_str(cmd), rq); |
123 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | 123 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); |
124 | ), | 124 | ), |
@@ -563,7 +563,7 @@ TRACE_EVENT(block_rq_remap, | |||
563 | __entry->nr_sector = blk_rq_sectors(rq); | 563 | __entry->nr_sector = blk_rq_sectors(rq); |
564 | __entry->old_dev = dev; | 564 | __entry->old_dev = dev; |
565 | __entry->old_sector = from; | 565 | __entry->old_sector = from; |
566 | blk_fill_rwbs_rq(__entry->rwbs, rq); | 566 | blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); |
567 | ), | 567 | ), |
568 | 568 | ||
569 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", | 569 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", |
diff --git a/include/trace/events/mce.h b/include/trace/events/mce.h index 7eee77895cb3..4cbbcef6baa8 100644 --- a/include/trace/events/mce.h +++ b/include/trace/events/mce.h | |||
@@ -17,36 +17,36 @@ TRACE_EVENT(mce_record, | |||
17 | TP_STRUCT__entry( | 17 | TP_STRUCT__entry( |
18 | __field( u64, mcgcap ) | 18 | __field( u64, mcgcap ) |
19 | __field( u64, mcgstatus ) | 19 | __field( u64, mcgstatus ) |
20 | __field( u8, bank ) | ||
21 | __field( u64, status ) | 20 | __field( u64, status ) |
22 | __field( u64, addr ) | 21 | __field( u64, addr ) |
23 | __field( u64, misc ) | 22 | __field( u64, misc ) |
24 | __field( u64, ip ) | 23 | __field( u64, ip ) |
25 | __field( u8, cs ) | ||
26 | __field( u64, tsc ) | 24 | __field( u64, tsc ) |
27 | __field( u64, walltime ) | 25 | __field( u64, walltime ) |
28 | __field( u32, cpu ) | 26 | __field( u32, cpu ) |
29 | __field( u32, cpuid ) | 27 | __field( u32, cpuid ) |
30 | __field( u32, apicid ) | 28 | __field( u32, apicid ) |
31 | __field( u32, socketid ) | 29 | __field( u32, socketid ) |
30 | __field( u8, cs ) | ||
31 | __field( u8, bank ) | ||
32 | __field( u8, cpuvendor ) | 32 | __field( u8, cpuvendor ) |
33 | ), | 33 | ), |
34 | 34 | ||
35 | TP_fast_assign( | 35 | TP_fast_assign( |
36 | __entry->mcgcap = m->mcgcap; | 36 | __entry->mcgcap = m->mcgcap; |
37 | __entry->mcgstatus = m->mcgstatus; | 37 | __entry->mcgstatus = m->mcgstatus; |
38 | __entry->bank = m->bank; | ||
39 | __entry->status = m->status; | 38 | __entry->status = m->status; |
40 | __entry->addr = m->addr; | 39 | __entry->addr = m->addr; |
41 | __entry->misc = m->misc; | 40 | __entry->misc = m->misc; |
42 | __entry->ip = m->ip; | 41 | __entry->ip = m->ip; |
43 | __entry->cs = m->cs; | ||
44 | __entry->tsc = m->tsc; | 42 | __entry->tsc = m->tsc; |
45 | __entry->walltime = m->time; | 43 | __entry->walltime = m->time; |
46 | __entry->cpu = m->extcpu; | 44 | __entry->cpu = m->extcpu; |
47 | __entry->cpuid = m->cpuid; | 45 | __entry->cpuid = m->cpuid; |
48 | __entry->apicid = m->apicid; | 46 | __entry->apicid = m->apicid; |
49 | __entry->socketid = m->socketid; | 47 | __entry->socketid = m->socketid; |
48 | __entry->cs = m->cs; | ||
49 | __entry->bank = m->bank; | ||
50 | __entry->cpuvendor = m->cpuvendor; | 50 | __entry->cpuvendor = m->cpuvendor; |
51 | ), | 51 | ), |
52 | 52 | ||
diff --git a/include/trace/events/module.h b/include/trace/events/module.h index c6bae36547e5..21a546d27c0c 100644 --- a/include/trace/events/module.h +++ b/include/trace/events/module.h | |||
@@ -108,14 +108,14 @@ TRACE_EVENT(module_request, | |||
108 | TP_ARGS(name, wait, ip), | 108 | TP_ARGS(name, wait, ip), |
109 | 109 | ||
110 | TP_STRUCT__entry( | 110 | TP_STRUCT__entry( |
111 | __field( bool, wait ) | ||
112 | __field( unsigned long, ip ) | 111 | __field( unsigned long, ip ) |
112 | __field( bool, wait ) | ||
113 | __string( name, name ) | 113 | __string( name, name ) |
114 | ), | 114 | ), |
115 | 115 | ||
116 | TP_fast_assign( | 116 | TP_fast_assign( |
117 | __entry->wait = wait; | ||
118 | __entry->ip = ip; | 117 | __entry->ip = ip; |
118 | __entry->wait = wait; | ||
119 | __assign_str(name, name); | 119 | __assign_str(name, name); |
120 | ), | 120 | ), |
121 | 121 | ||
@@ -129,4 +129,3 @@ TRACE_EVENT(module_request, | |||
129 | 129 | ||
130 | /* This part must be outside protection */ | 130 | /* This part must be outside protection */ |
131 | #include <trace/define_trace.h> | 131 | #include <trace/define_trace.h> |
132 | |||
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index f10293c41b1e..0c68ae22da22 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -19,14 +19,14 @@ TRACE_EVENT(kfree_skb, | |||
19 | 19 | ||
20 | TP_STRUCT__entry( | 20 | TP_STRUCT__entry( |
21 | __field( void *, skbaddr ) | 21 | __field( void *, skbaddr ) |
22 | __field( unsigned short, protocol ) | ||
23 | __field( void *, location ) | 22 | __field( void *, location ) |
23 | __field( unsigned short, protocol ) | ||
24 | ), | 24 | ), |
25 | 25 | ||
26 | TP_fast_assign( | 26 | TP_fast_assign( |
27 | __entry->skbaddr = skb; | 27 | __entry->skbaddr = skb; |
28 | __entry->protocol = ntohs(skb->protocol); | ||
29 | __entry->location = location; | 28 | __entry->location = location; |
29 | __entry->protocol = ntohs(skb->protocol); | ||
30 | ), | 30 | ), |
31 | 31 | ||
32 | TP_printk("skbaddr=%p protocol=%u location=%p", | 32 | TP_printk("skbaddr=%p protocol=%u location=%p", |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index e16610c208c9..3e68366d485a 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -446,14 +446,16 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
446 | * .reg = ftrace_event_reg, | 446 | * .reg = ftrace_event_reg, |
447 | * }; | 447 | * }; |
448 | * | 448 | * |
449 | * static struct ftrace_event_call __used | 449 | * static struct ftrace_event_call event_<call> = { |
450 | * __attribute__((__aligned__(4))) | ||
451 | * __attribute__((section("_ftrace_events"))) event_<call> = { | ||
452 | * .name = "<call>", | 450 | * .name = "<call>", |
453 | * .class = event_class_<template>, | 451 | * .class = event_class_<template>, |
454 | * .event = &ftrace_event_type_<call>, | 452 | * .event = &ftrace_event_type_<call>, |
455 | * .print_fmt = print_fmt_<call>, | 453 | * .print_fmt = print_fmt_<call>, |
456 | * }; | 454 | * }; |
455 | * // its only safe to use pointers when doing linker tricks to | ||
456 | * // create an array. | ||
457 | * static struct ftrace_event_call __used | ||
458 | * __attribute__((section("_ftrace_events"))) *__event_<call> = &event_<call>; | ||
457 | * | 459 | * |
458 | */ | 460 | */ |
459 | 461 | ||
@@ -579,28 +581,28 @@ static struct ftrace_event_class __used event_class_##call = { \ | |||
579 | #undef DEFINE_EVENT | 581 | #undef DEFINE_EVENT |
580 | #define DEFINE_EVENT(template, call, proto, args) \ | 582 | #define DEFINE_EVENT(template, call, proto, args) \ |
581 | \ | 583 | \ |
582 | static struct ftrace_event_call __used \ | 584 | static struct ftrace_event_call __used event_##call = { \ |
583 | __attribute__((__aligned__(4))) \ | ||
584 | __attribute__((section("_ftrace_events"))) event_##call = { \ | ||
585 | .name = #call, \ | 585 | .name = #call, \ |
586 | .class = &event_class_##template, \ | 586 | .class = &event_class_##template, \ |
587 | .event.funcs = &ftrace_event_type_funcs_##template, \ | 587 | .event.funcs = &ftrace_event_type_funcs_##template, \ |
588 | .print_fmt = print_fmt_##template, \ | 588 | .print_fmt = print_fmt_##template, \ |
589 | }; | 589 | }; \ |
590 | static struct ftrace_event_call __used \ | ||
591 | __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | ||
590 | 592 | ||
591 | #undef DEFINE_EVENT_PRINT | 593 | #undef DEFINE_EVENT_PRINT |
592 | #define DEFINE_EVENT_PRINT(template, call, proto, args, print) \ | 594 | #define DEFINE_EVENT_PRINT(template, call, proto, args, print) \ |
593 | \ | 595 | \ |
594 | static const char print_fmt_##call[] = print; \ | 596 | static const char print_fmt_##call[] = print; \ |
595 | \ | 597 | \ |
596 | static struct ftrace_event_call __used \ | 598 | static struct ftrace_event_call __used event_##call = { \ |
597 | __attribute__((__aligned__(4))) \ | ||
598 | __attribute__((section("_ftrace_events"))) event_##call = { \ | ||
599 | .name = #call, \ | 599 | .name = #call, \ |
600 | .class = &event_class_##template, \ | 600 | .class = &event_class_##template, \ |
601 | .event.funcs = &ftrace_event_type_funcs_##call, \ | 601 | .event.funcs = &ftrace_event_type_funcs_##call, \ |
602 | .print_fmt = print_fmt_##call, \ | 602 | .print_fmt = print_fmt_##call, \ |
603 | } | 603 | }; \ |
604 | static struct ftrace_event_call __used \ | ||
605 | __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | ||
604 | 606 | ||
605 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 607 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
606 | 608 | ||
diff --git a/include/xen/events.h b/include/xen/events.h index 00f53ddcc062..962da2ced5b4 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -75,11 +75,9 @@ int xen_allocate_pirq(unsigned gsi, int shareable, char *name); | |||
75 | int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name); | 75 | int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name); |
76 | 76 | ||
77 | #ifdef CONFIG_PCI_MSI | 77 | #ifdef CONFIG_PCI_MSI |
78 | /* Allocate an irq and a pirq to be used with MSIs. */ | 78 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); |
79 | #define XEN_ALLOC_PIRQ (1 << 0) | 79 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, |
80 | #define XEN_ALLOC_IRQ (1 << 1) | 80 | int pirq, int vector, const char *name); |
81 | void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc_mask); | ||
82 | int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type); | ||
83 | #endif | 81 | #endif |
84 | 82 | ||
85 | /* De-allocates the above mentioned physical interrupt. */ | 83 | /* De-allocates the above mentioned physical interrupt. */ |
diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h index c2d1fa4dc1ee..61e523af3c46 100644 --- a/include/xen/interface/io/blkif.h +++ b/include/xen/interface/io/blkif.h | |||
@@ -51,11 +51,7 @@ typedef uint64_t blkif_sector_t; | |||
51 | */ | 51 | */ |
52 | #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 | 52 | #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 |
53 | 53 | ||
54 | struct blkif_request { | 54 | struct blkif_request_rw { |
55 | uint8_t operation; /* BLKIF_OP_??? */ | ||
56 | uint8_t nr_segments; /* number of segments */ | ||
57 | blkif_vdev_t handle; /* only for read/write requests */ | ||
58 | uint64_t id; /* private guest value, echoed in resp */ | ||
59 | blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ | 55 | blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ |
60 | struct blkif_request_segment { | 56 | struct blkif_request_segment { |
61 | grant_ref_t gref; /* reference to I/O buffer frame */ | 57 | grant_ref_t gref; /* reference to I/O buffer frame */ |
@@ -65,6 +61,16 @@ struct blkif_request { | |||
65 | } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; | 61 | } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; |
66 | }; | 62 | }; |
67 | 63 | ||
64 | struct blkif_request { | ||
65 | uint8_t operation; /* BLKIF_OP_??? */ | ||
66 | uint8_t nr_segments; /* number of segments */ | ||
67 | blkif_vdev_t handle; /* only for read/write requests */ | ||
68 | uint64_t id; /* private guest value, echoed in resp */ | ||
69 | union { | ||
70 | struct blkif_request_rw rw; | ||
71 | } u; | ||
72 | }; | ||
73 | |||
68 | struct blkif_response { | 74 | struct blkif_response { |
69 | uint64_t id; /* copied from request */ | 75 | uint64_t id; /* copied from request */ |
70 | uint8_t operation; /* copied from request */ | 76 | uint8_t operation; /* copied from request */ |
@@ -91,4 +97,25 @@ DEFINE_RING_TYPES(blkif, struct blkif_request, struct blkif_response); | |||
91 | #define VDISK_REMOVABLE 0x2 | 97 | #define VDISK_REMOVABLE 0x2 |
92 | #define VDISK_READONLY 0x4 | 98 | #define VDISK_READONLY 0x4 |
93 | 99 | ||
100 | /* Xen-defined major numbers for virtual disks, they look strangely | ||
101 | * familiar */ | ||
102 | #define XEN_IDE0_MAJOR 3 | ||
103 | #define XEN_IDE1_MAJOR 22 | ||
104 | #define XEN_SCSI_DISK0_MAJOR 8 | ||
105 | #define XEN_SCSI_DISK1_MAJOR 65 | ||
106 | #define XEN_SCSI_DISK2_MAJOR 66 | ||
107 | #define XEN_SCSI_DISK3_MAJOR 67 | ||
108 | #define XEN_SCSI_DISK4_MAJOR 68 | ||
109 | #define XEN_SCSI_DISK5_MAJOR 69 | ||
110 | #define XEN_SCSI_DISK6_MAJOR 70 | ||
111 | #define XEN_SCSI_DISK7_MAJOR 71 | ||
112 | #define XEN_SCSI_DISK8_MAJOR 128 | ||
113 | #define XEN_SCSI_DISK9_MAJOR 129 | ||
114 | #define XEN_SCSI_DISK10_MAJOR 130 | ||
115 | #define XEN_SCSI_DISK11_MAJOR 131 | ||
116 | #define XEN_SCSI_DISK12_MAJOR 132 | ||
117 | #define XEN_SCSI_DISK13_MAJOR 133 | ||
118 | #define XEN_SCSI_DISK14_MAJOR 134 | ||
119 | #define XEN_SCSI_DISK15_MAJOR 135 | ||
120 | |||
94 | #endif /* __XEN_PUBLIC_IO_BLKIF_H__ */ | 121 | #endif /* __XEN_PUBLIC_IO_BLKIF_H__ */ |
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h index 2befa3e2f1bc..b33257bc7e83 100644 --- a/include/xen/interface/xen.h +++ b/include/xen/interface/xen.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #define __HYPERVISOR_stack_switch 3 | 30 | #define __HYPERVISOR_stack_switch 3 |
31 | #define __HYPERVISOR_set_callbacks 4 | 31 | #define __HYPERVISOR_set_callbacks 4 |
32 | #define __HYPERVISOR_fpu_taskswitch 5 | 32 | #define __HYPERVISOR_fpu_taskswitch 5 |
33 | #define __HYPERVISOR_sched_op 6 | 33 | #define __HYPERVISOR_sched_op_compat 6 |
34 | #define __HYPERVISOR_dom0_op 7 | 34 | #define __HYPERVISOR_dom0_op 7 |
35 | #define __HYPERVISOR_set_debugreg 8 | 35 | #define __HYPERVISOR_set_debugreg 8 |
36 | #define __HYPERVISOR_get_debugreg 9 | 36 | #define __HYPERVISOR_get_debugreg 9 |
@@ -52,7 +52,7 @@ | |||
52 | #define __HYPERVISOR_mmuext_op 26 | 52 | #define __HYPERVISOR_mmuext_op 26 |
53 | #define __HYPERVISOR_acm_op 27 | 53 | #define __HYPERVISOR_acm_op 27 |
54 | #define __HYPERVISOR_nmi_op 28 | 54 | #define __HYPERVISOR_nmi_op 28 |
55 | #define __HYPERVISOR_sched_op_new 29 | 55 | #define __HYPERVISOR_sched_op 29 |
56 | #define __HYPERVISOR_callback_op 30 | 56 | #define __HYPERVISOR_callback_op 30 |
57 | #define __HYPERVISOR_xenoprof_op 31 | 57 | #define __HYPERVISOR_xenoprof_op 31 |
58 | #define __HYPERVISOR_event_channel_op 32 | 58 | #define __HYPERVISOR_event_channel_op 32 |
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index 98b92154a264..03c85d7387fb 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h | |||
@@ -5,9 +5,9 @@ | |||
5 | 5 | ||
6 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); | 6 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); |
7 | 7 | ||
8 | void xen_pre_suspend(void); | 8 | void xen_arch_pre_suspend(void); |
9 | void xen_post_suspend(int suspend_cancelled); | 9 | void xen_arch_post_suspend(int suspend_cancelled); |
10 | void xen_hvm_post_suspend(int suspend_cancelled); | 10 | void xen_arch_hvm_post_suspend(int suspend_cancelled); |
11 | 11 | ||
12 | void xen_mm_pin_all(void); | 12 | void xen_mm_pin_all(void); |
13 | void xen_mm_unpin_all(void); | 13 | void xen_mm_unpin_all(void); |