diff options
Diffstat (limited to 'include')
47 files changed, 779 insertions, 142 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/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/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/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/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/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/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/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/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/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..cf1f3888067c 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1361,7 +1361,6 @@ int ide_in_drive_list(u16 *, const struct drive_list_entry *); | |||
1361 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1361 | #ifdef CONFIG_BLK_DEV_IDEDMA |
1362 | int ide_dma_good_drive(ide_drive_t *); | 1362 | int ide_dma_good_drive(ide_drive_t *); |
1363 | int __ide_dma_bad_drive(ide_drive_t *); | 1363 | int __ide_dma_bad_drive(ide_drive_t *); |
1364 | int ide_id_dma_bug(ide_drive_t *); | ||
1365 | 1364 | ||
1366 | u8 ide_find_dma_mode(ide_drive_t *, u8); | 1365 | u8 ide_find_dma_mode(ide_drive_t *, u8); |
1367 | 1366 | ||
@@ -1402,7 +1401,6 @@ void ide_dma_lost_irq(ide_drive_t *); | |||
1402 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); | 1401 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); |
1403 | 1402 | ||
1404 | #else | 1403 | #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; } | 1404 | 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; } | 1405 | 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) { ; } | 1406 | static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } |
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/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/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/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/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/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/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/videodev2.h b/include/linux/videodev2.h index f24eceecc5a6..8a025d510904 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -348,6 +348,7 @@ struct v4l2_pix_format { | |||
348 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | 348 | #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 */ | 349 | #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 */ | 350 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ |
351 | #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 */ | 352 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
352 | 353 | ||
353 | /* | 354 | /* |
@@ -894,9 +895,10 @@ enum v4l2_colorfx { | |||
894 | V4L2_COLORFX_BW = 1, | 895 | V4L2_COLORFX_BW = 1, |
895 | V4L2_COLORFX_SEPIA = 2, | 896 | V4L2_COLORFX_SEPIA = 2, |
896 | }; | 897 | }; |
898 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | ||
897 | 899 | ||
898 | /* last CID + 1 */ | 900 | /* last CID + 1 */ |
899 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+32) | 901 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+33) |
900 | 902 | ||
901 | /* MPEG-class control IDs defined by V4L2 */ | 903 | /* MPEG-class control IDs defined by V4L2 */ |
902 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 904 | #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-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/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..352f06bbd7a9 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1252,6 +1252,7 @@ static inline int sk_has_allocations(const struct sock *sk) | |||
1252 | 1252 | ||
1253 | static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) | 1253 | static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) |
1254 | { | 1254 | { |
1255 | skb_orphan(skb); | ||
1255 | skb->sk = sk; | 1256 | skb->sk = sk; |
1256 | skb->destructor = sock_wfree; | 1257 | skb->destructor = sock_wfree; |
1257 | /* | 1258 | /* |
@@ -1264,6 +1265,7 @@ static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) | |||
1264 | 1265 | ||
1265 | static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) | 1266 | static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) |
1266 | { | 1267 | { |
1268 | skb_orphan(skb); | ||
1267 | skb->sk = sk; | 1269 | skb->sk = sk; |
1268 | skb->destructor = sock_rfree; | 1270 | skb->destructor = sock_rfree; |
1269 | atomic_add(skb->truesize, &sk->sk_rmem_alloc); | 1271 | 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 */ |