diff options
Diffstat (limited to 'include')
109 files changed, 1270 insertions, 487 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index c34b11022908..c65e4ce6c3af 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -114,10 +114,13 @@ struct acpi_device_ops { | |||
114 | acpi_op_notify notify; | 114 | acpi_op_notify notify; |
115 | }; | 115 | }; |
116 | 116 | ||
117 | #define ACPI_DRIVER_ALL_NOTIFY_EVENTS 0x1 /* system AND device events */ | ||
118 | |||
117 | struct acpi_driver { | 119 | struct acpi_driver { |
118 | char name[80]; | 120 | char name[80]; |
119 | char class[80]; | 121 | char class[80]; |
120 | const struct acpi_device_id *ids; /* Supported Hardware IDs */ | 122 | const struct acpi_device_id *ids; /* Supported Hardware IDs */ |
123 | unsigned int flags; | ||
121 | struct acpi_device_ops ops; | 124 | struct acpi_device_ops ops; |
122 | struct device_driver drv; | 125 | struct device_driver drv; |
123 | struct module *owner; | 126 | struct module *owner; |
@@ -168,7 +171,7 @@ struct acpi_device_dir { | |||
168 | 171 | ||
169 | /* Plug and Play */ | 172 | /* Plug and Play */ |
170 | 173 | ||
171 | typedef char acpi_bus_id[5]; | 174 | typedef char acpi_bus_id[8]; |
172 | typedef unsigned long acpi_bus_address; | 175 | typedef unsigned long acpi_bus_address; |
173 | typedef char acpi_hardware_id[15]; | 176 | typedef char acpi_hardware_id[15]; |
174 | typedef char acpi_unique_id[9]; | 177 | typedef char acpi_unique_id[9]; |
@@ -365,10 +368,10 @@ struct acpi_bus_type { | |||
365 | int register_acpi_bus_type(struct acpi_bus_type *); | 368 | int register_acpi_bus_type(struct acpi_bus_type *); |
366 | int unregister_acpi_bus_type(struct acpi_bus_type *); | 369 | int unregister_acpi_bus_type(struct acpi_bus_type *); |
367 | struct device *acpi_get_physical_device(acpi_handle); | 370 | struct device *acpi_get_physical_device(acpi_handle); |
368 | struct device *acpi_get_physical_pci_device(acpi_handle); | ||
369 | 371 | ||
370 | /* helper */ | 372 | /* helper */ |
371 | acpi_handle acpi_get_child(acpi_handle, acpi_integer); | 373 | acpi_handle acpi_get_child(acpi_handle, acpi_integer); |
374 | int acpi_is_root_bridge(acpi_handle); | ||
372 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); | 375 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); |
373 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) | 376 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) |
374 | 377 | ||
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 0352c8f0b05b..f4906f6568d4 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -57,8 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #define ACPI_POWER_HID "LNXPOWER" | 59 | #define ACPI_POWER_HID "LNXPOWER" |
60 | #define ACPI_PROCESSOR_OBJECT_HID "ACPI_CPU" | 60 | #define ACPI_PROCESSOR_OBJECT_HID "LNXCPU" |
61 | #define ACPI_PROCESSOR_HID "ACPI0007" | ||
62 | #define ACPI_SYSTEM_HID "LNXSYSTM" | 61 | #define ACPI_SYSTEM_HID "LNXSYSTM" |
63 | #define ACPI_THERMAL_HID "LNXTHERM" | 62 | #define ACPI_THERMAL_HID "LNXTHERM" |
64 | #define ACPI_BUTTON_HID_POWERF "LNXPWRBN" | 63 | #define ACPI_BUTTON_HID_POWERF "LNXPWRBN" |
@@ -91,17 +90,15 @@ int acpi_pci_link_free_irq(acpi_handle handle); | |||
91 | 90 | ||
92 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ | 91 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ |
93 | 92 | ||
94 | int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus); | 93 | int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus); |
95 | void acpi_pci_irq_del_prt(int segment, int bus); | 94 | void acpi_pci_irq_del_prt(struct pci_bus *bus); |
96 | 95 | ||
97 | /* ACPI PCI Device Binding (pci_bind.c) */ | 96 | /* ACPI PCI Device Binding (pci_bind.c) */ |
98 | 97 | ||
99 | struct pci_bus; | 98 | struct pci_bus; |
100 | 99 | ||
101 | acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id); | 100 | struct pci_dev *acpi_get_pci_dev(acpi_handle); |
102 | int acpi_pci_bind(struct acpi_device *device); | 101 | int acpi_pci_bind_root(struct acpi_device *device); |
103 | int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id, | ||
104 | struct pci_bus *bus); | ||
105 | 102 | ||
106 | /* Arch-defined function to add a bus to the system */ | 103 | /* Arch-defined function to add a bus to the system */ |
107 | 104 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 4927c063347c..baf1e0a9a7ee 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -258,6 +258,7 @@ DECLARE_PER_CPU(struct acpi_processor *, processors); | |||
258 | extern struct acpi_processor_errata errata; | 258 | extern struct acpi_processor_errata errata; |
259 | 259 | ||
260 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); | 260 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); |
261 | void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr); | ||
261 | 262 | ||
262 | #ifdef ARCH_HAS_POWER_INIT | 263 | #ifdef ARCH_HAS_POWER_INIT |
263 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | 264 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
diff --git a/include/acpi/video.h b/include/acpi/video.h index af6fe95fd3d0..cf7be3dd157b 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
@@ -3,10 +3,10 @@ | |||
3 | 3 | ||
4 | #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) | 4 | #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) |
5 | extern int acpi_video_register(void); | 5 | extern int acpi_video_register(void); |
6 | extern int acpi_video_exit(void); | 6 | extern void acpi_video_unregister(void); |
7 | #else | 7 | #else |
8 | static inline int acpi_video_register(void) { return 0; } | 8 | static inline int acpi_video_register(void) { return 0; } |
9 | static inline void acpi_video_exit(void) { return; } | 9 | static inline void acpi_video_unregister(void) { return; } |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #endif | 12 | #endif |
diff --git a/include/asm-generic/hardirq.h b/include/asm-generic/hardirq.h index 3d5d2c906ab3..23bb4dad4962 100644 --- a/include/asm-generic/hardirq.h +++ b/include/asm-generic/hardirq.h | |||
@@ -11,19 +11,6 @@ typedef struct { | |||
11 | 11 | ||
12 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 12 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ |
13 | 13 | ||
14 | #ifndef HARDIRQ_BITS | ||
15 | #define HARDIRQ_BITS 8 | ||
16 | #endif | ||
17 | |||
18 | /* | ||
19 | * The hardirq mask has to be large enough to have | ||
20 | * space for potentially all IRQ sources in the system | ||
21 | * nesting on a single CPU: | ||
22 | */ | ||
23 | #if (1 << HARDIRQ_BITS) < NR_IRQS | ||
24 | # error HARDIRQ_BITS is too low! | ||
25 | #endif | ||
26 | |||
27 | #ifndef ack_bad_irq | 14 | #ifndef ack_bad_irq |
28 | static inline void ack_bad_irq(unsigned int irq) | 15 | static inline void ack_bad_irq(unsigned int irq) |
29 | { | 16 | { |
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index d7d50d7ee51e..aa00800adacc 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -97,4 +97,8 @@ extern void setup_per_cpu_areas(void); | |||
97 | #define PER_CPU_ATTRIBUTES | 97 | #define PER_CPU_ATTRIBUTES |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #ifndef PER_CPU_DEF_ATTRIBUTES | ||
101 | #define PER_CPU_DEF_ATTRIBUTES | ||
102 | #endif | ||
103 | |||
100 | #endif /* _ASM_GENERIC_PERCPU_H_ */ | 104 | #endif /* _ASM_GENERIC_PERCPU_H_ */ |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index e410f602cab1..e2bd73e8f9c0 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -129,6 +129,10 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres | |||
129 | #define move_pte(pte, prot, old_addr, new_addr) (pte) | 129 | #define move_pte(pte, prot, old_addr, new_addr) (pte) |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | #ifndef pgprot_noncached | ||
133 | #define pgprot_noncached(prot) (prot) | ||
134 | #endif | ||
135 | |||
132 | #ifndef pgprot_writecombine | 136 | #ifndef pgprot_writecombine |
133 | #define pgprot_writecombine pgprot_noncached | 137 | #define pgprot_writecombine pgprot_noncached |
134 | #endif | 138 | #endif |
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index 6d8cab22e294..b218b8513d04 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h | |||
@@ -163,7 +163,7 @@ static inline __must_check long __copy_to_user(void __user *to, | |||
163 | #define put_user(x, ptr) \ | 163 | #define put_user(x, ptr) \ |
164 | ({ \ | 164 | ({ \ |
165 | might_sleep(); \ | 165 | might_sleep(); \ |
166 | __access_ok(ptr, sizeof (*ptr)) ? \ | 166 | access_ok(VERIFY_WRITE, ptr, sizeof(*ptr)) ? \ |
167 | __put_user(x, ptr) : \ | 167 | __put_user(x, ptr) : \ |
168 | -EFAULT; \ | 168 | -EFAULT; \ |
169 | }) | 169 | }) |
@@ -219,7 +219,7 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
219 | #define get_user(x, ptr) \ | 219 | #define get_user(x, ptr) \ |
220 | ({ \ | 220 | ({ \ |
221 | might_sleep(); \ | 221 | might_sleep(); \ |
222 | __access_ok(ptr, sizeof (*ptr)) ? \ | 222 | access_ok(VERIFY_READ, ptr, sizeof(*ptr)) ? \ |
223 | __get_user(x, ptr) : \ | 223 | __get_user(x, ptr) : \ |
224 | -EFAULT; \ | 224 | -EFAULT; \ |
225 | }) | 225 | }) |
@@ -244,7 +244,7 @@ static inline long copy_from_user(void *to, | |||
244 | const void __user * from, unsigned long n) | 244 | const void __user * from, unsigned long n) |
245 | { | 245 | { |
246 | might_sleep(); | 246 | might_sleep(); |
247 | if (__access_ok(from, n)) | 247 | if (access_ok(VERIFY_READ, from, n)) |
248 | return __copy_from_user(to, from, n); | 248 | return __copy_from_user(to, from, n); |
249 | else | 249 | else |
250 | return n; | 250 | return n; |
@@ -254,7 +254,7 @@ static inline long copy_to_user(void __user *to, | |||
254 | const void *from, unsigned long n) | 254 | const void *from, unsigned long n) |
255 | { | 255 | { |
256 | might_sleep(); | 256 | might_sleep(); |
257 | if (__access_ok(to, n)) | 257 | if (access_ok(VERIFY_WRITE, to, n)) |
258 | return __copy_to_user(to, from, n); | 258 | return __copy_to_user(to, from, n); |
259 | else | 259 | else |
260 | return n; | 260 | return n; |
@@ -278,7 +278,7 @@ __strncpy_from_user(char *dst, const char __user *src, long count) | |||
278 | static inline long | 278 | static inline long |
279 | strncpy_from_user(char *dst, const char __user *src, long count) | 279 | strncpy_from_user(char *dst, const char __user *src, long count) |
280 | { | 280 | { |
281 | if (!__access_ok(src, 1)) | 281 | if (!access_ok(VERIFY_READ, src, 1)) |
282 | return -EFAULT; | 282 | return -EFAULT; |
283 | return __strncpy_from_user(dst, src, count); | 283 | return __strncpy_from_user(dst, src, count); |
284 | } | 284 | } |
@@ -291,6 +291,8 @@ strncpy_from_user(char *dst, const char __user *src, long count) | |||
291 | #ifndef strnlen_user | 291 | #ifndef strnlen_user |
292 | static inline long strnlen_user(const char __user *src, long n) | 292 | static inline long strnlen_user(const char __user *src, long n) |
293 | { | 293 | { |
294 | if (!access_ok(VERIFY_READ, src, 1)) | ||
295 | return 0; | ||
294 | return strlen((void * __force)src) + 1; | 296 | return strlen((void * __force)src) + 1; |
295 | } | 297 | } |
296 | #endif | 298 | #endif |
@@ -316,7 +318,7 @@ static inline __must_check unsigned long | |||
316 | clear_user(void __user *to, unsigned long n) | 318 | clear_user(void __user *to, unsigned long n) |
317 | { | 319 | { |
318 | might_sleep(); | 320 | might_sleep(); |
319 | if (!__access_ok(to, n)) | 321 | if (!access_ok(VERIFY_WRITE, to, n)) |
320 | return n; | 322 | return n; |
321 | 323 | ||
322 | return __clear_user(to, n); | 324 | return __clear_user(to, n); |
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 5b34b6233d6d..1125e5a1ee5d 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -618,8 +618,13 @@ __SYSCALL(__NR_migrate_pages, sys_migrate_pages) | |||
618 | __SYSCALL(__NR_move_pages, sys_move_pages) | 618 | __SYSCALL(__NR_move_pages, sys_move_pages) |
619 | #endif | 619 | #endif |
620 | 620 | ||
621 | #define __NR_rt_tgsigqueueinfo 240 | ||
622 | __SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) | ||
623 | #define __NR_perf_counter_open 241 | ||
624 | __SYSCALL(__NR_perf_counter_open, sys_perf_counter_open) | ||
625 | |||
621 | #undef __NR_syscalls | 626 | #undef __NR_syscalls |
622 | #define __NR_syscalls 240 | 627 | #define __NR_syscalls 242 |
623 | 628 | ||
624 | /* | 629 | /* |
625 | * All syscalls below here should go away really, | 630 | * All syscalls below here should go away really, |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 92b73b6140ff..a553f1041cf1 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -191,7 +191,7 @@ | |||
191 | . = ALIGN(align); \ | 191 | . = ALIGN(align); \ |
192 | *(.data.cacheline_aligned) | 192 | *(.data.cacheline_aligned) |
193 | 193 | ||
194 | #define INIT_TASK(align) \ | 194 | #define INIT_TASK_DATA(align) \ |
195 | . = ALIGN(align); \ | 195 | . = ALIGN(align); \ |
196 | *(.data.init_task) | 196 | *(.data.init_task) |
197 | 197 | ||
@@ -434,14 +434,15 @@ | |||
434 | /* | 434 | /* |
435 | * Init task | 435 | * Init task |
436 | */ | 436 | */ |
437 | #define INIT_TASK_DATA(align) \ | 437 | #define INIT_TASK_DATA_SECTION(align) \ |
438 | . = ALIGN(align); \ | 438 | . = ALIGN(align); \ |
439 | .data.init_task : { \ | 439 | .data.init_task : { \ |
440 | INIT_TASK \ | 440 | INIT_TASK_DATA(align) \ |
441 | } | 441 | } |
442 | 442 | ||
443 | #ifdef CONFIG_CONSTRUCTORS | 443 | #ifdef CONFIG_CONSTRUCTORS |
444 | #define KERNEL_CTORS() VMLINUX_SYMBOL(__ctors_start) = .; \ | 444 | #define KERNEL_CTORS() . = ALIGN(8); \ |
445 | VMLINUX_SYMBOL(__ctors_start) = .; \ | ||
445 | *(.ctors) \ | 446 | *(.ctors) \ |
446 | VMLINUX_SYMBOL(__ctors_end) = .; | 447 | VMLINUX_SYMBOL(__ctors_end) = .; |
447 | #else | 448 | #else |
@@ -704,15 +705,15 @@ | |||
704 | * matches the requirment of PAGE_ALIGNED_DATA. | 705 | * matches the requirment of PAGE_ALIGNED_DATA. |
705 | * | 706 | * |
706 | * use 0 as page_align if page_aligned data is not used */ | 707 | * use 0 as page_align if page_aligned data is not used */ |
707 | #define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \ | 708 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ |
708 | . = ALIGN(PAGE_SIZE); \ | 709 | . = ALIGN(PAGE_SIZE); \ |
709 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ | 710 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ |
710 | INIT_TASK(inittask) \ | 711 | INIT_TASK_DATA(inittask) \ |
711 | CACHELINE_ALIGNED_DATA(cacheline) \ | 712 | CACHELINE_ALIGNED_DATA(cacheline) \ |
712 | READ_MOSTLY_DATA(cacheline) \ | 713 | READ_MOSTLY_DATA(cacheline) \ |
713 | DATA_DATA \ | 714 | DATA_DATA \ |
714 | CONSTRUCTORS \ | 715 | CONSTRUCTORS \ |
715 | NOSAVE_DATA(nosave) \ | 716 | NOSAVE_DATA \ |
716 | PAGE_ALIGNED_DATA(pagealigned) \ | 717 | PAGE_ALIGNED_DATA(pagealigned) \ |
717 | } | 718 | } |
718 | 719 | ||
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index c263e4d71754..7d6c9a2dfcbb 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -35,11 +35,11 @@ struct est_timings { | |||
35 | } __attribute__((packed)); | 35 | } __attribute__((packed)); |
36 | 36 | ||
37 | /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ | 37 | /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ |
38 | #define EDID_TIMING_ASPECT_SHIFT 0 | 38 | #define EDID_TIMING_ASPECT_SHIFT 6 |
39 | #define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT) | 39 | #define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT) |
40 | 40 | ||
41 | /* need to add 60 */ | 41 | /* need to add 60 */ |
42 | #define EDID_TIMING_VFREQ_SHIFT 2 | 42 | #define EDID_TIMING_VFREQ_SHIFT 0 |
43 | #define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT) | 43 | #define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT) |
44 | 44 | ||
45 | struct std_timing { | 45 | struct std_timing { |
@@ -47,11 +47,11 @@ struct std_timing { | |||
47 | u8 vfreq_aspect; | 47 | u8 vfreq_aspect; |
48 | } __attribute__((packed)); | 48 | } __attribute__((packed)); |
49 | 49 | ||
50 | #define DRM_EDID_PT_HSYNC_POSITIVE (1 << 6) | 50 | #define DRM_EDID_PT_HSYNC_POSITIVE (1 << 1) |
51 | #define DRM_EDID_PT_VSYNC_POSITIVE (1 << 5) | 51 | #define DRM_EDID_PT_VSYNC_POSITIVE (1 << 2) |
52 | #define DRM_EDID_PT_SEPARATE_SYNC (3 << 3) | 52 | #define DRM_EDID_PT_SEPARATE_SYNC (3 << 3) |
53 | #define DRM_EDID_PT_STEREO (1 << 2) | 53 | #define DRM_EDID_PT_STEREO (1 << 5) |
54 | #define DRM_EDID_PT_INTERLACED (1 << 1) | 54 | #define DRM_EDID_PT_INTERLACED (1 << 7) |
55 | 55 | ||
56 | /* If detailed data is pixel timing */ | 56 | /* If detailed data is pixel timing */ |
57 | struct detailed_pixel_timing { | 57 | struct detailed_pixel_timing { |
@@ -93,7 +93,7 @@ struct detailed_data_monitor_range { | |||
93 | } __attribute__((packed)); | 93 | } __attribute__((packed)); |
94 | 94 | ||
95 | struct detailed_data_wpindex { | 95 | struct detailed_data_wpindex { |
96 | u8 white_xy_lo; /* Upper 2 bits each */ | 96 | u8 white_yx_lo; /* Lower 2 bits each */ |
97 | u8 white_x_hi; | 97 | u8 white_x_hi; |
98 | u8 white_y_hi; | 98 | u8 white_y_hi; |
99 | u8 gamma; /* need to divide by 100 then add 1 */ | 99 | u8 gamma; /* need to divide by 100 then add 1 */ |
@@ -135,21 +135,21 @@ struct detailed_timing { | |||
135 | } data; | 135 | } data; |
136 | } __attribute__((packed)); | 136 | } __attribute__((packed)); |
137 | 137 | ||
138 | #define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 7) | 138 | #define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 0) |
139 | #define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 5) | 139 | #define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 1) |
140 | #define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 4) | 140 | #define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 2) |
141 | #define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) | 141 | #define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) |
142 | #define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 2) | 142 | #define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 4) |
143 | #define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 1) | 143 | #define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 5) |
144 | #define DRM_EDID_INPUT_DIGITAL (1 << 0) /* bits above must be zero if set */ | 144 | #define DRM_EDID_INPUT_DIGITAL (1 << 7) /* bits below must be zero if set */ |
145 | 145 | ||
146 | #define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 7) | 146 | #define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 0) |
147 | #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 6) | 147 | #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 1) |
148 | #define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 5) | 148 | #define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 2) |
149 | #define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ | 149 | #define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ |
150 | #define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 2) | 150 | #define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 5) |
151 | #define DRM_EDID_FEATURE_PM_SUSPEND (1 << 1) | 151 | #define DRM_EDID_FEATURE_PM_SUSPEND (1 << 6) |
152 | #define DRM_EDID_FEATURE_PM_STANDBY (1 << 0) | 152 | #define DRM_EDID_FEATURE_PM_STANDBY (1 << 7) |
153 | 153 | ||
154 | struct edid { | 154 | struct edid { |
155 | u8 header[8]; | 155 | u8 header[8]; |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 03f22076381f..334a3593cdfd 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -57,6 +57,7 @@ header-y += dlmconstants.h | |||
57 | header-y += dlm_device.h | 57 | header-y += dlm_device.h |
58 | header-y += dlm_netlink.h | 58 | header-y += dlm_netlink.h |
59 | header-y += dm-ioctl.h | 59 | header-y += dm-ioctl.h |
60 | header-y += dm-log-userspace.h | ||
60 | header-y += dn.h | 61 | header-y += dn.h |
61 | header-y += dqblk_xfs.h | 62 | header-y += dqblk_xfs.h |
62 | header-y += efs_fs_sb.h | 63 | header-y += efs_fs_sb.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 51b4b0a5ce8c..34321cfffeab 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -113,9 +113,6 @@ void acpi_irq_stats_init(void); | |||
113 | extern u32 acpi_irq_handled; | 113 | extern u32 acpi_irq_handled; |
114 | extern u32 acpi_irq_not_handled; | 114 | extern u32 acpi_irq_not_handled; |
115 | 115 | ||
116 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; | ||
117 | extern int pci_mmcfg_config_num; | ||
118 | |||
119 | extern int sbf_port; | 116 | extern int sbf_port; |
120 | extern unsigned long acpi_realmode_flags; | 117 | extern unsigned long acpi_realmode_flags; |
121 | 118 | ||
@@ -293,7 +290,10 @@ void __init acpi_s4_no_nvs(void); | |||
293 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | 290 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) |
294 | 291 | ||
295 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags); | 292 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags); |
293 | extern void acpi_early_init(void); | ||
294 | |||
296 | #else /* CONFIG_ACPI */ | 295 | #else /* CONFIG_ACPI */ |
296 | static inline void acpi_early_init(void) { } | ||
297 | 297 | ||
298 | static inline int early_acpi_boot_init(void) | 298 | static inline int early_acpi_boot_init(void) |
299 | { | 299 | { |
diff --git a/include/linux/aio.h b/include/linux/aio.h index b16a957030f8..47f7d932a01d 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -121,9 +121,9 @@ struct kiocb { | |||
121 | 121 | ||
122 | /* | 122 | /* |
123 | * If the aio_resfd field of the userspace iocb is not zero, | 123 | * If the aio_resfd field of the userspace iocb is not zero, |
124 | * this is the underlying file* to deliver event to. | 124 | * this is the underlying eventfd context to deliver events to. |
125 | */ | 125 | */ |
126 | struct file *ki_eventfd; | 126 | struct eventfd_ctx *ki_eventfd; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) | 129 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 4fa2810b675e..3c7a358241a7 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -599,6 +599,8 @@ extern void audit_log_untrustedstring(struct audit_buffer *ab, | |||
599 | extern void audit_log_d_path(struct audit_buffer *ab, | 599 | extern void audit_log_d_path(struct audit_buffer *ab, |
600 | const char *prefix, | 600 | const char *prefix, |
601 | struct path *path); | 601 | struct path *path); |
602 | extern void audit_log_key(struct audit_buffer *ab, | ||
603 | char *key); | ||
602 | extern void audit_log_lost(const char *message); | 604 | extern void audit_log_lost(const char *message); |
603 | extern int audit_update_lsm_rules(void); | 605 | extern int audit_update_lsm_rules(void); |
604 | 606 | ||
@@ -621,6 +623,7 @@ extern int audit_enabled; | |||
621 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) | 623 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) |
622 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 624 | #define audit_log_untrustedstring(a,s) do { ; } while (0) |
623 | #define audit_log_d_path(b, p, d) do { ; } while (0) | 625 | #define audit_log_d_path(b, p, d) do { ; } while (0) |
626 | #define audit_log_key(b, k) do { ; } while (0) | ||
624 | #define audit_enabled 0 | 627 | #define audit_enabled 0 |
625 | #endif | 628 | #endif |
626 | #endif | 629 | #endif |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 0ec2c594868e..1d52425a6118 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -229,9 +229,14 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) | |||
229 | (1 << BDI_async_congested)); | 229 | (1 << BDI_async_congested)); |
230 | } | 230 | } |
231 | 231 | ||
232 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); | 232 | enum { |
233 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); | 233 | BLK_RW_ASYNC = 0, |
234 | long congestion_wait(int rw, long timeout); | 234 | BLK_RW_SYNC = 1, |
235 | }; | ||
236 | |||
237 | void clear_bdi_congested(struct backing_dev_info *bdi, int sync); | ||
238 | void set_bdi_congested(struct backing_dev_info *bdi, int sync); | ||
239 | long congestion_wait(int sync, long timeout); | ||
235 | 240 | ||
236 | 241 | ||
237 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) | 242 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 2a04eb54c0dd..2892b710771c 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -319,7 +319,6 @@ static inline int bio_has_allocated_vec(struct bio *bio) | |||
319 | */ | 319 | */ |
320 | struct bio_integrity_payload { | 320 | struct bio_integrity_payload { |
321 | struct bio *bip_bio; /* parent bio */ | 321 | struct bio *bip_bio; /* parent bio */ |
322 | struct bio_vec *bip_vec; /* integrity data vector */ | ||
323 | 322 | ||
324 | sector_t bip_sector; /* virtual start sector */ | 323 | sector_t bip_sector; /* virtual start sector */ |
325 | 324 | ||
@@ -328,11 +327,12 @@ struct bio_integrity_payload { | |||
328 | 327 | ||
329 | unsigned int bip_size; | 328 | unsigned int bip_size; |
330 | 329 | ||
331 | unsigned short bip_pool; /* pool the ivec came from */ | 330 | unsigned short bip_slab; /* slab the bip came from */ |
332 | unsigned short bip_vcnt; /* # of integrity bio_vecs */ | 331 | unsigned short bip_vcnt; /* # of integrity bio_vecs */ |
333 | unsigned short bip_idx; /* current bip_vec index */ | 332 | unsigned short bip_idx; /* current bip_vec index */ |
334 | 333 | ||
335 | struct work_struct bip_work; /* I/O completion */ | 334 | struct work_struct bip_work; /* I/O completion */ |
335 | struct bio_vec bip_vec[0]; /* embedded bvec array */ | ||
336 | }; | 336 | }; |
337 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 337 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
338 | 338 | ||
@@ -430,6 +430,9 @@ struct bio_set { | |||
430 | unsigned int front_pad; | 430 | unsigned int front_pad; |
431 | 431 | ||
432 | mempool_t *bio_pool; | 432 | mempool_t *bio_pool; |
433 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
434 | mempool_t *bio_integrity_pool; | ||
435 | #endif | ||
433 | mempool_t *bvec_pool; | 436 | mempool_t *bvec_pool; |
434 | }; | 437 | }; |
435 | 438 | ||
@@ -634,8 +637,9 @@ static inline struct bio *bio_list_get(struct bio_list *bl) | |||
634 | 637 | ||
635 | #define bio_integrity(bio) (bio->bi_integrity != NULL) | 638 | #define bio_integrity(bio) (bio->bi_integrity != NULL) |
636 | 639 | ||
640 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); | ||
637 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); | 641 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); |
638 | extern void bio_integrity_free(struct bio *); | 642 | extern void bio_integrity_free(struct bio *, struct bio_set *); |
639 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); | 643 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); |
640 | extern int bio_integrity_enabled(struct bio *bio); | 644 | extern int bio_integrity_enabled(struct bio *bio); |
641 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); | 645 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); |
@@ -645,21 +649,27 @@ extern void bio_integrity_endio(struct bio *, int); | |||
645 | extern void bio_integrity_advance(struct bio *, unsigned int); | 649 | extern void bio_integrity_advance(struct bio *, unsigned int); |
646 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); | 650 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); |
647 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); | 651 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); |
648 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t); | 652 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *); |
653 | extern int bioset_integrity_create(struct bio_set *, int); | ||
654 | extern void bioset_integrity_free(struct bio_set *); | ||
655 | extern void bio_integrity_init(void); | ||
649 | 656 | ||
650 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | 657 | #else /* CONFIG_BLK_DEV_INTEGRITY */ |
651 | 658 | ||
652 | #define bio_integrity(a) (0) | 659 | #define bio_integrity(a) (0) |
660 | #define bioset_integrity_create(a, b) (0) | ||
653 | #define bio_integrity_prep(a) (0) | 661 | #define bio_integrity_prep(a) (0) |
654 | #define bio_integrity_enabled(a) (0) | 662 | #define bio_integrity_enabled(a) (0) |
655 | #define bio_integrity_clone(a, b, c) (0) | 663 | #define bio_integrity_clone(a, b, c, d) (0) |
656 | #define bio_integrity_free(a) do { } while (0) | 664 | #define bioset_integrity_free(a) do { } while (0) |
665 | #define bio_integrity_free(a, b) do { } while (0) | ||
657 | #define bio_integrity_endio(a, b) do { } while (0) | 666 | #define bio_integrity_endio(a, b) do { } while (0) |
658 | #define bio_integrity_advance(a, b) do { } while (0) | 667 | #define bio_integrity_advance(a, b) do { } while (0) |
659 | #define bio_integrity_trim(a, b, c) do { } while (0) | 668 | #define bio_integrity_trim(a, b, c) do { } while (0) |
660 | #define bio_integrity_split(a, b, c) do { } while (0) | 669 | #define bio_integrity_split(a, b, c) do { } while (0) |
661 | #define bio_integrity_set_tag(a, b, c) do { } while (0) | 670 | #define bio_integrity_set_tag(a, b, c) do { } while (0) |
662 | #define bio_integrity_get_tag(a, b, c) do { } while (0) | 671 | #define bio_integrity_get_tag(a, b, c) do { } while (0) |
672 | #define bio_integrity_init(a) do { } while (0) | ||
663 | 673 | ||
664 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 674 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
665 | 675 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8963d9149b5f..e7cb5dbf6c26 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -70,11 +70,6 @@ enum rq_cmd_type_bits { | |||
70 | REQ_TYPE_ATA_PC, | 70 | REQ_TYPE_ATA_PC, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | enum { | ||
74 | BLK_RW_ASYNC = 0, | ||
75 | BLK_RW_SYNC = 1, | ||
76 | }; | ||
77 | |||
78 | /* | 73 | /* |
79 | * For request of type REQ_TYPE_LINUX_BLOCK, rq->cmd[0] is the opcode being | 74 | * For request of type REQ_TYPE_LINUX_BLOCK, rq->cmd[0] is the opcode being |
80 | * sent down (similar to how REQ_TYPE_BLOCK_PC means that ->cmd[] holds a | 75 | * sent down (similar to how REQ_TYPE_BLOCK_PC means that ->cmd[] holds a |
@@ -301,12 +296,6 @@ struct blk_queue_tag { | |||
301 | #define BLK_SCSI_MAX_CMDS (256) | 296 | #define BLK_SCSI_MAX_CMDS (256) |
302 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) | 297 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) |
303 | 298 | ||
304 | struct blk_cmd_filter { | ||
305 | unsigned long read_ok[BLK_SCSI_CMD_PER_LONG]; | ||
306 | unsigned long write_ok[BLK_SCSI_CMD_PER_LONG]; | ||
307 | struct kobject kobj; | ||
308 | }; | ||
309 | |||
310 | struct queue_limits { | 299 | struct queue_limits { |
311 | unsigned long bounce_pfn; | 300 | unsigned long bounce_pfn; |
312 | unsigned long seg_boundary_mask; | 301 | unsigned long seg_boundary_mask; |
@@ -445,7 +434,6 @@ struct request_queue | |||
445 | #if defined(CONFIG_BLK_DEV_BSG) | 434 | #if defined(CONFIG_BLK_DEV_BSG) |
446 | struct bsg_class_device bsg_dev; | 435 | struct bsg_class_device bsg_dev; |
447 | #endif | 436 | #endif |
448 | struct blk_cmd_filter cmd_filter; | ||
449 | }; | 437 | }; |
450 | 438 | ||
451 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 439 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
@@ -730,6 +718,7 @@ struct rq_map_data { | |||
730 | int nr_entries; | 718 | int nr_entries; |
731 | unsigned long offset; | 719 | unsigned long offset; |
732 | int null_mapped; | 720 | int null_mapped; |
721 | int from_user; | ||
733 | }; | 722 | }; |
734 | 723 | ||
735 | struct req_iterator { | 724 | struct req_iterator { |
@@ -786,18 +775,18 @@ extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, | |||
786 | * congested queues, and wake up anyone who was waiting for requests to be | 775 | * congested queues, and wake up anyone who was waiting for requests to be |
787 | * put back. | 776 | * put back. |
788 | */ | 777 | */ |
789 | static inline void blk_clear_queue_congested(struct request_queue *q, int rw) | 778 | static inline void blk_clear_queue_congested(struct request_queue *q, int sync) |
790 | { | 779 | { |
791 | clear_bdi_congested(&q->backing_dev_info, rw); | 780 | clear_bdi_congested(&q->backing_dev_info, sync); |
792 | } | 781 | } |
793 | 782 | ||
794 | /* | 783 | /* |
795 | * A queue has just entered congestion. Flag that in the queue's VM-visible | 784 | * A queue has just entered congestion. Flag that in the queue's VM-visible |
796 | * state flags and increment the global gounter of congested queues. | 785 | * state flags and increment the global gounter of congested queues. |
797 | */ | 786 | */ |
798 | static inline void blk_set_queue_congested(struct request_queue *q, int rw) | 787 | static inline void blk_set_queue_congested(struct request_queue *q, int sync) |
799 | { | 788 | { |
800 | set_bdi_congested(&q->backing_dev_info, rw); | 789 | set_bdi_congested(&q->backing_dev_info, sync); |
801 | } | 790 | } |
802 | 791 | ||
803 | extern void blk_start_queue(struct request_queue *q); | 792 | extern void blk_start_queue(struct request_queue *q); |
@@ -998,13 +987,7 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
998 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL); | 987 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL); |
999 | } | 988 | } |
1000 | 989 | ||
1001 | /* | 990 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
1002 | * command filter functions | ||
1003 | */ | ||
1004 | extern int blk_verify_command(struct blk_cmd_filter *filter, | ||
1005 | unsigned char *cmd, fmode_t has_write_perm); | ||
1006 | extern void blk_unregister_filter(struct gendisk *disk); | ||
1007 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | ||
1008 | 991 | ||
1009 | #define MAX_PHYS_SEGMENTS 128 | 992 | #define MAX_PHYS_SEGMENTS 128 |
1010 | #define MAX_HW_SEGMENTS 128 | 993 | #define MAX_HW_SEGMENTS 128 |
diff --git a/include/linux/connector.h b/include/linux/connector.h index b9966e64604e..b68d27850d51 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -41,8 +41,10 @@ | |||
41 | #define CN_IDX_BB 0x5 /* BlackBoard, from the TSP GPL sampling framework */ | 41 | #define CN_IDX_BB 0x5 /* BlackBoard, from the TSP GPL sampling framework */ |
42 | #define CN_DST_IDX 0x6 | 42 | #define CN_DST_IDX 0x6 |
43 | #define CN_DST_VAL 0x1 | 43 | #define CN_DST_VAL 0x1 |
44 | #define CN_IDX_DM 0x7 /* Device Mapper */ | ||
45 | #define CN_VAL_DM_USERSPACE_LOG 0x1 | ||
44 | 46 | ||
45 | #define CN_NETLINK_USERS 7 | 47 | #define CN_NETLINK_USERS 8 |
46 | 48 | ||
47 | /* | 49 | /* |
48 | * Maximum connector's message size. | 50 | * Maximum connector's message size. |
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index d71f7c0f931b..38fe59dc89ae 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -89,7 +89,6 @@ struct vc_data { | |||
89 | unsigned int vc_need_wrap : 1; | 89 | unsigned int vc_need_wrap : 1; |
90 | unsigned int vc_can_do_color : 1; | 90 | unsigned int vc_can_do_color : 1; |
91 | unsigned int vc_report_mouse : 2; | 91 | unsigned int vc_report_mouse : 2; |
92 | unsigned int vc_kmalloced : 1; | ||
93 | unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */ | 92 | unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */ |
94 | unsigned char vc_utf_count; | 93 | unsigned char vc_utf_count; |
95 | int vc_utf_char; | 94 | int vc_utf_char; |
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 2dac064d8359..0026f267da20 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_CRASH_DUMP | 4 | #ifdef CONFIG_CRASH_DUMP |
5 | #include <linux/kexec.h> | 5 | #include <linux/kexec.h> |
6 | #include <linux/smp_lock.h> | ||
7 | #include <linux/device.h> | 6 | #include <linux/device.h> |
8 | #include <linux/proc_fs.h> | 7 | #include <linux/proc_fs.h> |
9 | 8 | ||
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 49c2362977fd..0d6310657f32 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/bio.h> | 11 | #include <linux/bio.h> |
12 | #include <linux/blkdev.h> | 12 | #include <linux/blkdev.h> |
13 | 13 | ||
14 | struct dm_dev; | ||
14 | struct dm_target; | 15 | struct dm_target; |
15 | struct dm_table; | 16 | struct dm_table; |
16 | struct mapped_device; | 17 | struct mapped_device; |
@@ -21,6 +22,7 @@ typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; | |||
21 | union map_info { | 22 | union map_info { |
22 | void *ptr; | 23 | void *ptr; |
23 | unsigned long long ll; | 24 | unsigned long long ll; |
25 | unsigned flush_request; | ||
24 | }; | 26 | }; |
25 | 27 | ||
26 | /* | 28 | /* |
@@ -80,6 +82,15 @@ typedef int (*dm_ioctl_fn) (struct dm_target *ti, unsigned int cmd, | |||
80 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, | 82 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, |
81 | struct bio_vec *biovec, int max_size); | 83 | struct bio_vec *biovec, int max_size); |
82 | 84 | ||
85 | typedef int (*iterate_devices_callout_fn) (struct dm_target *ti, | ||
86 | struct dm_dev *dev, | ||
87 | sector_t physical_start, | ||
88 | void *data); | ||
89 | |||
90 | typedef int (*dm_iterate_devices_fn) (struct dm_target *ti, | ||
91 | iterate_devices_callout_fn fn, | ||
92 | void *data); | ||
93 | |||
83 | /* | 94 | /* |
84 | * Returns: | 95 | * Returns: |
85 | * 0: The target can handle the next I/O immediately. | 96 | * 0: The target can handle the next I/O immediately. |
@@ -92,7 +103,8 @@ void dm_error(const char *message); | |||
92 | /* | 103 | /* |
93 | * Combine device limits. | 104 | * Combine device limits. |
94 | */ | 105 | */ |
95 | void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev); | 106 | int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev, |
107 | sector_t start, void *data); | ||
96 | 108 | ||
97 | struct dm_dev { | 109 | struct dm_dev { |
98 | struct block_device *bdev; | 110 | struct block_device *bdev; |
@@ -138,23 +150,12 @@ struct target_type { | |||
138 | dm_ioctl_fn ioctl; | 150 | dm_ioctl_fn ioctl; |
139 | dm_merge_fn merge; | 151 | dm_merge_fn merge; |
140 | dm_busy_fn busy; | 152 | dm_busy_fn busy; |
153 | dm_iterate_devices_fn iterate_devices; | ||
141 | 154 | ||
142 | /* For internal device-mapper use. */ | 155 | /* For internal device-mapper use. */ |
143 | struct list_head list; | 156 | struct list_head list; |
144 | }; | 157 | }; |
145 | 158 | ||
146 | struct io_restrictions { | ||
147 | unsigned long bounce_pfn; | ||
148 | unsigned long seg_boundary_mask; | ||
149 | unsigned max_hw_sectors; | ||
150 | unsigned max_sectors; | ||
151 | unsigned max_segment_size; | ||
152 | unsigned short logical_block_size; | ||
153 | unsigned short max_hw_segments; | ||
154 | unsigned short max_phys_segments; | ||
155 | unsigned char no_cluster; /* inverted so that 0 is default */ | ||
156 | }; | ||
157 | |||
158 | struct dm_target { | 159 | struct dm_target { |
159 | struct dm_table *table; | 160 | struct dm_table *table; |
160 | struct target_type *type; | 161 | struct target_type *type; |
@@ -163,15 +164,18 @@ struct dm_target { | |||
163 | sector_t begin; | 164 | sector_t begin; |
164 | sector_t len; | 165 | sector_t len; |
165 | 166 | ||
166 | /* FIXME: turn this into a mask, and merge with io_restrictions */ | ||
167 | /* Always a power of 2 */ | 167 | /* Always a power of 2 */ |
168 | sector_t split_io; | 168 | sector_t split_io; |
169 | 169 | ||
170 | /* | 170 | /* |
171 | * These are automatically filled in by | 171 | * A number of zero-length barrier requests that will be submitted |
172 | * dm_table_get_device. | 172 | * to the target for the purpose of flushing cache. |
173 | * | ||
174 | * The request number will be placed in union map_info->flush_request. | ||
175 | * It is a responsibility of the target driver to remap these requests | ||
176 | * to the real underlying devices. | ||
173 | */ | 177 | */ |
174 | struct io_restrictions limits; | 178 | unsigned num_flush_requests; |
175 | 179 | ||
176 | /* target specific data */ | 180 | /* target specific data */ |
177 | void *private; | 181 | void *private; |
@@ -230,6 +234,7 @@ struct gendisk *dm_disk(struct mapped_device *md); | |||
230 | int dm_suspended(struct mapped_device *md); | 234 | int dm_suspended(struct mapped_device *md); |
231 | int dm_noflush_suspending(struct dm_target *ti); | 235 | int dm_noflush_suspending(struct dm_target *ti); |
232 | union map_info *dm_get_mapinfo(struct bio *bio); | 236 | union map_info *dm_get_mapinfo(struct bio *bio); |
237 | union map_info *dm_get_rq_mapinfo(struct request *rq); | ||
233 | 238 | ||
234 | /* | 239 | /* |
235 | * Geometry functions. | 240 | * Geometry functions. |
@@ -392,4 +397,12 @@ static inline unsigned long to_bytes(sector_t n) | |||
392 | return (n << SECTOR_SHIFT); | 397 | return (n << SECTOR_SHIFT); |
393 | } | 398 | } |
394 | 399 | ||
400 | /*----------------------------------------------------------------- | ||
401 | * Helper for block layer and dm core operations | ||
402 | *---------------------------------------------------------------*/ | ||
403 | void dm_dispatch_request(struct request *rq); | ||
404 | void dm_requeue_unmapped_request(struct request *rq); | ||
405 | void dm_kill_unmapped_request(struct request *rq, int error); | ||
406 | int dm_underlying_device_busy(struct request_queue *q); | ||
407 | |||
395 | #endif /* _LINUX_DEVICE_MAPPER_H */ | 408 | #endif /* _LINUX_DEVICE_MAPPER_H */ |
diff --git a/include/linux/device.h b/include/linux/device.h index ed4e39f2c423..aebb81036db2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -25,8 +25,6 @@ | |||
25 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
26 | #include <asm/device.h> | 26 | #include <asm/device.h> |
27 | 27 | ||
28 | #define BUS_ID_SIZE 20 | ||
29 | |||
30 | struct device; | 28 | struct device; |
31 | struct device_private; | 29 | struct device_private; |
32 | struct device_driver; | 30 | struct device_driver; |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 48e44ee2b466..2ab84c83c31a 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -123,6 +123,16 @@ struct dm_ioctl { | |||
123 | __u32 target_count; /* in/out */ | 123 | __u32 target_count; /* in/out */ |
124 | __s32 open_count; /* out */ | 124 | __s32 open_count; /* out */ |
125 | __u32 flags; /* in/out */ | 125 | __u32 flags; /* in/out */ |
126 | |||
127 | /* | ||
128 | * event_nr holds either the event number (input and output) or the | ||
129 | * udev cookie value (input only). | ||
130 | * The DM_DEV_WAIT ioctl takes an event number as input. | ||
131 | * The DM_SUSPEND, DM_DEV_REMOVE and DM_DEV_RENAME ioctls | ||
132 | * use the field as a cookie to return in the DM_COOKIE | ||
133 | * variable with the uevents they issue. | ||
134 | * For output, the ioctls return the event number, not the cookie. | ||
135 | */ | ||
126 | __u32 event_nr; /* in/out */ | 136 | __u32 event_nr; /* in/out */ |
127 | __u32 padding; | 137 | __u32 padding; |
128 | 138 | ||
@@ -256,9 +266,9 @@ enum { | |||
256 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 266 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
257 | 267 | ||
258 | #define DM_VERSION_MAJOR 4 | 268 | #define DM_VERSION_MAJOR 4 |
259 | #define DM_VERSION_MINOR 14 | 269 | #define DM_VERSION_MINOR 15 |
260 | #define DM_VERSION_PATCHLEVEL 0 | 270 | #define DM_VERSION_PATCHLEVEL 0 |
261 | #define DM_VERSION_EXTRA "-ioctl (2008-04-23)" | 271 | #define DM_VERSION_EXTRA "-ioctl (2009-04-01)" |
262 | 272 | ||
263 | /* Status bits */ | 273 | /* Status bits */ |
264 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 274 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
diff --git a/include/linux/dm-log-userspace.h b/include/linux/dm-log-userspace.h new file mode 100644 index 000000000000..642e3017b51f --- /dev/null +++ b/include/linux/dm-log-userspace.h | |||
@@ -0,0 +1,386 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2009 Red Hat, Inc. | ||
3 | * | ||
4 | * This file is released under the LGPL. | ||
5 | */ | ||
6 | |||
7 | #ifndef __DM_LOG_USERSPACE_H__ | ||
8 | #define __DM_LOG_USERSPACE_H__ | ||
9 | |||
10 | #include <linux/dm-ioctl.h> /* For DM_UUID_LEN */ | ||
11 | |||
12 | /* | ||
13 | * The device-mapper userspace log module consists of a kernel component and | ||
14 | * a user-space component. The kernel component implements the API defined | ||
15 | * in dm-dirty-log.h. Its purpose is simply to pass the parameters and | ||
16 | * return values of those API functions between kernel and user-space. | ||
17 | * | ||
18 | * Below are defined the 'request_types' - DM_ULOG_CTR, DM_ULOG_DTR, etc. | ||
19 | * These request types represent the different functions in the device-mapper | ||
20 | * dirty log API. Each of these is described in more detail below. | ||
21 | * | ||
22 | * The user-space program must listen for requests from the kernel (representing | ||
23 | * the various API functions) and process them. | ||
24 | * | ||
25 | * User-space begins by setting up the communication link (error checking | ||
26 | * removed for clarity): | ||
27 | * fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); | ||
28 | * addr.nl_family = AF_NETLINK; | ||
29 | * addr.nl_groups = CN_IDX_DM; | ||
30 | * addr.nl_pid = 0; | ||
31 | * r = bind(fd, (struct sockaddr *) &addr, sizeof(addr)); | ||
32 | * opt = addr.nl_groups; | ||
33 | * setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &opt, sizeof(opt)); | ||
34 | * | ||
35 | * User-space will then wait to receive requests form the kernel, which it | ||
36 | * will process as described below. The requests are received in the form, | ||
37 | * ((struct dm_ulog_request) + (additional data)). Depending on the request | ||
38 | * type, there may or may not be 'additional data'. In the descriptions below, | ||
39 | * you will see 'Payload-to-userspace' and 'Payload-to-kernel'. The | ||
40 | * 'Payload-to-userspace' is what the kernel sends in 'additional data' as | ||
41 | * necessary parameters to complete the request. The 'Payload-to-kernel' is | ||
42 | * the 'additional data' returned to the kernel that contains the necessary | ||
43 | * results of the request. The 'data_size' field in the dm_ulog_request | ||
44 | * structure denotes the availability and amount of payload data. | ||
45 | */ | ||
46 | |||
47 | /* | ||
48 | * DM_ULOG_CTR corresponds to (found in dm-dirty-log.h): | ||
49 | * int (*ctr)(struct dm_dirty_log *log, struct dm_target *ti, | ||
50 | * unsigned argc, char **argv); | ||
51 | * | ||
52 | * Payload-to-userspace: | ||
53 | * A single string containing all the argv arguments separated by ' 's | ||
54 | * Payload-to-kernel: | ||
55 | * None. ('data_size' in the dm_ulog_request struct should be 0.) | ||
56 | * | ||
57 | * The UUID contained in the dm_ulog_request structure is the reference that | ||
58 | * will be used by all request types to a specific log. The constructor must | ||
59 | * record this assotiation with instance created. | ||
60 | * | ||
61 | * When the request has been processed, user-space must return the | ||
62 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
63 | * 'data_size' appropriately. | ||
64 | */ | ||
65 | #define DM_ULOG_CTR 1 | ||
66 | |||
67 | /* | ||
68 | * DM_ULOG_DTR corresponds to (found in dm-dirty-log.h): | ||
69 | * void (*dtr)(struct dm_dirty_log *log); | ||
70 | * | ||
71 | * Payload-to-userspace: | ||
72 | * A single string containing all the argv arguments separated by ' 's | ||
73 | * Payload-to-kernel: | ||
74 | * None. ('data_size' in the dm_ulog_request struct should be 0.) | ||
75 | * | ||
76 | * The UUID contained in the dm_ulog_request structure is all that is | ||
77 | * necessary to identify the log instance being destroyed. There is no | ||
78 | * payload data. | ||
79 | * | ||
80 | * When the request has been processed, user-space must return the | ||
81 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
82 | * 'data_size' appropriately. | ||
83 | */ | ||
84 | #define DM_ULOG_DTR 2 | ||
85 | |||
86 | /* | ||
87 | * DM_ULOG_PRESUSPEND corresponds to (found in dm-dirty-log.h): | ||
88 | * int (*presuspend)(struct dm_dirty_log *log); | ||
89 | * | ||
90 | * Payload-to-userspace: | ||
91 | * None. | ||
92 | * Payload-to-kernel: | ||
93 | * None. | ||
94 | * | ||
95 | * The UUID contained in the dm_ulog_request structure is all that is | ||
96 | * necessary to identify the log instance being presuspended. There is no | ||
97 | * payload data. | ||
98 | * | ||
99 | * When the request has been processed, user-space must return the | ||
100 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
101 | * 'data_size' appropriately. | ||
102 | */ | ||
103 | #define DM_ULOG_PRESUSPEND 3 | ||
104 | |||
105 | /* | ||
106 | * DM_ULOG_POSTSUSPEND corresponds to (found in dm-dirty-log.h): | ||
107 | * int (*postsuspend)(struct dm_dirty_log *log); | ||
108 | * | ||
109 | * Payload-to-userspace: | ||
110 | * None. | ||
111 | * Payload-to-kernel: | ||
112 | * None. | ||
113 | * | ||
114 | * The UUID contained in the dm_ulog_request structure is all that is | ||
115 | * necessary to identify the log instance being postsuspended. There is no | ||
116 | * payload data. | ||
117 | * | ||
118 | * When the request has been processed, user-space must return the | ||
119 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
120 | * 'data_size' appropriately. | ||
121 | */ | ||
122 | #define DM_ULOG_POSTSUSPEND 4 | ||
123 | |||
124 | /* | ||
125 | * DM_ULOG_RESUME corresponds to (found in dm-dirty-log.h): | ||
126 | * int (*resume)(struct dm_dirty_log *log); | ||
127 | * | ||
128 | * Payload-to-userspace: | ||
129 | * None. | ||
130 | * Payload-to-kernel: | ||
131 | * None. | ||
132 | * | ||
133 | * The UUID contained in the dm_ulog_request structure is all that is | ||
134 | * necessary to identify the log instance being resumed. There is no | ||
135 | * payload data. | ||
136 | * | ||
137 | * When the request has been processed, user-space must return the | ||
138 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
139 | * 'data_size' appropriately. | ||
140 | */ | ||
141 | #define DM_ULOG_RESUME 5 | ||
142 | |||
143 | /* | ||
144 | * DM_ULOG_GET_REGION_SIZE corresponds to (found in dm-dirty-log.h): | ||
145 | * uint32_t (*get_region_size)(struct dm_dirty_log *log); | ||
146 | * | ||
147 | * Payload-to-userspace: | ||
148 | * None. | ||
149 | * Payload-to-kernel: | ||
150 | * uint64_t - contains the region size | ||
151 | * | ||
152 | * The region size is something that was determined at constructor time. | ||
153 | * It is returned in the payload area and 'data_size' is set to | ||
154 | * reflect this. | ||
155 | * | ||
156 | * When the request has been processed, user-space must return the | ||
157 | * dm_ulog_request to the kernel - setting the 'error' field appropriately. | ||
158 | */ | ||
159 | #define DM_ULOG_GET_REGION_SIZE 6 | ||
160 | |||
161 | /* | ||
162 | * DM_ULOG_IS_CLEAN corresponds to (found in dm-dirty-log.h): | ||
163 | * int (*is_clean)(struct dm_dirty_log *log, region_t region); | ||
164 | * | ||
165 | * Payload-to-userspace: | ||
166 | * uint64_t - the region to get clean status on | ||
167 | * Payload-to-kernel: | ||
168 | * int64_t - 1 if clean, 0 otherwise | ||
169 | * | ||
170 | * Payload is sizeof(uint64_t) and contains the region for which the clean | ||
171 | * status is being made. | ||
172 | * | ||
173 | * When the request has been processed, user-space must return the | ||
174 | * dm_ulog_request to the kernel - filling the payload with 0 (not clean) or | ||
175 | * 1 (clean), setting 'data_size' and 'error' appropriately. | ||
176 | */ | ||
177 | #define DM_ULOG_IS_CLEAN 7 | ||
178 | |||
179 | /* | ||
180 | * DM_ULOG_IN_SYNC corresponds to (found in dm-dirty-log.h): | ||
181 | * int (*in_sync)(struct dm_dirty_log *log, region_t region, | ||
182 | * int can_block); | ||
183 | * | ||
184 | * Payload-to-userspace: | ||
185 | * uint64_t - the region to get sync status on | ||
186 | * Payload-to-kernel: | ||
187 | * int64_t - 1 if in-sync, 0 otherwise | ||
188 | * | ||
189 | * Exactly the same as 'is_clean' above, except this time asking "has the | ||
190 | * region been recovered?" vs. "is the region not being modified?" | ||
191 | */ | ||
192 | #define DM_ULOG_IN_SYNC 8 | ||
193 | |||
194 | /* | ||
195 | * DM_ULOG_FLUSH corresponds to (found in dm-dirty-log.h): | ||
196 | * int (*flush)(struct dm_dirty_log *log); | ||
197 | * | ||
198 | * Payload-to-userspace: | ||
199 | * None. | ||
200 | * Payload-to-kernel: | ||
201 | * None. | ||
202 | * | ||
203 | * No incoming or outgoing payload. Simply flush log state to disk. | ||
204 | * | ||
205 | * When the request has been processed, user-space must return the | ||
206 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
207 | * 'data_size' appropriately. | ||
208 | */ | ||
209 | #define DM_ULOG_FLUSH 9 | ||
210 | |||
211 | /* | ||
212 | * DM_ULOG_MARK_REGION corresponds to (found in dm-dirty-log.h): | ||
213 | * void (*mark_region)(struct dm_dirty_log *log, region_t region); | ||
214 | * | ||
215 | * Payload-to-userspace: | ||
216 | * uint64_t [] - region(s) to mark | ||
217 | * Payload-to-kernel: | ||
218 | * None. | ||
219 | * | ||
220 | * Incoming payload contains the one or more regions to mark dirty. | ||
221 | * The number of regions contained in the payload can be determined from | ||
222 | * 'data_size/sizeof(uint64_t)'. | ||
223 | * | ||
224 | * When the request has been processed, user-space must return the | ||
225 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
226 | * 'data_size' appropriately. | ||
227 | */ | ||
228 | #define DM_ULOG_MARK_REGION 10 | ||
229 | |||
230 | /* | ||
231 | * DM_ULOG_CLEAR_REGION corresponds to (found in dm-dirty-log.h): | ||
232 | * void (*clear_region)(struct dm_dirty_log *log, region_t region); | ||
233 | * | ||
234 | * Payload-to-userspace: | ||
235 | * uint64_t [] - region(s) to clear | ||
236 | * Payload-to-kernel: | ||
237 | * None. | ||
238 | * | ||
239 | * Incoming payload contains the one or more regions to mark clean. | ||
240 | * The number of regions contained in the payload can be determined from | ||
241 | * 'data_size/sizeof(uint64_t)'. | ||
242 | * | ||
243 | * When the request has been processed, user-space must return the | ||
244 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
245 | * 'data_size' appropriately. | ||
246 | */ | ||
247 | #define DM_ULOG_CLEAR_REGION 11 | ||
248 | |||
249 | /* | ||
250 | * DM_ULOG_GET_RESYNC_WORK corresponds to (found in dm-dirty-log.h): | ||
251 | * int (*get_resync_work)(struct dm_dirty_log *log, region_t *region); | ||
252 | * | ||
253 | * Payload-to-userspace: | ||
254 | * None. | ||
255 | * Payload-to-kernel: | ||
256 | * { | ||
257 | * int64_t i; -- 1 if recovery necessary, 0 otherwise | ||
258 | * uint64_t r; -- The region to recover if i=1 | ||
259 | * } | ||
260 | * 'data_size' should be set appropriately. | ||
261 | * | ||
262 | * When the request has been processed, user-space must return the | ||
263 | * dm_ulog_request to the kernel - setting the 'error' field appropriately. | ||
264 | */ | ||
265 | #define DM_ULOG_GET_RESYNC_WORK 12 | ||
266 | |||
267 | /* | ||
268 | * DM_ULOG_SET_REGION_SYNC corresponds to (found in dm-dirty-log.h): | ||
269 | * void (*set_region_sync)(struct dm_dirty_log *log, | ||
270 | * region_t region, int in_sync); | ||
271 | * | ||
272 | * Payload-to-userspace: | ||
273 | * { | ||
274 | * uint64_t - region to set sync state on | ||
275 | * int64_t - 0 if not-in-sync, 1 if in-sync | ||
276 | * } | ||
277 | * Payload-to-kernel: | ||
278 | * None. | ||
279 | * | ||
280 | * When the request has been processed, user-space must return the | ||
281 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
282 | * 'data_size' appropriately. | ||
283 | */ | ||
284 | #define DM_ULOG_SET_REGION_SYNC 13 | ||
285 | |||
286 | /* | ||
287 | * DM_ULOG_GET_SYNC_COUNT corresponds to (found in dm-dirty-log.h): | ||
288 | * region_t (*get_sync_count)(struct dm_dirty_log *log); | ||
289 | * | ||
290 | * Payload-to-userspace: | ||
291 | * None. | ||
292 | * Payload-to-kernel: | ||
293 | * uint64_t - the number of in-sync regions | ||
294 | * | ||
295 | * No incoming payload. Kernel-bound payload contains the number of | ||
296 | * regions that are in-sync (in a size_t). | ||
297 | * | ||
298 | * When the request has been processed, user-space must return the | ||
299 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
300 | * 'data_size' appropriately. | ||
301 | */ | ||
302 | #define DM_ULOG_GET_SYNC_COUNT 14 | ||
303 | |||
304 | /* | ||
305 | * DM_ULOG_STATUS_INFO corresponds to (found in dm-dirty-log.h): | ||
306 | * int (*status)(struct dm_dirty_log *log, STATUSTYPE_INFO, | ||
307 | * char *result, unsigned maxlen); | ||
308 | * | ||
309 | * Payload-to-userspace: | ||
310 | * None. | ||
311 | * Payload-to-kernel: | ||
312 | * Character string containing STATUSTYPE_INFO | ||
313 | * | ||
314 | * When the request has been processed, user-space must return the | ||
315 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
316 | * 'data_size' appropriately. | ||
317 | */ | ||
318 | #define DM_ULOG_STATUS_INFO 15 | ||
319 | |||
320 | /* | ||
321 | * DM_ULOG_STATUS_TABLE corresponds to (found in dm-dirty-log.h): | ||
322 | * int (*status)(struct dm_dirty_log *log, STATUSTYPE_TABLE, | ||
323 | * char *result, unsigned maxlen); | ||
324 | * | ||
325 | * Payload-to-userspace: | ||
326 | * None. | ||
327 | * Payload-to-kernel: | ||
328 | * Character string containing STATUSTYPE_TABLE | ||
329 | * | ||
330 | * When the request has been processed, user-space must return the | ||
331 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
332 | * 'data_size' appropriately. | ||
333 | */ | ||
334 | #define DM_ULOG_STATUS_TABLE 16 | ||
335 | |||
336 | /* | ||
337 | * DM_ULOG_IS_REMOTE_RECOVERING corresponds to (found in dm-dirty-log.h): | ||
338 | * int (*is_remote_recovering)(struct dm_dirty_log *log, region_t region); | ||
339 | * | ||
340 | * Payload-to-userspace: | ||
341 | * uint64_t - region to determine recovery status on | ||
342 | * Payload-to-kernel: | ||
343 | * { | ||
344 | * int64_t is_recovering; -- 0 if no, 1 if yes | ||
345 | * uint64_t in_sync_hint; -- lowest region still needing resync | ||
346 | * } | ||
347 | * | ||
348 | * When the request has been processed, user-space must return the | ||
349 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
350 | * 'data_size' appropriately. | ||
351 | */ | ||
352 | #define DM_ULOG_IS_REMOTE_RECOVERING 17 | ||
353 | |||
354 | /* | ||
355 | * (DM_ULOG_REQUEST_MASK & request_type) to get the request type | ||
356 | * | ||
357 | * Payload-to-userspace: | ||
358 | * A single string containing all the argv arguments separated by ' 's | ||
359 | * Payload-to-kernel: | ||
360 | * None. ('data_size' in the dm_ulog_request struct should be 0.) | ||
361 | * | ||
362 | * We are reserving 8 bits of the 32-bit 'request_type' field for the | ||
363 | * various request types above. The remaining 24-bits are currently | ||
364 | * set to zero and are reserved for future use and compatibility concerns. | ||
365 | * | ||
366 | * User-space should always use DM_ULOG_REQUEST_TYPE to aquire the | ||
367 | * request type from the 'request_type' field to maintain forward compatibility. | ||
368 | */ | ||
369 | #define DM_ULOG_REQUEST_MASK 0xFF | ||
370 | #define DM_ULOG_REQUEST_TYPE(request_type) \ | ||
371 | (DM_ULOG_REQUEST_MASK & (request_type)) | ||
372 | |||
373 | struct dm_ulog_request { | ||
374 | char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */ | ||
375 | char padding[7]; /* Padding because DM_UUID_LEN = 129 */ | ||
376 | |||
377 | int32_t error; /* Used to report back processing errors */ | ||
378 | |||
379 | uint32_t seq; /* Sequence number for request */ | ||
380 | uint32_t request_type; /* DM_ULOG_* defined above */ | ||
381 | uint32_t data_size; /* How much data (not including this struct) */ | ||
382 | |||
383 | char data[0]; | ||
384 | }; | ||
385 | |||
386 | #endif /* __DM_LOG_USERSPACE_H__ */ | ||
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 1731fb5fd775..4a2b162c256a 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -126,6 +126,8 @@ extern int free_irte(int irq); | |||
126 | extern int irq_remapped(int irq); | 126 | extern int irq_remapped(int irq); |
127 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); | 127 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); |
128 | extern struct intel_iommu *map_ioapic_to_ir(int apic); | 128 | extern struct intel_iommu *map_ioapic_to_ir(int apic); |
129 | extern int set_ioapic_sid(struct irte *irte, int apic); | ||
130 | extern int set_msi_sid(struct irte *irte, struct pci_dev *dev); | ||
129 | #else | 131 | #else |
130 | static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) | 132 | static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) |
131 | { | 133 | { |
@@ -156,6 +158,15 @@ static inline struct intel_iommu *map_ioapic_to_ir(int apic) | |||
156 | { | 158 | { |
157 | return NULL; | 159 | return NULL; |
158 | } | 160 | } |
161 | static inline int set_ioapic_sid(struct irte *irte, int apic) | ||
162 | { | ||
163 | return 0; | ||
164 | } | ||
165 | static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev) | ||
166 | { | ||
167 | return 0; | ||
168 | } | ||
169 | |||
159 | #define irq_remapped(irq) (0) | 170 | #define irq_remapped(irq) (0) |
160 | #define enable_intr_remapping(mode) (-1) | 171 | #define enable_intr_remapping(mode) (-1) |
161 | #define disable_intr_remapping() (0) | 172 | #define disable_intr_remapping() (0) |
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 7605c5e9589f..00d6a68d0421 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
@@ -122,9 +122,10 @@ static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_r | |||
122 | 122 | ||
123 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) | 123 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) |
124 | { | 124 | { |
125 | #ifdef ELF_CORE_COPY_TASK_REGS | 125 | #if defined (ELF_CORE_COPY_TASK_REGS) |
126 | |||
127 | return ELF_CORE_COPY_TASK_REGS(t, elfregs); | 126 | return ELF_CORE_COPY_TASK_REGS(t, elfregs); |
127 | #elif defined (task_pt_regs) | ||
128 | elf_core_copy_regs(elfregs, task_pt_regs(t)); | ||
128 | #endif | 129 | #endif |
129 | return 0; | 130 | return 0; |
130 | } | 131 | } |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index f45a8ae5f828..3b85ba6479f4 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -8,10 +8,8 @@ | |||
8 | #ifndef _LINUX_EVENTFD_H | 8 | #ifndef _LINUX_EVENTFD_H |
9 | #define _LINUX_EVENTFD_H | 9 | #define _LINUX_EVENTFD_H |
10 | 10 | ||
11 | #ifdef CONFIG_EVENTFD | ||
12 | |||
13 | /* For O_CLOEXEC and O_NONBLOCK */ | ||
14 | #include <linux/fcntl.h> | 11 | #include <linux/fcntl.h> |
12 | #include <linux/file.h> | ||
15 | 13 | ||
16 | /* | 14 | /* |
17 | * CAREFUL: Check include/asm-generic/fcntl.h when defining | 15 | * CAREFUL: Check include/asm-generic/fcntl.h when defining |
@@ -27,16 +25,37 @@ | |||
27 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) | 25 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) |
28 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) | 26 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) |
29 | 27 | ||
28 | #ifdef CONFIG_EVENTFD | ||
29 | |||
30 | struct eventfd_ctx *eventfd_ctx_get(struct eventfd_ctx *ctx); | ||
31 | void eventfd_ctx_put(struct eventfd_ctx *ctx); | ||
30 | struct file *eventfd_fget(int fd); | 32 | struct file *eventfd_fget(int fd); |
31 | int eventfd_signal(struct file *file, int n); | 33 | struct eventfd_ctx *eventfd_ctx_fdget(int fd); |
34 | struct eventfd_ctx *eventfd_ctx_fileget(struct file *file); | ||
35 | int eventfd_signal(struct eventfd_ctx *ctx, int n); | ||
32 | 36 | ||
33 | #else /* CONFIG_EVENTFD */ | 37 | #else /* CONFIG_EVENTFD */ |
34 | 38 | ||
35 | #define eventfd_fget(fd) ERR_PTR(-ENOSYS) | 39 | /* |
36 | static inline int eventfd_signal(struct file *file, int n) | 40 | * Ugly ugly ugly error layer to support modules that uses eventfd but |
37 | { return 0; } | 41 | * pretend to work in !CONFIG_EVENTFD configurations. Namely, AIO. |
42 | */ | ||
43 | static inline struct eventfd_ctx *eventfd_ctx_fdget(int fd) | ||
44 | { | ||
45 | return ERR_PTR(-ENOSYS); | ||
46 | } | ||
47 | |||
48 | static inline int eventfd_signal(struct eventfd_ctx *ctx, int n) | ||
49 | { | ||
50 | return -ENOSYS; | ||
51 | } | ||
52 | |||
53 | static inline void eventfd_ctx_put(struct eventfd_ctx *ctx) | ||
54 | { | ||
55 | |||
56 | } | ||
38 | 57 | ||
39 | #endif /* CONFIG_EVENTFD */ | 58 | #endif |
40 | 59 | ||
41 | #endif /* _LINUX_EVENTFD_H */ | 60 | #endif /* _LINUX_EVENTFD_H */ |
42 | 61 | ||
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 7894dd0f3b77..ca1bfe90004f 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
@@ -103,10 +103,6 @@ struct ext3_inode_info { | |||
103 | */ | 103 | */ |
104 | struct rw_semaphore xattr_sem; | 104 | struct rw_semaphore xattr_sem; |
105 | #endif | 105 | #endif |
106 | #ifdef CONFIG_EXT3_FS_POSIX_ACL | ||
107 | struct posix_acl *i_acl; | ||
108 | struct posix_acl *i_default_acl; | ||
109 | #endif | ||
110 | 106 | ||
111 | struct list_head i_orphan; /* unlinked but open inodes */ | 107 | struct list_head i_orphan; /* unlinked but open inodes */ |
112 | 108 | ||
diff --git a/include/linux/falloc.h b/include/linux/falloc.h index 8e912ab6a072..3c155107d61f 100644 --- a/include/linux/falloc.h +++ b/include/linux/falloc.h | |||
@@ -3,4 +3,25 @@ | |||
3 | 3 | ||
4 | #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ | 4 | #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ |
5 | 5 | ||
6 | #ifdef __KERNEL__ | ||
7 | |||
8 | /* | ||
9 | * Space reservation ioctls and argument structure | ||
10 | * are designed to be compatible with the legacy XFS ioctls. | ||
11 | */ | ||
12 | struct space_resv { | ||
13 | __s16 l_type; | ||
14 | __s16 l_whence; | ||
15 | __s64 l_start; | ||
16 | __s64 l_len; /* len == 0 means until end of file */ | ||
17 | __s32 l_sysid; | ||
18 | __u32 l_pid; | ||
19 | __s32 l_pad[4]; /* reserved area */ | ||
20 | }; | ||
21 | |||
22 | #define FS_IOC_RESVSP _IOW('X', 40, struct space_resv) | ||
23 | #define FS_IOC_RESVSP64 _IOW('X', 42, struct space_resv) | ||
24 | |||
25 | #endif /* __KERNEL__ */ | ||
26 | |||
6 | #endif /* _FALLOC_H_ */ | 27 | #endif /* _FALLOC_H_ */ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index dd68358996b7..f847df9e99b6 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -819,6 +819,7 @@ struct fb_info { | |||
819 | int node; | 819 | int node; |
820 | int flags; | 820 | int flags; |
821 | struct mutex lock; /* Lock for open/release/ioctl funcs */ | 821 | struct mutex lock; /* Lock for open/release/ioctl funcs */ |
822 | struct mutex mm_lock; /* Lock for fb_mmap and smem_* fields */ | ||
822 | struct fb_var_screeninfo var; /* Current var */ | 823 | struct fb_var_screeninfo var; /* Current var */ |
823 | struct fb_fix_screeninfo fix; /* Current fix */ | 824 | struct fb_fix_screeninfo fix; /* Current fix */ |
824 | struct fb_monspecs monspecs; /* Current Monitor specs */ | 825 | struct fb_monspecs monspecs; /* Current Monitor specs */ |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 9823946adbc5..192d1e43c43c 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -127,6 +127,7 @@ struct fw_card { | |||
127 | struct delayed_work work; | 127 | struct delayed_work work; |
128 | int bm_retries; | 128 | int bm_retries; |
129 | int bm_generation; | 129 | int bm_generation; |
130 | __be32 bm_transaction_data[2]; | ||
130 | 131 | ||
131 | bool broadcast_channel_allocated; | 132 | bool broadcast_channel_allocated; |
132 | u32 broadcast_channel; | 133 | u32 broadcast_channel; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1ff5e4e01952..0872372184fe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -710,6 +710,9 @@ static inline int mapping_writably_mapped(struct address_space *mapping) | |||
710 | #define i_size_ordered_init(inode) do { } while (0) | 710 | #define i_size_ordered_init(inode) do { } while (0) |
711 | #endif | 711 | #endif |
712 | 712 | ||
713 | struct posix_acl; | ||
714 | #define ACL_NOT_CACHED ((void *)(-1)) | ||
715 | |||
713 | struct inode { | 716 | struct inode { |
714 | struct hlist_node i_hash; | 717 | struct hlist_node i_hash; |
715 | struct list_head i_list; | 718 | struct list_head i_list; |
@@ -773,6 +776,10 @@ struct inode { | |||
773 | #ifdef CONFIG_SECURITY | 776 | #ifdef CONFIG_SECURITY |
774 | void *i_security; | 777 | void *i_security; |
775 | #endif | 778 | #endif |
779 | #ifdef CONFIG_FS_POSIX_ACL | ||
780 | struct posix_acl *i_acl; | ||
781 | struct posix_acl *i_default_acl; | ||
782 | #endif | ||
776 | void *i_private; /* fs or device private pointer */ | 783 | void *i_private; /* fs or device private pointer */ |
777 | }; | 784 | }; |
778 | 785 | ||
@@ -1906,6 +1913,8 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1906 | 1913 | ||
1907 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 1914 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
1908 | struct file *filp); | 1915 | struct file *filp); |
1916 | extern int do_fallocate(struct file *file, int mode, loff_t offset, | ||
1917 | loff_t len); | ||
1909 | extern long do_sys_open(int dfd, const char __user *filename, int flags, | 1918 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
1910 | int mode); | 1919 | int mode); |
1911 | extern struct file *filp_open(const char *, int, int); | 1920 | extern struct file *filp_open(const char *, int, int); |
@@ -1914,6 +1923,10 @@ extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | |||
1914 | extern int filp_close(struct file *, fl_owner_t id); | 1923 | extern int filp_close(struct file *, fl_owner_t id); |
1915 | extern char * getname(const char __user *); | 1924 | extern char * getname(const char __user *); |
1916 | 1925 | ||
1926 | /* fs/ioctl.c */ | ||
1927 | |||
1928 | extern int ioctl_preallocate(struct file *filp, void __user *argp); | ||
1929 | |||
1917 | /* fs/dcache.c */ | 1930 | /* fs/dcache.c */ |
1918 | extern void __init vfs_caches_init_early(void); | 1931 | extern void __init vfs_caches_init_early(void); |
1919 | extern void __init vfs_caches_init(unsigned long); | 1932 | extern void __init vfs_caches_init(unsigned long); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 44848aa830dc..6c3de999fb34 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -280,7 +280,7 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry) | |||
280 | assert_spin_locked(&dentry->d_lock); | 280 | assert_spin_locked(&dentry->d_lock); |
281 | 281 | ||
282 | parent = dentry->d_parent; | 282 | parent = dentry->d_parent; |
283 | if (fsnotify_inode_watches_children(parent->d_inode)) | 283 | if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode)) |
284 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; | 284 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; |
285 | else | 285 | else |
286 | dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; | 286 | dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index d41ed593f79f..cf593bf9fd32 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -25,6 +25,11 @@ | |||
25 | * - add IOCTL message | 25 | * - add IOCTL message |
26 | * - add unsolicited notification support | 26 | * - add unsolicited notification support |
27 | * - add POLL message and NOTIFY_POLL notification | 27 | * - add POLL message and NOTIFY_POLL notification |
28 | * | ||
29 | * 7.12 | ||
30 | * - add umask flag to input argument of open, mknod and mkdir | ||
31 | * - add notification messages for invalidation of inodes and | ||
32 | * directory entries | ||
28 | */ | 33 | */ |
29 | 34 | ||
30 | #ifndef _LINUX_FUSE_H | 35 | #ifndef _LINUX_FUSE_H |
@@ -36,7 +41,7 @@ | |||
36 | #define FUSE_KERNEL_VERSION 7 | 41 | #define FUSE_KERNEL_VERSION 7 |
37 | 42 | ||
38 | /** Minor version number of this interface */ | 43 | /** Minor version number of this interface */ |
39 | #define FUSE_KERNEL_MINOR_VERSION 11 | 44 | #define FUSE_KERNEL_MINOR_VERSION 12 |
40 | 45 | ||
41 | /** The node ID of the root inode */ | 46 | /** The node ID of the root inode */ |
42 | #define FUSE_ROOT_ID 1 | 47 | #define FUSE_ROOT_ID 1 |
@@ -112,6 +117,7 @@ struct fuse_file_lock { | |||
112 | * INIT request/reply flags | 117 | * INIT request/reply flags |
113 | * | 118 | * |
114 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." | 119 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." |
120 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations | ||
115 | */ | 121 | */ |
116 | #define FUSE_ASYNC_READ (1 << 0) | 122 | #define FUSE_ASYNC_READ (1 << 0) |
117 | #define FUSE_POSIX_LOCKS (1 << 1) | 123 | #define FUSE_POSIX_LOCKS (1 << 1) |
@@ -119,6 +125,7 @@ struct fuse_file_lock { | |||
119 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) | 125 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) |
120 | #define FUSE_EXPORT_SUPPORT (1 << 4) | 126 | #define FUSE_EXPORT_SUPPORT (1 << 4) |
121 | #define FUSE_BIG_WRITES (1 << 5) | 127 | #define FUSE_BIG_WRITES (1 << 5) |
128 | #define FUSE_DONT_MASK (1 << 6) | ||
122 | 129 | ||
123 | /** | 130 | /** |
124 | * CUSE INIT request/reply flags | 131 | * CUSE INIT request/reply flags |
@@ -224,6 +231,8 @@ enum fuse_opcode { | |||
224 | 231 | ||
225 | enum fuse_notify_code { | 232 | enum fuse_notify_code { |
226 | FUSE_NOTIFY_POLL = 1, | 233 | FUSE_NOTIFY_POLL = 1, |
234 | FUSE_NOTIFY_INVAL_INODE = 2, | ||
235 | FUSE_NOTIFY_INVAL_ENTRY = 3, | ||
227 | FUSE_NOTIFY_CODE_MAX, | 236 | FUSE_NOTIFY_CODE_MAX, |
228 | }; | 237 | }; |
229 | 238 | ||
@@ -262,14 +271,18 @@ struct fuse_attr_out { | |||
262 | struct fuse_attr attr; | 271 | struct fuse_attr attr; |
263 | }; | 272 | }; |
264 | 273 | ||
274 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 | ||
275 | |||
265 | struct fuse_mknod_in { | 276 | struct fuse_mknod_in { |
266 | __u32 mode; | 277 | __u32 mode; |
267 | __u32 rdev; | 278 | __u32 rdev; |
279 | __u32 umask; | ||
280 | __u32 padding; | ||
268 | }; | 281 | }; |
269 | 282 | ||
270 | struct fuse_mkdir_in { | 283 | struct fuse_mkdir_in { |
271 | __u32 mode; | 284 | __u32 mode; |
272 | __u32 padding; | 285 | __u32 umask; |
273 | }; | 286 | }; |
274 | 287 | ||
275 | struct fuse_rename_in { | 288 | struct fuse_rename_in { |
@@ -301,7 +314,14 @@ struct fuse_setattr_in { | |||
301 | 314 | ||
302 | struct fuse_open_in { | 315 | struct fuse_open_in { |
303 | __u32 flags; | 316 | __u32 flags; |
317 | __u32 unused; | ||
318 | }; | ||
319 | |||
320 | struct fuse_create_in { | ||
321 | __u32 flags; | ||
304 | __u32 mode; | 322 | __u32 mode; |
323 | __u32 umask; | ||
324 | __u32 padding; | ||
305 | }; | 325 | }; |
306 | 326 | ||
307 | struct fuse_open_out { | 327 | struct fuse_open_out { |
@@ -508,4 +528,16 @@ struct fuse_dirent { | |||
508 | #define FUSE_DIRENT_SIZE(d) \ | 528 | #define FUSE_DIRENT_SIZE(d) \ |
509 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 529 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
510 | 530 | ||
531 | struct fuse_notify_inval_inode_out { | ||
532 | __u64 ino; | ||
533 | __s64 off; | ||
534 | __s64 len; | ||
535 | }; | ||
536 | |||
537 | struct fuse_notify_inval_entry_out { | ||
538 | __u64 parent; | ||
539 | __u32 namelen; | ||
540 | __u32 padding; | ||
541 | }; | ||
542 | |||
511 | #endif /* _LINUX_FUSE_H */ | 543 | #endif /* _LINUX_FUSE_H */ |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 45257475623c..8246c697863d 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -2,7 +2,9 @@ | |||
2 | #define LINUX_HARDIRQ_H | 2 | #define LINUX_HARDIRQ_H |
3 | 3 | ||
4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
5 | #ifdef CONFIG_PREEMPT | ||
5 | #include <linux/smp_lock.h> | 6 | #include <linux/smp_lock.h> |
7 | #endif | ||
6 | #include <linux/lockdep.h> | 8 | #include <linux/lockdep.h> |
7 | #include <linux/ftrace_irq.h> | 9 | #include <linux/ftrace_irq.h> |
8 | #include <asm/hardirq.h> | 10 | #include <asm/hardirq.h> |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index a05a5ef33391..2723513a5651 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -33,7 +33,7 @@ void hugetlb_report_meminfo(struct seq_file *); | |||
33 | int hugetlb_report_node_meminfo(int, char *); | 33 | int hugetlb_report_node_meminfo(int, char *); |
34 | unsigned long hugetlb_total_pages(void); | 34 | unsigned long hugetlb_total_pages(void); |
35 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 35 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
36 | unsigned long address, int write_access); | 36 | unsigned long address, unsigned int flags); |
37 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, | 37 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
38 | struct vm_area_struct *vma, | 38 | struct vm_area_struct *vma, |
39 | int acctflags); | 39 | int acctflags); |
@@ -98,7 +98,7 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
98 | #define pud_huge(x) 0 | 98 | #define pud_huge(x) 0 |
99 | #define is_hugepage_only_range(mm, addr, len) 0 | 99 | #define is_hugepage_only_range(mm, addr, len) 0 |
100 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 100 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
101 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) | 101 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) |
102 | 102 | ||
103 | #define hugetlb_change_protection(vma, address, end, newprot) | 103 | #define hugetlb_change_protection(vma, address, end, newprot) |
104 | 104 | ||
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index 10d701eec484..b6a85183c333 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h | |||
@@ -175,16 +175,16 @@ struct icmp6_filter { | |||
175 | 175 | ||
176 | 176 | ||
177 | extern void icmpv6_send(struct sk_buff *skb, | 177 | extern void icmpv6_send(struct sk_buff *skb, |
178 | int type, int code, | 178 | u8 type, u8 code, |
179 | __u32 info, | 179 | __u32 info, |
180 | struct net_device *dev); | 180 | struct net_device *dev); |
181 | 181 | ||
182 | extern int icmpv6_init(void); | 182 | extern int icmpv6_init(void); |
183 | extern int icmpv6_err_convert(int type, int code, | 183 | extern int icmpv6_err_convert(u8 type, u8 code, |
184 | int *err); | 184 | int *err); |
185 | extern void icmpv6_cleanup(void); | 185 | extern void icmpv6_cleanup(void); |
186 | extern void icmpv6_param_prob(struct sk_buff *skb, | 186 | extern void icmpv6_param_prob(struct sk_buff *skb, |
187 | int code, int pos); | 187 | u8 code, int pos); |
188 | 188 | ||
189 | struct flowi; | 189 | struct flowi; |
190 | struct in6_addr; | 190 | struct in6_addr; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 95c6e00a72e8..edc93a6d931d 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1062,7 +1062,6 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l | |||
1062 | extern int ide_vlb_clk; | 1062 | extern int ide_vlb_clk; |
1063 | extern int ide_pci_clk; | 1063 | extern int ide_pci_clk; |
1064 | 1064 | ||
1065 | unsigned int ide_rq_bytes(struct request *); | ||
1066 | int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int); | 1065 | int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int); |
1067 | void ide_kill_rq(ide_drive_t *, struct request *); | 1066 | void ide_kill_rq(ide_drive_t *, struct request *); |
1068 | 1067 | ||
@@ -1361,7 +1360,6 @@ int ide_in_drive_list(u16 *, const struct drive_list_entry *); | |||
1361 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1360 | #ifdef CONFIG_BLK_DEV_IDEDMA |
1362 | int ide_dma_good_drive(ide_drive_t *); | 1361 | int ide_dma_good_drive(ide_drive_t *); |
1363 | int __ide_dma_bad_drive(ide_drive_t *); | 1362 | int __ide_dma_bad_drive(ide_drive_t *); |
1364 | int ide_id_dma_bug(ide_drive_t *); | ||
1365 | 1363 | ||
1366 | u8 ide_find_dma_mode(ide_drive_t *, u8); | 1364 | u8 ide_find_dma_mode(ide_drive_t *, u8); |
1367 | 1365 | ||
@@ -1402,7 +1400,6 @@ void ide_dma_lost_irq(ide_drive_t *); | |||
1402 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); | 1400 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); |
1403 | 1401 | ||
1404 | #else | 1402 | #else |
1405 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | ||
1406 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } | 1403 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } |
1407 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } | 1404 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } |
1408 | static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } | 1405 | static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } |
@@ -1422,6 +1419,7 @@ static inline void ide_dma_unmap_sg(ide_drive_t *drive, | |||
1422 | 1419 | ||
1423 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1420 | #ifdef CONFIG_BLK_DEV_IDEACPI |
1424 | int ide_acpi_init(void); | 1421 | int ide_acpi_init(void); |
1422 | bool ide_port_acpi(ide_hwif_t *hwif); | ||
1425 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | 1423 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); |
1426 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1424 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
1427 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1425 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
@@ -1430,6 +1428,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *); | |||
1430 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | 1428 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); |
1431 | #else | 1429 | #else |
1432 | static inline int ide_acpi_init(void) { return 0; } | 1430 | static inline int ide_acpi_init(void) { return 0; } |
1431 | static inline bool ide_port_acpi(ide_hwif_t *hwif) { return 0; } | ||
1433 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1432 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
1434 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1433 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
1435 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1434 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index ae3a1871413d..70fdba2bbf71 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -78,6 +78,7 @@ | |||
78 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ | 78 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ |
79 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ | 79 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ |
80 | #define ETH_P_TIPC 0x88CA /* TIPC */ | 80 | #define ETH_P_TIPC 0x88CA /* TIPC */ |
81 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ | ||
81 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ | 82 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ |
82 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ | 83 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ |
83 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | 84 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ |
diff --git a/include/linux/ima.h b/include/linux/ima.h index b1b827d091a9..0e3f2a4c25f6 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
@@ -24,6 +24,7 @@ extern int ima_path_check(struct path *path, int mask, int update_counts); | |||
24 | extern void ima_file_free(struct file *file); | 24 | extern void ima_file_free(struct file *file); |
25 | extern int ima_file_mmap(struct file *file, unsigned long prot); | 25 | extern int ima_file_mmap(struct file *file, unsigned long prot); |
26 | extern void ima_counts_get(struct file *file); | 26 | extern void ima_counts_get(struct file *file); |
27 | extern void ima_counts_put(struct path *path, int mask); | ||
27 | 28 | ||
28 | #else | 29 | #else |
29 | static inline int ima_bprm_check(struct linux_binprm *bprm) | 30 | static inline int ima_bprm_check(struct linux_binprm *bprm) |
@@ -60,5 +61,10 @@ static inline void ima_counts_get(struct file *file) | |||
60 | { | 61 | { |
61 | return; | 62 | return; |
62 | } | 63 | } |
64 | |||
65 | static inline void ima_counts_put(struct path *path, int mask) | ||
66 | { | ||
67 | return; | ||
68 | } | ||
63 | #endif /* CONFIG_IMA_H */ | 69 | #endif /* CONFIG_IMA_H */ |
64 | #endif /* _LINUX_IMA_H */ | 70 | #endif /* _LINUX_IMA_H */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 5368fbdc7801..7fc01b13be43 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -183,5 +183,8 @@ extern struct cred init_cred; | |||
183 | LIST_HEAD_INIT(cpu_timers[2]), \ | 183 | LIST_HEAD_INIT(cpu_timers[2]), \ |
184 | } | 184 | } |
185 | 185 | ||
186 | /* Attach to the init_task data structure for proper alignment */ | ||
187 | #define __init_task_data __attribute__((__section__(".data.init_task"))) | ||
188 | |||
186 | 189 | ||
187 | #endif | 190 | #endif |
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h new file mode 100644 index 000000000000..7964516c6954 --- /dev/null +++ b/include/linux/input/matrix_keypad.h | |||
@@ -0,0 +1,65 @@ | |||
1 | #ifndef _MATRIX_KEYPAD_H | ||
2 | #define _MATRIX_KEYPAD_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/input.h> | ||
6 | |||
7 | #define MATRIX_MAX_ROWS 16 | ||
8 | #define MATRIX_MAX_COLS 16 | ||
9 | |||
10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ | ||
11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ | ||
12 | (val & 0xffff)) | ||
13 | |||
14 | #define KEY_ROW(k) (((k) >> 24) & 0xff) | ||
15 | #define KEY_COL(k) (((k) >> 16) & 0xff) | ||
16 | #define KEY_VAL(k) ((k) & 0xffff) | ||
17 | |||
18 | /** | ||
19 | * struct matrix_keymap_data - keymap for matrix keyboards | ||
20 | * @keymap: pointer to array of uint32 values encoded with KEY() macro | ||
21 | * representing keymap | ||
22 | * @keymap_size: number of entries (initialized) in this keymap | ||
23 | * @max_keymap_size: maximum size of keymap supported by the device | ||
24 | * | ||
25 | * This structure is supposed to be used by platform code to supply | ||
26 | * keymaps to drivers that implement matrix-like keypads/keyboards. | ||
27 | */ | ||
28 | struct matrix_keymap_data { | ||
29 | const uint32_t *keymap; | ||
30 | unsigned int keymap_size; | ||
31 | unsigned int max_keymap_size; | ||
32 | }; | ||
33 | |||
34 | /** | ||
35 | * struct matrix_keypad_platform_data - platform-dependent keypad data | ||
36 | * @keymap_data: pointer to &matrix_keymap_data | ||
37 | * @row_gpios: array of gpio numbers reporesenting rows | ||
38 | * @col_gpios: array of gpio numbers reporesenting colums | ||
39 | * @num_row_gpios: actual number of row gpios used by device | ||
40 | * @num_col_gpios: actual number of col gpios used by device | ||
41 | * @col_scan_delay_us: delay, measured in microseconds, that is | ||
42 | * needed before we can keypad after activating column gpio | ||
43 | * @debounce_ms: debounce interval in milliseconds | ||
44 | * | ||
45 | * This structure represents platform-specific data that use used by | ||
46 | * matrix_keypad driver to perform proper initialization. | ||
47 | */ | ||
48 | struct matrix_keypad_platform_data { | ||
49 | const struct matrix_keymap_data *keymap_data; | ||
50 | |||
51 | unsigned int row_gpios[MATRIX_MAX_ROWS]; | ||
52 | unsigned int col_gpios[MATRIX_MAX_COLS]; | ||
53 | unsigned int num_row_gpios; | ||
54 | unsigned int num_col_gpios; | ||
55 | |||
56 | unsigned int col_scan_delay_us; | ||
57 | |||
58 | /* key debounce interval in milli-second */ | ||
59 | unsigned int debounce_ms; | ||
60 | |||
61 | bool active_low; | ||
62 | bool wakeup; | ||
63 | }; | ||
64 | |||
65 | #endif /* _MATRIX_KEYPAD_H */ | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fac104e7186a..d6320a3e8def 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -303,6 +303,7 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in | |||
303 | extern int panic_timeout; | 303 | extern int panic_timeout; |
304 | extern int panic_on_oops; | 304 | extern int panic_on_oops; |
305 | extern int panic_on_unrecovered_nmi; | 305 | extern int panic_on_unrecovered_nmi; |
306 | extern int panic_on_io_nmi; | ||
306 | extern const char *print_tainted(void); | 307 | extern const char *print_tainted(void); |
307 | extern void add_taint(unsigned flag); | 308 | extern void add_taint(unsigned flag); |
308 | extern int test_taint(unsigned flag); | 309 | extern int test_taint(unsigned flag); |
diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h index 7796aed6cdd5..6a63807f714e 100644 --- a/include/linux/kmemleak.h +++ b/include/linux/kmemleak.h | |||
@@ -27,6 +27,7 @@ extern void kmemleak_init(void); | |||
27 | extern void kmemleak_alloc(const void *ptr, size_t size, int min_count, | 27 | extern void kmemleak_alloc(const void *ptr, size_t size, int min_count, |
28 | gfp_t gfp); | 28 | gfp_t gfp); |
29 | extern void kmemleak_free(const void *ptr); | 29 | extern void kmemleak_free(const void *ptr); |
30 | extern void kmemleak_free_part(const void *ptr, size_t size); | ||
30 | extern void kmemleak_padding(const void *ptr, unsigned long offset, | 31 | extern void kmemleak_padding(const void *ptr, unsigned long offset, |
31 | size_t size); | 32 | size_t size); |
32 | extern void kmemleak_not_leak(const void *ptr); | 33 | extern void kmemleak_not_leak(const void *ptr); |
@@ -71,6 +72,9 @@ static inline void kmemleak_alloc_recursive(const void *ptr, size_t size, | |||
71 | static inline void kmemleak_free(const void *ptr) | 72 | static inline void kmemleak_free(const void *ptr) |
72 | { | 73 | { |
73 | } | 74 | } |
75 | static inline void kmemleak_free_part(const void *ptr, size_t size) | ||
76 | { | ||
77 | } | ||
74 | static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) | 78 | static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) |
75 | { | 79 | { |
76 | } | 80 | } |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index aacc5449f586..16713dc672e4 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -125,6 +125,7 @@ struct kvm_kernel_irq_routing_entry { | |||
125 | struct kvm { | 125 | struct kvm { |
126 | struct mutex lock; /* protects the vcpus array and APIC accesses */ | 126 | struct mutex lock; /* protects the vcpus array and APIC accesses */ |
127 | spinlock_t mmu_lock; | 127 | spinlock_t mmu_lock; |
128 | spinlock_t requests_lock; | ||
128 | struct rw_semaphore slots_lock; | 129 | struct rw_semaphore slots_lock; |
129 | struct mm_struct *mm; /* userspace tied to this vm */ | 130 | struct mm_struct *mm; /* userspace tied to this vm */ |
130 | int nmemslots; | 131 | int nmemslots; |
diff --git a/include/linux/leds-lp3944.h b/include/linux/leds-lp3944.h new file mode 100644 index 000000000000..afc9f9fd70f5 --- /dev/null +++ b/include/linux/leds-lp3944.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * leds-lp3944.h - platform data structure for lp3944 led controller | ||
3 | * | ||
4 | * Copyright (C) 2009 Antonio Ospite <ospite@studenti.unina.it> | ||
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 | |||
12 | #ifndef __LINUX_LEDS_LP3944_H | ||
13 | #define __LINUX_LEDS_LP3944_H | ||
14 | |||
15 | #include <linux/leds.h> | ||
16 | #include <linux/workqueue.h> | ||
17 | |||
18 | #define LP3944_LED0 0 | ||
19 | #define LP3944_LED1 1 | ||
20 | #define LP3944_LED2 2 | ||
21 | #define LP3944_LED3 3 | ||
22 | #define LP3944_LED4 4 | ||
23 | #define LP3944_LED5 5 | ||
24 | #define LP3944_LED6 6 | ||
25 | #define LP3944_LED7 7 | ||
26 | #define LP3944_LEDS_MAX 8 | ||
27 | |||
28 | #define LP3944_LED_STATUS_MASK 0x03 | ||
29 | enum lp3944_status { | ||
30 | LP3944_LED_STATUS_OFF = 0x0, | ||
31 | LP3944_LED_STATUS_ON = 0x1, | ||
32 | LP3944_LED_STATUS_DIM0 = 0x2, | ||
33 | LP3944_LED_STATUS_DIM1 = 0x3 | ||
34 | }; | ||
35 | |||
36 | enum lp3944_type { | ||
37 | LP3944_LED_TYPE_NONE, | ||
38 | LP3944_LED_TYPE_LED, | ||
39 | LP3944_LED_TYPE_LED_INVERTED, | ||
40 | }; | ||
41 | |||
42 | struct lp3944_led { | ||
43 | char *name; | ||
44 | enum lp3944_type type; | ||
45 | enum lp3944_status status; | ||
46 | }; | ||
47 | |||
48 | struct lp3944_platform_data { | ||
49 | struct lp3944_led leds[LP3944_LEDS_MAX]; | ||
50 | u8 leds_size; | ||
51 | }; | ||
52 | |||
53 | #endif /* __LINUX_LEDS_LP3944_H */ | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index 376fe07732ea..d8bf9665e70c 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -45,7 +45,10 @@ struct led_classdev { | |||
45 | /* Get LED brightness level */ | 45 | /* Get LED brightness level */ |
46 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); | 46 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); |
47 | 47 | ||
48 | /* Activate hardware accelerated blink */ | 48 | /* Activate hardware accelerated blink, delays are in |
49 | * miliseconds and if none is provided then a sensible default | ||
50 | * should be chosen. The call can adjust the timings if it can't | ||
51 | * match the values specified exactly. */ | ||
49 | int (*blink_set)(struct led_classdev *led_cdev, | 52 | int (*blink_set)(struct led_classdev *led_cdev, |
50 | unsigned long *delay_on, | 53 | unsigned long *delay_on, |
51 | unsigned long *delay_off); | 54 | unsigned long *delay_off); |
@@ -141,9 +144,14 @@ struct gpio_led { | |||
141 | const char *name; | 144 | const char *name; |
142 | const char *default_trigger; | 145 | const char *default_trigger; |
143 | unsigned gpio; | 146 | unsigned gpio; |
144 | u8 active_low : 1; | 147 | unsigned active_low : 1; |
145 | u8 retain_state_suspended : 1; | 148 | unsigned retain_state_suspended : 1; |
149 | unsigned default_state : 2; | ||
150 | /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ | ||
146 | }; | 151 | }; |
152 | #define LEDS_GPIO_DEFSTATE_OFF 0 | ||
153 | #define LEDS_GPIO_DEFSTATE_ON 1 | ||
154 | #define LEDS_GPIO_DEFSTATE_KEEP 2 | ||
147 | 155 | ||
148 | struct gpio_led_platform_data { | 156 | struct gpio_led_platform_data { |
149 | int num_leds; | 157 | int num_leds; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 3d501db36a26..79b6d7fd4ac2 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -385,6 +385,7 @@ enum { | |||
385 | not multiple of 16 bytes */ | 385 | not multiple of 16 bytes */ |
386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ | 386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ |
387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | 387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ |
388 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ | ||
388 | 389 | ||
389 | /* DMA mask for user DMA control: User visible values; DO NOT | 390 | /* DMA mask for user DMA control: User visible values; DO NOT |
390 | renumber */ | 391 | renumber */ |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index fee9e59649c1..691f59171c6c 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -22,6 +22,15 @@ | |||
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. | ||
26 | * | ||
27 | * Note when using these that you must specify the appropriate | ||
28 | * alignment directives yourself | ||
29 | */ | ||
30 | #define __PAGE_ALIGNED_DATA .section ".data.page_aligned", "aw" | ||
31 | #define __PAGE_ALIGNED_BSS .section ".bss.page_aligned", "aw" | ||
32 | |||
33 | /* | ||
25 | * This is used by architectures to keep arguments on the stack | 34 | * This is used by architectures to keep arguments on the stack |
26 | * untouched by the compiler by keeping them live until the end. | 35 | * untouched by the compiler by keeping them live until the end. |
27 | * The argument stack may be owned by the assembly-language | 36 | * The argument stack may be owned by the assembly-language |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index da5a5a1f4cd2..b25d1b53df0d 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -258,6 +258,16 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name, | |||
258 | #define lockdep_set_subclass(lock, sub) \ | 258 | #define lockdep_set_subclass(lock, sub) \ |
259 | lockdep_init_map(&(lock)->dep_map, #lock, \ | 259 | lockdep_init_map(&(lock)->dep_map, #lock, \ |
260 | (lock)->dep_map.key, sub) | 260 | (lock)->dep_map.key, sub) |
261 | /* | ||
262 | * Compare locking classes | ||
263 | */ | ||
264 | #define lockdep_match_class(lock, key) lockdep_match_key(&(lock)->dep_map, key) | ||
265 | |||
266 | static inline int lockdep_match_key(struct lockdep_map *lock, | ||
267 | struct lock_class_key *key) | ||
268 | { | ||
269 | return lock->key == key; | ||
270 | } | ||
261 | 271 | ||
262 | /* | 272 | /* |
263 | * Acquire a lock. | 273 | * Acquire a lock. |
@@ -326,6 +336,11 @@ static inline void lockdep_on(void) | |||
326 | #define lockdep_set_class_and_subclass(lock, key, sub) \ | 336 | #define lockdep_set_class_and_subclass(lock, key, sub) \ |
327 | do { (void)(key); } while (0) | 337 | do { (void)(key); } while (0) |
328 | #define lockdep_set_subclass(lock, sub) do { } while (0) | 338 | #define lockdep_set_subclass(lock, sub) do { } while (0) |
339 | /* | ||
340 | * We don't define lockdep_match_class() and lockdep_match_key() for !LOCKDEP | ||
341 | * case since the result is not well defined and the caller should rather | ||
342 | * #ifdef the call himself. | ||
343 | */ | ||
329 | 344 | ||
330 | # define INIT_LOCKDEP | 345 | # define INIT_LOCKDEP |
331 | # define lockdep_reset() do { debug_locks = 1; } while (0) | 346 | # define lockdep_reset() do { debug_locks = 1; } while (0) |
diff --git a/include/linux/max17040_battery.h b/include/linux/max17040_battery.h new file mode 100644 index 000000000000..ad97b06cf930 --- /dev/null +++ b/include/linux/max17040_battery.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Samsung Electronics | ||
3 | * Minkyu Kang <mk7.kang@samsung.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #ifndef __MAX17040_BATTERY_H_ | ||
11 | #define __MAX17040_BATTERY_H_ | ||
12 | |||
13 | struct max17040_platform_data { | ||
14 | int (*battery_online)(void); | ||
15 | int (*charger_online)(void); | ||
16 | int (*charger_enable)(void); | ||
17 | }; | ||
18 | |||
19 | #endif | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index d006e93d5c93..ba3a7cb1eaa0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -826,7 +826,7 @@ extern int make_pages_present(unsigned long addr, unsigned long end); | |||
826 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); | 826 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
827 | 827 | ||
828 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | 828 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, |
829 | unsigned long start, int len, int write, int force, | 829 | unsigned long start, int nr_pages, int write, int force, |
830 | struct page **pages, struct vm_area_struct **vmas); | 830 | struct page **pages, struct vm_area_struct **vmas); |
831 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 831 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
832 | struct page **pages); | 832 | struct page **pages); |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 3beb2592b03f..d74785c2393a 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
@@ -2,10 +2,9 @@ | |||
2 | #define _NAMESPACE_H_ | 2 | #define _NAMESPACE_H_ |
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | #include <linux/mount.h> | 5 | #include <linux/path.h> |
6 | #include <linux/sched.h> | ||
7 | #include <linux/nsproxy.h> | ||
8 | #include <linux/seq_file.h> | 6 | #include <linux/seq_file.h> |
7 | #include <linux/wait.h> | ||
9 | 8 | ||
10 | struct mnt_namespace { | 9 | struct mnt_namespace { |
11 | atomic_t count; | 10 | atomic_t count; |
@@ -28,14 +27,6 @@ extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt); | |||
28 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, | 27 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
29 | struct fs_struct *); | 28 | struct fs_struct *); |
30 | extern void put_mnt_ns(struct mnt_namespace *ns); | 29 | extern void put_mnt_ns(struct mnt_namespace *ns); |
31 | |||
32 | static inline void exit_mnt_ns(struct task_struct *p) | ||
33 | { | ||
34 | struct mnt_namespace *ns = p->nsproxy->mnt_ns; | ||
35 | if (ns) | ||
36 | put_mnt_ns(ns); | ||
37 | } | ||
38 | |||
39 | static inline void get_mnt_ns(struct mnt_namespace *ns) | 30 | static inline void get_mnt_ns(struct mnt_namespace *ns) |
40 | { | 31 | { |
41 | atomic_inc(&ns->count); | 32 | atomic_inc(&ns->count); |
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index 3430c7751948..7ae05338e94c 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
@@ -81,4 +81,17 @@ struct xt_conntrack_mtinfo1 { | |||
81 | __u8 state_mask, status_mask; | 81 | __u8 state_mask, status_mask; |
82 | }; | 82 | }; |
83 | 83 | ||
84 | struct xt_conntrack_mtinfo2 { | ||
85 | union nf_inet_addr origsrc_addr, origsrc_mask; | ||
86 | union nf_inet_addr origdst_addr, origdst_mask; | ||
87 | union nf_inet_addr replsrc_addr, replsrc_mask; | ||
88 | union nf_inet_addr repldst_addr, repldst_mask; | ||
89 | __u32 expires_min, expires_max; | ||
90 | __u16 l4proto; | ||
91 | __be16 origsrc_port, origdst_port; | ||
92 | __be16 replsrc_port, repldst_port; | ||
93 | __u16 match_flags, invert_flags; | ||
94 | __u16 state_mask, status_mask; | ||
95 | }; | ||
96 | |||
84 | #endif /*_XT_CONNTRACK_H*/ | 97 | #endif /*_XT_CONNTRACK_H*/ |
diff --git a/include/linux/netfilter/xt_osf.h b/include/linux/netfilter/xt_osf.h index fd2272e0959a..18afa495f973 100644 --- a/include/linux/netfilter/xt_osf.h +++ b/include/linux/netfilter/xt_osf.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef _XT_OSF_H | 20 | #ifndef _XT_OSF_H |
21 | #define _XT_OSF_H | 21 | #define _XT_OSF_H |
22 | 22 | ||
23 | #include <linux/types.h> | ||
24 | |||
23 | #define MAXGENRELEN 32 | 25 | #define MAXGENRELEN 32 |
24 | 26 | ||
25 | #define XT_OSF_GENRE (1<<0) | 27 | #define XT_OSF_GENRE (1<<0) |
diff --git a/include/linux/pci.h b/include/linux/pci.h index d304ddf412d0..115fb7ba5089 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1145,7 +1145,7 @@ static inline void pci_set_drvdata(struct pci_dev *pdev, void *data) | |||
1145 | /* If you want to know what to call your pci_dev, ask this function. | 1145 | /* If you want to know what to call your pci_dev, ask this function. |
1146 | * Again, it's a wrapper around the generic device. | 1146 | * Again, it's a wrapper around the generic device. |
1147 | */ | 1147 | */ |
1148 | static inline const char *pci_name(struct pci_dev *pdev) | 1148 | static inline const char *pci_name(const struct pci_dev *pdev) |
1149 | { | 1149 | { |
1150 | return dev_name(&pdev->dev); | 1150 | return dev_name(&pdev->dev); |
1151 | } | 1151 | } |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index b3646cd7fd5a..4391741b99dc 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -229,7 +229,6 @@ struct hotplug_params { | |||
229 | extern acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, | 229 | extern acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, |
230 | struct hotplug_params *hpp); | 230 | struct hotplug_params *hpp); |
231 | int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags); | 231 | int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags); |
232 | int acpi_root_bridge(acpi_handle handle); | ||
233 | int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle); | 232 | int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle); |
234 | int acpi_pci_detect_ejectable(struct pci_bus *pbus); | 233 | int acpi_pci_detect_ejectable(struct pci_bus *pbus); |
235 | #endif | 234 | #endif |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a3b000365795..73b46b6b904f 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2645,6 +2645,7 @@ | |||
2645 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 | 2645 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 |
2646 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2646 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
2647 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2647 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
2648 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 | ||
2648 | 2649 | ||
2649 | #define PCI_VENDOR_ID_3COM_2 0xa727 | 2650 | #define PCI_VENDOR_ID_3COM_2 0xa727 |
2650 | 2651 | ||
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 8f921d74f49f..68438e18fff4 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
@@ -24,7 +24,8 @@ | |||
24 | 24 | ||
25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | 25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ |
26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | 26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ |
27 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 27 | PER_CPU_ATTRIBUTES PER_CPU_DEF_ATTRIBUTES \ |
28 | __typeof__(type) per_cpu__##name | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * Variant on the per-CPU variable declaration/definition theme used for | 31 | * Variant on the per-CPU variable declaration/definition theme used for |
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 89698d8aba5c..5e970c7d3fd5 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -178,8 +178,10 @@ struct perf_counter_attr { | |||
178 | mmap : 1, /* include mmap data */ | 178 | mmap : 1, /* include mmap data */ |
179 | comm : 1, /* include comm data */ | 179 | comm : 1, /* include comm data */ |
180 | freq : 1, /* use freq, not period */ | 180 | freq : 1, /* use freq, not period */ |
181 | inherit_stat : 1, /* per task counts */ | ||
182 | enable_on_exec : 1, /* next exec enables */ | ||
181 | 183 | ||
182 | __reserved_1 : 53; | 184 | __reserved_1 : 51; |
183 | 185 | ||
184 | __u32 wakeup_events; /* wakeup every n events */ | 186 | __u32 wakeup_events; /* wakeup every n events */ |
185 | __u32 __reserved_2; | 187 | __u32 __reserved_2; |
@@ -232,6 +234,14 @@ struct perf_counter_mmap_page { | |||
232 | __u32 lock; /* seqlock for synchronization */ | 234 | __u32 lock; /* seqlock for synchronization */ |
233 | __u32 index; /* hardware counter identifier */ | 235 | __u32 index; /* hardware counter identifier */ |
234 | __s64 offset; /* add to hardware counter value */ | 236 | __s64 offset; /* add to hardware counter value */ |
237 | __u64 time_enabled; /* time counter active */ | ||
238 | __u64 time_running; /* time counter on cpu */ | ||
239 | |||
240 | /* | ||
241 | * Hole for extension of the self monitor capabilities | ||
242 | */ | ||
243 | |||
244 | __u64 __reserved[123]; /* align to 1k */ | ||
235 | 245 | ||
236 | /* | 246 | /* |
237 | * Control data for the mmap() data buffer. | 247 | * Control data for the mmap() data buffer. |
@@ -253,7 +263,6 @@ struct perf_counter_mmap_page { | |||
253 | #define PERF_EVENT_MISC_KERNEL (1 << 0) | 263 | #define PERF_EVENT_MISC_KERNEL (1 << 0) |
254 | #define PERF_EVENT_MISC_USER (2 << 0) | 264 | #define PERF_EVENT_MISC_USER (2 << 0) |
255 | #define PERF_EVENT_MISC_HYPERVISOR (3 << 0) | 265 | #define PERF_EVENT_MISC_HYPERVISOR (3 << 0) |
256 | #define PERF_EVENT_MISC_OVERFLOW (1 << 2) | ||
257 | 266 | ||
258 | struct perf_event_header { | 267 | struct perf_event_header { |
259 | __u32 type; | 268 | __u32 type; |
@@ -327,9 +336,18 @@ enum perf_event_type { | |||
327 | PERF_EVENT_FORK = 7, | 336 | PERF_EVENT_FORK = 7, |
328 | 337 | ||
329 | /* | 338 | /* |
330 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field | 339 | * struct { |
331 | * will be PERF_SAMPLE_* | 340 | * struct perf_event_header header; |
332 | * | 341 | * u32 pid, tid; |
342 | * u64 value; | ||
343 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | ||
344 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
345 | * { u64 parent_id; } && PERF_FORMAT_ID | ||
346 | * }; | ||
347 | */ | ||
348 | PERF_EVENT_READ = 8, | ||
349 | |||
350 | /* | ||
333 | * struct { | 351 | * struct { |
334 | * struct perf_event_header header; | 352 | * struct perf_event_header header; |
335 | * | 353 | * |
@@ -337,8 +355,9 @@ enum perf_event_type { | |||
337 | * { u32 pid, tid; } && PERF_SAMPLE_TID | 355 | * { u32 pid, tid; } && PERF_SAMPLE_TID |
338 | * { u64 time; } && PERF_SAMPLE_TIME | 356 | * { u64 time; } && PERF_SAMPLE_TIME |
339 | * { u64 addr; } && PERF_SAMPLE_ADDR | 357 | * { u64 addr; } && PERF_SAMPLE_ADDR |
340 | * { u64 config; } && PERF_SAMPLE_CONFIG | 358 | * { u64 id; } && PERF_SAMPLE_ID |
341 | * { u32 cpu, res; } && PERF_SAMPLE_CPU | 359 | * { u32 cpu, res; } && PERF_SAMPLE_CPU |
360 | * { u64 period; } && PERF_SAMPLE_PERIOD | ||
342 | * | 361 | * |
343 | * { u64 nr; | 362 | * { u64 nr; |
344 | * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP | 363 | * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP |
@@ -347,6 +366,9 @@ enum perf_event_type { | |||
347 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN | 366 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN |
348 | * }; | 367 | * }; |
349 | */ | 368 | */ |
369 | PERF_EVENT_SAMPLE = 9, | ||
370 | |||
371 | PERF_EVENT_MAX, /* non-ABI */ | ||
350 | }; | 372 | }; |
351 | 373 | ||
352 | enum perf_callchain_context { | 374 | enum perf_callchain_context { |
@@ -582,6 +604,7 @@ struct perf_counter_context { | |||
582 | int nr_counters; | 604 | int nr_counters; |
583 | int nr_active; | 605 | int nr_active; |
584 | int is_active; | 606 | int is_active; |
607 | int nr_stat; | ||
585 | atomic_t refcount; | 608 | atomic_t refcount; |
586 | struct task_struct *task; | 609 | struct task_struct *task; |
587 | 610 | ||
@@ -669,7 +692,16 @@ static inline int is_software_counter(struct perf_counter *counter) | |||
669 | (counter->attr.type != PERF_TYPE_HW_CACHE); | 692 | (counter->attr.type != PERF_TYPE_HW_CACHE); |
670 | } | 693 | } |
671 | 694 | ||
672 | extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | 695 | extern atomic_t perf_swcounter_enabled[PERF_COUNT_SW_MAX]; |
696 | |||
697 | extern void __perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | ||
698 | |||
699 | static inline void | ||
700 | perf_swcounter_event(u32 event, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
701 | { | ||
702 | if (atomic_read(&perf_swcounter_enabled[event])) | ||
703 | __perf_swcounter_event(event, nr, nmi, regs, addr); | ||
704 | } | ||
673 | 705 | ||
674 | extern void __perf_counter_mmap(struct vm_area_struct *vma); | 706 | extern void __perf_counter_mmap(struct vm_area_struct *vma); |
675 | 707 | ||
diff --git a/include/linux/personality.h b/include/linux/personality.h index a84e9ff9b27e..126120819a0d 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h | |||
@@ -40,7 +40,10 @@ enum { | |||
40 | * Security-relevant compatibility flags that must be | 40 | * Security-relevant compatibility flags that must be |
41 | * cleared upon setuid or setgid exec: | 41 | * cleared upon setuid or setgid exec: |
42 | */ | 42 | */ |
43 | #define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE) | 43 | #define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC | \ |
44 | ADDR_NO_RANDOMIZE | \ | ||
45 | ADDR_COMPAT_LAYOUT | \ | ||
46 | MMAP_PAGE_ZERO) | ||
44 | 47 | ||
45 | /* | 48 | /* |
46 | * Personality types. | 49 | * Personality types. |
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index 4bc241290c24..065a3652a3ea 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
@@ -83,4 +83,78 @@ extern int posix_acl_chmod_masq(struct posix_acl *, mode_t); | |||
83 | extern struct posix_acl *get_posix_acl(struct inode *, int); | 83 | extern struct posix_acl *get_posix_acl(struct inode *, int); |
84 | extern int set_posix_acl(struct inode *, int, struct posix_acl *); | 84 | extern int set_posix_acl(struct inode *, int, struct posix_acl *); |
85 | 85 | ||
86 | #ifdef CONFIG_FS_POSIX_ACL | ||
87 | static inline struct posix_acl *get_cached_acl(struct inode *inode, int type) | ||
88 | { | ||
89 | struct posix_acl **p, *acl; | ||
90 | switch (type) { | ||
91 | case ACL_TYPE_ACCESS: | ||
92 | p = &inode->i_acl; | ||
93 | break; | ||
94 | case ACL_TYPE_DEFAULT: | ||
95 | p = &inode->i_default_acl; | ||
96 | break; | ||
97 | default: | ||
98 | return ERR_PTR(-EINVAL); | ||
99 | } | ||
100 | acl = ACCESS_ONCE(*p); | ||
101 | if (acl) { | ||
102 | spin_lock(&inode->i_lock); | ||
103 | acl = *p; | ||
104 | if (acl != ACL_NOT_CACHED) | ||
105 | acl = posix_acl_dup(acl); | ||
106 | spin_unlock(&inode->i_lock); | ||
107 | } | ||
108 | return acl; | ||
109 | } | ||
110 | |||
111 | static inline void set_cached_acl(struct inode *inode, | ||
112 | int type, | ||
113 | struct posix_acl *acl) | ||
114 | { | ||
115 | struct posix_acl *old = NULL; | ||
116 | spin_lock(&inode->i_lock); | ||
117 | switch (type) { | ||
118 | case ACL_TYPE_ACCESS: | ||
119 | old = inode->i_acl; | ||
120 | inode->i_acl = posix_acl_dup(acl); | ||
121 | break; | ||
122 | case ACL_TYPE_DEFAULT: | ||
123 | old = inode->i_default_acl; | ||
124 | inode->i_default_acl = posix_acl_dup(acl); | ||
125 | break; | ||
126 | } | ||
127 | spin_unlock(&inode->i_lock); | ||
128 | if (old != ACL_NOT_CACHED) | ||
129 | posix_acl_release(old); | ||
130 | } | ||
131 | |||
132 | static inline void forget_cached_acl(struct inode *inode, int type) | ||
133 | { | ||
134 | struct posix_acl *old = NULL; | ||
135 | spin_lock(&inode->i_lock); | ||
136 | switch (type) { | ||
137 | case ACL_TYPE_ACCESS: | ||
138 | old = inode->i_acl; | ||
139 | inode->i_acl = ACL_NOT_CACHED; | ||
140 | break; | ||
141 | case ACL_TYPE_DEFAULT: | ||
142 | old = inode->i_default_acl; | ||
143 | inode->i_default_acl = ACL_NOT_CACHED; | ||
144 | break; | ||
145 | } | ||
146 | spin_unlock(&inode->i_lock); | ||
147 | if (old != ACL_NOT_CACHED) | ||
148 | posix_acl_release(old); | ||
149 | } | ||
150 | #endif | ||
151 | |||
152 | static inline void cache_no_acl(struct inode *inode) | ||
153 | { | ||
154 | #ifdef CONFIG_FS_POSIX_ACL | ||
155 | inode->i_acl = NULL; | ||
156 | inode->i_default_acl = NULL; | ||
157 | #endif | ||
158 | } | ||
159 | |||
86 | #endif /* __LINUX_POSIX_ACL_H */ | 160 | #endif /* __LINUX_POSIX_ACL_H */ |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 7bc457593684..26361c4c037a 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef _LINUX_QUOTAOPS_ | 7 | #ifndef _LINUX_QUOTAOPS_ |
8 | #define _LINUX_QUOTAOPS_ | 8 | #define _LINUX_QUOTAOPS_ |
9 | 9 | ||
10 | #include <linux/smp_lock.h> | ||
11 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
12 | 11 | ||
13 | static inline struct quota_info *sb_dqopt(struct super_block *sb) | 12 | static inline struct quota_info *sb_dqopt(struct super_block *sb) |
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h index 8cc65757e47a..b4448853900e 100644 --- a/include/linux/reiserfs_acl.h +++ b/include/linux/reiserfs_acl.h | |||
@@ -56,15 +56,6 @@ int reiserfs_cache_default_acl(struct inode *dir); | |||
56 | extern struct xattr_handler reiserfs_posix_acl_default_handler; | 56 | extern struct xattr_handler reiserfs_posix_acl_default_handler; |
57 | extern struct xattr_handler reiserfs_posix_acl_access_handler; | 57 | extern struct xattr_handler reiserfs_posix_acl_access_handler; |
58 | 58 | ||
59 | static inline void reiserfs_init_acl_access(struct inode *inode) | ||
60 | { | ||
61 | REISERFS_I(inode)->i_acl_access = NULL; | ||
62 | } | ||
63 | |||
64 | static inline void reiserfs_init_acl_default(struct inode *inode) | ||
65 | { | ||
66 | REISERFS_I(inode)->i_acl_default = NULL; | ||
67 | } | ||
68 | #else | 59 | #else |
69 | 60 | ||
70 | #define reiserfs_cache_default_acl(inode) 0 | 61 | #define reiserfs_cache_default_acl(inode) 0 |
@@ -86,12 +77,4 @@ reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th, | |||
86 | { | 77 | { |
87 | return 0; | 78 | return 0; |
88 | } | 79 | } |
89 | |||
90 | static inline void reiserfs_init_acl_access(struct inode *inode) | ||
91 | { | ||
92 | } | ||
93 | |||
94 | static inline void reiserfs_init_acl_default(struct inode *inode) | ||
95 | { | ||
96 | } | ||
97 | #endif | 80 | #endif |
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h index 76360b36ac33..89f4d3abbf5a 100644 --- a/include/linux/reiserfs_fs_i.h +++ b/include/linux/reiserfs_fs_i.h | |||
@@ -54,10 +54,6 @@ struct reiserfs_inode_info { | |||
54 | unsigned int i_trans_id; | 54 | unsigned int i_trans_id; |
55 | struct reiserfs_journal_list *i_jl; | 55 | struct reiserfs_journal_list *i_jl; |
56 | struct mutex i_mmap; | 56 | struct mutex i_mmap; |
57 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | ||
58 | struct posix_acl *i_acl_access; | ||
59 | struct posix_acl *i_acl_default; | ||
60 | #endif | ||
61 | #ifdef CONFIG_REISERFS_FS_XATTR | 57 | #ifdef CONFIG_REISERFS_FS_XATTR |
62 | struct rw_semaphore i_xattr_sem; | 58 | struct rw_semaphore i_xattr_sem; |
63 | #endif | 59 | #endif |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index e73e2429a1b1..2ce29831feb6 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -99,7 +99,6 @@ enum rfkill_user_states { | |||
99 | #undef RFKILL_STATE_UNBLOCKED | 99 | #undef RFKILL_STATE_UNBLOCKED |
100 | #undef RFKILL_STATE_HARD_BLOCKED | 100 | #undef RFKILL_STATE_HARD_BLOCKED |
101 | 101 | ||
102 | #include <linux/types.h> | ||
103 | #include <linux/kernel.h> | 102 | #include <linux/kernel.h> |
104 | #include <linux/list.h> | 103 | #include <linux/list.h> |
105 | #include <linux/mutex.h> | 104 | #include <linux/mutex.h> |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 216d024f830d..bf116d0dbf23 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -118,7 +118,14 @@ int try_to_munlock(struct page *); | |||
118 | #define anon_vma_prepare(vma) (0) | 118 | #define anon_vma_prepare(vma) (0) |
119 | #define anon_vma_link(vma) do {} while (0) | 119 | #define anon_vma_link(vma) do {} while (0) |
120 | 120 | ||
121 | #define page_referenced(page, locked, cnt, flags) TestClearPageReferenced(page) | 121 | static inline int page_referenced(struct page *page, int is_locked, |
122 | struct mem_cgroup *cnt, | ||
123 | unsigned long *vm_flags) | ||
124 | { | ||
125 | *vm_flags = 0; | ||
126 | return TestClearPageReferenced(page); | ||
127 | } | ||
128 | |||
122 | #define try_to_unmap(page, refs) SWAP_FAIL | 129 | #define try_to_unmap(page, refs) SWAP_FAIL |
123 | 130 | ||
124 | static inline int page_mkclean(struct page *page) | 131 | static inline int page_mkclean(struct page *page) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4d0754269884..16a982e389fb 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -349,8 +349,20 @@ extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | |||
349 | struct nsproxy; | 349 | struct nsproxy; |
350 | struct user_namespace; | 350 | struct user_namespace; |
351 | 351 | ||
352 | /* Maximum number of active map areas.. This is a random (large) number */ | 352 | /* |
353 | #define DEFAULT_MAX_MAP_COUNT 65536 | 353 | * Default maximum number of active map areas, this limits the number of vmas |
354 | * per mm struct. Users can overwrite this number by sysctl but there is a | ||
355 | * problem. | ||
356 | * | ||
357 | * When a program's coredump is generated as ELF format, a section is created | ||
358 | * per a vma. In ELF, the number of sections is represented in unsigned short. | ||
359 | * This means the number of sections should be smaller than 65535 at coredump. | ||
360 | * Because the kernel adds some informative sections to a image of program at | ||
361 | * generating coredump, we need some margin. The number of extra sections is | ||
362 | * 1-3 now and depends on arch. We use "5" as safe margin, here. | ||
363 | */ | ||
364 | #define MAPCOUNT_ELF_CORE_MARGIN (5) | ||
365 | #define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN) | ||
354 | 366 | ||
355 | extern int sysctl_max_map_count; | 367 | extern int sysctl_max_map_count; |
356 | 368 | ||
@@ -486,6 +498,15 @@ struct task_cputime { | |||
486 | .sum_exec_runtime = 0, \ | 498 | .sum_exec_runtime = 0, \ |
487 | } | 499 | } |
488 | 500 | ||
501 | /* | ||
502 | * Disable preemption until the scheduler is running. | ||
503 | * Reset by start_kernel()->sched_init()->init_idle(). | ||
504 | * | ||
505 | * We include PREEMPT_ACTIVE to avoid cond_resched() from working | ||
506 | * before the scheduler is active -- see should_resched(). | ||
507 | */ | ||
508 | #define INIT_PREEMPT_COUNT (1 + PREEMPT_ACTIVE) | ||
509 | |||
489 | /** | 510 | /** |
490 | * struct thread_group_cputimer - thread group interval timer counts | 511 | * struct thread_group_cputimer - thread group interval timer counts |
491 | * @cputime: thread group interval timers. | 512 | * @cputime: thread group interval timers. |
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index fd83f2584b15..abff6c9b413c 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
@@ -19,10 +19,6 @@ struct shmem_inode_info { | |||
19 | swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* first blocks */ | 19 | swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* first blocks */ |
20 | struct list_head swaplist; /* chain of maybes on swap */ | 20 | struct list_head swaplist; /* chain of maybes on swap */ |
21 | struct inode vfs_inode; | 21 | struct inode vfs_inode; |
22 | #ifdef CONFIG_TMPFS_POSIX_ACL | ||
23 | struct posix_acl *i_acl; | ||
24 | struct posix_acl *i_default_acl; | ||
25 | #endif | ||
26 | }; | 22 | }; |
27 | 23 | ||
28 | struct shmem_sb_info { | 24 | struct shmem_sb_info { |
@@ -45,7 +41,6 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) | |||
45 | #ifdef CONFIG_TMPFS_POSIX_ACL | 41 | #ifdef CONFIG_TMPFS_POSIX_ACL |
46 | int shmem_permission(struct inode *, int); | 42 | int shmem_permission(struct inode *, int); |
47 | int shmem_acl_init(struct inode *, struct inode *); | 43 | int shmem_acl_init(struct inode *, struct inode *); |
48 | void shmem_acl_destroy_inode(struct inode *); | ||
49 | 44 | ||
50 | extern struct xattr_handler shmem_xattr_acl_access_handler; | 45 | extern struct xattr_handler shmem_xattr_acl_access_handler; |
51 | extern struct xattr_handler shmem_xattr_acl_default_handler; | 46 | extern struct xattr_handler shmem_xattr_acl_default_handler; |
@@ -57,9 +52,6 @@ static inline int shmem_acl_init(struct inode *inode, struct inode *dir) | |||
57 | { | 52 | { |
58 | return 0; | 53 | return 0; |
59 | } | 54 | } |
60 | static inline void shmem_acl_destroy_inode(struct inode *inode) | ||
61 | { | ||
62 | } | ||
63 | #endif /* CONFIG_TMPFS_POSIX_ACL */ | 55 | #endif /* CONFIG_TMPFS_POSIX_ACL */ |
64 | 56 | ||
65 | #endif | 57 | #endif |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b47b3f039d14..f2c69a2cca17 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1342,12 +1342,12 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
1342 | * shifting the start of the packet by 2 bytes. Drivers should do this | 1342 | * shifting the start of the packet by 2 bytes. Drivers should do this |
1343 | * with: | 1343 | * with: |
1344 | * | 1344 | * |
1345 | * skb_reserve(NET_IP_ALIGN); | 1345 | * skb_reserve(skb, NET_IP_ALIGN); |
1346 | * | 1346 | * |
1347 | * The downside to this alignment of the IP header is that the DMA is now | 1347 | * The downside to this alignment of the IP header is that the DMA is now |
1348 | * unaligned. On some architectures the cost of an unaligned DMA is high | 1348 | * unaligned. On some architectures the cost of an unaligned DMA is high |
1349 | * and this cost outweighs the gains made by aligning the IP header. | 1349 | * and this cost outweighs the gains made by aligning the IP header. |
1350 | * | 1350 | * |
1351 | * Since this trade off varies between architectures, we allow NET_IP_ALIGN | 1351 | * Since this trade off varies between architectures, we allow NET_IP_ALIGN |
1352 | * to be overridden. | 1352 | * to be overridden. |
1353 | */ | 1353 | */ |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 4dcbc2c71491..c1c862b1d01a 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
12 | #include <linux/kobject.h> | 12 | #include <linux/kobject.h> |
13 | #include <linux/kmemtrace.h> | 13 | #include <linux/kmemtrace.h> |
14 | #include <linux/kmemleak.h> | ||
14 | 15 | ||
15 | enum stat_item { | 16 | enum stat_item { |
16 | ALLOC_FASTPATH, /* Allocation from cpu slab */ | 17 | ALLOC_FASTPATH, /* Allocation from cpu slab */ |
@@ -233,6 +234,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | |||
233 | unsigned int order = get_order(size); | 234 | unsigned int order = get_order(size); |
234 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | 235 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); |
235 | 236 | ||
237 | kmemleak_alloc(ret, size, 1, flags); | ||
236 | trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags); | 238 | trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags); |
237 | 239 | ||
238 | return ret; | 240 | return ret; |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 9c4cd27f4685..c47c4b4da97e 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -80,6 +80,8 @@ struct spi_device { | |||
80 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ | 80 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ |
81 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ | 81 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ |
82 | #define SPI_LOOP 0x20 /* loopback mode */ | 82 | #define SPI_LOOP 0x20 /* loopback mode */ |
83 | #define SPI_NO_CS 0x40 /* 1 dev/bus, no chipselect */ | ||
84 | #define SPI_READY 0x80 /* slave pulls low to pause */ | ||
83 | u8 bits_per_word; | 85 | u8 bits_per_word; |
84 | int irq; | 86 | int irq; |
85 | void *controller_state; | 87 | void *controller_state; |
@@ -248,6 +250,10 @@ struct spi_master { | |||
248 | /* spi_device.mode flags understood by this controller driver */ | 250 | /* spi_device.mode flags understood by this controller driver */ |
249 | u16 mode_bits; | 251 | u16 mode_bits; |
250 | 252 | ||
253 | /* other constraints relevant to this driver */ | ||
254 | u16 flags; | ||
255 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ | ||
256 | |||
251 | /* Setup mode and clock, etc (spi driver may call many times). | 257 | /* Setup mode and clock, etc (spi driver may call many times). |
252 | * | 258 | * |
253 | * IMPORTANT: this may be called when transfers to another | 259 | * IMPORTANT: this may be called when transfers to another |
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index 95251ccd5a07..bf0570a84f7a 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
@@ -40,6 +40,8 @@ | |||
40 | #define SPI_LSB_FIRST 0x08 | 40 | #define SPI_LSB_FIRST 0x08 |
41 | #define SPI_3WIRE 0x10 | 41 | #define SPI_3WIRE 0x10 |
42 | #define SPI_LOOP 0x20 | 42 | #define SPI_LOOP 0x20 |
43 | #define SPI_NO_CS 0x40 | ||
44 | #define SPI_READY 0x80 | ||
43 | 45 | ||
44 | /*---------------------------------------------------------------------------*/ | 46 | /*---------------------------------------------------------------------------*/ |
45 | 47 | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 252b245cfcf4..4be57ab03478 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -132,6 +132,11 @@ do { \ | |||
132 | #endif /*__raw_spin_is_contended*/ | 132 | #endif /*__raw_spin_is_contended*/ |
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | /* The lock does not imply full memory barrier. */ | ||
136 | #ifndef ARCH_HAS_SMP_MB_AFTER_LOCK | ||
137 | static inline void smp_mb__after_lock(void) { smp_mb(); } | ||
138 | #endif | ||
139 | |||
135 | /** | 140 | /** |
136 | * spin_unlock_wait - wait until the spinlock gets unlocked | 141 | * spin_unlock_wait - wait until the spinlock gets unlocked |
137 | * @lock: the spinlock in question. | 142 | * @lock: the spinlock in question. |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index d8910b68e1bd..b99c625fddfe 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/uio.h> | 12 | #include <linux/uio.h> |
13 | #include <asm/byteorder.h> | 13 | #include <asm/byteorder.h> |
14 | #include <linux/scatterlist.h> | 14 | #include <linux/scatterlist.h> |
15 | #include <linux/smp_lock.h> | ||
16 | 15 | ||
17 | /* | 16 | /* |
18 | * Buffer adjustment | 17 | * Buffer adjustment |
diff --git a/include/linux/swap.h b/include/linux/swap.h index c88b36665f79..7c15334f3ff2 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -298,8 +298,8 @@ extern int try_to_free_swap(struct page *); | |||
298 | struct backing_dev_info; | 298 | struct backing_dev_info; |
299 | 299 | ||
300 | /* linux/mm/thrash.c */ | 300 | /* linux/mm/thrash.c */ |
301 | extern struct mm_struct * swap_token_mm; | 301 | extern struct mm_struct *swap_token_mm; |
302 | extern void grab_swap_token(void); | 302 | extern void grab_swap_token(struct mm_struct *); |
303 | extern void __put_swap_token(struct mm_struct *); | 303 | extern void __put_swap_token(struct mm_struct *); |
304 | 304 | ||
305 | static inline int has_swap_token(struct mm_struct *mm) | 305 | static inline int has_swap_token(struct mm_struct *mm) |
@@ -419,10 +419,10 @@ static inline swp_entry_t get_swap_page(void) | |||
419 | } | 419 | } |
420 | 420 | ||
421 | /* linux/mm/thrash.c */ | 421 | /* linux/mm/thrash.c */ |
422 | #define put_swap_token(x) do { } while(0) | 422 | #define put_swap_token(mm) do { } while (0) |
423 | #define grab_swap_token() do { } while(0) | 423 | #define grab_swap_token(mm) do { } while (0) |
424 | #define has_swap_token(x) 0 | 424 | #define has_swap_token(mm) 0 |
425 | #define disable_swap_token() do { } while(0) | 425 | #define disable_swap_token() do { } while (0) |
426 | 426 | ||
427 | static inline void | 427 | static inline void |
428 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | 428 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index fa4242cdade8..80de7003d8c2 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -321,6 +321,8 @@ asmlinkage long sys_rt_sigtimedwait(const sigset_t __user *uthese, | |||
321 | siginfo_t __user *uinfo, | 321 | siginfo_t __user *uinfo, |
322 | const struct timespec __user *uts, | 322 | const struct timespec __user *uts, |
323 | size_t sigsetsize); | 323 | size_t sigsetsize); |
324 | asmlinkage long sys_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, | ||
325 | siginfo_t __user *uinfo); | ||
324 | asmlinkage long sys_kill(int pid, int sig); | 326 | asmlinkage long sys_kill(int pid, int sig); |
325 | asmlinkage long sys_tgkill(int tgid, int pid, int sig); | 327 | asmlinkage long sys_tgkill(int tgid, int pid, int sig); |
326 | asmlinkage long sys_tkill(int pid, int sig); | 328 | asmlinkage long sys_tkill(int pid, int sig); |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 98a1d8cfb73d..99adcdc0d3ca 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #ifndef _LINUX_SYSRQ_H | 14 | #ifndef _LINUX_SYSRQ_H |
15 | #define _LINUX_SYSRQ_H | 15 | #define _LINUX_SYSRQ_H |
16 | 16 | ||
17 | #include <linux/errno.h> | ||
18 | |||
17 | struct pt_regs; | 19 | struct pt_regs; |
18 | struct tty_struct; | 20 | struct tty_struct; |
19 | 21 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 84929e914034..b1e3c2fbfe11 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -888,8 +888,6 @@ struct usb_driver { | |||
888 | * struct usb_device_driver - identifies USB device driver to usbcore | 888 | * struct usb_device_driver - identifies USB device driver to usbcore |
889 | * @name: The driver name should be unique among USB drivers, | 889 | * @name: The driver name should be unique among USB drivers, |
890 | * and should normally be the same as the module name. | 890 | * and should normally be the same as the module name. |
891 | * @nodename: Callback to provide a naming hint for a possible | ||
892 | * device node to create. | ||
893 | * @probe: Called to see if the driver is willing to manage a particular | 891 | * @probe: Called to see if the driver is willing to manage a particular |
894 | * device. If it is, probe returns zero and uses dev_set_drvdata() | 892 | * device. If it is, probe returns zero and uses dev_set_drvdata() |
895 | * to associate driver-specific data with the device. If unwilling | 893 | * to associate driver-specific data with the device. If unwilling |
@@ -924,6 +922,8 @@ extern struct bus_type usb_bus_type; | |||
924 | /** | 922 | /** |
925 | * struct usb_class_driver - identifies a USB driver that wants to use the USB major number | 923 | * struct usb_class_driver - identifies a USB driver that wants to use the USB major number |
926 | * @name: the usb class device name for this driver. Will show up in sysfs. | 924 | * @name: the usb class device name for this driver. Will show up in sysfs. |
925 | * @nodename: Callback to provide a naming hint for a possible | ||
926 | * device node to create. | ||
927 | * @fops: pointer to the struct file_operations of this driver. | 927 | * @fops: pointer to the struct file_operations of this driver. |
928 | * @minor_base: the start of the minor range for this driver. | 928 | * @minor_base: the start of the minor range for this driver. |
929 | * | 929 | * |
@@ -1046,6 +1046,8 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1046 | * the device driver is saying that it provided this DMA address, | 1046 | * the device driver is saying that it provided this DMA address, |
1047 | * which the host controller driver should use in preference to the | 1047 | * which the host controller driver should use in preference to the |
1048 | * transfer_buffer. | 1048 | * transfer_buffer. |
1049 | * @sg: scatter gather buffer list | ||
1050 | * @num_sgs: number of entries in the sg list | ||
1049 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may | 1051 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may |
1050 | * be broken up into chunks according to the current maximum packet | 1052 | * be broken up into chunks according to the current maximum packet |
1051 | * size for the endpoint, which is a function of the configuration | 1053 | * size for the endpoint, which is a function of the configuration |
diff --git a/include/linux/usb/langwell_otg.h b/include/linux/usb/langwell_otg.h deleted file mode 100644 index e115ae6df1da..000000000000 --- a/include/linux/usb/langwell_otg.h +++ /dev/null | |||
@@ -1,177 +0,0 @@ | |||
1 | /* | ||
2 | * Intel Langwell USB OTG transceiver driver | ||
3 | * Copyright (C) 2008, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef __LANGWELL_OTG_H__ | ||
21 | #define __LANGWELL_OTG_H__ | ||
22 | |||
23 | /* notify transceiver driver about OTG events */ | ||
24 | extern void langwell_update_transceiver(void); | ||
25 | /* HCD register bus driver */ | ||
26 | extern int langwell_register_host(struct pci_driver *host_driver); | ||
27 | /* HCD unregister bus driver */ | ||
28 | extern void langwell_unregister_host(struct pci_driver *host_driver); | ||
29 | /* DCD register bus driver */ | ||
30 | extern int langwell_register_peripheral(struct pci_driver *client_driver); | ||
31 | /* DCD unregister bus driver */ | ||
32 | extern void langwell_unregister_peripheral(struct pci_driver *client_driver); | ||
33 | /* No silent failure, output warning message */ | ||
34 | extern void langwell_otg_nsf_msg(unsigned long message); | ||
35 | |||
36 | #define CI_USBCMD 0x30 | ||
37 | # define USBCMD_RST BIT(1) | ||
38 | # define USBCMD_RS BIT(0) | ||
39 | #define CI_USBSTS 0x34 | ||
40 | # define USBSTS_SLI BIT(8) | ||
41 | # define USBSTS_URI BIT(6) | ||
42 | # define USBSTS_PCI BIT(2) | ||
43 | #define CI_PORTSC1 0x74 | ||
44 | # define PORTSC_PP BIT(12) | ||
45 | # define PORTSC_LS (BIT(11) | BIT(10)) | ||
46 | # define PORTSC_SUSP BIT(7) | ||
47 | # define PORTSC_CCS BIT(0) | ||
48 | #define CI_HOSTPC1 0xb4 | ||
49 | # define HOSTPC1_PHCD BIT(22) | ||
50 | #define CI_OTGSC 0xf4 | ||
51 | # define OTGSC_DPIE BIT(30) | ||
52 | # define OTGSC_1MSE BIT(29) | ||
53 | # define OTGSC_BSEIE BIT(28) | ||
54 | # define OTGSC_BSVIE BIT(27) | ||
55 | # define OTGSC_ASVIE BIT(26) | ||
56 | # define OTGSC_AVVIE BIT(25) | ||
57 | # define OTGSC_IDIE BIT(24) | ||
58 | # define OTGSC_DPIS BIT(22) | ||
59 | # define OTGSC_1MSS BIT(21) | ||
60 | # define OTGSC_BSEIS BIT(20) | ||
61 | # define OTGSC_BSVIS BIT(19) | ||
62 | # define OTGSC_ASVIS BIT(18) | ||
63 | # define OTGSC_AVVIS BIT(17) | ||
64 | # define OTGSC_IDIS BIT(16) | ||
65 | # define OTGSC_DPS BIT(14) | ||
66 | # define OTGSC_1MST BIT(13) | ||
67 | # define OTGSC_BSE BIT(12) | ||
68 | # define OTGSC_BSV BIT(11) | ||
69 | # define OTGSC_ASV BIT(10) | ||
70 | # define OTGSC_AVV BIT(9) | ||
71 | # define OTGSC_ID BIT(8) | ||
72 | # define OTGSC_HABA BIT(7) | ||
73 | # define OTGSC_HADP BIT(6) | ||
74 | # define OTGSC_IDPU BIT(5) | ||
75 | # define OTGSC_DP BIT(4) | ||
76 | # define OTGSC_OT BIT(3) | ||
77 | # define OTGSC_HAAR BIT(2) | ||
78 | # define OTGSC_VC BIT(1) | ||
79 | # define OTGSC_VD BIT(0) | ||
80 | # define OTGSC_INTEN_MASK (0x7f << 24) | ||
81 | # define OTGSC_INTSTS_MASK (0x7f << 16) | ||
82 | #define CI_USBMODE 0xf8 | ||
83 | # define USBMODE_CM (BIT(1) | BIT(0)) | ||
84 | # define USBMODE_IDLE 0 | ||
85 | # define USBMODE_DEVICE 0x2 | ||
86 | # define USBMODE_HOST 0x3 | ||
87 | |||
88 | #define INTR_DUMMY_MASK (USBSTS_SLI | USBSTS_URI | USBSTS_PCI) | ||
89 | |||
90 | struct otg_hsm { | ||
91 | /* Input */ | ||
92 | int a_bus_resume; | ||
93 | int a_bus_suspend; | ||
94 | int a_conn; | ||
95 | int a_sess_vld; | ||
96 | int a_srp_det; | ||
97 | int a_vbus_vld; | ||
98 | int b_bus_resume; | ||
99 | int b_bus_suspend; | ||
100 | int b_conn; | ||
101 | int b_se0_srp; | ||
102 | int b_sess_end; | ||
103 | int b_sess_vld; | ||
104 | int id; | ||
105 | |||
106 | /* Internal variables */ | ||
107 | int a_set_b_hnp_en; | ||
108 | int b_srp_done; | ||
109 | int b_hnp_enable; | ||
110 | |||
111 | /* Timeout indicator for timers */ | ||
112 | int a_wait_vrise_tmout; | ||
113 | int a_wait_bcon_tmout; | ||
114 | int a_aidl_bdis_tmout; | ||
115 | int b_ase0_brst_tmout; | ||
116 | int b_bus_suspend_tmout; | ||
117 | int b_srp_res_tmout; | ||
118 | |||
119 | /* Informative variables */ | ||
120 | int a_bus_drop; | ||
121 | int a_bus_req; | ||
122 | int a_clr_err; | ||
123 | int a_suspend_req; | ||
124 | int b_bus_req; | ||
125 | |||
126 | /* Output */ | ||
127 | int drv_vbus; | ||
128 | int loc_conn; | ||
129 | int loc_sof; | ||
130 | |||
131 | /* Others */ | ||
132 | int b_bus_suspend_vld; | ||
133 | }; | ||
134 | |||
135 | #define TA_WAIT_VRISE 100 | ||
136 | #define TA_WAIT_BCON 30000 | ||
137 | #define TA_AIDL_BDIS 15000 | ||
138 | #define TB_ASE0_BRST 5000 | ||
139 | #define TB_SE0_SRP 2 | ||
140 | #define TB_SRP_RES 100 | ||
141 | #define TB_BUS_SUSPEND 500 | ||
142 | |||
143 | struct langwell_otg_timer { | ||
144 | unsigned long expires; /* Number of count increase to timeout */ | ||
145 | unsigned long count; /* Tick counter */ | ||
146 | void (*function)(unsigned long); /* Timeout function */ | ||
147 | unsigned long data; /* Data passed to function */ | ||
148 | struct list_head list; | ||
149 | }; | ||
150 | |||
151 | struct langwell_otg { | ||
152 | struct otg_transceiver otg; | ||
153 | struct otg_hsm hsm; | ||
154 | void __iomem *regs; | ||
155 | unsigned region; | ||
156 | struct pci_driver *host_ops; | ||
157 | struct pci_driver *client_ops; | ||
158 | struct pci_dev *pdev; | ||
159 | struct work_struct work; | ||
160 | struct workqueue_struct *qwork; | ||
161 | spinlock_t lock; | ||
162 | spinlock_t wq_lock; | ||
163 | }; | ||
164 | |||
165 | static inline struct langwell_otg *otg_to_langwell(struct otg_transceiver *otg) | ||
166 | { | ||
167 | return container_of(otg, struct langwell_otg, otg); | ||
168 | } | ||
169 | |||
170 | #ifdef DEBUG | ||
171 | #define otg_dbg(fmt, args...) \ | ||
172 | printk(KERN_DEBUG fmt , ## args) | ||
173 | #else | ||
174 | #define otg_dbg(fmt, args...) \ | ||
175 | do { } while (0) | ||
176 | #endif /* DEBUG */ | ||
177 | #endif /* __LANGWELL_OTG_H__ */ | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 44801d26a37a..0ec50ba62139 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -317,7 +317,8 @@ extern int usb_serial_generic_register(int debug); | |||
317 | extern void usb_serial_generic_deregister(void); | 317 | extern void usb_serial_generic_deregister(void); |
318 | extern void usb_serial_generic_resubmit_read_urb(struct usb_serial_port *port, | 318 | extern void usb_serial_generic_resubmit_read_urb(struct usb_serial_port *port, |
319 | gfp_t mem_flags); | 319 | gfp_t mem_flags); |
320 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | 320 | extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, |
321 | struct usb_serial_port *port, | ||
321 | unsigned int ch); | 322 | unsigned int ch); |
322 | extern int usb_serial_handle_break(struct usb_serial_port *port); | 323 | extern int usb_serial_handle_break(struct usb_serial_port *port); |
323 | 324 | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 5d44059f6d63..310e18a880ff 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -42,7 +42,6 @@ struct usbnet { | |||
42 | 42 | ||
43 | /* protocol/interface state */ | 43 | /* protocol/interface state */ |
44 | struct net_device *net; | 44 | struct net_device *net; |
45 | struct net_device_stats stats; | ||
46 | int msg_enable; | 45 | int msg_enable; |
47 | unsigned long data [5]; | 46 | unsigned long data [5]; |
48 | u32 xid; | 47 | u32 xid; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index f24eceecc5a6..95846d988011 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -318,6 +318,8 @@ struct v4l2_pix_format { | |||
318 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 318 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
319 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ | 319 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ |
320 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ | 320 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ |
321 | #define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ | ||
322 | |||
321 | /* | 323 | /* |
322 | * 10bit raw bayer, expanded to 16 bits | 324 | * 10bit raw bayer, expanded to 16 bits |
323 | * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... | 325 | * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... |
@@ -348,6 +350,7 @@ struct v4l2_pix_format { | |||
348 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | 350 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ |
349 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 351 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
350 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ | 352 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ |
353 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | ||
351 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ | 354 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
352 | 355 | ||
353 | /* | 356 | /* |
@@ -894,9 +897,10 @@ enum v4l2_colorfx { | |||
894 | V4L2_COLORFX_BW = 1, | 897 | V4L2_COLORFX_BW = 1, |
895 | V4L2_COLORFX_SEPIA = 2, | 898 | V4L2_COLORFX_SEPIA = 2, |
896 | }; | 899 | }; |
900 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | ||
897 | 901 | ||
898 | /* last CID + 1 */ | 902 | /* last CID + 1 */ |
899 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+32) | 903 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+33) |
900 | 904 | ||
901 | /* MPEG-class control IDs defined by V4L2 */ | 905 | /* MPEG-class control IDs defined by V4L2 */ |
902 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 906 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 7b5b91f60425..9dcb632f6083 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -162,6 +162,8 @@ extern IR_KEYTAB_TYPE ir_codes_ati_tv_wonder_hd_600[IR_KEYTAB_SIZE]; | |||
162 | extern IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE]; | 162 | extern IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE]; |
163 | extern IR_KEYTAB_TYPE ir_codes_kaiomy[IR_KEYTAB_SIZE]; | 163 | extern IR_KEYTAB_TYPE ir_codes_kaiomy[IR_KEYTAB_SIZE]; |
164 | extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE]; | 164 | extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE]; |
165 | extern IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE]; | ||
166 | |||
165 | #endif | 167 | #endif |
166 | 168 | ||
167 | /* | 169 | /* |
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 4d7e2272c42f..11a4a2d3e364 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h | |||
@@ -155,6 +155,9 @@ enum { | |||
155 | /* module cafe_ccic, just ident 8801 */ | 155 | /* module cafe_ccic, just ident 8801 */ |
156 | V4L2_IDENT_CAFE = 8801, | 156 | V4L2_IDENT_CAFE = 8801, |
157 | 157 | ||
158 | /* module mt9v011, just ident 8243 */ | ||
159 | V4L2_IDENT_MT9V011 = 8243, | ||
160 | |||
158 | /* module tw9910: just ident 9910 */ | 161 | /* module tw9910: just ident 9910 */ |
159 | V4L2_IDENT_TW9910 = 9910, | 162 | V4L2_IDENT_TW9910 = 9910, |
160 | 163 | ||
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index c48c24e4d0fa..33a18426ab9b 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -153,6 +153,22 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct v4l2_device *v4l2_dev, | |||
153 | struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev, | 153 | struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev, |
154 | struct i2c_adapter *adapter, | 154 | struct i2c_adapter *adapter, |
155 | const char *module_name, const char *client_type, u8 addr); | 155 | const char *module_name, const char *client_type, u8 addr); |
156 | |||
157 | /* Load an i2c module and return an initialized v4l2_subdev struct. | ||
158 | Only call request_module if module_name != NULL. | ||
159 | The client_type argument is the name of the chip that's on the adapter. */ | ||
160 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | ||
161 | struct i2c_adapter *adapter, | ||
162 | const char *module_name, const char *client_type, | ||
163 | int irq, void *platform_data, | ||
164 | u8 addr, const unsigned short *probe_addrs); | ||
165 | |||
166 | struct i2c_board_info; | ||
167 | |||
168 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, | ||
169 | struct i2c_adapter *adapter, const char *module_name, | ||
170 | struct i2c_board_info *info, const unsigned short *probe_addrs); | ||
171 | |||
156 | /* Initialize an v4l2_subdev with data from an i2c_client struct */ | 172 | /* Initialize an v4l2_subdev with data from an i2c_client struct */ |
157 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, | 173 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, |
158 | const struct v4l2_subdev_ops *ops); | 174 | const struct v4l2_subdev_ops *ops); |
@@ -193,4 +209,14 @@ struct v4l2_routing { | |||
193 | u32 output; | 209 | u32 output; |
194 | }; | 210 | }; |
195 | 211 | ||
212 | /* ------------------------------------------------------------------------- */ | ||
213 | |||
214 | /* Miscellaneous helper functions */ | ||
215 | |||
216 | void v4l_bound_align_image(unsigned int *w, unsigned int wmin, | ||
217 | unsigned int wmax, unsigned int walign, | ||
218 | unsigned int *h, unsigned int hmin, | ||
219 | unsigned int hmax, unsigned int halign, | ||
220 | unsigned int salign); | ||
221 | |||
196 | #endif /* V4L2_COMMON_H_ */ | 222 | #endif /* V4L2_COMMON_H_ */ |
diff --git a/include/media/v4l2-i2c-drv.h b/include/media/v4l2-i2c-drv.h index 10a2882c3cbf..74bf741d1a9b 100644 --- a/include/media/v4l2-i2c-drv.h +++ b/include/media/v4l2-i2c-drv.h | |||
@@ -22,7 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* NOTE: the full version of this header is in the v4l-dvb repository | 24 | /* NOTE: the full version of this header is in the v4l-dvb repository |
25 | * and allows v4l i2c drivers to be compiled on older kernels as well. | 25 | * and allows v4l i2c drivers to be compiled on pre-2.6.26 kernels. |
26 | * The version of this header as it appears in the kernel is a stripped | 26 | * The version of this header as it appears in the kernel is a stripped |
27 | * version (without all the backwards compatibility stuff) and so it | 27 | * version (without all the backwards compatibility stuff) and so it |
28 | * looks a bit odd. | 28 | * looks a bit odd. |
@@ -30,6 +30,9 @@ | |||
30 | * If you look at the full version then you will understand the reason | 30 | * If you look at the full version then you will understand the reason |
31 | * for introducing this header since you really don't want to have all | 31 | * for introducing this header since you really don't want to have all |
32 | * the tricky backwards compatibility code in each and every i2c driver. | 32 | * the tricky backwards compatibility code in each and every i2c driver. |
33 | * | ||
34 | * If the i2c driver will never be compiled for pre-2.6.26 kernels, then | ||
35 | * DO NOT USE this header! Just write it as a regular i2c driver. | ||
33 | */ | 36 | */ |
34 | 37 | ||
35 | #ifndef __V4L2_I2C_DRV_H__ | 38 | #ifndef __V4L2_I2C_DRV_H__ |
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index a503e1cee78b..5dcb36785529 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -79,7 +79,11 @@ struct v4l2_decode_vbi_line { | |||
79 | not yet implemented) since ops provide proper type-checking. | 79 | not yet implemented) since ops provide proper type-checking. |
80 | */ | 80 | */ |
81 | 81 | ||
82 | /* init: initialize the sensor registors to some sort of reasonable default | 82 | /* s_config: if set, then it is always called by the v4l2_i2c_new_subdev* |
83 | functions after the v4l2_subdev was registered. It is used to pass | ||
84 | platform data to the subdev which can be used during initialization. | ||
85 | |||
86 | init: initialize the sensor registors to some sort of reasonable default | ||
83 | values. Do not use for new drivers and should be removed in existing | 87 | values. Do not use for new drivers and should be removed in existing |
84 | drivers. | 88 | drivers. |
85 | 89 | ||
@@ -96,6 +100,7 @@ struct v4l2_decode_vbi_line { | |||
96 | struct v4l2_subdev_core_ops { | 100 | struct v4l2_subdev_core_ops { |
97 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); | 101 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); |
98 | int (*log_status)(struct v4l2_subdev *sd); | 102 | int (*log_status)(struct v4l2_subdev *sd); |
103 | int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data); | ||
99 | int (*init)(struct v4l2_subdev *sd, u32 val); | 104 | int (*init)(struct v4l2_subdev *sd, u32 val); |
100 | int (*load_fw)(struct v4l2_subdev *sd); | 105 | int (*load_fw)(struct v4l2_subdev *sd); |
101 | int (*reset)(struct v4l2_subdev *sd, u32 val); | 106 | int (*reset)(struct v4l2_subdev *sd, u32 val); |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index a632689b61b4..cbdd6284996d 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -258,8 +258,8 @@ static inline bool nf_ct_kill(struct nf_conn *ct) | |||
258 | /* Update TCP window tracking data when NAT mangles the packet */ | 258 | /* Update TCP window tracking data when NAT mangles the packet */ |
259 | extern void nf_conntrack_tcp_update(const struct sk_buff *skb, | 259 | extern void nf_conntrack_tcp_update(const struct sk_buff *skb, |
260 | unsigned int dataoff, | 260 | unsigned int dataoff, |
261 | struct nf_conn *ct, | 261 | struct nf_conn *ct, int dir, |
262 | int dir); | 262 | s16 offset); |
263 | 263 | ||
264 | /* Fake conntrack entry for untracked connections */ | 264 | /* Fake conntrack entry for untracked connections */ |
265 | extern struct nf_conn nf_conntrack_untracked; | 265 | extern struct nf_conn nf_conntrack_untracked; |
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h index 5054dc5ea2c2..29d126736611 100644 --- a/include/net/phonet/pn_dev.h +++ b/include/net/phonet/pn_dev.h | |||
@@ -45,6 +45,7 @@ int phonet_address_add(struct net_device *dev, u8 addr); | |||
45 | int phonet_address_del(struct net_device *dev, u8 addr); | 45 | int phonet_address_del(struct net_device *dev, u8 addr); |
46 | u8 phonet_address_get(struct net_device *dev, u8 addr); | 46 | u8 phonet_address_get(struct net_device *dev, u8 addr); |
47 | int phonet_address_lookup(struct net *net, u8 addr); | 47 | int phonet_address_lookup(struct net *net, u8 addr); |
48 | void phonet_address_notify(int event, struct net_device *dev, u8 addr); | ||
48 | 49 | ||
49 | #define PN_NO_ADDR 0xff | 50 | #define PN_NO_ADDR 0xff |
50 | 51 | ||
diff --git a/include/net/protocol.h b/include/net/protocol.h index ffa5b8b1f1df..1089d5aabd49 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h | |||
@@ -53,7 +53,7 @@ struct inet6_protocol | |||
53 | 53 | ||
54 | void (*err_handler)(struct sk_buff *skb, | 54 | void (*err_handler)(struct sk_buff *skb, |
55 | struct inet6_skb_parm *opt, | 55 | struct inet6_skb_parm *opt, |
56 | int type, int code, int offset, | 56 | u8 type, u8 code, int offset, |
57 | __be32 info); | 57 | __be32 info); |
58 | 58 | ||
59 | int (*gso_send_check)(struct sk_buff *skb); | 59 | int (*gso_send_check)(struct sk_buff *skb); |
diff --git a/include/net/rawv6.h b/include/net/rawv6.h index 8a22599f26ba..f6b9b830df8c 100644 --- a/include/net/rawv6.h +++ b/include/net/rawv6.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <net/protocol.h> | 6 | #include <net/protocol.h> |
7 | 7 | ||
8 | void raw6_icmp_error(struct sk_buff *, int nexthdr, | 8 | void raw6_icmp_error(struct sk_buff *, int nexthdr, |
9 | int type, int code, int inner_offset, __be32); | 9 | u8 type, u8 code, int inner_offset, __be32); |
10 | int raw6_local_deliver(struct sk_buff *, int); | 10 | int raw6_local_deliver(struct sk_buff *, int); |
11 | 11 | ||
12 | extern int rawv6_rcv(struct sock *sk, | 12 | extern int rawv6_rcv(struct sock *sk, |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 9f80a7668289..d16a304cbed4 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -448,6 +448,7 @@ static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk) | |||
448 | { | 448 | { |
449 | struct sctp_ulpevent *event = sctp_skb2event(skb); | 449 | struct sctp_ulpevent *event = sctp_skb2event(skb); |
450 | 450 | ||
451 | skb_orphan(skb); | ||
451 | skb->sk = sk; | 452 | skb->sk = sk; |
452 | skb->destructor = sctp_sock_rfree; | 453 | skb->destructor = sctp_sock_rfree; |
453 | atomic_add(event->rmem_len, &sk->sk_rmem_alloc); | 454 | atomic_add(event->rmem_len, &sk->sk_rmem_alloc); |
diff --git a/include/net/sock.h b/include/net/sock.h index 07133c5e9868..2c0da9239b95 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -54,6 +54,7 @@ | |||
54 | 54 | ||
55 | #include <linux/filter.h> | 55 | #include <linux/filter.h> |
56 | #include <linux/rculist_nulls.h> | 56 | #include <linux/rculist_nulls.h> |
57 | #include <linux/poll.h> | ||
57 | 58 | ||
58 | #include <asm/atomic.h> | 59 | #include <asm/atomic.h> |
59 | #include <net/dst.h> | 60 | #include <net/dst.h> |
@@ -1241,6 +1242,74 @@ static inline int sk_has_allocations(const struct sock *sk) | |||
1241 | return sk_wmem_alloc_get(sk) || sk_rmem_alloc_get(sk); | 1242 | return sk_wmem_alloc_get(sk) || sk_rmem_alloc_get(sk); |
1242 | } | 1243 | } |
1243 | 1244 | ||
1245 | /** | ||
1246 | * sk_has_sleeper - check if there are any waiting processes | ||
1247 | * @sk: socket | ||
1248 | * | ||
1249 | * Returns true if socket has waiting processes | ||
1250 | * | ||
1251 | * The purpose of the sk_has_sleeper and sock_poll_wait is to wrap the memory | ||
1252 | * barrier call. They were added due to the race found within the tcp code. | ||
1253 | * | ||
1254 | * Consider following tcp code paths: | ||
1255 | * | ||
1256 | * CPU1 CPU2 | ||
1257 | * | ||
1258 | * sys_select receive packet | ||
1259 | * ... ... | ||
1260 | * __add_wait_queue update tp->rcv_nxt | ||
1261 | * ... ... | ||
1262 | * tp->rcv_nxt check sock_def_readable | ||
1263 | * ... { | ||
1264 | * schedule ... | ||
1265 | * if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) | ||
1266 | * wake_up_interruptible(sk->sk_sleep) | ||
1267 | * ... | ||
1268 | * } | ||
1269 | * | ||
1270 | * The race for tcp fires when the __add_wait_queue changes done by CPU1 stay | ||
1271 | * in its cache, and so does the tp->rcv_nxt update on CPU2 side. The CPU1 | ||
1272 | * could then endup calling schedule and sleep forever if there are no more | ||
1273 | * data on the socket. | ||
1274 | * | ||
1275 | * The sk_has_sleeper is always called right after a call to read_lock, so we | ||
1276 | * can use smp_mb__after_lock barrier. | ||
1277 | */ | ||
1278 | static inline int sk_has_sleeper(struct sock *sk) | ||
1279 | { | ||
1280 | /* | ||
1281 | * We need to be sure we are in sync with the | ||
1282 | * add_wait_queue modifications to the wait queue. | ||
1283 | * | ||
1284 | * This memory barrier is paired in the sock_poll_wait. | ||
1285 | */ | ||
1286 | smp_mb__after_lock(); | ||
1287 | return sk->sk_sleep && waitqueue_active(sk->sk_sleep); | ||
1288 | } | ||
1289 | |||
1290 | /** | ||
1291 | * sock_poll_wait - place memory barrier behind the poll_wait call. | ||
1292 | * @filp: file | ||
1293 | * @wait_address: socket wait queue | ||
1294 | * @p: poll_table | ||
1295 | * | ||
1296 | * See the comments in the sk_has_sleeper function. | ||
1297 | */ | ||
1298 | static inline void sock_poll_wait(struct file *filp, | ||
1299 | wait_queue_head_t *wait_address, poll_table *p) | ||
1300 | { | ||
1301 | if (p && wait_address) { | ||
1302 | poll_wait(filp, wait_address, p); | ||
1303 | /* | ||
1304 | * We need to be sure we are in sync with the | ||
1305 | * socket flags modification. | ||
1306 | * | ||
1307 | * This memory barrier is paired in the sk_has_sleeper. | ||
1308 | */ | ||
1309 | smp_mb(); | ||
1310 | } | ||
1311 | } | ||
1312 | |||
1244 | /* | 1313 | /* |
1245 | * Queue a received datagram if it will fit. Stream and sequenced | 1314 | * Queue a received datagram if it will fit. Stream and sequenced |
1246 | * protocols can't normally use this as they need to fit buffers in | 1315 | * protocols can't normally use this as they need to fit buffers in |
@@ -1252,6 +1321,7 @@ static inline int sk_has_allocations(const struct sock *sk) | |||
1252 | 1321 | ||
1253 | static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) | 1322 | static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) |
1254 | { | 1323 | { |
1324 | skb_orphan(skb); | ||
1255 | skb->sk = sk; | 1325 | skb->sk = sk; |
1256 | skb->destructor = sock_wfree; | 1326 | skb->destructor = sock_wfree; |
1257 | /* | 1327 | /* |
@@ -1264,6 +1334,7 @@ static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) | |||
1264 | 1334 | ||
1265 | static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) | 1335 | static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) |
1266 | { | 1336 | { |
1337 | skb_orphan(skb); | ||
1267 | skb->sk = sk; | 1338 | skb->sk = sk; |
1268 | skb->destructor = sock_rfree; | 1339 | skb->destructor = sock_rfree; |
1269 | atomic_add(skb->truesize, &sk->sk_rmem_alloc); | 1340 | atomic_add(skb->truesize, &sk->sk_rmem_alloc); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 736bca450886..9e3a3f4c1f60 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1274,7 +1274,7 @@ struct xfrm_tunnel { | |||
1274 | struct xfrm6_tunnel { | 1274 | struct xfrm6_tunnel { |
1275 | int (*handler)(struct sk_buff *skb); | 1275 | int (*handler)(struct sk_buff *skb); |
1276 | int (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt, | 1276 | int (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt, |
1277 | int type, int code, int offset, __be32 info); | 1277 | u8 type, u8 code, int offset, __be32 info); |
1278 | struct xfrm6_tunnel *next; | 1278 | struct xfrm6_tunnel *next; |
1279 | int priority; | 1279 | int priority; |
1280 | }; | 1280 | }; |
diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h index 6300f556bce5..a0ff61c3e935 100644 --- a/include/scsi/fc_encode.h +++ b/include/scsi/fc_encode.h | |||
@@ -107,7 +107,6 @@ static inline int fc_ct_fill(struct fc_lport *lport, struct fc_frame *fp, | |||
107 | break; | 107 | break; |
108 | 108 | ||
109 | default: | 109 | default: |
110 | FC_DBG("Invalid op code %x \n", op); | ||
111 | return -EINVAL; | 110 | return -EINVAL; |
112 | } | 111 | } |
113 | *r_ctl = FC_RCTL_DD_UNSOL_CTL; | 112 | *r_ctl = FC_RCTL_DD_UNSOL_CTL; |
@@ -298,7 +297,6 @@ static inline int fc_els_fill(struct fc_lport *lport, struct fc_rport *rport, | |||
298 | break; | 297 | break; |
299 | 298 | ||
300 | default: | 299 | default: |
301 | FC_DBG("Invalid op code %x \n", op); | ||
302 | return -EINVAL; | 300 | return -EINVAL; |
303 | } | 301 | } |
304 | 302 | ||
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index ebdd9f4cf070..b92584a8843a 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -34,17 +34,72 @@ | |||
34 | 34 | ||
35 | #include <scsi/fc_frame.h> | 35 | #include <scsi/fc_frame.h> |
36 | 36 | ||
37 | #define LIBFC_DEBUG | 37 | #define FC_LIBFC_LOGGING 0x01 /* General logging, not categorized */ |
38 | 38 | #define FC_LPORT_LOGGING 0x02 /* lport layer logging */ | |
39 | #ifdef LIBFC_DEBUG | 39 | #define FC_DISC_LOGGING 0x04 /* discovery layer logging */ |
40 | /* Log messages */ | 40 | #define FC_RPORT_LOGGING 0x08 /* rport layer logging */ |
41 | #define FC_DBG(fmt, args...) \ | 41 | #define FC_FCP_LOGGING 0x10 /* I/O path logging */ |
42 | do { \ | 42 | #define FC_EM_LOGGING 0x20 /* Exchange Manager logging */ |
43 | printk(KERN_INFO "%s " fmt, __func__, ##args); \ | 43 | #define FC_EXCH_LOGGING 0x40 /* Exchange/Sequence logging */ |
44 | } while (0) | 44 | #define FC_SCSI_LOGGING 0x80 /* SCSI logging (mostly error handling) */ |
45 | #else | 45 | |
46 | #define FC_DBG(fmt, args...) | 46 | extern unsigned int fc_debug_logging; |
47 | #endif | 47 | |
48 | #define FC_CHECK_LOGGING(LEVEL, CMD) \ | ||
49 | do { \ | ||
50 | if (unlikely(fc_debug_logging & LEVEL)) \ | ||
51 | do { \ | ||
52 | CMD; \ | ||
53 | } while (0); \ | ||
54 | } while (0); | ||
55 | |||
56 | #define FC_LIBFC_DBG(fmt, args...) \ | ||
57 | FC_CHECK_LOGGING(FC_LIBFC_LOGGING, \ | ||
58 | printk(KERN_INFO "libfc: " fmt, ##args);) | ||
59 | |||
60 | #define FC_LPORT_DBG(lport, fmt, args...) \ | ||
61 | FC_CHECK_LOGGING(FC_LPORT_LOGGING, \ | ||
62 | printk(KERN_INFO "lport: %6x: " fmt, \ | ||
63 | fc_host_port_id(lport->host), ##args);) | ||
64 | |||
65 | #define FC_DISC_DBG(disc, fmt, args...) \ | ||
66 | FC_CHECK_LOGGING(FC_DISC_LOGGING, \ | ||
67 | printk(KERN_INFO "disc: %6x: " fmt, \ | ||
68 | fc_host_port_id(disc->lport->host), \ | ||
69 | ##args);) | ||
70 | |||
71 | #define FC_RPORT_DBG(rport, fmt, args...) \ | ||
72 | do { \ | ||
73 | struct fc_rport_libfc_priv *rdata = rport->dd_data; \ | ||
74 | struct fc_lport *lport = rdata->local_port; \ | ||
75 | FC_CHECK_LOGGING(FC_RPORT_LOGGING, \ | ||
76 | printk(KERN_INFO "rport: %6x: %6x: " fmt, \ | ||
77 | fc_host_port_id(lport->host), \ | ||
78 | rport->port_id, ##args);) \ | ||
79 | } while (0); | ||
80 | |||
81 | #define FC_FCP_DBG(pkt, fmt, args...) \ | ||
82 | FC_CHECK_LOGGING(FC_FCP_LOGGING, \ | ||
83 | printk(KERN_INFO "fcp: %6x: %6x: " fmt, \ | ||
84 | fc_host_port_id(pkt->lp->host), \ | ||
85 | pkt->rport->port_id, ##args);) | ||
86 | |||
87 | #define FC_EM_DBG(em, fmt, args...) \ | ||
88 | FC_CHECK_LOGGING(FC_EM_LOGGING, \ | ||
89 | printk(KERN_INFO "em: %6x: " fmt, \ | ||
90 | fc_host_port_id(em->lp->host), \ | ||
91 | ##args);) | ||
92 | |||
93 | #define FC_EXCH_DBG(exch, fmt, args...) \ | ||
94 | FC_CHECK_LOGGING(FC_EXCH_LOGGING, \ | ||
95 | printk(KERN_INFO "exch: %6x: %4x: " fmt, \ | ||
96 | fc_host_port_id(exch->lp->host), \ | ||
97 | exch->xid, ##args);) | ||
98 | |||
99 | #define FC_SCSI_DBG(lport, fmt, args...) \ | ||
100 | FC_CHECK_LOGGING(FC_SCSI_LOGGING, \ | ||
101 | printk(KERN_INFO "scsi: %6x: " fmt, \ | ||
102 | fc_host_port_id(lport->host), ##args);) | ||
48 | 103 | ||
49 | /* | 104 | /* |
50 | * libfc error codes | 105 | * libfc error codes |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 196525cd402f..61afeb59a836 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -125,6 +125,10 @@ struct iscsi_task { | |||
125 | struct scsi_cmnd *sc; /* associated SCSI cmd*/ | 125 | struct scsi_cmnd *sc; /* associated SCSI cmd*/ |
126 | struct iscsi_conn *conn; /* used connection */ | 126 | struct iscsi_conn *conn; /* used connection */ |
127 | 127 | ||
128 | /* data processing tracking */ | ||
129 | unsigned long last_xfer; | ||
130 | unsigned long last_timeout; | ||
131 | bool have_checked_conn; | ||
128 | /* state set/tested under session->lock */ | 132 | /* state set/tested under session->lock */ |
129 | int state; | 133 | int state; |
130 | atomic_t refcount; | 134 | atomic_t refcount; |
diff --git a/include/scsi/scsi_driver.h b/include/scsi/scsi_driver.h index 1f5ca7f62116..9fd6702f02e2 100644 --- a/include/scsi/scsi_driver.h +++ b/include/scsi/scsi_driver.h | |||
@@ -32,5 +32,6 @@ int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req); | |||
32 | int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req); | 32 | int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req); |
33 | int scsi_prep_state_check(struct scsi_device *sdev, struct request *req); | 33 | int scsi_prep_state_check(struct scsi_device *sdev, struct request *req); |
34 | int scsi_prep_return(struct request_queue *q, struct request *req, int ret); | 34 | int scsi_prep_return(struct request_queue *q, struct request *req, int ret); |
35 | int scsi_prep_fn(struct request_queue *, struct request *); | ||
35 | 36 | ||
36 | #endif /* _SCSI_SCSI_DRIVER_H */ | 37 | #endif /* _SCSI_SCSI_DRIVER_H */ |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index d6b05f42dd44..9a74b468a229 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM block | ||
3 | |||
1 | #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_BLOCK_H | 5 | #define _TRACE_BLOCK_H |
3 | 6 | ||
@@ -5,9 +8,6 @@ | |||
5 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
6 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
7 | 10 | ||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM block | ||
10 | |||
11 | TRACE_EVENT(block_rq_abort, | 11 | TRACE_EVENT(block_rq_abort, |
12 | 12 | ||
13 | TP_PROTO(struct request_queue *q, struct request *rq), | 13 | TP_PROTO(struct request_queue *q, struct request *rq), |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index acf4cc9cd36d..7d8b5bc74185 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -1,9 +1,9 @@ | |||
1 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_EXT4_H | ||
3 | |||
4 | #undef TRACE_SYSTEM | 1 | #undef TRACE_SYSTEM |
5 | #define TRACE_SYSTEM ext4 | 2 | #define TRACE_SYSTEM ext4 |
6 | 3 | ||
4 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_EXT4_H | ||
6 | |||
7 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
8 | #include "../../../fs/ext4/ext4.h" | 8 | #include "../../../fs/ext4/ext4.h" |
9 | #include "../../../fs/ext4/mballoc.h" | 9 | #include "../../../fs/ext4/mballoc.h" |
@@ -34,7 +34,8 @@ TRACE_EVENT(ext4_free_inode, | |||
34 | 34 | ||
35 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", | 35 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", |
36 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, | 36 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, |
37 | __entry->uid, __entry->gid, __entry->blocks) | 37 | __entry->uid, __entry->gid, |
38 | (unsigned long long) __entry->blocks) | ||
38 | ); | 39 | ); |
39 | 40 | ||
40 | TRACE_EVENT(ext4_request_inode, | 41 | TRACE_EVENT(ext4_request_inode, |
@@ -189,7 +190,7 @@ TRACE_EVENT(ext4_journalled_write_end, | |||
189 | __entry->copied) | 190 | __entry->copied) |
190 | ); | 191 | ); |
191 | 192 | ||
192 | TRACE_EVENT(ext4_da_writepage, | 193 | TRACE_EVENT(ext4_writepage, |
193 | TP_PROTO(struct inode *inode, struct page *page), | 194 | TP_PROTO(struct inode *inode, struct page *page), |
194 | 195 | ||
195 | TP_ARGS(inode, page), | 196 | TP_ARGS(inode, page), |
@@ -341,49 +342,6 @@ TRACE_EVENT(ext4_da_write_end, | |||
341 | __entry->copied) | 342 | __entry->copied) |
342 | ); | 343 | ); |
343 | 344 | ||
344 | TRACE_EVENT(ext4_normal_writepage, | ||
345 | TP_PROTO(struct inode *inode, struct page *page), | ||
346 | |||
347 | TP_ARGS(inode, page), | ||
348 | |||
349 | TP_STRUCT__entry( | ||
350 | __field( dev_t, dev ) | ||
351 | __field( ino_t, ino ) | ||
352 | __field( pgoff_t, index ) | ||
353 | ), | ||
354 | |||
355 | TP_fast_assign( | ||
356 | __entry->dev = inode->i_sb->s_dev; | ||
357 | __entry->ino = inode->i_ino; | ||
358 | __entry->index = page->index; | ||
359 | ), | ||
360 | |||
361 | TP_printk("dev %s ino %lu page_index %lu", | ||
362 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
363 | ); | ||
364 | |||
365 | TRACE_EVENT(ext4_journalled_writepage, | ||
366 | TP_PROTO(struct inode *inode, struct page *page), | ||
367 | |||
368 | TP_ARGS(inode, page), | ||
369 | |||
370 | TP_STRUCT__entry( | ||
371 | __field( dev_t, dev ) | ||
372 | __field( ino_t, ino ) | ||
373 | __field( pgoff_t, index ) | ||
374 | |||
375 | ), | ||
376 | |||
377 | TP_fast_assign( | ||
378 | __entry->dev = inode->i_sb->s_dev; | ||
379 | __entry->ino = inode->i_ino; | ||
380 | __entry->index = page->index; | ||
381 | ), | ||
382 | |||
383 | TP_printk("dev %s ino %lu page_index %lu", | ||
384 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
385 | ); | ||
386 | |||
387 | TRACE_EVENT(ext4_discard_blocks, | 345 | TRACE_EVENT(ext4_discard_blocks, |
388 | TP_PROTO(struct super_block *sb, unsigned long long blk, | 346 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
389 | unsigned long long count), | 347 | unsigned long long count), |
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index b0c7ede55eb1..1cb0c3aa11e6 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM irq | ||
3 | |||
1 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_IRQ_H | 5 | #define _TRACE_IRQ_H |
3 | 6 | ||
4 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
5 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM irq | ||
9 | |||
10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } | 10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } |
11 | #define show_softirq_name(val) \ | 11 | #define show_softirq_name(val) \ |
12 | __print_symbolic(val, \ | 12 | __print_symbolic(val, \ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 845b0b4b48fd..10813fa0c8d0 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM jbd2 | ||
3 | |||
1 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_JBD2_H | 5 | #define _TRACE_JBD2_H |
3 | 6 | ||
4 | #include <linux/jbd2.h> | 7 | #include <linux/jbd2.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM jbd2 | ||
9 | |||
10 | TRACE_EVENT(jbd2_checkpoint, | 10 | TRACE_EVENT(jbd2_checkpoint, |
11 | 11 | ||
12 | TP_PROTO(journal_t *journal, int result), | 12 | TP_PROTO(journal_t *journal, int result), |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 9baba50d6512..1493c541f9c4 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM kmem | ||
3 | |||
1 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_KMEM_H | 5 | #define _TRACE_KMEM_H |
3 | 6 | ||
4 | #include <linux/types.h> | 7 | #include <linux/types.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM kmem | ||
9 | |||
10 | /* | 10 | /* |
11 | * The order of these masks is important. Matching masks will be seen | 11 | * The order of these masks is important. Matching masks will be seen |
12 | * first and the left over flags will end up showing by themselves. | 12 | * first and the left over flags will end up showing by themselves. |
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h index 0e956c9dfd7e..bcf1d209a00d 100644 --- a/include/trace/events/lockdep.h +++ b/include/trace/events/lockdep.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM lockdep | ||
3 | |||
1 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_LOCKDEP_H | 5 | #define _TRACE_LOCKDEP_H |
3 | 6 | ||
4 | #include <linux/lockdep.h> | 7 | #include <linux/lockdep.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM lockdep | ||
9 | |||
10 | #ifdef CONFIG_LOCKDEP | 10 | #ifdef CONFIG_LOCKDEP |
11 | 11 | ||
12 | TRACE_EVENT(lock_acquire, | 12 | TRACE_EVENT(lock_acquire, |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 24ab5bcff7b2..8949bb7eb082 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM sched | ||
3 | |||
1 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_SCHED_H | 5 | #define _TRACE_SCHED_H |
3 | 6 | ||
4 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM sched | ||
9 | |||
10 | /* | 10 | /* |
11 | * Tracepoint for calling kthread_stop, performed to end a kthread: | 11 | * Tracepoint for calling kthread_stop, performed to end a kthread: |
12 | */ | 12 | */ |
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index 1e8fabb57c06..e499863b9669 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM skb | ||
3 | |||
1 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_SKB_H | 5 | #define _TRACE_SKB_H |
3 | 6 | ||
4 | #include <linux/skbuff.h> | 7 | #include <linux/skbuff.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM skb | ||
9 | |||
10 | /* | 10 | /* |
11 | * Tracepoint for free an sk_buff: | 11 | * Tracepoint for free an sk_buff: |
12 | */ | 12 | */ |
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index 035f1bff288e..fcfd9a1e4b96 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM workqueue | ||
3 | |||
1 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_WORKQUEUE_H | 5 | #define _TRACE_WORKQUEUE_H |
3 | 6 | ||
@@ -5,9 +8,6 @@ | |||
5 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
6 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
7 | 10 | ||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM workqueue | ||
10 | |||
11 | TRACE_EVENT(workqueue_insertion, | 11 | TRACE_EVENT(workqueue_insertion, |
12 | 12 | ||
13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | 13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), |