diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-08-16 14:40:44 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-16 14:40:44 -0400 |
commit | 9714d315d28aef77a097fe905b25cc273c3d72ad (patch) | |
tree | 0ae1150b0723e925785ce774c3554f29fda050f6 /include | |
parent | 84c164a34ffe67908a932a2d641ec1a80c2d5435 (diff) | |
parent | 6ccf15a1a76d2ff915cdef6ae4d12d0170087118 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'include')
149 files changed, 3195 insertions, 579 deletions
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 5958d7845bd5..17714beb868e 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
@@ -212,7 +212,7 @@ char const *acpi_gbl_exception_names_env[] = { | |||
212 | "AE_NO_GLOBAL_LOCK", | 212 | "AE_NO_GLOBAL_LOCK", |
213 | "AE_ABORT_METHOD", | 213 | "AE_ABORT_METHOD", |
214 | "AE_SAME_HANDLER", | 214 | "AE_SAME_HANDLER", |
215 | "AE_WAKE_ONLY_GPE", | 215 | "AE_NO_HANDLER", |
216 | "AE_OWNER_ID_LIMIT" | 216 | "AE_OWNER_ID_LIMIT" |
217 | }; | 217 | }; |
218 | 218 | ||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 0e4ab1fe5966..1371cc997393 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -69,6 +69,7 @@ extern acpi_name acpi_gbl_trace_method_name; | |||
69 | extern u32 acpi_gbl_trace_flags; | 69 | extern u32 acpi_gbl_trace_flags; |
70 | extern u8 acpi_gbl_enable_aml_debug_object; | 70 | extern u8 acpi_gbl_enable_aml_debug_object; |
71 | extern u8 acpi_gbl_copy_dsdt_locally; | 71 | extern u8 acpi_gbl_copy_dsdt_locally; |
72 | extern u8 acpi_gbl_truncate_io_addresses; | ||
72 | 73 | ||
73 | extern u32 acpi_current_gpe_count; | 74 | extern u32 acpi_current_gpe_count; |
74 | extern struct acpi_table_fadt acpi_gbl_FADT; | 75 | extern struct acpi_table_fadt acpi_gbl_FADT; |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index bade172cad47..d55f4a7b824d 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -663,10 +663,11 @@ typedef u32 acpi_event_status; | |||
663 | #define ACPI_GPE_MAX 0xFF | 663 | #define ACPI_GPE_MAX 0xFF |
664 | #define ACPI_NUM_GPE 256 | 664 | #define ACPI_NUM_GPE 256 |
665 | 665 | ||
666 | /* Actions for acpi_set_gpe */ | 666 | /* Actions for acpi_set_gpe and acpi_hw_low_set_gpe */ |
667 | 667 | ||
668 | #define ACPI_GPE_ENABLE 0 | 668 | #define ACPI_GPE_ENABLE 0 |
669 | #define ACPI_GPE_DISABLE 1 | 669 | #define ACPI_GPE_DISABLE 1 |
670 | #define ACPI_GPE_COND_ENABLE 2 | ||
670 | 671 | ||
671 | /* gpe_types for acpi_enable_gpe and acpi_disable_gpe */ | 672 | /* gpe_types for acpi_enable_gpe and acpi_disable_gpe */ |
672 | 673 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index da565a48240e..a68ca8a11a53 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -48,7 +48,7 @@ struct acpi_power_register { | |||
48 | u8 space_id; | 48 | u8 space_id; |
49 | u8 bit_width; | 49 | u8 bit_width; |
50 | u8 bit_offset; | 50 | u8 bit_offset; |
51 | u8 reserved; | 51 | u8 access_size; |
52 | u64 address; | 52 | u64 address; |
53 | } __attribute__ ((packed)); | 53 | } __attribute__ ((packed)); |
54 | 54 | ||
@@ -63,6 +63,7 @@ struct acpi_processor_cx { | |||
63 | u32 power; | 63 | u32 power; |
64 | u32 usage; | 64 | u32 usage; |
65 | u64 time; | 65 | u64 time; |
66 | u8 bm_sts_skip; | ||
66 | char desc[ACPI_CX_DESC_LEN]; | 67 | char desc[ACPI_CX_DESC_LEN]; |
67 | }; | 68 | }; |
68 | 69 | ||
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 04f91c2d3f7b..b5043a9890d8 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -80,7 +80,7 @@ extern void setup_per_cpu_areas(void); | |||
80 | 80 | ||
81 | #ifndef PER_CPU_BASE_SECTION | 81 | #ifndef PER_CPU_BASE_SECTION |
82 | #ifdef CONFIG_SMP | 82 | #ifdef CONFIG_SMP |
83 | #define PER_CPU_BASE_SECTION ".data.percpu" | 83 | #define PER_CPU_BASE_SECTION ".data..percpu" |
84 | #else | 84 | #else |
85 | #define PER_CPU_BASE_SECTION ".data" | 85 | #define PER_CPU_BASE_SECTION ".data" |
86 | #endif | 86 | #endif |
@@ -92,15 +92,15 @@ extern void setup_per_cpu_areas(void); | |||
92 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | 92 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
93 | #define PER_CPU_ALIGNED_SECTION "" | 93 | #define PER_CPU_ALIGNED_SECTION "" |
94 | #else | 94 | #else |
95 | #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" | 95 | #define PER_CPU_SHARED_ALIGNED_SECTION "..shared_aligned" |
96 | #define PER_CPU_ALIGNED_SECTION ".shared_aligned" | 96 | #define PER_CPU_ALIGNED_SECTION "..shared_aligned" |
97 | #endif | 97 | #endif |
98 | #define PER_CPU_FIRST_SECTION ".first" | 98 | #define PER_CPU_FIRST_SECTION "..first" |
99 | 99 | ||
100 | #else | 100 | #else |
101 | 101 | ||
102 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | 102 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
103 | #define PER_CPU_ALIGNED_SECTION ".shared_aligned" | 103 | #define PER_CPU_ALIGNED_SECTION "..shared_aligned" |
104 | #define PER_CPU_FIRST_SECTION "" | 104 | #define PER_CPU_FIRST_SECTION "" |
105 | 105 | ||
106 | #endif | 106 | #endif |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index ef779c6fc3d7..030a954ed292 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -63,6 +63,12 @@ | |||
63 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ | 63 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ |
64 | #define ALIGN_FUNCTION() . = ALIGN(8) | 64 | #define ALIGN_FUNCTION() . = ALIGN(8) |
65 | 65 | ||
66 | /* | ||
67 | * Align to a 32 byte boundary equal to the | ||
68 | * alignment gcc 4.5 uses for a struct | ||
69 | */ | ||
70 | #define STRUCT_ALIGN() . = ALIGN(32) | ||
71 | |||
66 | /* The actual configuration determine if the init/exit sections | 72 | /* The actual configuration determine if the init/exit sections |
67 | * are handled as text/data or they can be discarded (which | 73 | * are handled as text/data or they can be discarded (which |
68 | * often happens at runtime) | 74 | * often happens at runtime) |
@@ -166,7 +172,11 @@ | |||
166 | LIKELY_PROFILE() \ | 172 | LIKELY_PROFILE() \ |
167 | BRANCH_PROFILE() \ | 173 | BRANCH_PROFILE() \ |
168 | TRACE_PRINTKS() \ | 174 | TRACE_PRINTKS() \ |
175 | \ | ||
176 | STRUCT_ALIGN(); \ | ||
169 | FTRACE_EVENTS() \ | 177 | FTRACE_EVENTS() \ |
178 | \ | ||
179 | STRUCT_ALIGN(); \ | ||
170 | TRACE_SYSCALLS() | 180 | TRACE_SYSCALLS() |
171 | 181 | ||
172 | /* | 182 | /* |
@@ -175,25 +185,25 @@ | |||
175 | #define NOSAVE_DATA \ | 185 | #define NOSAVE_DATA \ |
176 | . = ALIGN(PAGE_SIZE); \ | 186 | . = ALIGN(PAGE_SIZE); \ |
177 | VMLINUX_SYMBOL(__nosave_begin) = .; \ | 187 | VMLINUX_SYMBOL(__nosave_begin) = .; \ |
178 | *(.data.nosave) \ | 188 | *(.data..nosave) \ |
179 | . = ALIGN(PAGE_SIZE); \ | 189 | . = ALIGN(PAGE_SIZE); \ |
180 | VMLINUX_SYMBOL(__nosave_end) = .; | 190 | VMLINUX_SYMBOL(__nosave_end) = .; |
181 | 191 | ||
182 | #define PAGE_ALIGNED_DATA(page_align) \ | 192 | #define PAGE_ALIGNED_DATA(page_align) \ |
183 | . = ALIGN(page_align); \ | 193 | . = ALIGN(page_align); \ |
184 | *(.data.page_aligned) | 194 | *(.data..page_aligned) |
185 | 195 | ||
186 | #define READ_MOSTLY_DATA(align) \ | 196 | #define READ_MOSTLY_DATA(align) \ |
187 | . = ALIGN(align); \ | 197 | . = ALIGN(align); \ |
188 | *(.data.read_mostly) | 198 | *(.data..read_mostly) |
189 | 199 | ||
190 | #define CACHELINE_ALIGNED_DATA(align) \ | 200 | #define CACHELINE_ALIGNED_DATA(align) \ |
191 | . = ALIGN(align); \ | 201 | . = ALIGN(align); \ |
192 | *(.data.cacheline_aligned) | 202 | *(.data..cacheline_aligned) |
193 | 203 | ||
194 | #define INIT_TASK_DATA(align) \ | 204 | #define INIT_TASK_DATA(align) \ |
195 | . = ALIGN(align); \ | 205 | . = ALIGN(align); \ |
196 | *(.data.init_task) | 206 | *(.data..init_task) |
197 | 207 | ||
198 | /* | 208 | /* |
199 | * Read only Data | 209 | * Read only Data |
@@ -435,7 +445,7 @@ | |||
435 | */ | 445 | */ |
436 | #define INIT_TASK_DATA_SECTION(align) \ | 446 | #define INIT_TASK_DATA_SECTION(align) \ |
437 | . = ALIGN(align); \ | 447 | . = ALIGN(align); \ |
438 | .data.init_task : { \ | 448 | .data..init_task : AT(ADDR(.data..init_task) - LOAD_OFFSET) { \ |
439 | INIT_TASK_DATA(align) \ | 449 | INIT_TASK_DATA(align) \ |
440 | } | 450 | } |
441 | 451 | ||
@@ -499,7 +509,7 @@ | |||
499 | #define BSS(bss_align) \ | 509 | #define BSS(bss_align) \ |
500 | . = ALIGN(bss_align); \ | 510 | . = ALIGN(bss_align); \ |
501 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ | 511 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ |
502 | *(.bss.page_aligned) \ | 512 | *(.bss..page_aligned) \ |
503 | *(.dynbss) \ | 513 | *(.dynbss) \ |
504 | *(.bss) \ | 514 | *(.bss) \ |
505 | *(COMMON) \ | 515 | *(COMMON) \ |
@@ -666,16 +676,16 @@ | |||
666 | */ | 676 | */ |
667 | #define PERCPU_VADDR(vaddr, phdr) \ | 677 | #define PERCPU_VADDR(vaddr, phdr) \ |
668 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ | 678 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ |
669 | .data.percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ | 679 | .data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ |
670 | - LOAD_OFFSET) { \ | 680 | - LOAD_OFFSET) { \ |
671 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | 681 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ |
672 | *(.data.percpu.first) \ | 682 | *(.data..percpu..first) \ |
673 | *(.data.percpu.page_aligned) \ | 683 | *(.data..percpu..page_aligned) \ |
674 | *(.data.percpu) \ | 684 | *(.data..percpu) \ |
675 | *(.data.percpu.shared_aligned) \ | 685 | *(.data..percpu..shared_aligned) \ |
676 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ | 686 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ |
677 | } phdr \ | 687 | } phdr \ |
678 | . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data.percpu); | 688 | . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu); |
679 | 689 | ||
680 | /** | 690 | /** |
681 | * PERCPU - define output section for percpu area, simple version | 691 | * PERCPU - define output section for percpu area, simple version |
@@ -687,18 +697,18 @@ | |||
687 | * | 697 | * |
688 | * This macro is equivalent to ALIGN(align); PERCPU_VADDR( , ) except | 698 | * This macro is equivalent to ALIGN(align); PERCPU_VADDR( , ) except |
689 | * that __per_cpu_load is defined as a relative symbol against | 699 | * that __per_cpu_load is defined as a relative symbol against |
690 | * .data.percpu which is required for relocatable x86_32 | 700 | * .data..percpu which is required for relocatable x86_32 |
691 | * configuration. | 701 | * configuration. |
692 | */ | 702 | */ |
693 | #define PERCPU(align) \ | 703 | #define PERCPU(align) \ |
694 | . = ALIGN(align); \ | 704 | . = ALIGN(align); \ |
695 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \ | 705 | .data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \ |
696 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ | 706 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ |
697 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | 707 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ |
698 | *(.data.percpu.first) \ | 708 | *(.data..percpu..first) \ |
699 | *(.data.percpu.page_aligned) \ | 709 | *(.data..percpu..page_aligned) \ |
700 | *(.data.percpu) \ | 710 | *(.data..percpu) \ |
701 | *(.data.percpu.shared_aligned) \ | 711 | *(.data..percpu..shared_aligned) \ |
702 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ | 712 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ |
703 | } | 713 | } |
704 | 714 | ||
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index dc5873c21e45..1121f7799c6f 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
@@ -130,4 +130,7 @@ extern int drm_helper_resume_force_mode(struct drm_device *dev); | |||
130 | extern void drm_kms_helper_poll_init(struct drm_device *dev); | 130 | extern void drm_kms_helper_poll_init(struct drm_device *dev); |
131 | extern void drm_kms_helper_poll_fini(struct drm_device *dev); | 131 | extern void drm_kms_helper_poll_fini(struct drm_device *dev); |
132 | extern void drm_helper_hpd_irq_event(struct drm_device *dev); | 132 | extern void drm_helper_hpd_irq_event(struct drm_device *dev); |
133 | |||
134 | extern void drm_kms_helper_poll_disable(struct drm_device *dev); | ||
135 | extern void drm_kms_helper_poll_enable(struct drm_device *dev); | ||
133 | #endif | 136 | #endif |
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index b64a8d7cdf6d..8f8b072c4c7b 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -33,6 +33,15 @@ | |||
33 | * subject to backwards-compatibility constraints. | 33 | * subject to backwards-compatibility constraints. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #ifdef __KERNEL__ | ||
37 | /* For use by IPS driver */ | ||
38 | extern unsigned long i915_read_mch_val(void); | ||
39 | extern bool i915_gpu_raise(void); | ||
40 | extern bool i915_gpu_lower(void); | ||
41 | extern bool i915_gpu_busy(void); | ||
42 | extern bool i915_gpu_turbo_disable(void); | ||
43 | #endif | ||
44 | |||
36 | /* Each region is a minimum of 16k, and there are at most 255 of them. | 45 | /* Each region is a minimum of 16k, and there are at most 255 of them. |
37 | */ | 46 | */ |
38 | #define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use | 47 | #define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use |
@@ -275,6 +284,7 @@ typedef struct drm_i915_irq_wait { | |||
275 | #define I915_PARAM_HAS_OVERLAY 7 | 284 | #define I915_PARAM_HAS_OVERLAY 7 |
276 | #define I915_PARAM_HAS_PAGEFLIPPING 8 | 285 | #define I915_PARAM_HAS_PAGEFLIPPING 8 |
277 | #define I915_PARAM_HAS_EXECBUF2 9 | 286 | #define I915_PARAM_HAS_EXECBUF2 9 |
287 | #define I915_PARAM_HAS_BSD 10 | ||
278 | 288 | ||
279 | typedef struct drm_i915_getparam { | 289 | typedef struct drm_i915_getparam { |
280 | int param; | 290 | int param; |
@@ -616,7 +626,9 @@ struct drm_i915_gem_execbuffer2 { | |||
616 | __u32 num_cliprects; | 626 | __u32 num_cliprects; |
617 | /** This is a struct drm_clip_rect *cliprects */ | 627 | /** This is a struct drm_clip_rect *cliprects */ |
618 | __u64 cliprects_ptr; | 628 | __u64 cliprects_ptr; |
619 | __u64 flags; /* currently unused */ | 629 | #define I915_EXEC_RENDER (1<<0) |
630 | #define I915_EXEC_BSD (1<<1) | ||
631 | __u64 flags; | ||
620 | __u64 rsvd1; | 632 | __u64 rsvd1; |
621 | __u64 rsvd2; | 633 | __u64 rsvd2; |
622 | }; | 634 | }; |
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index a6a9f4af5ebd..fe917dee723a 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h | |||
@@ -79,6 +79,7 @@ struct drm_nouveau_gpuobj_free { | |||
79 | #define NOUVEAU_GETPARAM_CHIPSET_ID 11 | 79 | #define NOUVEAU_GETPARAM_CHIPSET_ID 11 |
80 | #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 | 80 | #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 |
81 | #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 | 81 | #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 |
82 | #define NOUVEAU_GETPARAM_PTIMER_TIME 14 | ||
82 | struct drm_nouveau_getparam { | 83 | struct drm_nouveau_getparam { |
83 | uint64_t param; | 84 | uint64_t param; |
84 | uint64_t value; | 85 | uint64_t value; |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 3ff9fc071dfe..5347063e9d5a 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -903,6 +903,7 @@ struct drm_radeon_cs { | |||
903 | #define RADEON_INFO_NUM_Z_PIPES 0x02 | 903 | #define RADEON_INFO_NUM_Z_PIPES 0x02 |
904 | #define RADEON_INFO_ACCEL_WORKING 0x03 | 904 | #define RADEON_INFO_ACCEL_WORKING 0x03 |
905 | #define RADEON_INFO_CRTC_FROM_ID 0x04 | 905 | #define RADEON_INFO_CRTC_FROM_ID 0x04 |
906 | #define RADEON_INFO_ACCEL_WORKING2 0x05 | ||
906 | 907 | ||
907 | struct drm_radeon_info { | 908 | struct drm_radeon_info { |
908 | uint32_t request; | 909 | uint32_t request; |
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h index 8bb4de567b2c..116821448c38 100644 --- a/include/drm/ttm/ttm_page_alloc.h +++ b/include/drm/ttm/ttm_page_alloc.h | |||
@@ -56,10 +56,6 @@ void ttm_put_pages(struct list_head *pages, | |||
56 | enum ttm_caching_state cstate); | 56 | enum ttm_caching_state cstate); |
57 | /** | 57 | /** |
58 | * Initialize pool allocator. | 58 | * Initialize pool allocator. |
59 | * | ||
60 | * Pool allocator is internaly reference counted so it can be initialized | ||
61 | * multiple times but ttm_page_alloc_fini has to be called same number of | ||
62 | * times. | ||
63 | */ | 59 | */ |
64 | int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages); | 60 | int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages); |
65 | /** | 61 | /** |
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h index c7645f480d12..4d0842391edc 100644 --- a/include/drm/vmwgfx_drm.h +++ b/include/drm/vmwgfx_drm.h | |||
@@ -50,6 +50,8 @@ | |||
50 | #define DRM_VMW_EXECBUF 12 | 50 | #define DRM_VMW_EXECBUF 12 |
51 | #define DRM_VMW_FIFO_DEBUG 13 | 51 | #define DRM_VMW_FIFO_DEBUG 13 |
52 | #define DRM_VMW_FENCE_WAIT 14 | 52 | #define DRM_VMW_FENCE_WAIT 14 |
53 | /* guarded by minor version >= 2 */ | ||
54 | #define DRM_VMW_UPDATE_LAYOUT 15 | ||
53 | 55 | ||
54 | 56 | ||
55 | /*************************************************************************/ | 57 | /*************************************************************************/ |
@@ -585,4 +587,28 @@ struct drm_vmw_stream_arg { | |||
585 | * sure that the stream has been stopped. | 587 | * sure that the stream has been stopped. |
586 | */ | 588 | */ |
587 | 589 | ||
590 | /*************************************************************************/ | ||
591 | /** | ||
592 | * DRM_VMW_UPDATE_LAYOUT - Update layout | ||
593 | * | ||
594 | * Updates the prefered modes and connection status for connectors. The | ||
595 | * command conisits of one drm_vmw_update_layout_arg pointing out a array | ||
596 | * of num_outputs drm_vmw_rect's. | ||
597 | */ | ||
598 | |||
599 | /** | ||
600 | * struct drm_vmw_update_layout_arg | ||
601 | * | ||
602 | * @num_outputs: number of active | ||
603 | * @rects: pointer to array of drm_vmw_rect | ||
604 | * | ||
605 | * Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl. | ||
606 | */ | ||
607 | |||
608 | struct drm_vmw_update_layout_arg { | ||
609 | uint32_t num_outputs; | ||
610 | uint32_t pad64; | ||
611 | uint64_t rects; | ||
612 | }; | ||
613 | |||
588 | #endif | 614 | #endif |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 224a38c960d4..ccf94dc5acdf 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -253,7 +253,7 @@ int acpi_resources_are_enforced(void); | |||
253 | #ifdef CONFIG_PM_SLEEP | 253 | #ifdef CONFIG_PM_SLEEP |
254 | void __init acpi_no_s4_hw_signature(void); | 254 | void __init acpi_no_s4_hw_signature(void); |
255 | void __init acpi_old_suspend_ordering(void); | 255 | void __init acpi_old_suspend_ordering(void); |
256 | void __init acpi_s4_no_nvs(void); | 256 | void __init acpi_nvs_nosave(void); |
257 | #endif /* CONFIG_PM_SLEEP */ | 257 | #endif /* CONFIG_PM_SLEEP */ |
258 | 258 | ||
259 | struct acpi_osc_context { | 259 | struct acpi_osc_context { |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 9101ed64f803..09ea4a1e9505 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -79,7 +79,6 @@ struct agp_memory { | |||
79 | u32 physical; | 79 | u32 physical; |
80 | bool is_bound; | 80 | bool is_bound; |
81 | bool is_flushed; | 81 | bool is_flushed; |
82 | bool vmalloc_flag; | ||
83 | /* list of agp_memory mapped to the aperture */ | 82 | /* list of agp_memory mapped to the aperture */ |
84 | struct list_head mapped_list; | 83 | struct list_head mapped_list; |
85 | /* DMA-mapped addresses */ | 84 | /* DMA-mapped addresses */ |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 8b1038607831..b0c174012436 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -14,14 +14,19 @@ | |||
14 | #ifndef ASMARM_AMBA_H | 14 | #ifndef ASMARM_AMBA_H |
15 | #define ASMARM_AMBA_H | 15 | #define ASMARM_AMBA_H |
16 | 16 | ||
17 | #include <linux/clk.h> | ||
17 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/err.h> | ||
18 | #include <linux/resource.h> | 20 | #include <linux/resource.h> |
19 | 21 | ||
20 | #define AMBA_NR_IRQS 2 | 22 | #define AMBA_NR_IRQS 2 |
21 | 23 | ||
24 | struct clk; | ||
25 | |||
22 | struct amba_device { | 26 | struct amba_device { |
23 | struct device dev; | 27 | struct device dev; |
24 | struct resource res; | 28 | struct resource res; |
29 | struct clk *pclk; | ||
25 | u64 dma_mask; | 30 | u64 dma_mask; |
26 | unsigned int periphid; | 31 | unsigned int periphid; |
27 | unsigned int irq[AMBA_NR_IRQS]; | 32 | unsigned int irq[AMBA_NR_IRQS]; |
@@ -59,6 +64,12 @@ struct amba_device *amba_find_device(const char *, struct device *, unsigned int | |||
59 | int amba_request_regions(struct amba_device *, const char *); | 64 | int amba_request_regions(struct amba_device *, const char *); |
60 | void amba_release_regions(struct amba_device *); | 65 | void amba_release_regions(struct amba_device *); |
61 | 66 | ||
67 | #define amba_pclk_enable(d) \ | ||
68 | (IS_ERR((d)->pclk) ? 0 : clk_enable((d)->pclk)) | ||
69 | |||
70 | #define amba_pclk_disable(d) \ | ||
71 | do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) | ||
72 | |||
62 | #define amba_config(d) (((d)->periphid >> 24) & 0xff) | 73 | #define amba_config(d) (((d)->periphid >> 24) & 0xff) |
63 | #define amba_rev(d) (((d)->periphid >> 20) & 0x0f) | 74 | #define amba_rev(d) (((d)->periphid >> 20) & 0x0f) |
64 | #define amba_manf(d) (((d)->periphid >> 12) & 0xff) | 75 | #define amba_manf(d) (((d)->periphid >> 12) & 0xff) |
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h index 7e466fe72025..ca84ce70d5d5 100644 --- a/include/linux/amba/mmci.h +++ b/include/linux/amba/mmci.h | |||
@@ -15,9 +15,10 @@ | |||
15 | * @ocr_mask: available voltages on the 4 pins from the block, this | 15 | * @ocr_mask: available voltages on the 4 pins from the block, this |
16 | * is ignored if a regulator is used, see the MMC_VDD_* masks in | 16 | * is ignored if a regulator is used, see the MMC_VDD_* masks in |
17 | * mmc/host.h | 17 | * mmc/host.h |
18 | * @translate_vdd: a callback function to translate a MMC_VDD_* | 18 | * @vdd_handler: a callback function to translate a MMC_VDD_* |
19 | * mask into a value to be binary or:ed and written into the | 19 | * mask into a value to be binary (or set some other custom bits |
20 | * MMCIPWR register of the block | 20 | * in MMCIPWR) or:ed and written into the MMCIPWR register of the |
21 | * block. May also control external power based on the power_mode. | ||
21 | * @status: if no GPIO read function was given to the block in | 22 | * @status: if no GPIO read function was given to the block in |
22 | * gpio_wp (below) this function will be called to determine | 23 | * gpio_wp (below) this function will be called to determine |
23 | * whether a card is present in the MMC slot or not | 24 | * whether a card is present in the MMC slot or not |
@@ -29,7 +30,8 @@ | |||
29 | struct mmci_platform_data { | 30 | struct mmci_platform_data { |
30 | unsigned int f_max; | 31 | unsigned int f_max; |
31 | unsigned int ocr_mask; | 32 | unsigned int ocr_mask; |
32 | u32 (*translate_vdd)(struct device *, unsigned int); | 33 | u32 (*vdd_handler)(struct device *, unsigned int vdd, |
34 | unsigned char power_mode); | ||
33 | unsigned int (*status)(struct device *); | 35 | unsigned int (*status)(struct device *); |
34 | int gpio_wp; | 36 | int gpio_wp; |
35 | int gpio_cd; | 37 | int gpio_cd; |
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h index 5a5a7fd62490..e1b634b635f2 100644 --- a/include/linux/amba/serial.h +++ b/include/linux/amba/serial.h | |||
@@ -38,10 +38,12 @@ | |||
38 | #define UART01x_FR 0x18 /* Flag register (Read only). */ | 38 | #define UART01x_FR 0x18 /* Flag register (Read only). */ |
39 | #define UART010_IIR 0x1C /* Interrupt indentification register (Read). */ | 39 | #define UART010_IIR 0x1C /* Interrupt indentification register (Read). */ |
40 | #define UART010_ICR 0x1C /* Interrupt clear register (Write). */ | 40 | #define UART010_ICR 0x1C /* Interrupt clear register (Write). */ |
41 | #define ST_UART011_LCRH_RX 0x1C /* Rx line control register. */ | ||
41 | #define UART01x_ILPR 0x20 /* IrDA low power counter register. */ | 42 | #define UART01x_ILPR 0x20 /* IrDA low power counter register. */ |
42 | #define UART011_IBRD 0x24 /* Integer baud rate divisor register. */ | 43 | #define UART011_IBRD 0x24 /* Integer baud rate divisor register. */ |
43 | #define UART011_FBRD 0x28 /* Fractional baud rate divisor register. */ | 44 | #define UART011_FBRD 0x28 /* Fractional baud rate divisor register. */ |
44 | #define UART011_LCRH 0x2c /* Line control register. */ | 45 | #define UART011_LCRH 0x2c /* Line control register. */ |
46 | #define ST_UART011_LCRH_TX 0x2c /* Tx Line control register. */ | ||
45 | #define UART011_CR 0x30 /* Control register. */ | 47 | #define UART011_CR 0x30 /* Control register. */ |
46 | #define UART011_IFLS 0x34 /* Interrupt fifo level select. */ | 48 | #define UART011_IFLS 0x34 /* Interrupt fifo level select. */ |
47 | #define UART011_IMSC 0x38 /* Interrupt mask. */ | 49 | #define UART011_IMSC 0x38 /* Interrupt mask. */ |
@@ -84,6 +86,7 @@ | |||
84 | #define UART010_CR_TIE 0x0020 | 86 | #define UART010_CR_TIE 0x0020 |
85 | #define UART010_CR_RIE 0x0010 | 87 | #define UART010_CR_RIE 0x0010 |
86 | #define UART010_CR_MSIE 0x0008 | 88 | #define UART010_CR_MSIE 0x0008 |
89 | #define ST_UART011_CR_OVSFACT 0x0008 /* Oversampling factor */ | ||
87 | #define UART01x_CR_IIRLP 0x0004 /* SIR low power mode */ | 90 | #define UART01x_CR_IIRLP 0x0004 /* SIR low power mode */ |
88 | #define UART01x_CR_SIREN 0x0002 /* SIR enable */ | 91 | #define UART01x_CR_SIREN 0x0002 /* SIR enable */ |
89 | #define UART01x_CR_UARTEN 0x0001 /* UART enable */ | 92 | #define UART01x_CR_UARTEN 0x0001 /* UART enable */ |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index e6e0cb5437e6..e9aec0d099df 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -82,8 +82,6 @@ struct backing_dev_info { | |||
82 | struct bdi_writeback wb; /* default writeback info for this bdi */ | 82 | struct bdi_writeback wb; /* default writeback info for this bdi */ |
83 | spinlock_t wb_lock; /* protects update side of wb_list */ | 83 | spinlock_t wb_lock; /* protects update side of wb_list */ |
84 | struct list_head wb_list; /* the flusher threads hanging off this bdi */ | 84 | struct list_head wb_list; /* the flusher threads hanging off this bdi */ |
85 | unsigned long wb_mask; /* bitmask of registered tasks */ | ||
86 | unsigned int wb_cnt; /* number of registered tasks */ | ||
87 | 85 | ||
88 | struct list_head work_list; | 86 | struct list_head work_list; |
89 | 87 | ||
@@ -105,8 +103,8 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
105 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 103 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
106 | void bdi_unregister(struct backing_dev_info *bdi); | 104 | void bdi_unregister(struct backing_dev_info *bdi); |
107 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | 105 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); |
108 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, | 106 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages); |
109 | long nr_pages, int sb_locked); | 107 | void bdi_start_background_writeback(struct backing_dev_info *bdi); |
110 | int bdi_writeback_task(struct bdi_writeback *wb); | 108 | int bdi_writeback_task(struct bdi_writeback *wb); |
111 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 109 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
112 | void bdi_arm_supers_timer(void); | 110 | void bdi_arm_supers_timer(void); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8b7f5e0914ad..09a840264d6f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1211,14 +1211,23 @@ struct work_struct; | |||
1211 | int kblockd_schedule_work(struct request_queue *q, struct work_struct *work); | 1211 | int kblockd_schedule_work(struct request_queue *q, struct work_struct *work); |
1212 | 1212 | ||
1213 | #ifdef CONFIG_BLK_CGROUP | 1213 | #ifdef CONFIG_BLK_CGROUP |
1214 | /* | ||
1215 | * This should not be using sched_clock(). A real patch is in progress | ||
1216 | * to fix this up, until that is in place we need to disable preemption | ||
1217 | * around sched_clock() in this function and set_io_start_time_ns(). | ||
1218 | */ | ||
1214 | static inline void set_start_time_ns(struct request *req) | 1219 | static inline void set_start_time_ns(struct request *req) |
1215 | { | 1220 | { |
1221 | preempt_disable(); | ||
1216 | req->start_time_ns = sched_clock(); | 1222 | req->start_time_ns = sched_clock(); |
1223 | preempt_enable(); | ||
1217 | } | 1224 | } |
1218 | 1225 | ||
1219 | static inline void set_io_start_time_ns(struct request *req) | 1226 | static inline void set_io_start_time_ns(struct request *req) |
1220 | { | 1227 | { |
1228 | preempt_disable(); | ||
1221 | req->io_start_time_ns = sched_clock(); | 1229 | req->io_start_time_ns = sched_clock(); |
1230 | preempt_enable(); | ||
1222 | } | 1231 | } |
1223 | 1232 | ||
1224 | static inline uint64_t rq_start_time_ns(struct request *req) | 1233 | static inline uint64_t rq_start_time_ns(struct request *req) |
diff --git a/include/linux/cache.h b/include/linux/cache.h index 97e24881c4c6..4c570653ab84 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #ifndef __cacheline_aligned | 31 | #ifndef __cacheline_aligned |
32 | #define __cacheline_aligned \ | 32 | #define __cacheline_aligned \ |
33 | __attribute__((__aligned__(SMP_CACHE_BYTES), \ | 33 | __attribute__((__aligned__(SMP_CACHE_BYTES), \ |
34 | __section__(".data.cacheline_aligned"))) | 34 | __section__(".data..cacheline_aligned"))) |
35 | #endif /* __cacheline_aligned */ | 35 | #endif /* __cacheline_aligned */ |
36 | 36 | ||
37 | #ifndef __cacheline_aligned_in_smp | 37 | #ifndef __cacheline_aligned_in_smp |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 39e5ff512fbe..90012b9ddbf3 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -49,9 +49,6 @@ typedef struct __user_cap_data_struct { | |||
49 | } __user *cap_user_data_t; | 49 | } __user *cap_user_data_t; |
50 | 50 | ||
51 | 51 | ||
52 | #define XATTR_CAPS_SUFFIX "capability" | ||
53 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | ||
54 | |||
55 | #define VFS_CAP_REVISION_MASK 0xFF000000 | 52 | #define VFS_CAP_REVISION_MASK 0xFF000000 |
56 | #define VFS_CAP_REVISION_SHIFT 24 | 53 | #define VFS_CAP_REVISION_SHIFT 24 |
57 | #define VFS_CAP_FLAGS_MASK ~VFS_CAP_REVISION_MASK | 54 | #define VFS_CAP_FLAGS_MASK ~VFS_CAP_REVISION_MASK |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e0aa067d1b11..ed3e92e41c6e 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -525,13 +525,21 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state( | |||
525 | return cgrp->subsys[subsys_id]; | 525 | return cgrp->subsys[subsys_id]; |
526 | } | 526 | } |
527 | 527 | ||
528 | static inline struct cgroup_subsys_state *task_subsys_state( | 528 | /* |
529 | struct task_struct *task, int subsys_id) | 529 | * function to get the cgroup_subsys_state which allows for extra |
530 | * rcu_dereference_check() conditions, such as locks used during the | ||
531 | * cgroup_subsys::attach() methods. | ||
532 | */ | ||
533 | #define task_subsys_state_check(task, subsys_id, __c) \ | ||
534 | rcu_dereference_check(task->cgroups->subsys[subsys_id], \ | ||
535 | rcu_read_lock_held() || \ | ||
536 | lockdep_is_held(&task->alloc_lock) || \ | ||
537 | cgroup_lock_is_held() || (__c)) | ||
538 | |||
539 | static inline struct cgroup_subsys_state * | ||
540 | task_subsys_state(struct task_struct *task, int subsys_id) | ||
530 | { | 541 | { |
531 | return rcu_dereference_check(task->cgroups->subsys[subsys_id], | 542 | return task_subsys_state_check(task, subsys_id, false); |
532 | rcu_read_lock_held() || | ||
533 | lockdep_is_held(&task->alloc_lock) || | ||
534 | cgroup_lock_is_held()); | ||
535 | } | 543 | } |
536 | 544 | ||
537 | static inline struct cgroup* task_cgroup(struct task_struct *task, | 545 | static inline struct cgroup* task_cgroup(struct task_struct *task, |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 73dcf804bc94..0da5b187f124 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -58,8 +58,12 @@ | |||
58 | * naked functions because then mcount is called without stack and frame pointer | 58 | * naked functions because then mcount is called without stack and frame pointer |
59 | * being set up and there is no chance to restore the lr register to the value | 59 | * being set up and there is no chance to restore the lr register to the value |
60 | * before mcount was called. | 60 | * before mcount was called. |
61 | * | ||
62 | * The asm() bodies of naked functions often depend on standard calling conventions, | ||
63 | * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce | ||
64 | * this, so we must do so ourselves. See GCC PR44290. | ||
61 | */ | 65 | */ |
62 | #define __naked __attribute__((naked)) notrace | 66 | #define __naked __attribute__((naked)) noinline __noclone notrace |
63 | 67 | ||
64 | #define __noreturn __attribute__((noreturn)) | 68 | #define __noreturn __attribute__((noreturn)) |
65 | 69 | ||
@@ -85,3 +89,7 @@ | |||
85 | #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) | 89 | #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) |
86 | #define gcc_header(x) _gcc_header(x) | 90 | #define gcc_header(x) _gcc_header(x) |
87 | #include gcc_header(__GNUC__) | 91 | #include gcc_header(__GNUC__) |
92 | |||
93 | #if !defined(__noclone) | ||
94 | #define __noclone /* not needed */ | ||
95 | #endif | ||
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 94dea3ffbfa1..fcfa5b9a4317 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -48,6 +48,10 @@ | |||
48 | * unreleased. Really, we need to have autoconf for the kernel. | 48 | * unreleased. Really, we need to have autoconf for the kernel. |
49 | */ | 49 | */ |
50 | #define unreachable() __builtin_unreachable() | 50 | #define unreachable() __builtin_unreachable() |
51 | |||
52 | /* Mark a function definition as prohibited from being cloned. */ | ||
53 | #define __noclone __attribute__((__noclone__)) | ||
54 | |||
51 | #endif | 55 | #endif |
52 | 56 | ||
53 | #endif | 57 | #endif |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 9f15150ce8d6..c3e9de8321c6 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -196,11 +196,6 @@ extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy, | |||
196 | int cpufreq_register_governor(struct cpufreq_governor *governor); | 196 | int cpufreq_register_governor(struct cpufreq_governor *governor); |
197 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); | 197 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); |
198 | 198 | ||
199 | int lock_policy_rwsem_read(int cpu); | ||
200 | int lock_policy_rwsem_write(int cpu); | ||
201 | void unlock_policy_rwsem_read(int cpu); | ||
202 | void unlock_policy_rwsem_write(int cpu); | ||
203 | |||
204 | 199 | ||
205 | /********************************************************************* | 200 | /********************************************************************* |
206 | * CPUFREQ DRIVER INTERFACE * | 201 | * CPUFREQ DRIVER INTERFACE * |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 75c0fa881308..4d2c39573f36 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -153,6 +153,7 @@ struct cred { | |||
153 | extern void __put_cred(struct cred *); | 153 | extern void __put_cred(struct cred *); |
154 | extern void exit_creds(struct task_struct *); | 154 | extern void exit_creds(struct task_struct *); |
155 | extern int copy_creds(struct task_struct *, unsigned long); | 155 | extern int copy_creds(struct task_struct *, unsigned long); |
156 | extern const struct cred *get_task_cred(struct task_struct *); | ||
156 | extern struct cred *cred_alloc_blank(void); | 157 | extern struct cred *cred_alloc_blank(void); |
157 | extern struct cred *prepare_creds(void); | 158 | extern struct cred *prepare_creds(void); |
158 | extern struct cred *prepare_exec_creds(void); | 159 | extern struct cred *prepare_exec_creds(void); |
@@ -273,33 +274,18 @@ static inline void put_cred(const struct cred *_cred) | |||
273 | * @task: The task to query | 274 | * @task: The task to query |
274 | * | 275 | * |
275 | * Access the objective credentials of a task. The caller must hold the RCU | 276 | * Access the objective credentials of a task. The caller must hold the RCU |
276 | * readlock. | 277 | * readlock or the task must be dead and unable to change its own credentials. |
277 | * | 278 | * |
278 | * The caller must make sure task doesn't go away, either by holding a ref on | 279 | * The result of this function should not be passed directly to get_cred(); |
279 | * task or by holding tasklist_lock to prevent it from being unlinked. | 280 | * rather get_task_cred() should be used instead. |
280 | */ | 281 | */ |
281 | #define __task_cred(task) \ | 282 | #define __task_cred(task) \ |
282 | ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_tasklist_lock_is_held()))) | 283 | ({ \ |
283 | 284 | const struct task_struct *__t = (task); \ | |
284 | /** | 285 | rcu_dereference_check(__t->real_cred, \ |
285 | * get_task_cred - Get another task's objective credentials | 286 | rcu_read_lock_held() || \ |
286 | * @task: The task to query | 287 | task_is_dead(__t)); \ |
287 | * | 288 | }) |
288 | * Get the objective credentials of a task, pinning them so that they can't go | ||
289 | * away. Accessing a task's credentials directly is not permitted. | ||
290 | * | ||
291 | * The caller must make sure task doesn't go away, either by holding a ref on | ||
292 | * task or by holding tasklist_lock to prevent it from being unlinked. | ||
293 | */ | ||
294 | #define get_task_cred(task) \ | ||
295 | ({ \ | ||
296 | struct cred *__cred; \ | ||
297 | rcu_read_lock(); \ | ||
298 | __cred = (struct cred *) __task_cred((task)); \ | ||
299 | get_cred(__cred); \ | ||
300 | rcu_read_unlock(); \ | ||
301 | __cred; \ | ||
302 | }) | ||
303 | 289 | ||
304 | /** | 290 | /** |
305 | * get_current_cred - Get the current task's subjective credentials | 291 | * get_current_cred - Get the current task's subjective credentials |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 68530521ad00..b8d2516668aa 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -53,7 +53,7 @@ | |||
53 | 53 | ||
54 | 54 | ||
55 | extern const char *drbd_buildtag(void); | 55 | extern const char *drbd_buildtag(void); |
56 | #define REL_VERSION "8.3.8rc1" | 56 | #define REL_VERSION "8.3.8" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 94 | 59 | #define PRO_VERSION_MAX 94 |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index b6cb5425cde3..493a2bf85f62 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -62,6 +62,7 @@ typedef enum fe_caps { | |||
62 | FE_CAN_8VSB = 0x200000, | 62 | FE_CAN_8VSB = 0x200000, |
63 | FE_CAN_16VSB = 0x400000, | 63 | FE_CAN_16VSB = 0x400000, |
64 | FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ | 64 | FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ |
65 | FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */ | ||
65 | FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ | 66 | FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ |
66 | FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ | 67 | FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ |
67 | FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */ | 68 | FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */ |
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 540b0583d9fb..5a7546c12688 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
@@ -24,6 +24,6 @@ | |||
24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
25 | 25 | ||
26 | #define DVB_API_VERSION 5 | 26 | #define DVB_API_VERSION 5 |
27 | #define DVB_API_VERSION_MINOR 1 | 27 | #define DVB_API_VERSION_MINOR 2 |
28 | 28 | ||
29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index b3cd4de9432b..52c0da4bdd18 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -40,7 +40,7 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, | |||
40 | const char *modname); | 40 | const char *modname); |
41 | 41 | ||
42 | #if defined(CONFIG_DYNAMIC_DEBUG) | 42 | #if defined(CONFIG_DYNAMIC_DEBUG) |
43 | extern int ddebug_remove_module(char *mod_name); | 43 | extern int ddebug_remove_module(const char *mod_name); |
44 | 44 | ||
45 | #define __dynamic_dbg_enabled(dd) ({ \ | 45 | #define __dynamic_dbg_enabled(dd) ({ \ |
46 | int __ret = 0; \ | 46 | int __ret = 0; \ |
@@ -73,7 +73,7 @@ extern int ddebug_remove_module(char *mod_name); | |||
73 | 73 | ||
74 | #else | 74 | #else |
75 | 75 | ||
76 | static inline int ddebug_remove_module(char *mod) | 76 | static inline int ddebug_remove_module(const char *mod) |
77 | { | 77 | { |
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
diff --git a/include/linux/edac_mce.h b/include/linux/edac_mce.h new file mode 100644 index 000000000000..f974fc035363 --- /dev/null +++ b/include/linux/edac_mce.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* Provides edac interface to mcelog events | ||
2 | * | ||
3 | * This file may be distributed under the terms of the | ||
4 | * GNU General Public License version 2. | ||
5 | * | ||
6 | * Copyright (c) 2009 by: | ||
7 | * Mauro Carvalho Chehab <mchehab@redhat.com> | ||
8 | * | ||
9 | * Red Hat Inc. http://www.redhat.com | ||
10 | */ | ||
11 | |||
12 | #if defined(CONFIG_EDAC_MCE) || \ | ||
13 | (defined(CONFIG_EDAC_MCE_MODULE) && defined(MODULE)) | ||
14 | |||
15 | #include <asm/mce.h> | ||
16 | #include <linux/list.h> | ||
17 | |||
18 | struct edac_mce { | ||
19 | struct list_head list; | ||
20 | |||
21 | void *priv; | ||
22 | int (*check_error)(void *priv, struct mce *mce); | ||
23 | }; | ||
24 | |||
25 | int edac_mce_register(struct edac_mce *edac_mce); | ||
26 | void edac_mce_unregister(struct edac_mce *edac_mce); | ||
27 | int edac_mce_parse(struct mce *mce); | ||
28 | |||
29 | #else | ||
30 | #define edac_mce_parse(mce) (0) | ||
31 | #endif | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index 907ace3a64c8..e7445df44d6c 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -786,8 +786,6 @@ struct fb_tile_ops { | |||
786 | #define FBINFO_MISC_USEREVENT 0x10000 /* event request | 786 | #define FBINFO_MISC_USEREVENT 0x10000 /* event request |
787 | from userspace */ | 787 | from userspace */ |
788 | #define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ | 788 | #define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ |
789 | #define FBINFO_MISC_FIRMWARE 0x40000 /* a replaceable firmware | ||
790 | inited framebuffer */ | ||
791 | 789 | ||
792 | /* A driver may set this flag to indicate that it does want a set_par to be | 790 | /* A driver may set this flag to indicate that it does want a set_par to be |
793 | * called every time when fbcon_switch is executed. The advantage is that with | 791 | * called every time when fbcon_switch is executed. The advantage is that with |
@@ -801,6 +799,8 @@ struct fb_tile_ops { | |||
801 | */ | 799 | */ |
802 | #define FBINFO_MISC_ALWAYS_SETPAR 0x40000 | 800 | #define FBINFO_MISC_ALWAYS_SETPAR 0x40000 |
803 | 801 | ||
802 | /* where the fb is a firmware driver, and can be replaced with a proper one */ | ||
803 | #define FBINFO_MISC_FIRMWARE 0x80000 | ||
804 | /* | 804 | /* |
805 | * Host and GPU endianness differ. | 805 | * Host and GPU endianness differ. |
806 | */ | 806 | */ |
@@ -873,6 +873,8 @@ struct fb_info { | |||
873 | static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { | 873 | static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { |
874 | struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct) | 874 | struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct) |
875 | + max_num * sizeof(struct aperture), GFP_KERNEL); | 875 | + max_num * sizeof(struct aperture), GFP_KERNEL); |
876 | if (!a) | ||
877 | return NULL; | ||
876 | a->count = max_num; | 878 | a->count = max_num; |
877 | return a; | 879 | return a; |
878 | } | 880 | } |
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index 013dc529e95f..d147461bc271 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h | |||
@@ -61,7 +61,8 @@ struct files_struct { | |||
61 | (rcu_dereference_check((fdtfd), \ | 61 | (rcu_dereference_check((fdtfd), \ |
62 | rcu_read_lock_held() || \ | 62 | rcu_read_lock_held() || \ |
63 | lockdep_is_held(&(files)->file_lock) || \ | 63 | lockdep_is_held(&(files)->file_lock) || \ |
64 | atomic_read(&(files)->count) == 1)) | 64 | atomic_read(&(files)->count) == 1 || \ |
65 | rcu_my_thread_group_empty())) | ||
65 | 66 | ||
66 | #define files_fdtable(files) \ | 67 | #define files_fdtable(files) \ |
67 | (rcu_dereference_check_fdtable((files), (files)->fdt)) | 68 | (rcu_dereference_check_fdtable((files), (files)->fdt)) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3428393942a6..e5106e49bd2c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -53,6 +53,7 @@ struct inodes_stat_t { | |||
53 | #define MAY_APPEND 8 | 53 | #define MAY_APPEND 8 |
54 | #define MAY_ACCESS 16 | 54 | #define MAY_ACCESS 16 |
55 | #define MAY_OPEN 32 | 55 | #define MAY_OPEN 32 |
56 | #define MAY_CHDIR 64 | ||
56 | 57 | ||
57 | /* | 58 | /* |
58 | * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond | 59 | * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond |
@@ -415,7 +416,8 @@ struct buffer_head; | |||
415 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, | 416 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, |
416 | struct buffer_head *bh_result, int create); | 417 | struct buffer_head *bh_result, int create); |
417 | typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | 418 | typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, |
418 | ssize_t bytes, void *private); | 419 | ssize_t bytes, void *private, int ret, |
420 | bool is_async); | ||
419 | 421 | ||
420 | /* | 422 | /* |
421 | * Attribute flags. These should be or-ed together to figure out what | 423 | * Attribute flags. These should be or-ed together to figure out what |
@@ -1783,6 +1785,19 @@ extern int get_sb_pseudo(struct file_system_type *, char *, | |||
1783 | struct vfsmount *mnt); | 1785 | struct vfsmount *mnt); |
1784 | extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1786 | extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
1785 | 1787 | ||
1788 | static inline void sb_mark_dirty(struct super_block *sb) | ||
1789 | { | ||
1790 | sb->s_dirt = 1; | ||
1791 | } | ||
1792 | static inline void sb_mark_clean(struct super_block *sb) | ||
1793 | { | ||
1794 | sb->s_dirt = 0; | ||
1795 | } | ||
1796 | static inline int sb_is_dirty(struct super_block *sb) | ||
1797 | { | ||
1798 | return sb->s_dirt; | ||
1799 | } | ||
1800 | |||
1786 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ | 1801 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ |
1787 | #define fops_get(fops) \ | 1802 | #define fops_get(fops) \ |
1788 | (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) | 1803 | (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) |
@@ -2388,7 +2403,7 @@ extern const struct file_operations simple_dir_operations; | |||
2388 | extern const struct inode_operations simple_dir_inode_operations; | 2403 | extern const struct inode_operations simple_dir_inode_operations; |
2389 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; | 2404 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
2390 | struct dentry *d_alloc_name(struct dentry *, const char *); | 2405 | struct dentry *d_alloc_name(struct dentry *, const char *); |
2391 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | 2406 | extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *); |
2392 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); | 2407 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); |
2393 | extern void simple_release_fs(struct vfsmount **mount, int *count); | 2408 | extern void simple_release_fs(struct vfsmount **mount, int *count); |
2394 | 2409 | ||
diff --git a/include/linux/fscache.h b/include/linux/fscache.h index 595ce49288b7..ec0dad5ab90f 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h | |||
@@ -85,7 +85,7 @@ struct fscache_cookie_def { | |||
85 | 85 | ||
86 | /* get an index key | 86 | /* get an index key |
87 | * - should store the key data in the buffer | 87 | * - should store the key data in the buffer |
88 | * - should return the amount of amount stored | 88 | * - should return the amount of data stored |
89 | * - not permitted to return an error | 89 | * - not permitted to return an error |
90 | * - the netfs data from the cookie being used as the source is | 90 | * - the netfs data from the cookie being used as the source is |
91 | * presented | 91 | * presented |
@@ -454,6 +454,7 @@ int fscache_read_or_alloc_page(struct fscache_cookie *cookie, | |||
454 | * @cookie: The cookie representing the cache object | 454 | * @cookie: The cookie representing the cache object |
455 | * @mapping: The netfs inode mapping to which the pages will be attached | 455 | * @mapping: The netfs inode mapping to which the pages will be attached |
456 | * @pages: A list of potential netfs pages to be filled | 456 | * @pages: A list of potential netfs pages to be filled |
457 | * @nr_pages: Number of pages to be read and/or allocated | ||
457 | * @end_io_func: The callback to invoke when and if each page is filled | 458 | * @end_io_func: The callback to invoke when and if each page is filled |
458 | * @context: An arbitrary piece of data to pass on to end_io_func() | 459 | * @context: An arbitrary piece of data to pass on to end_io_func() |
459 | * @gfp: The conditions under which memory allocation should be made | 460 | * @gfp: The conditions under which memory allocation should be made |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 895001f7f4b2..42a0f1d11365 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -311,6 +311,7 @@ struct hid_item { | |||
311 | #define HID_QUIRK_HIDDEV_FORCE 0x00000010 | 311 | #define HID_QUIRK_HIDDEV_FORCE 0x00000010 |
312 | #define HID_QUIRK_BADPAD 0x00000020 | 312 | #define HID_QUIRK_BADPAD 0x00000020 |
313 | #define HID_QUIRK_MULTI_INPUT 0x00000040 | 313 | #define HID_QUIRK_MULTI_INPUT 0x00000040 |
314 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 | ||
314 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 | 315 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
315 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 | 316 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 |
316 | #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 | 317 | #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 |
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h index 02c9af374741..269181b8f623 100644 --- a/include/linux/i2c/adp5588.h +++ b/include/linux/i2c/adp5588.h | |||
@@ -78,6 +78,40 @@ | |||
78 | 78 | ||
79 | #define ADP5588_KEYMAPSIZE 80 | 79 | #define ADP5588_KEYMAPSIZE 80 |
80 | 80 | ||
81 | #define GPI_PIN_ROW0 97 | ||
82 | #define GPI_PIN_ROW1 98 | ||
83 | #define GPI_PIN_ROW2 99 | ||
84 | #define GPI_PIN_ROW3 100 | ||
85 | #define GPI_PIN_ROW4 101 | ||
86 | #define GPI_PIN_ROW5 102 | ||
87 | #define GPI_PIN_ROW6 103 | ||
88 | #define GPI_PIN_ROW7 104 | ||
89 | #define GPI_PIN_COL0 105 | ||
90 | #define GPI_PIN_COL1 106 | ||
91 | #define GPI_PIN_COL2 107 | ||
92 | #define GPI_PIN_COL3 108 | ||
93 | #define GPI_PIN_COL4 109 | ||
94 | #define GPI_PIN_COL5 110 | ||
95 | #define GPI_PIN_COL6 111 | ||
96 | #define GPI_PIN_COL7 112 | ||
97 | #define GPI_PIN_COL8 113 | ||
98 | #define GPI_PIN_COL9 114 | ||
99 | |||
100 | #define GPI_PIN_ROW_BASE GPI_PIN_ROW0 | ||
101 | #define GPI_PIN_ROW_END GPI_PIN_ROW7 | ||
102 | #define GPI_PIN_COL_BASE GPI_PIN_COL0 | ||
103 | #define GPI_PIN_COL_END GPI_PIN_COL9 | ||
104 | |||
105 | #define GPI_PIN_BASE GPI_PIN_ROW_BASE | ||
106 | #define GPI_PIN_END GPI_PIN_COL_END | ||
107 | |||
108 | #define ADP5588_GPIMAPSIZE_MAX (GPI_PIN_END - GPI_PIN_BASE + 1) | ||
109 | |||
110 | struct adp5588_gpi_map { | ||
111 | unsigned short pin; | ||
112 | unsigned short sw_evt; | ||
113 | }; | ||
114 | |||
81 | struct adp5588_kpad_platform_data { | 115 | struct adp5588_kpad_platform_data { |
82 | int rows; /* Number of rows */ | 116 | int rows; /* Number of rows */ |
83 | int cols; /* Number of columns */ | 117 | int cols; /* Number of columns */ |
@@ -87,6 +121,9 @@ struct adp5588_kpad_platform_data { | |||
87 | unsigned en_keylock:1; /* Enable Key Lock feature */ | 121 | unsigned en_keylock:1; /* Enable Key Lock feature */ |
88 | unsigned short unlock_key1; /* Unlock Key 1 */ | 122 | unsigned short unlock_key1; /* Unlock Key 1 */ |
89 | unsigned short unlock_key2; /* Unlock Key 2 */ | 123 | unsigned short unlock_key2; /* Unlock Key 2 */ |
124 | const struct adp5588_gpi_map *gpimap; | ||
125 | unsigned short gpimapsize; | ||
126 | const struct adp5588_gpio_platform_data *gpio_data; | ||
90 | }; | 127 | }; |
91 | 128 | ||
92 | struct adp5588_gpio_platform_data { | 129 | struct adp5588_gpio_platform_data { |
diff --git a/include/linux/i2c/mcs.h b/include/linux/i2c/mcs.h new file mode 100644 index 000000000000..725ae7c313ff --- /dev/null +++ b/include/linux/i2c/mcs.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 - 2010 Samsung Electronics Co.Ltd | ||
3 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
4 | * Author: HeungJun Kim <riverful.kim@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_MCS_H | ||
14 | #define __LINUX_MCS_H | ||
15 | |||
16 | #define MCS_KEY_MAP(v, c) ((((v) & 0xff) << 16) | ((c) & 0xffff)) | ||
17 | #define MCS_KEY_VAL(v) (((v) >> 16) & 0xff) | ||
18 | #define MCS_KEY_CODE(v) ((v) & 0xffff) | ||
19 | |||
20 | struct mcs_platform_data { | ||
21 | void (*cfg_pin)(void); | ||
22 | |||
23 | /* touchscreen */ | ||
24 | unsigned int x_size; | ||
25 | unsigned int y_size; | ||
26 | |||
27 | /* touchkey */ | ||
28 | const u32 *keymap; | ||
29 | unsigned int keymap_size; | ||
30 | unsigned int key_maxval; | ||
31 | bool no_autorepeat; | ||
32 | }; | ||
33 | |||
34 | #endif /* __LINUX_MCS_H */ | ||
diff --git a/include/linux/i2c/mcs5000_ts.h b/include/linux/i2c/mcs5000_ts.h deleted file mode 100644 index 5a117b5ca15e..000000000000 --- a/include/linux/i2c/mcs5000_ts.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * mcs5000_ts.h | ||
3 | * | ||
4 | * Copyright (C) 2009 Samsung Electronics Co.Ltd | ||
5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __LINUX_MCS5000_TS_H | ||
15 | #define __LINUX_MCS5000_TS_H | ||
16 | |||
17 | /* platform data for the MELFAS MCS-5000 touchscreen driver */ | ||
18 | struct mcs5000_ts_platform_data { | ||
19 | void (*cfg_pin)(void); | ||
20 | int x_size; | ||
21 | int y_size; | ||
22 | }; | ||
23 | |||
24 | #endif /* __LINUX_MCS5000_TS_H */ | ||
diff --git a/include/linux/i2c/qt602240_ts.h b/include/linux/i2c/qt602240_ts.h new file mode 100644 index 000000000000..c5033e101094 --- /dev/null +++ b/include/linux/i2c/qt602240_ts.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * AT42QT602240/ATMXT224 Touchscreen driver | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd | ||
5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_QT602240_TS_H | ||
14 | #define __LINUX_QT602240_TS_H | ||
15 | |||
16 | /* Orient */ | ||
17 | #define QT602240_NORMAL 0x0 | ||
18 | #define QT602240_DIAGONAL 0x1 | ||
19 | #define QT602240_HORIZONTAL_FLIP 0x2 | ||
20 | #define QT602240_ROTATED_90_COUNTER 0x3 | ||
21 | #define QT602240_VERTICAL_FLIP 0x4 | ||
22 | #define QT602240_ROTATED_90 0x5 | ||
23 | #define QT602240_ROTATED_180 0x6 | ||
24 | #define QT602240_DIAGONAL_COUNTER 0x7 | ||
25 | |||
26 | /* The platform data for the AT42QT602240/ATMXT224 touchscreen driver */ | ||
27 | struct qt602240_platform_data { | ||
28 | unsigned int x_line; | ||
29 | unsigned int y_line; | ||
30 | unsigned int x_size; | ||
31 | unsigned int y_size; | ||
32 | unsigned int blen; | ||
33 | unsigned int threshold; | ||
34 | unsigned int voltage; | ||
35 | unsigned char orient; | ||
36 | }; | ||
37 | |||
38 | #endif /* __LINUX_QT602240_TS_H */ | ||
diff --git a/include/linux/i8042.h b/include/linux/i8042.h index 9bf6870ee5f4..a986ff588944 100644 --- a/include/linux/i8042.h +++ b/include/linux/i8042.h | |||
@@ -46,31 +46,31 @@ int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str, | |||
46 | 46 | ||
47 | #else | 47 | #else |
48 | 48 | ||
49 | void i8042_lock_chip(void) | 49 | static inline void i8042_lock_chip(void) |
50 | { | 50 | { |
51 | } | 51 | } |
52 | 52 | ||
53 | void i8042_unlock_chip(void) | 53 | static inline void i8042_unlock_chip(void) |
54 | { | 54 | { |
55 | } | 55 | } |
56 | 56 | ||
57 | int i8042_command(unsigned char *param, int command) | 57 | static inline int i8042_command(unsigned char *param, int command) |
58 | { | 58 | { |
59 | return -ENODEV; | 59 | return -ENODEV; |
60 | } | 60 | } |
61 | 61 | ||
62 | bool i8042_check_port_owner(const struct serio *serio) | 62 | static inline bool i8042_check_port_owner(const struct serio *serio) |
63 | { | 63 | { |
64 | return false; | 64 | return false; |
65 | } | 65 | } |
66 | 66 | ||
67 | int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str, | 67 | static inline int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str, |
68 | struct serio *serio)) | 68 | struct serio *serio)) |
69 | { | 69 | { |
70 | return -ENODEV; | 70 | return -ENODEV; |
71 | } | 71 | } |
72 | 72 | ||
73 | int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str, | 73 | static inline int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str, |
74 | struct serio *serio)) | 74 | struct serio *serio)) |
75 | { | 75 | { |
76 | return -ENODEV; | 76 | return -ENODEV; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 7b02aa5ce9b4..072fe8c93e6f 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -458,7 +458,7 @@ enum { | |||
458 | IDE_DFLAG_DOORLOCKING = (1 << 15), | 458 | IDE_DFLAG_DOORLOCKING = (1 << 15), |
459 | /* disallow DMA */ | 459 | /* disallow DMA */ |
460 | IDE_DFLAG_NODMA = (1 << 16), | 460 | IDE_DFLAG_NODMA = (1 << 16), |
461 | /* powermanagment told us not to do anything, so sleep nicely */ | 461 | /* powermanagement told us not to do anything, so sleep nicely */ |
462 | IDE_DFLAG_BLOCKED = (1 << 17), | 462 | IDE_DFLAG_BLOCKED = (1 << 17), |
463 | /* sleeping & sleep field valid */ | 463 | /* sleeping & sleep field valid */ |
464 | IDE_DFLAG_SLEEPING = (1 << 18), | 464 | IDE_DFLAG_SLEEPING = (1 << 18), |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 7fcad2e1be3d..2fc66dd783ee 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -234,7 +234,7 @@ enum macvlan_mode { | |||
234 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ | 234 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ |
235 | }; | 235 | }; |
236 | 236 | ||
237 | /* SR-IOV virtual function managment section */ | 237 | /* SR-IOV virtual function management section */ |
238 | 238 | ||
239 | enum { | 239 | enum { |
240 | IFLA_VF_INFO_UNSPEC, | 240 | IFLA_VF_INFO_UNSPEC, |
diff --git a/include/linux/init.h b/include/linux/init.h index ab1d31f9352b..de994304e0bb 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -301,7 +301,7 @@ void __init parse_early_options(char *cmdline); | |||
301 | #endif | 301 | #endif |
302 | 302 | ||
303 | /* Data marked not to be saved by software suspend */ | 303 | /* Data marked not to be saved by software suspend */ |
304 | #define __nosavedata __section(.data.nosave) | 304 | #define __nosavedata __section(.data..nosave) |
305 | 305 | ||
306 | /* This means "can be init if no module support, otherwise module load | 306 | /* This means "can be init if no module support, otherwise module load |
307 | may call it." */ | 307 | may call it." */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 2beaa13492be..1f43fa56f600 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -183,7 +183,7 @@ extern struct cred init_cred; | |||
183 | } | 183 | } |
184 | 184 | ||
185 | /* Attach to the init_task data structure for proper alignment */ | 185 | /* Attach to the init_task data structure for proper alignment */ |
186 | #define __init_task_data __attribute__((__section__(".data.init_task"))) | 186 | #define __init_task_data __attribute__((__section__(".data..init_task"))) |
187 | 187 | ||
188 | 188 | ||
189 | #endif | 189 | #endif |
diff --git a/include/linux/input.h b/include/linux/input.h index 6fcc9101beeb..339d043ccb53 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -691,9 +691,12 @@ struct input_absinfo { | |||
691 | #define ABS_TILT_X 0x1a | 691 | #define ABS_TILT_X 0x1a |
692 | #define ABS_TILT_Y 0x1b | 692 | #define ABS_TILT_Y 0x1b |
693 | #define ABS_TOOL_WIDTH 0x1c | 693 | #define ABS_TOOL_WIDTH 0x1c |
694 | |||
694 | #define ABS_VOLUME 0x20 | 695 | #define ABS_VOLUME 0x20 |
696 | |||
695 | #define ABS_MISC 0x28 | 697 | #define ABS_MISC 0x28 |
696 | 698 | ||
699 | #define ABS_MT_SLOT 0x2f /* MT slot being modified */ | ||
697 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | 700 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ |
698 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | 701 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ |
699 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | 702 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ |
@@ -706,6 +709,12 @@ struct input_absinfo { | |||
706 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | 709 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
707 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | 710 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ |
708 | 711 | ||
712 | #ifdef __KERNEL__ | ||
713 | /* Implementation details, userspace should not care about these */ | ||
714 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR | ||
715 | #define ABS_MT_LAST ABS_MT_PRESSURE | ||
716 | #endif | ||
717 | |||
709 | #define ABS_MAX 0x3f | 718 | #define ABS_MAX 0x3f |
710 | #define ABS_CNT (ABS_MAX+1) | 719 | #define ABS_CNT (ABS_MAX+1) |
711 | 720 | ||
@@ -1048,6 +1057,14 @@ struct ff_effect { | |||
1048 | #include <linux/mod_devicetable.h> | 1057 | #include <linux/mod_devicetable.h> |
1049 | 1058 | ||
1050 | /** | 1059 | /** |
1060 | * struct input_mt_slot - represents the state of an input MT slot | ||
1061 | * @abs: holds current values of ABS_MT axes for this slot | ||
1062 | */ | ||
1063 | struct input_mt_slot { | ||
1064 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | ||
1065 | }; | ||
1066 | |||
1067 | /** | ||
1051 | * struct input_dev - represents an input device | 1068 | * struct input_dev - represents an input device |
1052 | * @name: name of the device | 1069 | * @name: name of the device |
1053 | * @phys: physical path to the device in the system hierarchy | 1070 | * @phys: physical path to the device in the system hierarchy |
@@ -1063,6 +1080,10 @@ struct ff_effect { | |||
1063 | * @sndbit: bitmap of sound effects supported by the device | 1080 | * @sndbit: bitmap of sound effects supported by the device |
1064 | * @ffbit: bitmap of force feedback effects supported by the device | 1081 | * @ffbit: bitmap of force feedback effects supported by the device |
1065 | * @swbit: bitmap of switches present on the device | 1082 | * @swbit: bitmap of switches present on the device |
1083 | * @hint_events_per_packet: average number of events generated by the | ||
1084 | * device in a packet (between EV_SYN/SYN_REPORT events). Used by | ||
1085 | * event handlers to estimate size of the buffer needed to hold | ||
1086 | * events. | ||
1066 | * @keycodemax: size of keycode table | 1087 | * @keycodemax: size of keycode table |
1067 | * @keycodesize: size of elements in keycode table | 1088 | * @keycodesize: size of elements in keycode table |
1068 | * @keycode: map of scancodes to keycodes for this device | 1089 | * @keycode: map of scancodes to keycodes for this device |
@@ -1078,9 +1099,12 @@ struct ff_effect { | |||
1078 | * @repeat_key: stores key code of the last key pressed; used to implement | 1099 | * @repeat_key: stores key code of the last key pressed; used to implement |
1079 | * software autorepeat | 1100 | * software autorepeat |
1080 | * @timer: timer for software autorepeat | 1101 | * @timer: timer for software autorepeat |
1081 | * @sync: set to 1 when there were no new events since last EV_SYNC | ||
1082 | * @abs: current values for reports from absolute axes | 1102 | * @abs: current values for reports from absolute axes |
1083 | * @rep: current values for autorepeat parameters (delay, rate) | 1103 | * @rep: current values for autorepeat parameters (delay, rate) |
1104 | * @mt: pointer to array of struct input_mt_slot holding current values | ||
1105 | * of tracked contacts | ||
1106 | * @mtsize: number of MT slots the device uses | ||
1107 | * @slot: MT slot currently being transmitted | ||
1084 | * @key: reflects current state of device's keys/buttons | 1108 | * @key: reflects current state of device's keys/buttons |
1085 | * @led: reflects current state of device's LEDs | 1109 | * @led: reflects current state of device's LEDs |
1086 | * @snd: reflects current state of sound effects | 1110 | * @snd: reflects current state of sound effects |
@@ -1119,6 +1143,7 @@ struct ff_effect { | |||
1119 | * last user closes the device | 1143 | * last user closes the device |
1120 | * @going_away: marks devices that are in a middle of unregistering and | 1144 | * @going_away: marks devices that are in a middle of unregistering and |
1121 | * causes input_open_device*() fail with -ENODEV. | 1145 | * causes input_open_device*() fail with -ENODEV. |
1146 | * @sync: set to %true when there were no new events since last EV_SYN | ||
1122 | * @dev: driver model's view of this device | 1147 | * @dev: driver model's view of this device |
1123 | * @h_list: list of input handles associated with the device. When | 1148 | * @h_list: list of input handles associated with the device. When |
1124 | * accessing the list dev->mutex must be held | 1149 | * accessing the list dev->mutex must be held |
@@ -1140,6 +1165,8 @@ struct input_dev { | |||
1140 | unsigned long ffbit[BITS_TO_LONGS(FF_CNT)]; | 1165 | unsigned long ffbit[BITS_TO_LONGS(FF_CNT)]; |
1141 | unsigned long swbit[BITS_TO_LONGS(SW_CNT)]; | 1166 | unsigned long swbit[BITS_TO_LONGS(SW_CNT)]; |
1142 | 1167 | ||
1168 | unsigned int hint_events_per_packet; | ||
1169 | |||
1143 | unsigned int keycodemax; | 1170 | unsigned int keycodemax; |
1144 | unsigned int keycodesize; | 1171 | unsigned int keycodesize; |
1145 | void *keycode; | 1172 | void *keycode; |
@@ -1153,11 +1180,13 @@ struct input_dev { | |||
1153 | unsigned int repeat_key; | 1180 | unsigned int repeat_key; |
1154 | struct timer_list timer; | 1181 | struct timer_list timer; |
1155 | 1182 | ||
1156 | int sync; | ||
1157 | |||
1158 | int abs[ABS_CNT]; | 1183 | int abs[ABS_CNT]; |
1159 | int rep[REP_MAX + 1]; | 1184 | int rep[REP_MAX + 1]; |
1160 | 1185 | ||
1186 | struct input_mt_slot *mt; | ||
1187 | int mtsize; | ||
1188 | int slot; | ||
1189 | |||
1161 | unsigned long key[BITS_TO_LONGS(KEY_CNT)]; | 1190 | unsigned long key[BITS_TO_LONGS(KEY_CNT)]; |
1162 | unsigned long led[BITS_TO_LONGS(LED_CNT)]; | 1191 | unsigned long led[BITS_TO_LONGS(LED_CNT)]; |
1163 | unsigned long snd[BITS_TO_LONGS(SND_CNT)]; | 1192 | unsigned long snd[BITS_TO_LONGS(SND_CNT)]; |
@@ -1182,6 +1211,8 @@ struct input_dev { | |||
1182 | unsigned int users; | 1211 | unsigned int users; |
1183 | bool going_away; | 1212 | bool going_away; |
1184 | 1213 | ||
1214 | bool sync; | ||
1215 | |||
1185 | struct device dev; | 1216 | struct device dev; |
1186 | 1217 | ||
1187 | struct list_head h_list; | 1218 | struct list_head h_list; |
@@ -1406,8 +1437,28 @@ static inline void input_mt_sync(struct input_dev *dev) | |||
1406 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | 1437 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); |
1407 | } | 1438 | } |
1408 | 1439 | ||
1440 | static inline void input_mt_slot(struct input_dev *dev, int slot) | ||
1441 | { | ||
1442 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | ||
1443 | } | ||
1444 | |||
1409 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1445 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
1410 | 1446 | ||
1447 | /** | ||
1448 | * input_set_events_per_packet - tell handlers about the driver event rate | ||
1449 | * @dev: the input device used by the driver | ||
1450 | * @n_events: the average number of events between calls to input_sync() | ||
1451 | * | ||
1452 | * If the event rate sent from a device is unusually large, use this | ||
1453 | * function to set the expected event rate. This will allow handlers | ||
1454 | * to set up an appropriate buffer size for the event stream, in order | ||
1455 | * to minimize information loss. | ||
1456 | */ | ||
1457 | static inline void input_set_events_per_packet(struct input_dev *dev, int n_events) | ||
1458 | { | ||
1459 | dev->hint_events_per_packet = n_events; | ||
1460 | } | ||
1461 | |||
1411 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) | 1462 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) |
1412 | { | 1463 | { |
1413 | dev->absmin[axis] = min; | 1464 | dev->absmin[axis] = min; |
@@ -1485,5 +1536,8 @@ int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file); | |||
1485 | int input_ff_create_memless(struct input_dev *dev, void *data, | 1536 | int input_ff_create_memless(struct input_dev *dev, void *data, |
1486 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); | 1537 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); |
1487 | 1538 | ||
1539 | int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots); | ||
1540 | void input_mt_destroy_slots(struct input_dev *dev); | ||
1541 | |||
1488 | #endif | 1542 | #endif |
1489 | #endif | 1543 | #endif |
diff --git a/include/linux/input/adxl34x.h b/include/linux/input/adxl34x.h new file mode 100644 index 000000000000..df00d998a44a --- /dev/null +++ b/include/linux/input/adxl34x.h | |||
@@ -0,0 +1,349 @@ | |||
1 | /* | ||
2 | * include/linux/input/adxl34x.h | ||
3 | * | ||
4 | * Digital Accelerometer characteristics are highly application specific | ||
5 | * and may vary between boards and models. The platform_data for the | ||
6 | * device's "struct device" holds this information. | ||
7 | * | ||
8 | * Copyright 2009 Analog Devices Inc. | ||
9 | * | ||
10 | * Licensed under the GPL-2 or later. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_INPUT_ADXL34X_H__ | ||
14 | #define __LINUX_INPUT_ADXL34X_H__ | ||
15 | |||
16 | struct adxl34x_platform_data { | ||
17 | |||
18 | /* | ||
19 | * X,Y,Z Axis Offset: | ||
20 | * offer user offset adjustments in twoscompliment | ||
21 | * form with a scale factor of 15.6 mg/LSB (i.e. 0x7F = +2 g) | ||
22 | */ | ||
23 | |||
24 | s8 x_axis_offset; | ||
25 | s8 y_axis_offset; | ||
26 | s8 z_axis_offset; | ||
27 | |||
28 | /* | ||
29 | * TAP_X/Y/Z Enable: Setting TAP_X, Y, or Z Enable enables X, | ||
30 | * Y, or Z participation in Tap detection. A '0' excludes the | ||
31 | * selected axis from participation in Tap detection. | ||
32 | * Setting the SUPPRESS bit suppresses Double Tap detection if | ||
33 | * acceleration greater than tap_threshold is present between | ||
34 | * taps. | ||
35 | */ | ||
36 | |||
37 | #define ADXL_SUPPRESS (1 << 3) | ||
38 | #define ADXL_TAP_X_EN (1 << 2) | ||
39 | #define ADXL_TAP_Y_EN (1 << 1) | ||
40 | #define ADXL_TAP_Z_EN (1 << 0) | ||
41 | |||
42 | u8 tap_axis_control; | ||
43 | |||
44 | /* | ||
45 | * tap_threshold: | ||
46 | * holds the threshold value for tap detection/interrupts. | ||
47 | * The data format is unsigned. The scale factor is 62.5 mg/LSB | ||
48 | * (i.e. 0xFF = +16 g). A zero value may result in undesirable | ||
49 | * behavior if Tap/Double Tap is enabled. | ||
50 | */ | ||
51 | |||
52 | u8 tap_threshold; | ||
53 | |||
54 | /* | ||
55 | * tap_duration: | ||
56 | * is an unsigned time value representing the maximum | ||
57 | * time that an event must be above the tap_threshold threshold | ||
58 | * to qualify as a tap event. The scale factor is 625 us/LSB. A zero | ||
59 | * value will prevent Tap/Double Tap functions from working. | ||
60 | */ | ||
61 | |||
62 | u8 tap_duration; | ||
63 | |||
64 | /* | ||
65 | * tap_latency: | ||
66 | * is an unsigned time value representing the wait time | ||
67 | * from the detection of a tap event to the opening of the time | ||
68 | * window tap_window for a possible second tap event. The scale | ||
69 | * factor is 1.25 ms/LSB. A zero value will disable the Double Tap | ||
70 | * function. | ||
71 | */ | ||
72 | |||
73 | u8 tap_latency; | ||
74 | |||
75 | /* | ||
76 | * tap_window: | ||
77 | * is an unsigned time value representing the amount | ||
78 | * of time after the expiration of tap_latency during which a second | ||
79 | * tap can begin. The scale factor is 1.25 ms/LSB. A zero value will | ||
80 | * disable the Double Tap function. | ||
81 | */ | ||
82 | |||
83 | u8 tap_window; | ||
84 | |||
85 | /* | ||
86 | * act_axis_control: | ||
87 | * X/Y/Z Enable: A '1' enables X, Y, or Z participation in activity | ||
88 | * or inactivity detection. A '0' excludes the selected axis from | ||
89 | * participation. If all of the axes are excluded, the function is | ||
90 | * disabled. | ||
91 | * AC/DC: A '0' = DC coupled operation and a '1' = AC coupled | ||
92 | * operation. In DC coupled operation, the current acceleration is | ||
93 | * compared with activity_threshold and inactivity_threshold directly | ||
94 | * to determine whether activity or inactivity is detected. In AC | ||
95 | * coupled operation for activity detection, the acceleration value | ||
96 | * at the start of activity detection is taken as a reference value. | ||
97 | * New samples of acceleration are then compared to this | ||
98 | * reference value and if the magnitude of the difference exceeds | ||
99 | * activity_threshold the device will trigger an activity interrupt. In | ||
100 | * AC coupled operation for inactivity detection, a reference value | ||
101 | * is used again for comparison and is updated whenever the | ||
102 | * device exceeds the inactivity threshold. Once the reference | ||
103 | * value is selected, the device compares the magnitude of the | ||
104 | * difference between the reference value and the current | ||
105 | * acceleration with inactivity_threshold. If the difference is below | ||
106 | * inactivity_threshold for a total of inactivity_time, the device is | ||
107 | * considered inactive and the inactivity interrupt is triggered. | ||
108 | */ | ||
109 | |||
110 | #define ADXL_ACT_ACDC (1 << 7) | ||
111 | #define ADXL_ACT_X_EN (1 << 6) | ||
112 | #define ADXL_ACT_Y_EN (1 << 5) | ||
113 | #define ADXL_ACT_Z_EN (1 << 4) | ||
114 | #define ADXL_INACT_ACDC (1 << 3) | ||
115 | #define ADXL_INACT_X_EN (1 << 2) | ||
116 | #define ADXL_INACT_Y_EN (1 << 1) | ||
117 | #define ADXL_INACT_Z_EN (1 << 0) | ||
118 | |||
119 | u8 act_axis_control; | ||
120 | |||
121 | /* | ||
122 | * activity_threshold: | ||
123 | * holds the threshold value for activity detection. | ||
124 | * The data format is unsigned. The scale factor is | ||
125 | * 62.5 mg/LSB. A zero value may result in undesirable behavior if | ||
126 | * Activity interrupt is enabled. | ||
127 | */ | ||
128 | |||
129 | u8 activity_threshold; | ||
130 | |||
131 | /* | ||
132 | * inactivity_threshold: | ||
133 | * holds the threshold value for inactivity | ||
134 | * detection. The data format is unsigned. The scale | ||
135 | * factor is 62.5 mg/LSB. A zero value may result in undesirable | ||
136 | * behavior if Inactivity interrupt is enabled. | ||
137 | */ | ||
138 | |||
139 | u8 inactivity_threshold; | ||
140 | |||
141 | /* | ||
142 | * inactivity_time: | ||
143 | * is an unsigned time value representing the | ||
144 | * amount of time that acceleration must be below the value in | ||
145 | * inactivity_threshold for inactivity to be declared. The scale factor | ||
146 | * is 1 second/LSB. Unlike the other interrupt functions, which | ||
147 | * operate on unfiltered data, the inactivity function operates on the | ||
148 | * filtered output data. At least one output sample must be | ||
149 | * generated for the inactivity interrupt to be triggered. This will | ||
150 | * result in the function appearing un-responsive if the | ||
151 | * inactivity_time register is set with a value less than the time | ||
152 | * constant of the Output Data Rate. A zero value will result in an | ||
153 | * interrupt when the output data is below inactivity_threshold. | ||
154 | */ | ||
155 | |||
156 | u8 inactivity_time; | ||
157 | |||
158 | /* | ||
159 | * free_fall_threshold: | ||
160 | * holds the threshold value for Free-Fall detection. | ||
161 | * The data format is unsigned. The root-sum-square(RSS) value | ||
162 | * of all axes is calculated and compared to the value in | ||
163 | * free_fall_threshold to determine if a free fall event may be | ||
164 | * occurring. The scale factor is 62.5 mg/LSB. A zero value may | ||
165 | * result in undesirable behavior if Free-Fall interrupt is | ||
166 | * enabled. Values between 300 and 600 mg (0x05 to 0x09) are | ||
167 | * recommended. | ||
168 | */ | ||
169 | |||
170 | u8 free_fall_threshold; | ||
171 | |||
172 | /* | ||
173 | * free_fall_time: | ||
174 | * is an unsigned time value representing the minimum | ||
175 | * time that the RSS value of all axes must be less than | ||
176 | * free_fall_threshold to generate a Free-Fall interrupt. The | ||
177 | * scale factor is 5 ms/LSB. A zero value may result in | ||
178 | * undesirable behavior if Free-Fall interrupt is enabled. | ||
179 | * Values between 100 to 350 ms (0x14 to 0x46) are recommended. | ||
180 | */ | ||
181 | |||
182 | u8 free_fall_time; | ||
183 | |||
184 | /* | ||
185 | * data_rate: | ||
186 | * Selects device bandwidth and output data rate. | ||
187 | * RATE = 3200 Hz / (2^(15 - x)). Default value is 0x0A, or 100 Hz | ||
188 | * Output Data Rate. An Output Data Rate should be selected that | ||
189 | * is appropriate for the communication protocol and frequency | ||
190 | * selected. Selecting too high of an Output Data Rate with a low | ||
191 | * communication speed will result in samples being discarded. | ||
192 | */ | ||
193 | |||
194 | u8 data_rate; | ||
195 | |||
196 | /* | ||
197 | * data_range: | ||
198 | * FULL_RES: When this bit is set with the device is | ||
199 | * in Full-Resolution Mode, where the output resolution increases | ||
200 | * with RANGE to maintain a 4 mg/LSB scale factor. When this | ||
201 | * bit is cleared the device is in 10-bit Mode and RANGE determine the | ||
202 | * maximum g-Range and scale factor. | ||
203 | */ | ||
204 | |||
205 | #define ADXL_FULL_RES (1 << 3) | ||
206 | #define ADXL_RANGE_PM_2g 0 | ||
207 | #define ADXL_RANGE_PM_4g 1 | ||
208 | #define ADXL_RANGE_PM_8g 2 | ||
209 | #define ADXL_RANGE_PM_16g 3 | ||
210 | |||
211 | u8 data_range; | ||
212 | |||
213 | /* | ||
214 | * low_power_mode: | ||
215 | * A '0' = Normal operation and a '1' = Reduced | ||
216 | * power operation with somewhat higher noise. | ||
217 | */ | ||
218 | |||
219 | u8 low_power_mode; | ||
220 | |||
221 | /* | ||
222 | * power_mode: | ||
223 | * LINK: A '1' with both the activity and inactivity functions | ||
224 | * enabled will delay the start of the activity function until | ||
225 | * inactivity is detected. Once activity is detected, inactivity | ||
226 | * detection will begin and prevent the detection of activity. This | ||
227 | * bit serially links the activity and inactivity functions. When '0' | ||
228 | * the inactivity and activity functions are concurrent. Additional | ||
229 | * information can be found in the Application section under Link | ||
230 | * Mode. | ||
231 | * AUTO_SLEEP: A '1' sets the ADXL34x to switch to Sleep Mode | ||
232 | * when inactivity (acceleration has been below inactivity_threshold | ||
233 | * for at least inactivity_time) is detected and the LINK bit is set. | ||
234 | * A '0' disables automatic switching to Sleep Mode. See SLEEP | ||
235 | * for further description. | ||
236 | */ | ||
237 | |||
238 | #define ADXL_LINK (1 << 5) | ||
239 | #define ADXL_AUTO_SLEEP (1 << 4) | ||
240 | |||
241 | u8 power_mode; | ||
242 | |||
243 | /* | ||
244 | * fifo_mode: | ||
245 | * BYPASS The FIFO is bypassed | ||
246 | * FIFO FIFO collects up to 32 values then stops collecting data | ||
247 | * STREAM FIFO holds the last 32 data values. Once full, the FIFO's | ||
248 | * oldest data is lost as it is replaced with newer data | ||
249 | * | ||
250 | * DEFAULT should be ADXL_FIFO_STREAM | ||
251 | */ | ||
252 | |||
253 | #define ADXL_FIFO_BYPASS 0 | ||
254 | #define ADXL_FIFO_FIFO 1 | ||
255 | #define ADXL_FIFO_STREAM 2 | ||
256 | |||
257 | u8 fifo_mode; | ||
258 | |||
259 | /* | ||
260 | * watermark: | ||
261 | * The Watermark feature can be used to reduce the interrupt load | ||
262 | * of the system. The FIFO fills up to the value stored in watermark | ||
263 | * [1..32] and then generates an interrupt. | ||
264 | * A '0' disables the watermark feature. | ||
265 | */ | ||
266 | |||
267 | u8 watermark; | ||
268 | |||
269 | u32 ev_type; /* EV_ABS or EV_REL */ | ||
270 | |||
271 | u32 ev_code_x; /* ABS_X,Y,Z or REL_X,Y,Z */ | ||
272 | u32 ev_code_y; /* ABS_X,Y,Z or REL_X,Y,Z */ | ||
273 | u32 ev_code_z; /* ABS_X,Y,Z or REL_X,Y,Z */ | ||
274 | |||
275 | /* | ||
276 | * A valid BTN or KEY Code; use tap_axis_control to disable | ||
277 | * event reporting | ||
278 | */ | ||
279 | |||
280 | u32 ev_code_tap[3]; /* EV_KEY {X-Axis, Y-Axis, Z-Axis} */ | ||
281 | |||
282 | /* | ||
283 | * A valid BTN or KEY Code for Free-Fall or Activity enables | ||
284 | * input event reporting. A '0' disables the Free-Fall or | ||
285 | * Activity reporting. | ||
286 | */ | ||
287 | |||
288 | u32 ev_code_ff; /* EV_KEY */ | ||
289 | u32 ev_code_act_inactivity; /* EV_KEY */ | ||
290 | |||
291 | /* | ||
292 | * Use ADXL34x INT2 instead of INT1 | ||
293 | */ | ||
294 | u8 use_int2; | ||
295 | |||
296 | /* | ||
297 | * ADXL346 only ORIENTATION SENSING feature | ||
298 | * The orientation function of the ADXL346 reports both 2-D and | ||
299 | * 3-D orientation concurrently. | ||
300 | */ | ||
301 | |||
302 | #define ADXL_EN_ORIENTATION_2D 1 | ||
303 | #define ADXL_EN_ORIENTATION_3D 2 | ||
304 | #define ADXL_EN_ORIENTATION_2D_3D 3 | ||
305 | |||
306 | u8 orientation_enable; | ||
307 | |||
308 | /* | ||
309 | * The width of the deadzone region between two or more | ||
310 | * orientation positions is determined by setting the Deadzone | ||
311 | * value. The deadzone region size can be specified with a | ||
312 | * resolution of 3.6deg. The deadzone angle represents the total | ||
313 | * angle where the orientation is considered invalid. | ||
314 | */ | ||
315 | |||
316 | #define ADXL_DEADZONE_ANGLE_0p0 0 /* !!!0.0 [deg] */ | ||
317 | #define ADXL_DEADZONE_ANGLE_3p6 1 /* 3.6 [deg] */ | ||
318 | #define ADXL_DEADZONE_ANGLE_7p2 2 /* 7.2 [deg] */ | ||
319 | #define ADXL_DEADZONE_ANGLE_10p8 3 /* 10.8 [deg] */ | ||
320 | #define ADXL_DEADZONE_ANGLE_14p4 4 /* 14.4 [deg] */ | ||
321 | #define ADXL_DEADZONE_ANGLE_18p0 5 /* 18.0 [deg] */ | ||
322 | #define ADXL_DEADZONE_ANGLE_21p6 6 /* 21.6 [deg] */ | ||
323 | #define ADXL_DEADZONE_ANGLE_25p2 7 /* 25.2 [deg] */ | ||
324 | |||
325 | u8 deadzone_angle; | ||
326 | |||
327 | /* | ||
328 | * To eliminate most human motion such as walking or shaking, | ||
329 | * a Divisor value should be selected to effectively limit the | ||
330 | * orientation bandwidth. Set the depth of the filter used to | ||
331 | * low-pass filter the measured acceleration for stable | ||
332 | * orientation sensing | ||
333 | */ | ||
334 | |||
335 | #define ADXL_LP_FILTER_DIVISOR_2 0 | ||
336 | #define ADXL_LP_FILTER_DIVISOR_4 1 | ||
337 | #define ADXL_LP_FILTER_DIVISOR_8 2 | ||
338 | #define ADXL_LP_FILTER_DIVISOR_16 3 | ||
339 | #define ADXL_LP_FILTER_DIVISOR_32 4 | ||
340 | #define ADXL_LP_FILTER_DIVISOR_64 5 | ||
341 | #define ADXL_LP_FILTER_DIVISOR_128 6 | ||
342 | #define ADXL_LP_FILTER_DIVISOR_256 7 | ||
343 | |||
344 | u8 divisor_length; | ||
345 | |||
346 | u32 ev_codes_orient_2d[4]; /* EV_KEY {+X, -X, +Y, -Y} */ | ||
347 | u32 ev_codes_orient_3d[6]; /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */ | ||
348 | }; | ||
349 | #endif | ||
diff --git a/include/linux/input/cy8ctmg110_pdata.h b/include/linux/input/cy8ctmg110_pdata.h new file mode 100644 index 000000000000..09522cb59910 --- /dev/null +++ b/include/linux/input/cy8ctmg110_pdata.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef _LINUX_CY8CTMG110_PDATA_H | ||
2 | #define _LINUX_CY8CTMG110_PDATA_H | ||
3 | |||
4 | struct cy8ctmg110_pdata | ||
5 | { | ||
6 | int reset_pin; /* Reset pin is wired to this GPIO (optional) */ | ||
7 | int irq_pin; /* IRQ pin is wired to this GPIO */ | ||
8 | }; | ||
9 | |||
10 | #endif | ||
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index c964cd7f436a..80352ad6581a 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
@@ -41,6 +41,9 @@ struct matrix_keymap_data { | |||
41 | * @col_scan_delay_us: delay, measured in microseconds, that is | 41 | * @col_scan_delay_us: delay, measured in microseconds, that is |
42 | * needed before we can keypad after activating column gpio | 42 | * needed before we can keypad after activating column gpio |
43 | * @debounce_ms: debounce interval in milliseconds | 43 | * @debounce_ms: debounce interval in milliseconds |
44 | * @clustered_irq: may be specified if interrupts of all row/column GPIOs | ||
45 | * are bundled to one single irq | ||
46 | * @clustered_irq_flags: flags that are needed for the clustered irq | ||
44 | * @active_low: gpio polarity | 47 | * @active_low: gpio polarity |
45 | * @wakeup: controls whether the device should be set up as wakeup | 48 | * @wakeup: controls whether the device should be set up as wakeup |
46 | * source | 49 | * source |
@@ -63,6 +66,9 @@ struct matrix_keypad_platform_data { | |||
63 | /* key debounce interval in milli-second */ | 66 | /* key debounce interval in milli-second */ |
64 | unsigned int debounce_ms; | 67 | unsigned int debounce_ms; |
65 | 68 | ||
69 | unsigned int clustered_irq; | ||
70 | unsigned int clustered_irq_flags; | ||
71 | |||
66 | bool active_low; | 72 | bool active_low; |
67 | bool wakeup; | 73 | bool wakeup; |
68 | bool no_autorepeat; | 74 | bool no_autorepeat; |
diff --git a/include/linux/intel_pmic_gpio.h b/include/linux/intel_pmic_gpio.h new file mode 100644 index 000000000000..920109a29191 --- /dev/null +++ b/include/linux/intel_pmic_gpio.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef LINUX_INTEL_PMIC_H | ||
2 | #define LINUX_INTEL_PMIC_H | ||
3 | |||
4 | struct intel_pmic_gpio_platform_data { | ||
5 | /* the first IRQ of the chip */ | ||
6 | unsigned irq_base; | ||
7 | /* number assigned to the first GPIO */ | ||
8 | unsigned gpio_base; | ||
9 | /* sram address for gpiointr register, the langwell chip will map | ||
10 | * the PMIC spi GPIO expander's GPIOINTR register in sram. | ||
11 | */ | ||
12 | unsigned gpiointr; | ||
13 | }; | ||
14 | |||
15 | #endif | ||
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index a0bb301afac0..64d529133031 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -7,7 +7,6 @@ | |||
7 | struct cfq_queue; | 7 | struct cfq_queue; |
8 | struct cfq_io_context { | 8 | struct cfq_io_context { |
9 | void *key; | 9 | void *key; |
10 | unsigned long dead_key; | ||
11 | 10 | ||
12 | struct cfq_queue *cfqq[2]; | 11 | struct cfq_queue *cfqq[2]; |
13 | 12 | ||
diff --git a/include/linux/iscsi_boot_sysfs.h b/include/linux/iscsi_boot_sysfs.h new file mode 100644 index 000000000000..f1e6c184f14f --- /dev/null +++ b/include/linux/iscsi_boot_sysfs.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /* | ||
2 | * Export the iSCSI boot info to userland via sysfs. | ||
3 | * | ||
4 | * Copyright (C) 2010 Red Hat, Inc. All rights reserved. | ||
5 | * Copyright (C) 2010 Mike Christie | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License v2.0 as published by | ||
9 | * the Free Software Foundation | ||
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 | #ifndef _ISCSI_BOOT_SYSFS_ | ||
17 | #define _ISCSI_BOOT_SYSFS_ | ||
18 | |||
19 | /* | ||
20 | * The text attributes names for each of the kobjects. | ||
21 | */ | ||
22 | enum iscsi_boot_eth_properties_enum { | ||
23 | ISCSI_BOOT_ETH_INDEX, | ||
24 | ISCSI_BOOT_ETH_FLAGS, | ||
25 | ISCSI_BOOT_ETH_IP_ADDR, | ||
26 | ISCSI_BOOT_ETH_SUBNET_MASK, | ||
27 | ISCSI_BOOT_ETH_ORIGIN, | ||
28 | ISCSI_BOOT_ETH_GATEWAY, | ||
29 | ISCSI_BOOT_ETH_PRIMARY_DNS, | ||
30 | ISCSI_BOOT_ETH_SECONDARY_DNS, | ||
31 | ISCSI_BOOT_ETH_DHCP, | ||
32 | ISCSI_BOOT_ETH_VLAN, | ||
33 | ISCSI_BOOT_ETH_MAC, | ||
34 | /* eth_pci_bdf - this is replaced by link to the device itself. */ | ||
35 | ISCSI_BOOT_ETH_HOSTNAME, | ||
36 | ISCSI_BOOT_ETH_END_MARKER, | ||
37 | }; | ||
38 | |||
39 | enum iscsi_boot_tgt_properties_enum { | ||
40 | ISCSI_BOOT_TGT_INDEX, | ||
41 | ISCSI_BOOT_TGT_FLAGS, | ||
42 | ISCSI_BOOT_TGT_IP_ADDR, | ||
43 | ISCSI_BOOT_TGT_PORT, | ||
44 | ISCSI_BOOT_TGT_LUN, | ||
45 | ISCSI_BOOT_TGT_CHAP_TYPE, | ||
46 | ISCSI_BOOT_TGT_NIC_ASSOC, | ||
47 | ISCSI_BOOT_TGT_NAME, | ||
48 | ISCSI_BOOT_TGT_CHAP_NAME, | ||
49 | ISCSI_BOOT_TGT_CHAP_SECRET, | ||
50 | ISCSI_BOOT_TGT_REV_CHAP_NAME, | ||
51 | ISCSI_BOOT_TGT_REV_CHAP_SECRET, | ||
52 | ISCSI_BOOT_TGT_END_MARKER, | ||
53 | }; | ||
54 | |||
55 | enum iscsi_boot_initiator_properties_enum { | ||
56 | ISCSI_BOOT_INI_INDEX, | ||
57 | ISCSI_BOOT_INI_FLAGS, | ||
58 | ISCSI_BOOT_INI_ISNS_SERVER, | ||
59 | ISCSI_BOOT_INI_SLP_SERVER, | ||
60 | ISCSI_BOOT_INI_PRI_RADIUS_SERVER, | ||
61 | ISCSI_BOOT_INI_SEC_RADIUS_SERVER, | ||
62 | ISCSI_BOOT_INI_INITIATOR_NAME, | ||
63 | ISCSI_BOOT_INI_END_MARKER, | ||
64 | }; | ||
65 | |||
66 | struct attribute_group; | ||
67 | |||
68 | struct iscsi_boot_kobj { | ||
69 | struct kobject kobj; | ||
70 | struct attribute_group *attr_group; | ||
71 | struct list_head list; | ||
72 | |||
73 | /* | ||
74 | * Pointer to store driver specific info. If set this will | ||
75 | * be freed for the LLD when the kobj release function is called. | ||
76 | */ | ||
77 | void *data; | ||
78 | /* | ||
79 | * Driver specific show function. | ||
80 | * | ||
81 | * The enum of the type. This can be any value of the above | ||
82 | * properties. | ||
83 | */ | ||
84 | ssize_t (*show) (void *data, int type, char *buf); | ||
85 | |||
86 | /* | ||
87 | * Drivers specific visibility function. | ||
88 | * The function should return if they the attr should be readable | ||
89 | * writable or should not be shown. | ||
90 | * | ||
91 | * The enum of the type. This can be any value of the above | ||
92 | * properties. | ||
93 | */ | ||
94 | mode_t (*is_visible) (void *data, int type); | ||
95 | }; | ||
96 | |||
97 | struct iscsi_boot_kset { | ||
98 | struct list_head kobj_list; | ||
99 | struct kset *kset; | ||
100 | }; | ||
101 | |||
102 | struct iscsi_boot_kobj * | ||
103 | iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, | ||
104 | void *data, | ||
105 | ssize_t (*show) (void *data, int type, char *buf), | ||
106 | mode_t (*is_visible) (void *data, int type)); | ||
107 | |||
108 | struct iscsi_boot_kobj * | ||
109 | iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, | ||
110 | void *data, | ||
111 | ssize_t (*show) (void *data, int type, char *buf), | ||
112 | mode_t (*is_visible) (void *data, int type)); | ||
113 | struct iscsi_boot_kobj * | ||
114 | iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, | ||
115 | void *data, | ||
116 | ssize_t (*show) (void *data, int type, char *buf), | ||
117 | mode_t (*is_visible) (void *data, int type)); | ||
118 | |||
119 | struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name); | ||
120 | struct iscsi_boot_kset *iscsi_boot_create_host_kset(unsigned int hostno); | ||
121 | void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset); | ||
122 | |||
123 | #endif | ||
diff --git a/include/linux/iscsi_ibft.h b/include/linux/iscsi_ibft.h index d2e4042f8f5e..8ba7e5b9d62c 100644 --- a/include/linux/iscsi_ibft.h +++ b/include/linux/iscsi_ibft.h | |||
@@ -21,21 +21,13 @@ | |||
21 | #ifndef ISCSI_IBFT_H | 21 | #ifndef ISCSI_IBFT_H |
22 | #define ISCSI_IBFT_H | 22 | #define ISCSI_IBFT_H |
23 | 23 | ||
24 | struct ibft_table_header { | 24 | #include <acpi/acpi.h> |
25 | char signature[4]; | ||
26 | u32 length; | ||
27 | u8 revision; | ||
28 | u8 checksum; | ||
29 | char oem_id[6]; | ||
30 | char oem_table_id[8]; | ||
31 | char reserved[24]; | ||
32 | } __attribute__((__packed__)); | ||
33 | 25 | ||
34 | /* | 26 | /* |
35 | * Logical location of iSCSI Boot Format Table. | 27 | * Logical location of iSCSI Boot Format Table. |
36 | * If the value is NULL there is no iBFT on the machine. | 28 | * If the value is NULL there is no iBFT on the machine. |
37 | */ | 29 | */ |
38 | extern struct ibft_table_header *ibft_addr; | 30 | extern struct acpi_table_ibft *ibft_addr; |
39 | 31 | ||
40 | /* | 32 | /* |
41 | * Routine used to find and reserve the iSCSI Boot Format Table. The | 33 | * Routine used to find and reserve the iSCSI Boot Format Table. The |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index a4d2e9f7088a..adf832dec3f3 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1026,11 +1026,12 @@ void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); | |||
1026 | 1026 | ||
1027 | struct jbd2_buffer_trigger_type { | 1027 | struct jbd2_buffer_trigger_type { |
1028 | /* | 1028 | /* |
1029 | * Fired just before a buffer is written to the journal. | 1029 | * Fired a the moment data to write to the journal are known to be |
1030 | * mapped_data is a mapped buffer that is the frozen data for | 1030 | * stable - so either at the moment b_frozen_data is created or just |
1031 | * commit. | 1031 | * before a buffer is written to the journal. mapped_data is a mapped |
1032 | * buffer that is the frozen data for commit. | ||
1032 | */ | 1033 | */ |
1033 | void (*t_commit)(struct jbd2_buffer_trigger_type *type, | 1034 | void (*t_frozen)(struct jbd2_buffer_trigger_type *type, |
1034 | struct buffer_head *bh, void *mapped_data, | 1035 | struct buffer_head *bh, void *mapped_data, |
1035 | size_t size); | 1036 | size_t size); |
1036 | 1037 | ||
@@ -1042,7 +1043,7 @@ struct jbd2_buffer_trigger_type { | |||
1042 | struct buffer_head *bh); | 1043 | struct buffer_head *bh); |
1043 | }; | 1044 | }; |
1044 | 1045 | ||
1045 | extern void jbd2_buffer_commit_trigger(struct journal_head *jh, | 1046 | extern void jbd2_buffer_frozen_trigger(struct journal_head *jh, |
1046 | void *mapped_data, | 1047 | void *mapped_data, |
1047 | struct jbd2_buffer_trigger_type *triggers); | 1048 | struct jbd2_buffer_trigger_type *triggers); |
1048 | extern void jbd2_buffer_abort_trigger(struct journal_head *jh, | 1049 | extern void jbd2_buffer_abort_trigger(struct journal_head *jh, |
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index 0874ab59ffef..edb9231f1898 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h | |||
@@ -185,7 +185,7 @@ struct jffs2_raw_xref | |||
185 | jint32_t hdr_crc; | 185 | jint32_t hdr_crc; |
186 | jint32_t ino; /* inode number */ | 186 | jint32_t ino; /* inode number */ |
187 | jint32_t xid; /* XATTR identifier number */ | 187 | jint32_t xid; /* XATTR identifier number */ |
188 | jint32_t xseqno; /* xref sequencial number */ | 188 | jint32_t xseqno; /* xref sequential number */ |
189 | jint32_t node_crc; | 189 | jint32_t node_crc; |
190 | } __attribute__((packed)); | 190 | } __attribute__((packed)); |
191 | 191 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 01dfc05ef4ac..5de838b0fc1a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -733,12 +733,6 @@ extern int do_sysinfo(struct sysinfo *info); | |||
733 | 733 | ||
734 | #endif /* __KERNEL__ */ | 734 | #endif /* __KERNEL__ */ |
735 | 735 | ||
736 | #ifndef __EXPORTED_HEADERS__ | ||
737 | #ifndef __KERNEL__ | ||
738 | #warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders | ||
739 | #endif /* __KERNEL__ */ | ||
740 | #endif /* __EXPORTED_HEADERS__ */ | ||
741 | |||
742 | #define SI_LOAD_SHIFT 16 | 736 | #define SI_LOAD_SHIFT 16 |
743 | struct sysinfo { | 737 | struct sysinfo { |
744 | long uptime; /* Seconds since boot */ | 738 | long uptime; /* Seconds since boot */ |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 23ea02253900..636fc381c897 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -524,6 +524,12 @@ struct kvm_enable_cap { | |||
524 | #define KVM_CAP_PPC_OSI 52 | 524 | #define KVM_CAP_PPC_OSI 52 |
525 | #define KVM_CAP_PPC_UNSET_IRQ 53 | 525 | #define KVM_CAP_PPC_UNSET_IRQ 53 |
526 | #define KVM_CAP_ENABLE_CAP 54 | 526 | #define KVM_CAP_ENABLE_CAP 54 |
527 | #ifdef __KVM_HAVE_XSAVE | ||
528 | #define KVM_CAP_XSAVE 55 | ||
529 | #endif | ||
530 | #ifdef __KVM_HAVE_XCRS | ||
531 | #define KVM_CAP_XCRS 56 | ||
532 | #endif | ||
527 | 533 | ||
528 | #ifdef KVM_CAP_IRQ_ROUTING | 534 | #ifdef KVM_CAP_IRQ_ROUTING |
529 | 535 | ||
@@ -613,6 +619,7 @@ struct kvm_clock_data { | |||
613 | */ | 619 | */ |
614 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) | 620 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) |
615 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) | 621 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) |
622 | /* KVM_SET_MEMORY_ALIAS is obsolete: */ | ||
616 | #define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) | 623 | #define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) |
617 | #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) | 624 | #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) |
618 | #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) | 625 | #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) |
@@ -714,6 +721,12 @@ struct kvm_clock_data { | |||
714 | #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) | 721 | #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) |
715 | #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) | 722 | #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) |
716 | #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap) | 723 | #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap) |
724 | /* Available with KVM_CAP_XSAVE */ | ||
725 | #define KVM_GET_XSAVE _IOR(KVMIO, 0xa4, struct kvm_xsave) | ||
726 | #define KVM_SET_XSAVE _IOW(KVMIO, 0xa5, struct kvm_xsave) | ||
727 | /* Available with KVM_CAP_XCRS */ | ||
728 | #define KVM_GET_XCRS _IOR(KVMIO, 0xa6, struct kvm_xcrs) | ||
729 | #define KVM_SET_XCRS _IOW(KVMIO, 0xa7, struct kvm_xcrs) | ||
717 | 730 | ||
718 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 731 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
719 | 732 | ||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 7cb116afa1cd..c13cc48697aa 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -81,13 +81,14 @@ struct kvm_vcpu { | |||
81 | int vcpu_id; | 81 | int vcpu_id; |
82 | struct mutex mutex; | 82 | struct mutex mutex; |
83 | int cpu; | 83 | int cpu; |
84 | atomic_t guest_mode; | ||
84 | struct kvm_run *run; | 85 | struct kvm_run *run; |
85 | unsigned long requests; | 86 | unsigned long requests; |
86 | unsigned long guest_debug; | 87 | unsigned long guest_debug; |
87 | int srcu_idx; | 88 | int srcu_idx; |
88 | 89 | ||
89 | int fpu_active; | 90 | int fpu_active; |
90 | int guest_fpu_loaded; | 91 | int guest_fpu_loaded, guest_xcr0_loaded; |
91 | wait_queue_head_t wq; | 92 | wait_queue_head_t wq; |
92 | int sigset_active; | 93 | int sigset_active; |
93 | sigset_t sigset; | 94 | sigset_t sigset; |
@@ -123,6 +124,7 @@ struct kvm_memory_slot { | |||
123 | } *lpage_info[KVM_NR_PAGE_SIZES - 1]; | 124 | } *lpage_info[KVM_NR_PAGE_SIZES - 1]; |
124 | unsigned long userspace_addr; | 125 | unsigned long userspace_addr; |
125 | int user_alloc; | 126 | int user_alloc; |
127 | int id; | ||
126 | }; | 128 | }; |
127 | 129 | ||
128 | static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) | 130 | static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) |
@@ -266,6 +268,8 @@ extern pfn_t bad_pfn; | |||
266 | 268 | ||
267 | int is_error_page(struct page *page); | 269 | int is_error_page(struct page *page); |
268 | int is_error_pfn(pfn_t pfn); | 270 | int is_error_pfn(pfn_t pfn); |
271 | int is_hwpoison_pfn(pfn_t pfn); | ||
272 | int is_fault_pfn(pfn_t pfn); | ||
269 | int kvm_is_error_hva(unsigned long addr); | 273 | int kvm_is_error_hva(unsigned long addr); |
270 | int kvm_set_memory_region(struct kvm *kvm, | 274 | int kvm_set_memory_region(struct kvm *kvm, |
271 | struct kvm_userspace_memory_region *mem, | 275 | struct kvm_userspace_memory_region *mem, |
@@ -284,8 +288,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm, | |||
284 | int user_alloc); | 288 | int user_alloc); |
285 | void kvm_disable_largepages(void); | 289 | void kvm_disable_largepages(void); |
286 | void kvm_arch_flush_shadow(struct kvm *kvm); | 290 | void kvm_arch_flush_shadow(struct kvm *kvm); |
287 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); | ||
288 | gfn_t unalias_gfn_instantiation(struct kvm *kvm, gfn_t gfn); | ||
289 | 291 | ||
290 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); | 292 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); |
291 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); | 293 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); |
@@ -445,7 +447,8 @@ void kvm_register_irq_mask_notifier(struct kvm *kvm, int irq, | |||
445 | struct kvm_irq_mask_notifier *kimn); | 447 | struct kvm_irq_mask_notifier *kimn); |
446 | void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, | 448 | void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, |
447 | struct kvm_irq_mask_notifier *kimn); | 449 | struct kvm_irq_mask_notifier *kimn); |
448 | void kvm_fire_mask_notifiers(struct kvm *kvm, int irq, bool mask); | 450 | void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin, |
451 | bool mask); | ||
449 | 452 | ||
450 | #ifdef __KVM_HAVE_IOAPIC | 453 | #ifdef __KVM_HAVE_IOAPIC |
451 | void kvm_get_intr_delivery_bitmask(struct kvm_ioapic *ioapic, | 454 | void kvm_get_intr_delivery_bitmask(struct kvm_ioapic *ioapic, |
@@ -562,10 +565,6 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se | |||
562 | } | 565 | } |
563 | #endif | 566 | #endif |
564 | 567 | ||
565 | #ifndef KVM_ARCH_HAS_UNALIAS_INSTANTIATION | ||
566 | #define unalias_gfn_instantiation unalias_gfn | ||
567 | #endif | ||
568 | |||
569 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 568 | #ifdef CONFIG_HAVE_KVM_IRQCHIP |
570 | 569 | ||
571 | #define KVM_MAX_IRQ_ROUTES 1024 | 570 | #define KVM_MAX_IRQ_ROUTES 1024 |
@@ -628,5 +627,25 @@ static inline long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl, | |||
628 | 627 | ||
629 | #endif | 628 | #endif |
630 | 629 | ||
630 | static inline void kvm_make_request(int req, struct kvm_vcpu *vcpu) | ||
631 | { | ||
632 | set_bit(req, &vcpu->requests); | ||
633 | } | ||
634 | |||
635 | static inline bool kvm_make_check_request(int req, struct kvm_vcpu *vcpu) | ||
636 | { | ||
637 | return test_and_set_bit(req, &vcpu->requests); | ||
638 | } | ||
639 | |||
640 | static inline bool kvm_check_request(int req, struct kvm_vcpu *vcpu) | ||
641 | { | ||
642 | if (test_bit(req, &vcpu->requests)) { | ||
643 | clear_bit(req, &vcpu->requests); | ||
644 | return true; | ||
645 | } else { | ||
646 | return false; | ||
647 | } | ||
648 | } | ||
649 | |||
631 | #endif | 650 | #endif |
632 | 651 | ||
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h index fb46efbeabec..7ac0d4eee430 100644 --- a/include/linux/kvm_types.h +++ b/include/linux/kvm_types.h | |||
@@ -32,11 +32,11 @@ | |||
32 | 32 | ||
33 | typedef unsigned long gva_t; | 33 | typedef unsigned long gva_t; |
34 | typedef u64 gpa_t; | 34 | typedef u64 gpa_t; |
35 | typedef unsigned long gfn_t; | 35 | typedef u64 gfn_t; |
36 | 36 | ||
37 | typedef unsigned long hva_t; | 37 | typedef unsigned long hva_t; |
38 | typedef u64 hpa_t; | 38 | typedef u64 hpa_t; |
39 | typedef unsigned long hfn_t; | 39 | typedef u64 hfn_t; |
40 | 40 | ||
41 | typedef hfn_t pfn_t; | 41 | typedef hfn_t pfn_t; |
42 | 42 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 3bad2701bfa6..b85f3ff34d7d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1023,6 +1023,7 @@ extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | |||
1023 | extern int ata_std_bios_param(struct scsi_device *sdev, | 1023 | extern int ata_std_bios_param(struct scsi_device *sdev, |
1024 | struct block_device *bdev, | 1024 | struct block_device *bdev, |
1025 | sector_t capacity, int geom[]); | 1025 | sector_t capacity, int geom[]); |
1026 | extern void ata_scsi_unlock_native_capacity(struct scsi_device *sdev); | ||
1026 | extern int ata_scsi_slave_config(struct scsi_device *sdev); | 1027 | extern int ata_scsi_slave_config(struct scsi_device *sdev); |
1027 | extern void ata_scsi_slave_destroy(struct scsi_device *sdev); | 1028 | extern void ata_scsi_slave_destroy(struct scsi_device *sdev); |
1028 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | 1029 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, |
@@ -1174,6 +1175,7 @@ extern struct device_attribute *ata_common_sdev_attrs[]; | |||
1174 | .slave_configure = ata_scsi_slave_config, \ | 1175 | .slave_configure = ata_scsi_slave_config, \ |
1175 | .slave_destroy = ata_scsi_slave_destroy, \ | 1176 | .slave_destroy = ata_scsi_slave_destroy, \ |
1176 | .bios_param = ata_std_bios_param, \ | 1177 | .bios_param = ata_std_bios_param, \ |
1178 | .unlock_native_capacity = ata_scsi_unlock_native_capacity, \ | ||
1177 | .sdev_attrs = ata_common_sdev_attrs | 1179 | .sdev_attrs = ata_common_sdev_attrs |
1178 | 1180 | ||
1179 | #define ATA_NCQ_SHT(drv_name) \ | 1181 | #define ATA_NCQ_SHT(drv_name) \ |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 5126cceb6ae9..7135ebc8428c 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -18,8 +18,8 @@ | |||
18 | # define asmregparm | 18 | # define asmregparm |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | #define __page_aligned_data __section(.data.page_aligned) __aligned(PAGE_SIZE) | 21 | #define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE) |
22 | #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE) | 22 | #define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE) |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * For assembly routines. | 25 | * For assembly routines. |
@@ -27,8 +27,8 @@ | |||
27 | * Note when using these that you must specify the appropriate | 27 | * Note when using these that you must specify the appropriate |
28 | * alignment directives yourself | 28 | * alignment directives yourself |
29 | */ | 29 | */ |
30 | #define __PAGE_ALIGNED_DATA .section ".data.page_aligned", "aw" | 30 | #define __PAGE_ALIGNED_DATA .section ".data..page_aligned", "aw" |
31 | #define __PAGE_ALIGNED_BSS .section ".bss.page_aligned", "aw" | 31 | #define __PAGE_ALIGNED_BSS .section ".bss..page_aligned", "aw" |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * This is used by architectures to keep arguments on the stack | 34 | * This is used by architectures to keep arguments on the stack |
diff --git a/include/linux/list.h b/include/linux/list.h index 8392884a2977..5d57a3a1fa1b 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -544,6 +544,21 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
544 | &pos->member != (head); \ | 544 | &pos->member != (head); \ |
545 | pos = n, n = list_entry(n->member.prev, typeof(*n), member)) | 545 | pos = n, n = list_entry(n->member.prev, typeof(*n), member)) |
546 | 546 | ||
547 | /** | ||
548 | * list_safe_reset_next - reset a stale list_for_each_entry_safe loop | ||
549 | * @pos: the loop cursor used in the list_for_each_entry_safe loop | ||
550 | * @n: temporary storage used in list_for_each_entry_safe | ||
551 | * @member: the name of the list_struct within the struct. | ||
552 | * | ||
553 | * list_safe_reset_next is not safe to use in general if the list may be | ||
554 | * modified concurrently (eg. the lock is dropped in the loop body). An | ||
555 | * exception to this is if the cursor element (pos) is pinned in the list, | ||
556 | * and list_safe_reset_next is called after re-taking the lock and before | ||
557 | * completing the current iteration of the loop body. | ||
558 | */ | ||
559 | #define list_safe_reset_next(pos, n, member) \ | ||
560 | n = list_entry(pos->member.next, typeof(*pos), member) | ||
561 | |||
547 | /* | 562 | /* |
548 | * Double linked lists with a single pointer list head. | 563 | * Double linked lists with a single pointer list head. |
549 | * Mostly useful for hash tables where the two pointer list head is | 564 | * Mostly useful for hash tables where the two pointer list head is |
diff --git a/include/linux/lmb.h b/include/linux/lmb.h deleted file mode 100644 index f3d14333ebed..000000000000 --- a/include/linux/lmb.h +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | #ifndef _LINUX_LMB_H | ||
2 | #define _LINUX_LMB_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | /* | ||
6 | * Logical memory blocks. | ||
7 | * | ||
8 | * Copyright (C) 2001 Peter Bergner, IBM Corp. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/mm.h> | ||
18 | |||
19 | #define MAX_LMB_REGIONS 128 | ||
20 | |||
21 | struct lmb_property { | ||
22 | u64 base; | ||
23 | u64 size; | ||
24 | }; | ||
25 | |||
26 | struct lmb_region { | ||
27 | unsigned long cnt; | ||
28 | u64 size; | ||
29 | struct lmb_property region[MAX_LMB_REGIONS+1]; | ||
30 | }; | ||
31 | |||
32 | struct lmb { | ||
33 | unsigned long debug; | ||
34 | u64 rmo_size; | ||
35 | struct lmb_region memory; | ||
36 | struct lmb_region reserved; | ||
37 | }; | ||
38 | |||
39 | extern struct lmb lmb; | ||
40 | |||
41 | extern void __init lmb_init(void); | ||
42 | extern void __init lmb_analyze(void); | ||
43 | extern long lmb_add(u64 base, u64 size); | ||
44 | extern long lmb_remove(u64 base, u64 size); | ||
45 | extern long __init lmb_free(u64 base, u64 size); | ||
46 | extern long __init lmb_reserve(u64 base, u64 size); | ||
47 | extern u64 __init lmb_alloc_nid(u64 size, u64 align, int nid, | ||
48 | u64 (*nid_range)(u64, u64, int *)); | ||
49 | extern u64 __init lmb_alloc(u64 size, u64 align); | ||
50 | extern u64 __init lmb_alloc_base(u64 size, | ||
51 | u64, u64 max_addr); | ||
52 | extern u64 __init __lmb_alloc_base(u64 size, | ||
53 | u64 align, u64 max_addr); | ||
54 | extern u64 __init lmb_phys_mem_size(void); | ||
55 | extern u64 lmb_end_of_DRAM(void); | ||
56 | extern void __init lmb_enforce_memory_limit(u64 memory_limit); | ||
57 | extern int __init lmb_is_reserved(u64 addr); | ||
58 | extern int lmb_is_region_reserved(u64 base, u64 size); | ||
59 | extern int lmb_find(struct lmb_property *res); | ||
60 | |||
61 | extern void lmb_dump_all(void); | ||
62 | |||
63 | static inline u64 | ||
64 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) | ||
65 | { | ||
66 | return type->region[region_nr].size; | ||
67 | } | ||
68 | static inline u64 | ||
69 | lmb_size_pages(struct lmb_region *type, unsigned long region_nr) | ||
70 | { | ||
71 | return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
72 | } | ||
73 | static inline u64 | ||
74 | lmb_start_pfn(struct lmb_region *type, unsigned long region_nr) | ||
75 | { | ||
76 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
77 | } | ||
78 | static inline u64 | ||
79 | lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) | ||
80 | { | ||
81 | return lmb_start_pfn(type, region_nr) + | ||
82 | lmb_size_pages(type, region_nr); | ||
83 | } | ||
84 | |||
85 | #include <asm/lmb.h> | ||
86 | |||
87 | #endif /* __KERNEL__ */ | ||
88 | |||
89 | #endif /* _LINUX_LMB_H */ | ||
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h index de48d167568b..78fbf24f357a 100644 --- a/include/linux/lru_cache.h +++ b/include/linux/lru_cache.h | |||
@@ -262,7 +262,7 @@ extern void lc_seq_dump_details(struct seq_file *seq, struct lru_cache *lc, char | |||
262 | * @lc: the lru cache to operate on | 262 | * @lc: the lru cache to operate on |
263 | * | 263 | * |
264 | * Note that the reference counts and order on the active and lru lists may | 264 | * Note that the reference counts and order on the active and lru lists may |
265 | * still change. Returns true if we aquired the lock. | 265 | * still change. Returns true if we acquired the lock. |
266 | */ | 266 | */ |
267 | static inline int lc_try_lock(struct lru_cache *lc) | 267 | static inline int lc_try_lock(struct lru_cache *lc) |
268 | { | 268 | { |
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h index 6907251d5200..112a55033352 100644 --- a/include/linux/lsm_audit.h +++ b/include/linux/lsm_audit.h | |||
@@ -90,10 +90,42 @@ struct common_audit_data { | |||
90 | u32 requested; | 90 | u32 requested; |
91 | u32 audited; | 91 | u32 audited; |
92 | u32 denied; | 92 | u32 denied; |
93 | /* | ||
94 | * auditdeny is a bit tricky and unintuitive. See the | ||
95 | * comments in avc.c for it's meaning and usage. | ||
96 | */ | ||
97 | u32 auditdeny; | ||
93 | struct av_decision *avd; | 98 | struct av_decision *avd; |
94 | int result; | 99 | int result; |
95 | } selinux_audit_data; | 100 | } selinux_audit_data; |
96 | #endif | 101 | #endif |
102 | #ifdef CONFIG_SECURITY_APPARMOR | ||
103 | struct { | ||
104 | int error; | ||
105 | int op; | ||
106 | int type; | ||
107 | void *profile; | ||
108 | const char *name; | ||
109 | const char *info; | ||
110 | union { | ||
111 | void *target; | ||
112 | struct { | ||
113 | long pos; | ||
114 | void *target; | ||
115 | } iface; | ||
116 | struct { | ||
117 | int rlim; | ||
118 | unsigned long max; | ||
119 | } rlim; | ||
120 | struct { | ||
121 | const char *target; | ||
122 | u32 request; | ||
123 | u32 denied; | ||
124 | uid_t ouid; | ||
125 | } fs; | ||
126 | }; | ||
127 | } apparmor_audit_data; | ||
128 | #endif | ||
97 | }; | 129 | }; |
98 | /* these callback will be implemented by a specific LSM */ | 130 | /* these callback will be implemented by a specific LSM */ |
99 | void (*lsm_pre_audit)(struct audit_buffer *, void *); | 131 | void (*lsm_pre_audit)(struct audit_buffer *, void *); |
diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h new file mode 100644 index 000000000000..d0f08018335d --- /dev/null +++ b/include/linux/marvell_phy.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _MARVELL_PHY_H | ||
2 | #define _MARVELL_PHY_H | ||
3 | |||
4 | /* Mask used for ID comparisons */ | ||
5 | #define MARVELL_PHY_ID_MASK 0xfffffff0 | ||
6 | |||
7 | /* Known PHY IDs */ | ||
8 | #define MARVELL_PHY_ID_88E1101 0x01410c60 | ||
9 | #define MARVELL_PHY_ID_88E1112 0x01410c90 | ||
10 | #define MARVELL_PHY_ID_88E1111 0x01410cc0 | ||
11 | #define MARVELL_PHY_ID_88E1118 0x01410e10 | ||
12 | #define MARVELL_PHY_ID_88E1121R 0x01410cb0 | ||
13 | #define MARVELL_PHY_ID_88E1145 0x01410cd0 | ||
14 | #define MARVELL_PHY_ID_88E1240 0x01410e30 | ||
15 | #define MARVELL_PHY_ID_88EC048 0x01410e90 | ||
16 | |||
17 | /* struct phy_device dev_flags definitions */ | ||
18 | #define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001 | ||
19 | #define MARVELL_PHY_M1118_DNS323_LEDS 0x00000002 | ||
20 | |||
21 | #endif /* _MARVELL_PHY_H */ | ||
diff --git a/include/linux/memblock.h b/include/linux/memblock.h new file mode 100644 index 000000000000..a59faf2b5edd --- /dev/null +++ b/include/linux/memblock.h | |||
@@ -0,0 +1,89 @@ | |||
1 | #ifndef _LINUX_MEMBLOCK_H | ||
2 | #define _LINUX_MEMBLOCK_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | /* | ||
6 | * Logical memory blocks. | ||
7 | * | ||
8 | * Copyright (C) 2001 Peter Bergner, IBM Corp. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/mm.h> | ||
18 | |||
19 | #define MAX_MEMBLOCK_REGIONS 128 | ||
20 | |||
21 | struct memblock_property { | ||
22 | u64 base; | ||
23 | u64 size; | ||
24 | }; | ||
25 | |||
26 | struct memblock_region { | ||
27 | unsigned long cnt; | ||
28 | u64 size; | ||
29 | struct memblock_property region[MAX_MEMBLOCK_REGIONS+1]; | ||
30 | }; | ||
31 | |||
32 | struct memblock { | ||
33 | unsigned long debug; | ||
34 | u64 rmo_size; | ||
35 | struct memblock_region memory; | ||
36 | struct memblock_region reserved; | ||
37 | }; | ||
38 | |||
39 | extern struct memblock memblock; | ||
40 | |||
41 | extern void __init memblock_init(void); | ||
42 | extern void __init memblock_analyze(void); | ||
43 | extern long memblock_add(u64 base, u64 size); | ||
44 | extern long memblock_remove(u64 base, u64 size); | ||
45 | extern long __init memblock_free(u64 base, u64 size); | ||
46 | extern long __init memblock_reserve(u64 base, u64 size); | ||
47 | extern u64 __init memblock_alloc_nid(u64 size, u64 align, int nid, | ||
48 | u64 (*nid_range)(u64, u64, int *)); | ||
49 | extern u64 __init memblock_alloc(u64 size, u64 align); | ||
50 | extern u64 __init memblock_alloc_base(u64 size, | ||
51 | u64, u64 max_addr); | ||
52 | extern u64 __init __memblock_alloc_base(u64 size, | ||
53 | u64 align, u64 max_addr); | ||
54 | extern u64 __init memblock_phys_mem_size(void); | ||
55 | extern u64 memblock_end_of_DRAM(void); | ||
56 | extern void __init memblock_enforce_memory_limit(u64 memory_limit); | ||
57 | extern int __init memblock_is_reserved(u64 addr); | ||
58 | extern int memblock_is_region_reserved(u64 base, u64 size); | ||
59 | extern int memblock_find(struct memblock_property *res); | ||
60 | |||
61 | extern void memblock_dump_all(void); | ||
62 | |||
63 | static inline u64 | ||
64 | memblock_size_bytes(struct memblock_region *type, unsigned long region_nr) | ||
65 | { | ||
66 | return type->region[region_nr].size; | ||
67 | } | ||
68 | static inline u64 | ||
69 | memblock_size_pages(struct memblock_region *type, unsigned long region_nr) | ||
70 | { | ||
71 | return memblock_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
72 | } | ||
73 | static inline u64 | ||
74 | memblock_start_pfn(struct memblock_region *type, unsigned long region_nr) | ||
75 | { | ||
76 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
77 | } | ||
78 | static inline u64 | ||
79 | memblock_end_pfn(struct memblock_region *type, unsigned long region_nr) | ||
80 | { | ||
81 | return memblock_start_pfn(type, region_nr) + | ||
82 | memblock_size_pages(type, region_nr); | ||
83 | } | ||
84 | |||
85 | #include <asm/memblock.h> | ||
86 | |||
87 | #endif /* __KERNEL__ */ | ||
88 | |||
89 | #endif /* _LINUX_MEMBLOCK_H */ | ||
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index b631c46cffd9..f6c9b7dcb9fd 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -3,6 +3,12 @@ | |||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/major.h> | 4 | #include <linux/major.h> |
5 | 5 | ||
6 | /* | ||
7 | * These allocations are managed by device@lanana.org. If you use an | ||
8 | * entry that is not in assigned your entry may well be moved and | ||
9 | * reassigned, or set dynamic if a fixed value is not justified. | ||
10 | */ | ||
11 | |||
6 | #define PSMOUSE_MINOR 1 | 12 | #define PSMOUSE_MINOR 1 |
7 | #define MS_BUSMOUSE_MINOR 2 | 13 | #define MS_BUSMOUSE_MINOR 2 |
8 | #define ATIXL_BUSMOUSE_MINOR 3 | 14 | #define ATIXL_BUSMOUSE_MINOR 3 |
@@ -30,7 +36,6 @@ | |||
30 | #define HPET_MINOR 228 | 36 | #define HPET_MINOR 228 |
31 | #define FUSE_MINOR 229 | 37 | #define FUSE_MINOR 229 |
32 | #define KVM_MINOR 232 | 38 | #define KVM_MINOR 232 |
33 | #define VHOST_NET_MINOR 233 | ||
34 | #define BTRFS_MINOR 234 | 39 | #define BTRFS_MINOR 234 |
35 | #define AUTOFS_MINOR 235 | 40 | #define AUTOFS_MINOR 235 |
36 | #define MISC_DYNAMIC_MINOR 255 | 41 | #define MISC_DYNAMIC_MINOR 255 |
diff --git a/include/linux/mm.h b/include/linux/mm.h index b969efb03787..7a9ab7db1975 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -999,7 +999,7 @@ static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) | |||
999 | * querying the cache size, so a fastpath for that case is appropriate. | 999 | * querying the cache size, so a fastpath for that case is appropriate. |
1000 | */ | 1000 | */ |
1001 | struct shrinker { | 1001 | struct shrinker { |
1002 | int (*shrink)(int nr_to_scan, gfp_t gfp_mask); | 1002 | int (*shrink)(struct shrinker *, int nr_to_scan, gfp_t gfp_mask); |
1003 | int seeks; /* seeks to recreate an obj */ | 1003 | int seeks; /* seeks to recreate an obj */ |
1004 | 1004 | ||
1005 | /* These are for internal use */ | 1005 | /* These are for internal use */ |
@@ -1465,6 +1465,14 @@ extern int sysctl_memory_failure_recovery; | |||
1465 | extern void shake_page(struct page *p, int access); | 1465 | extern void shake_page(struct page *p, int access); |
1466 | extern atomic_long_t mce_bad_pages; | 1466 | extern atomic_long_t mce_bad_pages; |
1467 | extern int soft_offline_page(struct page *page, int flags); | 1467 | extern int soft_offline_page(struct page *page, int flags); |
1468 | #ifdef CONFIG_MEMORY_FAILURE | ||
1469 | int is_hwpoison_address(unsigned long addr); | ||
1470 | #else | ||
1471 | static inline int is_hwpoison_address(unsigned long addr) | ||
1472 | { | ||
1473 | return 0; | ||
1474 | } | ||
1475 | #endif | ||
1468 | 1476 | ||
1469 | extern void dump_page(struct page *page); | 1477 | extern void dump_page(struct page *page); |
1470 | 1478 | ||
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index aafe832f18aa..d4a2ebbdab4b 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -14,6 +14,9 @@ | |||
14 | #ifndef __SH_MMCIF_H__ | 14 | #ifndef __SH_MMCIF_H__ |
15 | #define __SH_MMCIF_H__ | 15 | #define __SH_MMCIF_H__ |
16 | 16 | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
17 | /* | 20 | /* |
18 | * MMCIF : CE_CLK_CTRL [19:16] | 21 | * MMCIF : CE_CLK_CTRL [19:16] |
19 | * 1000 : Peripheral clock / 512 | 22 | * 1000 : Peripheral clock / 512 |
@@ -36,4 +39,162 @@ struct sh_mmcif_plat_data { | |||
36 | u32 ocr; | 39 | u32 ocr; |
37 | }; | 40 | }; |
38 | 41 | ||
42 | #define MMCIF_CE_CMD_SET 0x00000000 | ||
43 | #define MMCIF_CE_ARG 0x00000008 | ||
44 | #define MMCIF_CE_ARG_CMD12 0x0000000C | ||
45 | #define MMCIF_CE_CMD_CTRL 0x00000010 | ||
46 | #define MMCIF_CE_BLOCK_SET 0x00000014 | ||
47 | #define MMCIF_CE_CLK_CTRL 0x00000018 | ||
48 | #define MMCIF_CE_BUF_ACC 0x0000001C | ||
49 | #define MMCIF_CE_RESP3 0x00000020 | ||
50 | #define MMCIF_CE_RESP2 0x00000024 | ||
51 | #define MMCIF_CE_RESP1 0x00000028 | ||
52 | #define MMCIF_CE_RESP0 0x0000002C | ||
53 | #define MMCIF_CE_RESP_CMD12 0x00000030 | ||
54 | #define MMCIF_CE_DATA 0x00000034 | ||
55 | #define MMCIF_CE_INT 0x00000040 | ||
56 | #define MMCIF_CE_INT_MASK 0x00000044 | ||
57 | #define MMCIF_CE_HOST_STS1 0x00000048 | ||
58 | #define MMCIF_CE_HOST_STS2 0x0000004C | ||
59 | #define MMCIF_CE_VERSION 0x0000007C | ||
60 | |||
61 | extern inline u32 sh_mmcif_readl(void __iomem *addr, int reg) | ||
62 | { | ||
63 | return readl(addr + reg); | ||
64 | } | ||
65 | |||
66 | extern inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | ||
67 | { | ||
68 | writel(val, addr + reg); | ||
69 | } | ||
70 | |||
71 | #define SH_MMCIF_BBS 512 /* boot block size */ | ||
72 | |||
73 | extern inline void sh_mmcif_boot_cmd_send(void __iomem *base, | ||
74 | unsigned long cmd, unsigned long arg) | ||
75 | { | ||
76 | sh_mmcif_writel(base, MMCIF_CE_INT, 0); | ||
77 | sh_mmcif_writel(base, MMCIF_CE_ARG, arg); | ||
78 | sh_mmcif_writel(base, MMCIF_CE_CMD_SET, cmd); | ||
79 | } | ||
80 | |||
81 | extern inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask) | ||
82 | { | ||
83 | unsigned long tmp; | ||
84 | int cnt; | ||
85 | |||
86 | for (cnt = 0; cnt < 1000000; cnt++) { | ||
87 | tmp = sh_mmcif_readl(base, MMCIF_CE_INT); | ||
88 | if (tmp & mask) { | ||
89 | sh_mmcif_writel(base, MMCIF_CE_INT, tmp & ~mask); | ||
90 | return 0; | ||
91 | } | ||
92 | } | ||
93 | |||
94 | return -1; | ||
95 | } | ||
96 | |||
97 | extern inline int sh_mmcif_boot_cmd(void __iomem *base, | ||
98 | unsigned long cmd, unsigned long arg) | ||
99 | { | ||
100 | sh_mmcif_boot_cmd_send(base, cmd, arg); | ||
101 | return sh_mmcif_boot_cmd_poll(base, 0x00010000); | ||
102 | } | ||
103 | |||
104 | extern inline int sh_mmcif_boot_do_read_single(void __iomem *base, | ||
105 | unsigned int block_nr, | ||
106 | unsigned long *buf) | ||
107 | { | ||
108 | int k; | ||
109 | |||
110 | /* CMD13 - Status */ | ||
111 | sh_mmcif_boot_cmd(base, 0x0d400000, 0x00010000); | ||
112 | |||
113 | if (sh_mmcif_readl(base, MMCIF_CE_RESP0) != 0x0900) | ||
114 | return -1; | ||
115 | |||
116 | /* CMD17 - Read */ | ||
117 | sh_mmcif_boot_cmd(base, 0x11480000, block_nr * SH_MMCIF_BBS); | ||
118 | if (sh_mmcif_boot_cmd_poll(base, 0x00100000) < 0) | ||
119 | return -1; | ||
120 | |||
121 | for (k = 0; k < (SH_MMCIF_BBS / 4); k++) | ||
122 | buf[k] = sh_mmcif_readl(base, MMCIF_CE_DATA); | ||
123 | |||
124 | return 0; | ||
125 | } | ||
126 | |||
127 | extern inline int sh_mmcif_boot_do_read(void __iomem *base, | ||
128 | unsigned long first_block, | ||
129 | unsigned long nr_blocks, | ||
130 | void *buf) | ||
131 | { | ||
132 | unsigned long k; | ||
133 | int ret = 0; | ||
134 | |||
135 | /* CMD16 - Set the block size */ | ||
136 | sh_mmcif_boot_cmd(base, 0x10400000, SH_MMCIF_BBS); | ||
137 | |||
138 | for (k = 0; !ret && k < nr_blocks; k++) | ||
139 | ret = sh_mmcif_boot_do_read_single(base, first_block + k, | ||
140 | buf + (k * SH_MMCIF_BBS)); | ||
141 | |||
142 | return ret; | ||
143 | } | ||
144 | |||
145 | extern inline void sh_mmcif_boot_init(void __iomem *base) | ||
146 | { | ||
147 | unsigned long tmp; | ||
148 | |||
149 | /* reset */ | ||
150 | tmp = sh_mmcif_readl(base, MMCIF_CE_VERSION); | ||
151 | sh_mmcif_writel(base, MMCIF_CE_VERSION, tmp | 0x80000000); | ||
152 | sh_mmcif_writel(base, MMCIF_CE_VERSION, tmp & ~0x80000000); | ||
153 | |||
154 | /* byte swap */ | ||
155 | sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, 0x00010000); | ||
156 | |||
157 | /* Set block size in MMCIF hardware */ | ||
158 | sh_mmcif_writel(base, MMCIF_CE_BLOCK_SET, SH_MMCIF_BBS); | ||
159 | |||
160 | /* Enable the clock, set it to Bus clock/256 (about 325Khz)*/ | ||
161 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, 0x01072fff); | ||
162 | |||
163 | /* CMD0 */ | ||
164 | sh_mmcif_boot_cmd(base, 0x00000040, 0); | ||
165 | |||
166 | /* CMD1 - Get OCR */ | ||
167 | do { | ||
168 | sh_mmcif_boot_cmd(base, 0x01405040, 0x40300000); /* CMD1 */ | ||
169 | } while ((sh_mmcif_readl(base, MMCIF_CE_RESP0) & 0x80000000) | ||
170 | != 0x80000000); | ||
171 | |||
172 | /* CMD2 - Get CID */ | ||
173 | sh_mmcif_boot_cmd(base, 0x02806040, 0); | ||
174 | |||
175 | /* CMD3 - Set card relative address */ | ||
176 | sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000); | ||
177 | } | ||
178 | |||
179 | extern inline void sh_mmcif_boot_slurp(void __iomem *base, | ||
180 | unsigned char *buf, | ||
181 | unsigned long no_bytes) | ||
182 | { | ||
183 | unsigned long tmp; | ||
184 | |||
185 | /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */ | ||
186 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, 0x01012fff); | ||
187 | |||
188 | /* CMD9 - Get CSD */ | ||
189 | sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000); | ||
190 | |||
191 | /* CMD7 - Select the card */ | ||
192 | sh_mmcif_boot_cmd(base, 0x07400000, 0x00010000); | ||
193 | |||
194 | tmp = no_bytes / SH_MMCIF_BBS; | ||
195 | tmp += (no_bytes % SH_MMCIF_BBS) ? 1 : 0; | ||
196 | |||
197 | sh_mmcif_boot_do_read(base, 512, tmp, buf); | ||
198 | } | ||
199 | |||
39 | #endif /* __SH_MMCIF_H__ */ | 200 | #endif /* __SH_MMCIF_H__ */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 6914fcad4673..8a6b9fdc7ffa 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -181,6 +181,13 @@ void *__symbol_get(const char *symbol); | |||
181 | void *__symbol_get_gpl(const char *symbol); | 181 | void *__symbol_get_gpl(const char *symbol); |
182 | #define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x))) | 182 | #define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x))) |
183 | 183 | ||
184 | /* modules using other modules: kdb wants to see this. */ | ||
185 | struct module_use { | ||
186 | struct list_head source_list; | ||
187 | struct list_head target_list; | ||
188 | struct module *source, *target; | ||
189 | }; | ||
190 | |||
184 | #ifndef __GENKSYMS__ | 191 | #ifndef __GENKSYMS__ |
185 | #ifdef CONFIG_MODVERSIONS | 192 | #ifdef CONFIG_MODVERSIONS |
186 | /* Mark the CRC weak since genksyms apparently decides not to | 193 | /* Mark the CRC weak since genksyms apparently decides not to |
@@ -359,7 +366,9 @@ struct module | |||
359 | 366 | ||
360 | #ifdef CONFIG_MODULE_UNLOAD | 367 | #ifdef CONFIG_MODULE_UNLOAD |
361 | /* What modules depend on me? */ | 368 | /* What modules depend on me? */ |
362 | struct list_head modules_which_use_me; | 369 | struct list_head source_list; |
370 | /* What modules do I depend on? */ | ||
371 | struct list_head target_list; | ||
363 | 372 | ||
364 | /* Who is waiting for us to be unloaded */ | 373 | /* Who is waiting for us to be unloaded */ |
365 | struct task_struct *waiter; | 374 | struct task_struct *waiter; |
@@ -663,43 +672,10 @@ static inline int module_get_iter_tracepoints(struct tracepoint_iter *iter) | |||
663 | 672 | ||
664 | #endif /* CONFIG_MODULES */ | 673 | #endif /* CONFIG_MODULES */ |
665 | 674 | ||
666 | struct device_driver; | ||
667 | #ifdef CONFIG_SYSFS | 675 | #ifdef CONFIG_SYSFS |
668 | struct module; | ||
669 | |||
670 | extern struct kset *module_kset; | 676 | extern struct kset *module_kset; |
671 | extern struct kobj_type module_ktype; | 677 | extern struct kobj_type module_ktype; |
672 | extern int module_sysfs_initialized; | 678 | extern int module_sysfs_initialized; |
673 | |||
674 | int mod_sysfs_init(struct module *mod); | ||
675 | int mod_sysfs_setup(struct module *mod, | ||
676 | struct kernel_param *kparam, | ||
677 | unsigned int num_params); | ||
678 | int module_add_modinfo_attrs(struct module *mod); | ||
679 | void module_remove_modinfo_attrs(struct module *mod); | ||
680 | |||
681 | #else /* !CONFIG_SYSFS */ | ||
682 | |||
683 | static inline int mod_sysfs_init(struct module *mod) | ||
684 | { | ||
685 | return 0; | ||
686 | } | ||
687 | |||
688 | static inline int mod_sysfs_setup(struct module *mod, | ||
689 | struct kernel_param *kparam, | ||
690 | unsigned int num_params) | ||
691 | { | ||
692 | return 0; | ||
693 | } | ||
694 | |||
695 | static inline int module_add_modinfo_attrs(struct module *mod) | ||
696 | { | ||
697 | return 0; | ||
698 | } | ||
699 | |||
700 | static inline void module_remove_modinfo_attrs(struct module *mod) | ||
701 | { } | ||
702 | |||
703 | #endif /* CONFIG_SYSFS */ | 679 | #endif /* CONFIG_SYSFS */ |
704 | 680 | ||
705 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) | 681 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1bca6171b1aa..46c36ffe20ee 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -790,11 +790,11 @@ struct net_device { | |||
790 | /* | 790 | /* |
791 | * This is the first field of the "visible" part of this structure | 791 | * This is the first field of the "visible" part of this structure |
792 | * (i.e. as seen by users in the "Space.c" file). It is the name | 792 | * (i.e. as seen by users in the "Space.c" file). It is the name |
793 | * the interface. | 793 | * of the interface. |
794 | */ | 794 | */ |
795 | char name[IFNAMSIZ]; | 795 | char name[IFNAMSIZ]; |
796 | 796 | ||
797 | struct pm_qos_request_list *pm_qos_req; | 797 | struct pm_qos_request_list pm_qos_req; |
798 | 798 | ||
799 | /* device name hash chain */ | 799 | /* device name hash chain */ |
800 | struct hlist_node name_hlist; | 800 | struct hlist_node name_hlist; |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 77c2ae53431c..bad4d121b16e 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -493,8 +493,15 @@ extern int nfs_wb_all(struct inode *inode); | |||
493 | extern int nfs_wb_page(struct inode *inode, struct page* page); | 493 | extern int nfs_wb_page(struct inode *inode, struct page* page); |
494 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); | 494 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); |
495 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 495 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
496 | extern int nfs_commit_inode(struct inode *, int); | ||
496 | extern struct nfs_write_data *nfs_commitdata_alloc(void); | 497 | extern struct nfs_write_data *nfs_commitdata_alloc(void); |
497 | extern void nfs_commit_free(struct nfs_write_data *wdata); | 498 | extern void nfs_commit_free(struct nfs_write_data *wdata); |
499 | #else | ||
500 | static inline int | ||
501 | nfs_commit_inode(struct inode *inode, int how) | ||
502 | { | ||
503 | return 0; | ||
504 | } | ||
498 | #endif | 505 | #endif |
499 | 506 | ||
500 | static inline int | 507 | static inline int |
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h index 9bdd91486b49..7e4cd616bcb5 100644 --- a/include/linux/omapfb.h +++ b/include/linux/omapfb.h | |||
@@ -253,7 +253,7 @@ struct omapfb_platform_data { | |||
253 | /* in arch/arm/plat-omap/fb.c */ | 253 | /* in arch/arm/plat-omap/fb.c */ |
254 | extern void omapfb_set_platform_data(struct omapfb_platform_data *data); | 254 | extern void omapfb_set_platform_data(struct omapfb_platform_data *data); |
255 | extern void omapfb_set_ctrl_platform_data(void *pdata); | 255 | extern void omapfb_set_ctrl_platform_data(void *pdata); |
256 | extern void omapfb_reserve_sdram(void); | 256 | extern void omapfb_reserve_sdram_memblock(void); |
257 | 257 | ||
258 | #endif | 258 | #endif |
259 | 259 | ||
diff --git a/include/linux/padata.h b/include/linux/padata.h index 8d8406246eef..bdcd1e9eacea 100644 --- a/include/linux/padata.h +++ b/include/linux/padata.h | |||
@@ -25,6 +25,11 @@ | |||
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <linux/list.h> | 26 | #include <linux/list.h> |
27 | #include <linux/timer.h> | 27 | #include <linux/timer.h> |
28 | #include <linux/notifier.h> | ||
29 | #include <linux/kobject.h> | ||
30 | |||
31 | #define PADATA_CPU_SERIAL 0x01 | ||
32 | #define PADATA_CPU_PARALLEL 0x02 | ||
28 | 33 | ||
29 | /** | 34 | /** |
30 | * struct padata_priv - Embedded to the users data structure. | 35 | * struct padata_priv - Embedded to the users data structure. |
@@ -59,7 +64,20 @@ struct padata_list { | |||
59 | }; | 64 | }; |
60 | 65 | ||
61 | /** | 66 | /** |
62 | * struct padata_queue - The percpu padata queues. | 67 | * struct padata_serial_queue - The percpu padata serial queue |
68 | * | ||
69 | * @serial: List to wait for serialization after reordering. | ||
70 | * @work: work struct for serialization. | ||
71 | * @pd: Backpointer to the internal control structure. | ||
72 | */ | ||
73 | struct padata_serial_queue { | ||
74 | struct padata_list serial; | ||
75 | struct work_struct work; | ||
76 | struct parallel_data *pd; | ||
77 | }; | ||
78 | |||
79 | /** | ||
80 | * struct padata_parallel_queue - The percpu padata parallel queue | ||
63 | * | 81 | * |
64 | * @parallel: List to wait for parallelization. | 82 | * @parallel: List to wait for parallelization. |
65 | * @reorder: List to wait for reordering after parallel processing. | 83 | * @reorder: List to wait for reordering after parallel processing. |
@@ -67,18 +85,28 @@ struct padata_list { | |||
67 | * @pwork: work struct for parallelization. | 85 | * @pwork: work struct for parallelization. |
68 | * @swork: work struct for serialization. | 86 | * @swork: work struct for serialization. |
69 | * @pd: Backpointer to the internal control structure. | 87 | * @pd: Backpointer to the internal control structure. |
88 | * @work: work struct for parallelization. | ||
70 | * @num_obj: Number of objects that are processed by this cpu. | 89 | * @num_obj: Number of objects that are processed by this cpu. |
71 | * @cpu_index: Index of the cpu. | 90 | * @cpu_index: Index of the cpu. |
72 | */ | 91 | */ |
73 | struct padata_queue { | 92 | struct padata_parallel_queue { |
74 | struct padata_list parallel; | 93 | struct padata_list parallel; |
75 | struct padata_list reorder; | 94 | struct padata_list reorder; |
76 | struct padata_list serial; | 95 | struct parallel_data *pd; |
77 | struct work_struct pwork; | 96 | struct work_struct work; |
78 | struct work_struct swork; | 97 | atomic_t num_obj; |
79 | struct parallel_data *pd; | 98 | int cpu_index; |
80 | atomic_t num_obj; | 99 | }; |
81 | int cpu_index; | 100 | |
101 | /** | ||
102 | * struct padata_cpumask - The cpumasks for the parallel/serial workers | ||
103 | * | ||
104 | * @pcpu: cpumask for the parallel workers. | ||
105 | * @cbcpu: cpumask for the serial (callback) workers. | ||
106 | */ | ||
107 | struct padata_cpumask { | ||
108 | cpumask_var_t pcpu; | ||
109 | cpumask_var_t cbcpu; | ||
82 | }; | 110 | }; |
83 | 111 | ||
84 | /** | 112 | /** |
@@ -86,25 +114,29 @@ struct padata_queue { | |||
86 | * that depends on the cpumask in use. | 114 | * that depends on the cpumask in use. |
87 | * | 115 | * |
88 | * @pinst: padata instance. | 116 | * @pinst: padata instance. |
89 | * @queue: percpu padata queues. | 117 | * @pqueue: percpu padata queues used for parallelization. |
118 | * @squeue: percpu padata queues used for serialuzation. | ||
90 | * @seq_nr: The sequence number that will be attached to the next object. | 119 | * @seq_nr: The sequence number that will be attached to the next object. |
91 | * @reorder_objects: Number of objects waiting in the reorder queues. | 120 | * @reorder_objects: Number of objects waiting in the reorder queues. |
92 | * @refcnt: Number of objects holding a reference on this parallel_data. | 121 | * @refcnt: Number of objects holding a reference on this parallel_data. |
93 | * @max_seq_nr: Maximal used sequence number. | 122 | * @max_seq_nr: Maximal used sequence number. |
94 | * @cpumask: cpumask in use. | 123 | * @cpumask: The cpumasks in use for parallel and serial workers. |
95 | * @lock: Reorder lock. | 124 | * @lock: Reorder lock. |
125 | * @processed: Number of already processed objects. | ||
96 | * @timer: Reorder timer. | 126 | * @timer: Reorder timer. |
97 | */ | 127 | */ |
98 | struct parallel_data { | 128 | struct parallel_data { |
99 | struct padata_instance *pinst; | 129 | struct padata_instance *pinst; |
100 | struct padata_queue *queue; | 130 | struct padata_parallel_queue *pqueue; |
101 | atomic_t seq_nr; | 131 | struct padata_serial_queue *squeue; |
102 | atomic_t reorder_objects; | 132 | atomic_t seq_nr; |
103 | atomic_t refcnt; | 133 | atomic_t reorder_objects; |
104 | unsigned int max_seq_nr; | 134 | atomic_t refcnt; |
105 | cpumask_var_t cpumask; | 135 | unsigned int max_seq_nr; |
106 | spinlock_t lock; | 136 | struct padata_cpumask cpumask; |
107 | struct timer_list timer; | 137 | spinlock_t lock ____cacheline_aligned; |
138 | unsigned int processed; | ||
139 | struct timer_list timer; | ||
108 | }; | 140 | }; |
109 | 141 | ||
110 | /** | 142 | /** |
@@ -113,31 +145,48 @@ struct parallel_data { | |||
113 | * @cpu_notifier: cpu hotplug notifier. | 145 | * @cpu_notifier: cpu hotplug notifier. |
114 | * @wq: The workqueue in use. | 146 | * @wq: The workqueue in use. |
115 | * @pd: The internal control structure. | 147 | * @pd: The internal control structure. |
116 | * @cpumask: User supplied cpumask. | 148 | * @cpumask: User supplied cpumasks for parallel and serial works. |
149 | * @cpumask_change_notifier: Notifiers chain for user-defined notify | ||
150 | * callbacks that will be called when either @pcpu or @cbcpu | ||
151 | * or both cpumasks change. | ||
152 | * @kobj: padata instance kernel object. | ||
117 | * @lock: padata instance lock. | 153 | * @lock: padata instance lock. |
118 | * @flags: padata flags. | 154 | * @flags: padata flags. |
119 | */ | 155 | */ |
120 | struct padata_instance { | 156 | struct padata_instance { |
121 | struct notifier_block cpu_notifier; | 157 | struct notifier_block cpu_notifier; |
122 | struct workqueue_struct *wq; | 158 | struct workqueue_struct *wq; |
123 | struct parallel_data *pd; | 159 | struct parallel_data *pd; |
124 | cpumask_var_t cpumask; | 160 | struct padata_cpumask cpumask; |
125 | struct mutex lock; | 161 | struct blocking_notifier_head cpumask_change_notifier; |
126 | u8 flags; | 162 | struct kobject kobj; |
127 | #define PADATA_INIT 1 | 163 | struct mutex lock; |
128 | #define PADATA_RESET 2 | 164 | u8 flags; |
165 | #define PADATA_INIT 1 | ||
166 | #define PADATA_RESET 2 | ||
167 | #define PADATA_INVALID 4 | ||
129 | }; | 168 | }; |
130 | 169 | ||
131 | extern struct padata_instance *padata_alloc(const struct cpumask *cpumask, | 170 | extern struct padata_instance *padata_alloc_possible( |
132 | struct workqueue_struct *wq); | 171 | struct workqueue_struct *wq); |
172 | extern struct padata_instance *padata_alloc(struct workqueue_struct *wq, | ||
173 | const struct cpumask *pcpumask, | ||
174 | const struct cpumask *cbcpumask); | ||
133 | extern void padata_free(struct padata_instance *pinst); | 175 | extern void padata_free(struct padata_instance *pinst); |
134 | extern int padata_do_parallel(struct padata_instance *pinst, | 176 | extern int padata_do_parallel(struct padata_instance *pinst, |
135 | struct padata_priv *padata, int cb_cpu); | 177 | struct padata_priv *padata, int cb_cpu); |
136 | extern void padata_do_serial(struct padata_priv *padata); | 178 | extern void padata_do_serial(struct padata_priv *padata); |
137 | extern int padata_set_cpumask(struct padata_instance *pinst, | 179 | extern int padata_set_cpumask(struct padata_instance *pinst, int cpumask_type, |
138 | cpumask_var_t cpumask); | 180 | cpumask_var_t cpumask); |
139 | extern int padata_add_cpu(struct padata_instance *pinst, int cpu); | 181 | extern int padata_set_cpumasks(struct padata_instance *pinst, |
140 | extern int padata_remove_cpu(struct padata_instance *pinst, int cpu); | 182 | cpumask_var_t pcpumask, |
141 | extern void padata_start(struct padata_instance *pinst); | 183 | cpumask_var_t cbcpumask); |
184 | extern int padata_add_cpu(struct padata_instance *pinst, int cpu, int mask); | ||
185 | extern int padata_remove_cpu(struct padata_instance *pinst, int cpu, int mask); | ||
186 | extern int padata_start(struct padata_instance *pinst); | ||
142 | extern void padata_stop(struct padata_instance *pinst); | 187 | extern void padata_stop(struct padata_instance *pinst); |
188 | extern int padata_register_cpumask_notifier(struct padata_instance *pinst, | ||
189 | struct notifier_block *nblock); | ||
190 | extern int padata_unregister_cpumask_notifier(struct padata_instance *pinst, | ||
191 | struct notifier_block *nblock); | ||
143 | #endif | 192 | #endif |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 6a471aba3b07..f26fda76b87f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -288,6 +288,7 @@ struct pci_dev { | |||
288 | */ | 288 | */ |
289 | unsigned int irq; | 289 | unsigned int irq; |
290 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ | 290 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ |
291 | resource_size_t fw_addr[DEVICE_COUNT_RESOURCE]; /* FW-assigned addr */ | ||
291 | 292 | ||
292 | /* These fields are used by common fixups */ | 293 | /* These fields are used by common fixups */ |
293 | unsigned int transparent:1; /* Transparent PCI bridge */ | 294 | unsigned int transparent:1; /* Transparent PCI bridge */ |
@@ -632,6 +633,7 @@ void pci_fixup_cardbus(struct pci_bus *); | |||
632 | 633 | ||
633 | /* Generic PCI functions used internally */ | 634 | /* Generic PCI functions used internally */ |
634 | 635 | ||
636 | void pcibios_scan_specific_bus(int busn); | ||
635 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 637 | extern struct pci_bus *pci_find_bus(int domain, int busnr); |
636 | void pci_bus_add_devices(const struct pci_bus *bus); | 638 | void pci_bus_add_devices(const struct pci_bus *bus); |
637 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, | 639 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 384c2a25db1f..e69612cace61 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1261,6 +1261,7 @@ | |||
1261 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 | 1261 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 |
1262 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8 | 1262 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8 |
1263 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2 | 1263 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2 |
1264 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA 0x0D85 | ||
1264 | 1265 | ||
1265 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1266 | #define PCI_VENDOR_ID_IMS 0x10e0 |
1266 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1267 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
@@ -2321,6 +2322,7 @@ | |||
2321 | #define PCI_VENDOR_ID_JMICRON 0x197B | 2322 | #define PCI_VENDOR_ID_JMICRON 0x197B |
2322 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | 2323 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 |
2323 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 | 2324 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 |
2325 | #define PCI_DEVICE_ID_JMICRON_JMB362 0x2362 | ||
2324 | #define PCI_DEVICE_ID_JMICRON_JMB363 0x2363 | 2326 | #define PCI_DEVICE_ID_JMICRON_JMB363 0x2363 |
2325 | #define PCI_DEVICE_ID_JMICRON_JMB365 0x2365 | 2327 | #define PCI_DEVICE_ID_JMICRON_JMB365 0x2365 |
2326 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 | 2328 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 |
@@ -2532,11 +2534,63 @@ | |||
2532 | #define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 | 2534 | #define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 |
2533 | #define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916 | 2535 | #define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916 |
2534 | #define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918 | 2536 | #define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918 |
2537 | #define PCI_DEVICE_ID_INTEL_I7_MCR 0x2c18 | ||
2538 | #define PCI_DEVICE_ID_INTEL_I7_MC_TAD 0x2c19 | ||
2539 | #define PCI_DEVICE_ID_INTEL_I7_MC_RAS 0x2c1a | ||
2540 | #define PCI_DEVICE_ID_INTEL_I7_MC_TEST 0x2c1c | ||
2541 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH0_CTRL 0x2c20 | ||
2542 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH0_ADDR 0x2c21 | ||
2543 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH0_RANK 0x2c22 | ||
2544 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH0_TC 0x2c23 | ||
2545 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH1_CTRL 0x2c28 | ||
2546 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH1_ADDR 0x2c29 | ||
2547 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH1_RANK 0x2c2a | ||
2548 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH1_TC 0x2c2b | ||
2549 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH2_CTRL 0x2c30 | ||
2550 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH2_ADDR 0x2c31 | ||
2551 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH2_RANK 0x2c32 | ||
2552 | #define PCI_DEVICE_ID_INTEL_I7_MC_CH2_TC 0x2c33 | ||
2553 | #define PCI_DEVICE_ID_INTEL_I7_NONCORE 0x2c41 | ||
2554 | #define PCI_DEVICE_ID_INTEL_I7_NONCORE_ALT 0x2c40 | ||
2555 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE 0x2c50 | ||
2556 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE_ALT 0x2c51 | ||
2557 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE_REV2 0x2c70 | ||
2558 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_SAD 0x2c81 | ||
2559 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_QPI_LINK0 0x2c90 | ||
2560 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_QPI_PHY0 0x2c91 | ||
2561 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MCR 0x2c98 | ||
2562 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TAD 0x2c99 | ||
2563 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TEST 0x2c9C | ||
2564 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_CTRL 0x2ca0 | ||
2565 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_ADDR 0x2ca1 | ||
2566 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_RANK 0x2ca2 | ||
2567 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_TC 0x2ca3 | ||
2568 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_CTRL 0x2ca8 | ||
2569 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_ADDR 0x2ca9 | ||
2570 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_RANK 0x2caa | ||
2571 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_TC 0x2cab | ||
2572 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MCR_REV2 0x2d98 | ||
2573 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TAD_REV2 0x2d99 | ||
2574 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_RAS_REV2 0x2d9a | ||
2575 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TEST_REV2 0x2d9c | ||
2576 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_CTRL_REV2 0x2da0 | ||
2577 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_ADDR_REV2 0x2da1 | ||
2578 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_RANK_REV2 0x2da2 | ||
2579 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_TC_REV2 0x2da3 | ||
2580 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_CTRL_REV2 0x2da8 | ||
2581 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_ADDR_REV2 0x2da9 | ||
2582 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_RANK_REV2 0x2daa | ||
2583 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_TC_REV2 0x2dab | ||
2584 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH2_CTRL_REV2 0x2db0 | ||
2585 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH2_ADDR_REV2 0x2db1 | ||
2586 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH2_RANK_REV2 0x2db2 | ||
2587 | #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH2_TC_REV2 0x2db3 | ||
2535 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2588 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2536 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG4 0x3429 | 2589 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG4 0x3429 |
2537 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG5 0x342a | 2590 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG5 0x342a |
2538 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG6 0x342b | 2591 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG6 0x342b |
2539 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG7 0x342c | 2592 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG7 0x342c |
2593 | #define PCI_DEVICE_ID_INTEL_X58_HUB_MGMT 0x342e | ||
2540 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG0 0x3430 | 2594 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG0 0x3430 |
2541 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG1 0x3431 | 2595 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG1 0x3431 |
2542 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG2 0x3432 | 2596 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG2 0x3432 |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 68567c0b3a5d..ce2dc655cd1d 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
@@ -131,11 +131,11 @@ | |||
131 | * Declaration/definition used for per-CPU variables that must be page aligned. | 131 | * Declaration/definition used for per-CPU variables that must be page aligned. |
132 | */ | 132 | */ |
133 | #define DECLARE_PER_CPU_PAGE_ALIGNED(type, name) \ | 133 | #define DECLARE_PER_CPU_PAGE_ALIGNED(type, name) \ |
134 | DECLARE_PER_CPU_SECTION(type, name, ".page_aligned") \ | 134 | DECLARE_PER_CPU_SECTION(type, name, "..page_aligned") \ |
135 | __aligned(PAGE_SIZE) | 135 | __aligned(PAGE_SIZE) |
136 | 136 | ||
137 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | 137 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ |
138 | DEFINE_PER_CPU_SECTION(type, name, ".page_aligned") \ | 138 | DEFINE_PER_CPU_SECTION(type, name, "..page_aligned") \ |
139 | __aligned(PAGE_SIZE) | 139 | __aligned(PAGE_SIZE) |
140 | 140 | ||
141 | /* | 141 | /* |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index d3a38d687104..b8b9084527b1 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -45,6 +45,16 @@ | |||
45 | #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(64 << 10) | 45 | #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(64 << 10) |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Percpu allocator can serve percpu allocations before slab is | ||
49 | * initialized which allows slab to depend on the percpu allocator. | ||
50 | * The following two parameters decide how much resource to | ||
51 | * preallocate for this. Keep PERCPU_DYNAMIC_RESERVE equal to or | ||
52 | * larger than PERCPU_DYNAMIC_EARLY_SIZE. | ||
53 | */ | ||
54 | #define PERCPU_DYNAMIC_EARLY_SLOTS 128 | ||
55 | #define PERCPU_DYNAMIC_EARLY_SIZE (12 << 10) | ||
56 | |||
57 | /* | ||
48 | * PERCPU_DYNAMIC_RESERVE indicates the amount of free area to piggy | 58 | * PERCPU_DYNAMIC_RESERVE indicates the amount of free area to piggy |
49 | * back on the first chunk for dynamic percpu allocation if arch is | 59 | * back on the first chunk for dynamic percpu allocation if arch is |
50 | * manually allocating and mapping it for faster access (as a part of | 60 | * manually allocating and mapping it for faster access (as a part of |
@@ -104,16 +114,11 @@ extern struct pcpu_alloc_info * __init pcpu_alloc_alloc_info(int nr_groups, | |||
104 | int nr_units); | 114 | int nr_units); |
105 | extern void __init pcpu_free_alloc_info(struct pcpu_alloc_info *ai); | 115 | extern void __init pcpu_free_alloc_info(struct pcpu_alloc_info *ai); |
106 | 116 | ||
107 | extern struct pcpu_alloc_info * __init pcpu_build_alloc_info( | ||
108 | size_t reserved_size, ssize_t dyn_size, | ||
109 | size_t atom_size, | ||
110 | pcpu_fc_cpu_distance_fn_t cpu_distance_fn); | ||
111 | |||
112 | extern int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, | 117 | extern int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, |
113 | void *base_addr); | 118 | void *base_addr); |
114 | 119 | ||
115 | #ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK | 120 | #ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK |
116 | extern int __init pcpu_embed_first_chunk(size_t reserved_size, ssize_t dyn_size, | 121 | extern int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, |
117 | size_t atom_size, | 122 | size_t atom_size, |
118 | pcpu_fc_cpu_distance_fn_t cpu_distance_fn, | 123 | pcpu_fc_cpu_distance_fn_t cpu_distance_fn, |
119 | pcpu_fc_alloc_fn_t alloc_fn, | 124 | pcpu_fc_alloc_fn_t alloc_fn, |
@@ -140,6 +145,7 @@ extern bool is_kernel_percpu_address(unsigned long addr); | |||
140 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 145 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
141 | extern void __init setup_per_cpu_areas(void); | 146 | extern void __init setup_per_cpu_areas(void); |
142 | #endif | 147 | #endif |
148 | extern void __init percpu_init_late(void); | ||
143 | 149 | ||
144 | #else /* CONFIG_SMP */ | 150 | #else /* CONFIG_SMP */ |
145 | 151 | ||
@@ -153,6 +159,8 @@ static inline bool is_kernel_percpu_address(unsigned long addr) | |||
153 | 159 | ||
154 | static inline void __init setup_per_cpu_areas(void) { } | 160 | static inline void __init setup_per_cpu_areas(void) { } |
155 | 161 | ||
162 | static inline void __init percpu_init_late(void) { } | ||
163 | |||
156 | static inline void *pcpu_lpage_remapped(void *kaddr) | 164 | static inline void *pcpu_lpage_remapped(void *kaddr) |
157 | { | 165 | { |
158 | return NULL; | 166 | return NULL; |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index fb6c91eac7e3..5d0266d94985 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -585,6 +585,7 @@ enum perf_event_active_state { | |||
585 | struct file; | 585 | struct file; |
586 | 586 | ||
587 | struct perf_mmap_data { | 587 | struct perf_mmap_data { |
588 | atomic_t refcount; | ||
588 | struct rcu_head rcu_head; | 589 | struct rcu_head rcu_head; |
589 | #ifdef CONFIG_PERF_USE_VMALLOC | 590 | #ifdef CONFIG_PERF_USE_VMALLOC |
590 | struct work_struct work; | 591 | struct work_struct work; |
@@ -592,7 +593,6 @@ struct perf_mmap_data { | |||
592 | #endif | 593 | #endif |
593 | int nr_pages; /* nr of data pages */ | 594 | int nr_pages; /* nr of data pages */ |
594 | int writable; /* are we writable */ | 595 | int writable; /* are we writable */ |
595 | int nr_locked; /* nr pages mlocked */ | ||
596 | 596 | ||
597 | atomic_t poll; /* POLL_ for wakeups */ | 597 | atomic_t poll; /* POLL_ for wakeups */ |
598 | 598 | ||
@@ -631,6 +631,9 @@ struct swevent_hlist { | |||
631 | struct rcu_head rcu_head; | 631 | struct rcu_head rcu_head; |
632 | }; | 632 | }; |
633 | 633 | ||
634 | #define PERF_ATTACH_CONTEXT 0x01 | ||
635 | #define PERF_ATTACH_GROUP 0x02 | ||
636 | |||
634 | /** | 637 | /** |
635 | * struct perf_event - performance event kernel representation: | 638 | * struct perf_event - performance event kernel representation: |
636 | */ | 639 | */ |
@@ -643,10 +646,10 @@ struct perf_event { | |||
643 | int nr_siblings; | 646 | int nr_siblings; |
644 | int group_flags; | 647 | int group_flags; |
645 | struct perf_event *group_leader; | 648 | struct perf_event *group_leader; |
646 | struct perf_event *output; | ||
647 | const struct pmu *pmu; | 649 | const struct pmu *pmu; |
648 | 650 | ||
649 | enum perf_event_active_state state; | 651 | enum perf_event_active_state state; |
652 | unsigned int attach_state; | ||
650 | atomic64_t count; | 653 | atomic64_t count; |
651 | 654 | ||
652 | /* | 655 | /* |
@@ -704,6 +707,8 @@ struct perf_event { | |||
704 | /* mmap bits */ | 707 | /* mmap bits */ |
705 | struct mutex mmap_mutex; | 708 | struct mutex mmap_mutex; |
706 | atomic_t mmap_count; | 709 | atomic_t mmap_count; |
710 | int mmap_locked; | ||
711 | struct user_struct *mmap_user; | ||
707 | struct perf_mmap_data *data; | 712 | struct perf_mmap_data *data; |
708 | 713 | ||
709 | /* poll related */ | 714 | /* poll related */ |
diff --git a/include/linux/personality.h b/include/linux/personality.h index 126120819a0d..eec3bae164d4 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h | |||
@@ -12,7 +12,7 @@ struct pt_regs; | |||
12 | 12 | ||
13 | extern int register_exec_domain(struct exec_domain *); | 13 | extern int register_exec_domain(struct exec_domain *); |
14 | extern int unregister_exec_domain(struct exec_domain *); | 14 | extern int unregister_exec_domain(struct exec_domain *); |
15 | extern int __set_personality(unsigned long); | 15 | extern int __set_personality(unsigned int); |
16 | 16 | ||
17 | #endif /* __KERNEL__ */ | 17 | #endif /* __KERNEL__ */ |
18 | 18 | ||
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 16de3933c45e..445796945ac9 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -139,7 +139,9 @@ void pipe_lock(struct pipe_inode_info *); | |||
139 | void pipe_unlock(struct pipe_inode_info *); | 139 | void pipe_unlock(struct pipe_inode_info *); |
140 | void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *); | 140 | void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *); |
141 | 141 | ||
142 | extern unsigned int pipe_max_pages; | 142 | extern unsigned int pipe_max_size, pipe_min_size; |
143 | int pipe_proc_fn(struct ctl_table *, int, void __user *, size_t *, loff_t *); | ||
144 | |||
143 | 145 | ||
144 | /* Drop the inode semaphore and wait for a pipe event, atomically */ | 146 | /* Drop the inode semaphore and wait for a pipe event, atomically */ |
145 | void pipe_wait(struct pipe_inode_info *pipe); | 147 | void pipe_wait(struct pipe_inode_info *pipe); |
diff --git a/include/linux/plist.h b/include/linux/plist.h index 6898985e7b38..7254eda078e5 100644 --- a/include/linux/plist.h +++ b/include/linux/plist.h | |||
@@ -260,6 +260,23 @@ static inline int plist_node_empty(const struct plist_node *node) | |||
260 | #endif | 260 | #endif |
261 | 261 | ||
262 | /** | 262 | /** |
263 | * plist_last_entry - get the struct for the last entry | ||
264 | * @head: the &struct plist_head pointer | ||
265 | * @type: the type of the struct this is embedded in | ||
266 | * @member: the name of the list_struct within the struct | ||
267 | */ | ||
268 | #ifdef CONFIG_DEBUG_PI_LIST | ||
269 | # define plist_last_entry(head, type, member) \ | ||
270 | ({ \ | ||
271 | WARN_ON(plist_head_empty(head)); \ | ||
272 | container_of(plist_last(head), type, member); \ | ||
273 | }) | ||
274 | #else | ||
275 | # define plist_last_entry(head, type, member) \ | ||
276 | container_of(plist_last(head), type, member) | ||
277 | #endif | ||
278 | |||
279 | /** | ||
263 | * plist_first - return the first node (and thus, highest priority) | 280 | * plist_first - return the first node (and thus, highest priority) |
264 | * @head: the &struct plist_head pointer | 281 | * @head: the &struct plist_head pointer |
265 | * | 282 | * |
@@ -271,4 +288,16 @@ static inline struct plist_node *plist_first(const struct plist_head *head) | |||
271 | struct plist_node, plist.node_list); | 288 | struct plist_node, plist.node_list); |
272 | } | 289 | } |
273 | 290 | ||
291 | /** | ||
292 | * plist_last - return the last node (and thus, lowest priority) | ||
293 | * @head: the &struct plist_head pointer | ||
294 | * | ||
295 | * Assumes the plist is _not_ empty. | ||
296 | */ | ||
297 | static inline struct plist_node *plist_last(const struct plist_head *head) | ||
298 | { | ||
299 | return list_entry(head->node_list.prev, | ||
300 | struct plist_node, plist.node_list); | ||
301 | } | ||
302 | |||
274 | #endif | 303 | #endif |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 8e258c727971..52e8c55ff314 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -457,6 +457,7 @@ struct dev_pm_info { | |||
457 | #ifdef CONFIG_PM_SLEEP | 457 | #ifdef CONFIG_PM_SLEEP |
458 | struct list_head entry; | 458 | struct list_head entry; |
459 | struct completion completion; | 459 | struct completion completion; |
460 | unsigned long wakeup_count; | ||
460 | #endif | 461 | #endif |
461 | #ifdef CONFIG_PM_RUNTIME | 462 | #ifdef CONFIG_PM_RUNTIME |
462 | struct timer_list suspend_timer; | 463 | struct timer_list suspend_timer; |
@@ -476,9 +477,15 @@ struct dev_pm_info { | |||
476 | enum rpm_request request; | 477 | enum rpm_request request; |
477 | enum rpm_status runtime_status; | 478 | enum rpm_status runtime_status; |
478 | int runtime_error; | 479 | int runtime_error; |
480 | unsigned long active_jiffies; | ||
481 | unsigned long suspended_jiffies; | ||
482 | unsigned long accounting_timestamp; | ||
479 | #endif | 483 | #endif |
480 | }; | 484 | }; |
481 | 485 | ||
486 | extern void update_pm_runtime_accounting(struct device *dev); | ||
487 | |||
488 | |||
482 | /* | 489 | /* |
483 | * The PM_EVENT_ messages are also used by drivers implementing the legacy | 490 | * The PM_EVENT_ messages are also used by drivers implementing the legacy |
484 | * suspend framework, based on the ->suspend() and ->resume() callbacks common | 491 | * suspend framework, based on the ->suspend() and ->resume() callbacks common |
@@ -552,6 +559,11 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
552 | } while (0) | 559 | } while (0) |
553 | 560 | ||
554 | extern void device_pm_wait_for_dev(struct device *sub, struct device *dev); | 561 | extern void device_pm_wait_for_dev(struct device *sub, struct device *dev); |
562 | |||
563 | /* drivers/base/power/wakeup.c */ | ||
564 | extern void pm_wakeup_event(struct device *dev, unsigned int msec); | ||
565 | extern void pm_stay_awake(struct device *dev); | ||
566 | extern void pm_relax(void); | ||
555 | #else /* !CONFIG_PM_SLEEP */ | 567 | #else /* !CONFIG_PM_SLEEP */ |
556 | 568 | ||
557 | #define device_pm_lock() do {} while (0) | 569 | #define device_pm_lock() do {} while (0) |
@@ -565,6 +577,10 @@ static inline int dpm_suspend_start(pm_message_t state) | |||
565 | #define suspend_report_result(fn, ret) do {} while (0) | 577 | #define suspend_report_result(fn, ret) do {} while (0) |
566 | 578 | ||
567 | static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {} | 579 | static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {} |
580 | |||
581 | static inline void pm_wakeup_event(struct device *dev, unsigned int msec) {} | ||
582 | static inline void pm_stay_awake(struct device *dev) {} | ||
583 | static inline void pm_relax(void) {} | ||
568 | #endif /* !CONFIG_PM_SLEEP */ | 584 | #endif /* !CONFIG_PM_SLEEP */ |
569 | 585 | ||
570 | /* How to reorder dpm_list after device_move() */ | 586 | /* How to reorder dpm_list after device_move() */ |
diff --git a/include/linux/pm_qos_params.h b/include/linux/pm_qos_params.h index 8ba440e5eb7f..77cbddb3784c 100644 --- a/include/linux/pm_qos_params.h +++ b/include/linux/pm_qos_params.h | |||
@@ -1,8 +1,10 @@ | |||
1 | #ifndef _LINUX_PM_QOS_PARAMS_H | ||
2 | #define _LINUX_PM_QOS_PARAMS_H | ||
1 | /* interface for the pm_qos_power infrastructure of the linux kernel. | 3 | /* interface for the pm_qos_power infrastructure of the linux kernel. |
2 | * | 4 | * |
3 | * Mark Gross <mgross@linux.intel.com> | 5 | * Mark Gross <mgross@linux.intel.com> |
4 | */ | 6 | */ |
5 | #include <linux/list.h> | 7 | #include <linux/plist.h> |
6 | #include <linux/notifier.h> | 8 | #include <linux/notifier.h> |
7 | #include <linux/miscdevice.h> | 9 | #include <linux/miscdevice.h> |
8 | 10 | ||
@@ -14,9 +16,12 @@ | |||
14 | #define PM_QOS_NUM_CLASSES 4 | 16 | #define PM_QOS_NUM_CLASSES 4 |
15 | #define PM_QOS_DEFAULT_VALUE -1 | 17 | #define PM_QOS_DEFAULT_VALUE -1 |
16 | 18 | ||
17 | struct pm_qos_request_list; | 19 | struct pm_qos_request_list { |
20 | struct plist_node list; | ||
21 | int pm_qos_class; | ||
22 | }; | ||
18 | 23 | ||
19 | struct pm_qos_request_list *pm_qos_add_request(int pm_qos_class, s32 value); | 24 | void pm_qos_add_request(struct pm_qos_request_list *l, int pm_qos_class, s32 value); |
20 | void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req, | 25 | void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req, |
21 | s32 new_value); | 26 | s32 new_value); |
22 | void pm_qos_remove_request(struct pm_qos_request_list *pm_qos_req); | 27 | void pm_qos_remove_request(struct pm_qos_request_list *pm_qos_req); |
@@ -24,4 +29,6 @@ void pm_qos_remove_request(struct pm_qos_request_list *pm_qos_req); | |||
24 | int pm_qos_request(int pm_qos_class); | 29 | int pm_qos_request(int pm_qos_class); |
25 | int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier); | 30 | int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier); |
26 | int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier); | 31 | int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier); |
32 | int pm_qos_request_active(struct pm_qos_request_list *req); | ||
27 | 33 | ||
34 | #endif | ||
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h index 22d64c18056c..76aca48722ae 100644 --- a/include/linux/pm_wakeup.h +++ b/include/linux/pm_wakeup.h | |||
@@ -29,8 +29,11 @@ | |||
29 | 29 | ||
30 | #ifdef CONFIG_PM | 30 | #ifdef CONFIG_PM |
31 | 31 | ||
32 | /* changes to device_may_wakeup take effect on the next pm state change. | 32 | /* Changes to device_may_wakeup take effect on the next pm state change. |
33 | * by default, devices should wakeup if they can. | 33 | * |
34 | * By default, most devices should leave wakeup disabled. The exceptions | ||
35 | * are devices that everyone expects to be wakeup sources: keyboards, | ||
36 | * power buttons, possibly network interfaces, etc. | ||
34 | */ | 37 | */ |
35 | static inline void device_init_wakeup(struct device *dev, bool val) | 38 | static inline void device_init_wakeup(struct device *dev, bool val) |
36 | { | 39 | { |
@@ -59,7 +62,7 @@ static inline bool device_may_wakeup(struct device *dev) | |||
59 | 62 | ||
60 | #else /* !CONFIG_PM */ | 63 | #else /* !CONFIG_PM */ |
61 | 64 | ||
62 | /* For some reason the next two routines work even without CONFIG_PM */ | 65 | /* For some reason the following routines work even without CONFIG_PM */ |
63 | static inline void device_init_wakeup(struct device *dev, bool val) | 66 | static inline void device_init_wakeup(struct device *dev, bool val) |
64 | { | 67 | { |
65 | dev->power.can_wakeup = val; | 68 | dev->power.can_wakeup = val; |
@@ -67,6 +70,7 @@ static inline void device_init_wakeup(struct device *dev, bool val) | |||
67 | 70 | ||
68 | static inline void device_set_wakeup_capable(struct device *dev, bool capable) | 71 | static inline void device_set_wakeup_capable(struct device *dev, bool capable) |
69 | { | 72 | { |
73 | dev->power.can_wakeup = capable; | ||
70 | } | 74 | } |
71 | 75 | ||
72 | static inline bool device_can_wakeup(struct device *dev) | 76 | static inline bool device_can_wakeup(struct device *dev) |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 7c4193eb0072..1bc1338b817b 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -414,6 +414,7 @@ struct pnp_protocol { | |||
414 | int (*disable) (struct pnp_dev *dev); | 414 | int (*disable) (struct pnp_dev *dev); |
415 | 415 | ||
416 | /* protocol specific suspend/resume */ | 416 | /* protocol specific suspend/resume */ |
417 | bool (*can_wakeup) (struct pnp_dev *dev); | ||
417 | int (*suspend) (struct pnp_dev * dev, pm_message_t state); | 418 | int (*suspend) (struct pnp_dev * dev, pm_message_t state); |
418 | int (*resume) (struct pnp_dev * dev); | 419 | int (*resume) (struct pnp_dev * dev); |
419 | 420 | ||
diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h index bff98ec1bfed..5d87f810a3b7 100644 --- a/include/linux/ppp_channel.h +++ b/include/linux/ppp_channel.h | |||
@@ -36,7 +36,7 @@ struct ppp_channel_ops { | |||
36 | 36 | ||
37 | struct ppp_channel { | 37 | struct ppp_channel { |
38 | void *private; /* channel private data */ | 38 | void *private; /* channel private data */ |
39 | struct ppp_channel_ops *ops; /* operations for this channel */ | 39 | const struct ppp_channel_ops *ops; /* operations for this channel */ |
40 | int mtu; /* max transmit packet size */ | 40 | int mtu; /* max transmit packet size */ |
41 | int hdrlen; /* amount of headroom channel needs */ | 41 | int hdrlen; /* amount of headroom channel needs */ |
42 | void *ppp; /* opaque to channel */ | 42 | void *ppp; /* opaque to channel */ |
diff --git a/include/linux/rar_register.h b/include/linux/rar_register.h new file mode 100644 index 000000000000..ffa805780f85 --- /dev/null +++ b/include/linux/rar_register.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Intel Corporation. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of version 2 of the GNU General | ||
6 | * Public License as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be | ||
9 | * useful, but WITHOUT ANY WARRANTY; without even the implied | ||
10 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
11 | * PURPOSE. See the GNU General Public License for more details. | ||
12 | * You should have received a copy of the GNU General Public | ||
13 | * License along with this program; if not, write to the Free | ||
14 | * Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
15 | * Boston, MA 02111-1307, USA. | ||
16 | * The full GNU General Public License is included in this | ||
17 | * distribution in the file called COPYING. | ||
18 | */ | ||
19 | |||
20 | |||
21 | #ifndef _RAR_REGISTER_H | ||
22 | #define _RAR_REGISTER_H | ||
23 | |||
24 | #include <linux/types.h> | ||
25 | |||
26 | /* following are used both in drivers as well as user space apps */ | ||
27 | |||
28 | #define RAR_TYPE_VIDEO 0 | ||
29 | #define RAR_TYPE_AUDIO 1 | ||
30 | #define RAR_TYPE_IMAGE 2 | ||
31 | #define RAR_TYPE_DATA 3 | ||
32 | |||
33 | #ifdef __KERNEL__ | ||
34 | |||
35 | struct rar_device; | ||
36 | |||
37 | int register_rar(int num, | ||
38 | int (*callback)(unsigned long data), unsigned long data); | ||
39 | void unregister_rar(int num); | ||
40 | int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); | ||
41 | int rar_lock(int rar_index); | ||
42 | |||
43 | #endif /* __KERNEL__ */ | ||
44 | #endif /* _RAR_REGISTER_H */ | ||
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index fe1872e5b37e..7066acb2c530 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
@@ -110,7 +110,6 @@ struct rb_node | |||
110 | struct rb_root | 110 | struct rb_root |
111 | { | 111 | { |
112 | struct rb_node *rb_node; | 112 | struct rb_node *rb_node; |
113 | void (*augment_cb)(struct rb_node *node); | ||
114 | }; | 113 | }; |
115 | 114 | ||
116 | 115 | ||
@@ -130,9 +129,7 @@ static inline void rb_set_color(struct rb_node *rb, int color) | |||
130 | rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; | 129 | rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; |
131 | } | 130 | } |
132 | 131 | ||
133 | #define RB_ROOT (struct rb_root) { NULL, NULL, } | 132 | #define RB_ROOT (struct rb_root) { NULL, } |
134 | #define RB_AUGMENT_ROOT(x) (struct rb_root) { NULL, x} | ||
135 | |||
136 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) | 133 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) |
137 | 134 | ||
138 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) | 135 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) |
@@ -142,6 +139,14 @@ static inline void rb_set_color(struct rb_node *rb, int color) | |||
142 | extern void rb_insert_color(struct rb_node *, struct rb_root *); | 139 | extern void rb_insert_color(struct rb_node *, struct rb_root *); |
143 | extern void rb_erase(struct rb_node *, struct rb_root *); | 140 | extern void rb_erase(struct rb_node *, struct rb_root *); |
144 | 141 | ||
142 | typedef void (*rb_augment_f)(struct rb_node *node, void *data); | ||
143 | |||
144 | extern void rb_augment_insert(struct rb_node *node, | ||
145 | rb_augment_f func, void *data); | ||
146 | extern struct rb_node *rb_augment_erase_begin(struct rb_node *node); | ||
147 | extern void rb_augment_erase_end(struct rb_node *node, | ||
148 | rb_augment_f func, void *data); | ||
149 | |||
145 | /* Find logical next and previous nodes in a tree */ | 150 | /* Find logical next and previous nodes in a tree */ |
146 | extern struct rb_node *rb_next(const struct rb_node *); | 151 | extern struct rb_node *rb_next(const struct rb_node *); |
147 | extern struct rb_node *rb_prev(const struct rb_node *); | 152 | extern struct rb_node *rb_prev(const struct rb_node *); |
diff --git a/include/linux/regulator/tps6507x.h b/include/linux/regulator/tps6507x.h new file mode 100644 index 000000000000..4892f591bab1 --- /dev/null +++ b/include/linux/regulator/tps6507x.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * tps6507x.h -- Voltage regulation for the Texas Instruments TPS6507X | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments, Inc. | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef REGULATOR_TPS6507X | ||
21 | #define REGULATOR_TPS6507X | ||
22 | |||
23 | /** | ||
24 | * tps6507x_reg_platform_data - platform data for tps6507x | ||
25 | * @defdcdc_default: Defines whether DCDC high or the low register controls | ||
26 | * output voltage by default. Valid for DCDC2 and DCDC3 outputs only. | ||
27 | */ | ||
28 | struct tps6507x_reg_platform_data { | ||
29 | bool defdcdc_default; | ||
30 | }; | ||
31 | |||
32 | #endif | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 3b603f474186..ba394163dea1 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -360,7 +360,7 @@ int is_reiserfs_jr(struct reiserfs_super_block *rs); | |||
360 | /* the spot for the super in versions 3.5 - 3.5.10 (inclusive) */ | 360 | /* the spot for the super in versions 3.5 - 3.5.10 (inclusive) */ |
361 | #define REISERFS_OLD_DISK_OFFSET_IN_BYTES (8 * 1024) | 361 | #define REISERFS_OLD_DISK_OFFSET_IN_BYTES (8 * 1024) |
362 | 362 | ||
363 | // reiserfs internal error code (used by search_by_key adn fix_nodes)) | 363 | /* reiserfs internal error code (used by search_by_key and fix_nodes)) */ |
364 | #define CARRY_ON 0 | 364 | #define CARRY_ON 0 |
365 | #define REPEAT_SEARCH -1 | 365 | #define REPEAT_SEARCH -1 |
366 | #define IO_ERROR -2 | 366 | #define IO_ERROR -2 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index f118809c953f..0478888c6899 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -139,7 +139,7 @@ extern int nr_processes(void); | |||
139 | extern unsigned long nr_running(void); | 139 | extern unsigned long nr_running(void); |
140 | extern unsigned long nr_uninterruptible(void); | 140 | extern unsigned long nr_uninterruptible(void); |
141 | extern unsigned long nr_iowait(void); | 141 | extern unsigned long nr_iowait(void); |
142 | extern unsigned long nr_iowait_cpu(void); | 142 | extern unsigned long nr_iowait_cpu(int cpu); |
143 | extern unsigned long this_cpu_load(void); | 143 | extern unsigned long this_cpu_load(void); |
144 | 144 | ||
145 | 145 | ||
@@ -214,6 +214,7 @@ extern char ___assert_task_state[1 - 2*!!( | |||
214 | 214 | ||
215 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) | 215 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) |
216 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) | 216 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) |
217 | #define task_is_dead(task) ((task)->exit_state != 0) | ||
217 | #define task_is_stopped_or_traced(task) \ | 218 | #define task_is_stopped_or_traced(task) \ |
218 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) | 219 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) |
219 | #define task_contributes_to_load(task) \ | 220 | #define task_contributes_to_load(task) \ |
diff --git a/include/linux/security.h b/include/linux/security.h index 0c8819170463..723a93df756a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -470,8 +470,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
470 | * @path_truncate: | 470 | * @path_truncate: |
471 | * Check permission before truncating a file. | 471 | * Check permission before truncating a file. |
472 | * @path contains the path structure for the file. | 472 | * @path contains the path structure for the file. |
473 | * @length is the new length of the file. | ||
474 | * @time_attrs is the flags passed to do_truncate(). | ||
475 | * Return 0 if permission is granted. | 473 | * Return 0 if permission is granted. |
476 | * @inode_getattr: | 474 | * @inode_getattr: |
477 | * Check permission before obtaining file attributes. | 475 | * Check permission before obtaining file attributes. |
@@ -1412,8 +1410,7 @@ struct security_operations { | |||
1412 | int (*path_rmdir) (struct path *dir, struct dentry *dentry); | 1410 | int (*path_rmdir) (struct path *dir, struct dentry *dentry); |
1413 | int (*path_mknod) (struct path *dir, struct dentry *dentry, int mode, | 1411 | int (*path_mknod) (struct path *dir, struct dentry *dentry, int mode, |
1414 | unsigned int dev); | 1412 | unsigned int dev); |
1415 | int (*path_truncate) (struct path *path, loff_t length, | 1413 | int (*path_truncate) (struct path *path); |
1416 | unsigned int time_attrs); | ||
1417 | int (*path_symlink) (struct path *dir, struct dentry *dentry, | 1414 | int (*path_symlink) (struct path *dir, struct dentry *dentry, |
1418 | const char *old_name); | 1415 | const char *old_name); |
1419 | int (*path_link) (struct dentry *old_dentry, struct path *new_dir, | 1416 | int (*path_link) (struct dentry *old_dentry, struct path *new_dir, |
@@ -2806,8 +2803,7 @@ int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode); | |||
2806 | int security_path_rmdir(struct path *dir, struct dentry *dentry); | 2803 | int security_path_rmdir(struct path *dir, struct dentry *dentry); |
2807 | int security_path_mknod(struct path *dir, struct dentry *dentry, int mode, | 2804 | int security_path_mknod(struct path *dir, struct dentry *dentry, int mode, |
2808 | unsigned int dev); | 2805 | unsigned int dev); |
2809 | int security_path_truncate(struct path *path, loff_t length, | 2806 | int security_path_truncate(struct path *path); |
2810 | unsigned int time_attrs); | ||
2811 | int security_path_symlink(struct path *dir, struct dentry *dentry, | 2807 | int security_path_symlink(struct path *dir, struct dentry *dentry, |
2812 | const char *old_name); | 2808 | const char *old_name); |
2813 | int security_path_link(struct dentry *old_dentry, struct path *new_dir, | 2809 | int security_path_link(struct dentry *old_dentry, struct path *new_dir, |
@@ -2841,8 +2837,7 @@ static inline int security_path_mknod(struct path *dir, struct dentry *dentry, | |||
2841 | return 0; | 2837 | return 0; |
2842 | } | 2838 | } |
2843 | 2839 | ||
2844 | static inline int security_path_truncate(struct path *path, loff_t length, | 2840 | static inline int security_path_truncate(struct path *path) |
2845 | unsigned int time_attrs) | ||
2846 | { | 2841 | { |
2847 | return 0; | 2842 | return 0; |
2848 | } | 2843 | } |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index f5364a1de68b..baed2122c5a6 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -2,9 +2,7 @@ | |||
2 | #define __LINUX_SERIAL_SCI_H | 2 | #define __LINUX_SERIAL_SCI_H |
3 | 3 | ||
4 | #include <linux/serial_core.h> | 4 | #include <linux/serial_core.h> |
5 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | 5 | #include <linux/sh_dma.h> |
6 | #include <asm/dmaengine.h> | ||
7 | #endif | ||
8 | 6 | ||
9 | /* | 7 | /* |
10 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) | 8 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index d20d9e7a9bbd..77eb60d2b496 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1379,6 +1379,11 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
1379 | return skb_network_header(skb) - skb->data; | 1379 | return skb_network_header(skb) - skb->data; |
1380 | } | 1380 | } |
1381 | 1381 | ||
1382 | static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) | ||
1383 | { | ||
1384 | return pskb_may_pull(skb, skb_network_offset(skb) + len); | ||
1385 | } | ||
1386 | |||
1382 | /* | 1387 | /* |
1383 | * CPUs often take a performance hit when accessing unaligned memory | 1388 | * CPUs often take a performance hit when accessing unaligned memory |
1384 | * locations. The actual performance hit varies, it can be small if the | 1389 | * locations. The actual performance hit varies, it can be small if the |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index b4ae570d3c98..92bd0839d5b4 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -48,11 +48,12 @@ struct ads7846_platform_data { | |||
48 | * state if get_pendown_state == NULL | 48 | * state if get_pendown_state == NULL |
49 | */ | 49 | */ |
50 | int (*get_pendown_state)(void); | 50 | int (*get_pendown_state)(void); |
51 | int (*filter_init) (struct ads7846_platform_data *pdata, | 51 | int (*filter_init) (const struct ads7846_platform_data *pdata, |
52 | void **filter_data); | 52 | void **filter_data); |
53 | int (*filter) (void *filter_data, int data_idx, int *val); | 53 | int (*filter) (void *filter_data, int data_idx, int *val); |
54 | void (*filter_cleanup)(void *filter_data); | 54 | void (*filter_cleanup)(void *filter_data); |
55 | void (*wait_for_sync)(void); | 55 | void (*wait_for_sync)(void); |
56 | bool wakeup; | 56 | bool wakeup; |
57 | unsigned long irq_flags; | ||
57 | }; | 58 | }; |
58 | 59 | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 89fac6a3f78b..f8854655860e 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -60,7 +60,7 @@ | |||
60 | /* | 60 | /* |
61 | * Must define these before including other files, inline functions need them | 61 | * Must define these before including other files, inline functions need them |
62 | */ | 62 | */ |
63 | #define LOCK_SECTION_NAME ".text.lock."KBUILD_BASENAME | 63 | #define LOCK_SECTION_NAME ".text..lock."KBUILD_BASENAME |
64 | 64 | ||
65 | #define LOCK_SECTION_START(extra) \ | 65 | #define LOCK_SECTION_START(extra) \ |
66 | ".subsection 1\n\t" \ | 66 | ".subsection 1\n\t" \ |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5e781d824e6d..4af270ec2204 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -61,14 +61,15 @@ typedef int __bitwise suspend_state_t; | |||
61 | * before device drivers' late suspend callbacks are executed. It returns | 61 | * before device drivers' late suspend callbacks are executed. It returns |
62 | * 0 on success or a negative error code otherwise, in which case the | 62 | * 0 on success or a negative error code otherwise, in which case the |
63 | * system cannot enter the desired sleep state (@prepare_late(), @enter(), | 63 | * system cannot enter the desired sleep state (@prepare_late(), @enter(), |
64 | * @wake(), and @finish() will not be called in that case). | 64 | * and @wake() will not be called in that case). |
65 | * | 65 | * |
66 | * @prepare_late: Finish preparing the platform for entering the system sleep | 66 | * @prepare_late: Finish preparing the platform for entering the system sleep |
67 | * state indicated by @begin(). | 67 | * state indicated by @begin(). |
68 | * @prepare_late is called before disabling nonboot CPUs and after | 68 | * @prepare_late is called before disabling nonboot CPUs and after |
69 | * device drivers' late suspend callbacks have been executed. It returns | 69 | * device drivers' late suspend callbacks have been executed. It returns |
70 | * 0 on success or a negative error code otherwise, in which case the | 70 | * 0 on success or a negative error code otherwise, in which case the |
71 | * system cannot enter the desired sleep state (@enter() and @wake()). | 71 | * system cannot enter the desired sleep state (@enter() will not be |
72 | * executed). | ||
72 | * | 73 | * |
73 | * @enter: Enter the system sleep state indicated by @begin() or represented by | 74 | * @enter: Enter the system sleep state indicated by @begin() or represented by |
74 | * the argument if @begin() is not implemented. | 75 | * the argument if @begin() is not implemented. |
@@ -81,14 +82,15 @@ typedef int __bitwise suspend_state_t; | |||
81 | * resume callbacks are executed. | 82 | * resume callbacks are executed. |
82 | * This callback is optional, but should be implemented by the platforms | 83 | * This callback is optional, but should be implemented by the platforms |
83 | * that implement @prepare_late(). If implemented, it is always called | 84 | * that implement @prepare_late(). If implemented, it is always called |
84 | * after @enter(), even if @enter() fails. | 85 | * after @prepare_late and @enter(), even if one of them fails. |
85 | * | 86 | * |
86 | * @finish: Finish wake-up of the platform. | 87 | * @finish: Finish wake-up of the platform. |
87 | * @finish is called right prior to calling device drivers' regular suspend | 88 | * @finish is called right prior to calling device drivers' regular suspend |
88 | * callbacks. | 89 | * callbacks. |
89 | * This callback is optional, but should be implemented by the platforms | 90 | * This callback is optional, but should be implemented by the platforms |
90 | * that implement @prepare(). If implemented, it is always called after | 91 | * that implement @prepare(). If implemented, it is always called after |
91 | * @enter() and @wake(), if implemented, even if any of them fails. | 92 | * @enter() and @wake(), even if any of them fails. It is executed after |
93 | * a failing @prepare. | ||
92 | * | 94 | * |
93 | * @end: Called by the PM core right after resuming devices, to indicate to | 95 | * @end: Called by the PM core right after resuming devices, to indicate to |
94 | * the platform that the system has returned to the working state or | 96 | * the platform that the system has returned to the working state or |
@@ -256,22 +258,22 @@ static inline int hibernate(void) { return -ENOSYS; } | |||
256 | static inline bool system_entering_hibernation(void) { return false; } | 258 | static inline bool system_entering_hibernation(void) { return false; } |
257 | #endif /* CONFIG_HIBERNATION */ | 259 | #endif /* CONFIG_HIBERNATION */ |
258 | 260 | ||
259 | #ifdef CONFIG_HIBERNATION_NVS | 261 | #ifdef CONFIG_SUSPEND_NVS |
260 | extern int hibernate_nvs_register(unsigned long start, unsigned long size); | 262 | extern int suspend_nvs_register(unsigned long start, unsigned long size); |
261 | extern int hibernate_nvs_alloc(void); | 263 | extern int suspend_nvs_alloc(void); |
262 | extern void hibernate_nvs_free(void); | 264 | extern void suspend_nvs_free(void); |
263 | extern void hibernate_nvs_save(void); | 265 | extern void suspend_nvs_save(void); |
264 | extern void hibernate_nvs_restore(void); | 266 | extern void suspend_nvs_restore(void); |
265 | #else /* CONFIG_HIBERNATION_NVS */ | 267 | #else /* CONFIG_SUSPEND_NVS */ |
266 | static inline int hibernate_nvs_register(unsigned long a, unsigned long b) | 268 | static inline int suspend_nvs_register(unsigned long a, unsigned long b) |
267 | { | 269 | { |
268 | return 0; | 270 | return 0; |
269 | } | 271 | } |
270 | static inline int hibernate_nvs_alloc(void) { return 0; } | 272 | static inline int suspend_nvs_alloc(void) { return 0; } |
271 | static inline void hibernate_nvs_free(void) {} | 273 | static inline void suspend_nvs_free(void) {} |
272 | static inline void hibernate_nvs_save(void) {} | 274 | static inline void suspend_nvs_save(void) {} |
273 | static inline void hibernate_nvs_restore(void) {} | 275 | static inline void suspend_nvs_restore(void) {} |
274 | #endif /* CONFIG_HIBERNATION_NVS */ | 276 | #endif /* CONFIG_SUSPEND_NVS */ |
275 | 277 | ||
276 | #ifdef CONFIG_PM_SLEEP | 278 | #ifdef CONFIG_PM_SLEEP |
277 | void save_processor_state(void); | 279 | void save_processor_state(void); |
@@ -286,6 +288,13 @@ extern int unregister_pm_notifier(struct notifier_block *nb); | |||
286 | { .notifier_call = fn, .priority = pri }; \ | 288 | { .notifier_call = fn, .priority = pri }; \ |
287 | register_pm_notifier(&fn##_nb); \ | 289 | register_pm_notifier(&fn##_nb); \ |
288 | } | 290 | } |
291 | |||
292 | /* drivers/base/power/wakeup.c */ | ||
293 | extern bool events_check_enabled; | ||
294 | |||
295 | extern bool pm_check_wakeup_events(void); | ||
296 | extern bool pm_get_wakeup_count(unsigned long *count); | ||
297 | extern bool pm_save_wakeup_count(unsigned long count); | ||
289 | #else /* !CONFIG_PM_SLEEP */ | 298 | #else /* !CONFIG_PM_SLEEP */ |
290 | 299 | ||
291 | static inline int register_pm_notifier(struct notifier_block *nb) | 300 | static inline int register_pm_notifier(struct notifier_block *nb) |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 81a4e213c6cf..8c0e349f4a6c 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -23,6 +23,29 @@ extern int swiotlb_force; | |||
23 | #define IO_TLB_SHIFT 11 | 23 | #define IO_TLB_SHIFT 11 |
24 | 24 | ||
25 | extern void swiotlb_init(int verbose); | 25 | extern void swiotlb_init(int verbose); |
26 | extern void swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); | ||
27 | |||
28 | /* | ||
29 | * Enumeration for sync targets | ||
30 | */ | ||
31 | enum dma_sync_target { | ||
32 | SYNC_FOR_CPU = 0, | ||
33 | SYNC_FOR_DEVICE = 1, | ||
34 | }; | ||
35 | extern void *swiotlb_tbl_map_single(struct device *hwdev, dma_addr_t tbl_dma_addr, | ||
36 | phys_addr_t phys, size_t size, | ||
37 | enum dma_data_direction dir); | ||
38 | |||
39 | extern void swiotlb_tbl_unmap_single(struct device *hwdev, char *dma_addr, | ||
40 | size_t size, enum dma_data_direction dir); | ||
41 | |||
42 | extern void swiotlb_tbl_sync_single(struct device *hwdev, char *dma_addr, | ||
43 | size_t size, enum dma_data_direction dir, | ||
44 | enum dma_sync_target target); | ||
45 | |||
46 | /* Accessory functions. */ | ||
47 | extern void swiotlb_bounce(phys_addr_t phys, char *dma_addr, size_t size, | ||
48 | enum dma_data_direction dir); | ||
26 | 49 | ||
27 | extern void | 50 | extern void |
28 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, | 51 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
@@ -42,11 +65,11 @@ extern void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, | |||
42 | 65 | ||
43 | extern int | 66 | extern int |
44 | swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, | 67 | swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, |
45 | int direction); | 68 | enum dma_data_direction dir); |
46 | 69 | ||
47 | extern void | 70 | extern void |
48 | swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, | 71 | swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, |
49 | int direction); | 72 | enum dma_data_direction dir); |
50 | 73 | ||
51 | extern int | 74 | extern int |
52 | swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, | 75 | swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a1a86a53bc73..13ebb5413a79 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -124,7 +124,8 @@ extern struct trace_event_functions enter_syscall_print_funcs; | |||
124 | extern struct trace_event_functions exit_syscall_print_funcs; | 124 | extern struct trace_event_functions exit_syscall_print_funcs; |
125 | 125 | ||
126 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 126 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
127 | static struct syscall_metadata __syscall_meta_##sname; \ | 127 | static struct syscall_metadata \ |
128 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
128 | static struct ftrace_event_call \ | 129 | static struct ftrace_event_call \ |
129 | __attribute__((__aligned__(4))) event_enter_##sname; \ | 130 | __attribute__((__aligned__(4))) event_enter_##sname; \ |
130 | static struct ftrace_event_call __used \ | 131 | static struct ftrace_event_call __used \ |
@@ -138,7 +139,8 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
138 | } | 139 | } |
139 | 140 | ||
140 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
141 | static struct syscall_metadata __syscall_meta_##sname; \ | 142 | static struct syscall_metadata \ |
143 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
142 | static struct ftrace_event_call \ | 144 | static struct ftrace_event_call \ |
143 | __attribute__((__aligned__(4))) event_exit_##sname; \ | 145 | __attribute__((__aligned__(4))) event_exit_##sname; \ |
144 | static struct ftrace_event_call __used \ | 146 | static struct ftrace_event_call __used \ |
@@ -289,7 +291,7 @@ asmlinkage long sys_capget(cap_user_header_t header, | |||
289 | cap_user_data_t dataptr); | 291 | cap_user_data_t dataptr); |
290 | asmlinkage long sys_capset(cap_user_header_t header, | 292 | asmlinkage long sys_capset(cap_user_header_t header, |
291 | const cap_user_data_t data); | 293 | const cap_user_data_t data); |
292 | asmlinkage long sys_personality(u_long personality); | 294 | asmlinkage long sys_personality(unsigned int personality); |
293 | 295 | ||
294 | asmlinkage long sys_sigpending(old_sigset_t __user *set); | 296 | asmlinkage long sys_sigpending(old_sigset_t __user *set); |
295 | asmlinkage long sys_sigprocmask(int how, old_sigset_t __user *set, | 297 | asmlinkage long sys_sigprocmask(int how, old_sigset_t __user *set, |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 4496322e28dd..609e8ca5f534 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -45,6 +45,7 @@ struct sysrq_key_op { | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | void handle_sysrq(int key, struct tty_struct *tty); | 47 | void handle_sysrq(int key, struct tty_struct *tty); |
48 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | ||
48 | int register_sysrq_key(int key, struct sysrq_key_op *op); | 49 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
49 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); | 50 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
50 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 51 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
diff --git a/include/linux/timer.h b/include/linux/timer.h index ea965b857a50..38cf093ef62c 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -100,6 +100,13 @@ void init_timer_deferrable_key(struct timer_list *timer, | |||
100 | setup_timer_on_stack_key((timer), #timer, &__key, \ | 100 | setup_timer_on_stack_key((timer), #timer, &__key, \ |
101 | (fn), (data)); \ | 101 | (fn), (data)); \ |
102 | } while (0) | 102 | } while (0) |
103 | #define setup_deferrable_timer_on_stack(timer, fn, data) \ | ||
104 | do { \ | ||
105 | static struct lock_class_key __key; \ | ||
106 | setup_deferrable_timer_on_stack_key((timer), #timer, \ | ||
107 | &__key, (fn), \ | ||
108 | (data)); \ | ||
109 | } while (0) | ||
103 | #else | 110 | #else |
104 | #define init_timer(timer)\ | 111 | #define init_timer(timer)\ |
105 | init_timer_key((timer), NULL, NULL) | 112 | init_timer_key((timer), NULL, NULL) |
@@ -111,6 +118,8 @@ void init_timer_deferrable_key(struct timer_list *timer, | |||
111 | setup_timer_key((timer), NULL, NULL, (fn), (data)) | 118 | setup_timer_key((timer), NULL, NULL, (fn), (data)) |
112 | #define setup_timer_on_stack(timer, fn, data)\ | 119 | #define setup_timer_on_stack(timer, fn, data)\ |
113 | setup_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) | 120 | setup_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) |
121 | #define setup_deferrable_timer_on_stack(timer, fn, data)\ | ||
122 | setup_deferrable_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) | ||
114 | #endif | 123 | #endif |
115 | 124 | ||
116 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS | 125 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS |
@@ -150,6 +159,12 @@ static inline void setup_timer_on_stack_key(struct timer_list *timer, | |||
150 | init_timer_on_stack_key(timer, name, key); | 159 | init_timer_on_stack_key(timer, name, key); |
151 | } | 160 | } |
152 | 161 | ||
162 | extern void setup_deferrable_timer_on_stack_key(struct timer_list *timer, | ||
163 | const char *name, | ||
164 | struct lock_class_key *key, | ||
165 | void (*function)(unsigned long), | ||
166 | unsigned long data); | ||
167 | |||
153 | /** | 168 | /** |
154 | * timer_pending - is a timer pending? | 169 | * timer_pending - is a timer pending? |
155 | * @timer: the timer in question | 170 | * @timer: the timer in question |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 9a59d1f98cd4..103d1b61aacb 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -14,6 +14,7 @@ | |||
14 | * See the file COPYING for more details. | 14 | * See the file COPYING for more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/errno.h> | ||
17 | #include <linux/types.h> | 18 | #include <linux/types.h> |
18 | #include <linux/rcupdate.h> | 19 | #include <linux/rcupdate.h> |
19 | 20 | ||
diff --git a/include/linux/types.h b/include/linux/types.h index 23d237a075e2..331d8baabcf2 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -8,7 +8,10 @@ | |||
8 | 8 | ||
9 | #define DECLARE_BITMAP(name,bits) \ | 9 | #define DECLARE_BITMAP(name,bits) \ |
10 | unsigned long name[BITS_TO_LONGS(bits)] | 10 | unsigned long name[BITS_TO_LONGS(bits)] |
11 | 11 | #else | |
12 | #ifndef __EXPORTED_HEADERS__ | ||
13 | #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" | ||
14 | #endif /* __EXPORTED_HEADERS__ */ | ||
12 | #endif | 15 | #endif |
13 | 16 | ||
14 | #include <linux/posix_types.h> | 17 | #include <linux/posix_types.h> |
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h index 92f1d99f0f17..383b94ba8c20 100644 --- a/include/linux/usb/audio-v2.h +++ b/include/linux/usb/audio-v2.h | |||
@@ -18,6 +18,16 @@ | |||
18 | /* v1.0 and v2.0 of this standard have many things in common. For the rest | 18 | /* v1.0 and v2.0 of this standard have many things in common. For the rest |
19 | * of the definitions, please refer to audio.h */ | 19 | * of the definitions, please refer to audio.h */ |
20 | 20 | ||
21 | static inline bool uac2_control_is_readable(u32 bmControls, u8 control) | ||
22 | { | ||
23 | return (bmControls >> (control * 2)) & 0x1; | ||
24 | } | ||
25 | |||
26 | static inline bool uac2_control_is_writeable(u32 bmControls, u8 control) | ||
27 | { | ||
28 | return (bmControls >> (control * 2)) & 0x2; | ||
29 | } | ||
30 | |||
21 | /* 4.7.2.1 Clock Source Descriptor */ | 31 | /* 4.7.2.1 Clock Source Descriptor */ |
22 | 32 | ||
23 | struct uac_clock_source_descriptor { | 33 | struct uac_clock_source_descriptor { |
@@ -31,6 +41,13 @@ struct uac_clock_source_descriptor { | |||
31 | __u8 iClockSource; | 41 | __u8 iClockSource; |
32 | } __attribute__((packed)); | 42 | } __attribute__((packed)); |
33 | 43 | ||
44 | /* bmAttribute fields */ | ||
45 | #define UAC_CLOCK_SOURCE_TYPE_EXT 0x0 | ||
46 | #define UAC_CLOCK_SOURCE_TYPE_INT_FIXED 0x1 | ||
47 | #define UAC_CLOCK_SOURCE_TYPE_INT_VAR 0x2 | ||
48 | #define UAC_CLOCK_SOURCE_TYPE_INT_PROG 0x3 | ||
49 | #define UAC_CLOCK_SOURCE_SYNCED_TO_SOF (1 << 2) | ||
50 | |||
34 | /* 4.7.2.2 Clock Source Descriptor */ | 51 | /* 4.7.2.2 Clock Source Descriptor */ |
35 | 52 | ||
36 | struct uac_clock_selector_descriptor { | 53 | struct uac_clock_selector_descriptor { |
@@ -39,8 +56,20 @@ struct uac_clock_selector_descriptor { | |||
39 | __u8 bDescriptorSubtype; | 56 | __u8 bDescriptorSubtype; |
40 | __u8 bClockID; | 57 | __u8 bClockID; |
41 | __u8 bNrInPins; | 58 | __u8 bNrInPins; |
42 | __u8 bmControls; | ||
43 | __u8 baCSourceID[]; | 59 | __u8 baCSourceID[]; |
60 | /* bmControls, bAssocTerminal and iClockSource omitted */ | ||
61 | } __attribute__((packed)); | ||
62 | |||
63 | /* 4.7.2.3 Clock Multiplier Descriptor */ | ||
64 | |||
65 | struct uac_clock_multiplier_descriptor { | ||
66 | __u8 bLength; | ||
67 | __u8 bDescriptorType; | ||
68 | __u8 bDescriptorSubtype; | ||
69 | __u8 bClockID; | ||
70 | __u8 bCSourceID; | ||
71 | __u8 bmControls; | ||
72 | __u8 iClockMultiplier; | ||
44 | } __attribute__((packed)); | 73 | } __attribute__((packed)); |
45 | 74 | ||
46 | /* 4.7.2.4 Input terminal descriptor */ | 75 | /* 4.7.2.4 Input terminal descriptor */ |
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index 5d646c388752..c51200c715e5 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
@@ -47,6 +47,15 @@ | |||
47 | #define UAC_FORMAT_TYPE 0x02 | 47 | #define UAC_FORMAT_TYPE 0x02 |
48 | #define UAC_FORMAT_SPECIFIC 0x03 | 48 | #define UAC_FORMAT_SPECIFIC 0x03 |
49 | 49 | ||
50 | /* A.7 Processing Unit Process Types */ | ||
51 | #define UAC_PROCESS_UNDEFINED 0x00 | ||
52 | #define UAC_PROCESS_UP_DOWNMIX 0x01 | ||
53 | #define UAC_PROCESS_DOLBY_PROLOGIC 0x02 | ||
54 | #define UAC_PROCESS_STEREO_EXTENDER 0x03 | ||
55 | #define UAC_PROCESS_REVERB 0x04 | ||
56 | #define UAC_PROCESS_CHORUS 0x05 | ||
57 | #define UAC_PROCESS_DYN_RANGE_COMP 0x06 | ||
58 | |||
50 | /* A.8 Audio Class-Specific Endpoint Descriptor Subtypes */ | 59 | /* A.8 Audio Class-Specific Endpoint Descriptor Subtypes */ |
51 | #define UAC_EP_GENERAL 0x01 | 60 | #define UAC_EP_GENERAL 0x01 |
52 | 61 | ||
@@ -73,6 +82,60 @@ | |||
73 | 82 | ||
74 | #define UAC_GET_STAT 0xff | 83 | #define UAC_GET_STAT 0xff |
75 | 84 | ||
85 | /* A.10 Control Selector Codes */ | ||
86 | |||
87 | /* A.10.1 Terminal Control Selectors */ | ||
88 | #define UAC_TERM_COPY_PROTECT 0x01 | ||
89 | |||
90 | /* A.10.2 Feature Unit Control Selectors */ | ||
91 | #define UAC_FU_MUTE 0x01 | ||
92 | #define UAC_FU_VOLUME 0x02 | ||
93 | #define UAC_FU_BASS 0x03 | ||
94 | #define UAC_FU_MID 0x04 | ||
95 | #define UAC_FU_TREBLE 0x05 | ||
96 | #define UAC_FU_GRAPHIC_EQUALIZER 0x06 | ||
97 | #define UAC_FU_AUTOMATIC_GAIN 0x07 | ||
98 | #define UAC_FU_DELAY 0x08 | ||
99 | #define UAC_FU_BASS_BOOST 0x09 | ||
100 | #define UAC_FU_LOUDNESS 0x0a | ||
101 | |||
102 | #define UAC_CONTROL_BIT(CS) (1 << ((CS) - 1)) | ||
103 | |||
104 | /* A.10.3.1 Up/Down-mix Processing Unit Controls Selectors */ | ||
105 | #define UAC_UD_ENABLE 0x01 | ||
106 | #define UAC_UD_MODE_SELECT 0x02 | ||
107 | |||
108 | /* A.10.3.2 Dolby Prologic (tm) Processing Unit Controls Selectors */ | ||
109 | #define UAC_DP_ENABLE 0x01 | ||
110 | #define UAC_DP_MODE_SELECT 0x02 | ||
111 | |||
112 | /* A.10.3.3 3D Stereo Extender Processing Unit Control Selectors */ | ||
113 | #define UAC_3D_ENABLE 0x01 | ||
114 | #define UAC_3D_SPACE 0x02 | ||
115 | |||
116 | /* A.10.3.4 Reverberation Processing Unit Control Selectors */ | ||
117 | #define UAC_REVERB_ENABLE 0x01 | ||
118 | #define UAC_REVERB_LEVEL 0x02 | ||
119 | #define UAC_REVERB_TIME 0x03 | ||
120 | #define UAC_REVERB_FEEDBACK 0x04 | ||
121 | |||
122 | /* A.10.3.5 Chorus Processing Unit Control Selectors */ | ||
123 | #define UAC_CHORUS_ENABLE 0x01 | ||
124 | #define UAC_CHORUS_LEVEL 0x02 | ||
125 | #define UAC_CHORUS_RATE 0x03 | ||
126 | #define UAC_CHORUS_DEPTH 0x04 | ||
127 | |||
128 | /* A.10.3.6 Dynamic Range Compressor Unit Control Selectors */ | ||
129 | #define UAC_DCR_ENABLE 0x01 | ||
130 | #define UAC_DCR_RATE 0x02 | ||
131 | #define UAC_DCR_MAXAMPL 0x03 | ||
132 | #define UAC_DCR_THRESHOLD 0x04 | ||
133 | #define UAC_DCR_ATTACK_TIME 0x05 | ||
134 | #define UAC_DCR_RELEASE_TIME 0x06 | ||
135 | |||
136 | /* A.10.4 Extension Unit Control Selectors */ | ||
137 | #define UAC_XU_ENABLE 0x01 | ||
138 | |||
76 | /* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */ | 139 | /* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */ |
77 | #define UAC_MS_HEADER 0x01 | 140 | #define UAC_MS_HEADER 0x01 |
78 | #define UAC_MIDI_IN_JACK 0x02 | 141 | #define UAC_MIDI_IN_JACK 0x02 |
@@ -244,7 +307,7 @@ struct uac_selector_unit_descriptor { | |||
244 | static inline __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc) | 307 | static inline __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc) |
245 | { | 308 | { |
246 | __u8 *raw = (__u8 *) desc; | 309 | __u8 *raw = (__u8 *) desc; |
247 | return raw[9 + desc->bLength - 1]; | 310 | return raw[desc->bLength - 1]; |
248 | } | 311 | } |
249 | 312 | ||
250 | /* 4.3.2.5 Feature Unit Descriptor */ | 313 | /* 4.3.2.5 Feature Unit Descriptor */ |
@@ -463,31 +526,6 @@ struct uac_iso_endpoint_descriptor { | |||
463 | #define UAC_EP_CS_ATTR_PITCH_CONTROL 0x02 | 526 | #define UAC_EP_CS_ATTR_PITCH_CONTROL 0x02 |
464 | #define UAC_EP_CS_ATTR_FILL_MAX 0x80 | 527 | #define UAC_EP_CS_ATTR_FILL_MAX 0x80 |
465 | 528 | ||
466 | /* A.10.2 Feature Unit Control Selectors */ | ||
467 | |||
468 | #define UAC_FU_CONTROL_UNDEFINED 0x00 | ||
469 | #define UAC_MUTE_CONTROL 0x01 | ||
470 | #define UAC_VOLUME_CONTROL 0x02 | ||
471 | #define UAC_BASS_CONTROL 0x03 | ||
472 | #define UAC_MID_CONTROL 0x04 | ||
473 | #define UAC_TREBLE_CONTROL 0x05 | ||
474 | #define UAC_GRAPHIC_EQUALIZER_CONTROL 0x06 | ||
475 | #define UAC_AUTOMATIC_GAIN_CONTROL 0x07 | ||
476 | #define UAC_DELAY_CONTROL 0x08 | ||
477 | #define UAC_BASS_BOOST_CONTROL 0x09 | ||
478 | #define UAC_LOUDNESS_CONTROL 0x0a | ||
479 | |||
480 | #define UAC_FU_MUTE (1 << (UAC_MUTE_CONTROL - 1)) | ||
481 | #define UAC_FU_VOLUME (1 << (UAC_VOLUME_CONTROL - 1)) | ||
482 | #define UAC_FU_BASS (1 << (UAC_BASS_CONTROL - 1)) | ||
483 | #define UAC_FU_MID (1 << (UAC_MID_CONTROL - 1)) | ||
484 | #define UAC_FU_TREBLE (1 << (UAC_TREBLE_CONTROL - 1)) | ||
485 | #define UAC_FU_GRAPHIC_EQ (1 << (UAC_GRAPHIC_EQUALIZER_CONTROL - 1)) | ||
486 | #define UAC_FU_AUTO_GAIN (1 << (UAC_AUTOMATIC_GAIN_CONTROL - 1)) | ||
487 | #define UAC_FU_DELAY (1 << (UAC_DELAY_CONTROL - 1)) | ||
488 | #define UAC_FU_BASS_BOOST (1 << (UAC_BASS_BOOST_CONTROL - 1)) | ||
489 | #define UAC_FU_LOUDNESS (1 << (UAC_LOUDNESS_CONTROL - 1)) | ||
490 | |||
491 | /* status word format (3.7.1.1) */ | 529 | /* status word format (3.7.1.1) */ |
492 | 530 | ||
493 | #define UAC1_STATUS_TYPE_ORIG_MASK 0x0f | 531 | #define UAC1_STATUS_TYPE_ORIG_MASK 0x0f |
diff --git a/include/linux/usb/video.h b/include/linux/usb/video.h index be436d9ee479..3b3b95e01f71 100644 --- a/include/linux/usb/video.h +++ b/include/linux/usb/video.h | |||
@@ -160,5 +160,409 @@ | |||
160 | #define UVC_STATUS_TYPE_CONTROL 1 | 160 | #define UVC_STATUS_TYPE_CONTROL 1 |
161 | #define UVC_STATUS_TYPE_STREAMING 2 | 161 | #define UVC_STATUS_TYPE_STREAMING 2 |
162 | 162 | ||
163 | /* 2.4.3.3. Payload Header Information */ | ||
164 | #define UVC_STREAM_EOH (1 << 7) | ||
165 | #define UVC_STREAM_ERR (1 << 6) | ||
166 | #define UVC_STREAM_STI (1 << 5) | ||
167 | #define UVC_STREAM_RES (1 << 4) | ||
168 | #define UVC_STREAM_SCR (1 << 3) | ||
169 | #define UVC_STREAM_PTS (1 << 2) | ||
170 | #define UVC_STREAM_EOF (1 << 1) | ||
171 | #define UVC_STREAM_FID (1 << 0) | ||
172 | |||
173 | /* 4.1.2. Control Capabilities */ | ||
174 | #define UVC_CONTROL_CAP_GET (1 << 0) | ||
175 | #define UVC_CONTROL_CAP_SET (1 << 1) | ||
176 | #define UVC_CONTROL_CAP_DISABLED (1 << 2) | ||
177 | #define UVC_CONTROL_CAP_AUTOUPDATE (1 << 3) | ||
178 | #define UVC_CONTROL_CAP_ASYNCHRONOUS (1 << 4) | ||
179 | |||
180 | /* ------------------------------------------------------------------------ | ||
181 | * UVC structures | ||
182 | */ | ||
183 | |||
184 | /* All UVC descriptors have these 3 fields at the beginning */ | ||
185 | struct uvc_descriptor_header { | ||
186 | __u8 bLength; | ||
187 | __u8 bDescriptorType; | ||
188 | __u8 bDescriptorSubType; | ||
189 | } __attribute__((packed)); | ||
190 | |||
191 | /* 3.7.2. Video Control Interface Header Descriptor */ | ||
192 | struct uvc_header_descriptor { | ||
193 | __u8 bLength; | ||
194 | __u8 bDescriptorType; | ||
195 | __u8 bDescriptorSubType; | ||
196 | __u16 bcdUVC; | ||
197 | __u16 wTotalLength; | ||
198 | __u32 dwClockFrequency; | ||
199 | __u8 bInCollection; | ||
200 | __u8 baInterfaceNr[]; | ||
201 | } __attribute__((__packed__)); | ||
202 | |||
203 | #define UVC_DT_HEADER_SIZE(n) (12+(n)) | ||
204 | |||
205 | #define UVC_HEADER_DESCRIPTOR(n) \ | ||
206 | uvc_header_descriptor_##n | ||
207 | |||
208 | #define DECLARE_UVC_HEADER_DESCRIPTOR(n) \ | ||
209 | struct UVC_HEADER_DESCRIPTOR(n) { \ | ||
210 | __u8 bLength; \ | ||
211 | __u8 bDescriptorType; \ | ||
212 | __u8 bDescriptorSubType; \ | ||
213 | __u16 bcdUVC; \ | ||
214 | __u16 wTotalLength; \ | ||
215 | __u32 dwClockFrequency; \ | ||
216 | __u8 bInCollection; \ | ||
217 | __u8 baInterfaceNr[n]; \ | ||
218 | } __attribute__ ((packed)) | ||
219 | |||
220 | /* 3.7.2.1. Input Terminal Descriptor */ | ||
221 | struct uvc_input_terminal_descriptor { | ||
222 | __u8 bLength; | ||
223 | __u8 bDescriptorType; | ||
224 | __u8 bDescriptorSubType; | ||
225 | __u8 bTerminalID; | ||
226 | __u16 wTerminalType; | ||
227 | __u8 bAssocTerminal; | ||
228 | __u8 iTerminal; | ||
229 | } __attribute__((__packed__)); | ||
230 | |||
231 | #define UVC_DT_INPUT_TERMINAL_SIZE 8 | ||
232 | |||
233 | /* 3.7.2.2. Output Terminal Descriptor */ | ||
234 | struct uvc_output_terminal_descriptor { | ||
235 | __u8 bLength; | ||
236 | __u8 bDescriptorType; | ||
237 | __u8 bDescriptorSubType; | ||
238 | __u8 bTerminalID; | ||
239 | __u16 wTerminalType; | ||
240 | __u8 bAssocTerminal; | ||
241 | __u8 bSourceID; | ||
242 | __u8 iTerminal; | ||
243 | } __attribute__((__packed__)); | ||
244 | |||
245 | #define UVC_DT_OUTPUT_TERMINAL_SIZE 9 | ||
246 | |||
247 | /* 3.7.2.3. Camera Terminal Descriptor */ | ||
248 | struct uvc_camera_terminal_descriptor { | ||
249 | __u8 bLength; | ||
250 | __u8 bDescriptorType; | ||
251 | __u8 bDescriptorSubType; | ||
252 | __u8 bTerminalID; | ||
253 | __u16 wTerminalType; | ||
254 | __u8 bAssocTerminal; | ||
255 | __u8 iTerminal; | ||
256 | __u16 wObjectiveFocalLengthMin; | ||
257 | __u16 wObjectiveFocalLengthMax; | ||
258 | __u16 wOcularFocalLength; | ||
259 | __u8 bControlSize; | ||
260 | __u8 bmControls[3]; | ||
261 | } __attribute__((__packed__)); | ||
262 | |||
263 | #define UVC_DT_CAMERA_TERMINAL_SIZE(n) (15+(n)) | ||
264 | |||
265 | /* 3.7.2.4. Selector Unit Descriptor */ | ||
266 | struct uvc_selector_unit_descriptor { | ||
267 | __u8 bLength; | ||
268 | __u8 bDescriptorType; | ||
269 | __u8 bDescriptorSubType; | ||
270 | __u8 bUnitID; | ||
271 | __u8 bNrInPins; | ||
272 | __u8 baSourceID[0]; | ||
273 | __u8 iSelector; | ||
274 | } __attribute__((__packed__)); | ||
275 | |||
276 | #define UVC_DT_SELECTOR_UNIT_SIZE(n) (6+(n)) | ||
277 | |||
278 | #define UVC_SELECTOR_UNIT_DESCRIPTOR(n) \ | ||
279 | uvc_selector_unit_descriptor_##n | ||
280 | |||
281 | #define DECLARE_UVC_SELECTOR_UNIT_DESCRIPTOR(n) \ | ||
282 | struct UVC_SELECTOR_UNIT_DESCRIPTOR(n) { \ | ||
283 | __u8 bLength; \ | ||
284 | __u8 bDescriptorType; \ | ||
285 | __u8 bDescriptorSubType; \ | ||
286 | __u8 bUnitID; \ | ||
287 | __u8 bNrInPins; \ | ||
288 | __u8 baSourceID[n]; \ | ||
289 | __u8 iSelector; \ | ||
290 | } __attribute__ ((packed)) | ||
291 | |||
292 | /* 3.7.2.5. Processing Unit Descriptor */ | ||
293 | struct uvc_processing_unit_descriptor { | ||
294 | __u8 bLength; | ||
295 | __u8 bDescriptorType; | ||
296 | __u8 bDescriptorSubType; | ||
297 | __u8 bUnitID; | ||
298 | __u8 bSourceID; | ||
299 | __u16 wMaxMultiplier; | ||
300 | __u8 bControlSize; | ||
301 | __u8 bmControls[2]; | ||
302 | __u8 iProcessing; | ||
303 | } __attribute__((__packed__)); | ||
304 | |||
305 | #define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n)) | ||
306 | |||
307 | /* 3.7.2.6. Extension Unit Descriptor */ | ||
308 | struct uvc_extension_unit_descriptor { | ||
309 | __u8 bLength; | ||
310 | __u8 bDescriptorType; | ||
311 | __u8 bDescriptorSubType; | ||
312 | __u8 bUnitID; | ||
313 | __u8 guidExtensionCode[16]; | ||
314 | __u8 bNumControls; | ||
315 | __u8 bNrInPins; | ||
316 | __u8 baSourceID[0]; | ||
317 | __u8 bControlSize; | ||
318 | __u8 bmControls[0]; | ||
319 | __u8 iExtension; | ||
320 | } __attribute__((__packed__)); | ||
321 | |||
322 | #define UVC_DT_EXTENSION_UNIT_SIZE(p, n) (24+(p)+(n)) | ||
323 | |||
324 | #define UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \ | ||
325 | uvc_extension_unit_descriptor_##p_##n | ||
326 | |||
327 | #define DECLARE_UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \ | ||
328 | struct UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) { \ | ||
329 | __u8 bLength; \ | ||
330 | __u8 bDescriptorType; \ | ||
331 | __u8 bDescriptorSubType; \ | ||
332 | __u8 bUnitID; \ | ||
333 | __u8 guidExtensionCode[16]; \ | ||
334 | __u8 bNumControls; \ | ||
335 | __u8 bNrInPins; \ | ||
336 | __u8 baSourceID[p]; \ | ||
337 | __u8 bControlSize; \ | ||
338 | __u8 bmControls[n]; \ | ||
339 | __u8 iExtension; \ | ||
340 | } __attribute__ ((packed)) | ||
341 | |||
342 | /* 3.8.2.2. Video Control Interrupt Endpoint Descriptor */ | ||
343 | struct uvc_control_endpoint_descriptor { | ||
344 | __u8 bLength; | ||
345 | __u8 bDescriptorType; | ||
346 | __u8 bDescriptorSubType; | ||
347 | __u16 wMaxTransferSize; | ||
348 | } __attribute__((__packed__)); | ||
349 | |||
350 | #define UVC_DT_CONTROL_ENDPOINT_SIZE 5 | ||
351 | |||
352 | /* 3.9.2.1. Input Header Descriptor */ | ||
353 | struct uvc_input_header_descriptor { | ||
354 | __u8 bLength; | ||
355 | __u8 bDescriptorType; | ||
356 | __u8 bDescriptorSubType; | ||
357 | __u8 bNumFormats; | ||
358 | __u16 wTotalLength; | ||
359 | __u8 bEndpointAddress; | ||
360 | __u8 bmInfo; | ||
361 | __u8 bTerminalLink; | ||
362 | __u8 bStillCaptureMethod; | ||
363 | __u8 bTriggerSupport; | ||
364 | __u8 bTriggerUsage; | ||
365 | __u8 bControlSize; | ||
366 | __u8 bmaControls[]; | ||
367 | } __attribute__((__packed__)); | ||
368 | |||
369 | #define UVC_DT_INPUT_HEADER_SIZE(n, p) (13+(n*p)) | ||
370 | |||
371 | #define UVC_INPUT_HEADER_DESCRIPTOR(n, p) \ | ||
372 | uvc_input_header_descriptor_##n_##p | ||
373 | |||
374 | #define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p) \ | ||
375 | struct UVC_INPUT_HEADER_DESCRIPTOR(n, p) { \ | ||
376 | __u8 bLength; \ | ||
377 | __u8 bDescriptorType; \ | ||
378 | __u8 bDescriptorSubType; \ | ||
379 | __u8 bNumFormats; \ | ||
380 | __u16 wTotalLength; \ | ||
381 | __u8 bEndpointAddress; \ | ||
382 | __u8 bmInfo; \ | ||
383 | __u8 bTerminalLink; \ | ||
384 | __u8 bStillCaptureMethod; \ | ||
385 | __u8 bTriggerSupport; \ | ||
386 | __u8 bTriggerUsage; \ | ||
387 | __u8 bControlSize; \ | ||
388 | __u8 bmaControls[p][n]; \ | ||
389 | } __attribute__ ((packed)) | ||
390 | |||
391 | /* 3.9.2.2. Output Header Descriptor */ | ||
392 | struct uvc_output_header_descriptor { | ||
393 | __u8 bLength; | ||
394 | __u8 bDescriptorType; | ||
395 | __u8 bDescriptorSubType; | ||
396 | __u8 bNumFormats; | ||
397 | __u16 wTotalLength; | ||
398 | __u8 bEndpointAddress; | ||
399 | __u8 bTerminalLink; | ||
400 | __u8 bControlSize; | ||
401 | __u8 bmaControls[]; | ||
402 | } __attribute__((__packed__)); | ||
403 | |||
404 | #define UVC_DT_OUTPUT_HEADER_SIZE(n, p) (9+(n*p)) | ||
405 | |||
406 | #define UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \ | ||
407 | uvc_output_header_descriptor_##n_##p | ||
408 | |||
409 | #define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \ | ||
410 | struct UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) { \ | ||
411 | __u8 bLength; \ | ||
412 | __u8 bDescriptorType; \ | ||
413 | __u8 bDescriptorSubType; \ | ||
414 | __u8 bNumFormats; \ | ||
415 | __u16 wTotalLength; \ | ||
416 | __u8 bEndpointAddress; \ | ||
417 | __u8 bTerminalLink; \ | ||
418 | __u8 bControlSize; \ | ||
419 | __u8 bmaControls[p][n]; \ | ||
420 | } __attribute__ ((packed)) | ||
421 | |||
422 | /* 3.9.2.6. Color matching descriptor */ | ||
423 | struct uvc_color_matching_descriptor { | ||
424 | __u8 bLength; | ||
425 | __u8 bDescriptorType; | ||
426 | __u8 bDescriptorSubType; | ||
427 | __u8 bColorPrimaries; | ||
428 | __u8 bTransferCharacteristics; | ||
429 | __u8 bMatrixCoefficients; | ||
430 | } __attribute__((__packed__)); | ||
431 | |||
432 | #define UVC_DT_COLOR_MATCHING_SIZE 6 | ||
433 | |||
434 | /* 4.3.1.1. Video Probe and Commit Controls */ | ||
435 | struct uvc_streaming_control { | ||
436 | __u16 bmHint; | ||
437 | __u8 bFormatIndex; | ||
438 | __u8 bFrameIndex; | ||
439 | __u32 dwFrameInterval; | ||
440 | __u16 wKeyFrameRate; | ||
441 | __u16 wPFrameRate; | ||
442 | __u16 wCompQuality; | ||
443 | __u16 wCompWindowSize; | ||
444 | __u16 wDelay; | ||
445 | __u32 dwMaxVideoFrameSize; | ||
446 | __u32 dwMaxPayloadTransferSize; | ||
447 | __u32 dwClockFrequency; | ||
448 | __u8 bmFramingInfo; | ||
449 | __u8 bPreferedVersion; | ||
450 | __u8 bMinVersion; | ||
451 | __u8 bMaxVersion; | ||
452 | } __attribute__((__packed__)); | ||
453 | |||
454 | /* Uncompressed Payload - 3.1.1. Uncompressed Video Format Descriptor */ | ||
455 | struct uvc_format_uncompressed { | ||
456 | __u8 bLength; | ||
457 | __u8 bDescriptorType; | ||
458 | __u8 bDescriptorSubType; | ||
459 | __u8 bFormatIndex; | ||
460 | __u8 bNumFrameDescriptors; | ||
461 | __u8 guidFormat[16]; | ||
462 | __u8 bBitsPerPixel; | ||
463 | __u8 bDefaultFrameIndex; | ||
464 | __u8 bAspectRatioX; | ||
465 | __u8 bAspectRatioY; | ||
466 | __u8 bmInterfaceFlags; | ||
467 | __u8 bCopyProtect; | ||
468 | } __attribute__((__packed__)); | ||
469 | |||
470 | #define UVC_DT_FORMAT_UNCOMPRESSED_SIZE 27 | ||
471 | |||
472 | /* Uncompressed Payload - 3.1.2. Uncompressed Video Frame Descriptor */ | ||
473 | struct uvc_frame_uncompressed { | ||
474 | __u8 bLength; | ||
475 | __u8 bDescriptorType; | ||
476 | __u8 bDescriptorSubType; | ||
477 | __u8 bFrameIndex; | ||
478 | __u8 bmCapabilities; | ||
479 | __u16 wWidth; | ||
480 | __u16 wHeight; | ||
481 | __u32 dwMinBitRate; | ||
482 | __u32 dwMaxBitRate; | ||
483 | __u32 dwMaxVideoFrameBufferSize; | ||
484 | __u32 dwDefaultFrameInterval; | ||
485 | __u8 bFrameIntervalType; | ||
486 | __u32 dwFrameInterval[]; | ||
487 | } __attribute__((__packed__)); | ||
488 | |||
489 | #define UVC_DT_FRAME_UNCOMPRESSED_SIZE(n) (26+4*(n)) | ||
490 | |||
491 | #define UVC_FRAME_UNCOMPRESSED(n) \ | ||
492 | uvc_frame_uncompressed_##n | ||
493 | |||
494 | #define DECLARE_UVC_FRAME_UNCOMPRESSED(n) \ | ||
495 | struct UVC_FRAME_UNCOMPRESSED(n) { \ | ||
496 | __u8 bLength; \ | ||
497 | __u8 bDescriptorType; \ | ||
498 | __u8 bDescriptorSubType; \ | ||
499 | __u8 bFrameIndex; \ | ||
500 | __u8 bmCapabilities; \ | ||
501 | __u16 wWidth; \ | ||
502 | __u16 wHeight; \ | ||
503 | __u32 dwMinBitRate; \ | ||
504 | __u32 dwMaxBitRate; \ | ||
505 | __u32 dwMaxVideoFrameBufferSize; \ | ||
506 | __u32 dwDefaultFrameInterval; \ | ||
507 | __u8 bFrameIntervalType; \ | ||
508 | __u32 dwFrameInterval[n]; \ | ||
509 | } __attribute__ ((packed)) | ||
510 | |||
511 | /* MJPEG Payload - 3.1.1. MJPEG Video Format Descriptor */ | ||
512 | struct uvc_format_mjpeg { | ||
513 | __u8 bLength; | ||
514 | __u8 bDescriptorType; | ||
515 | __u8 bDescriptorSubType; | ||
516 | __u8 bFormatIndex; | ||
517 | __u8 bNumFrameDescriptors; | ||
518 | __u8 bmFlags; | ||
519 | __u8 bDefaultFrameIndex; | ||
520 | __u8 bAspectRatioX; | ||
521 | __u8 bAspectRatioY; | ||
522 | __u8 bmInterfaceFlags; | ||
523 | __u8 bCopyProtect; | ||
524 | } __attribute__((__packed__)); | ||
525 | |||
526 | #define UVC_DT_FORMAT_MJPEG_SIZE 11 | ||
527 | |||
528 | /* MJPEG Payload - 3.1.2. MJPEG Video Frame Descriptor */ | ||
529 | struct uvc_frame_mjpeg { | ||
530 | __u8 bLength; | ||
531 | __u8 bDescriptorType; | ||
532 | __u8 bDescriptorSubType; | ||
533 | __u8 bFrameIndex; | ||
534 | __u8 bmCapabilities; | ||
535 | __u16 wWidth; | ||
536 | __u16 wHeight; | ||
537 | __u32 dwMinBitRate; | ||
538 | __u32 dwMaxBitRate; | ||
539 | __u32 dwMaxVideoFrameBufferSize; | ||
540 | __u32 dwDefaultFrameInterval; | ||
541 | __u8 bFrameIntervalType; | ||
542 | __u32 dwFrameInterval[]; | ||
543 | } __attribute__((__packed__)); | ||
544 | |||
545 | #define UVC_DT_FRAME_MJPEG_SIZE(n) (26+4*(n)) | ||
546 | |||
547 | #define UVC_FRAME_MJPEG(n) \ | ||
548 | uvc_frame_mjpeg_##n | ||
549 | |||
550 | #define DECLARE_UVC_FRAME_MJPEG(n) \ | ||
551 | struct UVC_FRAME_MJPEG(n) { \ | ||
552 | __u8 bLength; \ | ||
553 | __u8 bDescriptorType; \ | ||
554 | __u8 bDescriptorSubType; \ | ||
555 | __u8 bFrameIndex; \ | ||
556 | __u8 bmCapabilities; \ | ||
557 | __u16 wWidth; \ | ||
558 | __u16 wHeight; \ | ||
559 | __u32 dwMinBitRate; \ | ||
560 | __u32 dwMaxBitRate; \ | ||
561 | __u32 dwMaxVideoFrameBufferSize; \ | ||
562 | __u32 dwDefaultFrameInterval; \ | ||
563 | __u8 bFrameIntervalType; \ | ||
564 | __u32 dwFrameInterval[n]; \ | ||
565 | } __attribute__ ((packed)) | ||
566 | |||
163 | #endif /* __LINUX_USB_VIDEO_H */ | 567 | #endif /* __LINUX_USB_VIDEO_H */ |
164 | 568 | ||
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index 2dfaa293ae8c..814f294d4cd0 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
@@ -5,9 +5,31 @@ | |||
5 | * (C) Copyright 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> | 5 | * (C) Copyright 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> |
6 | * (C) Copyright 2007 Paulo R. Zanoni <przanoni@gmail.com> | 6 | * (C) Copyright 2007 Paulo R. Zanoni <przanoni@gmail.com> |
7 | * (C) Copyright 2007, 2009 Tiago Vignatti <vignatti@freedesktop.org> | 7 | * (C) Copyright 2007, 2009 Tiago Vignatti <vignatti@freedesktop.org> |
8 | * | ||
9 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
10 | * copy of this software and associated documentation files (the "Software"), | ||
11 | * to deal in the Software without restriction, including without limitation | ||
12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
14 | * Software is furnished to do so, subject to the following conditions: | ||
15 | * | ||
16 | * The above copyright notice and this permission notice (including the next | ||
17 | * paragraph) shall be included in all copies or substantial portions of the | ||
18 | * Software. | ||
19 | * | ||
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
23 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
26 | * DEALINGS | ||
27 | * IN THE SOFTWARE. | ||
28 | * | ||
8 | */ | 29 | */ |
9 | 30 | ||
10 | #ifndef LINUX_VGA_H | 31 | #ifndef LINUX_VGA_H |
32 | #define LINUX_VGA_H | ||
11 | 33 | ||
12 | #include <asm/vga.h> | 34 | #include <asm/vga.h> |
13 | 35 | ||
diff --git a/include/linux/virtio_9p.h b/include/linux/virtio_9p.h index 5cf11765146b..395c38a47adb 100644 --- a/include/linux/virtio_9p.h +++ b/include/linux/virtio_9p.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/virtio_ids.h> | 5 | #include <linux/virtio_ids.h> |
6 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
7 | #include <linux/types.h> | ||
7 | 8 | ||
8 | /* The feature bitmap for virtio 9P */ | 9 | /* The feature bitmap for virtio 9P */ |
9 | 10 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index cc97d6caf2b3..c24eca71e80c 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -27,10 +27,6 @@ enum writeback_sync_modes { | |||
27 | * in a manner such that unspecified fields are set to zero. | 27 | * in a manner such that unspecified fields are set to zero. |
28 | */ | 28 | */ |
29 | struct writeback_control { | 29 | struct writeback_control { |
30 | struct backing_dev_info *bdi; /* If !NULL, only write back this | ||
31 | queue */ | ||
32 | struct super_block *sb; /* if !NULL, only write inodes from | ||
33 | this super_block */ | ||
34 | enum writeback_sync_modes sync_mode; | 30 | enum writeback_sync_modes sync_mode; |
35 | unsigned long *older_than_this; /* If !NULL, only write back inodes | 31 | unsigned long *older_than_this; /* If !NULL, only write back inodes |
36 | older than this */ | 32 | older than this */ |
@@ -56,24 +52,6 @@ struct writeback_control { | |||
56 | unsigned for_reclaim:1; /* Invoked from the page allocator */ | 52 | unsigned for_reclaim:1; /* Invoked from the page allocator */ |
57 | unsigned range_cyclic:1; /* range_start is cyclic */ | 53 | unsigned range_cyclic:1; /* range_start is cyclic */ |
58 | unsigned more_io:1; /* more io to be dispatched */ | 54 | unsigned more_io:1; /* more io to be dispatched */ |
59 | /* | ||
60 | * write_cache_pages() won't update wbc->nr_to_write and | ||
61 | * mapping->writeback_index if no_nrwrite_index_update | ||
62 | * is set. write_cache_pages() may write more than we | ||
63 | * requested and we want to make sure nr_to_write and | ||
64 | * writeback_index are updated in a consistent manner | ||
65 | * so we use a single control to update them | ||
66 | */ | ||
67 | unsigned no_nrwrite_index_update:1; | ||
68 | |||
69 | /* | ||
70 | * For WB_SYNC_ALL, the sb must always be pinned. For WB_SYNC_NONE, | ||
71 | * the writeback code will pin the sb for the caller. However, | ||
72 | * for eg umount, the caller does WB_SYNC_NONE but already has | ||
73 | * the sb pinned. If the below is set, caller already has the | ||
74 | * sb pinned. | ||
75 | */ | ||
76 | unsigned sb_pinned:1; | ||
77 | }; | 55 | }; |
78 | 56 | ||
79 | /* | 57 | /* |
@@ -82,10 +60,10 @@ struct writeback_control { | |||
82 | struct bdi_writeback; | 60 | struct bdi_writeback; |
83 | int inode_wait(void *); | 61 | int inode_wait(void *); |
84 | void writeback_inodes_sb(struct super_block *); | 62 | void writeback_inodes_sb(struct super_block *); |
85 | void writeback_inodes_sb_locked(struct super_block *); | ||
86 | int writeback_inodes_sb_if_idle(struct super_block *); | 63 | int writeback_inodes_sb_if_idle(struct super_block *); |
87 | void sync_inodes_sb(struct super_block *); | 64 | void sync_inodes_sb(struct super_block *); |
88 | void writeback_inodes_wbc(struct writeback_control *wbc); | 65 | void writeback_inodes_wb(struct bdi_writeback *wb, |
66 | struct writeback_control *wbc); | ||
89 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); | 67 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); |
90 | void wakeup_flusher_threads(long nr_pages); | 68 | void wakeup_flusher_threads(long nr_pages); |
91 | 69 | ||
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 0cfa1e9c4cc1..f1e5bde4b35a 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -33,6 +33,20 @@ | |||
33 | #define XATTR_USER_PREFIX "user." | 33 | #define XATTR_USER_PREFIX "user." |
34 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) | 34 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) |
35 | 35 | ||
36 | /* Security namespace */ | ||
37 | #define XATTR_SELINUX_SUFFIX "selinux" | ||
38 | #define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX | ||
39 | |||
40 | #define XATTR_SMACK_SUFFIX "SMACK64" | ||
41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" | ||
42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" | ||
43 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX | ||
44 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN | ||
45 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT | ||
46 | |||
47 | #define XATTR_CAPS_SUFFIX "capability" | ||
48 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | ||
49 | |||
36 | struct inode; | 50 | struct inode; |
37 | struct dentry; | 51 | struct dentry; |
38 | 52 | ||
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h index fd882261225e..9696a5e2c437 100644 --- a/include/math-emu/op-common.h +++ b/include/math-emu/op-common.h | |||
@@ -799,7 +799,7 @@ do { \ | |||
799 | X##_e -= (_FP_W_TYPE_SIZE - rsize); \ | 799 | X##_e -= (_FP_W_TYPE_SIZE - rsize); \ |
800 | X##_e = rsize - X##_e - 1; \ | 800 | X##_e = rsize - X##_e - 1; \ |
801 | \ | 801 | \ |
802 | if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs < X##_e) \ | 802 | if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs <= X##_e) \ |
803 | __FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\ | 803 | __FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\ |
804 | _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ | 804 | _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ |
805 | if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \ | 805 | if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \ |
diff --git a/include/media/ir-core.h b/include/media/ir-core.h index ad1303f20e00..513e60dd1010 100644 --- a/include/media/ir-core.h +++ b/include/media/ir-core.h | |||
@@ -47,15 +47,21 @@ enum rc_driver_type { | |||
47 | * is opened. | 47 | * is opened. |
48 | * @close: callback to allow drivers to disable polling/irq when IR input device | 48 | * @close: callback to allow drivers to disable polling/irq when IR input device |
49 | * is opened. | 49 | * is opened. |
50 | * @s_tx_mask: set transmitter mask (for devices with multiple tx outputs) | ||
51 | * @s_tx_carrier: set transmit carrier frequency | ||
52 | * @tx_ir: transmit IR | ||
50 | */ | 53 | */ |
51 | struct ir_dev_props { | 54 | struct ir_dev_props { |
52 | enum rc_driver_type driver_type; | 55 | enum rc_driver_type driver_type; |
53 | unsigned long allowed_protos; | 56 | unsigned long allowed_protos; |
54 | u32 scanmask; | 57 | u32 scanmask; |
55 | void *priv; | 58 | void *priv; |
56 | int (*change_protocol)(void *priv, u64 ir_type); | 59 | int (*change_protocol)(void *priv, u64 ir_type); |
57 | int (*open)(void *priv); | 60 | int (*open)(void *priv); |
58 | void (*close)(void *priv); | 61 | void (*close)(void *priv); |
62 | int (*s_tx_mask)(void *priv, u32 mask); | ||
63 | int (*s_tx_carrier)(void *priv, u32 carrier); | ||
64 | int (*tx_ir)(void *priv, int *txbuf, u32 n); | ||
59 | }; | 65 | }; |
60 | 66 | ||
61 | struct ir_input_dev { | 67 | struct ir_input_dev { |
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 0506e45c9a4f..5e96d7a430be 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h | |||
@@ -11,7 +11,7 @@ struct IR_i2c { | |||
11 | struct i2c_client *c; | 11 | struct i2c_client *c; |
12 | struct input_dev *input; | 12 | struct input_dev *input; |
13 | struct ir_input_state ir; | 13 | struct ir_input_state ir; |
14 | 14 | u64 ir_type; | |
15 | /* Used to avoid fast repeating */ | 15 | /* Used to avoid fast repeating */ |
16 | unsigned char old; | 16 | unsigned char old; |
17 | 17 | ||
diff --git a/include/media/lirc.h b/include/media/lirc.h new file mode 100644 index 000000000000..42c467c50519 --- /dev/null +++ b/include/media/lirc.h | |||
@@ -0,0 +1,165 @@ | |||
1 | /* | ||
2 | * lirc.h - linux infrared remote control header file | ||
3 | * last modified 2010/07/13 by Jarod Wilson | ||
4 | */ | ||
5 | |||
6 | #ifndef _LINUX_LIRC_H | ||
7 | #define _LINUX_LIRC_H | ||
8 | |||
9 | #include <linux/types.h> | ||
10 | #include <linux/ioctl.h> | ||
11 | |||
12 | #define PULSE_BIT 0x01000000 | ||
13 | #define PULSE_MASK 0x00FFFFFF | ||
14 | |||
15 | #define LIRC_MODE2_SPACE 0x00000000 | ||
16 | #define LIRC_MODE2_PULSE 0x01000000 | ||
17 | #define LIRC_MODE2_FREQUENCY 0x02000000 | ||
18 | #define LIRC_MODE2_TIMEOUT 0x03000000 | ||
19 | |||
20 | #define LIRC_VALUE_MASK 0x00FFFFFF | ||
21 | #define LIRC_MODE2_MASK 0xFF000000 | ||
22 | |||
23 | #define LIRC_SPACE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_SPACE) | ||
24 | #define LIRC_PULSE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_PULSE) | ||
25 | #define LIRC_FREQUENCY(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_FREQUENCY) | ||
26 | #define LIRC_TIMEOUT(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_TIMEOUT) | ||
27 | |||
28 | #define LIRC_VALUE(val) ((val)&LIRC_VALUE_MASK) | ||
29 | #define LIRC_MODE2(val) ((val)&LIRC_MODE2_MASK) | ||
30 | |||
31 | #define LIRC_IS_SPACE(val) (LIRC_MODE2(val) == LIRC_MODE2_SPACE) | ||
32 | #define LIRC_IS_PULSE(val) (LIRC_MODE2(val) == LIRC_MODE2_PULSE) | ||
33 | #define LIRC_IS_FREQUENCY(val) (LIRC_MODE2(val) == LIRC_MODE2_FREQUENCY) | ||
34 | #define LIRC_IS_TIMEOUT(val) (LIRC_MODE2(val) == LIRC_MODE2_TIMEOUT) | ||
35 | |||
36 | /* used heavily by lirc userspace */ | ||
37 | #define lirc_t int | ||
38 | |||
39 | /*** lirc compatible hardware features ***/ | ||
40 | |||
41 | #define LIRC_MODE2SEND(x) (x) | ||
42 | #define LIRC_SEND2MODE(x) (x) | ||
43 | #define LIRC_MODE2REC(x) ((x) << 16) | ||
44 | #define LIRC_REC2MODE(x) ((x) >> 16) | ||
45 | |||
46 | #define LIRC_MODE_RAW 0x00000001 | ||
47 | #define LIRC_MODE_PULSE 0x00000002 | ||
48 | #define LIRC_MODE_MODE2 0x00000004 | ||
49 | #define LIRC_MODE_LIRCCODE 0x00000010 | ||
50 | |||
51 | |||
52 | #define LIRC_CAN_SEND_RAW LIRC_MODE2SEND(LIRC_MODE_RAW) | ||
53 | #define LIRC_CAN_SEND_PULSE LIRC_MODE2SEND(LIRC_MODE_PULSE) | ||
54 | #define LIRC_CAN_SEND_MODE2 LIRC_MODE2SEND(LIRC_MODE_MODE2) | ||
55 | #define LIRC_CAN_SEND_LIRCCODE LIRC_MODE2SEND(LIRC_MODE_LIRCCODE) | ||
56 | |||
57 | #define LIRC_CAN_SEND_MASK 0x0000003f | ||
58 | |||
59 | #define LIRC_CAN_SET_SEND_CARRIER 0x00000100 | ||
60 | #define LIRC_CAN_SET_SEND_DUTY_CYCLE 0x00000200 | ||
61 | #define LIRC_CAN_SET_TRANSMITTER_MASK 0x00000400 | ||
62 | |||
63 | #define LIRC_CAN_REC_RAW LIRC_MODE2REC(LIRC_MODE_RAW) | ||
64 | #define LIRC_CAN_REC_PULSE LIRC_MODE2REC(LIRC_MODE_PULSE) | ||
65 | #define LIRC_CAN_REC_MODE2 LIRC_MODE2REC(LIRC_MODE_MODE2) | ||
66 | #define LIRC_CAN_REC_LIRCCODE LIRC_MODE2REC(LIRC_MODE_LIRCCODE) | ||
67 | |||
68 | #define LIRC_CAN_REC_MASK LIRC_MODE2REC(LIRC_CAN_SEND_MASK) | ||
69 | |||
70 | #define LIRC_CAN_SET_REC_CARRIER (LIRC_CAN_SET_SEND_CARRIER << 16) | ||
71 | #define LIRC_CAN_SET_REC_DUTY_CYCLE (LIRC_CAN_SET_SEND_DUTY_CYCLE << 16) | ||
72 | |||
73 | #define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE 0x40000000 | ||
74 | #define LIRC_CAN_SET_REC_CARRIER_RANGE 0x80000000 | ||
75 | #define LIRC_CAN_GET_REC_RESOLUTION 0x20000000 | ||
76 | #define LIRC_CAN_SET_REC_TIMEOUT 0x10000000 | ||
77 | #define LIRC_CAN_SET_REC_FILTER 0x08000000 | ||
78 | |||
79 | #define LIRC_CAN_MEASURE_CARRIER 0x02000000 | ||
80 | |||
81 | #define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK) | ||
82 | #define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK) | ||
83 | |||
84 | #define LIRC_CAN_NOTIFY_DECODE 0x01000000 | ||
85 | |||
86 | /*** IOCTL commands for lirc driver ***/ | ||
87 | |||
88 | #define LIRC_GET_FEATURES _IOR('i', 0x00000000, __u32) | ||
89 | |||
90 | #define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32) | ||
91 | #define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32) | ||
92 | #define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, __u32) | ||
93 | #define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, __u32) | ||
94 | #define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, __u32) | ||
95 | #define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, __u32) | ||
96 | #define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, __u32) | ||
97 | |||
98 | #define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, __u32) | ||
99 | #define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, __u32) | ||
100 | |||
101 | #define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, __u32) | ||
102 | #define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, __u32) | ||
103 | #define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, __u32) | ||
104 | #define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, __u32) | ||
105 | |||
106 | /* code length in bits, currently only for LIRC_MODE_LIRCCODE */ | ||
107 | #define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32) | ||
108 | |||
109 | #define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, __u32) | ||
110 | #define LIRC_SET_REC_MODE _IOW('i', 0x00000012, __u32) | ||
111 | /* Note: these can reset the according pulse_width */ | ||
112 | #define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, __u32) | ||
113 | #define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, __u32) | ||
114 | #define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, __u32) | ||
115 | #define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, __u32) | ||
116 | #define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, __u32) | ||
117 | |||
118 | /* | ||
119 | * when a timeout != 0 is set the driver will send a | ||
120 | * LIRC_MODE2_TIMEOUT data packet, otherwise LIRC_MODE2_TIMEOUT is | ||
121 | * never sent, timeout is disabled by default | ||
122 | */ | ||
123 | #define LIRC_SET_REC_TIMEOUT _IOW('i', 0x00000018, __u32) | ||
124 | |||
125 | /* 1 enables, 0 disables timeout reports in MODE2 */ | ||
126 | #define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, __u32) | ||
127 | |||
128 | /* | ||
129 | * pulses shorter than this are filtered out by hardware (software | ||
130 | * emulation in lirc_dev?) | ||
131 | */ | ||
132 | #define LIRC_SET_REC_FILTER_PULSE _IOW('i', 0x0000001a, __u32) | ||
133 | /* | ||
134 | * spaces shorter than this are filtered out by hardware (software | ||
135 | * emulation in lirc_dev?) | ||
136 | */ | ||
137 | #define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) | ||
138 | /* | ||
139 | * if filter cannot be set independantly for pulse/space, this should | ||
140 | * be used | ||
141 | */ | ||
142 | #define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) | ||
143 | |||
144 | /* | ||
145 | * if enabled from the next key press on the driver will send | ||
146 | * LIRC_MODE2_FREQUENCY packets | ||
147 | */ | ||
148 | #define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32) | ||
149 | |||
150 | /* | ||
151 | * to set a range use | ||
152 | * LIRC_SET_REC_DUTY_CYCLE_RANGE/LIRC_SET_REC_CARRIER_RANGE with the | ||
153 | * lower bound first and later | ||
154 | * LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound | ||
155 | */ | ||
156 | |||
157 | #define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, __u32) | ||
158 | #define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, __u32) | ||
159 | |||
160 | #define LIRC_NOTIFY_DECODE _IO('i', 0x00000020) | ||
161 | |||
162 | #define LIRC_SETUP_START _IO('i', 0x00000021) | ||
163 | #define LIRC_SETUP_END _IO('i', 0x00000022) | ||
164 | |||
165 | #endif | ||
diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h new file mode 100644 index 000000000000..b1f60663cb39 --- /dev/null +++ b/include/media/lirc_dev.h | |||
@@ -0,0 +1,225 @@ | |||
1 | /* | ||
2 | * LIRC base driver | ||
3 | * | ||
4 | * by Artur Lipowski <alipowski@interia.pl> | ||
5 | * This code is licensed under GNU GPL | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #ifndef _LINUX_LIRC_DEV_H | ||
10 | #define _LINUX_LIRC_DEV_H | ||
11 | |||
12 | #define MAX_IRCTL_DEVICES 4 | ||
13 | #define BUFLEN 16 | ||
14 | |||
15 | #define mod(n, div) ((n) % (div)) | ||
16 | |||
17 | #include <linux/slab.h> | ||
18 | #include <linux/fs.h> | ||
19 | #include <linux/ioctl.h> | ||
20 | #include <linux/poll.h> | ||
21 | #include <linux/kfifo.h> | ||
22 | #include <media/lirc.h> | ||
23 | |||
24 | struct lirc_buffer { | ||
25 | wait_queue_head_t wait_poll; | ||
26 | spinlock_t fifo_lock; | ||
27 | unsigned int chunk_size; | ||
28 | unsigned int size; /* in chunks */ | ||
29 | /* Using chunks instead of bytes pretends to simplify boundary checking | ||
30 | * And should allow for some performance fine tunning later */ | ||
31 | struct kfifo fifo; | ||
32 | u8 fifo_initialized; | ||
33 | }; | ||
34 | |||
35 | static inline void lirc_buffer_clear(struct lirc_buffer *buf) | ||
36 | { | ||
37 | unsigned long flags; | ||
38 | |||
39 | if (buf->fifo_initialized) { | ||
40 | spin_lock_irqsave(&buf->fifo_lock, flags); | ||
41 | kfifo_reset(&buf->fifo); | ||
42 | spin_unlock_irqrestore(&buf->fifo_lock, flags); | ||
43 | } else | ||
44 | WARN(1, "calling %s on an uninitialized lirc_buffer\n", | ||
45 | __func__); | ||
46 | } | ||
47 | |||
48 | static inline int lirc_buffer_init(struct lirc_buffer *buf, | ||
49 | unsigned int chunk_size, | ||
50 | unsigned int size) | ||
51 | { | ||
52 | int ret; | ||
53 | |||
54 | init_waitqueue_head(&buf->wait_poll); | ||
55 | spin_lock_init(&buf->fifo_lock); | ||
56 | buf->chunk_size = chunk_size; | ||
57 | buf->size = size; | ||
58 | ret = kfifo_alloc(&buf->fifo, size * chunk_size, GFP_KERNEL); | ||
59 | if (ret == 0) | ||
60 | buf->fifo_initialized = 1; | ||
61 | |||
62 | return ret; | ||
63 | } | ||
64 | |||
65 | static inline void lirc_buffer_free(struct lirc_buffer *buf) | ||
66 | { | ||
67 | if (buf->fifo_initialized) { | ||
68 | kfifo_free(&buf->fifo); | ||
69 | buf->fifo_initialized = 0; | ||
70 | } else | ||
71 | WARN(1, "calling %s on an uninitialized lirc_buffer\n", | ||
72 | __func__); | ||
73 | } | ||
74 | |||
75 | static inline int lirc_buffer_len(struct lirc_buffer *buf) | ||
76 | { | ||
77 | int len; | ||
78 | unsigned long flags; | ||
79 | |||
80 | spin_lock_irqsave(&buf->fifo_lock, flags); | ||
81 | len = kfifo_len(&buf->fifo); | ||
82 | spin_unlock_irqrestore(&buf->fifo_lock, flags); | ||
83 | |||
84 | return len; | ||
85 | } | ||
86 | |||
87 | static inline int lirc_buffer_full(struct lirc_buffer *buf) | ||
88 | { | ||
89 | return lirc_buffer_len(buf) == buf->size * buf->chunk_size; | ||
90 | } | ||
91 | |||
92 | static inline int lirc_buffer_empty(struct lirc_buffer *buf) | ||
93 | { | ||
94 | return !lirc_buffer_len(buf); | ||
95 | } | ||
96 | |||
97 | static inline int lirc_buffer_available(struct lirc_buffer *buf) | ||
98 | { | ||
99 | return buf->size - (lirc_buffer_len(buf) / buf->chunk_size); | ||
100 | } | ||
101 | |||
102 | static inline unsigned int lirc_buffer_read(struct lirc_buffer *buf, | ||
103 | unsigned char *dest) | ||
104 | { | ||
105 | unsigned int ret = 0; | ||
106 | |||
107 | if (lirc_buffer_len(buf) >= buf->chunk_size) | ||
108 | ret = kfifo_out_locked(&buf->fifo, dest, buf->chunk_size, | ||
109 | &buf->fifo_lock); | ||
110 | return ret; | ||
111 | |||
112 | } | ||
113 | |||
114 | static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, | ||
115 | unsigned char *orig) | ||
116 | { | ||
117 | unsigned int ret; | ||
118 | |||
119 | ret = kfifo_in_locked(&buf->fifo, orig, buf->chunk_size, | ||
120 | &buf->fifo_lock); | ||
121 | |||
122 | return ret; | ||
123 | } | ||
124 | |||
125 | struct lirc_driver { | ||
126 | char name[40]; | ||
127 | int minor; | ||
128 | unsigned long code_length; | ||
129 | unsigned int buffer_size; /* in chunks holding one code each */ | ||
130 | int sample_rate; | ||
131 | unsigned long features; | ||
132 | |||
133 | unsigned int chunk_size; | ||
134 | |||
135 | void *data; | ||
136 | int min_timeout; | ||
137 | int max_timeout; | ||
138 | int (*add_to_buf) (void *data, struct lirc_buffer *buf); | ||
139 | struct lirc_buffer *rbuf; | ||
140 | int (*set_use_inc) (void *data); | ||
141 | void (*set_use_dec) (void *data); | ||
142 | struct file_operations *fops; | ||
143 | struct device *dev; | ||
144 | struct module *owner; | ||
145 | }; | ||
146 | |||
147 | /* name: | ||
148 | * this string will be used for logs | ||
149 | * | ||
150 | * minor: | ||
151 | * indicates minor device (/dev/lirc) number for registered driver | ||
152 | * if caller fills it with negative value, then the first free minor | ||
153 | * number will be used (if available) | ||
154 | * | ||
155 | * code_length: | ||
156 | * length of the remote control key code expressed in bits | ||
157 | * | ||
158 | * sample_rate: | ||
159 | * | ||
160 | * data: | ||
161 | * it may point to any driver data and this pointer will be passed to | ||
162 | * all callback functions | ||
163 | * | ||
164 | * add_to_buf: | ||
165 | * add_to_buf will be called after specified period of the time or | ||
166 | * triggered by the external event, this behavior depends on value of | ||
167 | * the sample_rate this function will be called in user context. This | ||
168 | * routine should return 0 if data was added to the buffer and | ||
169 | * -ENODATA if none was available. This should add some number of bits | ||
170 | * evenly divisible by code_length to the buffer | ||
171 | * | ||
172 | * rbuf: | ||
173 | * if not NULL, it will be used as a read buffer, you will have to | ||
174 | * write to the buffer by other means, like irq's (see also | ||
175 | * lirc_serial.c). | ||
176 | * | ||
177 | * set_use_inc: | ||
178 | * set_use_inc will be called after device is opened | ||
179 | * | ||
180 | * set_use_dec: | ||
181 | * set_use_dec will be called after device is closed | ||
182 | * | ||
183 | * fops: | ||
184 | * file_operations for drivers which don't fit the current driver model. | ||
185 | * | ||
186 | * Some ioctl's can be directly handled by lirc_dev if the driver's | ||
187 | * ioctl function is NULL or if it returns -ENOIOCTLCMD (see also | ||
188 | * lirc_serial.c). | ||
189 | * | ||
190 | * owner: | ||
191 | * the module owning this struct | ||
192 | * | ||
193 | */ | ||
194 | |||
195 | |||
196 | /* following functions can be called ONLY from user context | ||
197 | * | ||
198 | * returns negative value on error or minor number | ||
199 | * of the registered device if success | ||
200 | * contents of the structure pointed by p is copied | ||
201 | */ | ||
202 | extern int lirc_register_driver(struct lirc_driver *d); | ||
203 | |||
204 | /* returns negative value on error or 0 if success | ||
205 | */ | ||
206 | extern int lirc_unregister_driver(int minor); | ||
207 | |||
208 | /* Returns the private data stored in the lirc_driver | ||
209 | * associated with the given device file pointer. | ||
210 | */ | ||
211 | void *lirc_get_pdata(struct file *file); | ||
212 | |||
213 | /* default file operations | ||
214 | * used by drivers if they override only some operations | ||
215 | */ | ||
216 | int lirc_dev_fop_open(struct inode *inode, struct file *file); | ||
217 | int lirc_dev_fop_close(struct inode *inode, struct file *file); | ||
218 | unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait); | ||
219 | long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | ||
220 | ssize_t lirc_dev_fop_read(struct file *file, char *buffer, size_t length, | ||
221 | loff_t *ppos); | ||
222 | ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, size_t length, | ||
223 | loff_t *ppos); | ||
224 | |||
225 | #endif | ||
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 5833966a7100..9569d0863f8b 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -17,8 +17,13 @@ | |||
17 | #define IR_TYPE_RC6 (1 << 2) /* Philips RC6 protocol */ | 17 | #define IR_TYPE_RC6 (1 << 2) /* Philips RC6 protocol */ |
18 | #define IR_TYPE_JVC (1 << 3) /* JVC protocol */ | 18 | #define IR_TYPE_JVC (1 << 3) /* JVC protocol */ |
19 | #define IR_TYPE_SONY (1 << 4) /* Sony12/15/20 protocol */ | 19 | #define IR_TYPE_SONY (1 << 4) /* Sony12/15/20 protocol */ |
20 | #define IR_TYPE_LIRC (1 << 30) /* Pass raw IR to lirc userspace */ | ||
20 | #define IR_TYPE_OTHER (1u << 31) | 21 | #define IR_TYPE_OTHER (1u << 31) |
21 | 22 | ||
23 | #define IR_TYPE_ALL (IR_TYPE_RC5 | IR_TYPE_NEC | IR_TYPE_RC6 | \ | ||
24 | IR_TYPE_JVC | IR_TYPE_SONY | IR_TYPE_LIRC | \ | ||
25 | IR_TYPE_OTHER) | ||
26 | |||
22 | struct ir_scancode { | 27 | struct ir_scancode { |
23 | u32 scancode; | 28 | u32 scancode; |
24 | u32 keycode; | 29 | u32 keycode; |
@@ -55,7 +60,8 @@ void rc_map_init(void); | |||
55 | #define RC_MAP_AVERMEDIA_A16D "rc-avermedia-a16d" | 60 | #define RC_MAP_AVERMEDIA_A16D "rc-avermedia-a16d" |
56 | #define RC_MAP_AVERMEDIA_CARDBUS "rc-avermedia-cardbus" | 61 | #define RC_MAP_AVERMEDIA_CARDBUS "rc-avermedia-cardbus" |
57 | #define RC_MAP_AVERMEDIA_DVBT "rc-avermedia-dvbt" | 62 | #define RC_MAP_AVERMEDIA_DVBT "rc-avermedia-dvbt" |
58 | #define RC_MAP_AVERMEDIA_M135A_RM_JX "rc-avermedia-m135a-rm-jx" | 63 | #define RC_MAP_AVERMEDIA_M135A "rc-avermedia-m135a" |
64 | #define RC_MAP_AVERMEDIA_M733A_RM_K6 "rc-avermedia-m733a-rm-k6" | ||
59 | #define RC_MAP_AVERMEDIA "rc-avermedia" | 65 | #define RC_MAP_AVERMEDIA "rc-avermedia" |
60 | #define RC_MAP_AVERTV_303 "rc-avertv-303" | 66 | #define RC_MAP_AVERTV_303 "rc-avertv-303" |
61 | #define RC_MAP_BEHOLD_COLUMBUS "rc-behold-columbus" | 67 | #define RC_MAP_BEHOLD_COLUMBUS "rc-behold-columbus" |
@@ -63,6 +69,8 @@ void rc_map_init(void); | |||
63 | #define RC_MAP_BUDGET_CI_OLD "rc-budget-ci-old" | 69 | #define RC_MAP_BUDGET_CI_OLD "rc-budget-ci-old" |
64 | #define RC_MAP_CINERGY_1400 "rc-cinergy-1400" | 70 | #define RC_MAP_CINERGY_1400 "rc-cinergy-1400" |
65 | #define RC_MAP_CINERGY "rc-cinergy" | 71 | #define RC_MAP_CINERGY "rc-cinergy" |
72 | #define RC_MAP_DIB0700_NEC_TABLE "rc-dib0700-nec" | ||
73 | #define RC_MAP_DIB0700_RC5_TABLE "rc-dib0700-rc5" | ||
66 | #define RC_MAP_DM1105_NEC "rc-dm1105-nec" | 74 | #define RC_MAP_DM1105_NEC "rc-dm1105-nec" |
67 | #define RC_MAP_DNTV_LIVE_DVBT_PRO "rc-dntv-live-dvbt-pro" | 75 | #define RC_MAP_DNTV_LIVE_DVBT_PRO "rc-dntv-live-dvbt-pro" |
68 | #define RC_MAP_DNTV_LIVE_DVB_T "rc-dntv-live-dvb-t" | 76 | #define RC_MAP_DNTV_LIVE_DVB_T "rc-dntv-live-dvb-t" |
@@ -86,6 +94,7 @@ void rc_map_init(void); | |||
86 | #define RC_MAP_KAIOMY "rc-kaiomy" | 94 | #define RC_MAP_KAIOMY "rc-kaiomy" |
87 | #define RC_MAP_KWORLD_315U "rc-kworld-315u" | 95 | #define RC_MAP_KWORLD_315U "rc-kworld-315u" |
88 | #define RC_MAP_KWORLD_PLUS_TV_ANALOG "rc-kworld-plus-tv-analog" | 96 | #define RC_MAP_KWORLD_PLUS_TV_ANALOG "rc-kworld-plus-tv-analog" |
97 | #define RC_MAP_LIRC "rc-lirc" | ||
89 | #define RC_MAP_MANLI "rc-manli" | 98 | #define RC_MAP_MANLI "rc-manli" |
90 | #define RC_MAP_MSI_TVANYWHERE_PLUS "rc-msi-tvanywhere-plus" | 99 | #define RC_MAP_MSI_TVANYWHERE_PLUS "rc-msi-tvanywhere-plus" |
91 | #define RC_MAP_MSI_TVANYWHERE "rc-msi-tvanywhere" | 100 | #define RC_MAP_MSI_TVANYWHERE "rc-msi-tvanywhere" |
@@ -106,6 +115,7 @@ void rc_map_init(void); | |||
106 | #define RC_MAP_PV951 "rc-pv951" | 115 | #define RC_MAP_PV951 "rc-pv951" |
107 | #define RC_MAP_RC5_HAUPPAUGE_NEW "rc-rc5-hauppauge-new" | 116 | #define RC_MAP_RC5_HAUPPAUGE_NEW "rc-rc5-hauppauge-new" |
108 | #define RC_MAP_RC5_TV "rc-rc5-tv" | 117 | #define RC_MAP_RC5_TV "rc-rc5-tv" |
118 | #define RC_MAP_RC6_MCE "rc-rc6-mce" | ||
109 | #define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys" | 119 | #define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys" |
110 | #define RC_MAP_TBS_NEC "rc-tbs-nec" | 120 | #define RC_MAP_TBS_NEC "rc-tbs-nec" |
111 | #define RC_MAP_TERRATEC_CINERGY_XS "rc-terratec-cinergy-xs" | 121 | #define RC_MAP_TERRATEC_CINERGY_XS "rc-terratec-cinergy-xs" |
@@ -115,6 +125,7 @@ void rc_map_init(void); | |||
115 | #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" | 125 | #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" |
116 | #define RC_MAP_WINFAST "rc-winfast" | 126 | #define RC_MAP_WINFAST "rc-winfast" |
117 | #define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe" | 127 | #define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe" |
128 | |||
118 | /* | 129 | /* |
119 | * Please, do not just append newer Remote Controller names at the end. | 130 | * Please, do not just append newer Remote Controller names at the end. |
120 | * The names should be ordered in alphabetical order | 131 | * The names should be ordered in alphabetical order |
diff --git a/include/media/sh_mobile_ceu.h b/include/media/sh_mobile_ceu.h index b67747836878..80346a6d28a9 100644 --- a/include/media/sh_mobile_ceu.h +++ b/include/media/sh_mobile_ceu.h | |||
@@ -6,8 +6,11 @@ | |||
6 | #define SH_CEU_FLAG_HSYNC_LOW (1 << 2) /* default High if possible */ | 6 | #define SH_CEU_FLAG_HSYNC_LOW (1 << 2) /* default High if possible */ |
7 | #define SH_CEU_FLAG_VSYNC_LOW (1 << 3) /* default High if possible */ | 7 | #define SH_CEU_FLAG_VSYNC_LOW (1 << 3) /* default High if possible */ |
8 | 8 | ||
9 | struct device; | ||
10 | |||
9 | struct sh_mobile_ceu_info { | 11 | struct sh_mobile_ceu_info { |
10 | unsigned long flags; | 12 | unsigned long flags; |
13 | struct device *csi2_dev; | ||
11 | }; | 14 | }; |
12 | 15 | ||
13 | #endif /* __ASM_SH_MOBILE_CEU_H__ */ | 16 | #endif /* __ASM_SH_MOBILE_CEU_H__ */ |
diff --git a/include/media/sh_mobile_csi2.h b/include/media/sh_mobile_csi2.h new file mode 100644 index 000000000000..4d2615174461 --- /dev/null +++ b/include/media/sh_mobile_csi2.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Driver header for the SH-Mobile MIPI CSI-2 unit | ||
3 | * | ||
4 | * Copyright (C) 2010, Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef SH_MIPI_CSI | ||
12 | #define SH_MIPI_CSI | ||
13 | |||
14 | enum sh_csi2_phy { | ||
15 | SH_CSI2_PHY_MAIN, | ||
16 | SH_CSI2_PHY_SUB, | ||
17 | }; | ||
18 | |||
19 | enum sh_csi2_type { | ||
20 | SH_CSI2C, | ||
21 | SH_CSI2I, | ||
22 | }; | ||
23 | |||
24 | #define SH_CSI2_CRC (1 << 0) | ||
25 | #define SH_CSI2_ECC (1 << 1) | ||
26 | |||
27 | struct platform_device; | ||
28 | |||
29 | struct sh_csi2_client_config { | ||
30 | enum sh_csi2_phy phy; | ||
31 | unsigned char lanes; /* bitmask[3:0] */ | ||
32 | unsigned char channel; /* 0..3 */ | ||
33 | struct platform_device *pdev; /* client platform device */ | ||
34 | }; | ||
35 | |||
36 | struct sh_csi2_pdata { | ||
37 | enum sh_csi2_type type; | ||
38 | unsigned int flags; | ||
39 | struct sh_csi2_client_config *clients; | ||
40 | int num_clients; | ||
41 | }; | ||
42 | |||
43 | struct device; | ||
44 | struct v4l2_device; | ||
45 | |||
46 | #endif | ||
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index c9a5bbfa6ab5..2ce957301f77 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -12,12 +12,15 @@ | |||
12 | #ifndef SOC_CAMERA_H | 12 | #ifndef SOC_CAMERA_H |
13 | #define SOC_CAMERA_H | 13 | #define SOC_CAMERA_H |
14 | 14 | ||
15 | #include <linux/device.h> | ||
15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
16 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
17 | #include <linux/videodev2.h> | 18 | #include <linux/videodev2.h> |
18 | #include <media/videobuf-core.h> | 19 | #include <media/videobuf-core.h> |
19 | #include <media/v4l2-device.h> | 20 | #include <media/v4l2-device.h> |
20 | 21 | ||
22 | extern struct bus_type soc_camera_bus_type; | ||
23 | |||
21 | struct soc_camera_device { | 24 | struct soc_camera_device { |
22 | struct list_head list; | 25 | struct list_head list; |
23 | struct device dev; | 26 | struct device dev; |
@@ -66,7 +69,7 @@ struct soc_camera_host_ops { | |||
66 | * .get_formats() fail, .put_formats() will not be called at all, the | 69 | * .get_formats() fail, .put_formats() will not be called at all, the |
67 | * failing .get_formats() must then clean up internally. | 70 | * failing .get_formats() must then clean up internally. |
68 | */ | 71 | */ |
69 | int (*get_formats)(struct soc_camera_device *, int, | 72 | int (*get_formats)(struct soc_camera_device *, unsigned int, |
70 | struct soc_camera_format_xlate *); | 73 | struct soc_camera_format_xlate *); |
71 | void (*put_formats)(struct soc_camera_device *); | 74 | void (*put_formats)(struct soc_camera_device *); |
72 | int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *); | 75 | int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *); |
diff --git a/include/media/tuner.h b/include/media/tuner.h index 5505c5360ca3..51811eac46f1 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -130,6 +130,7 @@ | |||
130 | #define TUNER_PHILIPS_CU1216L 82 | 130 | #define TUNER_PHILIPS_CU1216L 82 |
131 | #define TUNER_NXP_TDA18271 83 | 131 | #define TUNER_NXP_TDA18271 83 |
132 | #define TUNER_SONY_BTF_PXN01Z 84 | 132 | #define TUNER_SONY_BTF_PXN01Z 84 |
133 | #define TUNER_PHILIPS_FQ1236_MK5 85 /* NTSC, TDA9885, no FM radio */ | ||
133 | 134 | ||
134 | /* tv card specific */ | 135 | /* tv card specific */ |
135 | #define TDA9887_PRESENT (1<<0) | 136 | #define TDA9887_PRESENT (1<<0) |
diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 0dbe02ada259..f0cf2e7def06 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h | |||
@@ -24,10 +24,10 @@ | |||
24 | */ | 24 | */ |
25 | enum v4l2_mbus_pixelcode { | 25 | enum v4l2_mbus_pixelcode { |
26 | V4L2_MBUS_FMT_FIXED = 1, | 26 | V4L2_MBUS_FMT_FIXED = 1, |
27 | V4L2_MBUS_FMT_YUYV8_2X8_LE, | 27 | V4L2_MBUS_FMT_YUYV8_2X8, |
28 | V4L2_MBUS_FMT_YVYU8_2X8_LE, | 28 | V4L2_MBUS_FMT_YVYU8_2X8, |
29 | V4L2_MBUS_FMT_YUYV8_2X8_BE, | 29 | V4L2_MBUS_FMT_UYVY8_2X8, |
30 | V4L2_MBUS_FMT_YVYU8_2X8_BE, | 30 | V4L2_MBUS_FMT_VYUY8_2X8, |
31 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, | 31 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, |
32 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE, | 32 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE, |
33 | V4L2_MBUS_FMT_RGB565_2X8_LE, | 33 | V4L2_MBUS_FMT_RGB565_2X8_LE, |
@@ -40,6 +40,12 @@ enum v4l2_mbus_pixelcode { | |||
40 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE, | 40 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE, |
41 | V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE, | 41 | V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE, |
42 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE, | 42 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE, |
43 | V4L2_MBUS_FMT_SGRBG8_1X8, | ||
44 | V4L2_MBUS_FMT_SBGGR12_1X12, | ||
45 | V4L2_MBUS_FMT_YUYV8_1_5X8, | ||
46 | V4L2_MBUS_FMT_YVYU8_1_5X8, | ||
47 | V4L2_MBUS_FMT_UYVY8_1_5X8, | ||
48 | V4L2_MBUS_FMT_VYUY8_1_5X8, | ||
43 | }; | 49 | }; |
44 | 50 | ||
45 | /** | 51 | /** |
@@ -58,4 +64,24 @@ struct v4l2_mbus_framefmt { | |||
58 | enum v4l2_colorspace colorspace; | 64 | enum v4l2_colorspace colorspace; |
59 | }; | 65 | }; |
60 | 66 | ||
67 | static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt, | ||
68 | const struct v4l2_mbus_framefmt *mbus_fmt) | ||
69 | { | ||
70 | pix_fmt->width = mbus_fmt->width; | ||
71 | pix_fmt->height = mbus_fmt->height; | ||
72 | pix_fmt->field = mbus_fmt->field; | ||
73 | pix_fmt->colorspace = mbus_fmt->colorspace; | ||
74 | } | ||
75 | |||
76 | static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt, | ||
77 | const struct v4l2_pix_format *pix_fmt, | ||
78 | enum v4l2_mbus_pixelcode code) | ||
79 | { | ||
80 | mbus_fmt->width = pix_fmt->width; | ||
81 | mbus_fmt->height = pix_fmt->height; | ||
82 | mbus_fmt->field = pix_fmt->field; | ||
83 | mbus_fmt->colorspace = pix_fmt->colorspace; | ||
84 | mbus_fmt->code = code; | ||
85 | } | ||
86 | |||
61 | #endif | 87 | #endif |
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index a88889355ae0..02c6f4d11ed3 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -246,7 +246,7 @@ struct v4l2_subdev_video_ops { | |||
246 | struct v4l2_dv_timings *timings); | 246 | struct v4l2_dv_timings *timings); |
247 | int (*g_dv_timings)(struct v4l2_subdev *sd, | 247 | int (*g_dv_timings)(struct v4l2_subdev *sd, |
248 | struct v4l2_dv_timings *timings); | 248 | struct v4l2_dv_timings *timings); |
249 | int (*enum_mbus_fmt)(struct v4l2_subdev *sd, int index, | 249 | int (*enum_mbus_fmt)(struct v4l2_subdev *sd, unsigned int index, |
250 | enum v4l2_mbus_pixelcode *code); | 250 | enum v4l2_mbus_pixelcode *code); |
251 | int (*g_mbus_fmt)(struct v4l2_subdev *sd, | 251 | int (*g_mbus_fmt)(struct v4l2_subdev *sd, |
252 | struct v4l2_mbus_framefmt *fmt); | 252 | struct v4l2_mbus_framefmt *fmt); |
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h index f91a736c133d..f2c41cebf453 100644 --- a/include/media/videobuf-core.h +++ b/include/media/videobuf-core.h | |||
@@ -54,8 +54,6 @@ struct videobuf_queue; | |||
54 | 54 | ||
55 | struct videobuf_mapping { | 55 | struct videobuf_mapping { |
56 | unsigned int count; | 56 | unsigned int count; |
57 | unsigned long start; | ||
58 | unsigned long end; | ||
59 | struct videobuf_queue *q; | 57 | struct videobuf_queue *q; |
60 | }; | 58 | }; |
61 | 59 | ||
@@ -127,7 +125,7 @@ struct videobuf_queue_ops { | |||
127 | struct videobuf_qtype_ops { | 125 | struct videobuf_qtype_ops { |
128 | u32 magic; | 126 | u32 magic; |
129 | 127 | ||
130 | struct videobuf_buffer *(*alloc)(size_t size); | 128 | struct videobuf_buffer *(*alloc_vb)(size_t size); |
131 | void *(*vaddr) (struct videobuf_buffer *buf); | 129 | void *(*vaddr) (struct videobuf_buffer *buf); |
132 | int (*iolock) (struct videobuf_queue *q, | 130 | int (*iolock) (struct videobuf_queue *q, |
133 | struct videobuf_buffer *vb, | 131 | struct videobuf_buffer *vb, |
@@ -173,7 +171,7 @@ int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr); | |||
173 | int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb, | 171 | int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb, |
174 | struct v4l2_framebuffer *fbuf); | 172 | struct v4l2_framebuffer *fbuf); |
175 | 173 | ||
176 | struct videobuf_buffer *videobuf_alloc(struct videobuf_queue *q); | 174 | struct videobuf_buffer *videobuf_alloc_vb(struct videobuf_queue *q); |
177 | 175 | ||
178 | /* Used on videobuf-dvb */ | 176 | /* Used on videobuf-dvb */ |
179 | void *videobuf_queue_to_vaddr(struct videobuf_queue *q, | 177 | void *videobuf_queue_to_vaddr(struct videobuf_queue *q, |
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h index a195f3b9c00a..97e07f46a0fa 100644 --- a/include/media/videobuf-dma-sg.h +++ b/include/media/videobuf-dma-sg.h | |||
@@ -25,23 +25,6 @@ | |||
25 | /* --------------------------------------------------------------------- */ | 25 | /* --------------------------------------------------------------------- */ |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Return a scatterlist for some page-aligned vmalloc()'ed memory | ||
29 | * block (NULL on errors). Memory for the scatterlist is allocated | ||
30 | * using kmalloc. The caller must free the memory. | ||
31 | */ | ||
32 | struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages); | ||
33 | |||
34 | /* | ||
35 | * Return a scatterlist for a an array of userpages (NULL on errors). | ||
36 | * Memory for the scatterlist is allocated using kmalloc. The caller | ||
37 | * must free the memory. | ||
38 | */ | ||
39 | struct scatterlist *videobuf_pages_to_sg(struct page **pages, int nr_pages, | ||
40 | int offset); | ||
41 | |||
42 | /* --------------------------------------------------------------------- */ | ||
43 | |||
44 | /* | ||
45 | * A small set of helper functions to manage buffers (both userland | 28 | * A small set of helper functions to manage buffers (both userland |
46 | * and kernel) for DMA. | 29 | * and kernel) for DMA. |
47 | * | 30 | * |
@@ -68,7 +51,7 @@ struct videobuf_dmabuf { | |||
68 | struct page **pages; | 51 | struct page **pages; |
69 | 52 | ||
70 | /* for kernel buffers */ | 53 | /* for kernel buffers */ |
71 | void *vmalloc; | 54 | void *vaddr; |
72 | 55 | ||
73 | /* for overlay buffers (pci-pci dma) */ | 56 | /* for overlay buffers (pci-pci dma) */ |
74 | dma_addr_t bus_addr; | 57 | dma_addr_t bus_addr; |
@@ -87,6 +70,16 @@ struct videobuf_dma_sg_memory { | |||
87 | struct videobuf_dmabuf dma; | 70 | struct videobuf_dmabuf dma; |
88 | }; | 71 | }; |
89 | 72 | ||
73 | /* | ||
74 | * Scatter-gather DMA buffer API. | ||
75 | * | ||
76 | * These functions provide a simple way to create a page list and a | ||
77 | * scatter-gather list from a kernel, userspace of physical address and map the | ||
78 | * memory for DMA operation. | ||
79 | * | ||
80 | * Despite the name, this is totally unrelated to videobuf, except that | ||
81 | * videobuf-dma-sg uses the same API internally. | ||
82 | */ | ||
90 | void videobuf_dma_init(struct videobuf_dmabuf *dma); | 83 | void videobuf_dma_init(struct videobuf_dmabuf *dma); |
91 | int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction, | 84 | int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction, |
92 | unsigned long data, unsigned long size); | 85 | unsigned long data, unsigned long size); |
@@ -96,8 +89,8 @@ int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction, | |||
96 | dma_addr_t addr, int nr_pages); | 89 | dma_addr_t addr, int nr_pages); |
97 | int videobuf_dma_free(struct videobuf_dmabuf *dma); | 90 | int videobuf_dma_free(struct videobuf_dmabuf *dma); |
98 | 91 | ||
99 | int videobuf_dma_map(struct videobuf_queue *q, struct videobuf_dmabuf *dma); | 92 | int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma); |
100 | int videobuf_dma_unmap(struct videobuf_queue *q, struct videobuf_dmabuf *dma); | 93 | int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma); |
101 | struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); | 94 | struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); |
102 | 95 | ||
103 | void *videobuf_sg_alloc(size_t size); | 96 | void *videobuf_sg_alloc(size_t size); |
@@ -111,11 +104,5 @@ void videobuf_queue_sg_init(struct videobuf_queue *q, | |||
111 | unsigned int msize, | 104 | unsigned int msize, |
112 | void *priv); | 105 | void *priv); |
113 | 106 | ||
114 | /*FIXME: these variants are used only on *-alsa code, where videobuf is | ||
115 | * used without queue | ||
116 | */ | ||
117 | int videobuf_sg_dma_map(struct device *dev, struct videobuf_dmabuf *dma); | ||
118 | int videobuf_sg_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma); | ||
119 | |||
120 | #endif /* _VIDEOBUF_DMA_SG_H */ | 107 | #endif /* _VIDEOBUF_DMA_SG_H */ |
121 | 108 | ||
diff --git a/include/media/videobuf-vmalloc.h b/include/media/videobuf-vmalloc.h index 851eb1a2ff2a..e19403c18dae 100644 --- a/include/media/videobuf-vmalloc.h +++ b/include/media/videobuf-vmalloc.h | |||
@@ -22,7 +22,7 @@ | |||
22 | struct videobuf_vmalloc_memory { | 22 | struct videobuf_vmalloc_memory { |
23 | u32 magic; | 23 | u32 magic; |
24 | 24 | ||
25 | void *vmalloc; | 25 | void *vaddr; |
26 | 26 | ||
27 | /* remap_vmalloc_range seems to need to run | 27 | /* remap_vmalloc_range seems to need to run |
28 | * after mmap() on some cases */ | 28 | * after mmap() on some cases */ |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 156c26bb8bd7..a8de812ccbc8 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -88,8 +88,16 @@ do { \ | |||
88 | * enum p9_msg_t - 9P message types | 88 | * enum p9_msg_t - 9P message types |
89 | * @P9_TSTATFS: file system status request | 89 | * @P9_TSTATFS: file system status request |
90 | * @P9_RSTATFS: file system status response | 90 | * @P9_RSTATFS: file system status response |
91 | * @P9_TSYMLINK: make symlink request | ||
92 | * @P9_RSYMLINK: make symlink response | ||
93 | * @P9_TMKNOD: create a special file object request | ||
94 | * @P9_RMKNOD: create a special file object response | ||
95 | * @P9_TLCREATE: prepare a handle for I/O on an new file for 9P2000.L | ||
96 | * @P9_RLCREATE: response with file access information for 9P2000.L | ||
91 | * @P9_TRENAME: rename request | 97 | * @P9_TRENAME: rename request |
92 | * @P9_RRENAME: rename response | 98 | * @P9_RRENAME: rename response |
99 | * @P9_TMKDIR: create a directory request | ||
100 | * @P9_RMKDIR: create a directory response | ||
93 | * @P9_TVERSION: version handshake request | 101 | * @P9_TVERSION: version handshake request |
94 | * @P9_RVERSION: version handshake response | 102 | * @P9_RVERSION: version handshake response |
95 | * @P9_TAUTH: request to establish authentication channel | 103 | * @P9_TAUTH: request to establish authentication channel |
@@ -131,8 +139,30 @@ do { \ | |||
131 | enum p9_msg_t { | 139 | enum p9_msg_t { |
132 | P9_TSTATFS = 8, | 140 | P9_TSTATFS = 8, |
133 | P9_RSTATFS, | 141 | P9_RSTATFS, |
142 | P9_TLOPEN = 12, | ||
143 | P9_RLOPEN, | ||
144 | P9_TLCREATE = 14, | ||
145 | P9_RLCREATE, | ||
146 | P9_TSYMLINK = 16, | ||
147 | P9_RSYMLINK, | ||
148 | P9_TMKNOD = 18, | ||
149 | P9_RMKNOD, | ||
134 | P9_TRENAME = 20, | 150 | P9_TRENAME = 20, |
135 | P9_RRENAME, | 151 | P9_RRENAME, |
152 | P9_TGETATTR = 24, | ||
153 | P9_RGETATTR, | ||
154 | P9_TSETATTR = 26, | ||
155 | P9_RSETATTR, | ||
156 | P9_TXATTRWALK = 30, | ||
157 | P9_RXATTRWALK, | ||
158 | P9_TXATTRCREATE = 32, | ||
159 | P9_RXATTRCREATE, | ||
160 | P9_TREADDIR = 40, | ||
161 | P9_RREADDIR, | ||
162 | P9_TLINK = 70, | ||
163 | P9_RLINK, | ||
164 | P9_TMKDIR = 72, | ||
165 | P9_RMKDIR, | ||
136 | P9_TVERSION = 100, | 166 | P9_TVERSION = 100, |
137 | P9_RVERSION, | 167 | P9_RVERSION, |
138 | P9_TAUTH = 102, | 168 | P9_TAUTH = 102, |
@@ -275,6 +305,9 @@ enum p9_qid_t { | |||
275 | /* ample room for Twrite/Rread header */ | 305 | /* ample room for Twrite/Rread header */ |
276 | #define P9_IOHDRSZ 24 | 306 | #define P9_IOHDRSZ 24 |
277 | 307 | ||
308 | /* Room for readdir header */ | ||
309 | #define P9_READDIRHDRSZ 24 | ||
310 | |||
278 | /** | 311 | /** |
279 | * struct p9_str - length prefixed string type | 312 | * struct p9_str - length prefixed string type |
280 | * @len: length of the string | 313 | * @len: length of the string |
@@ -357,6 +390,74 @@ struct p9_wstat { | |||
357 | u32 n_muid; /* 9p2000.u extensions */ | 390 | u32 n_muid; /* 9p2000.u extensions */ |
358 | }; | 391 | }; |
359 | 392 | ||
393 | struct p9_stat_dotl { | ||
394 | u64 st_result_mask; | ||
395 | struct p9_qid qid; | ||
396 | u32 st_mode; | ||
397 | u32 st_uid; | ||
398 | u32 st_gid; | ||
399 | u64 st_nlink; | ||
400 | u64 st_rdev; | ||
401 | u64 st_size; | ||
402 | u64 st_blksize; | ||
403 | u64 st_blocks; | ||
404 | u64 st_atime_sec; | ||
405 | u64 st_atime_nsec; | ||
406 | u64 st_mtime_sec; | ||
407 | u64 st_mtime_nsec; | ||
408 | u64 st_ctime_sec; | ||
409 | u64 st_ctime_nsec; | ||
410 | u64 st_btime_sec; | ||
411 | u64 st_btime_nsec; | ||
412 | u64 st_gen; | ||
413 | u64 st_data_version; | ||
414 | }; | ||
415 | |||
416 | #define P9_STATS_MODE 0x00000001ULL | ||
417 | #define P9_STATS_NLINK 0x00000002ULL | ||
418 | #define P9_STATS_UID 0x00000004ULL | ||
419 | #define P9_STATS_GID 0x00000008ULL | ||
420 | #define P9_STATS_RDEV 0x00000010ULL | ||
421 | #define P9_STATS_ATIME 0x00000020ULL | ||
422 | #define P9_STATS_MTIME 0x00000040ULL | ||
423 | #define P9_STATS_CTIME 0x00000080ULL | ||
424 | #define P9_STATS_INO 0x00000100ULL | ||
425 | #define P9_STATS_SIZE 0x00000200ULL | ||
426 | #define P9_STATS_BLOCKS 0x00000400ULL | ||
427 | |||
428 | #define P9_STATS_BTIME 0x00000800ULL | ||
429 | #define P9_STATS_GEN 0x00001000ULL | ||
430 | #define P9_STATS_DATA_VERSION 0x00002000ULL | ||
431 | |||
432 | #define P9_STATS_BASIC 0x000007ffULL /* Mask for fields up to BLOCKS */ | ||
433 | #define P9_STATS_ALL 0x00003fffULL /* Mask for All fields above */ | ||
434 | |||
435 | /** | ||
436 | * struct p9_iattr_dotl - P9 inode attribute for setattr | ||
437 | * @valid: bitfield specifying which fields are valid | ||
438 | * same as in struct iattr | ||
439 | * @mode: File permission bits | ||
440 | * @uid: user id of owner | ||
441 | * @gid: group id | ||
442 | * @size: File size | ||
443 | * @atime_sec: Last access time, seconds | ||
444 | * @atime_nsec: Last access time, nanoseconds | ||
445 | * @mtime_sec: Last modification time, seconds | ||
446 | * @mtime_nsec: Last modification time, nanoseconds | ||
447 | */ | ||
448 | |||
449 | struct p9_iattr_dotl { | ||
450 | u32 valid; | ||
451 | u32 mode; | ||
452 | u32 uid; | ||
453 | u32 gid; | ||
454 | u64 size; | ||
455 | u64 atime_sec; | ||
456 | u64 atime_nsec; | ||
457 | u64 mtime_sec; | ||
458 | u64 mtime_nsec; | ||
459 | }; | ||
460 | |||
360 | /* Structures for Protocol Operations */ | 461 | /* Structures for Protocol Operations */ |
361 | struct p9_tstatfs { | 462 | struct p9_tstatfs { |
362 | u32 fid; | 463 | u32 fid; |
@@ -485,6 +586,18 @@ struct p9_rwrite { | |||
485 | u32 count; | 586 | u32 count; |
486 | }; | 587 | }; |
487 | 588 | ||
589 | struct p9_treaddir { | ||
590 | u32 fid; | ||
591 | u64 offset; | ||
592 | u32 count; | ||
593 | }; | ||
594 | |||
595 | struct p9_rreaddir { | ||
596 | u32 count; | ||
597 | u8 *data; | ||
598 | }; | ||
599 | |||
600 | |||
488 | struct p9_tclunk { | 601 | struct p9_tclunk { |
489 | u32 fid; | 602 | u32 fid; |
490 | }; | 603 | }; |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 7dd3ed85c782..d1aa2cfb30f0 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -195,6 +195,21 @@ struct p9_fid { | |||
195 | struct list_head dlist; /* list of all fids attached to a dentry */ | 195 | struct list_head dlist; /* list of all fids attached to a dentry */ |
196 | }; | 196 | }; |
197 | 197 | ||
198 | /** | ||
199 | * struct p9_dirent - directory entry structure | ||
200 | * @qid: The p9 server qid for this dirent | ||
201 | * @d_off: offset to the next dirent | ||
202 | * @d_type: type of file | ||
203 | * @d_name: file name | ||
204 | */ | ||
205 | |||
206 | struct p9_dirent { | ||
207 | struct p9_qid qid; | ||
208 | u64 d_off; | ||
209 | unsigned char d_type; | ||
210 | char d_name[256]; | ||
211 | }; | ||
212 | |||
198 | int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb); | 213 | int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb); |
199 | int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, char *name); | 214 | int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, char *name); |
200 | int p9_client_version(struct p9_client *); | 215 | int p9_client_version(struct p9_client *); |
@@ -211,15 +226,31 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | |||
211 | int p9_client_open(struct p9_fid *fid, int mode); | 226 | int p9_client_open(struct p9_fid *fid, int mode); |
212 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, | 227 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, |
213 | char *extension); | 228 | char *extension); |
229 | int p9_client_link(struct p9_fid *fid, struct p9_fid *oldfid, char *newname); | ||
230 | int p9_client_symlink(struct p9_fid *fid, char *name, char *symname, gid_t gid, | ||
231 | struct p9_qid *qid); | ||
232 | int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, | ||
233 | gid_t gid, struct p9_qid *qid); | ||
214 | int p9_client_clunk(struct p9_fid *fid); | 234 | int p9_client_clunk(struct p9_fid *fid); |
215 | int p9_client_remove(struct p9_fid *fid); | 235 | int p9_client_remove(struct p9_fid *fid); |
216 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, | 236 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
217 | u64 offset, u32 count); | 237 | u64 offset, u32 count); |
218 | int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata, | 238 | int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata, |
219 | u64 offset, u32 count); | 239 | u64 offset, u32 count); |
240 | int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset); | ||
241 | int p9dirent_read(char *buf, int len, struct p9_dirent *dirent, | ||
242 | int proto_version); | ||
220 | struct p9_wstat *p9_client_stat(struct p9_fid *fid); | 243 | struct p9_wstat *p9_client_stat(struct p9_fid *fid); |
221 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); | 244 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); |
245 | int p9_client_setattr(struct p9_fid *fid, struct p9_iattr_dotl *attr); | ||
246 | |||
247 | struct p9_stat_dotl *p9_client_getattr_dotl(struct p9_fid *fid, | ||
248 | u64 request_mask); | ||
222 | 249 | ||
250 | int p9_client_mknod_dotl(struct p9_fid *oldfid, char *name, int mode, | ||
251 | dev_t rdev, gid_t gid, struct p9_qid *); | ||
252 | int p9_client_mkdir_dotl(struct p9_fid *fid, char *name, int mode, | ||
253 | gid_t gid, struct p9_qid *); | ||
223 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); | 254 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); |
224 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); | 255 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); |
225 | 256 | ||
@@ -229,5 +260,7 @@ void p9stat_free(struct p9_wstat *); | |||
229 | 260 | ||
230 | int p9_is_proto_dotu(struct p9_client *clnt); | 261 | int p9_is_proto_dotu(struct p9_client *clnt); |
231 | int p9_is_proto_dotl(struct p9_client *clnt); | 262 | int p9_is_proto_dotl(struct p9_client *clnt); |
263 | struct p9_fid *p9_client_xattrwalk(struct p9_fid *, const char *, u64 *); | ||
264 | int p9_client_xattrcreate(struct p9_fid *, const char *, u64, int); | ||
232 | 265 | ||
233 | #endif /* NET_9P_CLIENT_H */ | 266 | #endif /* NET_9P_CLIENT_H */ |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 636724b203ee..6c241444f902 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -33,9 +33,9 @@ | |||
33 | #define L2CAP_DEFAULT_FLUSH_TO 0xffff | 33 | #define L2CAP_DEFAULT_FLUSH_TO 0xffff |
34 | #define L2CAP_DEFAULT_TX_WINDOW 63 | 34 | #define L2CAP_DEFAULT_TX_WINDOW 63 |
35 | #define L2CAP_DEFAULT_MAX_TX 3 | 35 | #define L2CAP_DEFAULT_MAX_TX 3 |
36 | #define L2CAP_DEFAULT_RETRANS_TO 1000 /* 1 second */ | 36 | #define L2CAP_DEFAULT_RETRANS_TO 2000 /* 2 seconds */ |
37 | #define L2CAP_DEFAULT_MONITOR_TO 12000 /* 12 seconds */ | 37 | #define L2CAP_DEFAULT_MONITOR_TO 12000 /* 12 seconds */ |
38 | #define L2CAP_DEFAULT_MAX_PDU_SIZE 672 | 38 | #define L2CAP_DEFAULT_MAX_PDU_SIZE 1009 /* Sized for 3-DH5 packet */ |
39 | #define L2CAP_DEFAULT_ACK_TO 200 | 39 | #define L2CAP_DEFAULT_ACK_TO 200 |
40 | #define L2CAP_LOCAL_BUSY_TRIES 12 | 40 | #define L2CAP_LOCAL_BUSY_TRIES 12 |
41 | 41 | ||
diff --git a/include/scsi/fc/fc_els.h b/include/scsi/fc/fc_els.h index f94328132a26..481abbd48e39 100644 --- a/include/scsi/fc/fc_els.h +++ b/include/scsi/fc/fc_els.h | |||
@@ -191,6 +191,7 @@ enum fc_els_rjt_reason { | |||
191 | ELS_RJT_UNAB = 0x09, /* unable to perform command request */ | 191 | ELS_RJT_UNAB = 0x09, /* unable to perform command request */ |
192 | ELS_RJT_UNSUP = 0x0b, /* command not supported */ | 192 | ELS_RJT_UNSUP = 0x0b, /* command not supported */ |
193 | ELS_RJT_INPROG = 0x0e, /* command already in progress */ | 193 | ELS_RJT_INPROG = 0x0e, /* command already in progress */ |
194 | ELS_RJT_FIP = 0x20, /* FIP error */ | ||
194 | ELS_RJT_VENDOR = 0xff, /* vendor specific error */ | 195 | ELS_RJT_VENDOR = 0xff, /* vendor specific error */ |
195 | }; | 196 | }; |
196 | 197 | ||
@@ -212,6 +213,7 @@ enum fc_els_rjt_explan { | |||
212 | ELS_EXPL_UNAB_DATA = 0x2a, /* unable to supply requested data */ | 213 | ELS_EXPL_UNAB_DATA = 0x2a, /* unable to supply requested data */ |
213 | ELS_EXPL_UNSUPR = 0x2c, /* Request not supported */ | 214 | ELS_EXPL_UNSUPR = 0x2c, /* Request not supported */ |
214 | ELS_EXPL_INV_LEN = 0x2d, /* Invalid payload length */ | 215 | ELS_EXPL_INV_LEN = 0x2d, /* Invalid payload length */ |
216 | ELS_EXPL_NOT_NEIGHBOR = 0x62, /* VN2VN_Port not in neighbor set */ | ||
215 | /* TBD - above definitions incomplete */ | 217 | /* TBD - above definitions incomplete */ |
216 | }; | 218 | }; |
217 | 219 | ||
@@ -405,6 +407,15 @@ struct fc_els_prli { | |||
405 | }; | 407 | }; |
406 | 408 | ||
407 | /* | 409 | /* |
410 | * ELS_PRLO - Process logout request and response. | ||
411 | */ | ||
412 | struct fc_els_prlo { | ||
413 | __u8 prlo_cmd; /* command */ | ||
414 | __u8 prlo_obs; /* obsolete, but shall be set to 10h */ | ||
415 | __be16 prlo_len; /* payload length */ | ||
416 | }; | ||
417 | |||
418 | /* | ||
408 | * ELS_ADISC payload | 419 | * ELS_ADISC payload |
409 | */ | 420 | */ |
410 | struct fc_els_adisc { | 421 | struct fc_els_adisc { |
diff --git a/include/scsi/fc/fc_fcoe.h b/include/scsi/fc/fc_fcoe.h index e6ad3d2ae475..d5dcd6062815 100644 --- a/include/scsi/fc/fc_fcoe.h +++ b/include/scsi/fc/fc_fcoe.h | |||
@@ -22,23 +22,18 @@ | |||
22 | 22 | ||
23 | /* | 23 | /* |
24 | * FCoE - Fibre Channel over Ethernet. | 24 | * FCoE - Fibre Channel over Ethernet. |
25 | * See T11 FC-BB-5 Rev 2.00 (09-056v5.pdf) | ||
25 | */ | 26 | */ |
26 | 27 | ||
27 | /* | 28 | /* |
28 | * FC_FCOE_OUI hasn't been standardized yet. XXX TBD. | 29 | * Default FC_FCOE_OUI / FC-MAP value. |
29 | */ | 30 | */ |
30 | #ifndef FC_FCOE_OUI | 31 | #define FC_FCOE_OUI 0x0efc00 /* upper 24 bits of FCOE MAC */ |
31 | #define FC_FCOE_OUI 0x0efc00 /* upper 24 bits of FCOE dest MAC TBD */ | ||
32 | #endif | ||
33 | 32 | ||
34 | /* | 33 | /* |
35 | * The destination MAC address for the fabric login may get a different OUI. | 34 | * Fabric Login (FLOGI) MAC for non-FIP use. Non-FIP use is deprecated. |
36 | * This isn't standardized yet. | ||
37 | */ | 35 | */ |
38 | #ifndef FC_FCOE_FLOGI_MAC | ||
39 | /* gateway MAC - TBD */ | ||
40 | #define FC_FCOE_FLOGI_MAC { 0x0e, 0xfc, 0x00, 0xff, 0xff, 0xfe } | 36 | #define FC_FCOE_FLOGI_MAC { 0x0e, 0xfc, 0x00, 0xff, 0xff, 0xfe } |
41 | #endif | ||
42 | 37 | ||
43 | #define FC_FCOE_VER 0 /* version */ | 38 | #define FC_FCOE_VER 0 /* version */ |
44 | 39 | ||
@@ -51,8 +46,6 @@ | |||
51 | 46 | ||
52 | /* | 47 | /* |
53 | * FCoE frame header - 14 bytes | 48 | * FCoE frame header - 14 bytes |
54 | * | ||
55 | * This is the August 2007 version of the FCoE header as defined by T11. | ||
56 | * This follows the VLAN header, which includes the ethertype. | 49 | * This follows the VLAN header, which includes the ethertype. |
57 | */ | 50 | */ |
58 | struct fcoe_hdr { | 51 | struct fcoe_hdr { |
diff --git a/include/scsi/fc/fc_fip.h b/include/scsi/fc/fc_fip.h index 17baa19380f0..ae25d4ab2548 100644 --- a/include/scsi/fc/fc_fip.h +++ b/include/scsi/fc/fc_fip.h | |||
@@ -17,9 +17,12 @@ | |||
17 | #ifndef _FC_FIP_H_ | 17 | #ifndef _FC_FIP_H_ |
18 | #define _FC_FIP_H_ | 18 | #define _FC_FIP_H_ |
19 | 19 | ||
20 | #include <scsi/fc/fc_ns.h> | ||
21 | |||
20 | /* | 22 | /* |
21 | * This version is based on: | 23 | * This version is based on: |
22 | * http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf | 24 | * http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf |
25 | * and T11 FC-BB-6 10-019v4.pdf (June 2010 VN2VN proposal) | ||
23 | */ | 26 | */ |
24 | 27 | ||
25 | #define FIP_DEF_PRI 128 /* default selection priority */ | 28 | #define FIP_DEF_PRI 128 /* default selection priority */ |
@@ -29,11 +32,24 @@ | |||
29 | #define FIP_FCF_FUZZ 100 /* random time added by FCF (mS) */ | 32 | #define FIP_FCF_FUZZ 100 /* random time added by FCF (mS) */ |
30 | 33 | ||
31 | /* | 34 | /* |
35 | * VN2VN proposed-standard values. | ||
36 | */ | ||
37 | #define FIP_VN_FC_MAP 0x0efd00 /* MAC OUI for VN2VN use */ | ||
38 | #define FIP_VN_PROBE_WAIT 100 /* interval between VN2VN probes (ms) */ | ||
39 | #define FIP_VN_ANN_WAIT 400 /* interval between VN2VN announcements (ms) */ | ||
40 | #define FIP_VN_RLIM_INT 10000 /* interval between probes when rate limited */ | ||
41 | #define FIP_VN_RLIM_COUNT 10 /* number of probes before rate limiting */ | ||
42 | #define FIP_VN_BEACON_INT 8000 /* interval between VN2VN beacons */ | ||
43 | #define FIP_VN_BEACON_FUZZ 100 /* random time to add to beacon period (ms) */ | ||
44 | |||
45 | /* | ||
32 | * Multicast MAC addresses. T11-adopted. | 46 | * Multicast MAC addresses. T11-adopted. |
33 | */ | 47 | */ |
34 | #define FIP_ALL_FCOE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 0 }) | 48 | #define FIP_ALL_FCOE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 0 }) |
35 | #define FIP_ALL_ENODE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 1 }) | 49 | #define FIP_ALL_ENODE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 1 }) |
36 | #define FIP_ALL_FCF_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 2 }) | 50 | #define FIP_ALL_FCF_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 2 }) |
51 | #define FIP_ALL_VN2VN_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 4 }) | ||
52 | #define FIP_ALL_P2P_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 5 }) | ||
37 | 53 | ||
38 | #define FIP_VER 1 /* version for fip_header */ | 54 | #define FIP_VER 1 /* version for fip_header */ |
39 | 55 | ||
@@ -60,6 +76,7 @@ enum fip_opcode { | |||
60 | FIP_OP_LS = 2, /* Link Service request or reply */ | 76 | FIP_OP_LS = 2, /* Link Service request or reply */ |
61 | FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */ | 77 | FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */ |
62 | FIP_OP_VLAN = 4, /* VLAN discovery */ | 78 | FIP_OP_VLAN = 4, /* VLAN discovery */ |
79 | FIP_OP_VN2VN = 5, /* VN2VN operation */ | ||
63 | FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */ | 80 | FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */ |
64 | FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */ | 81 | FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */ |
65 | }; | 82 | }; |
@@ -97,11 +114,23 @@ enum fip_vlan_subcode { | |||
97 | }; | 114 | }; |
98 | 115 | ||
99 | /* | 116 | /* |
117 | * Subcodes for FIP_OP_VN2VN. | ||
118 | */ | ||
119 | enum fip_vn2vn_subcode { | ||
120 | FIP_SC_VN_PROBE_REQ = 1, /* probe request */ | ||
121 | FIP_SC_VN_PROBE_REP = 2, /* probe reply */ | ||
122 | FIP_SC_VN_CLAIM_NOTIFY = 3, /* claim notification */ | ||
123 | FIP_SC_VN_CLAIM_REP = 4, /* claim response */ | ||
124 | FIP_SC_VN_BEACON = 5, /* beacon */ | ||
125 | }; | ||
126 | |||
127 | /* | ||
100 | * flags in header fip_flags. | 128 | * flags in header fip_flags. |
101 | */ | 129 | */ |
102 | enum fip_flag { | 130 | enum fip_flag { |
103 | FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */ | 131 | FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */ |
104 | FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */ | 132 | FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */ |
133 | FIP_FL_REC_OR_P2P = 0x0008, /* configured addr or point-to-point */ | ||
105 | FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */ | 134 | FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */ |
106 | FIP_FL_SOL = 0x0002, /* this is a solicited message */ | 135 | FIP_FL_SOL = 0x0002, /* this is a solicited message */ |
107 | FIP_FL_FPORT = 0x0001, /* sent from an F port */ | 136 | FIP_FL_FPORT = 0x0001, /* sent from an F port */ |
@@ -130,6 +159,7 @@ enum fip_desc_type { | |||
130 | FIP_DT_FKA = 12, /* advertisement keep-alive period */ | 159 | FIP_DT_FKA = 12, /* advertisement keep-alive period */ |
131 | FIP_DT_VENDOR = 13, /* vendor ID */ | 160 | FIP_DT_VENDOR = 13, /* vendor ID */ |
132 | FIP_DT_VLAN = 14, /* vlan number */ | 161 | FIP_DT_VLAN = 14, /* vlan number */ |
162 | FIP_DT_FC4F = 15, /* FC-4 features */ | ||
133 | FIP_DT_LIMIT, /* max defined desc_type + 1 */ | 163 | FIP_DT_LIMIT, /* max defined desc_type + 1 */ |
134 | FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */ | 164 | FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */ |
135 | }; | 165 | }; |
@@ -229,6 +259,16 @@ enum fip_fka_flags { | |||
229 | /* FIP_DT_FKA flags */ | 259 | /* FIP_DT_FKA flags */ |
230 | 260 | ||
231 | /* | 261 | /* |
262 | * FIP_DT_FC4F - FC-4 features. | ||
263 | */ | ||
264 | struct fip_fc4_feat { | ||
265 | struct fip_desc fd_desc; | ||
266 | __u8 fd_resvd[2]; | ||
267 | struct fc_ns_fts fd_fts; | ||
268 | struct fc_ns_ff fd_ff; | ||
269 | } __attribute__((packed)); | ||
270 | |||
271 | /* | ||
232 | * FIP_DT_VENDOR descriptor. | 272 | * FIP_DT_VENDOR descriptor. |
233 | */ | 273 | */ |
234 | struct fip_vendor_desc { | 274 | struct fip_vendor_desc { |
diff --git a/include/scsi/fc/fc_ns.h b/include/scsi/fc/fc_ns.h index e7d3ac497d7d..185015dd1166 100644 --- a/include/scsi/fc/fc_ns.h +++ b/include/scsi/fc/fc_ns.h | |||
@@ -100,6 +100,13 @@ struct fc_ns_fts { | |||
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * FC4-features object. | ||
104 | */ | ||
105 | struct fc_ns_ff { | ||
106 | __be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW]; /* 4-bits per FC-type */ | ||
107 | }; | ||
108 | |||
109 | /* | ||
103 | * GID_PT request. | 110 | * GID_PT request. |
104 | */ | 111 | */ |
105 | struct fc_ns_gid_pt { | 112 | struct fc_ns_gid_pt { |
diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h index 9b4867c9c2d2..6d293c846a46 100644 --- a/include/scsi/fc_encode.h +++ b/include/scsi/fc_encode.h | |||
@@ -21,6 +21,13 @@ | |||
21 | #define _FC_ENCODE_H_ | 21 | #define _FC_ENCODE_H_ |
22 | #include <asm/unaligned.h> | 22 | #include <asm/unaligned.h> |
23 | 23 | ||
24 | /* | ||
25 | * F_CTL values for simple requests and responses. | ||
26 | */ | ||
27 | #define FC_FCTL_REQ (FC_FC_FIRST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT) | ||
28 | #define FC_FCTL_RESP (FC_FC_EX_CTX | FC_FC_LAST_SEQ | \ | ||
29 | FC_FC_END_SEQ | FC_FC_SEQ_INIT) | ||
30 | |||
24 | struct fc_ns_rft { | 31 | struct fc_ns_rft { |
25 | struct fc_ns_fid fid; /* port ID object */ | 32 | struct fc_ns_fid fid; /* port ID object */ |
26 | struct fc_ns_fts fts; /* FC4-types object */ | 33 | struct fc_ns_fts fts; /* FC4-types object */ |
diff --git a/include/scsi/fc_frame.h b/include/scsi/fc_frame.h index 4d3e9c7b7c57..4ad02041b667 100644 --- a/include/scsi/fc_frame.h +++ b/include/scsi/fc_frame.h | |||
@@ -30,6 +30,23 @@ | |||
30 | 30 | ||
31 | #include <linux/if_ether.h> | 31 | #include <linux/if_ether.h> |
32 | 32 | ||
33 | /* some helpful macros */ | ||
34 | |||
35 | #define ntohll(x) be64_to_cpu(x) | ||
36 | #define htonll(x) cpu_to_be64(x) | ||
37 | |||
38 | static inline u32 ntoh24(const u8 *p) | ||
39 | { | ||
40 | return (p[0] << 16) | (p[1] << 8) | p[2]; | ||
41 | } | ||
42 | |||
43 | static inline void hton24(u8 *p, u32 v) | ||
44 | { | ||
45 | p[0] = (v >> 16) & 0xff; | ||
46 | p[1] = (v >> 8) & 0xff; | ||
47 | p[2] = v & 0xff; | ||
48 | } | ||
49 | |||
33 | /* | 50 | /* |
34 | * The fc_frame interface is used to pass frame data between functions. | 51 | * The fc_frame interface is used to pass frame data between functions. |
35 | * The frame includes the data buffer, length, and SOF / EOF delimiter types. | 52 | * The frame includes the data buffer, length, and SOF / EOF delimiter types. |
@@ -51,6 +68,7 @@ | |||
51 | #define fr_sof(fp) (fr_cb(fp)->fr_sof) | 68 | #define fr_sof(fp) (fr_cb(fp)->fr_sof) |
52 | #define fr_eof(fp) (fr_cb(fp)->fr_eof) | 69 | #define fr_eof(fp) (fr_cb(fp)->fr_eof) |
53 | #define fr_flags(fp) (fr_cb(fp)->fr_flags) | 70 | #define fr_flags(fp) (fr_cb(fp)->fr_flags) |
71 | #define fr_encaps(fp) (fr_cb(fp)->fr_encaps) | ||
54 | #define fr_max_payload(fp) (fr_cb(fp)->fr_max_payload) | 72 | #define fr_max_payload(fp) (fr_cb(fp)->fr_max_payload) |
55 | #define fr_fsp(fp) (fr_cb(fp)->fr_fsp) | 73 | #define fr_fsp(fp) (fr_cb(fp)->fr_fsp) |
56 | #define fr_crc(fp) (fr_cb(fp)->fr_crc) | 74 | #define fr_crc(fp) (fr_cb(fp)->fr_crc) |
@@ -66,9 +84,10 @@ struct fcoe_rcv_info { | |||
66 | struct fc_fcp_pkt *fr_fsp; /* for the corresponding fcp I/O */ | 84 | struct fc_fcp_pkt *fr_fsp; /* for the corresponding fcp I/O */ |
67 | u32 fr_crc; | 85 | u32 fr_crc; |
68 | u16 fr_max_payload; /* max FC payload */ | 86 | u16 fr_max_payload; /* max FC payload */ |
69 | enum fc_sof fr_sof; /* start of frame delimiter */ | 87 | u8 fr_sof; /* start of frame delimiter */ |
70 | enum fc_eof fr_eof; /* end of frame delimiter */ | 88 | u8 fr_eof; /* end of frame delimiter */ |
71 | u8 fr_flags; /* flags - see below */ | 89 | u8 fr_flags; /* flags - see below */ |
90 | u8 fr_encaps; /* LLD encapsulation info (e.g. FIP) */ | ||
72 | u8 granted_mac[ETH_ALEN]; /* FCoE MAC address */ | 91 | u8 granted_mac[ETH_ALEN]; /* FCoE MAC address */ |
73 | }; | 92 | }; |
74 | 93 | ||
@@ -97,6 +116,7 @@ static inline void fc_frame_init(struct fc_frame *fp) | |||
97 | fr_dev(fp) = NULL; | 116 | fr_dev(fp) = NULL; |
98 | fr_seq(fp) = NULL; | 117 | fr_seq(fp) = NULL; |
99 | fr_flags(fp) = 0; | 118 | fr_flags(fp) = 0; |
119 | fr_encaps(fp) = 0; | ||
100 | } | 120 | } |
101 | 121 | ||
102 | struct fc_frame *fc_frame_alloc_fill(struct fc_lport *, size_t payload_len); | 122 | struct fc_frame *fc_frame_alloc_fill(struct fc_lport *, size_t payload_len); |
@@ -136,13 +156,39 @@ static inline int fc_frame_is_linear(struct fc_frame *fp) | |||
136 | 156 | ||
137 | /* | 157 | /* |
138 | * Get frame header from message in fc_frame structure. | 158 | * Get frame header from message in fc_frame structure. |
159 | * This version doesn't do a length check. | ||
160 | */ | ||
161 | static inline | ||
162 | struct fc_frame_header *__fc_frame_header_get(const struct fc_frame *fp) | ||
163 | { | ||
164 | return (struct fc_frame_header *)fr_hdr(fp); | ||
165 | } | ||
166 | |||
167 | /* | ||
168 | * Get frame header from message in fc_frame structure. | ||
139 | * This hides a cast and provides a place to add some checking. | 169 | * This hides a cast and provides a place to add some checking. |
140 | */ | 170 | */ |
141 | static inline | 171 | static inline |
142 | struct fc_frame_header *fc_frame_header_get(const struct fc_frame *fp) | 172 | struct fc_frame_header *fc_frame_header_get(const struct fc_frame *fp) |
143 | { | 173 | { |
144 | WARN_ON(fr_len(fp) < sizeof(struct fc_frame_header)); | 174 | WARN_ON(fr_len(fp) < sizeof(struct fc_frame_header)); |
145 | return (struct fc_frame_header *) fr_hdr(fp); | 175 | return __fc_frame_header_get(fp); |
176 | } | ||
177 | |||
178 | /* | ||
179 | * Get source FC_ID (S_ID) from frame header in message. | ||
180 | */ | ||
181 | static inline u32 fc_frame_sid(const struct fc_frame *fp) | ||
182 | { | ||
183 | return ntoh24(__fc_frame_header_get(fp)->fh_s_id); | ||
184 | } | ||
185 | |||
186 | /* | ||
187 | * Get destination FC_ID (D_ID) from frame header in message. | ||
188 | */ | ||
189 | static inline u32 fc_frame_did(const struct fc_frame *fp) | ||
190 | { | ||
191 | return ntoh24(__fc_frame_header_get(fp)->fh_d_id); | ||
146 | } | 192 | } |
147 | 193 | ||
148 | /* | 194 | /* |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 66d377b9c72b..a8631acd37c3 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -313,6 +313,7 @@ enum iscsi_param { | |||
313 | ISCSI_PARAM_INITIATOR_NAME, | 313 | ISCSI_PARAM_INITIATOR_NAME, |
314 | 314 | ||
315 | ISCSI_PARAM_TGT_RESET_TMO, | 315 | ISCSI_PARAM_TGT_RESET_TMO, |
316 | ISCSI_PARAM_TARGET_ALIAS, | ||
316 | /* must always be last */ | 317 | /* must always be last */ |
317 | ISCSI_PARAM_MAX, | 318 | ISCSI_PARAM_MAX, |
318 | }; | 319 | }; |
@@ -353,6 +354,7 @@ enum iscsi_param { | |||
353 | #define ISCSI_ISID (1ULL << ISCSI_PARAM_ISID) | 354 | #define ISCSI_ISID (1ULL << ISCSI_PARAM_ISID) |
354 | #define ISCSI_INITIATOR_NAME (1ULL << ISCSI_PARAM_INITIATOR_NAME) | 355 | #define ISCSI_INITIATOR_NAME (1ULL << ISCSI_PARAM_INITIATOR_NAME) |
355 | #define ISCSI_TGT_RESET_TMO (1ULL << ISCSI_PARAM_TGT_RESET_TMO) | 356 | #define ISCSI_TGT_RESET_TMO (1ULL << ISCSI_PARAM_TGT_RESET_TMO) |
357 | #define ISCSI_TARGET_ALIAS (1ULL << ISCSI_PARAM_TARGET_ALIAS) | ||
356 | 358 | ||
357 | /* iSCSI HBA params */ | 359 | /* iSCSI HBA params */ |
358 | enum iscsi_host_param { | 360 | enum iscsi_host_param { |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 7495c0ba67ee..14be49b44e84 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -42,24 +42,6 @@ | |||
42 | #define FC_EX_TIMEOUT 1 /* Exchange timeout */ | 42 | #define FC_EX_TIMEOUT 1 /* Exchange timeout */ |
43 | #define FC_EX_CLOSED 2 /* Exchange closed */ | 43 | #define FC_EX_CLOSED 2 /* Exchange closed */ |
44 | 44 | ||
45 | /* some helpful macros */ | ||
46 | |||
47 | #define ntohll(x) be64_to_cpu(x) | ||
48 | #define htonll(x) cpu_to_be64(x) | ||
49 | |||
50 | |||
51 | static inline u32 ntoh24(const u8 *p) | ||
52 | { | ||
53 | return (p[0] << 16) | (p[1] << 8) | p[2]; | ||
54 | } | ||
55 | |||
56 | static inline void hton24(u8 *p, u32 v) | ||
57 | { | ||
58 | p[0] = (v >> 16) & 0xff; | ||
59 | p[1] = (v >> 8) & 0xff; | ||
60 | p[2] = v & 0xff; | ||
61 | } | ||
62 | |||
63 | /** | 45 | /** |
64 | * enum fc_lport_state - Local port states | 46 | * enum fc_lport_state - Local port states |
65 | * @LPORT_ST_DISABLED: Disabled | 47 | * @LPORT_ST_DISABLED: Disabled |
@@ -97,25 +79,25 @@ enum fc_disc_event { | |||
97 | /** | 79 | /** |
98 | * enum fc_rport_state - Remote port states | 80 | * enum fc_rport_state - Remote port states |
99 | * @RPORT_ST_INIT: Initialized | 81 | * @RPORT_ST_INIT: Initialized |
82 | * @RPORT_ST_FLOGI: Waiting for FLOGI completion for point-to-multipoint | ||
83 | * @RPORT_ST_PLOGI_WAIT: Waiting for peer to login for point-to-multipoint | ||
100 | * @RPORT_ST_PLOGI: Waiting for PLOGI completion | 84 | * @RPORT_ST_PLOGI: Waiting for PLOGI completion |
101 | * @RPORT_ST_PRLI: Waiting for PRLI completion | 85 | * @RPORT_ST_PRLI: Waiting for PRLI completion |
102 | * @RPORT_ST_RTV: Waiting for RTV completion | 86 | * @RPORT_ST_RTV: Waiting for RTV completion |
103 | * @RPORT_ST_READY: Ready for use | 87 | * @RPORT_ST_READY: Ready for use |
104 | * @RPORT_ST_LOGO: Remote port logout (LOGO) sent | ||
105 | * @RPORT_ST_ADISC: Discover Address sent | 88 | * @RPORT_ST_ADISC: Discover Address sent |
106 | * @RPORT_ST_DELETE: Remote port being deleted | 89 | * @RPORT_ST_DELETE: Remote port being deleted |
107 | * @RPORT_ST_RESTART: Remote port being deleted and will restart | ||
108 | */ | 90 | */ |
109 | enum fc_rport_state { | 91 | enum fc_rport_state { |
110 | RPORT_ST_INIT, | 92 | RPORT_ST_INIT, |
93 | RPORT_ST_FLOGI, | ||
94 | RPORT_ST_PLOGI_WAIT, | ||
111 | RPORT_ST_PLOGI, | 95 | RPORT_ST_PLOGI, |
112 | RPORT_ST_PRLI, | 96 | RPORT_ST_PRLI, |
113 | RPORT_ST_RTV, | 97 | RPORT_ST_RTV, |
114 | RPORT_ST_READY, | 98 | RPORT_ST_READY, |
115 | RPORT_ST_LOGO, | ||
116 | RPORT_ST_ADISC, | 99 | RPORT_ST_ADISC, |
117 | RPORT_ST_DELETE, | 100 | RPORT_ST_DELETE, |
118 | RPORT_ST_RESTART, | ||
119 | }; | 101 | }; |
120 | 102 | ||
121 | /** | 103 | /** |
@@ -173,6 +155,7 @@ struct fc_rport_libfc_priv { | |||
173 | u16 flags; | 155 | u16 flags; |
174 | #define FC_RP_FLAGS_REC_SUPPORTED (1 << 0) | 156 | #define FC_RP_FLAGS_REC_SUPPORTED (1 << 0) |
175 | #define FC_RP_FLAGS_RETRY (1 << 1) | 157 | #define FC_RP_FLAGS_RETRY (1 << 1) |
158 | #define FC_RP_STARTED (1 << 2) | ||
176 | unsigned int e_d_tov; | 159 | unsigned int e_d_tov; |
177 | unsigned int r_a_tov; | 160 | unsigned int r_a_tov; |
178 | }; | 161 | }; |
@@ -185,16 +168,18 @@ struct fc_rport_libfc_priv { | |||
185 | * @rp_state: Enumeration that tracks progress of PLOGI, PRLI, | 168 | * @rp_state: Enumeration that tracks progress of PLOGI, PRLI, |
186 | * and RTV exchanges | 169 | * and RTV exchanges |
187 | * @ids: The remote port identifiers and roles | 170 | * @ids: The remote port identifiers and roles |
188 | * @flags: REC and RETRY supported flags | 171 | * @flags: STARTED, REC and RETRY_SUPPORTED flags |
189 | * @max_seq: Maximum number of concurrent sequences | 172 | * @max_seq: Maximum number of concurrent sequences |
190 | * @disc_id: The discovery identifier | 173 | * @disc_id: The discovery identifier |
191 | * @maxframe_size: The maximum frame size | 174 | * @maxframe_size: The maximum frame size |
192 | * @retries: The retry count for the current state | 175 | * @retries: The retry count for the current state |
176 | * @major_retries: The retry count for the entire PLOGI/PRLI state machine | ||
193 | * @e_d_tov: Error detect timeout value (in msec) | 177 | * @e_d_tov: Error detect timeout value (in msec) |
194 | * @r_a_tov: Resource allocation timeout value (in msec) | 178 | * @r_a_tov: Resource allocation timeout value (in msec) |
195 | * @rp_mutex: The mutex that protects the remote port | 179 | * @rp_mutex: The mutex that protects the remote port |
196 | * @retry_work: Handle for retries | 180 | * @retry_work: Handle for retries |
197 | * @event_callback: Callback when READY, FAILED or LOGO states complete | 181 | * @event_callback: Callback when READY, FAILED or LOGO states complete |
182 | * @rcu: Structure used for freeing in an RCU-safe manner | ||
198 | */ | 183 | */ |
199 | struct fc_rport_priv { | 184 | struct fc_rport_priv { |
200 | struct fc_lport *local_port; | 185 | struct fc_lport *local_port; |
@@ -207,6 +192,7 @@ struct fc_rport_priv { | |||
207 | u16 disc_id; | 192 | u16 disc_id; |
208 | u16 maxframe_size; | 193 | u16 maxframe_size; |
209 | unsigned int retries; | 194 | unsigned int retries; |
195 | unsigned int major_retries; | ||
210 | unsigned int e_d_tov; | 196 | unsigned int e_d_tov; |
211 | unsigned int r_a_tov; | 197 | unsigned int r_a_tov; |
212 | struct mutex rp_mutex; | 198 | struct mutex rp_mutex; |
@@ -216,6 +202,7 @@ struct fc_rport_priv { | |||
216 | struct list_head peers; | 202 | struct list_head peers; |
217 | struct work_struct event_work; | 203 | struct work_struct event_work; |
218 | u32 supported_classes; | 204 | u32 supported_classes; |
205 | struct rcu_head rcu; | ||
219 | }; | 206 | }; |
220 | 207 | ||
221 | /** | 208 | /** |
@@ -262,14 +249,12 @@ struct fcoe_dev_stats { | |||
262 | 249 | ||
263 | /** | 250 | /** |
264 | * struct fc_seq_els_data - ELS data used for passing ELS specific responses | 251 | * struct fc_seq_els_data - ELS data used for passing ELS specific responses |
265 | * @fp: The ELS frame | ||
266 | * @reason: The reason for rejection | 252 | * @reason: The reason for rejection |
267 | * @explan: The explaination of the rejection | 253 | * @explan: The explaination of the rejection |
268 | * | 254 | * |
269 | * Mainly used by the exchange manager layer. | 255 | * Mainly used by the exchange manager layer. |
270 | */ | 256 | */ |
271 | struct fc_seq_els_data { | 257 | struct fc_seq_els_data { |
272 | struct fc_frame *fp; | ||
273 | enum fc_els_rjt_reason reason; | 258 | enum fc_els_rjt_reason reason; |
274 | enum fc_els_rjt_explan explan; | 259 | enum fc_els_rjt_explan explan; |
275 | }; | 260 | }; |
@@ -405,6 +390,7 @@ struct fc_seq { | |||
405 | * @esb_stat: ESB exchange status | 390 | * @esb_stat: ESB exchange status |
406 | * @r_a_tov: Resouce allocation time out value (in msecs) | 391 | * @r_a_tov: Resouce allocation time out value (in msecs) |
407 | * @seq_id: The next sequence ID to use | 392 | * @seq_id: The next sequence ID to use |
393 | * @encaps: encapsulation information for lower-level driver | ||
408 | * @f_ctl: F_CTL flags for the sequence | 394 | * @f_ctl: F_CTL flags for the sequence |
409 | * @fh_type: The frame type | 395 | * @fh_type: The frame type |
410 | * @class: The class of service | 396 | * @class: The class of service |
@@ -436,6 +422,7 @@ struct fc_exch { | |||
436 | u32 esb_stat; | 422 | u32 esb_stat; |
437 | u32 r_a_tov; | 423 | u32 r_a_tov; |
438 | u8 seq_id; | 424 | u8 seq_id; |
425 | u8 encaps; | ||
439 | u32 f_ctl; | 426 | u32 f_ctl; |
440 | u8 fh_type; | 427 | u8 fh_type; |
441 | enum fc_class class; | 428 | enum fc_class class; |
@@ -530,12 +517,11 @@ struct libfc_function_template { | |||
530 | struct fc_frame *); | 517 | struct fc_frame *); |
531 | 518 | ||
532 | /* | 519 | /* |
533 | * Send an ELS response using infomation from a previous | 520 | * Send an ELS response using infomation from the received frame. |
534 | * exchange and sequence. | ||
535 | * | 521 | * |
536 | * STATUS: OPTIONAL | 522 | * STATUS: OPTIONAL |
537 | */ | 523 | */ |
538 | void (*seq_els_rsp_send)(struct fc_seq *, enum fc_els_cmd, | 524 | void (*seq_els_rsp_send)(struct fc_frame *, enum fc_els_cmd, |
539 | struct fc_seq_els_data *); | 525 | struct fc_seq_els_data *); |
540 | 526 | ||
541 | /* | 527 | /* |
@@ -567,6 +553,13 @@ struct libfc_function_template { | |||
567 | struct fc_seq *(*seq_start_next)(struct fc_seq *); | 553 | struct fc_seq *(*seq_start_next)(struct fc_seq *); |
568 | 554 | ||
569 | /* | 555 | /* |
556 | * Assign a sequence for an incoming request frame. | ||
557 | * | ||
558 | * STATUS: OPTIONAL | ||
559 | */ | ||
560 | struct fc_seq *(*seq_assign)(struct fc_lport *, struct fc_frame *); | ||
561 | |||
562 | /* | ||
570 | * Reset an exchange manager, completing all sequences and exchanges. | 563 | * Reset an exchange manager, completing all sequences and exchanges. |
571 | * If s_id is non-zero, reset only exchanges originating from that FID. | 564 | * If s_id is non-zero, reset only exchanges originating from that FID. |
572 | * If d_id is non-zero, reset only exchanges sending to that FID. | 565 | * If d_id is non-zero, reset only exchanges sending to that FID. |
@@ -587,8 +580,7 @@ struct libfc_function_template { | |||
587 | * | 580 | * |
588 | * STATUS: OPTIONAL | 581 | * STATUS: OPTIONAL |
589 | */ | 582 | */ |
590 | void (*lport_recv)(struct fc_lport *, struct fc_seq *, | 583 | void (*lport_recv)(struct fc_lport *, struct fc_frame *); |
591 | struct fc_frame *); | ||
592 | 584 | ||
593 | /* | 585 | /* |
594 | * Reset the local port. | 586 | * Reset the local port. |
@@ -650,8 +642,7 @@ struct libfc_function_template { | |||
650 | * | 642 | * |
651 | * STATUS: OPTIONAL | 643 | * STATUS: OPTIONAL |
652 | */ | 644 | */ |
653 | void (*rport_recv_req)(struct fc_seq *, struct fc_frame *, | 645 | void (*rport_recv_req)(struct fc_lport *, struct fc_frame *); |
654 | struct fc_lport *); | ||
655 | 646 | ||
656 | /* | 647 | /* |
657 | * lookup an rport by it's port ID. | 648 | * lookup an rport by it's port ID. |
@@ -697,8 +688,7 @@ struct libfc_function_template { | |||
697 | * | 688 | * |
698 | * STATUS: OPTIONAL | 689 | * STATUS: OPTIONAL |
699 | */ | 690 | */ |
700 | void (*disc_recv_req)(struct fc_seq *, struct fc_frame *, | 691 | void (*disc_recv_req)(struct fc_lport *, struct fc_frame *); |
701 | struct fc_lport *); | ||
702 | 692 | ||
703 | /* | 693 | /* |
704 | * Start discovery for a local port. | 694 | * Start discovery for a local port. |
@@ -736,7 +726,7 @@ struct libfc_function_template { | |||
736 | * @buf_len: Length of the discovery buffer | 726 | * @buf_len: Length of the discovery buffer |
737 | * @disc_id: Discovery ID | 727 | * @disc_id: Discovery ID |
738 | * @rports: List of discovered remote ports | 728 | * @rports: List of discovered remote ports |
739 | * @lport: The local port that discovery is for | 729 | * @priv: Private pointer for use by discovery code |
740 | * @disc_mutex: Mutex that protects the discovery context | 730 | * @disc_mutex: Mutex that protects the discovery context |
741 | * @partial_buf: Partial name buffer (if names are returned | 731 | * @partial_buf: Partial name buffer (if names are returned |
742 | * in multiple frames) | 732 | * in multiple frames) |
@@ -752,7 +742,7 @@ struct fc_disc { | |||
752 | u16 disc_id; | 742 | u16 disc_id; |
753 | 743 | ||
754 | struct list_head rports; | 744 | struct list_head rports; |
755 | struct fc_lport *lport; | 745 | void *priv; |
756 | struct mutex disc_mutex; | 746 | struct mutex disc_mutex; |
757 | struct fc_gpn_ft_resp partial_buf; | 747 | struct fc_gpn_ft_resp partial_buf; |
758 | struct delayed_work disc_work; | 748 | struct delayed_work disc_work; |
@@ -796,6 +786,7 @@ struct fc_disc { | |||
796 | * @mfs: The maximum Fibre Channel payload size | 786 | * @mfs: The maximum Fibre Channel payload size |
797 | * @max_retry_count: The maximum retry attempts | 787 | * @max_retry_count: The maximum retry attempts |
798 | * @max_rport_retry_count: The maximum remote port retry attempts | 788 | * @max_rport_retry_count: The maximum remote port retry attempts |
789 | * @rport_priv_size: Size needed by driver after struct fc_rport_priv | ||
799 | * @lro_xid: The maximum XID for LRO | 790 | * @lro_xid: The maximum XID for LRO |
800 | * @lso_max: The maximum large offload send size | 791 | * @lso_max: The maximum large offload send size |
801 | * @fcts: FC-4 type mask | 792 | * @fcts: FC-4 type mask |
@@ -842,9 +833,11 @@ struct fc_lport { | |||
842 | u32 lro_enabled:1; | 833 | u32 lro_enabled:1; |
843 | u32 does_npiv:1; | 834 | u32 does_npiv:1; |
844 | u32 npiv_enabled:1; | 835 | u32 npiv_enabled:1; |
836 | u32 point_to_multipoint:1; | ||
845 | u32 mfs; | 837 | u32 mfs; |
846 | u8 max_retry_count; | 838 | u8 max_retry_count; |
847 | u8 max_rport_retry_count; | 839 | u8 max_rport_retry_count; |
840 | u16 rport_priv_size; | ||
848 | u16 link_speed; | 841 | u16 link_speed; |
849 | u16 link_supported_speeds; | 842 | u16 link_supported_speeds; |
850 | u16 lro_xid; | 843 | u16 lro_xid; |
@@ -986,6 +979,7 @@ int fc_set_mfs(struct fc_lport *, u32 mfs); | |||
986 | struct fc_lport *libfc_vport_create(struct fc_vport *, int privsize); | 979 | struct fc_lport *libfc_vport_create(struct fc_vport *, int privsize); |
987 | struct fc_lport *fc_vport_id_lookup(struct fc_lport *, u32 port_id); | 980 | struct fc_lport *fc_vport_id_lookup(struct fc_lport *, u32 port_id); |
988 | int fc_lport_bsg_request(struct fc_bsg_job *); | 981 | int fc_lport_bsg_request(struct fc_bsg_job *); |
982 | void fc_lport_set_local_id(struct fc_lport *, u32 port_id); | ||
989 | 983 | ||
990 | /* | 984 | /* |
991 | * REMOTE PORT LAYER | 985 | * REMOTE PORT LAYER |
@@ -998,6 +992,11 @@ void fc_rport_terminate_io(struct fc_rport *); | |||
998 | *****************************/ | 992 | *****************************/ |
999 | int fc_disc_init(struct fc_lport *); | 993 | int fc_disc_init(struct fc_lport *); |
1000 | 994 | ||
995 | static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc) | ||
996 | { | ||
997 | return container_of(disc, struct fc_lport, disc); | ||
998 | } | ||
999 | |||
1001 | /* | 1000 | /* |
1002 | * FCP LAYER | 1001 | * FCP LAYER |
1003 | *****************************/ | 1002 | *****************************/ |
@@ -1029,6 +1028,10 @@ struct fc_seq *fc_elsct_send(struct fc_lport *, u32 did, | |||
1029 | void *arg, u32 timer_msec); | 1028 | void *arg, u32 timer_msec); |
1030 | void fc_lport_flogi_resp(struct fc_seq *, struct fc_frame *, void *); | 1029 | void fc_lport_flogi_resp(struct fc_seq *, struct fc_frame *, void *); |
1031 | void fc_lport_logo_resp(struct fc_seq *, struct fc_frame *, void *); | 1030 | void fc_lport_logo_resp(struct fc_seq *, struct fc_frame *, void *); |
1031 | void fc_fill_reply_hdr(struct fc_frame *, const struct fc_frame *, | ||
1032 | enum fc_rctl, u32 parm_offset); | ||
1033 | void fc_fill_hdr(struct fc_frame *, const struct fc_frame *, | ||
1034 | enum fc_rctl, u32 f_ctl, u16 seq_cnt, u32 parm_offset); | ||
1032 | 1035 | ||
1033 | 1036 | ||
1034 | /* | 1037 | /* |
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index ec13f51531f8..06f1b5a8ed19 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/skbuff.h> | 27 | #include <linux/skbuff.h> |
28 | #include <linux/workqueue.h> | 28 | #include <linux/workqueue.h> |
29 | #include <linux/random.h> | ||
29 | #include <scsi/fc/fc_fcoe.h> | 30 | #include <scsi/fc/fc_fcoe.h> |
30 | #include <scsi/libfc.h> | 31 | #include <scsi/libfc.h> |
31 | 32 | ||
@@ -37,6 +38,7 @@ | |||
37 | #define FCOE_CTLR_START_DELAY 2000 /* mS after first adv. to choose FCF */ | 38 | #define FCOE_CTLR_START_DELAY 2000 /* mS after first adv. to choose FCF */ |
38 | #define FCOE_CTRL_SOL_TOV 2000 /* min. solicitation interval (mS) */ | 39 | #define FCOE_CTRL_SOL_TOV 2000 /* min. solicitation interval (mS) */ |
39 | #define FCOE_CTLR_FCF_LIMIT 20 /* max. number of FCF entries */ | 40 | #define FCOE_CTLR_FCF_LIMIT 20 /* max. number of FCF entries */ |
41 | #define FCOE_CTLR_VN2VN_LOGIN_LIMIT 3 /* max. VN2VN rport login retries */ | ||
40 | 42 | ||
41 | /** | 43 | /** |
42 | * enum fip_state - internal state of FCoE controller. | 44 | * enum fip_state - internal state of FCoE controller. |
@@ -45,6 +47,11 @@ | |||
45 | * @FIP_ST_AUTO: determining whether to use FIP or non-FIP mode. | 47 | * @FIP_ST_AUTO: determining whether to use FIP or non-FIP mode. |
46 | * @FIP_ST_NON_FIP: non-FIP mode selected. | 48 | * @FIP_ST_NON_FIP: non-FIP mode selected. |
47 | * @FIP_ST_ENABLED: FIP mode selected. | 49 | * @FIP_ST_ENABLED: FIP mode selected. |
50 | * @FIP_ST_VNMP_START: VN2VN multipath mode start, wait | ||
51 | * @FIP_ST_VNMP_PROBE1: VN2VN sent first probe, listening | ||
52 | * @FIP_ST_VNMP_PROBE2: VN2VN sent second probe, listening | ||
53 | * @FIP_ST_VNMP_CLAIM: VN2VN sent claim, waiting for responses | ||
54 | * @FIP_ST_VNMP_UP: VN2VN multipath mode operation | ||
48 | */ | 55 | */ |
49 | enum fip_state { | 56 | enum fip_state { |
50 | FIP_ST_DISABLED, | 57 | FIP_ST_DISABLED, |
@@ -52,8 +59,23 @@ enum fip_state { | |||
52 | FIP_ST_AUTO, | 59 | FIP_ST_AUTO, |
53 | FIP_ST_NON_FIP, | 60 | FIP_ST_NON_FIP, |
54 | FIP_ST_ENABLED, | 61 | FIP_ST_ENABLED, |
62 | FIP_ST_VNMP_START, | ||
63 | FIP_ST_VNMP_PROBE1, | ||
64 | FIP_ST_VNMP_PROBE2, | ||
65 | FIP_ST_VNMP_CLAIM, | ||
66 | FIP_ST_VNMP_UP, | ||
55 | }; | 67 | }; |
56 | 68 | ||
69 | /* | ||
70 | * Modes: | ||
71 | * The mode is the state that is to be entered after link up. | ||
72 | * It must not change after fcoe_ctlr_init() sets it. | ||
73 | */ | ||
74 | #define FIP_MODE_AUTO FIP_ST_AUTO | ||
75 | #define FIP_MODE_NON_FIP FIP_ST_NON_FIP | ||
76 | #define FIP_MODE_FABRIC FIP_ST_ENABLED | ||
77 | #define FIP_MODE_VN2VN FIP_ST_VNMP_START | ||
78 | |||
57 | /** | 79 | /** |
58 | * struct fcoe_ctlr - FCoE Controller and FIP state | 80 | * struct fcoe_ctlr - FCoE Controller and FIP state |
59 | * @state: internal FIP state for network link and FIP or non-FIP mode. | 81 | * @state: internal FIP state for network link and FIP or non-FIP mode. |
@@ -70,19 +92,20 @@ enum fip_state { | |||
70 | * @timer_work: &work_struct for doing keep-alives and resets. | 92 | * @timer_work: &work_struct for doing keep-alives and resets. |
71 | * @recv_work: &work_struct for receiving FIP frames. | 93 | * @recv_work: &work_struct for receiving FIP frames. |
72 | * @fip_recv_list: list of received FIP frames. | 94 | * @fip_recv_list: list of received FIP frames. |
95 | * @rnd_state: state for pseudo-random number generator. | ||
96 | * @port_id: proposed or selected local-port ID. | ||
73 | * @user_mfs: configured maximum FC frame size, including FC header. | 97 | * @user_mfs: configured maximum FC frame size, including FC header. |
74 | * @flogi_oxid: exchange ID of most recent fabric login. | 98 | * @flogi_oxid: exchange ID of most recent fabric login. |
75 | * @flogi_count: number of FLOGI attempts in AUTO mode. | 99 | * @flogi_count: number of FLOGI attempts in AUTO mode. |
76 | * @map_dest: use the FC_MAP mode for destination MAC addresses. | 100 | * @map_dest: use the FC_MAP mode for destination MAC addresses. |
77 | * @spma: supports SPMA server-provided MACs mode | 101 | * @spma: supports SPMA server-provided MACs mode |
78 | * @send_ctlr_ka: need to send controller keep alive | 102 | * @probe_tries: number of FC_IDs probed |
79 | * @send_port_ka: need to send port keep alives | ||
80 | * @dest_addr: MAC address of the selected FC forwarder. | 103 | * @dest_addr: MAC address of the selected FC forwarder. |
81 | * @ctl_src_addr: the native MAC address of our local port. | 104 | * @ctl_src_addr: the native MAC address of our local port. |
82 | * @send: LLD-supplied function to handle sending FIP Ethernet frames | 105 | * @send: LLD-supplied function to handle sending FIP Ethernet frames |
83 | * @update_mac: LLD-supplied function to handle changes to MAC addresses. | 106 | * @update_mac: LLD-supplied function to handle changes to MAC addresses. |
84 | * @get_src_addr: LLD-supplied function to supply a source MAC address. | 107 | * @get_src_addr: LLD-supplied function to supply a source MAC address. |
85 | * @lock: lock protecting this structure. | 108 | * @ctlr_mutex: lock protecting this structure. |
86 | * | 109 | * |
87 | * This structure is used by all FCoE drivers. It contains information | 110 | * This structure is used by all FCoE drivers. It contains information |
88 | * needed by all FCoE low-level drivers (LLDs) as well as internal state | 111 | * needed by all FCoE low-level drivers (LLDs) as well as internal state |
@@ -103,21 +126,23 @@ struct fcoe_ctlr { | |||
103 | struct work_struct timer_work; | 126 | struct work_struct timer_work; |
104 | struct work_struct recv_work; | 127 | struct work_struct recv_work; |
105 | struct sk_buff_head fip_recv_list; | 128 | struct sk_buff_head fip_recv_list; |
129 | |||
130 | struct rnd_state rnd_state; | ||
131 | u32 port_id; | ||
132 | |||
106 | u16 user_mfs; | 133 | u16 user_mfs; |
107 | u16 flogi_oxid; | 134 | u16 flogi_oxid; |
108 | u8 flogi_count; | 135 | u8 flogi_count; |
109 | u8 reset_req; | ||
110 | u8 map_dest; | 136 | u8 map_dest; |
111 | u8 spma; | 137 | u8 spma; |
112 | u8 send_ctlr_ka; | 138 | u8 probe_tries; |
113 | u8 send_port_ka; | ||
114 | u8 dest_addr[ETH_ALEN]; | 139 | u8 dest_addr[ETH_ALEN]; |
115 | u8 ctl_src_addr[ETH_ALEN]; | 140 | u8 ctl_src_addr[ETH_ALEN]; |
116 | 141 | ||
117 | void (*send)(struct fcoe_ctlr *, struct sk_buff *); | 142 | void (*send)(struct fcoe_ctlr *, struct sk_buff *); |
118 | void (*update_mac)(struct fc_lport *, u8 *addr); | 143 | void (*update_mac)(struct fc_lport *, u8 *addr); |
119 | u8 * (*get_src_addr)(struct fc_lport *); | 144 | u8 * (*get_src_addr)(struct fc_lport *); |
120 | spinlock_t lock; | 145 | struct mutex ctlr_mutex; |
121 | }; | 146 | }; |
122 | 147 | ||
123 | /** | 148 | /** |
@@ -156,8 +181,26 @@ struct fcoe_fcf { | |||
156 | u8 fd_flags:1; | 181 | u8 fd_flags:1; |
157 | }; | 182 | }; |
158 | 183 | ||
184 | /** | ||
185 | * struct fcoe_rport - VN2VN remote port | ||
186 | * @time: time of create or last beacon packet received from node | ||
187 | * @fcoe_len: max FCoE frame size, not including VLAN or Ethernet headers | ||
188 | * @flags: flags from probe or claim | ||
189 | * @login_count: number of unsuccessful rport logins to this port | ||
190 | * @enode_mac: E_Node control MAC address | ||
191 | * @vn_mac: VN_Node assigned MAC address for data | ||
192 | */ | ||
193 | struct fcoe_rport { | ||
194 | unsigned long time; | ||
195 | u16 fcoe_len; | ||
196 | u16 flags; | ||
197 | u8 login_count; | ||
198 | u8 enode_mac[ETH_ALEN]; | ||
199 | u8 vn_mac[ETH_ALEN]; | ||
200 | }; | ||
201 | |||
159 | /* FIP API functions */ | 202 | /* FIP API functions */ |
160 | void fcoe_ctlr_init(struct fcoe_ctlr *); | 203 | void fcoe_ctlr_init(struct fcoe_ctlr *, enum fip_state); |
161 | void fcoe_ctlr_destroy(struct fcoe_ctlr *); | 204 | void fcoe_ctlr_destroy(struct fcoe_ctlr *); |
162 | void fcoe_ctlr_link_up(struct fcoe_ctlr *); | 205 | void fcoe_ctlr_link_up(struct fcoe_ctlr *); |
163 | int fcoe_ctlr_link_down(struct fcoe_ctlr *); | 206 | int fcoe_ctlr_link_down(struct fcoe_ctlr *); |
@@ -168,6 +211,17 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *, struct fc_lport *, | |||
168 | 211 | ||
169 | /* libfcoe funcs */ | 212 | /* libfcoe funcs */ |
170 | u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int); | 213 | u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int); |
171 | int fcoe_libfc_config(struct fc_lport *, struct libfc_function_template *); | 214 | int fcoe_libfc_config(struct fc_lport *, struct fcoe_ctlr *, |
215 | const struct libfc_function_template *, int init_fcp); | ||
216 | |||
217 | /** | ||
218 | * is_fip_mode() - returns true if FIP mode selected. | ||
219 | * @fip: FCoE controller. | ||
220 | */ | ||
221 | static inline bool is_fip_mode(struct fcoe_ctlr *fip) | ||
222 | { | ||
223 | return fip->state == FIP_ST_ENABLED; | ||
224 | } | ||
225 | |||
172 | 226 | ||
173 | #endif /* _LIBFCOE_H */ | 227 | #endif /* _LIBFCOE_H */ |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 3b586859669c..d06e13be717b 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -422,16 +422,7 @@ enum service_response { | |||
422 | }; | 422 | }; |
423 | 423 | ||
424 | enum exec_status { | 424 | enum exec_status { |
425 | SAM_GOOD = 0, | 425 | /* The SAM_STAT_.. codes fit in the lower 6 bits */ |
426 | SAM_CHECK_COND = 2, | ||
427 | SAM_COND_MET = 4, | ||
428 | SAM_BUSY = 8, | ||
429 | SAM_INTERMEDIATE = 0x10, | ||
430 | SAM_IM_COND_MET = 0x12, | ||
431 | SAM_RESV_CONFLICT= 0x14, | ||
432 | SAM_TASK_SET_FULL= 0x28, | ||
433 | SAM_ACA_ACTIVE = 0x30, | ||
434 | SAM_TASK_ABORTED = 0x40, | ||
435 | 426 | ||
436 | SAS_DEV_NO_RESPONSE = 0x80, | 427 | SAS_DEV_NO_RESPONSE = 0x80, |
437 | SAS_DATA_UNDERRUN, | 428 | SAS_DATA_UNDERRUN, |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index d80b6dbed1ca..50cb34ffef11 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -381,6 +381,14 @@ extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, | |||
381 | struct scsi_sense_hdr *, int timeout, int retries, | 381 | struct scsi_sense_hdr *, int timeout, int retries, |
382 | int *resid); | 382 | int *resid); |
383 | 383 | ||
384 | #ifdef CONFIG_PM_RUNTIME | ||
385 | extern int scsi_autopm_get_device(struct scsi_device *); | ||
386 | extern void scsi_autopm_put_device(struct scsi_device *); | ||
387 | #else | ||
388 | static inline int scsi_autopm_get_device(struct scsi_device *d) { return 0; } | ||
389 | static inline void scsi_autopm_put_device(struct scsi_device *d) {} | ||
390 | #endif /* CONFIG_PM_RUNTIME */ | ||
391 | |||
384 | static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) | 392 | static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) |
385 | { | 393 | { |
386 | return device_reprobe(&sdev->sdev_gendev); | 394 | return device_reprobe(&sdev->sdev_gendev); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index c50a97fc76f9..b7bdecb7b76e 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -327,6 +327,14 @@ struct scsi_host_template { | |||
327 | sector_t, int []); | 327 | sector_t, int []); |
328 | 328 | ||
329 | /* | 329 | /* |
330 | * This function is called when one or more partitions on the | ||
331 | * device reach beyond the end of the device. | ||
332 | * | ||
333 | * Status: OPTIONAL | ||
334 | */ | ||
335 | void (*unlock_native_capacity)(struct scsi_device *); | ||
336 | |||
337 | /* | ||
330 | * Can be used to export driver statistics and other infos to the | 338 | * Can be used to export driver statistics and other infos to the |
331 | * world outside the kernel ie. userspace and it also provides an | 339 | * world outside the kernel ie. userspace and it also provides an |
332 | * interface to feed the driver with information. | 340 | * interface to feed the driver with information. |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 349c7f30720d..7fff94b3b2a8 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -32,6 +32,7 @@ struct scsi_transport_template; | |||
32 | struct iscsi_transport; | 32 | struct iscsi_transport; |
33 | struct iscsi_endpoint; | 33 | struct iscsi_endpoint; |
34 | struct Scsi_Host; | 34 | struct Scsi_Host; |
35 | struct scsi_cmnd; | ||
35 | struct iscsi_cls_conn; | 36 | struct iscsi_cls_conn; |
36 | struct iscsi_conn; | 37 | struct iscsi_conn; |
37 | struct iscsi_task; | 38 | struct iscsi_task; |
@@ -255,5 +256,6 @@ extern int iscsi_scan_finished(struct Scsi_Host *shost, unsigned long time); | |||
255 | extern struct iscsi_endpoint *iscsi_create_endpoint(int dd_size); | 256 | extern struct iscsi_endpoint *iscsi_create_endpoint(int dd_size); |
256 | extern void iscsi_destroy_endpoint(struct iscsi_endpoint *ep); | 257 | extern void iscsi_destroy_endpoint(struct iscsi_endpoint *ep); |
257 | extern struct iscsi_endpoint *iscsi_lookup_endpoint(u64 handle); | 258 | extern struct iscsi_endpoint *iscsi_lookup_endpoint(u64 handle); |
259 | extern int iscsi_block_scsi_eh(struct scsi_cmnd *cmd); | ||
258 | 260 | ||
259 | #endif | 261 | #endif |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index dd76cdede64d..6e3a29732dc4 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -366,7 +366,7 @@ struct snd_pcm_substream { | |||
366 | int number; | 366 | int number; |
367 | char name[32]; /* substream name */ | 367 | char name[32]; /* substream name */ |
368 | int stream; /* stream (direction) */ | 368 | int stream; /* stream (direction) */ |
369 | struct pm_qos_request_list *latency_pm_qos_req; /* pm_qos request */ | 369 | struct pm_qos_request_list latency_pm_qos_req; /* pm_qos request */ |
370 | size_t buffer_bytes_max; /* limit ring buffer size */ | 370 | size_t buffer_bytes_max; /* limit ring buffer size */ |
371 | struct snd_dma_buffer dma_buffer; | 371 | struct snd_dma_buffer dma_buffer; |
372 | unsigned int dma_buf_id; | 372 | unsigned int dma_buf_id; |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index f5b1ba90e952..f3865c7b4166 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -306,7 +306,6 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
306 | __field( int, pages_written ) | 306 | __field( int, pages_written ) |
307 | __field( long, pages_skipped ) | 307 | __field( long, pages_skipped ) |
308 | __field( char, more_io ) | 308 | __field( char, more_io ) |
309 | __field( char, no_nrwrite_index_update ) | ||
310 | __field( pgoff_t, writeback_index ) | 309 | __field( pgoff_t, writeback_index ) |
311 | ), | 310 | ), |
312 | 311 | ||
@@ -317,16 +316,14 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
317 | __entry->pages_written = pages_written; | 316 | __entry->pages_written = pages_written; |
318 | __entry->pages_skipped = wbc->pages_skipped; | 317 | __entry->pages_skipped = wbc->pages_skipped; |
319 | __entry->more_io = wbc->more_io; | 318 | __entry->more_io = wbc->more_io; |
320 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; | ||
321 | __entry->writeback_index = inode->i_mapping->writeback_index; | 319 | __entry->writeback_index = inode->i_mapping->writeback_index; |
322 | ), | 320 | ), |
323 | 321 | ||
324 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d no_nrwrite_index_update %d writeback_index %lu", | 322 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu", |
325 | jbd2_dev_to_name(__entry->dev), | 323 | jbd2_dev_to_name(__entry->dev), |
326 | (unsigned long) __entry->ino, __entry->ret, | 324 | (unsigned long) __entry->ino, __entry->ret, |
327 | __entry->pages_written, __entry->pages_skipped, | 325 | __entry->pages_written, __entry->pages_skipped, |
328 | __entry->more_io, | 326 | __entry->more_io, |
329 | __entry->no_nrwrite_index_update, | ||
330 | (unsigned long) __entry->writeback_index) | 327 | (unsigned long) __entry->writeback_index) |
331 | ); | 328 | ); |
332 | 329 | ||
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index c4efe9b8280d..35a2a6e7bf1e 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h | |||
@@ -18,52 +18,55 @@ enum { | |||
18 | 18 | ||
19 | DECLARE_EVENT_CLASS(power, | 19 | DECLARE_EVENT_CLASS(power, |
20 | 20 | ||
21 | TP_PROTO(unsigned int type, unsigned int state), | 21 | TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), |
22 | 22 | ||
23 | TP_ARGS(type, state), | 23 | TP_ARGS(type, state, cpu_id), |
24 | 24 | ||
25 | TP_STRUCT__entry( | 25 | TP_STRUCT__entry( |
26 | __field( u64, type ) | 26 | __field( u64, type ) |
27 | __field( u64, state ) | 27 | __field( u64, state ) |
28 | __field( u64, cpu_id ) | ||
28 | ), | 29 | ), |
29 | 30 | ||
30 | TP_fast_assign( | 31 | TP_fast_assign( |
31 | __entry->type = type; | 32 | __entry->type = type; |
32 | __entry->state = state; | 33 | __entry->state = state; |
34 | __entry->cpu_id = cpu_id; | ||
33 | ), | 35 | ), |
34 | 36 | ||
35 | TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state) | 37 | TP_printk("type=%lu state=%lu cpu_id=%lu", (unsigned long)__entry->type, |
38 | (unsigned long)__entry->state, (unsigned long)__entry->cpu_id) | ||
36 | ); | 39 | ); |
37 | 40 | ||
38 | DEFINE_EVENT(power, power_start, | 41 | DEFINE_EVENT(power, power_start, |
39 | 42 | ||
40 | TP_PROTO(unsigned int type, unsigned int state), | 43 | TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), |
41 | 44 | ||
42 | TP_ARGS(type, state) | 45 | TP_ARGS(type, state, cpu_id) |
43 | ); | 46 | ); |
44 | 47 | ||
45 | DEFINE_EVENT(power, power_frequency, | 48 | DEFINE_EVENT(power, power_frequency, |
46 | 49 | ||
47 | TP_PROTO(unsigned int type, unsigned int state), | 50 | TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), |
48 | 51 | ||
49 | TP_ARGS(type, state) | 52 | TP_ARGS(type, state, cpu_id) |
50 | ); | 53 | ); |
51 | 54 | ||
52 | TRACE_EVENT(power_end, | 55 | TRACE_EVENT(power_end, |
53 | 56 | ||
54 | TP_PROTO(int dummy), | 57 | TP_PROTO(unsigned int cpu_id), |
55 | 58 | ||
56 | TP_ARGS(dummy), | 59 | TP_ARGS(cpu_id), |
57 | 60 | ||
58 | TP_STRUCT__entry( | 61 | TP_STRUCT__entry( |
59 | __field( u64, dummy ) | 62 | __field( u64, cpu_id ) |
60 | ), | 63 | ), |
61 | 64 | ||
62 | TP_fast_assign( | 65 | TP_fast_assign( |
63 | __entry->dummy = 0xffff; | 66 | __entry->cpu_id = cpu_id; |
64 | ), | 67 | ), |
65 | 68 | ||
66 | TP_printk("dummy=%lu", (unsigned long)__entry->dummy) | 69 | TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id) |
67 | 70 | ||
68 | ); | 71 | ); |
69 | 72 | ||
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 4f733ecea46e..b9e1dd6c6208 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -115,6 +115,23 @@ DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new, | |||
115 | TP_PROTO(struct task_struct *p, int success), | 115 | TP_PROTO(struct task_struct *p, int success), |
116 | TP_ARGS(p, success)); | 116 | TP_ARGS(p, success)); |
117 | 117 | ||
118 | #ifdef CREATE_TRACE_POINTS | ||
119 | static inline long __trace_sched_switch_state(struct task_struct *p) | ||
120 | { | ||
121 | long state = p->state; | ||
122 | |||
123 | #ifdef CONFIG_PREEMPT | ||
124 | /* | ||
125 | * For all intents and purposes a preempted task is a running task. | ||
126 | */ | ||
127 | if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE) | ||
128 | state = TASK_RUNNING; | ||
129 | #endif | ||
130 | |||
131 | return state; | ||
132 | } | ||
133 | #endif | ||
134 | |||
118 | /* | 135 | /* |
119 | * Tracepoint for task switches, performed by the scheduler: | 136 | * Tracepoint for task switches, performed by the scheduler: |
120 | */ | 137 | */ |
@@ -139,7 +156,7 @@ TRACE_EVENT(sched_switch, | |||
139 | memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); | 156 | memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); |
140 | __entry->prev_pid = prev->pid; | 157 | __entry->prev_pid = prev->pid; |
141 | __entry->prev_prio = prev->prio; | 158 | __entry->prev_prio = prev->prio; |
142 | __entry->prev_state = prev->state; | 159 | __entry->prev_state = __trace_sched_switch_state(prev); |
143 | memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); | 160 | memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); |
144 | __entry->next_pid = next->pid; | 161 | __entry->next_pid = next->pid; |
145 | __entry->next_prio = next->prio; | 162 | __entry->next_prio = next->prio; |
diff --git a/include/trace/events/signal.h b/include/trace/events/signal.h index 814566c99d29..17df43464df0 100644 --- a/include/trace/events/signal.h +++ b/include/trace/events/signal.h | |||
@@ -10,7 +10,8 @@ | |||
10 | 10 | ||
11 | #define TP_STORE_SIGINFO(__entry, info) \ | 11 | #define TP_STORE_SIGINFO(__entry, info) \ |
12 | do { \ | 12 | do { \ |
13 | if (info == SEND_SIG_NOINFO) { \ | 13 | if (info == SEND_SIG_NOINFO || \ |
14 | info == SEND_SIG_FORCED) { \ | ||
14 | __entry->errno = 0; \ | 15 | __entry->errno = 0; \ |
15 | __entry->code = SI_USER; \ | 16 | __entry->code = SI_USER; \ |
16 | } else if (info == SEND_SIG_PRIV) { \ | 17 | } else if (info == SEND_SIG_PRIV) { \ |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 3d685d1f2a03..5a64905d7278 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -725,7 +725,7 @@ perf_trace_##call(void *__data, proto) \ | |||
725 | \ | 725 | \ |
726 | { assign; } \ | 726 | { assign; } \ |
727 | \ | 727 | \ |
728 | head = per_cpu_ptr(event_call->perf_events, smp_processor_id());\ | 728 | head = this_cpu_ptr(event_call->perf_events); \ |
729 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ | 729 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ |
730 | __count, &__regs, head); \ | 730 | __count, &__regs, head); \ |
731 | } | 731 | } |