diff options
Diffstat (limited to 'include')
341 files changed, 5574 insertions, 1812 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index d41c94885211..f1380287ed4d 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -290,7 +290,7 @@ struct acpi_table_fadt { | |||
290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ | 290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ |
291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ | 291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ |
292 | 292 | ||
293 | /* Values for preferred_profile (Prefered Power Management Profiles) */ | 293 | /* Values for preferred_profile (Preferred Power Management Profiles) */ |
294 | 294 | ||
295 | enum acpi_prefered_pm_profiles { | 295 | enum acpi_prefered_pm_profiles { |
296 | PM_UNSPECIFIED = 0, | 296 | PM_UNSPECIFIED = 0, |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index f2d2faf4d9ae..e5a3f5880001 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -194,6 +194,13 @@ extern void warn_slowpath_null(const char *file, const int line); | |||
194 | #ifdef CONFIG_SMP | 194 | #ifdef CONFIG_SMP |
195 | # define WARN_ON_SMP(x) WARN_ON(x) | 195 | # define WARN_ON_SMP(x) WARN_ON(x) |
196 | #else | 196 | #else |
197 | /* | ||
198 | * Use of ({0;}) because WARN_ON_SMP(x) may be used either as | ||
199 | * a stand alone line statement or as a condition in an if () | ||
200 | * statement. | ||
201 | * A simple "0" would cause gcc to give a "statement has no effect" | ||
202 | * warning. | ||
203 | */ | ||
197 | # define WARN_ON_SMP(x) ({0;}) | 204 | # define WARN_ON_SMP(x) ({0;}) |
198 | #endif | 205 | #endif |
199 | 206 | ||
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index 942d30b5aab1..0dd4e87f6fba 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h | |||
@@ -192,7 +192,7 @@ typedef struct siginfo { | |||
192 | * SIGBUS si_codes | 192 | * SIGBUS si_codes |
193 | */ | 193 | */ |
194 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ | 194 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ |
195 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ | 195 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */ |
196 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ | 196 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ |
197 | /* hardware memory error consumed on a machine check: action required */ | 197 | /* hardware memory error consumed on a machine check: action required */ |
198 | #define BUS_MCEERR_AR (__SI_FAULT|4) | 198 | #define BUS_MCEERR_AR (__SI_FAULT|4) |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 32c45e5fe0ab..077c00d94f6e 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -170,6 +170,10 @@ | |||
170 | STRUCT_ALIGN(); \ | 170 | STRUCT_ALIGN(); \ |
171 | *(__tracepoints) \ | 171 | *(__tracepoints) \ |
172 | /* implement dynamic printk debug */ \ | 172 | /* implement dynamic printk debug */ \ |
173 | . = ALIGN(8); \ | ||
174 | VMLINUX_SYMBOL(__start___jump_table) = .; \ | ||
175 | *(__jump_table) \ | ||
176 | VMLINUX_SYMBOL(__stop___jump_table) = .; \ | ||
173 | . = ALIGN(8); \ | 177 | . = ALIGN(8); \ |
174 | VMLINUX_SYMBOL(__start___verbose) = .; \ | 178 | VMLINUX_SYMBOL(__start___verbose) = .; \ |
175 | *(__verbose) \ | 179 | *(__verbose) \ |
@@ -228,8 +232,6 @@ | |||
228 | \ | 232 | \ |
229 | BUG_TABLE \ | 233 | BUG_TABLE \ |
230 | \ | 234 | \ |
231 | JUMP_TABLE \ | ||
232 | \ | ||
233 | /* PCI quirks */ \ | 235 | /* PCI quirks */ \ |
234 | .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \ | 236 | .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \ |
235 | VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \ | 237 | VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \ |
@@ -274,70 +276,70 @@ | |||
274 | /* Kernel symbol table: Normal symbols */ \ | 276 | /* Kernel symbol table: Normal symbols */ \ |
275 | __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ | 277 | __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ |
276 | VMLINUX_SYMBOL(__start___ksymtab) = .; \ | 278 | VMLINUX_SYMBOL(__start___ksymtab) = .; \ |
277 | *(__ksymtab) \ | 279 | *(SORT(___ksymtab+*)) \ |
278 | VMLINUX_SYMBOL(__stop___ksymtab) = .; \ | 280 | VMLINUX_SYMBOL(__stop___ksymtab) = .; \ |
279 | } \ | 281 | } \ |
280 | \ | 282 | \ |
281 | /* Kernel symbol table: GPL-only symbols */ \ | 283 | /* Kernel symbol table: GPL-only symbols */ \ |
282 | __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \ | 284 | __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \ |
283 | VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \ | 285 | VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \ |
284 | *(__ksymtab_gpl) \ | 286 | *(SORT(___ksymtab_gpl+*)) \ |
285 | VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \ | 287 | VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \ |
286 | } \ | 288 | } \ |
287 | \ | 289 | \ |
288 | /* Kernel symbol table: Normal unused symbols */ \ | 290 | /* Kernel symbol table: Normal unused symbols */ \ |
289 | __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \ | 291 | __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \ |
290 | VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \ | 292 | VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \ |
291 | *(__ksymtab_unused) \ | 293 | *(SORT(___ksymtab_unused+*)) \ |
292 | VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \ | 294 | VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \ |
293 | } \ | 295 | } \ |
294 | \ | 296 | \ |
295 | /* Kernel symbol table: GPL-only unused symbols */ \ | 297 | /* Kernel symbol table: GPL-only unused symbols */ \ |
296 | __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \ | 298 | __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \ |
297 | VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \ | 299 | VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \ |
298 | *(__ksymtab_unused_gpl) \ | 300 | *(SORT(___ksymtab_unused_gpl+*)) \ |
299 | VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \ | 301 | VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \ |
300 | } \ | 302 | } \ |
301 | \ | 303 | \ |
302 | /* Kernel symbol table: GPL-future-only symbols */ \ | 304 | /* Kernel symbol table: GPL-future-only symbols */ \ |
303 | __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \ | 305 | __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \ |
304 | VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \ | 306 | VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \ |
305 | *(__ksymtab_gpl_future) \ | 307 | *(SORT(___ksymtab_gpl_future+*)) \ |
306 | VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \ | 308 | VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \ |
307 | } \ | 309 | } \ |
308 | \ | 310 | \ |
309 | /* Kernel symbol table: Normal symbols */ \ | 311 | /* Kernel symbol table: Normal symbols */ \ |
310 | __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \ | 312 | __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \ |
311 | VMLINUX_SYMBOL(__start___kcrctab) = .; \ | 313 | VMLINUX_SYMBOL(__start___kcrctab) = .; \ |
312 | *(__kcrctab) \ | 314 | *(SORT(___kcrctab+*)) \ |
313 | VMLINUX_SYMBOL(__stop___kcrctab) = .; \ | 315 | VMLINUX_SYMBOL(__stop___kcrctab) = .; \ |
314 | } \ | 316 | } \ |
315 | \ | 317 | \ |
316 | /* Kernel symbol table: GPL-only symbols */ \ | 318 | /* Kernel symbol table: GPL-only symbols */ \ |
317 | __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \ | 319 | __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \ |
318 | VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \ | 320 | VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \ |
319 | *(__kcrctab_gpl) \ | 321 | *(SORT(___kcrctab_gpl+*)) \ |
320 | VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \ | 322 | VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \ |
321 | } \ | 323 | } \ |
322 | \ | 324 | \ |
323 | /* Kernel symbol table: Normal unused symbols */ \ | 325 | /* Kernel symbol table: Normal unused symbols */ \ |
324 | __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \ | 326 | __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \ |
325 | VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \ | 327 | VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \ |
326 | *(__kcrctab_unused) \ | 328 | *(SORT(___kcrctab_unused+*)) \ |
327 | VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \ | 329 | VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \ |
328 | } \ | 330 | } \ |
329 | \ | 331 | \ |
330 | /* Kernel symbol table: GPL-only unused symbols */ \ | 332 | /* Kernel symbol table: GPL-only unused symbols */ \ |
331 | __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \ | 333 | __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \ |
332 | VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \ | 334 | VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \ |
333 | *(__kcrctab_unused_gpl) \ | 335 | *(SORT(___kcrctab_unused_gpl+*)) \ |
334 | VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \ | 336 | VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \ |
335 | } \ | 337 | } \ |
336 | \ | 338 | \ |
337 | /* Kernel symbol table: GPL-future-only symbols */ \ | 339 | /* Kernel symbol table: GPL-future-only symbols */ \ |
338 | __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \ | 340 | __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \ |
339 | VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \ | 341 | VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \ |
340 | *(__kcrctab_gpl_future) \ | 342 | *(SORT(___kcrctab_gpl_future+*)) \ |
341 | VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \ | 343 | VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \ |
342 | } \ | 344 | } \ |
343 | \ | 345 | \ |
@@ -589,14 +591,6 @@ | |||
589 | #define BUG_TABLE | 591 | #define BUG_TABLE |
590 | #endif | 592 | #endif |
591 | 593 | ||
592 | #define JUMP_TABLE \ | ||
593 | . = ALIGN(8); \ | ||
594 | __jump_table : AT(ADDR(__jump_table) - LOAD_OFFSET) { \ | ||
595 | VMLINUX_SYMBOL(__start___jump_table) = .; \ | ||
596 | *(__jump_table) \ | ||
597 | VMLINUX_SYMBOL(__stop___jump_table) = .; \ | ||
598 | } | ||
599 | |||
600 | #ifdef CONFIG_PM_TRACE | 594 | #ifdef CONFIG_PM_TRACE |
601 | #define TRACEDATA \ | 595 | #define TRACEDATA \ |
602 | . = ALIGN(4); \ | 596 | . = ALIGN(4); \ |
@@ -773,7 +767,7 @@ | |||
773 | * the sections that has this restriction (or similar) | 767 | * the sections that has this restriction (or similar) |
774 | * is located before the ones requiring PAGE_SIZE alignment. | 768 | * is located before the ones requiring PAGE_SIZE alignment. |
775 | * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which | 769 | * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which |
776 | * matches the requirment of PAGE_ALIGNED_DATA. | 770 | * matches the requirement of PAGE_ALIGNED_DATA. |
777 | * | 771 | * |
778 | * use 0 as page_align if page_aligned data is not used */ | 772 | * use 0 as page_align if page_aligned data is not used */ |
779 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ | 773 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ |
diff --git a/include/asm-generic/xor.h b/include/asm-generic/xor.h index aaab875e1a35..6028fb862254 100644 --- a/include/asm-generic/xor.h +++ b/include/asm-generic/xor.h | |||
@@ -13,7 +13,7 @@ | |||
13 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 13 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <asm/processor.h> | 16 | #include <linux/prefetch.h> |
17 | 17 | ||
18 | static void | 18 | static void |
19 | xor_8regs_2(unsigned long bytes, unsigned long *p1, unsigned long *p2) | 19 | xor_8regs_2(unsigned long bytes, unsigned long *p1, unsigned long *p2) |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index ad5770f2315c..202424d17ed7 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -95,7 +95,7 @@ struct drm_device; | |||
95 | * drm_core, drm_driver, drm_kms | 95 | * drm_core, drm_driver, drm_kms |
96 | * drm_core level can be used in the generic drm code. For example: | 96 | * drm_core level can be used in the generic drm code. For example: |
97 | * drm_ioctl, drm_mm, drm_memory | 97 | * drm_ioctl, drm_mm, drm_memory |
98 | * The macro definiton of DRM_DEBUG is used. | 98 | * The macro definition of DRM_DEBUG is used. |
99 | * DRM_DEBUG(fmt, args...) | 99 | * DRM_DEBUG(fmt, args...) |
100 | * The debug info by using the DRM_DEBUG can be obtained by adding | 100 | * The debug info by using the DRM_DEBUG can be obtained by adding |
101 | * the boot option of "drm.debug=1". | 101 | * the boot option of "drm.debug=1". |
@@ -808,7 +808,7 @@ struct drm_driver { | |||
808 | * | 808 | * |
809 | * \return Flags, or'ed together as follows: | 809 | * \return Flags, or'ed together as follows: |
810 | * | 810 | * |
811 | * DRM_SCANOUTPOS_VALID = Query successfull. | 811 | * DRM_SCANOUTPOS_VALID = Query successful. |
812 | * DRM_SCANOUTPOS_INVBL = Inside vblank. | 812 | * DRM_SCANOUTPOS_INVBL = Inside vblank. |
813 | * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of | 813 | * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of |
814 | * this flag means that returned position may be offset by a constant | 814 | * this flag means that returned position may be offset by a constant |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 60edf9be31e5..d94684b7ba34 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -65,7 +65,7 @@ enum drm_mode_status { | |||
65 | MODE_H_ILLEGAL, /* mode has illegal horizontal timings */ | 65 | MODE_H_ILLEGAL, /* mode has illegal horizontal timings */ |
66 | MODE_V_ILLEGAL, /* mode has illegal horizontal timings */ | 66 | MODE_V_ILLEGAL, /* mode has illegal horizontal timings */ |
67 | MODE_BAD_WIDTH, /* requires an unsupported linepitch */ | 67 | MODE_BAD_WIDTH, /* requires an unsupported linepitch */ |
68 | MODE_NOMODE, /* no mode with a maching name */ | 68 | MODE_NOMODE, /* no mode with a matching name */ |
69 | MODE_NO_INTERLACE, /* interlaced mode not supported */ | 69 | MODE_NO_INTERLACE, /* interlaced mode not supported */ |
70 | MODE_NO_DBLESCAN, /* doublescan mode not supported */ | 70 | MODE_NO_DBLESCAN, /* doublescan mode not supported */ |
71 | MODE_NO_VSCAN, /* multiscan mode not supported */ | 71 | MODE_NO_VSCAN, /* multiscan mode not supported */ |
@@ -321,7 +321,7 @@ struct drm_crtc_funcs { | |||
321 | 321 | ||
322 | /* | 322 | /* |
323 | * Flip to the given framebuffer. This implements the page | 323 | * Flip to the given framebuffer. This implements the page |
324 | * flip ioctl descibed in drm_mode.h, specifically, the | 324 | * flip ioctl described in drm_mode.h, specifically, the |
325 | * implementation must return immediately and block all | 325 | * implementation must return immediately and block all |
326 | * rendering to the current fb until the flip has completed. | 326 | * rendering to the current fb until the flip has completed. |
327 | * If userspace set the event flag in the ioctl, the event | 327 | * If userspace set the event flag in the ioctl, the event |
@@ -778,6 +778,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev, | |||
778 | void *data, struct drm_file *file_priv); | 778 | void *data, struct drm_file *file_priv); |
779 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, | 779 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, |
780 | void *data, struct drm_file *file_priv); | 780 | void *data, struct drm_file *file_priv); |
781 | extern u8 *drm_find_cea_extension(struct edid *edid); | ||
781 | extern bool drm_detect_hdmi_monitor(struct edid *edid); | 782 | extern bool drm_detect_hdmi_monitor(struct edid *edid); |
782 | extern bool drm_detect_monitor_audio(struct edid *edid); | 783 | extern bool drm_detect_monitor_audio(struct edid *edid); |
783 | extern int drm_mode_page_flip_ioctl(struct drm_device *dev, | 784 | extern int drm_mode_page_flip_ioctl(struct drm_device *dev, |
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index f22e7fe4b6db..c99c3d3e7811 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h | |||
@@ -118,6 +118,7 @@ int drm_fb_helper_setcolreg(unsigned regno, | |||
118 | unsigned transp, | 118 | unsigned transp, |
119 | struct fb_info *info); | 119 | struct fb_info *info); |
120 | 120 | ||
121 | bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper); | ||
121 | void drm_fb_helper_restore(void); | 122 | void drm_fb_helper_restore(void); |
122 | void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, | 123 | void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, |
123 | uint32_t fb_width, uint32_t fb_height); | 124 | uint32_t fb_width, uint32_t fb_height); |
@@ -126,7 +127,7 @@ void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, | |||
126 | 127 | ||
127 | int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); | 128 | int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); |
128 | 129 | ||
129 | bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper); | 130 | int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper); |
130 | bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel); | 131 | bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel); |
131 | int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper); | 132 | int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper); |
132 | int drm_fb_helper_debug_enter(struct fb_info *info); | 133 | int drm_fb_helper_debug_enter(struct fb_info *info); |
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index b1e7809e5e15..564b14aa7e16 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
@@ -56,7 +56,7 @@ struct drm_mm_node { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct drm_mm { | 58 | struct drm_mm { |
59 | /* List of all memory nodes that immediatly preceed a free hole. */ | 59 | /* List of all memory nodes that immediately precede a free hole. */ |
60 | struct list_head hole_stack; | 60 | struct list_head hole_stack; |
61 | /* head_node.node_list is the list of all memory nodes, ordered | 61 | /* head_node.node_list is the list of all memory nodes, ordered |
62 | * according to the (increasing) start address of the memory node. */ | 62 | * according to the (increasing) start address of the memory node. */ |
@@ -86,7 +86,7 @@ static inline bool drm_mm_initialized(struct drm_mm *mm) | |||
86 | } | 86 | } |
87 | #define drm_mm_for_each_node(entry, mm) list_for_each_entry(entry, \ | 87 | #define drm_mm_for_each_node(entry, mm) list_for_each_entry(entry, \ |
88 | &(mm)->head_node.node_list, \ | 88 | &(mm)->head_node.node_list, \ |
89 | node_list); | 89 | node_list) |
90 | #define drm_mm_for_each_scanned_node_reverse(entry, n, mm) \ | 90 | #define drm_mm_for_each_scanned_node_reverse(entry, n, mm) \ |
91 | for (entry = (mm)->prev_scanned_node, \ | 91 | for (entry = (mm)->prev_scanned_node, \ |
92 | next = entry ? list_entry(entry->node_list.next, \ | 92 | next = entry ? list_entry(entry->node_list.next, \ |
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index ae6b7a3dbec7..c4961ea50a49 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
@@ -277,7 +277,7 @@ struct drm_mode_mode_cmd { | |||
277 | #define DRM_MODE_CURSOR_MOVE (1<<1) | 277 | #define DRM_MODE_CURSOR_MOVE (1<<1) |
278 | 278 | ||
279 | /* | 279 | /* |
280 | * depending on the value in flags diffrent members are used. | 280 | * depending on the value in flags different members are used. |
281 | * | 281 | * |
282 | * CURSOR_BO uses | 282 | * CURSOR_BO uses |
283 | * crtc | 283 | * crtc |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 820ee9029482..f04b2a3b0f49 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -155,6 +155,7 @@ | |||
155 | {0x1002, 0x6719, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \ | 155 | {0x1002, 0x6719, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \ |
156 | {0x1002, 0x671c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \ | 156 | {0x1002, 0x671c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \ |
157 | {0x1002, 0x671d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \ | 157 | {0x1002, 0x671d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \ |
158 | {0x1002, 0x671f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \ | ||
158 | {0x1002, 0x6720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 159 | {0x1002, 0x6720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
159 | {0x1002, 0x6721, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 160 | {0x1002, 0x6721, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
160 | {0x1002, 0x6722, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ | 161 | {0x1002, 0x6722, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ |
@@ -167,6 +168,7 @@ | |||
167 | {0x1002, 0x6729, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ | 168 | {0x1002, 0x6729, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ |
168 | {0x1002, 0x6738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ | 169 | {0x1002, 0x6738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ |
169 | {0x1002, 0x6739, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ | 170 | {0x1002, 0x6739, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ |
171 | {0x1002, 0x673e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \ | ||
170 | {0x1002, 0x6740, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 172 | {0x1002, 0x6740, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
171 | {0x1002, 0x6741, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 173 | {0x1002, 0x6741, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
172 | {0x1002, 0x6742, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 174 | {0x1002, 0x6742, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
@@ -199,6 +201,7 @@ | |||
199 | {0x1002, 0x688D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 201 | {0x1002, 0x688D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
200 | {0x1002, 0x6898, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 202 | {0x1002, 0x6898, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
201 | {0x1002, 0x6899, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 203 | {0x1002, 0x6899, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
204 | {0x1002, 0x689b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
202 | {0x1002, 0x689c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ | 205 | {0x1002, 0x689c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ |
203 | {0x1002, 0x689d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ | 206 | {0x1002, 0x689d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ |
204 | {0x1002, 0x689e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | 207 | {0x1002, 0x689e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ |
@@ -209,7 +212,9 @@ | |||
209 | {0x1002, 0x68b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 212 | {0x1002, 0x68b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
210 | {0x1002, 0x68b8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | 213 | {0x1002, 0x68b8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ |
211 | {0x1002, 0x68b9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | 214 | {0x1002, 0x68b9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ |
215 | {0x1002, 0x68ba, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
212 | {0x1002, 0x68be, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | 216 | {0x1002, 0x68be, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ |
217 | {0x1002, 0x68bf, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
213 | {0x1002, 0x68c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 218 | {0x1002, 0x68c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
214 | {0x1002, 0x68c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 219 | {0x1002, 0x68c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
215 | {0x1002, 0x68c7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 220 | {0x1002, 0x68c7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
@@ -472,6 +477,8 @@ | |||
472 | {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 477 | {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
473 | {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 478 | {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
474 | {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 479 | {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
480 | {0x1002, 0x9806, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
481 | {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
475 | {0, 0, 0} | 482 | {0, 0, 0} |
476 | 483 | ||
477 | #define r128_PCI_IDS \ | 484 | #define r128_PCI_IDS \ |
diff --git a/include/drm/mga_drm.h b/include/drm/mga_drm.h index c16097f99be0..fca817009e13 100644 --- a/include/drm/mga_drm.h +++ b/include/drm/mga_drm.h | |||
@@ -107,7 +107,7 @@ | |||
107 | */ | 107 | */ |
108 | #define MGA_NR_SAREA_CLIPRECTS 8 | 108 | #define MGA_NR_SAREA_CLIPRECTS 8 |
109 | 109 | ||
110 | /* 2 heaps (1 for card, 1 for agp), each divided into upto 128 | 110 | /* 2 heaps (1 for card, 1 for agp), each divided into up to 128 |
111 | * regions, subject to a minimum region size of (1<<16) == 64k. | 111 | * regions, subject to a minimum region size of (1<<16) == 64k. |
112 | * | 112 | * |
113 | * Clients may subdivide regions internally, but when sharing between | 113 | * Clients may subdivide regions internally, but when sharing between |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 3dec41cf8342..787f7b6fd622 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -641,7 +641,7 @@ typedef struct drm_radeon_vertex2 { | |||
641 | } drm_radeon_vertex2_t; | 641 | } drm_radeon_vertex2_t; |
642 | 642 | ||
643 | /* v1.3 - obsoletes drm_radeon_vertex2 | 643 | /* v1.3 - obsoletes drm_radeon_vertex2 |
644 | * - allows arbitarily large cliprect list | 644 | * - allows arbitrarily large cliprect list |
645 | * - allows updating of tcl packet, vector and scalar state | 645 | * - allows updating of tcl packet, vector and scalar state |
646 | * - allows memory-efficient description of state updates | 646 | * - allows memory-efficient description of state updates |
647 | * - allows state to be emitted without a primitive | 647 | * - allows state to be emitted without a primitive |
@@ -909,6 +909,8 @@ struct drm_radeon_cs { | |||
909 | #define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */ | 909 | #define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */ |
910 | #define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */ | 910 | #define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */ |
911 | #define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */ | 911 | #define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */ |
912 | #define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */ | ||
913 | #define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */ | ||
912 | 914 | ||
913 | struct drm_radeon_info { | 915 | struct drm_radeon_info { |
914 | uint32_t request; | 916 | uint32_t request; |
diff --git a/include/drm/savage_drm.h b/include/drm/savage_drm.h index 4863cf6bf96f..818d49be2e6e 100644 --- a/include/drm/savage_drm.h +++ b/include/drm/savage_drm.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #ifndef __SAVAGE_SAREA_DEFINES__ | 29 | #ifndef __SAVAGE_SAREA_DEFINES__ |
30 | #define __SAVAGE_SAREA_DEFINES__ | 30 | #define __SAVAGE_SAREA_DEFINES__ |
31 | 31 | ||
32 | /* 2 heaps (1 for card, 1 for agp), each divided into upto 128 | 32 | /* 2 heaps (1 for card, 1 for agp), each divided into up to 128 |
33 | * regions, subject to a minimum region size of (1<<16) == 64k. | 33 | * regions, subject to a minimum region size of (1<<16) == 64k. |
34 | * | 34 | * |
35 | * Clients may subdivide regions internally, but when sharing between | 35 | * Clients may subdivide regions internally, but when sharing between |
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 50852aad260a..62a0e4c4ceee 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -50,10 +50,10 @@ struct drm_mm_node; | |||
50 | * | 50 | * |
51 | * @fpfn: first valid page frame number to put the object | 51 | * @fpfn: first valid page frame number to put the object |
52 | * @lpfn: last valid page frame number to put the object | 52 | * @lpfn: last valid page frame number to put the object |
53 | * @num_placement: number of prefered placements | 53 | * @num_placement: number of preferred placements |
54 | * @placement: prefered placements | 54 | * @placement: preferred placements |
55 | * @num_busy_placement: number of prefered placements when need to evict buffer | 55 | * @num_busy_placement: number of preferred placements when need to evict buffer |
56 | * @busy_placement: prefered placements when need to evict buffer | 56 | * @busy_placement: preferred placements when need to evict buffer |
57 | * | 57 | * |
58 | * Structure indicating the placement you request for an object. | 58 | * Structure indicating the placement you request for an object. |
59 | */ | 59 | */ |
@@ -158,9 +158,9 @@ struct ttm_tt; | |||
158 | * the object is destroyed. | 158 | * the object is destroyed. |
159 | * @event_queue: Queue for processes waiting on buffer object status change. | 159 | * @event_queue: Queue for processes waiting on buffer object status change. |
160 | * @mem: structure describing current placement. | 160 | * @mem: structure describing current placement. |
161 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 161 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
162 | * pinned in physical memory. If this behaviour is not desired, this member | 162 | * pinned in physical memory. If this behaviour is not desired, this member |
163 | * holds a pointer to a persistant shmem object. | 163 | * holds a pointer to a persistent shmem object. |
164 | * @ttm: TTM structure holding system pages. | 164 | * @ttm: TTM structure holding system pages. |
165 | * @evicted: Whether the object was evicted without user-space knowing. | 165 | * @evicted: Whether the object was evicted without user-space knowing. |
166 | * @cpu_writes: For synchronization. Number of cpu writers. | 166 | * @cpu_writes: For synchronization. Number of cpu writers. |
@@ -221,7 +221,7 @@ struct ttm_buffer_object { | |||
221 | */ | 221 | */ |
222 | 222 | ||
223 | struct ttm_mem_reg mem; | 223 | struct ttm_mem_reg mem; |
224 | struct file *persistant_swap_storage; | 224 | struct file *persistent_swap_storage; |
225 | struct ttm_tt *ttm; | 225 | struct ttm_tt *ttm; |
226 | bool evicted; | 226 | bool evicted; |
227 | 227 | ||
@@ -459,9 +459,9 @@ extern void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo); | |||
459 | * user buffer object. | 459 | * user buffer object. |
460 | * @interruptible: If needing to sleep to wait for GPU resources, | 460 | * @interruptible: If needing to sleep to wait for GPU resources, |
461 | * sleep interruptible. | 461 | * sleep interruptible. |
462 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 462 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
463 | * pinned in physical memory. If this behaviour is not desired, this member | 463 | * pinned in physical memory. If this behaviour is not desired, this member |
464 | * holds a pointer to a persistant shmem object. Typically, this would | 464 | * holds a pointer to a persistent shmem object. Typically, this would |
465 | * point to the shmem object backing a GEM object if TTM is used to back a | 465 | * point to the shmem object backing a GEM object if TTM is used to back a |
466 | * GEM user interface. | 466 | * GEM user interface. |
467 | * @acc_size: Accounted size for this object. | 467 | * @acc_size: Accounted size for this object. |
@@ -490,7 +490,7 @@ extern int ttm_bo_init(struct ttm_bo_device *bdev, | |||
490 | uint32_t page_alignment, | 490 | uint32_t page_alignment, |
491 | unsigned long buffer_start, | 491 | unsigned long buffer_start, |
492 | bool interrubtible, | 492 | bool interrubtible, |
493 | struct file *persistant_swap_storage, | 493 | struct file *persistent_swap_storage, |
494 | size_t acc_size, | 494 | size_t acc_size, |
495 | void (*destroy) (struct ttm_buffer_object *)); | 495 | void (*destroy) (struct ttm_buffer_object *)); |
496 | /** | 496 | /** |
@@ -506,9 +506,9 @@ extern int ttm_bo_init(struct ttm_bo_device *bdev, | |||
506 | * user buffer object. | 506 | * user buffer object. |
507 | * @interruptible: If needing to sleep while waiting for GPU resources, | 507 | * @interruptible: If needing to sleep while waiting for GPU resources, |
508 | * sleep interruptible. | 508 | * sleep interruptible. |
509 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 509 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
510 | * pinned in physical memory. If this behaviour is not desired, this member | 510 | * pinned in physical memory. If this behaviour is not desired, this member |
511 | * holds a pointer to a persistant shmem object. Typically, this would | 511 | * holds a pointer to a persistent shmem object. Typically, this would |
512 | * point to the shmem object backing a GEM object if TTM is used to back a | 512 | * point to the shmem object backing a GEM object if TTM is used to back a |
513 | * GEM user interface. | 513 | * GEM user interface. |
514 | * @p_bo: On successful completion *p_bo points to the created object. | 514 | * @p_bo: On successful completion *p_bo points to the created object. |
@@ -528,7 +528,7 @@ extern int ttm_bo_create(struct ttm_bo_device *bdev, | |||
528 | uint32_t page_alignment, | 528 | uint32_t page_alignment, |
529 | unsigned long buffer_start, | 529 | unsigned long buffer_start, |
530 | bool interruptible, | 530 | bool interruptible, |
531 | struct file *persistant_swap_storage, | 531 | struct file *persistent_swap_storage, |
532 | struct ttm_buffer_object **p_bo); | 532 | struct ttm_buffer_object **p_bo); |
533 | 533 | ||
534 | /** | 534 | /** |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index efed0820d9fa..09af2d746d1c 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -122,7 +122,7 @@ struct ttm_backend { | |||
122 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) | 122 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) |
123 | #define TTM_PAGE_FLAG_WRITE (1 << 3) | 123 | #define TTM_PAGE_FLAG_WRITE (1 << 3) |
124 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) | 124 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) |
125 | #define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) | 125 | #define TTM_PAGE_FLAG_PERSISTENT_SWAP (1 << 5) |
126 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) | 126 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) |
127 | #define TTM_PAGE_FLAG_DMA32 (1 << 7) | 127 | #define TTM_PAGE_FLAG_DMA32 (1 << 7) |
128 | 128 | ||
@@ -223,9 +223,9 @@ struct ttm_mem_type_manager_func { | |||
223 | * @mem::mm_node should be set to a non-null value, and | 223 | * @mem::mm_node should be set to a non-null value, and |
224 | * @mem::start should be set to a value identifying the beginning | 224 | * @mem::start should be set to a value identifying the beginning |
225 | * of the range allocated, and the function should return zero. | 225 | * of the range allocated, and the function should return zero. |
226 | * If the memory region accomodate the buffer object, @mem::mm_node | 226 | * If the memory region accommodate the buffer object, @mem::mm_node |
227 | * should be set to NULL, and the function should return 0. | 227 | * should be set to NULL, and the function should return 0. |
228 | * If a system error occured, preventing the request to be fulfilled, | 228 | * If a system error occurred, preventing the request to be fulfilled, |
229 | * the function should return a negative error code. | 229 | * the function should return a negative error code. |
230 | * | 230 | * |
231 | * Note that @mem::mm_node will only be dereferenced by | 231 | * Note that @mem::mm_node will only be dereferenced by |
@@ -714,7 +714,7 @@ extern void ttm_tt_cache_flush(struct page *pages[], unsigned long num_pages); | |||
714 | */ | 714 | */ |
715 | extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement); | 715 | extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement); |
716 | extern int ttm_tt_swapout(struct ttm_tt *ttm, | 716 | extern int ttm_tt_swapout(struct ttm_tt *ttm, |
717 | struct file *persistant_swap_storage); | 717 | struct file *persistent_swap_storage); |
718 | 718 | ||
719 | /* | 719 | /* |
720 | * ttm_bo.c | 720 | * ttm_bo.c |
@@ -841,7 +841,7 @@ extern void ttm_mem_io_unlock(struct ttm_mem_type_manager *man); | |||
841 | * different order, either by will or as a result of a buffer being evicted | 841 | * different order, either by will or as a result of a buffer being evicted |
842 | * to make room for a buffer already reserved. (Buffers are reserved before | 842 | * to make room for a buffer already reserved. (Buffers are reserved before |
843 | * they are evicted). The following algorithm prevents such deadlocks from | 843 | * they are evicted). The following algorithm prevents such deadlocks from |
844 | * occuring: | 844 | * occurring: |
845 | * 1) Buffers are reserved with the lru spinlock held. Upon successful | 845 | * 1) Buffers are reserved with the lru spinlock held. Upon successful |
846 | * reservation they are removed from the lru list. This stops a reserved buffer | 846 | * reservation they are removed from the lru list. This stops a reserved buffer |
847 | * from being evicted. However the lru spinlock is released between the time | 847 | * from being evicted. However the lru spinlock is released between the time |
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h index 650e6bf6f69f..5c36432d9ce5 100644 --- a/include/drm/vmwgfx_drm.h +++ b/include/drm/vmwgfx_drm.h | |||
@@ -592,7 +592,7 @@ struct drm_vmw_stream_arg { | |||
592 | /** | 592 | /** |
593 | * DRM_VMW_UPDATE_LAYOUT - Update layout | 593 | * DRM_VMW_UPDATE_LAYOUT - Update layout |
594 | * | 594 | * |
595 | * Updates the prefered modes and connection status for connectors. The | 595 | * Updates the preferred modes and connection status for connectors. The |
596 | * command conisits of one drm_vmw_update_layout_arg pointing out a array | 596 | * command conisits of one drm_vmw_update_layout_arg pointing out a array |
597 | * of num_outputs drm_vmw_rect's. | 597 | * of num_outputs drm_vmw_rect's. |
598 | */ | 598 | */ |
diff --git a/include/keys/ceph-type.h b/include/keys/ceph-type.h new file mode 100644 index 000000000000..f69c4ac197a0 --- /dev/null +++ b/include/keys/ceph-type.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _KEYS_CEPH_TYPE_H | ||
2 | #define _KEYS_CEPH_TYPE_H | ||
3 | |||
4 | #include <linux/key.h> | ||
5 | |||
6 | extern struct key_type key_type_ceph; | ||
7 | |||
8 | #endif | ||
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h new file mode 100644 index 000000000000..c5d6095b46f8 --- /dev/null +++ b/include/linux/alarmtimer.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _LINUX_ALARMTIMER_H | ||
2 | #define _LINUX_ALARMTIMER_H | ||
3 | |||
4 | #include <linux/time.h> | ||
5 | #include <linux/hrtimer.h> | ||
6 | #include <linux/timerqueue.h> | ||
7 | #include <linux/rtc.h> | ||
8 | |||
9 | enum alarmtimer_type { | ||
10 | ALARM_REALTIME, | ||
11 | ALARM_BOOTTIME, | ||
12 | |||
13 | ALARM_NUMTYPE, | ||
14 | }; | ||
15 | |||
16 | /** | ||
17 | * struct alarm - Alarm timer structure | ||
18 | * @node: timerqueue node for adding to the event list this value | ||
19 | * also includes the expiration time. | ||
20 | * @period: Period for recuring alarms | ||
21 | * @function: Function pointer to be executed when the timer fires. | ||
22 | * @type: Alarm type (BOOTTIME/REALTIME) | ||
23 | * @enabled: Flag that represents if the alarm is set to fire or not | ||
24 | * @data: Internal data value. | ||
25 | */ | ||
26 | struct alarm { | ||
27 | struct timerqueue_node node; | ||
28 | ktime_t period; | ||
29 | void (*function)(struct alarm *); | ||
30 | enum alarmtimer_type type; | ||
31 | bool enabled; | ||
32 | void *data; | ||
33 | }; | ||
34 | |||
35 | void alarm_init(struct alarm *alarm, enum alarmtimer_type type, | ||
36 | void (*function)(struct alarm *)); | ||
37 | void alarm_start(struct alarm *alarm, ktime_t start, ktime_t period); | ||
38 | void alarm_cancel(struct alarm *alarm); | ||
39 | |||
40 | #endif | ||
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 24d26efd1432..e82e3ee2c54a 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
@@ -136,7 +136,7 @@ struct clcd_board { | |||
136 | int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var); | 136 | int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var); |
137 | 137 | ||
138 | /* | 138 | /* |
139 | * Compulsary. Decode fb->fb.var into regs->*. In the case of | 139 | * Compulsory. Decode fb->fb.var into regs->*. In the case of |
140 | * fixed timing, set regs->* to the register values required. | 140 | * fixed timing, set regs->* to the register values required. |
141 | */ | 141 | */ |
142 | void (*decode)(struct clcd_fb *fb, struct clcd_regs *regs); | 142 | void (*decode)(struct clcd_fb *fb, struct clcd_regs *regs); |
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h index f60227088b7b..21114810c7c0 100644 --- a/include/linux/amba/mmci.h +++ b/include/linux/amba/mmci.h | |||
@@ -30,15 +30,15 @@ struct dma_chan; | |||
30 | * @cd_invert: true if the gpio_cd pin value is active low | 30 | * @cd_invert: true if the gpio_cd pin value is active low |
31 | * @capabilities: the capabilities of the block as implemented in | 31 | * @capabilities: the capabilities of the block as implemented in |
32 | * this platform, signify anything MMC_CAP_* from mmc/host.h | 32 | * this platform, signify anything MMC_CAP_* from mmc/host.h |
33 | * @dma_filter: function used to select an apropriate RX and TX | 33 | * @dma_filter: function used to select an appropriate RX and TX |
34 | * DMA channel to be used for DMA, if and only if you're deploying the | 34 | * DMA channel to be used for DMA, if and only if you're deploying the |
35 | * generic DMA engine | 35 | * generic DMA engine |
36 | * @dma_rx_param: parameter passed to the DMA allocation | 36 | * @dma_rx_param: parameter passed to the DMA allocation |
37 | * filter in order to select an apropriate RX channel. If | 37 | * filter in order to select an appropriate RX channel. If |
38 | * there is a bidirectional RX+TX channel, then just specify | 38 | * there is a bidirectional RX+TX channel, then just specify |
39 | * this and leave dma_tx_param set to NULL | 39 | * this and leave dma_tx_param set to NULL |
40 | * @dma_tx_param: parameter passed to the DMA allocation | 40 | * @dma_tx_param: parameter passed to the DMA allocation |
41 | * filter in order to select an apropriate TX channel. If this | 41 | * filter in order to select an appropriate TX channel. If this |
42 | * is NULL the driver will attempt to use the RX channel as a | 42 | * is NULL the driver will attempt to use the RX channel as a |
43 | * bidirectional channel | 43 | * bidirectional channel |
44 | */ | 44 | */ |
diff --git a/include/linux/ath9k_platform.h b/include/linux/ath9k_platform.h index b847fc7b93f9..60a7c49dcb49 100644 --- a/include/linux/ath9k_platform.h +++ b/include/linux/ath9k_platform.h | |||
@@ -23,6 +23,13 @@ | |||
23 | 23 | ||
24 | struct ath9k_platform_data { | 24 | struct ath9k_platform_data { |
25 | u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; | 25 | u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; |
26 | u8 *macaddr; | ||
27 | |||
28 | int led_pin; | ||
29 | u32 gpio_mask; | ||
30 | u32 gpio_val; | ||
31 | |||
32 | bool is_clk_25mhz; | ||
26 | }; | 33 | }; |
27 | 34 | ||
28 | #endif /* _LINUX_ATH9K_PLATFORM_H */ | 35 | #endif /* _LINUX_ATH9K_PLATFORM_H */ |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 475f8c42c0e9..381f4cec8260 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -443,6 +443,7 @@ void atm_dev_signal_change(struct atm_dev *dev, char signal); | |||
443 | 443 | ||
444 | void vcc_insert_socket(struct sock *sk); | 444 | void vcc_insert_socket(struct sock *sk); |
445 | 445 | ||
446 | void atm_dev_release_vccs(struct atm_dev *dev); | ||
446 | 447 | ||
447 | /* | 448 | /* |
448 | * This is approximately the algorithm used by alloc_skb. | 449 | * This is approximately the algorithm used by alloc_skb. |
diff --git a/include/linux/bch.h b/include/linux/bch.h new file mode 100644 index 000000000000..295b4ef153bb --- /dev/null +++ b/include/linux/bch.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * Generic binary BCH encoding/decoding library | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License version 2 as published by | ||
6 | * the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | * Copyright © 2011 Parrot S.A. | ||
18 | * | ||
19 | * Author: Ivan Djelic <ivan.djelic@parrot.com> | ||
20 | * | ||
21 | * Description: | ||
22 | * | ||
23 | * This library provides runtime configurable encoding/decoding of binary | ||
24 | * Bose-Chaudhuri-Hocquenghem (BCH) codes. | ||
25 | */ | ||
26 | #ifndef _BCH_H | ||
27 | #define _BCH_H | ||
28 | |||
29 | #include <linux/types.h> | ||
30 | |||
31 | /** | ||
32 | * struct bch_control - BCH control structure | ||
33 | * @m: Galois field order | ||
34 | * @n: maximum codeword size in bits (= 2^m-1) | ||
35 | * @t: error correction capability in bits | ||
36 | * @ecc_bits: ecc exact size in bits, i.e. generator polynomial degree (<=m*t) | ||
37 | * @ecc_bytes: ecc max size (m*t bits) in bytes | ||
38 | * @a_pow_tab: Galois field GF(2^m) exponentiation lookup table | ||
39 | * @a_log_tab: Galois field GF(2^m) log lookup table | ||
40 | * @mod8_tab: remainder generator polynomial lookup tables | ||
41 | * @ecc_buf: ecc parity words buffer | ||
42 | * @ecc_buf2: ecc parity words buffer | ||
43 | * @xi_tab: GF(2^m) base for solving degree 2 polynomial roots | ||
44 | * @syn: syndrome buffer | ||
45 | * @cache: log-based polynomial representation buffer | ||
46 | * @elp: error locator polynomial | ||
47 | * @poly_2t: temporary polynomials of degree 2t | ||
48 | */ | ||
49 | struct bch_control { | ||
50 | unsigned int m; | ||
51 | unsigned int n; | ||
52 | unsigned int t; | ||
53 | unsigned int ecc_bits; | ||
54 | unsigned int ecc_bytes; | ||
55 | /* private: */ | ||
56 | uint16_t *a_pow_tab; | ||
57 | uint16_t *a_log_tab; | ||
58 | uint32_t *mod8_tab; | ||
59 | uint32_t *ecc_buf; | ||
60 | uint32_t *ecc_buf2; | ||
61 | unsigned int *xi_tab; | ||
62 | unsigned int *syn; | ||
63 | int *cache; | ||
64 | struct gf_poly *elp; | ||
65 | struct gf_poly *poly_2t[4]; | ||
66 | }; | ||
67 | |||
68 | struct bch_control *init_bch(int m, int t, unsigned int prim_poly); | ||
69 | |||
70 | void free_bch(struct bch_control *bch); | ||
71 | |||
72 | void encode_bch(struct bch_control *bch, const uint8_t *data, | ||
73 | unsigned int len, uint8_t *ecc); | ||
74 | |||
75 | int decode_bch(struct bch_control *bch, const uint8_t *data, unsigned int len, | ||
76 | const uint8_t *recv_ecc, const uint8_t *calc_ecc, | ||
77 | const unsigned int *syn, unsigned int *errloc); | ||
78 | |||
79 | #endif /* _BCH_H */ | ||
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h new file mode 100644 index 000000000000..08763e4e848f --- /dev/null +++ b/include/linux/bcma/bcma.h | |||
@@ -0,0 +1,224 @@ | |||
1 | #ifndef LINUX_BCMA_H_ | ||
2 | #define LINUX_BCMA_H_ | ||
3 | |||
4 | #include <linux/pci.h> | ||
5 | #include <linux/mod_devicetable.h> | ||
6 | |||
7 | #include <linux/bcma/bcma_driver_chipcommon.h> | ||
8 | #include <linux/bcma/bcma_driver_pci.h> | ||
9 | |||
10 | #include "bcma_regs.h" | ||
11 | |||
12 | struct bcma_device; | ||
13 | struct bcma_bus; | ||
14 | |||
15 | enum bcma_hosttype { | ||
16 | BCMA_HOSTTYPE_NONE, | ||
17 | BCMA_HOSTTYPE_PCI, | ||
18 | BCMA_HOSTTYPE_SDIO, | ||
19 | }; | ||
20 | |||
21 | struct bcma_chipinfo { | ||
22 | u16 id; | ||
23 | u8 rev; | ||
24 | u8 pkg; | ||
25 | }; | ||
26 | |||
27 | struct bcma_host_ops { | ||
28 | u8 (*read8)(struct bcma_device *core, u16 offset); | ||
29 | u16 (*read16)(struct bcma_device *core, u16 offset); | ||
30 | u32 (*read32)(struct bcma_device *core, u16 offset); | ||
31 | void (*write8)(struct bcma_device *core, u16 offset, u8 value); | ||
32 | void (*write16)(struct bcma_device *core, u16 offset, u16 value); | ||
33 | void (*write32)(struct bcma_device *core, u16 offset, u32 value); | ||
34 | /* Agent ops */ | ||
35 | u32 (*aread32)(struct bcma_device *core, u16 offset); | ||
36 | void (*awrite32)(struct bcma_device *core, u16 offset, u32 value); | ||
37 | }; | ||
38 | |||
39 | /* Core manufacturers */ | ||
40 | #define BCMA_MANUF_ARM 0x43B | ||
41 | #define BCMA_MANUF_MIPS 0x4A7 | ||
42 | #define BCMA_MANUF_BCM 0x4BF | ||
43 | |||
44 | /* Core class values. */ | ||
45 | #define BCMA_CL_SIM 0x0 | ||
46 | #define BCMA_CL_EROM 0x1 | ||
47 | #define BCMA_CL_CORESIGHT 0x9 | ||
48 | #define BCMA_CL_VERIF 0xB | ||
49 | #define BCMA_CL_OPTIMO 0xD | ||
50 | #define BCMA_CL_GEN 0xE | ||
51 | #define BCMA_CL_PRIMECELL 0xF | ||
52 | |||
53 | /* Core-ID values. */ | ||
54 | #define BCMA_CORE_OOB_ROUTER 0x367 /* Out of band */ | ||
55 | #define BCMA_CORE_INVALID 0x700 | ||
56 | #define BCMA_CORE_CHIPCOMMON 0x800 | ||
57 | #define BCMA_CORE_ILINE20 0x801 | ||
58 | #define BCMA_CORE_SRAM 0x802 | ||
59 | #define BCMA_CORE_SDRAM 0x803 | ||
60 | #define BCMA_CORE_PCI 0x804 | ||
61 | #define BCMA_CORE_MIPS 0x805 | ||
62 | #define BCMA_CORE_ETHERNET 0x806 | ||
63 | #define BCMA_CORE_V90 0x807 | ||
64 | #define BCMA_CORE_USB11_HOSTDEV 0x808 | ||
65 | #define BCMA_CORE_ADSL 0x809 | ||
66 | #define BCMA_CORE_ILINE100 0x80A | ||
67 | #define BCMA_CORE_IPSEC 0x80B | ||
68 | #define BCMA_CORE_UTOPIA 0x80C | ||
69 | #define BCMA_CORE_PCMCIA 0x80D | ||
70 | #define BCMA_CORE_INTERNAL_MEM 0x80E | ||
71 | #define BCMA_CORE_MEMC_SDRAM 0x80F | ||
72 | #define BCMA_CORE_OFDM 0x810 | ||
73 | #define BCMA_CORE_EXTIF 0x811 | ||
74 | #define BCMA_CORE_80211 0x812 | ||
75 | #define BCMA_CORE_PHY_A 0x813 | ||
76 | #define BCMA_CORE_PHY_B 0x814 | ||
77 | #define BCMA_CORE_PHY_G 0x815 | ||
78 | #define BCMA_CORE_MIPS_3302 0x816 | ||
79 | #define BCMA_CORE_USB11_HOST 0x817 | ||
80 | #define BCMA_CORE_USB11_DEV 0x818 | ||
81 | #define BCMA_CORE_USB20_HOST 0x819 | ||
82 | #define BCMA_CORE_USB20_DEV 0x81A | ||
83 | #define BCMA_CORE_SDIO_HOST 0x81B | ||
84 | #define BCMA_CORE_ROBOSWITCH 0x81C | ||
85 | #define BCMA_CORE_PARA_ATA 0x81D | ||
86 | #define BCMA_CORE_SATA_XORDMA 0x81E | ||
87 | #define BCMA_CORE_ETHERNET_GBIT 0x81F | ||
88 | #define BCMA_CORE_PCIE 0x820 | ||
89 | #define BCMA_CORE_PHY_N 0x821 | ||
90 | #define BCMA_CORE_SRAM_CTL 0x822 | ||
91 | #define BCMA_CORE_MINI_MACPHY 0x823 | ||
92 | #define BCMA_CORE_ARM_1176 0x824 | ||
93 | #define BCMA_CORE_ARM_7TDMI 0x825 | ||
94 | #define BCMA_CORE_PHY_LP 0x826 | ||
95 | #define BCMA_CORE_PMU 0x827 | ||
96 | #define BCMA_CORE_PHY_SSN 0x828 | ||
97 | #define BCMA_CORE_SDIO_DEV 0x829 | ||
98 | #define BCMA_CORE_ARM_CM3 0x82A | ||
99 | #define BCMA_CORE_PHY_HT 0x82B | ||
100 | #define BCMA_CORE_MIPS_74K 0x82C | ||
101 | #define BCMA_CORE_MAC_GBIT 0x82D | ||
102 | #define BCMA_CORE_DDR12_MEM_CTL 0x82E | ||
103 | #define BCMA_CORE_PCIE_RC 0x82F /* PCIe Root Complex */ | ||
104 | #define BCMA_CORE_OCP_OCP_BRIDGE 0x830 | ||
105 | #define BCMA_CORE_SHARED_COMMON 0x831 | ||
106 | #define BCMA_CORE_OCP_AHB_BRIDGE 0x832 | ||
107 | #define BCMA_CORE_SPI_HOST 0x833 | ||
108 | #define BCMA_CORE_I2S 0x834 | ||
109 | #define BCMA_CORE_SDR_DDR1_MEM_CTL 0x835 /* SDR/DDR1 memory controller core */ | ||
110 | #define BCMA_CORE_SHIM 0x837 /* SHIM component in ubus/6362 */ | ||
111 | #define BCMA_CORE_DEFAULT 0xFFF | ||
112 | |||
113 | #define BCMA_MAX_NR_CORES 16 | ||
114 | |||
115 | struct bcma_device { | ||
116 | struct bcma_bus *bus; | ||
117 | struct bcma_device_id id; | ||
118 | |||
119 | struct device dev; | ||
120 | bool dev_registered; | ||
121 | |||
122 | u8 core_index; | ||
123 | |||
124 | u32 addr; | ||
125 | u32 wrap; | ||
126 | |||
127 | void *drvdata; | ||
128 | struct list_head list; | ||
129 | }; | ||
130 | |||
131 | static inline void *bcma_get_drvdata(struct bcma_device *core) | ||
132 | { | ||
133 | return core->drvdata; | ||
134 | } | ||
135 | static inline void bcma_set_drvdata(struct bcma_device *core, void *drvdata) | ||
136 | { | ||
137 | core->drvdata = drvdata; | ||
138 | } | ||
139 | |||
140 | struct bcma_driver { | ||
141 | const char *name; | ||
142 | const struct bcma_device_id *id_table; | ||
143 | |||
144 | int (*probe)(struct bcma_device *dev); | ||
145 | void (*remove)(struct bcma_device *dev); | ||
146 | int (*suspend)(struct bcma_device *dev, pm_message_t state); | ||
147 | int (*resume)(struct bcma_device *dev); | ||
148 | void (*shutdown)(struct bcma_device *dev); | ||
149 | |||
150 | struct device_driver drv; | ||
151 | }; | ||
152 | extern | ||
153 | int __bcma_driver_register(struct bcma_driver *drv, struct module *owner); | ||
154 | static inline int bcma_driver_register(struct bcma_driver *drv) | ||
155 | { | ||
156 | return __bcma_driver_register(drv, THIS_MODULE); | ||
157 | } | ||
158 | extern void bcma_driver_unregister(struct bcma_driver *drv); | ||
159 | |||
160 | struct bcma_bus { | ||
161 | /* The MMIO area. */ | ||
162 | void __iomem *mmio; | ||
163 | |||
164 | const struct bcma_host_ops *ops; | ||
165 | |||
166 | enum bcma_hosttype hosttype; | ||
167 | union { | ||
168 | /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */ | ||
169 | struct pci_dev *host_pci; | ||
170 | /* Pointer to the SDIO device (only for BCMA_HOSTTYPE_SDIO) */ | ||
171 | struct sdio_func *host_sdio; | ||
172 | }; | ||
173 | |||
174 | struct bcma_chipinfo chipinfo; | ||
175 | |||
176 | struct bcma_device *mapped_core; | ||
177 | struct list_head cores; | ||
178 | u8 nr_cores; | ||
179 | |||
180 | struct bcma_drv_cc drv_cc; | ||
181 | struct bcma_drv_pci drv_pci; | ||
182 | }; | ||
183 | |||
184 | extern inline u32 bcma_read8(struct bcma_device *core, u16 offset) | ||
185 | { | ||
186 | return core->bus->ops->read8(core, offset); | ||
187 | } | ||
188 | extern inline u32 bcma_read16(struct bcma_device *core, u16 offset) | ||
189 | { | ||
190 | return core->bus->ops->read16(core, offset); | ||
191 | } | ||
192 | extern inline u32 bcma_read32(struct bcma_device *core, u16 offset) | ||
193 | { | ||
194 | return core->bus->ops->read32(core, offset); | ||
195 | } | ||
196 | extern inline | ||
197 | void bcma_write8(struct bcma_device *core, u16 offset, u32 value) | ||
198 | { | ||
199 | core->bus->ops->write8(core, offset, value); | ||
200 | } | ||
201 | extern inline | ||
202 | void bcma_write16(struct bcma_device *core, u16 offset, u32 value) | ||
203 | { | ||
204 | core->bus->ops->write16(core, offset, value); | ||
205 | } | ||
206 | extern inline | ||
207 | void bcma_write32(struct bcma_device *core, u16 offset, u32 value) | ||
208 | { | ||
209 | core->bus->ops->write32(core, offset, value); | ||
210 | } | ||
211 | extern inline u32 bcma_aread32(struct bcma_device *core, u16 offset) | ||
212 | { | ||
213 | return core->bus->ops->aread32(core, offset); | ||
214 | } | ||
215 | extern inline | ||
216 | void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value) | ||
217 | { | ||
218 | core->bus->ops->awrite32(core, offset, value); | ||
219 | } | ||
220 | |||
221 | extern bool bcma_core_is_enabled(struct bcma_device *core); | ||
222 | extern int bcma_core_enable(struct bcma_device *core, u32 flags); | ||
223 | |||
224 | #endif /* LINUX_BCMA_H_ */ | ||
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h new file mode 100644 index 000000000000..083c3b6cd5ce --- /dev/null +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -0,0 +1,302 @@ | |||
1 | #ifndef LINUX_BCMA_DRIVER_CC_H_ | ||
2 | #define LINUX_BCMA_DRIVER_CC_H_ | ||
3 | |||
4 | /** ChipCommon core registers. **/ | ||
5 | #define BCMA_CC_ID 0x0000 | ||
6 | #define BCMA_CC_ID_ID 0x0000FFFF | ||
7 | #define BCMA_CC_ID_ID_SHIFT 0 | ||
8 | #define BCMA_CC_ID_REV 0x000F0000 | ||
9 | #define BCMA_CC_ID_REV_SHIFT 16 | ||
10 | #define BCMA_CC_ID_PKG 0x00F00000 | ||
11 | #define BCMA_CC_ID_PKG_SHIFT 20 | ||
12 | #define BCMA_CC_ID_NRCORES 0x0F000000 | ||
13 | #define BCMA_CC_ID_NRCORES_SHIFT 24 | ||
14 | #define BCMA_CC_ID_TYPE 0xF0000000 | ||
15 | #define BCMA_CC_ID_TYPE_SHIFT 28 | ||
16 | #define BCMA_CC_CAP 0x0004 /* Capabilities */ | ||
17 | #define BCMA_CC_CAP_NRUART 0x00000003 /* # of UARTs */ | ||
18 | #define BCMA_CC_CAP_MIPSEB 0x00000004 /* MIPS in BigEndian Mode */ | ||
19 | #define BCMA_CC_CAP_UARTCLK 0x00000018 /* UART clock select */ | ||
20 | #define BCMA_CC_CAP_UARTCLK_INT 0x00000008 /* UARTs are driven by internal divided clock */ | ||
21 | #define BCMA_CC_CAP_UARTGPIO 0x00000020 /* UARTs on GPIO 15-12 */ | ||
22 | #define BCMA_CC_CAP_EXTBUS 0x000000C0 /* External buses present */ | ||
23 | #define BCMA_CC_CAP_FLASHT 0x00000700 /* Flash Type */ | ||
24 | #define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */ | ||
25 | #define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */ | ||
26 | #define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */ | ||
27 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ | ||
28 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ | ||
29 | #define BCMA_PLLTYPE_NONE 0x00000000 | ||
30 | #define BCMA_PLLTYPE_1 0x00010000 /* 48Mhz base, 3 dividers */ | ||
31 | #define BCMA_PLLTYPE_2 0x00020000 /* 48Mhz, 4 dividers */ | ||
32 | #define BCMA_PLLTYPE_3 0x00030000 /* 25Mhz, 2 dividers */ | ||
33 | #define BCMA_PLLTYPE_4 0x00008000 /* 48Mhz, 4 dividers */ | ||
34 | #define BCMA_PLLTYPE_5 0x00018000 /* 25Mhz, 4 dividers */ | ||
35 | #define BCMA_PLLTYPE_6 0x00028000 /* 100/200 or 120/240 only */ | ||
36 | #define BCMA_PLLTYPE_7 0x00038000 /* 25Mhz, 4 dividers */ | ||
37 | #define BCMA_CC_CAP_PCTL 0x00040000 /* Power Control */ | ||
38 | #define BCMA_CC_CAP_OTPS 0x00380000 /* OTP size */ | ||
39 | #define BCMA_CC_CAP_OTPS_SHIFT 19 | ||
40 | #define BCMA_CC_CAP_OTPS_BASE 5 | ||
41 | #define BCMA_CC_CAP_JTAGM 0x00400000 /* JTAG master present */ | ||
42 | #define BCMA_CC_CAP_BROM 0x00800000 /* Internal boot ROM active */ | ||
43 | #define BCMA_CC_CAP_64BIT 0x08000000 /* 64-bit Backplane */ | ||
44 | #define BCMA_CC_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ | ||
45 | #define BCMA_CC_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ | ||
46 | #define BCMA_CC_CAP_SPROM 0x40000000 /* SPROM present */ | ||
47 | #define BCMA_CC_CORECTL 0x0008 | ||
48 | #define BCMA_CC_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ | ||
49 | #define BCMA_CC_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ | ||
50 | #define BCMA_CC_CORECTL_UARTCLKEN 0x00000008 /* UART clock enable (rev >= 21) */ | ||
51 | #define BCMA_CC_BIST 0x000C | ||
52 | #define BCMA_CC_OTPS 0x0010 /* OTP status */ | ||
53 | #define BCMA_CC_OTPS_PROGFAIL 0x80000000 | ||
54 | #define BCMA_CC_OTPS_PROTECT 0x00000007 | ||
55 | #define BCMA_CC_OTPS_HW_PROTECT 0x00000001 | ||
56 | #define BCMA_CC_OTPS_SW_PROTECT 0x00000002 | ||
57 | #define BCMA_CC_OTPS_CID_PROTECT 0x00000004 | ||
58 | #define BCMA_CC_OTPC 0x0014 /* OTP control */ | ||
59 | #define BCMA_CC_OTPC_RECWAIT 0xFF000000 | ||
60 | #define BCMA_CC_OTPC_PROGWAIT 0x00FFFF00 | ||
61 | #define BCMA_CC_OTPC_PRW_SHIFT 8 | ||
62 | #define BCMA_CC_OTPC_MAXFAIL 0x00000038 | ||
63 | #define BCMA_CC_OTPC_VSEL 0x00000006 | ||
64 | #define BCMA_CC_OTPC_SELVL 0x00000001 | ||
65 | #define BCMA_CC_OTPP 0x0018 /* OTP prog */ | ||
66 | #define BCMA_CC_OTPP_COL 0x000000FF | ||
67 | #define BCMA_CC_OTPP_ROW 0x0000FF00 | ||
68 | #define BCMA_CC_OTPP_ROW_SHIFT 8 | ||
69 | #define BCMA_CC_OTPP_READERR 0x10000000 | ||
70 | #define BCMA_CC_OTPP_VALUE 0x20000000 | ||
71 | #define BCMA_CC_OTPP_READ 0x40000000 | ||
72 | #define BCMA_CC_OTPP_START 0x80000000 | ||
73 | #define BCMA_CC_OTPP_BUSY 0x80000000 | ||
74 | #define BCMA_CC_IRQSTAT 0x0020 | ||
75 | #define BCMA_CC_IRQMASK 0x0024 | ||
76 | #define BCMA_CC_IRQ_GPIO 0x00000001 /* gpio intr */ | ||
77 | #define BCMA_CC_IRQ_EXT 0x00000002 /* ro: ext intr pin (corerev >= 3) */ | ||
78 | #define BCMA_CC_IRQ_WDRESET 0x80000000 /* watchdog reset occurred */ | ||
79 | #define BCMA_CC_CHIPCTL 0x0028 /* Rev >= 11 only */ | ||
80 | #define BCMA_CC_CHIPSTAT 0x002C /* Rev >= 11 only */ | ||
81 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ | ||
82 | #define BCMA_CC_JCMD_START 0x80000000 | ||
83 | #define BCMA_CC_JCMD_BUSY 0x80000000 | ||
84 | #define BCMA_CC_JCMD_PAUSE 0x40000000 | ||
85 | #define BCMA_CC_JCMD0_ACC_MASK 0x0000F000 | ||
86 | #define BCMA_CC_JCMD0_ACC_IRDR 0x00000000 | ||
87 | #define BCMA_CC_JCMD0_ACC_DR 0x00001000 | ||
88 | #define BCMA_CC_JCMD0_ACC_IR 0x00002000 | ||
89 | #define BCMA_CC_JCMD0_ACC_RESET 0x00003000 | ||
90 | #define BCMA_CC_JCMD0_ACC_IRPDR 0x00004000 | ||
91 | #define BCMA_CC_JCMD0_ACC_PDR 0x00005000 | ||
92 | #define BCMA_CC_JCMD0_IRW_MASK 0x00000F00 | ||
93 | #define BCMA_CC_JCMD_ACC_MASK 0x000F0000 /* Changes for corerev 11 */ | ||
94 | #define BCMA_CC_JCMD_ACC_IRDR 0x00000000 | ||
95 | #define BCMA_CC_JCMD_ACC_DR 0x00010000 | ||
96 | #define BCMA_CC_JCMD_ACC_IR 0x00020000 | ||
97 | #define BCMA_CC_JCMD_ACC_RESET 0x00030000 | ||
98 | #define BCMA_CC_JCMD_ACC_IRPDR 0x00040000 | ||
99 | #define BCMA_CC_JCMD_ACC_PDR 0x00050000 | ||
100 | #define BCMA_CC_JCMD_IRW_MASK 0x00001F00 | ||
101 | #define BCMA_CC_JCMD_IRW_SHIFT 8 | ||
102 | #define BCMA_CC_JCMD_DRW_MASK 0x0000003F | ||
103 | #define BCMA_CC_JIR 0x0034 /* Rev >= 10 only */ | ||
104 | #define BCMA_CC_JDR 0x0038 /* Rev >= 10 only */ | ||
105 | #define BCMA_CC_JCTL 0x003C /* Rev >= 10 only */ | ||
106 | #define BCMA_CC_JCTL_FORCE_CLK 4 /* Force clock */ | ||
107 | #define BCMA_CC_JCTL_EXT_EN 2 /* Enable external targets */ | ||
108 | #define BCMA_CC_JCTL_EN 1 /* Enable Jtag master */ | ||
109 | #define BCMA_CC_FLASHCTL 0x0040 | ||
110 | #define BCMA_CC_FLASHCTL_START 0x80000000 | ||
111 | #define BCMA_CC_FLASHCTL_BUSY BCMA_CC_FLASHCTL_START | ||
112 | #define BCMA_CC_FLASHADDR 0x0044 | ||
113 | #define BCMA_CC_FLASHDATA 0x0048 | ||
114 | #define BCMA_CC_BCAST_ADDR 0x0050 | ||
115 | #define BCMA_CC_BCAST_DATA 0x0054 | ||
116 | #define BCMA_CC_GPIOPULLUP 0x0058 /* Rev >= 20 only */ | ||
117 | #define BCMA_CC_GPIOPULLDOWN 0x005C /* Rev >= 20 only */ | ||
118 | #define BCMA_CC_GPIOIN 0x0060 | ||
119 | #define BCMA_CC_GPIOOUT 0x0064 | ||
120 | #define BCMA_CC_GPIOOUTEN 0x0068 | ||
121 | #define BCMA_CC_GPIOCTL 0x006C | ||
122 | #define BCMA_CC_GPIOPOL 0x0070 | ||
123 | #define BCMA_CC_GPIOIRQ 0x0074 | ||
124 | #define BCMA_CC_WATCHDOG 0x0080 | ||
125 | #define BCMA_CC_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ | ||
126 | #define BCMA_CC_GPIOTIMER_OFFTIME 0x0000FFFF | ||
127 | #define BCMA_CC_GPIOTIMER_OFFTIME_SHIFT 0 | ||
128 | #define BCMA_CC_GPIOTIMER_ONTIME 0xFFFF0000 | ||
129 | #define BCMA_CC_GPIOTIMER_ONTIME_SHIFT 16 | ||
130 | #define BCMA_CC_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ | ||
131 | #define BCMA_CC_CLOCK_N 0x0090 | ||
132 | #define BCMA_CC_CLOCK_SB 0x0094 | ||
133 | #define BCMA_CC_CLOCK_PCI 0x0098 | ||
134 | #define BCMA_CC_CLOCK_M2 0x009C | ||
135 | #define BCMA_CC_CLOCK_MIPS 0x00A0 | ||
136 | #define BCMA_CC_CLKDIV 0x00A4 /* Rev >= 3 only */ | ||
137 | #define BCMA_CC_CLKDIV_SFLASH 0x0F000000 | ||
138 | #define BCMA_CC_CLKDIV_SFLASH_SHIFT 24 | ||
139 | #define BCMA_CC_CLKDIV_OTP 0x000F0000 | ||
140 | #define BCMA_CC_CLKDIV_OTP_SHIFT 16 | ||
141 | #define BCMA_CC_CLKDIV_JTAG 0x00000F00 | ||
142 | #define BCMA_CC_CLKDIV_JTAG_SHIFT 8 | ||
143 | #define BCMA_CC_CLKDIV_UART 0x000000FF | ||
144 | #define BCMA_CC_CAP_EXT 0x00AC /* Capabilities */ | ||
145 | #define BCMA_CC_PLLONDELAY 0x00B0 /* Rev >= 4 only */ | ||
146 | #define BCMA_CC_FREFSELDELAY 0x00B4 /* Rev >= 4 only */ | ||
147 | #define BCMA_CC_SLOWCLKCTL 0x00B8 /* 6 <= Rev <= 9 only */ | ||
148 | #define BCMA_CC_SLOWCLKCTL_SRC 0x00000007 /* slow clock source mask */ | ||
149 | #define BCMA_CC_SLOWCLKCTL_SRC_LPO 0x00000000 /* source of slow clock is LPO */ | ||
150 | #define BCMA_CC_SLOWCLKCTL_SRC_XTAL 0x00000001 /* source of slow clock is crystal */ | ||
151 | #define BCMA_CC_SLOECLKCTL_SRC_PCI 0x00000002 /* source of slow clock is PCI */ | ||
152 | #define BCMA_CC_SLOWCLKCTL_LPOFREQ 0x00000200 /* LPOFreqSel, 1: 160Khz, 0: 32KHz */ | ||
153 | #define BCMA_CC_SLOWCLKCTL_LPOPD 0x00000400 /* LPOPowerDown, 1: LPO is disabled, 0: LPO is enabled */ | ||
154 | #define BCMA_CC_SLOWCLKCTL_FSLOW 0x00000800 /* ForceSlowClk, 1: sb/cores running on slow clock, 0: power logic control */ | ||
155 | #define BCMA_CC_SLOWCLKCTL_IPLL 0x00001000 /* IgnorePllOffReq, 1/0: power logic ignores/honors PLL clock disable requests from core */ | ||
156 | #define BCMA_CC_SLOWCLKCTL_ENXTAL 0x00002000 /* XtalControlEn, 1/0: power logic does/doesn't disable crystal when appropriate */ | ||
157 | #define BCMA_CC_SLOWCLKCTL_XTALPU 0x00004000 /* XtalPU (RO), 1/0: crystal running/disabled */ | ||
158 | #define BCMA_CC_SLOWCLKCTL_CLKDIV 0xFFFF0000 /* ClockDivider (SlowClk = 1/(4+divisor)) */ | ||
159 | #define BCMA_CC_SLOWCLKCTL_CLKDIV_SHIFT 16 | ||
160 | #define BCMA_CC_SYSCLKCTL 0x00C0 /* Rev >= 3 only */ | ||
161 | #define BCMA_CC_SYSCLKCTL_IDLPEN 0x00000001 /* ILPen: Enable Idle Low Power */ | ||
162 | #define BCMA_CC_SYSCLKCTL_ALPEN 0x00000002 /* ALPen: Enable Active Low Power */ | ||
163 | #define BCMA_CC_SYSCLKCTL_PLLEN 0x00000004 /* ForcePLLOn */ | ||
164 | #define BCMA_CC_SYSCLKCTL_FORCEALP 0x00000008 /* Force ALP (or HT if ALPen is not set */ | ||
165 | #define BCMA_CC_SYSCLKCTL_FORCEHT 0x00000010 /* Force HT */ | ||
166 | #define BCMA_CC_SYSCLKCTL_CLKDIV 0xFFFF0000 /* ClkDiv (ILP = 1/(4+divisor)) */ | ||
167 | #define BCMA_CC_SYSCLKCTL_CLKDIV_SHIFT 16 | ||
168 | #define BCMA_CC_CLKSTSTR 0x00C4 /* Rev >= 3 only */ | ||
169 | #define BCMA_CC_EROM 0x00FC | ||
170 | #define BCMA_CC_PCMCIA_CFG 0x0100 | ||
171 | #define BCMA_CC_PCMCIA_MEMWAIT 0x0104 | ||
172 | #define BCMA_CC_PCMCIA_ATTRWAIT 0x0108 | ||
173 | #define BCMA_CC_PCMCIA_IOWAIT 0x010C | ||
174 | #define BCMA_CC_IDE_CFG 0x0110 | ||
175 | #define BCMA_CC_IDE_MEMWAIT 0x0114 | ||
176 | #define BCMA_CC_IDE_ATTRWAIT 0x0118 | ||
177 | #define BCMA_CC_IDE_IOWAIT 0x011C | ||
178 | #define BCMA_CC_PROG_CFG 0x0120 | ||
179 | #define BCMA_CC_PROG_WAITCNT 0x0124 | ||
180 | #define BCMA_CC_FLASH_CFG 0x0128 | ||
181 | #define BCMA_CC_FLASH_WAITCNT 0x012C | ||
182 | #define BCMA_CC_CLKCTLST 0x01E0 /* Clock control and status (rev >= 20) */ | ||
183 | #define BCMA_CC_CLKCTLST_FORCEALP 0x00000001 /* Force ALP request */ | ||
184 | #define BCMA_CC_CLKCTLST_FORCEHT 0x00000002 /* Force HT request */ | ||
185 | #define BCMA_CC_CLKCTLST_FORCEILP 0x00000004 /* Force ILP request */ | ||
186 | #define BCMA_CC_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ | ||
187 | #define BCMA_CC_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ | ||
188 | #define BCMA_CC_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ | ||
189 | #define BCMA_CC_CLKCTLST_HAVEHT 0x00010000 /* HT available */ | ||
190 | #define BCMA_CC_CLKCTLST_HAVEALP 0x00020000 /* APL available */ | ||
191 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | ||
192 | #define BCMA_CC_UART0_DATA 0x0300 | ||
193 | #define BCMA_CC_UART0_IMR 0x0304 | ||
194 | #define BCMA_CC_UART0_FCR 0x0308 | ||
195 | #define BCMA_CC_UART0_LCR 0x030C | ||
196 | #define BCMA_CC_UART0_MCR 0x0310 | ||
197 | #define BCMA_CC_UART0_LSR 0x0314 | ||
198 | #define BCMA_CC_UART0_MSR 0x0318 | ||
199 | #define BCMA_CC_UART0_SCRATCH 0x031C | ||
200 | #define BCMA_CC_UART1_DATA 0x0400 | ||
201 | #define BCMA_CC_UART1_IMR 0x0404 | ||
202 | #define BCMA_CC_UART1_FCR 0x0408 | ||
203 | #define BCMA_CC_UART1_LCR 0x040C | ||
204 | #define BCMA_CC_UART1_MCR 0x0410 | ||
205 | #define BCMA_CC_UART1_LSR 0x0414 | ||
206 | #define BCMA_CC_UART1_MSR 0x0418 | ||
207 | #define BCMA_CC_UART1_SCRATCH 0x041C | ||
208 | /* PMU registers (rev >= 20) */ | ||
209 | #define BCMA_CC_PMU_CTL 0x0600 /* PMU control */ | ||
210 | #define BCMA_CC_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ | ||
211 | #define BCMA_CC_PMU_CTL_ILP_DIV_SHIFT 16 | ||
212 | #define BCMA_CC_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ | ||
213 | #define BCMA_CC_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ | ||
214 | #define BCMA_CC_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ | ||
215 | #define BCMA_CC_PMU_CTL_XTALFREQ 0x0000007C /* Crystal freq */ | ||
216 | #define BCMA_CC_PMU_CTL_XTALFREQ_SHIFT 2 | ||
217 | #define BCMA_CC_PMU_CTL_ILPDIVEN 0x00000002 /* ILP div enable */ | ||
218 | #define BCMA_CC_PMU_CTL_LPOSEL 0x00000001 /* LPO sel */ | ||
219 | #define BCMA_CC_PMU_CAP 0x0604 /* PMU capabilities */ | ||
220 | #define BCMA_CC_PMU_CAP_REVISION 0x000000FF /* Revision mask */ | ||
221 | #define BCMA_CC_PMU_STAT 0x0608 /* PMU status */ | ||
222 | #define BCMA_CC_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */ | ||
223 | #define BCMA_CC_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */ | ||
224 | #define BCMA_CC_PMU_STAT_HAVEALP 0x00000008 /* ALP available */ | ||
225 | #define BCMA_CC_PMU_STAT_HAVEHT 0x00000004 /* HT available */ | ||
226 | #define BCMA_CC_PMU_STAT_RESINIT 0x00000003 /* Res init */ | ||
227 | #define BCMA_CC_PMU_RES_STAT 0x060C /* PMU res status */ | ||
228 | #define BCMA_CC_PMU_RES_PEND 0x0610 /* PMU res pending */ | ||
229 | #define BCMA_CC_PMU_TIMER 0x0614 /* PMU timer */ | ||
230 | #define BCMA_CC_PMU_MINRES_MSK 0x0618 /* PMU min res mask */ | ||
231 | #define BCMA_CC_PMU_MAXRES_MSK 0x061C /* PMU max res mask */ | ||
232 | #define BCMA_CC_PMU_RES_TABSEL 0x0620 /* PMU res table sel */ | ||
233 | #define BCMA_CC_PMU_RES_DEPMSK 0x0624 /* PMU res dep mask */ | ||
234 | #define BCMA_CC_PMU_RES_UPDNTM 0x0628 /* PMU res updown timer */ | ||
235 | #define BCMA_CC_PMU_RES_TIMER 0x062C /* PMU res timer */ | ||
236 | #define BCMA_CC_PMU_CLKSTRETCH 0x0630 /* PMU clockstretch */ | ||
237 | #define BCMA_CC_PMU_WATCHDOG 0x0634 /* PMU watchdog */ | ||
238 | #define BCMA_CC_PMU_RES_REQTS 0x0640 /* PMU res req timer sel */ | ||
239 | #define BCMA_CC_PMU_RES_REQT 0x0644 /* PMU res req timer */ | ||
240 | #define BCMA_CC_PMU_RES_REQM 0x0648 /* PMU res req mask */ | ||
241 | #define BCMA_CC_CHIPCTL_ADDR 0x0650 | ||
242 | #define BCMA_CC_CHIPCTL_DATA 0x0654 | ||
243 | #define BCMA_CC_REGCTL_ADDR 0x0658 | ||
244 | #define BCMA_CC_REGCTL_DATA 0x065C | ||
245 | #define BCMA_CC_PLLCTL_ADDR 0x0660 | ||
246 | #define BCMA_CC_PLLCTL_DATA 0x0664 | ||
247 | |||
248 | /* Data for the PMU, if available. | ||
249 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | ||
250 | */ | ||
251 | struct bcma_chipcommon_pmu { | ||
252 | u8 rev; /* PMU revision */ | ||
253 | u32 crystalfreq; /* The active crystal frequency (in kHz) */ | ||
254 | }; | ||
255 | |||
256 | struct bcma_drv_cc { | ||
257 | struct bcma_device *core; | ||
258 | u32 status; | ||
259 | u32 capabilities; | ||
260 | u32 capabilities_ext; | ||
261 | /* Fast Powerup Delay constant */ | ||
262 | u16 fast_pwrup_delay; | ||
263 | struct bcma_chipcommon_pmu pmu; | ||
264 | }; | ||
265 | |||
266 | /* Register access */ | ||
267 | #define bcma_cc_read32(cc, offset) \ | ||
268 | bcma_read32((cc)->core, offset) | ||
269 | #define bcma_cc_write32(cc, offset, val) \ | ||
270 | bcma_write32((cc)->core, offset, val) | ||
271 | |||
272 | #define bcma_cc_mask32(cc, offset, mask) \ | ||
273 | bcma_cc_write32(cc, offset, bcma_cc_read32(cc, offset) & (mask)) | ||
274 | #define bcma_cc_set32(cc, offset, set) \ | ||
275 | bcma_cc_write32(cc, offset, bcma_cc_read32(cc, offset) | (set)) | ||
276 | #define bcma_cc_maskset32(cc, offset, mask, set) \ | ||
277 | bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set)) | ||
278 | |||
279 | extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc); | ||
280 | |||
281 | extern void bcma_chipco_suspend(struct bcma_drv_cc *cc); | ||
282 | extern void bcma_chipco_resume(struct bcma_drv_cc *cc); | ||
283 | |||
284 | extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, | ||
285 | u32 ticks); | ||
286 | |||
287 | void bcma_chipco_irq_mask(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
288 | |||
289 | u32 bcma_chipco_irq_status(struct bcma_drv_cc *cc, u32 mask); | ||
290 | |||
291 | /* Chipcommon GPIO pin access. */ | ||
292 | u32 bcma_chipco_gpio_in(struct bcma_drv_cc *cc, u32 mask); | ||
293 | u32 bcma_chipco_gpio_out(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
294 | u32 bcma_chipco_gpio_outen(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
295 | u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
296 | u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
297 | u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
298 | |||
299 | /* PMU support */ | ||
300 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); | ||
301 | |||
302 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ | ||
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h new file mode 100644 index 000000000000..b7e191cf00ec --- /dev/null +++ b/include/linux/bcma/bcma_driver_pci.h | |||
@@ -0,0 +1,89 @@ | |||
1 | #ifndef LINUX_BCMA_DRIVER_PCI_H_ | ||
2 | #define LINUX_BCMA_DRIVER_PCI_H_ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct pci_dev; | ||
7 | |||
8 | /** PCI core registers. **/ | ||
9 | #define BCMA_CORE_PCI_CTL 0x0000 /* PCI Control */ | ||
10 | #define BCMA_CORE_PCI_CTL_RST_OE 0x00000001 /* PCI_RESET Output Enable */ | ||
11 | #define BCMA_CORE_PCI_CTL_RST 0x00000002 /* PCI_RESET driven out to pin */ | ||
12 | #define BCMA_CORE_PCI_CTL_CLK_OE 0x00000004 /* Clock gate Output Enable */ | ||
13 | #define BCMA_CORE_PCI_CTL_CLK 0x00000008 /* Gate for clock driven out to pin */ | ||
14 | #define BCMA_CORE_PCI_ARBCTL 0x0010 /* PCI Arbiter Control */ | ||
15 | #define BCMA_CORE_PCI_ARBCTL_INTERN 0x00000001 /* Use internal arbiter */ | ||
16 | #define BCMA_CORE_PCI_ARBCTL_EXTERN 0x00000002 /* Use external arbiter */ | ||
17 | #define BCMA_CORE_PCI_ARBCTL_PARKID 0x00000006 /* Mask, selects which agent is parked on an idle bus */ | ||
18 | #define BCMA_CORE_PCI_ARBCTL_PARKID_LAST 0x00000000 /* Last requestor */ | ||
19 | #define BCMA_CORE_PCI_ARBCTL_PARKID_4710 0x00000002 /* 4710 */ | ||
20 | #define BCMA_CORE_PCI_ARBCTL_PARKID_EXT0 0x00000004 /* External requestor 0 */ | ||
21 | #define BCMA_CORE_PCI_ARBCTL_PARKID_EXT1 0x00000006 /* External requestor 1 */ | ||
22 | #define BCMA_CORE_PCI_ISTAT 0x0020 /* Interrupt status */ | ||
23 | #define BCMA_CORE_PCI_ISTAT_INTA 0x00000001 /* PCI INTA# */ | ||
24 | #define BCMA_CORE_PCI_ISTAT_INTB 0x00000002 /* PCI INTB# */ | ||
25 | #define BCMA_CORE_PCI_ISTAT_SERR 0x00000004 /* PCI SERR# (write to clear) */ | ||
26 | #define BCMA_CORE_PCI_ISTAT_PERR 0x00000008 /* PCI PERR# (write to clear) */ | ||
27 | #define BCMA_CORE_PCI_ISTAT_PME 0x00000010 /* PCI PME# */ | ||
28 | #define BCMA_CORE_PCI_IMASK 0x0024 /* Interrupt mask */ | ||
29 | #define BCMA_CORE_PCI_IMASK_INTA 0x00000001 /* PCI INTA# */ | ||
30 | #define BCMA_CORE_PCI_IMASK_INTB 0x00000002 /* PCI INTB# */ | ||
31 | #define BCMA_CORE_PCI_IMASK_SERR 0x00000004 /* PCI SERR# */ | ||
32 | #define BCMA_CORE_PCI_IMASK_PERR 0x00000008 /* PCI PERR# */ | ||
33 | #define BCMA_CORE_PCI_IMASK_PME 0x00000010 /* PCI PME# */ | ||
34 | #define BCMA_CORE_PCI_MBOX 0x0028 /* Backplane to PCI Mailbox */ | ||
35 | #define BCMA_CORE_PCI_MBOX_F0_0 0x00000100 /* PCI function 0, INT 0 */ | ||
36 | #define BCMA_CORE_PCI_MBOX_F0_1 0x00000200 /* PCI function 0, INT 1 */ | ||
37 | #define BCMA_CORE_PCI_MBOX_F1_0 0x00000400 /* PCI function 1, INT 0 */ | ||
38 | #define BCMA_CORE_PCI_MBOX_F1_1 0x00000800 /* PCI function 1, INT 1 */ | ||
39 | #define BCMA_CORE_PCI_MBOX_F2_0 0x00001000 /* PCI function 2, INT 0 */ | ||
40 | #define BCMA_CORE_PCI_MBOX_F2_1 0x00002000 /* PCI function 2, INT 1 */ | ||
41 | #define BCMA_CORE_PCI_MBOX_F3_0 0x00004000 /* PCI function 3, INT 0 */ | ||
42 | #define BCMA_CORE_PCI_MBOX_F3_1 0x00008000 /* PCI function 3, INT 1 */ | ||
43 | #define BCMA_CORE_PCI_BCAST_ADDR 0x0050 /* Backplane Broadcast Address */ | ||
44 | #define BCMA_CORE_PCI_BCAST_ADDR_MASK 0x000000FF | ||
45 | #define BCMA_CORE_PCI_BCAST_DATA 0x0054 /* Backplane Broadcast Data */ | ||
46 | #define BCMA_CORE_PCI_GPIO_IN 0x0060 /* rev >= 2 only */ | ||
47 | #define BCMA_CORE_PCI_GPIO_OUT 0x0064 /* rev >= 2 only */ | ||
48 | #define BCMA_CORE_PCI_GPIO_ENABLE 0x0068 /* rev >= 2 only */ | ||
49 | #define BCMA_CORE_PCI_GPIO_CTL 0x006C /* rev >= 2 only */ | ||
50 | #define BCMA_CORE_PCI_SBTOPCI0 0x0100 /* Backplane to PCI translation 0 (sbtopci0) */ | ||
51 | #define BCMA_CORE_PCI_SBTOPCI0_MASK 0xFC000000 | ||
52 | #define BCMA_CORE_PCI_SBTOPCI1 0x0104 /* Backplane to PCI translation 1 (sbtopci1) */ | ||
53 | #define BCMA_CORE_PCI_SBTOPCI1_MASK 0xFC000000 | ||
54 | #define BCMA_CORE_PCI_SBTOPCI2 0x0108 /* Backplane to PCI translation 2 (sbtopci2) */ | ||
55 | #define BCMA_CORE_PCI_SBTOPCI2_MASK 0xC0000000 | ||
56 | #define BCMA_CORE_PCI_PCICFG0 0x0400 /* PCI config space 0 (rev >= 8) */ | ||
57 | #define BCMA_CORE_PCI_PCICFG1 0x0500 /* PCI config space 1 (rev >= 8) */ | ||
58 | #define BCMA_CORE_PCI_PCICFG2 0x0600 /* PCI config space 2 (rev >= 8) */ | ||
59 | #define BCMA_CORE_PCI_PCICFG3 0x0700 /* PCI config space 3 (rev >= 8) */ | ||
60 | #define BCMA_CORE_PCI_SPROM(wordoffset) (0x0800 + ((wordoffset) * 2)) /* SPROM shadow area (72 bytes) */ | ||
61 | |||
62 | /* SBtoPCIx */ | ||
63 | #define BCMA_CORE_PCI_SBTOPCI_MEM 0x00000000 | ||
64 | #define BCMA_CORE_PCI_SBTOPCI_IO 0x00000001 | ||
65 | #define BCMA_CORE_PCI_SBTOPCI_CFG0 0x00000002 | ||
66 | #define BCMA_CORE_PCI_SBTOPCI_CFG1 0x00000003 | ||
67 | #define BCMA_CORE_PCI_SBTOPCI_PREF 0x00000004 /* Prefetch enable */ | ||
68 | #define BCMA_CORE_PCI_SBTOPCI_BURST 0x00000008 /* Burst enable */ | ||
69 | #define BCMA_CORE_PCI_SBTOPCI_MRM 0x00000020 /* Memory Read Multiple */ | ||
70 | #define BCMA_CORE_PCI_SBTOPCI_RC 0x00000030 /* Read Command mask (rev >= 11) */ | ||
71 | #define BCMA_CORE_PCI_SBTOPCI_RC_READ 0x00000000 /* Memory read */ | ||
72 | #define BCMA_CORE_PCI_SBTOPCI_RC_READL 0x00000010 /* Memory read line */ | ||
73 | #define BCMA_CORE_PCI_SBTOPCI_RC_READM 0x00000020 /* Memory read multiple */ | ||
74 | |||
75 | /* PCIcore specific boardflags */ | ||
76 | #define BCMA_CORE_PCI_BFL_NOPCI 0x00000400 /* Board leaves PCI floating */ | ||
77 | |||
78 | struct bcma_drv_pci { | ||
79 | struct bcma_device *core; | ||
80 | u8 setup_done:1; | ||
81 | }; | ||
82 | |||
83 | /* Register access */ | ||
84 | #define pcicore_read32(pc, offset) bcma_read32((pc)->core, offset) | ||
85 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) | ||
86 | |||
87 | extern void bcma_core_pci_init(struct bcma_drv_pci *pc); | ||
88 | |||
89 | #endif /* LINUX_BCMA_DRIVER_PCI_H_ */ | ||
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h new file mode 100644 index 000000000000..f82d88a960ce --- /dev/null +++ b/include/linux/bcma/bcma_regs.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef LINUX_BCMA_REGS_H_ | ||
2 | #define LINUX_BCMA_REGS_H_ | ||
3 | |||
4 | /* Agent registers (common for every core) */ | ||
5 | #define BCMA_IOCTL 0x0408 | ||
6 | #define BCMA_IOCTL_CLK 0x0001 | ||
7 | #define BCMA_IOCTL_FGC 0x0002 | ||
8 | #define BCMA_IOCTL_CORE_BITS 0x3FFC | ||
9 | #define BCMA_IOCTL_PME_EN 0x4000 | ||
10 | #define BCMA_IOCTL_BIST_EN 0x8000 | ||
11 | #define BCMA_RESET_CTL 0x0800 | ||
12 | #define BCMA_RESET_CTL_RESET 0x0001 | ||
13 | |||
14 | /* BCMA PCI config space registers. */ | ||
15 | #define BCMA_PCI_PMCSR 0x44 | ||
16 | #define BCMA_PCI_PE 0x100 | ||
17 | #define BCMA_PCI_BAR0_WIN 0x80 /* Backplane address space 0 */ | ||
18 | #define BCMA_PCI_BAR1_WIN 0x84 /* Backplane address space 1 */ | ||
19 | #define BCMA_PCI_SPROMCTL 0x88 /* SPROM control */ | ||
20 | #define BCMA_PCI_SPROMCTL_WE 0x10 /* SPROM write enable */ | ||
21 | #define BCMA_PCI_BAR1_CONTROL 0x8c /* Address space 1 burst control */ | ||
22 | #define BCMA_PCI_IRQS 0x90 /* PCI interrupts */ | ||
23 | #define BCMA_PCI_IRQMASK 0x94 /* PCI IRQ control and mask (pcirev >= 6 only) */ | ||
24 | #define BCMA_PCI_BACKPLANE_IRQS 0x98 /* Backplane Interrupts */ | ||
25 | #define BCMA_PCI_BAR0_WIN2 0xAC | ||
26 | #define BCMA_PCI_GPIO_IN 0xB0 /* GPIO Input (pcirev >= 3 only) */ | ||
27 | #define BCMA_PCI_GPIO_OUT 0xB4 /* GPIO Output (pcirev >= 3 only) */ | ||
28 | #define BCMA_PCI_GPIO_OUT_ENABLE 0xB8 /* GPIO Output Enable/Disable (pcirev >= 3 only) */ | ||
29 | #define BCMA_PCI_GPIO_SCS 0x10 /* PCI config space bit 4 for 4306c0 slow clock source */ | ||
30 | #define BCMA_PCI_GPIO_HWRAD 0x20 /* PCI config space GPIO 13 for hw radio disable */ | ||
31 | #define BCMA_PCI_GPIO_XTAL 0x40 /* PCI config space GPIO 14 for Xtal powerup */ | ||
32 | #define BCMA_PCI_GPIO_PLL 0x80 /* PCI config space GPIO 15 for PLL powerdown */ | ||
33 | |||
34 | #endif /* LINUX_BCMA_REGS_H_ */ | ||
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index e612575a2596..b4326bfa684f 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h | |||
@@ -23,11 +23,11 @@ static inline void bit_spin_lock(int bitnum, unsigned long *addr) | |||
23 | preempt_disable(); | 23 | preempt_disable(); |
24 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 24 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
25 | while (unlikely(test_and_set_bit_lock(bitnum, addr))) { | 25 | while (unlikely(test_and_set_bit_lock(bitnum, addr))) { |
26 | while (test_bit(bitnum, addr)) { | 26 | preempt_enable(); |
27 | preempt_enable(); | 27 | do { |
28 | cpu_relax(); | 28 | cpu_relax(); |
29 | preempt_disable(); | 29 | } while (test_bit(bitnum, addr)); |
30 | } | 30 | preempt_disable(); |
31 | } | 31 | } |
32 | #endif | 32 | #endif |
33 | __acquire(bitlock); | 33 | __acquire(bitlock); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 16a902f099ac..2ad95fa1d130 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -388,20 +388,19 @@ struct request_queue | |||
388 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ | 388 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ |
389 | #define QUEUE_FLAG_ASYNCFULL 4 /* write queue has been filled */ | 389 | #define QUEUE_FLAG_ASYNCFULL 4 /* write queue has been filled */ |
390 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ | 390 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ |
391 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ | 391 | #define QUEUE_FLAG_ELVSWITCH 6 /* don't use elevator, just do FIFO */ |
392 | #define QUEUE_FLAG_ELVSWITCH 7 /* don't use elevator, just do FIFO */ | 392 | #define QUEUE_FLAG_BIDI 7 /* queue supports bidi requests */ |
393 | #define QUEUE_FLAG_BIDI 8 /* queue supports bidi requests */ | 393 | #define QUEUE_FLAG_NOMERGES 8 /* disable merge attempts */ |
394 | #define QUEUE_FLAG_NOMERGES 9 /* disable merge attempts */ | 394 | #define QUEUE_FLAG_SAME_COMP 9 /* force complete on same CPU */ |
395 | #define QUEUE_FLAG_SAME_COMP 10 /* force complete on same CPU */ | 395 | #define QUEUE_FLAG_FAIL_IO 10 /* fake timeout */ |
396 | #define QUEUE_FLAG_FAIL_IO 11 /* fake timeout */ | 396 | #define QUEUE_FLAG_STACKABLE 11 /* supports request stacking */ |
397 | #define QUEUE_FLAG_STACKABLE 12 /* supports request stacking */ | 397 | #define QUEUE_FLAG_NONROT 12 /* non-rotational device (SSD) */ |
398 | #define QUEUE_FLAG_NONROT 13 /* non-rotational device (SSD) */ | ||
399 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ | 398 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ |
400 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ | 399 | #define QUEUE_FLAG_IO_STAT 13 /* do IO stats */ |
401 | #define QUEUE_FLAG_DISCARD 16 /* supports DISCARD */ | 400 | #define QUEUE_FLAG_DISCARD 14 /* supports DISCARD */ |
402 | #define QUEUE_FLAG_NOXMERGES 17 /* No extended merges */ | 401 | #define QUEUE_FLAG_NOXMERGES 15 /* No extended merges */ |
403 | #define QUEUE_FLAG_ADD_RANDOM 18 /* Contributes to random pool */ | 402 | #define QUEUE_FLAG_ADD_RANDOM 16 /* Contributes to random pool */ |
404 | #define QUEUE_FLAG_SECDISCARD 19 /* supports SECDISCARD */ | 403 | #define QUEUE_FLAG_SECDISCARD 17 /* supports SECDISCARD */ |
405 | 404 | ||
406 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 405 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
407 | (1 << QUEUE_FLAG_STACKABLE) | \ | 406 | (1 << QUEUE_FLAG_STACKABLE) | \ |
@@ -697,8 +696,9 @@ extern void blk_start_queue(struct request_queue *q); | |||
697 | extern void blk_stop_queue(struct request_queue *q); | 696 | extern void blk_stop_queue(struct request_queue *q); |
698 | extern void blk_sync_queue(struct request_queue *q); | 697 | extern void blk_sync_queue(struct request_queue *q); |
699 | extern void __blk_stop_queue(struct request_queue *q); | 698 | extern void __blk_stop_queue(struct request_queue *q); |
700 | extern void __blk_run_queue(struct request_queue *q, bool force_kblockd); | 699 | extern void __blk_run_queue(struct request_queue *q); |
701 | extern void blk_run_queue(struct request_queue *); | 700 | extern void blk_run_queue(struct request_queue *); |
701 | extern void blk_run_queue_async(struct request_queue *q); | ||
702 | extern int blk_rq_map_user(struct request_queue *, struct request *, | 702 | extern int blk_rq_map_user(struct request_queue *, struct request *, |
703 | struct rq_map_data *, void __user *, unsigned long, | 703 | struct rq_map_data *, void __user *, unsigned long, |
704 | gfp_t); | 704 | gfp_t); |
@@ -857,26 +857,39 @@ extern void blk_put_queue(struct request_queue *); | |||
857 | struct blk_plug { | 857 | struct blk_plug { |
858 | unsigned long magic; | 858 | unsigned long magic; |
859 | struct list_head list; | 859 | struct list_head list; |
860 | struct list_head cb_list; | ||
860 | unsigned int should_sort; | 861 | unsigned int should_sort; |
861 | }; | 862 | }; |
863 | struct blk_plug_cb { | ||
864 | struct list_head list; | ||
865 | void (*callback)(struct blk_plug_cb *); | ||
866 | }; | ||
862 | 867 | ||
863 | extern void blk_start_plug(struct blk_plug *); | 868 | extern void blk_start_plug(struct blk_plug *); |
864 | extern void blk_finish_plug(struct blk_plug *); | 869 | extern void blk_finish_plug(struct blk_plug *); |
865 | extern void __blk_flush_plug(struct task_struct *, struct blk_plug *); | 870 | extern void blk_flush_plug_list(struct blk_plug *, bool); |
866 | 871 | ||
867 | static inline void blk_flush_plug(struct task_struct *tsk) | 872 | static inline void blk_flush_plug(struct task_struct *tsk) |
868 | { | 873 | { |
869 | struct blk_plug *plug = tsk->plug; | 874 | struct blk_plug *plug = tsk->plug; |
870 | 875 | ||
871 | if (unlikely(plug)) | 876 | if (plug) |
872 | __blk_flush_plug(tsk, plug); | 877 | blk_flush_plug_list(plug, false); |
878 | } | ||
879 | |||
880 | static inline void blk_schedule_flush_plug(struct task_struct *tsk) | ||
881 | { | ||
882 | struct blk_plug *plug = tsk->plug; | ||
883 | |||
884 | if (plug) | ||
885 | blk_flush_plug_list(plug, true); | ||
873 | } | 886 | } |
874 | 887 | ||
875 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) | 888 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) |
876 | { | 889 | { |
877 | struct blk_plug *plug = tsk->plug; | 890 | struct blk_plug *plug = tsk->plug; |
878 | 891 | ||
879 | return plug && !list_empty(&plug->list); | 892 | return plug && (!list_empty(&plug->list) || !list_empty(&plug->cb_list)); |
880 | } | 893 | } |
881 | 894 | ||
882 | /* | 895 | /* |
@@ -1206,6 +1219,7 @@ struct blk_integrity { | |||
1206 | struct kobject kobj; | 1219 | struct kobject kobj; |
1207 | }; | 1220 | }; |
1208 | 1221 | ||
1222 | extern bool blk_integrity_is_initialized(struct gendisk *); | ||
1209 | extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); | 1223 | extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); |
1210 | extern void blk_integrity_unregister(struct gendisk *); | 1224 | extern void blk_integrity_unregister(struct gendisk *); |
1211 | extern int blk_integrity_compare(struct gendisk *, struct gendisk *); | 1225 | extern int blk_integrity_compare(struct gendisk *, struct gendisk *); |
@@ -1262,6 +1276,7 @@ queue_max_integrity_segments(struct request_queue *q) | |||
1262 | #define queue_max_integrity_segments(a) (0) | 1276 | #define queue_max_integrity_segments(a) (0) |
1263 | #define blk_integrity_merge_rq(a, b, c) (0) | 1277 | #define blk_integrity_merge_rq(a, b, c) (0) |
1264 | #define blk_integrity_merge_bio(a, b, c) (0) | 1278 | #define blk_integrity_merge_bio(a, b, c) (0) |
1279 | #define blk_integrity_is_initialized(a) (0) | ||
1265 | 1280 | ||
1266 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 1281 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
1267 | 1282 | ||
@@ -1312,6 +1327,11 @@ static inline void blk_flush_plug(struct task_struct *task) | |||
1312 | { | 1327 | { |
1313 | } | 1328 | } |
1314 | 1329 | ||
1330 | static inline void blk_schedule_flush_plug(struct task_struct *task) | ||
1331 | { | ||
1332 | } | ||
1333 | |||
1334 | |||
1315 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) | 1335 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) |
1316 | { | 1336 | { |
1317 | return false; | 1337 | return false; |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index b8613e806aa9..01eca1794e14 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -111,6 +111,8 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | |||
111 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 111 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
112 | #define alloc_bootmem_node(pgdat, x) \ | 112 | #define alloc_bootmem_node(pgdat, x) \ |
113 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 113 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
114 | #define alloc_bootmem_node_nopanic(pgdat, x) \ | ||
115 | __alloc_bootmem_node_nopanic(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | ||
114 | #define alloc_bootmem_pages_node(pgdat, x) \ | 116 | #define alloc_bootmem_pages_node(pgdat, x) \ |
115 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 117 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
116 | #define alloc_bootmem_pages_node_nopanic(pgdat, x) \ | 118 | #define alloc_bootmem_pages_node_nopanic(pgdat, x) \ |
diff --git a/include/linux/bsearch.h b/include/linux/bsearch.h new file mode 100644 index 000000000000..90b1aa867224 --- /dev/null +++ b/include/linux/bsearch.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _LINUX_BSEARCH_H | ||
2 | #define _LINUX_BSEARCH_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | void *bsearch(const void *key, const void *base, size_t num, size_t size, | ||
7 | int (*cmp)(const void *key, const void *elt)); | ||
8 | |||
9 | #endif /* _LINUX_BSEARCH_H */ | ||
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 6c507bea275f..5ce6b5d62ecc 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
@@ -36,16 +36,16 @@ | |||
36 | * @prot: pointer to struct proto structure. | 36 | * @prot: pointer to struct proto structure. |
37 | */ | 37 | */ |
38 | struct can_proto { | 38 | struct can_proto { |
39 | int type; | 39 | int type; |
40 | int protocol; | 40 | int protocol; |
41 | struct proto_ops *ops; | 41 | const struct proto_ops *ops; |
42 | struct proto *prot; | 42 | struct proto *prot; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* function prototypes for the CAN networklayer core (af_can.c) */ | 45 | /* function prototypes for the CAN networklayer core (af_can.c) */ |
46 | 46 | ||
47 | extern int can_proto_register(struct can_proto *cp); | 47 | extern int can_proto_register(const struct can_proto *cp); |
48 | extern void can_proto_unregister(struct can_proto *cp); | 48 | extern void can_proto_unregister(const struct can_proto *cp); |
49 | 49 | ||
50 | extern int can_rx_register(struct net_device *dev, canid_t can_id, | 50 | extern int can_rx_register(struct net_device *dev, canid_t can_id, |
51 | canid_t mask, | 51 | canid_t mask, |
@@ -58,5 +58,6 @@ extern void can_rx_unregister(struct net_device *dev, canid_t can_id, | |||
58 | void *data); | 58 | void *data); |
59 | 59 | ||
60 | extern int can_send(struct sk_buff *skb, int loop); | 60 | extern int can_send(struct sk_buff *skb, int loop); |
61 | extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | ||
61 | 62 | ||
62 | #endif /* CAN_CORE_H */ | 63 | #endif /* CAN_CORE_H */ |
diff --git a/include/linux/can/error.h b/include/linux/can/error.h index d4127fd9e681..5958074302a4 100644 --- a/include/linux/can/error.h +++ b/include/linux/can/error.h | |||
@@ -51,7 +51,7 @@ | |||
51 | #define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */ | 51 | #define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */ |
52 | #define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */ | 52 | #define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */ |
53 | #define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */ | 53 | #define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */ |
54 | #define CAN_ERR_PROT_TX 0x80 /* error occured on transmission */ | 54 | #define CAN_ERR_PROT_TX 0x80 /* error occurred on transmission */ |
55 | 55 | ||
56 | /* error in CAN protocol (location) / data[3] */ | 56 | /* error in CAN protocol (location) / data[3] */ |
57 | #define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */ | 57 | #define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */ |
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h index 3250de935e1a..34542d374dd8 100644 --- a/include/linux/can/netlink.h +++ b/include/linux/can/netlink.h | |||
@@ -17,7 +17,7 @@ | |||
17 | /* | 17 | /* |
18 | * CAN bit-timing parameters | 18 | * CAN bit-timing parameters |
19 | * | 19 | * |
20 | * For futher information, please read chapter "8 BIT TIMING | 20 | * For further information, please read chapter "8 BIT TIMING |
21 | * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" | 21 | * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" |
22 | * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. | 22 | * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. |
23 | */ | 23 | */ |
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h index 8e20540043f5..089fe43211a4 100644 --- a/include/linux/can/platform/mcp251x.h +++ b/include/linux/can/platform/mcp251x.h | |||
@@ -12,6 +12,7 @@ | |||
12 | /** | 12 | /** |
13 | * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data | 13 | * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data |
14 | * @oscillator_frequency: - oscillator frequency in Hz | 14 | * @oscillator_frequency: - oscillator frequency in Hz |
15 | * @irq_flags: - IRQF configuration flags | ||
15 | * @board_specific_setup: - called before probing the chip (power,reset) | 16 | * @board_specific_setup: - called before probing the chip (power,reset) |
16 | * @transceiver_enable: - called to power on/off the transceiver | 17 | * @transceiver_enable: - called to power on/off the transceiver |
17 | * @power_enable: - called to power on/off the mcp *and* the | 18 | * @power_enable: - called to power on/off the mcp *and* the |
@@ -24,6 +25,7 @@ | |||
24 | 25 | ||
25 | struct mcp251x_platform_data { | 26 | struct mcp251x_platform_data { |
26 | unsigned long oscillator_frequency; | 27 | unsigned long oscillator_frequency; |
28 | unsigned long irq_flags; | ||
27 | int (*board_specific_setup)(struct spi_device *spi); | 29 | int (*board_specific_setup)(struct spi_device *spi); |
28 | int (*transceiver_enable)(int enable); | 30 | int (*transceiver_enable)(int enable); |
29 | int (*power_enable) (int enable); | 31 | int (*power_enable) (int enable); |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 16ee8b49a200..4554db0cde86 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -355,7 +355,12 @@ struct cpu_vfs_cap_data { | |||
355 | 355 | ||
356 | #define CAP_SYSLOG 34 | 356 | #define CAP_SYSLOG 34 |
357 | 357 | ||
358 | #define CAP_LAST_CAP CAP_SYSLOG | 358 | /* Allow triggering something that will wake the system */ |
359 | |||
360 | #define CAP_WAKE_ALARM 35 | ||
361 | |||
362 | |||
363 | #define CAP_LAST_CAP CAP_WAKE_ALARM | ||
359 | 364 | ||
360 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) | 365 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) |
361 | 366 | ||
@@ -546,18 +551,7 @@ extern bool has_capability_noaudit(struct task_struct *t, int cap); | |||
546 | extern bool capable(int cap); | 551 | extern bool capable(int cap); |
547 | extern bool ns_capable(struct user_namespace *ns, int cap); | 552 | extern bool ns_capable(struct user_namespace *ns, int cap); |
548 | extern bool task_ns_capable(struct task_struct *t, int cap); | 553 | extern bool task_ns_capable(struct task_struct *t, int cap); |
549 | 554 | extern bool nsown_capable(int cap); | |
550 | /** | ||
551 | * nsown_capable - Check superior capability to one's own user_ns | ||
552 | * @cap: The capability in question | ||
553 | * | ||
554 | * Return true if the current task has the given superior capability | ||
555 | * targeted at its own user namespace. | ||
556 | */ | ||
557 | static inline bool nsown_capable(int cap) | ||
558 | { | ||
559 | return ns_capable(current_user_ns(), cap); | ||
560 | } | ||
561 | 555 | ||
562 | /* audit system wants to get cap info from files as well */ | 556 | /* audit system wants to get cap info from files as well */ |
563 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); | 557 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); |
diff --git a/include/linux/cdk.h b/include/linux/cdk.h index 0908daf7bf56..80093a8d4f64 100644 --- a/include/linux/cdk.h +++ b/include/linux/cdk.h | |||
@@ -149,7 +149,7 @@ typedef struct cdkhdr { | |||
149 | /* | 149 | /* |
150 | * Define the memory mapping structure. This structure is pointed to by | 150 | * Define the memory mapping structure. This structure is pointed to by |
151 | * the memp field in the stlcdkhdr struct. As many as these structures | 151 | * the memp field in the stlcdkhdr struct. As many as these structures |
152 | * as required are layed out in shared memory to define how the rest of | 152 | * as required are laid out in shared memory to define how the rest of |
153 | * shared memory is divided up. There will be one for each port. | 153 | * shared memory is divided up. There will be one for each port. |
154 | */ | 154 | */ |
155 | typedef struct cdkmem { | 155 | typedef struct cdkmem { |
diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h index 7fff521d7eb5..aa13392a7efb 100644 --- a/include/linux/ceph/auth.h +++ b/include/linux/ceph/auth.h | |||
@@ -67,12 +67,12 @@ struct ceph_auth_client { | |||
67 | bool negotiating; /* true if negotiating protocol */ | 67 | bool negotiating; /* true if negotiating protocol */ |
68 | const char *name; /* entity name */ | 68 | const char *name; /* entity name */ |
69 | u64 global_id; /* our unique id in system */ | 69 | u64 global_id; /* our unique id in system */ |
70 | const char *secret; /* our secret key */ | 70 | const struct ceph_crypto_key *key; /* our secret key */ |
71 | unsigned want_keys; /* which services we want */ | 71 | unsigned want_keys; /* which services we want */ |
72 | }; | 72 | }; |
73 | 73 | ||
74 | extern struct ceph_auth_client *ceph_auth_init(const char *name, | 74 | extern struct ceph_auth_client *ceph_auth_init(const char *name, |
75 | const char *secret); | 75 | const struct ceph_crypto_key *key); |
76 | extern void ceph_auth_destroy(struct ceph_auth_client *ac); | 76 | extern void ceph_auth_destroy(struct ceph_auth_client *ac); |
77 | 77 | ||
78 | extern void ceph_auth_reset(struct ceph_auth_client *ac); | 78 | extern void ceph_auth_reset(struct ceph_auth_client *ac); |
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 0d2e0fffb470..6365f041745b 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
@@ -61,7 +61,7 @@ struct ceph_options { | |||
61 | pointer type of args */ | 61 | pointer type of args */ |
62 | int num_mon; | 62 | int num_mon; |
63 | char *name; | 63 | char *name; |
64 | char *secret; | 64 | struct ceph_crypto_key *key; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h index 6f9f19d66591..b454dfce60d9 100644 --- a/include/linux/cfag12864b.h +++ b/include/linux/cfag12864b.h | |||
@@ -44,7 +44,7 @@ extern unsigned char * cfag12864b_buffer; | |||
44 | /* | 44 | /* |
45 | * Get the refresh rate of the LCD | 45 | * Get the refresh rate of the LCD |
46 | * | 46 | * |
47 | * Returns the refresh rate (hertzs). | 47 | * Returns the refresh rate (hertz). |
48 | */ | 48 | */ |
49 | extern unsigned int cfag12864b_getrate(void); | 49 | extern unsigned int cfag12864b_getrate(void); |
50 | 50 | ||
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e654fa239916..5ac7ebc36dbb 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -240,7 +240,7 @@ struct cgroup { | |||
240 | /* For RCU-protected deletion */ | 240 | /* For RCU-protected deletion */ |
241 | struct rcu_head rcu_head; | 241 | struct rcu_head rcu_head; |
242 | 242 | ||
243 | /* List of events which userspace want to recieve */ | 243 | /* List of events which userspace want to receive */ |
244 | struct list_head event_list; | 244 | struct list_head event_list; |
245 | spinlock_t event_list_lock; | 245 | spinlock_t event_list_lock; |
246 | }; | 246 | }; |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index fc53492b6ad7..d6733e27af34 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -56,46 +56,52 @@ enum clock_event_nofitiers { | |||
56 | 56 | ||
57 | /** | 57 | /** |
58 | * struct clock_event_device - clock event device descriptor | 58 | * struct clock_event_device - clock event device descriptor |
59 | * @name: ptr to clock event name | 59 | * @event_handler: Assigned by the framework to be called by the low |
60 | * @features: features | 60 | * level handler of the event source |
61 | * @set_next_event: set next event function | ||
62 | * @next_event: local storage for the next event in oneshot mode | ||
61 | * @max_delta_ns: maximum delta value in ns | 63 | * @max_delta_ns: maximum delta value in ns |
62 | * @min_delta_ns: minimum delta value in ns | 64 | * @min_delta_ns: minimum delta value in ns |
63 | * @mult: nanosecond to cycles multiplier | 65 | * @mult: nanosecond to cycles multiplier |
64 | * @shift: nanoseconds to cycles divisor (power of two) | 66 | * @shift: nanoseconds to cycles divisor (power of two) |
67 | * @mode: operating mode assigned by the management code | ||
68 | * @features: features | ||
69 | * @retries: number of forced programming retries | ||
70 | * @set_mode: set mode function | ||
71 | * @broadcast: function to broadcast events | ||
72 | * @min_delta_ticks: minimum delta value in ticks stored for reconfiguration | ||
73 | * @max_delta_ticks: maximum delta value in ticks stored for reconfiguration | ||
74 | * @name: ptr to clock event name | ||
65 | * @rating: variable to rate clock event devices | 75 | * @rating: variable to rate clock event devices |
66 | * @irq: IRQ number (only for non CPU local devices) | 76 | * @irq: IRQ number (only for non CPU local devices) |
67 | * @cpumask: cpumask to indicate for which CPUs this device works | 77 | * @cpumask: cpumask to indicate for which CPUs this device works |
68 | * @set_next_event: set next event function | ||
69 | * @set_mode: set mode function | ||
70 | * @event_handler: Assigned by the framework to be called by the low | ||
71 | * level handler of the event source | ||
72 | * @broadcast: function to broadcast events | ||
73 | * @list: list head for the management code | 78 | * @list: list head for the management code |
74 | * @mode: operating mode assigned by the management code | ||
75 | * @next_event: local storage for the next event in oneshot mode | ||
76 | * @retries: number of forced programming retries | ||
77 | */ | 79 | */ |
78 | struct clock_event_device { | 80 | struct clock_event_device { |
79 | const char *name; | 81 | void (*event_handler)(struct clock_event_device *); |
80 | unsigned int features; | 82 | int (*set_next_event)(unsigned long evt, |
83 | struct clock_event_device *); | ||
84 | ktime_t next_event; | ||
81 | u64 max_delta_ns; | 85 | u64 max_delta_ns; |
82 | u64 min_delta_ns; | 86 | u64 min_delta_ns; |
83 | u32 mult; | 87 | u32 mult; |
84 | u32 shift; | 88 | u32 shift; |
89 | enum clock_event_mode mode; | ||
90 | unsigned int features; | ||
91 | unsigned long retries; | ||
92 | |||
93 | void (*broadcast)(const struct cpumask *mask); | ||
94 | void (*set_mode)(enum clock_event_mode mode, | ||
95 | struct clock_event_device *); | ||
96 | unsigned long min_delta_ticks; | ||
97 | unsigned long max_delta_ticks; | ||
98 | |||
99 | const char *name; | ||
85 | int rating; | 100 | int rating; |
86 | int irq; | 101 | int irq; |
87 | const struct cpumask *cpumask; | 102 | const struct cpumask *cpumask; |
88 | int (*set_next_event)(unsigned long evt, | ||
89 | struct clock_event_device *); | ||
90 | void (*set_mode)(enum clock_event_mode mode, | ||
91 | struct clock_event_device *); | ||
92 | void (*event_handler)(struct clock_event_device *); | ||
93 | void (*broadcast)(const struct cpumask *mask); | ||
94 | struct list_head list; | 103 | struct list_head list; |
95 | enum clock_event_mode mode; | 104 | } ____cacheline_aligned; |
96 | ktime_t next_event; | ||
97 | unsigned long retries; | ||
98 | }; | ||
99 | 105 | ||
100 | /* | 106 | /* |
101 | * Calculate a multiplication factor for scaled math, which is used to convert | 107 | * Calculate a multiplication factor for scaled math, which is used to convert |
@@ -122,6 +128,12 @@ extern u64 clockevent_delta2ns(unsigned long latch, | |||
122 | struct clock_event_device *evt); | 128 | struct clock_event_device *evt); |
123 | extern void clockevents_register_device(struct clock_event_device *dev); | 129 | extern void clockevents_register_device(struct clock_event_device *dev); |
124 | 130 | ||
131 | extern void clockevents_config_and_register(struct clock_event_device *dev, | ||
132 | u32 freq, unsigned long min_delta, | ||
133 | unsigned long max_delta); | ||
134 | |||
135 | extern int clockevents_update_freq(struct clock_event_device *ce, u32 freq); | ||
136 | |||
125 | extern void clockevents_exchange_device(struct clock_event_device *old, | 137 | extern void clockevents_exchange_device(struct clock_event_device *old, |
126 | struct clock_event_device *new); | 138 | struct clock_event_device *new); |
127 | extern void clockevents_set_mode(struct clock_event_device *dev, | 139 | extern void clockevents_set_mode(struct clock_event_device *dev, |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index c37b21ad5a3b..d4646b48dc4a 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -159,42 +159,38 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
159 | */ | 159 | */ |
160 | struct clocksource { | 160 | struct clocksource { |
161 | /* | 161 | /* |
162 | * First part of structure is read mostly | 162 | * Hotpath data, fits in a single cache line when the |
163 | * clocksource itself is cacheline aligned. | ||
163 | */ | 164 | */ |
164 | char *name; | ||
165 | struct list_head list; | ||
166 | int rating; | ||
167 | cycle_t (*read)(struct clocksource *cs); | 165 | cycle_t (*read)(struct clocksource *cs); |
168 | int (*enable)(struct clocksource *cs); | 166 | cycle_t cycle_last; |
169 | void (*disable)(struct clocksource *cs); | ||
170 | cycle_t mask; | 167 | cycle_t mask; |
171 | u32 mult; | 168 | u32 mult; |
172 | u32 shift; | 169 | u32 shift; |
173 | u64 max_idle_ns; | 170 | u64 max_idle_ns; |
174 | unsigned long flags; | 171 | |
175 | cycle_t (*vread)(void); | ||
176 | void (*suspend)(struct clocksource *cs); | ||
177 | void (*resume)(struct clocksource *cs); | ||
178 | #ifdef CONFIG_IA64 | 172 | #ifdef CONFIG_IA64 |
179 | void *fsys_mmio; /* used by fsyscall asm code */ | 173 | void *fsys_mmio; /* used by fsyscall asm code */ |
180 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) ((mmio) = (addr)) | 174 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) ((mmio) = (addr)) |
181 | #else | 175 | #else |
182 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) do { } while (0) | 176 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) do { } while (0) |
183 | #endif | 177 | #endif |
184 | 178 | const char *name; | |
185 | /* | 179 | struct list_head list; |
186 | * Second part is written at each timer interrupt | 180 | int rating; |
187 | * Keep it in a different cache line to dirty no | 181 | cycle_t (*vread)(void); |
188 | * more than one cache line. | 182 | int (*enable)(struct clocksource *cs); |
189 | */ | 183 | void (*disable)(struct clocksource *cs); |
190 | cycle_t cycle_last ____cacheline_aligned_in_smp; | 184 | unsigned long flags; |
185 | void (*suspend)(struct clocksource *cs); | ||
186 | void (*resume)(struct clocksource *cs); | ||
191 | 187 | ||
192 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | 188 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG |
193 | /* Watchdog related data, used by the framework */ | 189 | /* Watchdog related data, used by the framework */ |
194 | struct list_head wd_list; | 190 | struct list_head wd_list; |
195 | cycle_t wd_last; | 191 | cycle_t wd_last; |
196 | #endif | 192 | #endif |
197 | }; | 193 | } ____cacheline_aligned; |
198 | 194 | ||
199 | /* | 195 | /* |
200 | * Clock source flags bits:: | 196 | * Clock source flags bits:: |
@@ -341,4 +337,14 @@ static inline void update_vsyscall_tz(void) | |||
341 | 337 | ||
342 | extern void timekeeping_notify(struct clocksource *clock); | 338 | extern void timekeeping_notify(struct clocksource *clock); |
343 | 339 | ||
340 | extern cycle_t clocksource_mmio_readl_up(struct clocksource *); | ||
341 | extern cycle_t clocksource_mmio_readl_down(struct clocksource *); | ||
342 | extern cycle_t clocksource_mmio_readw_up(struct clocksource *); | ||
343 | extern cycle_t clocksource_mmio_readw_down(struct clocksource *); | ||
344 | |||
345 | extern int clocksource_mmio_init(void __iomem *, const char *, | ||
346 | unsigned long, int, unsigned, cycle_t (*)(struct clocksource *)); | ||
347 | |||
348 | extern int clocksource_i8253_init(void); | ||
349 | |||
344 | #endif /* _LINUX_CLOCKSOURCE_H */ | 350 | #endif /* _LINUX_CLOCKSOURCE_H */ |
diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h index 72bfefdbd767..3c4aac406175 100644 --- a/include/linux/cm4000_cs.h +++ b/include/linux/cm4000_cs.h | |||
@@ -20,7 +20,7 @@ typedef struct atreq { | |||
20 | } atreq_t; | 20 | } atreq_t; |
21 | 21 | ||
22 | 22 | ||
23 | /* what is particularly stupid in the original driver is the arch-dependant | 23 | /* what is particularly stupid in the original driver is the arch-dependent |
24 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace | 24 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace |
25 | * will lay out the structure members differently than the 64bit kernel. | 25 | * will lay out the structure members differently than the 64bit kernel. |
26 | * | 26 | * |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index ddb7a97c78c2..645778ad899b 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -218,7 +218,7 @@ static ssize_t _item##_attr_store(struct config_item *item, \ | |||
218 | * group children. default_groups may coexist alongsize make_group() or | 218 | * group children. default_groups may coexist alongsize make_group() or |
219 | * make_item(), but if the group wishes to have only default_groups | 219 | * make_item(), but if the group wishes to have only default_groups |
220 | * children (disallowing mkdir(2)), it need not provide either function. | 220 | * children (disallowing mkdir(2)), it need not provide either function. |
221 | * If the group has commit(), it supports pending and commited (active) | 221 | * If the group has commit(), it supports pending and committed (active) |
222 | * items. | 222 | * items. |
223 | */ | 223 | */ |
224 | struct configfs_item_operations { | 224 | struct configfs_item_operations { |
diff --git a/include/linux/connector.h b/include/linux/connector.h index bcafc942e5e4..7c60d0942adb 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -88,8 +88,6 @@ struct cn_queue_dev { | |||
88 | atomic_t refcnt; | 88 | atomic_t refcnt; |
89 | unsigned char name[CN_CBQ_NAMELEN]; | 89 | unsigned char name[CN_CBQ_NAMELEN]; |
90 | 90 | ||
91 | struct workqueue_struct *cn_queue; | ||
92 | |||
93 | struct list_head queue_list; | 91 | struct list_head queue_list; |
94 | spinlock_t queue_lock; | 92 | spinlock_t queue_lock; |
95 | 93 | ||
@@ -101,20 +99,13 @@ struct cn_callback_id { | |||
101 | struct cb_id id; | 99 | struct cb_id id; |
102 | }; | 100 | }; |
103 | 101 | ||
104 | struct cn_callback_data { | ||
105 | struct sk_buff *skb; | ||
106 | void (*callback) (struct cn_msg *, struct netlink_skb_parms *); | ||
107 | |||
108 | void *free; | ||
109 | }; | ||
110 | |||
111 | struct cn_callback_entry { | 102 | struct cn_callback_entry { |
112 | struct list_head callback_entry; | 103 | struct list_head callback_entry; |
113 | struct work_struct work; | 104 | atomic_t refcnt; |
114 | struct cn_queue_dev *pdev; | 105 | struct cn_queue_dev *pdev; |
115 | 106 | ||
116 | struct cn_callback_id id; | 107 | struct cn_callback_id id; |
117 | struct cn_callback_data data; | 108 | void (*callback) (struct cn_msg *, struct netlink_skb_parms *); |
118 | 109 | ||
119 | u32 seq, group; | 110 | u32 seq, group; |
120 | }; | 111 | }; |
@@ -138,13 +129,12 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name, | |||
138 | struct cb_id *id, | 129 | struct cb_id *id, |
139 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); | 130 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); |
140 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 131 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
132 | void cn_queue_release_callback(struct cn_callback_entry *); | ||
141 | 133 | ||
142 | struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *); | 134 | struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *); |
143 | void cn_queue_free_dev(struct cn_queue_dev *dev); | 135 | void cn_queue_free_dev(struct cn_queue_dev *dev); |
144 | 136 | ||
145 | int cn_cb_equal(struct cb_id *, struct cb_id *); | 137 | int cn_cb_equal(struct cb_id *, struct cb_id *); |
146 | 138 | ||
147 | void cn_queue_wrapper(struct work_struct *work); | ||
148 | |||
149 | #endif /* __KERNEL__ */ | 139 | #endif /* __KERNEL__ */ |
150 | #endif /* __CONNECTOR_H */ | 140 | #endif /* __CONNECTOR_H */ |
diff --git a/include/linux/cper.h b/include/linux/cper.h index 372a25839fd1..c23049496531 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.h | |||
@@ -310,7 +310,7 @@ struct cper_sec_proc_ia { | |||
310 | __u8 cpuid[48]; | 310 | __u8 cpuid[48]; |
311 | }; | 311 | }; |
312 | 312 | ||
313 | /* IA32/X64 Processor Error Infomation Structure */ | 313 | /* IA32/X64 Processor Error Information Structure */ |
314 | struct cper_ia_err_info { | 314 | struct cper_ia_err_info { |
315 | uuid_le err_type; | 315 | uuid_le err_type; |
316 | __u64 validation_bits; | 316 | __u64 validation_bits; |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 9343dd3de858..11be48e0d168 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001 Russell King | 4 | * Copyright (C) 2001 Russell King |
5 | * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> | 5 | * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
@@ -56,9 +56,9 @@ static inline int cpufreq_unregister_notifier(struct notifier_block *nb, | |||
56 | #define CPUFREQ_POLICY_POWERSAVE (1) | 56 | #define CPUFREQ_POLICY_POWERSAVE (1) |
57 | #define CPUFREQ_POLICY_PERFORMANCE (2) | 57 | #define CPUFREQ_POLICY_PERFORMANCE (2) |
58 | 58 | ||
59 | /* Frequency values here are CPU kHz so that hardware which doesn't run | 59 | /* Frequency values here are CPU kHz so that hardware which doesn't run |
60 | * with some frequencies can complain without having to guess what per | 60 | * with some frequencies can complain without having to guess what per |
61 | * cent / per mille means. | 61 | * cent / per mille means. |
62 | * Maximum transition latency is in nanoseconds - if it's unknown, | 62 | * Maximum transition latency is in nanoseconds - if it's unknown, |
63 | * CPUFREQ_ETERNAL shall be used. | 63 | * CPUFREQ_ETERNAL shall be used. |
64 | */ | 64 | */ |
@@ -72,13 +72,15 @@ extern struct kobject *cpufreq_global_kobject; | |||
72 | struct cpufreq_cpuinfo { | 72 | struct cpufreq_cpuinfo { |
73 | unsigned int max_freq; | 73 | unsigned int max_freq; |
74 | unsigned int min_freq; | 74 | unsigned int min_freq; |
75 | unsigned int transition_latency; /* in 10^(-9) s = nanoseconds */ | 75 | |
76 | /* in 10^(-9) s = nanoseconds */ | ||
77 | unsigned int transition_latency; | ||
76 | }; | 78 | }; |
77 | 79 | ||
78 | struct cpufreq_real_policy { | 80 | struct cpufreq_real_policy { |
79 | unsigned int min; /* in kHz */ | 81 | unsigned int min; /* in kHz */ |
80 | unsigned int max; /* in kHz */ | 82 | unsigned int max; /* in kHz */ |
81 | unsigned int policy; /* see above */ | 83 | unsigned int policy; /* see above */ |
82 | struct cpufreq_governor *governor; /* see below */ | 84 | struct cpufreq_governor *governor; /* see below */ |
83 | }; | 85 | }; |
84 | 86 | ||
@@ -94,7 +96,7 @@ struct cpufreq_policy { | |||
94 | unsigned int max; /* in kHz */ | 96 | unsigned int max; /* in kHz */ |
95 | unsigned int cur; /* in kHz, only needed if cpufreq | 97 | unsigned int cur; /* in kHz, only needed if cpufreq |
96 | * governors are used */ | 98 | * governors are used */ |
97 | unsigned int policy; /* see above */ | 99 | unsigned int policy; /* see above */ |
98 | struct cpufreq_governor *governor; /* see below */ | 100 | struct cpufreq_governor *governor; /* see below */ |
99 | 101 | ||
100 | struct work_struct update; /* if update_policy() needs to be | 102 | struct work_struct update; /* if update_policy() needs to be |
@@ -167,11 +169,11 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu | |||
167 | 169 | ||
168 | struct cpufreq_governor { | 170 | struct cpufreq_governor { |
169 | char name[CPUFREQ_NAME_LEN]; | 171 | char name[CPUFREQ_NAME_LEN]; |
170 | int (*governor) (struct cpufreq_policy *policy, | 172 | int (*governor) (struct cpufreq_policy *policy, |
171 | unsigned int event); | 173 | unsigned int event); |
172 | ssize_t (*show_setspeed) (struct cpufreq_policy *policy, | 174 | ssize_t (*show_setspeed) (struct cpufreq_policy *policy, |
173 | char *buf); | 175 | char *buf); |
174 | int (*store_setspeed) (struct cpufreq_policy *policy, | 176 | int (*store_setspeed) (struct cpufreq_policy *policy, |
175 | unsigned int freq); | 177 | unsigned int freq); |
176 | unsigned int max_transition_latency; /* HW must be able to switch to | 178 | unsigned int max_transition_latency; /* HW must be able to switch to |
177 | next freq faster than this value in nano secs or we | 179 | next freq faster than this value in nano secs or we |
@@ -180,7 +182,8 @@ struct cpufreq_governor { | |||
180 | struct module *owner; | 182 | struct module *owner; |
181 | }; | 183 | }; |
182 | 184 | ||
183 | /* pass a target to the cpufreq driver | 185 | /* |
186 | * Pass a target to the cpufreq driver. | ||
184 | */ | 187 | */ |
185 | extern int cpufreq_driver_target(struct cpufreq_policy *policy, | 188 | extern int cpufreq_driver_target(struct cpufreq_policy *policy, |
186 | unsigned int target_freq, | 189 | unsigned int target_freq, |
@@ -237,9 +240,9 @@ struct cpufreq_driver { | |||
237 | 240 | ||
238 | /* flags */ | 241 | /* flags */ |
239 | 242 | ||
240 | #define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if | 243 | #define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if |
241 | * all ->init() calls failed */ | 244 | * all ->init() calls failed */ |
242 | #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel | 245 | #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel |
243 | * "constants" aren't affected by | 246 | * "constants" aren't affected by |
244 | * frequency transitions */ | 247 | * frequency transitions */ |
245 | #define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed | 248 | #define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed |
@@ -252,7 +255,7 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | |||
252 | void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); | 255 | void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); |
253 | 256 | ||
254 | 257 | ||
255 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) | 258 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) |
256 | { | 259 | { |
257 | if (policy->min < min) | 260 | if (policy->min < min) |
258 | policy->min = min; | 261 | policy->min = min; |
@@ -386,34 +389,15 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, | |||
386 | /* the following 3 funtions are for cpufreq core use only */ | 389 | /* the following 3 funtions are for cpufreq core use only */ |
387 | struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); | 390 | struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); |
388 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); | 391 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); |
389 | void cpufreq_cpu_put (struct cpufreq_policy *data); | 392 | void cpufreq_cpu_put(struct cpufreq_policy *data); |
390 | 393 | ||
391 | /* the following are really really optional */ | 394 | /* the following are really really optional */ |
392 | extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; | 395 | extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; |
393 | 396 | ||
394 | void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, | 397 | void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, |
395 | unsigned int cpu); | 398 | unsigned int cpu); |
396 | 399 | ||
397 | void cpufreq_frequency_table_put_attr(unsigned int cpu); | 400 | void cpufreq_frequency_table_put_attr(unsigned int cpu); |
398 | 401 | ||
399 | 402 | ||
400 | /********************************************************************* | ||
401 | * UNIFIED DEBUG HELPERS * | ||
402 | *********************************************************************/ | ||
403 | |||
404 | #define CPUFREQ_DEBUG_CORE 1 | ||
405 | #define CPUFREQ_DEBUG_DRIVER 2 | ||
406 | #define CPUFREQ_DEBUG_GOVERNOR 4 | ||
407 | |||
408 | #ifdef CONFIG_CPU_FREQ_DEBUG | ||
409 | |||
410 | extern void cpufreq_debug_printk(unsigned int type, const char *prefix, | ||
411 | const char *fmt, ...); | ||
412 | |||
413 | #else | ||
414 | |||
415 | #define cpufreq_debug_printk(msg...) do { } while(0) | ||
416 | |||
417 | #endif /* CONFIG_CPU_FREQ_DEBUG */ | ||
418 | |||
419 | #endif /* _LINUX_CPUFREQ_H */ | 403 | #endif /* _LINUX_CPUFREQ_H */ |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 9aeeb0ba2003..be16b61283cc 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -146,6 +146,7 @@ struct cred { | |||
146 | void *security; /* subjective LSM security */ | 146 | void *security; /* subjective LSM security */ |
147 | #endif | 147 | #endif |
148 | struct user_struct *user; /* real user ID subscription */ | 148 | struct user_struct *user; /* real user ID subscription */ |
149 | struct user_namespace *user_ns; /* cached user->user_ns */ | ||
149 | struct group_info *group_info; /* supplementary groups for euid/fsgid */ | 150 | struct group_info *group_info; /* supplementary groups for euid/fsgid */ |
150 | struct rcu_head rcu; /* RCU deletion hook */ | 151 | struct rcu_head rcu; /* RCU deletion hook */ |
151 | }; | 152 | }; |
@@ -354,10 +355,15 @@ static inline void put_cred(const struct cred *_cred) | |||
354 | #define current_fsgid() (current_cred_xxx(fsgid)) | 355 | #define current_fsgid() (current_cred_xxx(fsgid)) |
355 | #define current_cap() (current_cred_xxx(cap_effective)) | 356 | #define current_cap() (current_cred_xxx(cap_effective)) |
356 | #define current_user() (current_cred_xxx(user)) | 357 | #define current_user() (current_cred_xxx(user)) |
357 | #define _current_user_ns() (current_cred_xxx(user)->user_ns) | ||
358 | #define current_security() (current_cred_xxx(security)) | 358 | #define current_security() (current_cred_xxx(security)) |
359 | 359 | ||
360 | extern struct user_namespace *current_user_ns(void); | 360 | #ifdef CONFIG_USER_NS |
361 | #define current_user_ns() (current_cred_xxx(user_ns)) | ||
362 | #else | ||
363 | extern struct user_namespace init_user_ns; | ||
364 | #define current_user_ns() (&init_user_ns) | ||
365 | #endif | ||
366 | |||
361 | 367 | ||
362 | #define current_uid_gid(_uid, _gid) \ | 368 | #define current_uid_gid(_uid, _gid) \ |
363 | do { \ | 369 | do { \ |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index f2afed4fa945..19d90a55541d 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -197,7 +197,7 @@ struct dentry_operations { | |||
197 | * typically using d_splice_alias. */ | 197 | * typically using d_splice_alias. */ |
198 | 198 | ||
199 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ | 199 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ |
200 | #define DCACHE_UNHASHED 0x0010 | 200 | #define DCACHE_RCUACCESS 0x0010 /* Entry has ever been RCU-visible */ |
201 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 | 201 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 |
202 | /* Parent inode is watched by inotify */ | 202 | /* Parent inode is watched by inotify */ |
203 | 203 | ||
@@ -384,7 +384,7 @@ extern struct dentry *dget_parent(struct dentry *dentry); | |||
384 | 384 | ||
385 | static inline int d_unhashed(struct dentry *dentry) | 385 | static inline int d_unhashed(struct dentry *dentry) |
386 | { | 386 | { |
387 | return (dentry->d_flags & DCACHE_UNHASHED); | 387 | return hlist_bl_unhashed(&dentry->d_hash); |
388 | } | 388 | } |
389 | 389 | ||
390 | static inline int d_unlinked(struct dentry *dentry) | 390 | static inline int d_unlinked(struct dentry *dentry) |
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h index 4cb72b920c74..7925bf0ee836 100644 --- a/include/linux/decompress/mm.h +++ b/include/linux/decompress/mm.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | /* | 17 | /* |
18 | * Some architectures want to ensure there is no local data in their | 18 | * Some architectures want to ensure there is no local data in their |
19 | * pre-boot environment, so that data can arbitarily relocated (via | 19 | * pre-boot environment, so that data can arbitrarily relocated (via |
20 | * GOT references). This is achieved by defining STATIC_RW_DATA to | 20 | * GOT references). This is achieved by defining STATIC_RW_DATA to |
21 | * be null. | 21 | * be null. |
22 | */ | 22 | */ |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index e2768834f397..32a4423710f5 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -197,7 +197,6 @@ struct dm_target { | |||
197 | struct dm_target_callbacks { | 197 | struct dm_target_callbacks { |
198 | struct list_head list; | 198 | struct list_head list; |
199 | int (*congested_fn) (struct dm_target_callbacks *, int); | 199 | int (*congested_fn) (struct dm_target_callbacks *, int); |
200 | void (*unplug_fn)(struct dm_target_callbacks *); | ||
201 | }; | 200 | }; |
202 | 201 | ||
203 | int dm_register_target(struct target_type *t); | 202 | int dm_register_target(struct target_type *t); |
diff --git a/include/linux/device.h b/include/linux/device.h index ab8dfc095709..c66111affca9 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -47,6 +47,38 @@ extern int __must_check bus_create_file(struct bus_type *, | |||
47 | struct bus_attribute *); | 47 | struct bus_attribute *); |
48 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | 48 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); |
49 | 49 | ||
50 | /** | ||
51 | * struct bus_type - The bus type of the device | ||
52 | * | ||
53 | * @name: The name of the bus. | ||
54 | * @bus_attrs: Default attributes of the bus. | ||
55 | * @dev_attrs: Default attributes of the devices on the bus. | ||
56 | * @drv_attrs: Default attributes of the device drivers on the bus. | ||
57 | * @match: Called, perhaps multiple times, whenever a new device or driver | ||
58 | * is added for this bus. It should return a nonzero value if the | ||
59 | * given device can be handled by the given driver. | ||
60 | * @uevent: Called when a device is added, removed, or a few other things | ||
61 | * that generate uevents to add the environment variables. | ||
62 | * @probe: Called when a new device or driver add to this bus, and callback | ||
63 | * the specific driver's probe to initial the matched device. | ||
64 | * @remove: Called when a device removed from this bus. | ||
65 | * @shutdown: Called at shut-down time to quiesce the device. | ||
66 | * @suspend: Called when a device on this bus wants to go to sleep mode. | ||
67 | * @resume: Called to bring a device on this bus out of sleep mode. | ||
68 | * @pm: Power management operations of this bus, callback the specific | ||
69 | * device driver's pm-ops. | ||
70 | * @p: The private data of the driver core, only the driver core can | ||
71 | * touch this. | ||
72 | * | ||
73 | * A bus is a channel between the processor and one or more devices. For the | ||
74 | * purposes of the device model, all devices are connected via a bus, even if | ||
75 | * it is an internal, virtual, "platform" bus. Buses can plug into each other. | ||
76 | * A USB controller is usually a PCI device, for example. The device model | ||
77 | * represents the actual connections between buses and the devices they control. | ||
78 | * A bus is represented by the bus_type structure. It contains the name, the | ||
79 | * default attributes, the bus' methods, PM operations, and the driver core's | ||
80 | * private data. | ||
81 | */ | ||
50 | struct bus_type { | 82 | struct bus_type { |
51 | const char *name; | 83 | const char *name; |
52 | struct bus_attribute *bus_attrs; | 84 | struct bus_attribute *bus_attrs; |
@@ -119,6 +151,37 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
119 | extern struct kset *bus_get_kset(struct bus_type *bus); | 151 | extern struct kset *bus_get_kset(struct bus_type *bus); |
120 | extern struct klist *bus_get_device_klist(struct bus_type *bus); | 152 | extern struct klist *bus_get_device_klist(struct bus_type *bus); |
121 | 153 | ||
154 | /** | ||
155 | * struct device_driver - The basic device driver structure | ||
156 | * @name: Name of the device driver. | ||
157 | * @bus: The bus which the device of this driver belongs to. | ||
158 | * @owner: The module owner. | ||
159 | * @mod_name: Used for built-in modules. | ||
160 | * @suppress_bind_attrs: Disables bind/unbind via sysfs. | ||
161 | * @of_match_table: The open firmware table. | ||
162 | * @probe: Called to query the existence of a specific device, | ||
163 | * whether this driver can work with it, and bind the driver | ||
164 | * to a specific device. | ||
165 | * @remove: Called when the device is removed from the system to | ||
166 | * unbind a device from this driver. | ||
167 | * @shutdown: Called at shut-down time to quiesce the device. | ||
168 | * @suspend: Called to put the device to sleep mode. Usually to a | ||
169 | * low power state. | ||
170 | * @resume: Called to bring a device from sleep mode. | ||
171 | * @groups: Default attributes that get created by the driver core | ||
172 | * automatically. | ||
173 | * @pm: Power management operations of the device which matched | ||
174 | * this driver. | ||
175 | * @p: Driver core's private data, no one other than the driver | ||
176 | * core can touch this. | ||
177 | * | ||
178 | * The device driver-model tracks all of the drivers known to the system. | ||
179 | * The main reason for this tracking is to enable the driver core to match | ||
180 | * up drivers with new devices. Once drivers are known objects within the | ||
181 | * system, however, a number of other things become possible. Device drivers | ||
182 | * can export information and configuration variables that are independent | ||
183 | * of any specific device. | ||
184 | */ | ||
122 | struct device_driver { | 185 | struct device_driver { |
123 | const char *name; | 186 | const char *name; |
124 | struct bus_type *bus; | 187 | struct bus_type *bus; |
@@ -185,8 +248,34 @@ struct device *driver_find_device(struct device_driver *drv, | |||
185 | struct device *start, void *data, | 248 | struct device *start, void *data, |
186 | int (*match)(struct device *dev, void *data)); | 249 | int (*match)(struct device *dev, void *data)); |
187 | 250 | ||
188 | /* | 251 | /** |
189 | * device classes | 252 | * struct class - device classes |
253 | * @name: Name of the class. | ||
254 | * @owner: The module owner. | ||
255 | * @class_attrs: Default attributes of this class. | ||
256 | * @dev_attrs: Default attributes of the devices belong to the class. | ||
257 | * @dev_bin_attrs: Default binary attributes of the devices belong to the class. | ||
258 | * @dev_kobj: The kobject that represents this class and links it into the hierarchy. | ||
259 | * @dev_uevent: Called when a device is added, removed from this class, or a | ||
260 | * few other things that generate uevents to add the environment | ||
261 | * variables. | ||
262 | * @devnode: Callback to provide the devtmpfs. | ||
263 | * @class_release: Called to release this class. | ||
264 | * @dev_release: Called to release the device. | ||
265 | * @suspend: Used to put the device to sleep mode, usually to a low power | ||
266 | * state. | ||
267 | * @resume: Used to bring the device from the sleep mode. | ||
268 | * @ns_type: Callbacks so sysfs can detemine namespaces. | ||
269 | * @namespace: Namespace of the device belongs to this class. | ||
270 | * @pm: The default device power management operations of this class. | ||
271 | * @p: The private data of the driver core, no one other than the | ||
272 | * driver core can touch this. | ||
273 | * | ||
274 | * A class is a higher-level view of a device that abstracts out low-level | ||
275 | * implementation details. Drivers may see a SCSI disk or an ATA disk, but, | ||
276 | * at the class level, they are all simply disks. Classes allow user space | ||
277 | * to work with devices based on what they do, rather than how they are | ||
278 | * connected or how they work. | ||
190 | */ | 279 | */ |
191 | struct class { | 280 | struct class { |
192 | const char *name; | 281 | const char *name; |
@@ -401,6 +490,65 @@ struct device_dma_parameters { | |||
401 | unsigned long segment_boundary_mask; | 490 | unsigned long segment_boundary_mask; |
402 | }; | 491 | }; |
403 | 492 | ||
493 | /** | ||
494 | * struct device - The basic device structure | ||
495 | * @parent: The device's "parent" device, the device to which it is attached. | ||
496 | * In most cases, a parent device is some sort of bus or host | ||
497 | * controller. If parent is NULL, the device, is a top-level device, | ||
498 | * which is not usually what you want. | ||
499 | * @p: Holds the private data of the driver core portions of the device. | ||
500 | * See the comment of the struct device_private for detail. | ||
501 | * @kobj: A top-level, abstract class from which other classes are derived. | ||
502 | * @init_name: Initial name of the device. | ||
503 | * @type: The type of device. | ||
504 | * This identifies the device type and carries type-specific | ||
505 | * information. | ||
506 | * @mutex: Mutex to synchronize calls to its driver. | ||
507 | * @bus: Type of bus device is on. | ||
508 | * @driver: Which driver has allocated this | ||
509 | * @platform_data: Platform data specific to the device. | ||
510 | * Example: For devices on custom boards, as typical of embedded | ||
511 | * and SOC based hardware, Linux often uses platform_data to point | ||
512 | * to board-specific structures describing devices and how they | ||
513 | * are wired. That can include what ports are available, chip | ||
514 | * variants, which GPIO pins act in what additional roles, and so | ||
515 | * on. This shrinks the "Board Support Packages" (BSPs) and | ||
516 | * minimizes board-specific #ifdefs in drivers. | ||
517 | * @power: For device power management. | ||
518 | * See Documentation/power/devices.txt for details. | ||
519 | * @pwr_domain: Provide callbacks that are executed during system suspend, | ||
520 | * hibernation, system resume and during runtime PM transitions | ||
521 | * along with subsystem-level and driver-level callbacks. | ||
522 | * @numa_node: NUMA node this device is close to. | ||
523 | * @dma_mask: Dma mask (if dma'ble device). | ||
524 | * @coherent_dma_mask: Like dma_mask, but for alloc_coherent mapping as not all | ||
525 | * hardware supports 64-bit addresses for consistent allocations | ||
526 | * such descriptors. | ||
527 | * @dma_parms: A low level driver may set these to teach IOMMU code about | ||
528 | * segment limitations. | ||
529 | * @dma_pools: Dma pools (if dma'ble device). | ||
530 | * @dma_mem: Internal for coherent mem override. | ||
531 | * @archdata: For arch-specific additions. | ||
532 | * @of_node: Associated device tree node. | ||
533 | * @of_match: Matching of_device_id from driver. | ||
534 | * @devt: For creating the sysfs "dev". | ||
535 | * @devres_lock: Spinlock to protect the resource of the device. | ||
536 | * @devres_head: The resources list of the device. | ||
537 | * @knode_class: The node used to add the device to the class list. | ||
538 | * @class: The class of the device. | ||
539 | * @groups: Optional attribute groups. | ||
540 | * @release: Callback to free the device after all references have | ||
541 | * gone away. This should be set by the allocator of the | ||
542 | * device (i.e. the bus driver that discovered the device). | ||
543 | * | ||
544 | * At the lowest level, every device in a Linux system is represented by an | ||
545 | * instance of struct device. The device structure contains the information | ||
546 | * that the device model core needs to model the system. Most subsystems, | ||
547 | * however, track additional information about the devices they host. As a | ||
548 | * result, it is rare for devices to be represented by bare device structures; | ||
549 | * instead, that structure, like kobject structures, is usually embedded within | ||
550 | * a higher-level representation of the device. | ||
551 | */ | ||
404 | struct device { | 552 | struct device { |
405 | struct device *parent; | 553 | struct device *parent; |
406 | 554 | ||
@@ -408,7 +556,7 @@ struct device { | |||
408 | 556 | ||
409 | struct kobject kobj; | 557 | struct kobject kobj; |
410 | const char *init_name; /* initial name of the device */ | 558 | const char *init_name; /* initial name of the device */ |
411 | struct device_type *type; | 559 | const struct device_type *type; |
412 | 560 | ||
413 | struct mutex mutex; /* mutex to synchronize calls to | 561 | struct mutex mutex; /* mutex to synchronize calls to |
414 | * its driver. | 562 | * its driver. |
@@ -442,7 +590,6 @@ struct device { | |||
442 | struct dev_archdata archdata; | 590 | struct dev_archdata archdata; |
443 | 591 | ||
444 | struct device_node *of_node; /* associated device tree node */ | 592 | struct device_node *of_node; /* associated device tree node */ |
445 | const struct of_device_id *of_match; /* matching of_device_id from driver */ | ||
446 | 593 | ||
447 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 594 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
448 | 595 | ||
@@ -557,7 +704,7 @@ extern int device_move(struct device *dev, struct device *new_parent, | |||
557 | extern const char *device_get_devnode(struct device *dev, | 704 | extern const char *device_get_devnode(struct device *dev, |
558 | mode_t *mode, const char **tmp); | 705 | mode_t *mode, const char **tmp); |
559 | extern void *dev_get_drvdata(const struct device *dev); | 706 | extern void *dev_get_drvdata(const struct device *dev); |
560 | extern void dev_set_drvdata(struct device *dev, void *data); | 707 | extern int dev_set_drvdata(struct device *dev, void *data); |
561 | 708 | ||
562 | /* | 709 | /* |
563 | * Root device objects for grouping under /sys/devices | 710 | * Root device objects for grouping under /sys/devices |
@@ -611,7 +758,7 @@ extern int (*platform_notify)(struct device *dev); | |||
611 | extern int (*platform_notify_remove)(struct device *dev); | 758 | extern int (*platform_notify_remove)(struct device *dev); |
612 | 759 | ||
613 | 760 | ||
614 | /** | 761 | /* |
615 | * get_device - atomically increment the reference count for the device. | 762 | * get_device - atomically increment the reference count for the device. |
616 | * | 763 | * |
617 | */ | 764 | */ |
@@ -633,13 +780,6 @@ static inline int devtmpfs_mount(const char *mountpoint) { return 0; } | |||
633 | /* drivers/base/power/shutdown.c */ | 780 | /* drivers/base/power/shutdown.c */ |
634 | extern void device_shutdown(void); | 781 | extern void device_shutdown(void); |
635 | 782 | ||
636 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
637 | /* drivers/base/sys.c */ | ||
638 | extern void sysdev_shutdown(void); | ||
639 | #else | ||
640 | static inline void sysdev_shutdown(void) { } | ||
641 | #endif | ||
642 | |||
643 | /* debugging and troubleshooting/diagnostic helpers. */ | 783 | /* debugging and troubleshooting/diagnostic helpers. */ |
644 | extern const char *dev_driver_string(const struct device *dev); | 784 | extern const char *dev_driver_string(const struct device *dev); |
645 | 785 | ||
@@ -742,13 +882,17 @@ do { \ | |||
742 | #endif | 882 | #endif |
743 | 883 | ||
744 | /* | 884 | /* |
745 | * dev_WARN() acts like dev_printk(), but with the key difference | 885 | * dev_WARN*() acts like dev_printk(), but with the key difference |
746 | * of using a WARN/WARN_ON to get the message out, including the | 886 | * of using a WARN/WARN_ON to get the message out, including the |
747 | * file/line information and a backtrace. | 887 | * file/line information and a backtrace. |
748 | */ | 888 | */ |
749 | #define dev_WARN(dev, format, arg...) \ | 889 | #define dev_WARN(dev, format, arg...) \ |
750 | WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg); | 890 | WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg); |
751 | 891 | ||
892 | #define dev_WARN_ONCE(dev, condition, format, arg...) \ | ||
893 | WARN_ONCE(condition, "Device %s\n" format, \ | ||
894 | dev_driver_string(dev), ## arg) | ||
895 | |||
752 | /* Create alias, so I can be autoloaded. */ | 896 | /* Create alias, so I can be autoloaded. */ |
753 | #define MODULE_ALIAS_CHARDEV(major,minor) \ | 897 | #define MODULE_ALIAS_CHARDEV(major,minor) \ |
754 | MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) | 898 | MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 9bebd7f16ef1..eee7addec282 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -434,7 +434,7 @@ struct dma_tx_state { | |||
434 | * zero or error code | 434 | * zero or error code |
435 | * @device_tx_status: poll for transaction completion, the optional | 435 | * @device_tx_status: poll for transaction completion, the optional |
436 | * txstate parameter can be supplied with a pointer to get a | 436 | * txstate parameter can be supplied with a pointer to get a |
437 | * struct with auxilary transfer status information, otherwise the call | 437 | * struct with auxiliary transfer status information, otherwise the call |
438 | * will just return a simple status code | 438 | * will just return a simple status code |
439 | * @device_issue_pending: push pending transactions to hardware | 439 | * @device_issue_pending: push pending transactions to hardware |
440 | */ | 440 | */ |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index ef44c7a0638c..cec467f5d676 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <sys/wait.h> | 36 | #include <sys/wait.h> |
37 | #include <limits.h> | 37 | #include <limits.h> |
38 | 38 | ||
39 | /* Altough the Linux source code makes a difference between | 39 | /* Although the Linux source code makes a difference between |
40 | generic endianness and the bitfields' endianness, there is no | 40 | generic endianness and the bitfields' endianness, there is no |
41 | architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness | 41 | architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness |
42 | does not match the generic endianness. */ | 42 | does not match the generic endianness. */ |
@@ -53,10 +53,10 @@ | |||
53 | 53 | ||
54 | 54 | ||
55 | extern const char *drbd_buildtag(void); | 55 | extern const char *drbd_buildtag(void); |
56 | #define REL_VERSION "8.3.9" | 56 | #define REL_VERSION "8.3.10" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 95 | 59 | #define PRO_VERSION_MAX 96 |
60 | 60 | ||
61 | 61 | ||
62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
@@ -96,8 +96,14 @@ enum drbd_on_no_data { | |||
96 | OND_SUSPEND_IO | 96 | OND_SUSPEND_IO |
97 | }; | 97 | }; |
98 | 98 | ||
99 | enum drbd_on_congestion { | ||
100 | OC_BLOCK, | ||
101 | OC_PULL_AHEAD, | ||
102 | OC_DISCONNECT, | ||
103 | }; | ||
104 | |||
99 | /* KEEP the order, do not delete or insert. Only append. */ | 105 | /* KEEP the order, do not delete or insert. Only append. */ |
100 | enum drbd_ret_codes { | 106 | enum drbd_ret_code { |
101 | ERR_CODE_BASE = 100, | 107 | ERR_CODE_BASE = 100, |
102 | NO_ERROR = 101, | 108 | NO_ERROR = 101, |
103 | ERR_LOCAL_ADDR = 102, | 109 | ERR_LOCAL_ADDR = 102, |
@@ -146,6 +152,9 @@ enum drbd_ret_codes { | |||
146 | ERR_PERM = 152, | 152 | ERR_PERM = 152, |
147 | ERR_NEED_APV_93 = 153, | 153 | ERR_NEED_APV_93 = 153, |
148 | ERR_STONITH_AND_PROT_A = 154, | 154 | ERR_STONITH_AND_PROT_A = 154, |
155 | ERR_CONG_NOT_PROTO_A = 155, | ||
156 | ERR_PIC_AFTER_DEP = 156, | ||
157 | ERR_PIC_PEER_DEP = 157, | ||
149 | 158 | ||
150 | /* insert new ones above this line */ | 159 | /* insert new ones above this line */ |
151 | AFTER_LAST_ERR_CODE | 160 | AFTER_LAST_ERR_CODE |
@@ -175,7 +184,7 @@ enum drbd_conns { | |||
175 | /* These temporal states are all used on the way | 184 | /* These temporal states are all used on the way |
176 | * from >= C_CONNECTED to Unconnected. | 185 | * from >= C_CONNECTED to Unconnected. |
177 | * The 'disconnect reason' states | 186 | * The 'disconnect reason' states |
178 | * I do not allow to change beween them. */ | 187 | * I do not allow to change between them. */ |
179 | C_TIMEOUT, | 188 | C_TIMEOUT, |
180 | C_BROKEN_PIPE, | 189 | C_BROKEN_PIPE, |
181 | C_NETWORK_FAILURE, | 190 | C_NETWORK_FAILURE, |
@@ -199,6 +208,10 @@ enum drbd_conns { | |||
199 | C_VERIFY_T, | 208 | C_VERIFY_T, |
200 | C_PAUSED_SYNC_S, | 209 | C_PAUSED_SYNC_S, |
201 | C_PAUSED_SYNC_T, | 210 | C_PAUSED_SYNC_T, |
211 | |||
212 | C_AHEAD, | ||
213 | C_BEHIND, | ||
214 | |||
202 | C_MASK = 31 | 215 | C_MASK = 31 |
203 | }; | 216 | }; |
204 | 217 | ||
@@ -259,7 +272,7 @@ union drbd_state { | |||
259 | unsigned int i; | 272 | unsigned int i; |
260 | }; | 273 | }; |
261 | 274 | ||
262 | enum drbd_state_ret_codes { | 275 | enum drbd_state_rv { |
263 | SS_CW_NO_NEED = 4, | 276 | SS_CW_NO_NEED = 4, |
264 | SS_CW_SUCCESS = 3, | 277 | SS_CW_SUCCESS = 3, |
265 | SS_NOTHING_TO_DO = 2, | 278 | SS_NOTHING_TO_DO = 2, |
@@ -290,7 +303,7 @@ enum drbd_state_ret_codes { | |||
290 | extern const char *drbd_conn_str(enum drbd_conns); | 303 | extern const char *drbd_conn_str(enum drbd_conns); |
291 | extern const char *drbd_role_str(enum drbd_role); | 304 | extern const char *drbd_role_str(enum drbd_role); |
292 | extern const char *drbd_disk_str(enum drbd_disk_state); | 305 | extern const char *drbd_disk_str(enum drbd_disk_state); |
293 | extern const char *drbd_set_st_err_str(enum drbd_state_ret_codes); | 306 | extern const char *drbd_set_st_err_str(enum drbd_state_rv); |
294 | 307 | ||
295 | #define SHARED_SECRET_MAX 64 | 308 | #define SHARED_SECRET_MAX 64 |
296 | 309 | ||
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index 4ac33f34b77e..246f576c981d 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h | |||
@@ -16,7 +16,8 @@ | |||
16 | #define DEBUG_RANGE_CHECK 0 | 16 | #define DEBUG_RANGE_CHECK 0 |
17 | 17 | ||
18 | #define DRBD_MINOR_COUNT_MIN 1 | 18 | #define DRBD_MINOR_COUNT_MIN 1 |
19 | #define DRBD_MINOR_COUNT_MAX 255 | 19 | #define DRBD_MINOR_COUNT_MAX 256 |
20 | #define DRBD_MINOR_COUNT_DEF 32 | ||
20 | 21 | ||
21 | #define DRBD_DIALOG_REFRESH_MIN 0 | 22 | #define DRBD_DIALOG_REFRESH_MIN 0 |
22 | #define DRBD_DIALOG_REFRESH_MAX 600 | 23 | #define DRBD_DIALOG_REFRESH_MAX 600 |
@@ -42,7 +43,7 @@ | |||
42 | 43 | ||
43 | /* net { */ | 44 | /* net { */ |
44 | /* timeout, unit centi seconds | 45 | /* timeout, unit centi seconds |
45 | * more than one minute timeout is not usefull */ | 46 | * more than one minute timeout is not useful */ |
46 | #define DRBD_TIMEOUT_MIN 1 | 47 | #define DRBD_TIMEOUT_MIN 1 |
47 | #define DRBD_TIMEOUT_MAX 600 | 48 | #define DRBD_TIMEOUT_MAX 600 |
48 | #define DRBD_TIMEOUT_DEF 60 /* 6 seconds */ | 49 | #define DRBD_TIMEOUT_DEF 60 /* 6 seconds */ |
@@ -67,7 +68,7 @@ | |||
67 | #define DRBD_MAX_EPOCH_SIZE_MAX 20000 | 68 | #define DRBD_MAX_EPOCH_SIZE_MAX 20000 |
68 | #define DRBD_MAX_EPOCH_SIZE_DEF 2048 | 69 | #define DRBD_MAX_EPOCH_SIZE_DEF 2048 |
69 | 70 | ||
70 | /* I don't think that a tcp send buffer of more than 10M is usefull */ | 71 | /* I don't think that a tcp send buffer of more than 10M is useful */ |
71 | #define DRBD_SNDBUF_SIZE_MIN 0 | 72 | #define DRBD_SNDBUF_SIZE_MIN 0 |
72 | #define DRBD_SNDBUF_SIZE_MAX (10<<20) | 73 | #define DRBD_SNDBUF_SIZE_MAX (10<<20) |
73 | #define DRBD_SNDBUF_SIZE_DEF 0 | 74 | #define DRBD_SNDBUF_SIZE_DEF 0 |
@@ -100,7 +101,7 @@ | |||
100 | #define DRBD_RATE_MAX (4 << 20) | 101 | #define DRBD_RATE_MAX (4 << 20) |
101 | #define DRBD_RATE_DEF 250 /* kb/second */ | 102 | #define DRBD_RATE_DEF 250 /* kb/second */ |
102 | 103 | ||
103 | /* less than 7 would hit performance unneccessarily. | 104 | /* less than 7 would hit performance unnecessarily. |
104 | * 3833 is the largest prime that still does fit | 105 | * 3833 is the largest prime that still does fit |
105 | * into 64 sectors of activity log */ | 106 | * into 64 sectors of activity log */ |
106 | #define DRBD_AL_EXTENTS_MIN 7 | 107 | #define DRBD_AL_EXTENTS_MIN 7 |
@@ -129,6 +130,7 @@ | |||
129 | #define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT | 130 | #define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT |
130 | #define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT | 131 | #define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT |
131 | #define DRBD_ON_NO_DATA_DEF OND_IO_ERROR | 132 | #define DRBD_ON_NO_DATA_DEF OND_IO_ERROR |
133 | #define DRBD_ON_CONGESTION_DEF OC_BLOCK | ||
132 | 134 | ||
133 | #define DRBD_MAX_BIO_BVECS_MIN 0 | 135 | #define DRBD_MAX_BIO_BVECS_MIN 0 |
134 | #define DRBD_MAX_BIO_BVECS_MAX 128 | 136 | #define DRBD_MAX_BIO_BVECS_MAX 128 |
@@ -154,5 +156,13 @@ | |||
154 | #define DRBD_C_MIN_RATE_MAX (4 << 20) | 156 | #define DRBD_C_MIN_RATE_MAX (4 << 20) |
155 | #define DRBD_C_MIN_RATE_DEF 4096 | 157 | #define DRBD_C_MIN_RATE_DEF 4096 |
156 | 158 | ||
159 | #define DRBD_CONG_FILL_MIN 0 | ||
160 | #define DRBD_CONG_FILL_MAX (10<<21) /* 10GByte in sectors */ | ||
161 | #define DRBD_CONG_FILL_DEF 0 | ||
162 | |||
163 | #define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN | ||
164 | #define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX | ||
165 | #define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF | ||
166 | |||
157 | #undef RANGE | 167 | #undef RANGE |
158 | #endif | 168 | #endif |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index ade91107c9a5..ab6159e4fcf0 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -56,6 +56,9 @@ NL_PACKET(net_conf, 5, | |||
56 | NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict) | 56 | NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict) |
57 | NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo) | 57 | NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo) |
58 | NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size) | 58 | NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size) |
59 | NL_INTEGER( 81, T_MAY_IGNORE, on_congestion) | ||
60 | NL_INTEGER( 82, T_MAY_IGNORE, cong_fill) | ||
61 | NL_INTEGER( 83, T_MAY_IGNORE, cong_extents) | ||
59 | /* 59 addr_family was available in GIT, never released */ | 62 | /* 59 addr_family was available in GIT, never released */ |
60 | NL_BIT( 60, T_MANDATORY, mind_af) | 63 | NL_BIT( 60, T_MANDATORY, mind_af) |
61 | NL_BIT( 27, T_MAY_IGNORE, want_lose) | 64 | NL_BIT( 27, T_MAY_IGNORE, want_lose) |
@@ -66,7 +69,9 @@ NL_PACKET(net_conf, 5, | |||
66 | NL_BIT( 70, T_MANDATORY, dry_run) | 69 | NL_BIT( 70, T_MANDATORY, dry_run) |
67 | ) | 70 | ) |
68 | 71 | ||
69 | NL_PACKET(disconnect, 6, ) | 72 | NL_PACKET(disconnect, 6, |
73 | NL_BIT( 84, T_MAY_IGNORE, force) | ||
74 | ) | ||
70 | 75 | ||
71 | NL_PACKET(resize, 7, | 76 | NL_PACKET(resize, 7, |
72 | NL_INT64( 29, T_MAY_IGNORE, resize_size) | 77 | NL_INT64( 29, T_MAY_IGNORE, resize_size) |
@@ -143,9 +148,13 @@ NL_PACKET(new_c_uuid, 26, | |||
143 | NL_BIT( 63, T_MANDATORY, clear_bm) | 148 | NL_BIT( 63, T_MANDATORY, clear_bm) |
144 | ) | 149 | ) |
145 | 150 | ||
151 | #ifdef NL_RESPONSE | ||
152 | NL_RESPONSE(return_code_only, 27) | ||
153 | #endif | ||
154 | |||
146 | #undef NL_PACKET | 155 | #undef NL_PACKET |
147 | #undef NL_INTEGER | 156 | #undef NL_INTEGER |
148 | #undef NL_INT64 | 157 | #undef NL_INT64 |
149 | #undef NL_BIT | 158 | #undef NL_BIT |
150 | #undef NL_STRING | 159 | #undef NL_STRING |
151 | 160 | #undef NL_RESPONSE | |
diff --git a/include/linux/drbd_tag_magic.h b/include/linux/drbd_tag_magic.h index fcdff8410e99..f14a165e82dc 100644 --- a/include/linux/drbd_tag_magic.h +++ b/include/linux/drbd_tag_magic.h | |||
@@ -7,6 +7,7 @@ | |||
7 | /* declare packet_type enums */ | 7 | /* declare packet_type enums */ |
8 | enum packet_types { | 8 | enum packet_types { |
9 | #define NL_PACKET(name, number, fields) P_ ## name = number, | 9 | #define NL_PACKET(name, number, fields) P_ ## name = number, |
10 | #define NL_RESPONSE(name, number) P_ ## name = number, | ||
10 | #define NL_INTEGER(pn, pr, member) | 11 | #define NL_INTEGER(pn, pr, member) |
11 | #define NL_INT64(pn, pr, member) | 12 | #define NL_INT64(pn, pr, member) |
12 | #define NL_BIT(pn, pr, member) | 13 | #define NL_BIT(pn, pr, member) |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 0c9653f11c18..e747ecd48e1c 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _DYNAMIC_DEBUG_H | 1 | #ifndef _DYNAMIC_DEBUG_H |
2 | #define _DYNAMIC_DEBUG_H | 2 | #define _DYNAMIC_DEBUG_H |
3 | 3 | ||
4 | #include <linux/jump_label.h> | ||
5 | |||
6 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which | 4 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which |
7 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They | 5 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They |
8 | * use independent hash functions, to reduce the chance of false positives. | 6 | * use independent hash functions, to reduce the chance of false positives. |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index d93efcc44570..21a8ebf2dc3a 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -101,7 +101,6 @@ extern void elv_dispatch_sort(struct request_queue *, struct request *); | |||
101 | extern void elv_dispatch_add_tail(struct request_queue *, struct request *); | 101 | extern void elv_dispatch_add_tail(struct request_queue *, struct request *); |
102 | extern void elv_add_request(struct request_queue *, struct request *, int); | 102 | extern void elv_add_request(struct request_queue *, struct request *, int); |
103 | extern void __elv_add_request(struct request_queue *, struct request *, int); | 103 | extern void __elv_add_request(struct request_queue *, struct request *, int); |
104 | extern void elv_insert(struct request_queue *, struct request *, int); | ||
105 | extern int elv_merge(struct request_queue *, struct request **, struct bio *); | 104 | extern int elv_merge(struct request_queue *, struct request **, struct bio *); |
106 | extern int elv_try_merge(struct request *, struct bio *); | 105 | extern int elv_try_merge(struct request *, struct bio *); |
107 | extern void elv_merge_requests(struct request_queue *, struct request *, | 106 | extern void elv_merge_requests(struct request_queue *, struct request *, |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 4d608014753a..110821cb6ea5 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -395,6 +395,7 @@ typedef struct elf64_shdr { | |||
395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ | 395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ |
396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ | 396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ |
397 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ | 397 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ |
398 | #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ | ||
398 | 399 | ||
399 | 400 | ||
400 | /* Note header in a PT_NOTE section */ | 401 | /* Note header in a PT_NOTE section */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index ae757bcf1280..c6a850ab2ec5 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -24,7 +24,10 @@ struct ethtool_cmd { | |||
24 | __u32 cmd; | 24 | __u32 cmd; |
25 | __u32 supported; /* Features this interface supports */ | 25 | __u32 supported; /* Features this interface supports */ |
26 | __u32 advertising; /* Features this interface advertises */ | 26 | __u32 advertising; /* Features this interface advertises */ |
27 | __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ | 27 | __u16 speed; /* The forced speed (lower bits) in |
28 | * Mbps. Please use | ||
29 | * ethtool_cmd_speed()/_set() to | ||
30 | * access it */ | ||
28 | __u8 duplex; /* Duplex, half or full */ | 31 | __u8 duplex; /* Duplex, half or full */ |
29 | __u8 port; /* Which connector port */ | 32 | __u8 port; /* Which connector port */ |
30 | __u8 phy_address; | 33 | __u8 phy_address; |
@@ -33,7 +36,10 @@ struct ethtool_cmd { | |||
33 | __u8 mdio_support; | 36 | __u8 mdio_support; |
34 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ | 37 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ |
35 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ | 38 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ |
36 | __u16 speed_hi; | 39 | __u16 speed_hi; /* The forced speed (upper |
40 | * bits) in Mbps. Please use | ||
41 | * ethtool_cmd_speed()/_set() to | ||
42 | * access it */ | ||
37 | __u8 eth_tp_mdix; | 43 | __u8 eth_tp_mdix; |
38 | __u8 reserved2; | 44 | __u8 reserved2; |
39 | __u32 lp_advertising; /* Features the link partner advertises */ | 45 | __u32 lp_advertising; /* Features the link partner advertises */ |
@@ -41,14 +47,14 @@ struct ethtool_cmd { | |||
41 | }; | 47 | }; |
42 | 48 | ||
43 | static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, | 49 | static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, |
44 | __u32 speed) | 50 | __u32 speed) |
45 | { | 51 | { |
46 | 52 | ||
47 | ep->speed = (__u16)speed; | 53 | ep->speed = (__u16)speed; |
48 | ep->speed_hi = (__u16)(speed >> 16); | 54 | ep->speed_hi = (__u16)(speed >> 16); |
49 | } | 55 | } |
50 | 56 | ||
51 | static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep) | 57 | static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep) |
52 | { | 58 | { |
53 | return (ep->speed_hi << 16) | ep->speed; | 59 | return (ep->speed_hi << 16) | ep->speed; |
54 | } | 60 | } |
@@ -229,6 +235,34 @@ struct ethtool_ringparam { | |||
229 | __u32 tx_pending; | 235 | __u32 tx_pending; |
230 | }; | 236 | }; |
231 | 237 | ||
238 | /** | ||
239 | * struct ethtool_channels - configuring number of network channel | ||
240 | * @cmd: ETHTOOL_{G,S}CHANNELS | ||
241 | * @max_rx: Read only. Maximum number of receive channel the driver support. | ||
242 | * @max_tx: Read only. Maximum number of transmit channel the driver support. | ||
243 | * @max_other: Read only. Maximum number of other channel the driver support. | ||
244 | * @max_combined: Read only. Maximum number of combined channel the driver | ||
245 | * support. Set of queues RX, TX or other. | ||
246 | * @rx_count: Valid values are in the range 1 to the max_rx. | ||
247 | * @tx_count: Valid values are in the range 1 to the max_tx. | ||
248 | * @other_count: Valid values are in the range 1 to the max_other. | ||
249 | * @combined_count: Valid values are in the range 1 to the max_combined. | ||
250 | * | ||
251 | * This can be used to configure RX, TX and other channels. | ||
252 | */ | ||
253 | |||
254 | struct ethtool_channels { | ||
255 | __u32 cmd; | ||
256 | __u32 max_rx; | ||
257 | __u32 max_tx; | ||
258 | __u32 max_other; | ||
259 | __u32 max_combined; | ||
260 | __u32 rx_count; | ||
261 | __u32 tx_count; | ||
262 | __u32 other_count; | ||
263 | __u32 combined_count; | ||
264 | }; | ||
265 | |||
232 | /* for configuring link flow control parameters */ | 266 | /* for configuring link flow control parameters */ |
233 | struct ethtool_pauseparam { | 267 | struct ethtool_pauseparam { |
234 | __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ | 268 | __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ |
@@ -380,27 +414,42 @@ struct ethtool_usrip4_spec { | |||
380 | __u8 proto; | 414 | __u8 proto; |
381 | }; | 415 | }; |
382 | 416 | ||
417 | union ethtool_flow_union { | ||
418 | struct ethtool_tcpip4_spec tcp_ip4_spec; | ||
419 | struct ethtool_tcpip4_spec udp_ip4_spec; | ||
420 | struct ethtool_tcpip4_spec sctp_ip4_spec; | ||
421 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
422 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
423 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
424 | struct ethhdr ether_spec; | ||
425 | __u8 hdata[60]; | ||
426 | }; | ||
427 | |||
428 | struct ethtool_flow_ext { | ||
429 | __be16 vlan_etype; | ||
430 | __be16 vlan_tci; | ||
431 | __be32 data[2]; | ||
432 | }; | ||
433 | |||
383 | /** | 434 | /** |
384 | * struct ethtool_rx_flow_spec - specification for RX flow filter | 435 | * struct ethtool_rx_flow_spec - specification for RX flow filter |
385 | * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW | 436 | * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW |
386 | * @h_u: Flow fields to match (dependent on @flow_type) | 437 | * @h_u: Flow fields to match (dependent on @flow_type) |
387 | * @m_u: Masks for flow field bits to be ignored | 438 | * @h_ext: Additional fields to match |
439 | * @m_u: Masks for flow field bits to be matched | ||
440 | * @m_ext: Masks for additional field bits to be matched | ||
441 | * Note, all additional fields must be ignored unless @flow_type | ||
442 | * includes the %FLOW_EXT flag. | ||
388 | * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC | 443 | * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC |
389 | * if packets should be discarded | 444 | * if packets should be discarded |
390 | * @location: Index of filter in hardware table | 445 | * @location: Index of filter in hardware table |
391 | */ | 446 | */ |
392 | struct ethtool_rx_flow_spec { | 447 | struct ethtool_rx_flow_spec { |
393 | __u32 flow_type; | 448 | __u32 flow_type; |
394 | union { | 449 | union ethtool_flow_union h_u; |
395 | struct ethtool_tcpip4_spec tcp_ip4_spec; | 450 | struct ethtool_flow_ext h_ext; |
396 | struct ethtool_tcpip4_spec udp_ip4_spec; | 451 | union ethtool_flow_union m_u; |
397 | struct ethtool_tcpip4_spec sctp_ip4_spec; | 452 | struct ethtool_flow_ext m_ext; |
398 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
399 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
400 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
401 | struct ethhdr ether_spec; | ||
402 | __u8 hdata[72]; | ||
403 | } h_u, m_u; | ||
404 | __u64 ring_cookie; | 453 | __u64 ring_cookie; |
405 | __u32 location; | 454 | __u32 location; |
406 | }; | 455 | }; |
@@ -458,16 +507,10 @@ struct ethtool_rxnfc { | |||
458 | 507 | ||
459 | struct compat_ethtool_rx_flow_spec { | 508 | struct compat_ethtool_rx_flow_spec { |
460 | u32 flow_type; | 509 | u32 flow_type; |
461 | union { | 510 | union ethtool_flow_union h_u; |
462 | struct ethtool_tcpip4_spec tcp_ip4_spec; | 511 | struct ethtool_flow_ext h_ext; |
463 | struct ethtool_tcpip4_spec udp_ip4_spec; | 512 | union ethtool_flow_union m_u; |
464 | struct ethtool_tcpip4_spec sctp_ip4_spec; | 513 | struct ethtool_flow_ext m_ext; |
465 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
466 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
467 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
468 | struct ethhdr ether_spec; | ||
469 | u8 hdata[72]; | ||
470 | } h_u, m_u; | ||
471 | compat_u64 ring_cookie; | 514 | compat_u64 ring_cookie; |
472 | u32 location; | 515 | u32 location; |
473 | }; | 516 | }; |
@@ -558,6 +601,26 @@ struct ethtool_flash { | |||
558 | char data[ETHTOOL_FLASH_MAX_FILENAME]; | 601 | char data[ETHTOOL_FLASH_MAX_FILENAME]; |
559 | }; | 602 | }; |
560 | 603 | ||
604 | /** | ||
605 | * struct ethtool_dump - used for retrieving, setting device dump | ||
606 | * @cmd: Command number - %ETHTOOL_GET_DUMP_FLAG, %ETHTOOL_GET_DUMP_DATA, or | ||
607 | * %ETHTOOL_SET_DUMP | ||
608 | * @version: FW version of the dump, filled in by driver | ||
609 | * @flag: driver dependent flag for dump setting, filled in by driver during | ||
610 | * get and filled in by ethtool for set operation | ||
611 | * @len: length of dump data, used as the length of the user buffer on entry to | ||
612 | * %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver | ||
613 | * for %ETHTOOL_GET_DUMP_FLAG command | ||
614 | * @data: data collected for get dump data operation | ||
615 | */ | ||
616 | struct ethtool_dump { | ||
617 | __u32 cmd; | ||
618 | __u32 version; | ||
619 | __u32 flag; | ||
620 | __u32 len; | ||
621 | __u8 data[0]; | ||
622 | }; | ||
623 | |||
561 | /* for returning and changing feature sets */ | 624 | /* for returning and changing feature sets */ |
562 | 625 | ||
563 | /** | 626 | /** |
@@ -614,7 +677,7 @@ struct ethtool_sfeatures { | |||
614 | * values of corresponding bits in features[].requested. Bits in .requested | 677 | * values of corresponding bits in features[].requested. Bits in .requested |
615 | * not set in .valid or not changeable are ignored. | 678 | * not set in .valid or not changeable are ignored. |
616 | * | 679 | * |
617 | * Returns %EINVAL when .valid contains undefined or never-changable bits | 680 | * Returns %EINVAL when .valid contains undefined or never-changeable bits |
618 | * or size is not equal to required number of features words (32-bit blocks). | 681 | * or size is not equal to required number of features words (32-bit blocks). |
619 | * Returns >= 0 if request was completed; bits set in the value mean: | 682 | * Returns >= 0 if request was completed; bits set in the value mean: |
620 | * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not | 683 | * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not |
@@ -663,6 +726,22 @@ struct ethtool_rx_ntuple_list { | |||
663 | unsigned int count; | 726 | unsigned int count; |
664 | }; | 727 | }; |
665 | 728 | ||
729 | /** | ||
730 | * enum ethtool_phys_id_state - indicator state for physical identification | ||
731 | * @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated | ||
732 | * @ETHTOOL_ID_ACTIVE: Physical ID indicator should be activated | ||
733 | * @ETHTOOL_ID_ON: LED should be turned on (used iff %ETHTOOL_ID_ACTIVE | ||
734 | * is not supported) | ||
735 | * @ETHTOOL_ID_OFF: LED should be turned off (used iff %ETHTOOL_ID_ACTIVE | ||
736 | * is not supported) | ||
737 | */ | ||
738 | enum ethtool_phys_id_state { | ||
739 | ETHTOOL_ID_INACTIVE, | ||
740 | ETHTOOL_ID_ACTIVE, | ||
741 | ETHTOOL_ID_ON, | ||
742 | ETHTOOL_ID_OFF | ||
743 | }; | ||
744 | |||
666 | struct net_device; | 745 | struct net_device; |
667 | 746 | ||
668 | /* Some generic methods drivers may use in their ethtool_ops */ | 747 | /* Some generic methods drivers may use in their ethtool_ops */ |
@@ -680,65 +759,134 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data); | |||
680 | u32 ethtool_op_get_flags(struct net_device *dev); | 759 | u32 ethtool_op_get_flags(struct net_device *dev); |
681 | int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); | 760 | int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); |
682 | void ethtool_ntuple_flush(struct net_device *dev); | 761 | void ethtool_ntuple_flush(struct net_device *dev); |
762 | bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); | ||
683 | 763 | ||
684 | /** | 764 | /** |
685 | * ðtool_ops - Alter and report network device settings | 765 | * struct ethtool_ops - optional netdev operations |
686 | * get_settings: Get device-specific settings | 766 | * @get_settings: Get various device settings including Ethernet link |
687 | * set_settings: Set device-specific settings | 767 | * settings. The @cmd parameter is expected to have been cleared |
688 | * get_drvinfo: Report driver information | 768 | * before get_settings is called. Returns a negative error code or |
689 | * get_regs: Get device registers | 769 | * zero. |
690 | * get_wol: Report whether Wake-on-Lan is enabled | 770 | * @set_settings: Set various device settings including Ethernet link |
691 | * set_wol: Turn Wake-on-Lan on or off | 771 | * settings. Returns a negative error code or zero. |
692 | * get_msglevel: Report driver message level | 772 | * @get_drvinfo: Report driver/device information. Should only set the |
693 | * set_msglevel: Set driver message level | 773 | * @driver, @version, @fw_version and @bus_info fields. If not |
694 | * nway_reset: Restart autonegotiation | 774 | * implemented, the @driver and @bus_info fields will be filled in |
695 | * get_link: Get link status | 775 | * according to the netdev's parent device. |
696 | * get_eeprom: Read data from the device EEPROM | 776 | * @get_regs_len: Get buffer length required for @get_regs |
697 | * set_eeprom: Write data to the device EEPROM | 777 | * @get_regs: Get device registers |
698 | * get_coalesce: Get interrupt coalescing parameters | 778 | * @get_wol: Report whether Wake-on-Lan is enabled |
699 | * set_coalesce: Set interrupt coalescing parameters | 779 | * @set_wol: Turn Wake-on-Lan on or off. Returns a negative error code |
700 | * get_ringparam: Report ring sizes | 780 | * or zero. |
701 | * set_ringparam: Set ring sizes | 781 | * @get_msglevel: Report driver message level. This should be the value |
702 | * get_pauseparam: Report pause parameters | 782 | * of the @msg_enable field used by netif logging functions. |
703 | * set_pauseparam: Set pause parameters | 783 | * @set_msglevel: Set driver message level |
704 | * get_rx_csum: Report whether receive checksums are turned on or off | 784 | * @nway_reset: Restart autonegotiation. Returns a negative error code |
705 | * set_rx_csum: Turn receive checksum on or off | 785 | * or zero. |
706 | * get_tx_csum: Report whether transmit checksums are turned on or off | 786 | * @get_link: Report whether physical link is up. Will only be called if |
707 | * set_tx_csum: Turn transmit checksums on or off | 787 | * the netdev is up. Should usually be set to ethtool_op_get_link(), |
708 | * get_sg: Report whether scatter-gather is enabled | 788 | * which uses netif_carrier_ok(). |
709 | * set_sg: Turn scatter-gather on or off | 789 | * @get_eeprom: Read data from the device EEPROM. |
710 | * get_tso: Report whether TCP segmentation offload is enabled | ||
711 | * set_tso: Turn TCP segmentation offload on or off | ||
712 | * get_ufo: Report whether UDP fragmentation offload is enabled | ||
713 | * set_ufo: Turn UDP fragmentation offload on or off | ||
714 | * self_test: Run specified self-tests | ||
715 | * get_strings: Return a set of strings that describe the requested objects | ||
716 | * phys_id: Identify the device | ||
717 | * get_stats: Return statistics about the device | ||
718 | * get_flags: get 32-bit flags bitmap | ||
719 | * set_flags: set 32-bit flags bitmap | ||
720 | * | ||
721 | * Description: | ||
722 | * | ||
723 | * get_settings: | ||
724 | * @get_settings is passed an ðtool_cmd to fill in. It returns | ||
725 | * an negative errno or zero. | ||
726 | * | ||
727 | * set_settings: | ||
728 | * @set_settings is passed an ðtool_cmd and should attempt to set | ||
729 | * all the settings this device supports. It may return an error value | ||
730 | * if something goes wrong (otherwise 0). | ||
731 | * | ||
732 | * get_eeprom: | ||
733 | * Should fill in the magic field. Don't need to check len for zero | 790 | * Should fill in the magic field. Don't need to check len for zero |
734 | * or wraparound. Fill in the data argument with the eeprom values | 791 | * or wraparound. Fill in the data argument with the eeprom values |
735 | * from offset to offset + len. Update len to the amount read. | 792 | * from offset to offset + len. Update len to the amount read. |
736 | * Returns an error or zero. | 793 | * Returns an error or zero. |
737 | * | 794 | * @set_eeprom: Write data to the device EEPROM. |
738 | * set_eeprom: | ||
739 | * Should validate the magic field. Don't need to check len for zero | 795 | * Should validate the magic field. Don't need to check len for zero |
740 | * or wraparound. Update len to the amount written. Returns an error | 796 | * or wraparound. Update len to the amount written. Returns an error |
741 | * or zero. | 797 | * or zero. |
798 | * @get_coalesce: Get interrupt coalescing parameters. Returns a negative | ||
799 | * error code or zero. | ||
800 | * @set_coalesce: Set interrupt coalescing parameters. Returns a negative | ||
801 | * error code or zero. | ||
802 | * @get_ringparam: Report ring sizes | ||
803 | * @set_ringparam: Set ring sizes. Returns a negative error code or zero. | ||
804 | * @get_pauseparam: Report pause parameters | ||
805 | * @set_pauseparam: Set pause parameters. Returns a negative error code | ||
806 | * or zero. | ||
807 | * @get_rx_csum: Deprecated in favour of the netdev feature %NETIF_F_RXCSUM. | ||
808 | * Report whether receive checksums are turned on or off. | ||
809 | * @set_rx_csum: Deprecated in favour of generic netdev features. Turn | ||
810 | * receive checksum on or off. Returns a negative error code or zero. | ||
811 | * @get_tx_csum: Deprecated as redundant. Report whether transmit checksums | ||
812 | * are turned on or off. | ||
813 | * @set_tx_csum: Deprecated in favour of generic netdev features. Turn | ||
814 | * transmit checksums on or off. Returns a egative error code or zero. | ||
815 | * @get_sg: Deprecated as redundant. Report whether scatter-gather is | ||
816 | * enabled. | ||
817 | * @set_sg: Deprecated in favour of generic netdev features. Turn | ||
818 | * scatter-gather on or off. Returns a negative error code or zero. | ||
819 | * @get_tso: Deprecated as redundant. Report whether TCP segmentation | ||
820 | * offload is enabled. | ||
821 | * @set_tso: Deprecated in favour of generic netdev features. Turn TCP | ||
822 | * segmentation offload on or off. Returns a negative error code or zero. | ||
823 | * @self_test: Run specified self-tests | ||
824 | * @get_strings: Return a set of strings that describe the requested objects | ||
825 | * @set_phys_id: Identify the physical devices, e.g. by flashing an LED | ||
826 | * attached to it. The implementation may update the indicator | ||
827 | * asynchronously or synchronously, but in either case it must return | ||
828 | * quickly. It is initially called with the argument %ETHTOOL_ID_ACTIVE, | ||
829 | * and must either activate asynchronous updates and return zero, return | ||
830 | * a negative error or return a positive frequency for synchronous | ||
831 | * indication (e.g. 1 for one on/off cycle per second). If it returns | ||
832 | * a frequency then it will be called again at intervals with the | ||
833 | * argument %ETHTOOL_ID_ON or %ETHTOOL_ID_OFF and should set the state of | ||
834 | * the indicator accordingly. Finally, it is called with the argument | ||
835 | * %ETHTOOL_ID_INACTIVE and must deactivate the indicator. Returns a | ||
836 | * negative error code or zero. | ||
837 | * @get_ethtool_stats: Return extended statistics about the device. | ||
838 | * This is only useful if the device maintains statistics not | ||
839 | * included in &struct rtnl_link_stats64. | ||
840 | * @begin: Function to be called before any other operation. Returns a | ||
841 | * negative error code or zero. | ||
842 | * @complete: Function to be called after any other operation except | ||
843 | * @begin. Will be called even if the other operation failed. | ||
844 | * @get_ufo: Deprecated as redundant. Report whether UDP fragmentation | ||
845 | * offload is enabled. | ||
846 | * @set_ufo: Deprecated in favour of generic netdev features. Turn UDP | ||
847 | * fragmentation offload on or off. Returns a negative error code or zero. | ||
848 | * @get_flags: Deprecated as redundant. Report features included in | ||
849 | * &enum ethtool_flags that are enabled. | ||
850 | * @set_flags: Deprecated in favour of generic netdev features. Turn | ||
851 | * features included in &enum ethtool_flags on or off. Returns a | ||
852 | * negative error code or zero. | ||
853 | * @get_priv_flags: Report driver-specific feature flags. | ||
854 | * @set_priv_flags: Set driver-specific feature flags. Returns a negative | ||
855 | * error code or zero. | ||
856 | * @get_sset_count: Get number of strings that @get_strings will write. | ||
857 | * @get_rxnfc: Get RX flow classification rules. Returns a negative | ||
858 | * error code or zero. | ||
859 | * @set_rxnfc: Set RX flow classification rules. Returns a negative | ||
860 | * error code or zero. | ||
861 | * @flash_device: Write a firmware image to device's flash memory. | ||
862 | * Returns a negative error code or zero. | ||
863 | * @reset: Reset (part of) the device, as specified by a bitmask of | ||
864 | * flags from &enum ethtool_reset_flags. Returns a negative | ||
865 | * error code or zero. | ||
866 | * @set_rx_ntuple: Set an RX n-tuple rule. Returns a negative error code | ||
867 | * or zero. | ||
868 | * @get_rx_ntuple: Deprecated. | ||
869 | * @get_rxfh_indir: Get the contents of the RX flow hash indirection table. | ||
870 | * Returns a negative error code or zero. | ||
871 | * @set_rxfh_indir: Set the contents of the RX flow hash indirection table. | ||
872 | * Returns a negative error code or zero. | ||
873 | * @get_channels: Get number of channels. | ||
874 | * @set_channels: Set number of channels. Returns a negative error code or | ||
875 | * zero. | ||
876 | * @get_dump_flag: Get dump flag indicating current dump length, version, | ||
877 | * and flag of the device. | ||
878 | * @get_dump_data: Get dump data. | ||
879 | * @set_dump: Set dump specific flags to the device. | ||
880 | * | ||
881 | * All operations are optional (i.e. the function pointer may be set | ||
882 | * to %NULL) and callers must take this into account. Callers must | ||
883 | * hold the RTNL, except that for @get_drvinfo the caller may or may | ||
884 | * not hold the RTNL. | ||
885 | * | ||
886 | * See the structures used by these operations for further documentation. | ||
887 | * | ||
888 | * See &struct net_device and &struct net_device_ops for documentation | ||
889 | * of the generic netdev features interface. | ||
742 | */ | 890 | */ |
743 | struct ethtool_ops { | 891 | struct ethtool_ops { |
744 | int (*get_settings)(struct net_device *, struct ethtool_cmd *); | 892 | int (*get_settings)(struct net_device *, struct ethtool_cmd *); |
@@ -777,7 +925,7 @@ struct ethtool_ops { | |||
777 | int (*set_tso)(struct net_device *, u32); | 925 | int (*set_tso)(struct net_device *, u32); |
778 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); | 926 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); |
779 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); | 927 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); |
780 | int (*phys_id)(struct net_device *, u32); | 928 | int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state); |
781 | void (*get_ethtool_stats)(struct net_device *, | 929 | void (*get_ethtool_stats)(struct net_device *, |
782 | struct ethtool_stats *, u64 *); | 930 | struct ethtool_stats *, u64 *); |
783 | int (*begin)(struct net_device *); | 931 | int (*begin)(struct net_device *); |
@@ -801,6 +949,13 @@ struct ethtool_ops { | |||
801 | struct ethtool_rxfh_indir *); | 949 | struct ethtool_rxfh_indir *); |
802 | int (*set_rxfh_indir)(struct net_device *, | 950 | int (*set_rxfh_indir)(struct net_device *, |
803 | const struct ethtool_rxfh_indir *); | 951 | const struct ethtool_rxfh_indir *); |
952 | void (*get_channels)(struct net_device *, struct ethtool_channels *); | ||
953 | int (*set_channels)(struct net_device *, struct ethtool_channels *); | ||
954 | int (*get_dump_flag)(struct net_device *, struct ethtool_dump *); | ||
955 | int (*get_dump_data)(struct net_device *, | ||
956 | struct ethtool_dump *, void *); | ||
957 | int (*set_dump)(struct net_device *, struct ethtool_dump *); | ||
958 | |||
804 | }; | 959 | }; |
805 | #endif /* __KERNEL__ */ | 960 | #endif /* __KERNEL__ */ |
806 | 961 | ||
@@ -869,6 +1024,11 @@ struct ethtool_ops { | |||
869 | 1024 | ||
870 | #define ETHTOOL_GFEATURES 0x0000003a /* Get device offload settings */ | 1025 | #define ETHTOOL_GFEATURES 0x0000003a /* Get device offload settings */ |
871 | #define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */ | 1026 | #define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */ |
1027 | #define ETHTOOL_GCHANNELS 0x0000003c /* Get no of channels */ | ||
1028 | #define ETHTOOL_SCHANNELS 0x0000003d /* Set no of channels */ | ||
1029 | #define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */ | ||
1030 | #define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */ | ||
1031 | #define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */ | ||
872 | 1032 | ||
873 | /* compatibility with older code */ | 1033 | /* compatibility with older code */ |
874 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1034 | #define SPARC_ETH_GSET ETHTOOL_GSET |
@@ -896,6 +1056,8 @@ struct ethtool_ops { | |||
896 | #define SUPPORTED_10000baseKX4_Full (1 << 18) | 1056 | #define SUPPORTED_10000baseKX4_Full (1 << 18) |
897 | #define SUPPORTED_10000baseKR_Full (1 << 19) | 1057 | #define SUPPORTED_10000baseKR_Full (1 << 19) |
898 | #define SUPPORTED_10000baseR_FEC (1 << 20) | 1058 | #define SUPPORTED_10000baseR_FEC (1 << 20) |
1059 | #define SUPPORTED_20000baseMLD2_Full (1 << 21) | ||
1060 | #define SUPPORTED_20000baseKR2_Full (1 << 22) | ||
899 | 1061 | ||
900 | /* Indicates what features are advertised by the interface. */ | 1062 | /* Indicates what features are advertised by the interface. */ |
901 | #define ADVERTISED_10baseT_Half (1 << 0) | 1063 | #define ADVERTISED_10baseT_Half (1 << 0) |
@@ -919,6 +1081,8 @@ struct ethtool_ops { | |||
919 | #define ADVERTISED_10000baseKX4_Full (1 << 18) | 1081 | #define ADVERTISED_10000baseKX4_Full (1 << 18) |
920 | #define ADVERTISED_10000baseKR_Full (1 << 19) | 1082 | #define ADVERTISED_10000baseKR_Full (1 << 19) |
921 | #define ADVERTISED_10000baseR_FEC (1 << 20) | 1083 | #define ADVERTISED_10000baseR_FEC (1 << 20) |
1084 | #define ADVERTISED_20000baseMLD2_Full (1 << 21) | ||
1085 | #define ADVERTISED_20000baseKR2_Full (1 << 22) | ||
922 | 1086 | ||
923 | /* The following are all involved in forcing a particular link | 1087 | /* The following are all involved in forcing a particular link |
924 | * mode for the device for setting things. When getting the | 1088 | * mode for the device for setting things. When getting the |
@@ -991,6 +1155,8 @@ struct ethtool_ops { | |||
991 | #define IPV4_FLOW 0x10 /* hash only */ | 1155 | #define IPV4_FLOW 0x10 /* hash only */ |
992 | #define IPV6_FLOW 0x11 /* hash only */ | 1156 | #define IPV6_FLOW 0x11 /* hash only */ |
993 | #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ | 1157 | #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ |
1158 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ | ||
1159 | #define FLOW_EXT 0x80000000 | ||
994 | 1160 | ||
995 | /* L3-L4 network traffic flow hash options */ | 1161 | /* L3-L4 network traffic flow hash options */ |
996 | #define RXH_L2DA (1 << 1) | 1162 | #define RXH_L2DA (1 << 1) |
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index f6856a5a1d4b..f362733186a5 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/linux/eventpoll.h ( Efficent event polling implementation ) | 2 | * include/linux/eventpoll.h ( Efficient event polling implementation ) |
3 | * Copyright (C) 2001,...,2006 Davide Libenzi | 3 | * Copyright (C) 2001,...,2006 Davide Libenzi |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 33a42f24b275..3a4cef5322dc 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -120,7 +120,7 @@ struct fid { | |||
120 | * encode_fh: | 120 | * encode_fh: |
121 | * @encode_fh should store in the file handle fragment @fh (using at most | 121 | * @encode_fh should store in the file handle fragment @fh (using at most |
122 | * @max_len bytes) information that can be used by @decode_fh to recover the | 122 | * @max_len bytes) information that can be used by @decode_fh to recover the |
123 | * file refered to by the &struct dentry @de. If the @connectable flag is | 123 | * file referred to by the &struct dentry @de. If the @connectable flag is |
124 | * set, the encode_fh() should store sufficient information so that a good | 124 | * set, the encode_fh() should store sufficient information so that a good |
125 | * attempt can be made to find not only the file but also it's place in the | 125 | * attempt can be made to find not only the file but also it's place in the |
126 | * filesystem. This typically means storing a reference to de->d_parent in | 126 | * filesystem. This typically means storing a reference to de->d_parent in |
diff --git a/include/linux/fb.h b/include/linux/fb.h index b2a36391d2a1..6a8274877171 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -534,14 +534,14 @@ struct fb_cursor_user { | |||
534 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 | 534 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 |
535 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ | 535 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ |
536 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 | 536 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 |
537 | /* A hardware display blank change occured */ | 537 | /* A hardware display blank change occurred */ |
538 | #define FB_EVENT_BLANK 0x09 | 538 | #define FB_EVENT_BLANK 0x09 |
539 | /* Private modelist is to be replaced */ | 539 | /* Private modelist is to be replaced */ |
540 | #define FB_EVENT_NEW_MODELIST 0x0A | 540 | #define FB_EVENT_NEW_MODELIST 0x0A |
541 | /* The resolution of the passed in fb_info about to change and | 541 | /* The resolution of the passed in fb_info about to change and |
542 | all vc's should be changed */ | 542 | all vc's should be changed */ |
543 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B | 543 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B |
544 | /* A software display blank change occured */ | 544 | /* A software display blank change occurred */ |
545 | #define FB_EVENT_CONBLANK 0x0C | 545 | #define FB_EVENT_CONBLANK 0x0C |
546 | /* Get drawing requirements */ | 546 | /* Get drawing requirements */ |
547 | #define FB_EVENT_GET_REQ 0x0D | 547 | #define FB_EVENT_GET_REQ 0x0D |
@@ -805,7 +805,7 @@ struct fb_tile_ops { | |||
805 | /* A driver may set this flag to indicate that it does want a set_par to be | 805 | /* A driver may set this flag to indicate that it does want a set_par to be |
806 | * called every time when fbcon_switch is executed. The advantage is that with | 806 | * called every time when fbcon_switch is executed. The advantage is that with |
807 | * this flag set you can really be sure that set_par is always called before | 807 | * this flag set you can really be sure that set_par is always called before |
808 | * any of the functions dependant on the correct hardware state or altering | 808 | * any of the functions dependent on the correct hardware state or altering |
809 | * that state, even if you are using some broken X releases. The disadvantage | 809 | * that state, even if you are using some broken X releases. The disadvantage |
810 | * is that it introduces unwanted delays to every console switch if set_par | 810 | * is that it introduces unwanted delays to every console switch if set_par |
811 | * is slow. It is a good idea to try this flag in the drivers initialization | 811 | * is slow. It is a good idea to try this flag in the drivers initialization |
@@ -832,6 +832,7 @@ struct fb_tile_ops { | |||
832 | #define FBINFO_CAN_FORCE_OUTPUT 0x200000 | 832 | #define FBINFO_CAN_FORCE_OUTPUT 0x200000 |
833 | 833 | ||
834 | struct fb_info { | 834 | struct fb_info { |
835 | atomic_t count; | ||
835 | int node; | 836 | int node; |
836 | int flags; | 837 | int flags; |
837 | struct mutex lock; /* Lock for open/release/ioctl funcs */ | 838 | struct mutex lock; /* Lock for open/release/ioctl funcs */ |
@@ -877,7 +878,7 @@ struct fb_info { | |||
877 | void *fbcon_par; /* fbcon use-only private area */ | 878 | void *fbcon_par; /* fbcon use-only private area */ |
878 | /* From here on everything is device dependent */ | 879 | /* From here on everything is device dependent */ |
879 | void *par; | 880 | void *par; |
880 | /* we need the PCI or similiar aperture base/size not | 881 | /* we need the PCI or similar aperture base/size not |
881 | smem_start/size as smem_start may just be an object | 882 | smem_start/size as smem_start may just be an object |
882 | allocated inside the aperture so may not actually overlap */ | 883 | allocated inside the aperture so may not actually overlap */ |
883 | struct apertures_struct { | 884 | struct apertures_struct { |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 45266b75409a..4609b85e559d 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -135,6 +135,8 @@ struct sk_filter | |||
135 | { | 135 | { |
136 | atomic_t refcnt; | 136 | atomic_t refcnt; |
137 | unsigned int len; /* Number of filter blocks */ | 137 | unsigned int len; /* Number of filter blocks */ |
138 | unsigned int (*bpf_func)(const struct sk_buff *skb, | ||
139 | const struct sock_filter *filter); | ||
138 | struct rcu_head rcu; | 140 | struct rcu_head rcu; |
139 | struct sock_filter insns[0]; | 141 | struct sock_filter insns[0]; |
140 | }; | 142 | }; |
@@ -153,6 +155,80 @@ extern unsigned int sk_run_filter(const struct sk_buff *skb, | |||
153 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 155 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
154 | extern int sk_detach_filter(struct sock *sk); | 156 | extern int sk_detach_filter(struct sock *sk); |
155 | extern int sk_chk_filter(struct sock_filter *filter, int flen); | 157 | extern int sk_chk_filter(struct sock_filter *filter, int flen); |
158 | |||
159 | #ifdef CONFIG_BPF_JIT | ||
160 | extern void bpf_jit_compile(struct sk_filter *fp); | ||
161 | extern void bpf_jit_free(struct sk_filter *fp); | ||
162 | #define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) | ||
163 | #else | ||
164 | static inline void bpf_jit_compile(struct sk_filter *fp) | ||
165 | { | ||
166 | } | ||
167 | static inline void bpf_jit_free(struct sk_filter *fp) | ||
168 | { | ||
169 | } | ||
170 | #define SK_RUN_FILTER(FILTER, SKB) sk_run_filter(SKB, FILTER->insns) | ||
171 | #endif | ||
172 | |||
173 | enum { | ||
174 | BPF_S_RET_K = 1, | ||
175 | BPF_S_RET_A, | ||
176 | BPF_S_ALU_ADD_K, | ||
177 | BPF_S_ALU_ADD_X, | ||
178 | BPF_S_ALU_SUB_K, | ||
179 | BPF_S_ALU_SUB_X, | ||
180 | BPF_S_ALU_MUL_K, | ||
181 | BPF_S_ALU_MUL_X, | ||
182 | BPF_S_ALU_DIV_X, | ||
183 | BPF_S_ALU_AND_K, | ||
184 | BPF_S_ALU_AND_X, | ||
185 | BPF_S_ALU_OR_K, | ||
186 | BPF_S_ALU_OR_X, | ||
187 | BPF_S_ALU_LSH_K, | ||
188 | BPF_S_ALU_LSH_X, | ||
189 | BPF_S_ALU_RSH_K, | ||
190 | BPF_S_ALU_RSH_X, | ||
191 | BPF_S_ALU_NEG, | ||
192 | BPF_S_LD_W_ABS, | ||
193 | BPF_S_LD_H_ABS, | ||
194 | BPF_S_LD_B_ABS, | ||
195 | BPF_S_LD_W_LEN, | ||
196 | BPF_S_LD_W_IND, | ||
197 | BPF_S_LD_H_IND, | ||
198 | BPF_S_LD_B_IND, | ||
199 | BPF_S_LD_IMM, | ||
200 | BPF_S_LDX_W_LEN, | ||
201 | BPF_S_LDX_B_MSH, | ||
202 | BPF_S_LDX_IMM, | ||
203 | BPF_S_MISC_TAX, | ||
204 | BPF_S_MISC_TXA, | ||
205 | BPF_S_ALU_DIV_K, | ||
206 | BPF_S_LD_MEM, | ||
207 | BPF_S_LDX_MEM, | ||
208 | BPF_S_ST, | ||
209 | BPF_S_STX, | ||
210 | BPF_S_JMP_JA, | ||
211 | BPF_S_JMP_JEQ_K, | ||
212 | BPF_S_JMP_JEQ_X, | ||
213 | BPF_S_JMP_JGE_K, | ||
214 | BPF_S_JMP_JGE_X, | ||
215 | BPF_S_JMP_JGT_K, | ||
216 | BPF_S_JMP_JGT_X, | ||
217 | BPF_S_JMP_JSET_K, | ||
218 | BPF_S_JMP_JSET_X, | ||
219 | /* Ancillary data */ | ||
220 | BPF_S_ANC_PROTOCOL, | ||
221 | BPF_S_ANC_PKTTYPE, | ||
222 | BPF_S_ANC_IFINDEX, | ||
223 | BPF_S_ANC_NLATTR, | ||
224 | BPF_S_ANC_NLATTR_NEST, | ||
225 | BPF_S_ANC_MARK, | ||
226 | BPF_S_ANC_QUEUE, | ||
227 | BPF_S_ANC_HATYPE, | ||
228 | BPF_S_ANC_RXHASH, | ||
229 | BPF_S_ANC_CPU, | ||
230 | }; | ||
231 | |||
156 | #endif /* __KERNEL__ */ | 232 | #endif /* __KERNEL__ */ |
157 | 233 | ||
158 | #endif /* __LINUX_FILTER_H__ */ | 234 | #endif /* __LINUX_FILTER_H__ */ |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 59ea406be7f6..4ff09889c5c0 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -900,7 +900,7 @@ struct fw_cdev_get_cycle_timer2 { | |||
900 | 900 | ||
901 | /** | 901 | /** |
902 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth | 902 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth |
903 | * @closure: Passed back to userspace in correponding iso resource events | 903 | * @closure: Passed back to userspace in corresponding iso resource events |
904 | * @channels: Isochronous channels of which one is to be (de)allocated | 904 | * @channels: Isochronous channels of which one is to be (de)allocated |
905 | * @bandwidth: Isochronous bandwidth units to be (de)allocated | 905 | * @bandwidth: Isochronous bandwidth units to be (de)allocated |
906 | * @handle: Handle to the allocation, written by the kernel (only valid in | 906 | * @handle: Handle to the allocation, written by the kernel (only valid in |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index c64f3680d4f1..5e6f42789afe 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -125,7 +125,6 @@ struct fw_card { | |||
125 | struct delayed_work bm_work; /* bus manager job */ | 125 | struct delayed_work bm_work; /* bus manager job */ |
126 | int bm_retries; | 126 | int bm_retries; |
127 | int bm_generation; | 127 | int bm_generation; |
128 | __be32 bm_transaction_data[2]; | ||
129 | int bm_node_id; | 128 | int bm_node_id; |
130 | bool bm_abdicate; | 129 | bool bm_abdicate; |
131 | 130 | ||
@@ -441,12 +440,15 @@ int fw_iso_context_queue(struct fw_iso_context *ctx, | |||
441 | struct fw_iso_packet *packet, | 440 | struct fw_iso_packet *packet, |
442 | struct fw_iso_buffer *buffer, | 441 | struct fw_iso_buffer *buffer, |
443 | unsigned long payload); | 442 | unsigned long payload); |
443 | void fw_iso_context_queue_flush(struct fw_iso_context *ctx); | ||
444 | int fw_iso_context_start(struct fw_iso_context *ctx, | 444 | int fw_iso_context_start(struct fw_iso_context *ctx, |
445 | int cycle, int sync, int tags); | 445 | int cycle, int sync, int tags); |
446 | int fw_iso_context_stop(struct fw_iso_context *ctx); | 446 | int fw_iso_context_stop(struct fw_iso_context *ctx); |
447 | void fw_iso_context_destroy(struct fw_iso_context *ctx); | 447 | void fw_iso_context_destroy(struct fw_iso_context *ctx); |
448 | void fw_iso_resource_manage(struct fw_card *card, int generation, | 448 | void fw_iso_resource_manage(struct fw_card *card, int generation, |
449 | u64 channels_mask, int *channel, int *bandwidth, | 449 | u64 channels_mask, int *channel, int *bandwidth, |
450 | bool allocate, __be32 buffer[2]); | 450 | bool allocate); |
451 | |||
452 | extern struct workqueue_struct *fw_workqueue; | ||
451 | 453 | ||
452 | #endif /* _LINUX_FIREWIRE_H */ | 454 | #endif /* _LINUX_FIREWIRE_H */ |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index 70e4efabe0fb..ebeb2f3ad068 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
@@ -61,7 +61,7 @@ struct flex_array { | |||
61 | struct flex_array *flex_array_alloc(int element_size, unsigned int total, | 61 | struct flex_array *flex_array_alloc(int element_size, unsigned int total, |
62 | gfp_t flags); | 62 | gfp_t flags); |
63 | int flex_array_prealloc(struct flex_array *fa, unsigned int start, | 63 | int flex_array_prealloc(struct flex_array *fa, unsigned int start, |
64 | unsigned int end, gfp_t flags); | 64 | unsigned int nr_elements, gfp_t flags); |
65 | void flex_array_free(struct flex_array *fa); | 65 | void flex_array_free(struct flex_array *fa); |
66 | void flex_array_free_parts(struct flex_array *fa); | 66 | void flex_array_free_parts(struct flex_array *fa); |
67 | int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src, | 67 | int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src, |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b677bd77f2d6..cdf9495df204 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -357,6 +357,7 @@ struct inodes_stat_t { | |||
357 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ | 357 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ |
358 | #define FS_EXTENT_FL 0x00080000 /* Extents */ | 358 | #define FS_EXTENT_FL 0x00080000 /* Extents */ |
359 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ | 359 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ |
360 | #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ | ||
360 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | 361 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ |
361 | 362 | ||
362 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | 363 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ |
@@ -463,7 +464,7 @@ struct iattr { | |||
463 | struct timespec ia_ctime; | 464 | struct timespec ia_ctime; |
464 | 465 | ||
465 | /* | 466 | /* |
466 | * Not an attribute, but an auxilary info for filesystems wanting to | 467 | * Not an attribute, but an auxiliary info for filesystems wanting to |
467 | * implement an ftruncate() like method. NOTE: filesystem should | 468 | * implement an ftruncate() like method. NOTE: filesystem should |
468 | * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL). | 469 | * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL). |
469 | */ | 470 | */ |
@@ -611,6 +612,8 @@ struct address_space_operations { | |||
611 | int (*error_remove_page)(struct address_space *, struct page *); | 612 | int (*error_remove_page)(struct address_space *, struct page *); |
612 | }; | 613 | }; |
613 | 614 | ||
615 | extern const struct address_space_operations empty_aops; | ||
616 | |||
614 | /* | 617 | /* |
615 | * pagecache_write_begin/pagecache_write_end must be used by general code | 618 | * pagecache_write_begin/pagecache_write_end must be used by general code |
616 | * to write into the pagecache. | 619 | * to write into the pagecache. |
@@ -645,7 +648,7 @@ struct address_space { | |||
645 | } __attribute__((aligned(sizeof(long)))); | 648 | } __attribute__((aligned(sizeof(long)))); |
646 | /* | 649 | /* |
647 | * On most architectures that alignment is already the case; but | 650 | * On most architectures that alignment is already the case; but |
648 | * must be enforced here for CRIS, to let the least signficant bit | 651 | * must be enforced here for CRIS, to let the least significant bit |
649 | * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON. | 652 | * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON. |
650 | */ | 653 | */ |
651 | 654 | ||
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index b8581c09d19f..76427e688d15 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -236,7 +236,7 @@ struct fscache_cache_ops { | |||
236 | /* unpin an object in the cache */ | 236 | /* unpin an object in the cache */ |
237 | void (*unpin_object)(struct fscache_object *object); | 237 | void (*unpin_object)(struct fscache_object *object); |
238 | 238 | ||
239 | /* store the updated auxilliary data on an object */ | 239 | /* store the updated auxiliary data on an object */ |
240 | void (*update_object)(struct fscache_object *object); | 240 | void (*update_object)(struct fscache_object *object); |
241 | 241 | ||
242 | /* discard the resources pinned by an object and effect retirement if | 242 | /* discard the resources pinned by an object and effect retirement if |
diff --git a/include/linux/fscache.h b/include/linux/fscache.h index ec0dad5ab90f..7c4d72f5581f 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h | |||
@@ -102,9 +102,9 @@ struct fscache_cookie_def { | |||
102 | */ | 102 | */ |
103 | void (*get_attr)(const void *cookie_netfs_data, uint64_t *size); | 103 | void (*get_attr)(const void *cookie_netfs_data, uint64_t *size); |
104 | 104 | ||
105 | /* get the auxilliary data from netfs data | 105 | /* get the auxiliary data from netfs data |
106 | * - this function can be absent if the index carries no state data | 106 | * - this function can be absent if the index carries no state data |
107 | * - should store the auxilliary data in the buffer | 107 | * - should store the auxiliary data in the buffer |
108 | * - should return the amount of amount stored | 108 | * - should return the amount of amount stored |
109 | * - not permitted to return an error | 109 | * - not permitted to return an error |
110 | * - the netfs data from the cookie being used as the source is | 110 | * - the netfs data from the cookie being used as the source is |
@@ -117,7 +117,7 @@ struct fscache_cookie_def { | |||
117 | /* consult the netfs about the state of an object | 117 | /* consult the netfs about the state of an object |
118 | * - this function can be absent if the index carries no state data | 118 | * - this function can be absent if the index carries no state data |
119 | * - the netfs data from the cookie being used as the target is | 119 | * - the netfs data from the cookie being used as the target is |
120 | * presented, as is the auxilliary data | 120 | * presented, as is the auxiliary data |
121 | */ | 121 | */ |
122 | enum fscache_checkaux (*check_aux)(void *cookie_netfs_data, | 122 | enum fscache_checkaux (*check_aux)(void *cookie_netfs_data, |
123 | const void *data, | 123 | const void *data, |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index ca29e03c1fac..9d88e1cb5dbb 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -29,9 +29,22 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, | |||
29 | 29 | ||
30 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); | 30 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); |
31 | 31 | ||
32 | struct ftrace_hash; | ||
33 | |||
34 | enum { | ||
35 | FTRACE_OPS_FL_ENABLED = 1 << 0, | ||
36 | FTRACE_OPS_FL_GLOBAL = 1 << 1, | ||
37 | FTRACE_OPS_FL_DYNAMIC = 1 << 2, | ||
38 | }; | ||
39 | |||
32 | struct ftrace_ops { | 40 | struct ftrace_ops { |
33 | ftrace_func_t func; | 41 | ftrace_func_t func; |
34 | struct ftrace_ops *next; | 42 | struct ftrace_ops *next; |
43 | unsigned long flags; | ||
44 | #ifdef CONFIG_DYNAMIC_FTRACE | ||
45 | struct ftrace_hash *notrace_hash; | ||
46 | struct ftrace_hash *filter_hash; | ||
47 | #endif | ||
35 | }; | 48 | }; |
36 | 49 | ||
37 | extern int function_trace_stop; | 50 | extern int function_trace_stop; |
@@ -146,14 +159,13 @@ extern void unregister_ftrace_function_probe_all(char *glob); | |||
146 | extern int ftrace_text_reserved(void *start, void *end); | 159 | extern int ftrace_text_reserved(void *start, void *end); |
147 | 160 | ||
148 | enum { | 161 | enum { |
149 | FTRACE_FL_FREE = (1 << 0), | 162 | FTRACE_FL_ENABLED = (1 << 30), |
150 | FTRACE_FL_FAILED = (1 << 1), | 163 | FTRACE_FL_FREE = (1 << 31), |
151 | FTRACE_FL_FILTER = (1 << 2), | ||
152 | FTRACE_FL_ENABLED = (1 << 3), | ||
153 | FTRACE_FL_NOTRACE = (1 << 4), | ||
154 | FTRACE_FL_CONVERTED = (1 << 5), | ||
155 | }; | 164 | }; |
156 | 165 | ||
166 | #define FTRACE_FL_MASK (0x3UL << 30) | ||
167 | #define FTRACE_REF_MAX ((1 << 30) - 1) | ||
168 | |||
157 | struct dyn_ftrace { | 169 | struct dyn_ftrace { |
158 | union { | 170 | union { |
159 | unsigned long ip; /* address of mcount call-site */ | 171 | unsigned long ip; /* address of mcount call-site */ |
@@ -167,7 +179,12 @@ struct dyn_ftrace { | |||
167 | }; | 179 | }; |
168 | 180 | ||
169 | int ftrace_force_update(void); | 181 | int ftrace_force_update(void); |
170 | void ftrace_set_filter(unsigned char *buf, int len, int reset); | 182 | void ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, |
183 | int len, int reset); | ||
184 | void ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, | ||
185 | int len, int reset); | ||
186 | void ftrace_set_global_filter(unsigned char *buf, int len, int reset); | ||
187 | void ftrace_set_global_notrace(unsigned char *buf, int len, int reset); | ||
171 | 188 | ||
172 | int register_ftrace_command(struct ftrace_func_command *cmd); | 189 | int register_ftrace_command(struct ftrace_func_command *cmd); |
173 | int unregister_ftrace_command(struct ftrace_func_command *cmd); | 190 | int unregister_ftrace_command(struct ftrace_func_command *cmd); |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 22b32af1b5ec..b5a550a39a70 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -37,6 +37,7 @@ struct trace_entry { | |||
37 | unsigned char flags; | 37 | unsigned char flags; |
38 | unsigned char preempt_count; | 38 | unsigned char preempt_count; |
39 | int pid; | 39 | int pid; |
40 | int padding; | ||
40 | }; | 41 | }; |
41 | 42 | ||
42 | #define FTRACE_MAX_EVENT \ | 43 | #define FTRACE_MAX_EVENT \ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index bfb8f934521e..56d8fc87fbbc 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -353,6 +353,8 @@ extern unsigned long get_zeroed_page(gfp_t gfp_mask); | |||
353 | 353 | ||
354 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); | 354 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); |
355 | void free_pages_exact(void *virt, size_t size); | 355 | void free_pages_exact(void *virt, size_t size); |
356 | /* This is different from alloc_pages_exact_node !!! */ | ||
357 | void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); | ||
356 | 358 | ||
357 | #define __get_free_page(gfp_mask) \ | 359 | #define __get_free_page(gfp_mask) \ |
358 | __get_free_pages((gfp_mask), 0) | 360 | __get_free_pages((gfp_mask), 0) |
diff --git a/include/linux/hid.h b/include/linux/hid.h index bb29bb1dbd2f..42f7e2fb501f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -799,7 +799,7 @@ static inline int __must_check hid_parse(struct hid_device *hdev) | |||
799 | * | 799 | * |
800 | * Call this in probe function *after* hid_parse. This will setup HW buffers | 800 | * Call this in probe function *after* hid_parse. This will setup HW buffers |
801 | * and start the device (if not deffered to device open). hid_hw_stop must be | 801 | * and start the device (if not deffered to device open). hid_hw_stop must be |
802 | * called if this was successfull. | 802 | * called if this was successful. |
803 | */ | 803 | */ |
804 | static inline int __must_check hid_hw_start(struct hid_device *hdev, | 804 | static inline int __must_check hid_hw_start(struct hid_device *hdev, |
805 | unsigned int connect_mask) | 805 | unsigned int connect_mask) |
diff --git a/include/linux/hp_sdc.h b/include/linux/hp_sdc.h index 9db3d454887f..d392975d8887 100644 --- a/include/linux/hp_sdc.h +++ b/include/linux/hp_sdc.h | |||
@@ -101,7 +101,7 @@ int hp_sdc_dequeue_transaction(hp_sdc_transaction *this); | |||
101 | #define HP_SDC_STATUS_REG 0x40 /* Data from an i8042 register */ | 101 | #define HP_SDC_STATUS_REG 0x40 /* Data from an i8042 register */ |
102 | #define HP_SDC_STATUS_HILCMD 0x50 /* Command from HIL MLC */ | 102 | #define HP_SDC_STATUS_HILCMD 0x50 /* Command from HIL MLC */ |
103 | #define HP_SDC_STATUS_HILDATA 0x60 /* Data from HIL MLC */ | 103 | #define HP_SDC_STATUS_HILDATA 0x60 /* Data from HIL MLC */ |
104 | #define HP_SDC_STATUS_PUP 0x70 /* Sucessful power-up self test */ | 104 | #define HP_SDC_STATUS_PUP 0x70 /* Successful power-up self test */ |
105 | #define HP_SDC_STATUS_KCOOKED 0x80 /* Key from cooked kbd */ | 105 | #define HP_SDC_STATUS_KCOOKED 0x80 /* Key from cooked kbd */ |
106 | #define HP_SDC_STATUS_KRPG 0xc0 /* Key from Repeat Gen */ | 106 | #define HP_SDC_STATUS_KRPG 0xc0 /* Key from Repeat Gen */ |
107 | #define HP_SDC_STATUS_KMOD_SUP 0x10 /* Shift key is up */ | 107 | #define HP_SDC_STATUS_KMOD_SUP 0x10 /* Shift key is up */ |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index df29c8fde36b..8847c8c29791 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -117,7 +117,7 @@ static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, | |||
117 | unsigned long end, | 117 | unsigned long end, |
118 | long adjust_next) | 118 | long adjust_next) |
119 | { | 119 | { |
120 | if (!vma->anon_vma || vma->vm_ops || vma->vm_file) | 120 | if (!vma->anon_vma || vma->vm_ops) |
121 | return; | 121 | return; |
122 | __vma_adjust_trans_huge(vma, start, end, adjust_next); | 122 | __vma_adjust_trans_huge(vma, start, end, adjust_next); |
123 | } | 123 | } |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 9e7a12d6385d..a6deef4f4f67 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -826,7 +826,7 @@ static inline struct i2o_message __iomem *i2o_msg_in_to_virt(struct | |||
826 | * @c: I2O controller | 826 | * @c: I2O controller |
827 | * | 827 | * |
828 | * This function tries to get a message frame. If no message frame is | 828 | * This function tries to get a message frame. If no message frame is |
829 | * available do not wait until one is availabe (see also i2o_msg_get_wait). | 829 | * available do not wait until one is available (see also i2o_msg_get_wait). |
830 | * The returned pointer to the message frame is not in I/O memory, it is | 830 | * The returned pointer to the message frame is not in I/O memory, it is |
831 | * allocated from a mempool. But because a MFA is allocated from the | 831 | * allocated from a mempool. But because a MFA is allocated from the |
832 | * controller too it is guaranteed that i2o_msg_post() will never fail. | 832 | * controller too it is guaranteed that i2o_msg_post() will never fail. |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 2d1c6117d92c..b2eee5879883 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -884,6 +884,15 @@ struct ieee80211_ht_cap { | |||
884 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 | 884 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 |
885 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 | 885 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 |
886 | 886 | ||
887 | /* 802.11n HT extended capabilities masks (for extended_ht_cap_info) */ | ||
888 | #define IEEE80211_HT_EXT_CAP_PCO 0x0001 | ||
889 | #define IEEE80211_HT_EXT_CAP_PCO_TIME 0x0006 | ||
890 | #define IEEE80211_HT_EXT_CAP_PCO_TIME_SHIFT 1 | ||
891 | #define IEEE80211_HT_EXT_CAP_MCS_FB 0x0300 | ||
892 | #define IEEE80211_HT_EXT_CAP_MCS_FB_SHIFT 8 | ||
893 | #define IEEE80211_HT_EXT_CAP_HTC_SUP 0x0400 | ||
894 | #define IEEE80211_HT_EXT_CAP_RD_RESPONDER 0x0800 | ||
895 | |||
887 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ | 896 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ |
888 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 | 897 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 |
889 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C | 898 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C |
@@ -993,6 +1002,11 @@ struct ieee80211_ht_info { | |||
993 | 1002 | ||
994 | #define WLAN_CAPABILITY_ESS (1<<0) | 1003 | #define WLAN_CAPABILITY_ESS (1<<0) |
995 | #define WLAN_CAPABILITY_IBSS (1<<1) | 1004 | #define WLAN_CAPABILITY_IBSS (1<<1) |
1005 | |||
1006 | /* A mesh STA sets the ESS and IBSS capability bits to zero */ | ||
1007 | #define WLAN_CAPABILITY_IS_MBSS(cap) \ | ||
1008 | (!((cap) & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS))) | ||
1009 | |||
996 | #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) | 1010 | #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) |
997 | #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) | 1011 | #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) |
998 | #define WLAN_CAPABILITY_PRIVACY (1<<4) | 1012 | #define WLAN_CAPABILITY_PRIVACY (1<<4) |
@@ -1252,9 +1266,8 @@ enum ieee80211_category { | |||
1252 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, | 1266 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, |
1253 | WLAN_CATEGORY_SELF_PROTECTED = 15, | 1267 | WLAN_CATEGORY_SELF_PROTECTED = 15, |
1254 | WLAN_CATEGORY_WMM = 17, | 1268 | WLAN_CATEGORY_WMM = 17, |
1255 | /* TODO: remove MESH_PLINK and MESH_PATH_SEL after */ | 1269 | /* TODO: remove MESH_PATH_SEL after mesh is updated |
1256 | /* mesh is updated to current 802.11s draft */ | 1270 | * to current 802.11s draft */ |
1257 | WLAN_CATEGORY_MESH_PLINK = 30, | ||
1258 | WLAN_CATEGORY_MESH_PATH_SEL = 32, | 1271 | WLAN_CATEGORY_MESH_PATH_SEL = 32, |
1259 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | 1272 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, |
1260 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | 1273 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, |
@@ -1507,6 +1520,7 @@ static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | |||
1507 | category = ((u8 *) hdr) + 24; | 1520 | category = ((u8 *) hdr) + 24; |
1508 | return *category != WLAN_CATEGORY_PUBLIC && | 1521 | return *category != WLAN_CATEGORY_PUBLIC && |
1509 | *category != WLAN_CATEGORY_HT && | 1522 | *category != WLAN_CATEGORY_HT && |
1523 | *category != WLAN_CATEGORY_SELF_PROTECTED && | ||
1510 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; | 1524 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; |
1511 | } | 1525 | } |
1512 | 1526 | ||
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index be69043d2896..0f1325d98295 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -136,6 +136,7 @@ int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); | |||
136 | extern struct ctl_table ether_table[]; | 136 | extern struct ctl_table ether_table[]; |
137 | #endif | 137 | #endif |
138 | 138 | ||
139 | int mac_pton(const char *s, u8 *mac); | ||
139 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | 140 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); |
140 | 141 | ||
141 | #endif | 142 | #endif |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 635e1faec412..290bd8ac94cf 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -86,7 +86,6 @@ struct vlan_group { | |||
86 | * the vlan is attached to. | 86 | * the vlan is attached to. |
87 | */ | 87 | */ |
88 | unsigned int nr_vlans; | 88 | unsigned int nr_vlans; |
89 | int killall; | ||
90 | struct hlist_node hlist; /* linked list */ | 89 | struct hlist_node hlist; /* linked list */ |
91 | struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; | 90 | struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; |
92 | struct rcu_head rcu; | 91 | struct rcu_head rcu; |
@@ -132,7 +131,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); | |||
132 | 131 | ||
133 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | 132 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, |
134 | u16 vlan_tci, int polling); | 133 | u16 vlan_tci, int polling); |
135 | extern bool vlan_hwaccel_do_receive(struct sk_buff **skb); | 134 | extern bool vlan_do_receive(struct sk_buff **skb); |
135 | extern struct sk_buff *vlan_untag(struct sk_buff *skb); | ||
136 | extern gro_result_t | 136 | extern gro_result_t |
137 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 137 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
138 | unsigned int vlan_tci, struct sk_buff *skb); | 138 | unsigned int vlan_tci, struct sk_buff *skb); |
@@ -166,13 +166,18 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | |||
166 | return NET_XMIT_SUCCESS; | 166 | return NET_XMIT_SUCCESS; |
167 | } | 167 | } |
168 | 168 | ||
169 | static inline bool vlan_hwaccel_do_receive(struct sk_buff **skb) | 169 | static inline bool vlan_do_receive(struct sk_buff **skb) |
170 | { | 170 | { |
171 | if ((*skb)->vlan_tci & VLAN_VID_MASK) | 171 | if ((*skb)->vlan_tci & VLAN_VID_MASK) |
172 | (*skb)->pkt_type = PACKET_OTHERHOST; | 172 | (*skb)->pkt_type = PACKET_OTHERHOST; |
173 | return false; | 173 | return false; |
174 | } | 174 | } |
175 | 175 | ||
176 | static inline struct sk_buff *vlan_untag(struct sk_buff *skb) | ||
177 | { | ||
178 | return skb; | ||
179 | } | ||
180 | |||
176 | static inline gro_result_t | 181 | static inline gro_result_t |
177 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 182 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
178 | unsigned int vlan_tci, struct sk_buff *skb) | 183 | unsigned int vlan_tci, struct sk_buff *skb) |
diff --git a/include/linux/init.h b/include/linux/init.h index 577671c55153..9146f39cdddf 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -79,29 +79,29 @@ | |||
79 | #define __exitused __used | 79 | #define __exitused __used |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | #define __exit __section(.exit.text) __exitused __cold | 82 | #define __exit __section(.exit.text) __exitused __cold notrace |
83 | 83 | ||
84 | /* Used for HOTPLUG */ | 84 | /* Used for HOTPLUG */ |
85 | #define __devinit __section(.devinit.text) __cold | 85 | #define __devinit __section(.devinit.text) __cold notrace |
86 | #define __devinitdata __section(.devinit.data) | 86 | #define __devinitdata __section(.devinit.data) |
87 | #define __devinitconst __section(.devinit.rodata) | 87 | #define __devinitconst __section(.devinit.rodata) |
88 | #define __devexit __section(.devexit.text) __exitused __cold | 88 | #define __devexit __section(.devexit.text) __exitused __cold notrace |
89 | #define __devexitdata __section(.devexit.data) | 89 | #define __devexitdata __section(.devexit.data) |
90 | #define __devexitconst __section(.devexit.rodata) | 90 | #define __devexitconst __section(.devexit.rodata) |
91 | 91 | ||
92 | /* Used for HOTPLUG_CPU */ | 92 | /* Used for HOTPLUG_CPU */ |
93 | #define __cpuinit __section(.cpuinit.text) __cold | 93 | #define __cpuinit __section(.cpuinit.text) __cold notrace |
94 | #define __cpuinitdata __section(.cpuinit.data) | 94 | #define __cpuinitdata __section(.cpuinit.data) |
95 | #define __cpuinitconst __section(.cpuinit.rodata) | 95 | #define __cpuinitconst __section(.cpuinit.rodata) |
96 | #define __cpuexit __section(.cpuexit.text) __exitused __cold | 96 | #define __cpuexit __section(.cpuexit.text) __exitused __cold notrace |
97 | #define __cpuexitdata __section(.cpuexit.data) | 97 | #define __cpuexitdata __section(.cpuexit.data) |
98 | #define __cpuexitconst __section(.cpuexit.rodata) | 98 | #define __cpuexitconst __section(.cpuexit.rodata) |
99 | 99 | ||
100 | /* Used for MEMORY_HOTPLUG */ | 100 | /* Used for MEMORY_HOTPLUG */ |
101 | #define __meminit __section(.meminit.text) __cold | 101 | #define __meminit __section(.meminit.text) __cold notrace |
102 | #define __meminitdata __section(.meminit.data) | 102 | #define __meminitdata __section(.meminit.data) |
103 | #define __meminitconst __section(.meminit.rodata) | 103 | #define __meminitconst __section(.meminit.rodata) |
104 | #define __memexit __section(.memexit.text) __exitused __cold | 104 | #define __memexit __section(.memexit.text) __exitused __cold notrace |
105 | #define __memexitdata __section(.memexit.data) | 105 | #define __memexitdata __section(.memexit.data) |
106 | #define __memexitconst __section(.memexit.rodata) | 106 | #define __memexitconst __section(.memexit.rodata) |
107 | 107 | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index caa151fbebb7..689496bb6654 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -134,7 +134,6 @@ extern struct cred init_cred; | |||
134 | .stack = &init_thread_info, \ | 134 | .stack = &init_thread_info, \ |
135 | .usage = ATOMIC_INIT(2), \ | 135 | .usage = ATOMIC_INIT(2), \ |
136 | .flags = PF_KTHREAD, \ | 136 | .flags = PF_KTHREAD, \ |
137 | .lock_depth = -1, \ | ||
138 | .prio = MAX_PRIO-20, \ | 137 | .prio = MAX_PRIO-20, \ |
139 | .static_prio = MAX_PRIO-20, \ | 138 | .static_prio = MAX_PRIO-20, \ |
140 | .normal_prio = MAX_PRIO-20, \ | 139 | .normal_prio = MAX_PRIO-20, \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 056ae8a5bd9b..771d6d85667d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -167,6 +167,7 @@ struct input_keymap_entry { | |||
167 | #define SYN_REPORT 0 | 167 | #define SYN_REPORT 0 |
168 | #define SYN_CONFIG 1 | 168 | #define SYN_CONFIG 1 |
169 | #define SYN_MT_REPORT 2 | 169 | #define SYN_MT_REPORT 2 |
170 | #define SYN_DROPPED 3 | ||
170 | 171 | ||
171 | /* | 172 | /* |
172 | * Keys and buttons | 173 | * Keys and buttons |
@@ -553,8 +554,8 @@ struct input_keymap_entry { | |||
553 | #define KEY_DVD 0x185 /* Media Select DVD */ | 554 | #define KEY_DVD 0x185 /* Media Select DVD */ |
554 | #define KEY_AUX 0x186 | 555 | #define KEY_AUX 0x186 |
555 | #define KEY_MP3 0x187 | 556 | #define KEY_MP3 0x187 |
556 | #define KEY_AUDIO 0x188 | 557 | #define KEY_AUDIO 0x188 /* AL Audio Browser */ |
557 | #define KEY_VIDEO 0x189 | 558 | #define KEY_VIDEO 0x189 /* AL Movie Browser */ |
558 | #define KEY_DIRECTORY 0x18a | 559 | #define KEY_DIRECTORY 0x18a |
559 | #define KEY_LIST 0x18b | 560 | #define KEY_LIST 0x18b |
560 | #define KEY_MEMO 0x18c /* Media Select Messages */ | 561 | #define KEY_MEMO 0x18c /* Media Select Messages */ |
@@ -603,8 +604,9 @@ struct input_keymap_entry { | |||
603 | #define KEY_FRAMEFORWARD 0x1b5 | 604 | #define KEY_FRAMEFORWARD 0x1b5 |
604 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | 605 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
605 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | 606 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ |
606 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ | 607 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ |
607 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ | 608 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ |
609 | #define KEY_IMAGES 0x1ba /* AL Image Browser */ | ||
608 | 610 | ||
609 | #define KEY_DEL_EOL 0x1c0 | 611 | #define KEY_DEL_EOL 0x1c0 |
610 | #define KEY_DEL_EOS 0x1c1 | 612 | #define KEY_DEL_EOS 0x1c1 |
@@ -664,6 +666,13 @@ struct input_keymap_entry { | |||
664 | #define KEY_TOUCHPAD_ON 0x213 | 666 | #define KEY_TOUCHPAD_ON 0x213 |
665 | #define KEY_TOUCHPAD_OFF 0x214 | 667 | #define KEY_TOUCHPAD_OFF 0x214 |
666 | 668 | ||
669 | #define KEY_CAMERA_ZOOMIN 0x215 | ||
670 | #define KEY_CAMERA_ZOOMOUT 0x216 | ||
671 | #define KEY_CAMERA_UP 0x217 | ||
672 | #define KEY_CAMERA_DOWN 0x218 | ||
673 | #define KEY_CAMERA_LEFT 0x219 | ||
674 | #define KEY_CAMERA_RIGHT 0x21a | ||
675 | |||
667 | #define BTN_TRIGGER_HAPPY 0x2c0 | 676 | #define BTN_TRIGGER_HAPPY 0x2c0 |
668 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 677 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
669 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 678 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index b3ac06a4435d..318bb82325a6 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
@@ -48,6 +48,12 @@ static inline void input_mt_slot(struct input_dev *dev, int slot) | |||
48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline bool input_is_mt_axis(int axis) | ||
52 | { | ||
53 | return axis == ABS_MT_SLOT || | ||
54 | (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST); | ||
55 | } | ||
56 | |||
51 | void input_mt_report_slot_state(struct input_dev *dev, | 57 | void input_mt_report_slot_state(struct input_dev *dev, |
52 | unsigned int tool_type, bool active); | 58 | unsigned int tool_type, bool active); |
53 | 59 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 59b72ca1c5d1..6c12989839d9 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -98,7 +98,7 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); | |||
98 | * @next: pointer to the next irqaction for shared interrupts | 98 | * @next: pointer to the next irqaction for shared interrupts |
99 | * @irq: interrupt number | 99 | * @irq: interrupt number |
100 | * @dir: pointer to the proc/irq/NN/name entry | 100 | * @dir: pointer to the proc/irq/NN/name entry |
101 | * @thread_fn: interupt handler function for threaded interrupts | 101 | * @thread_fn: interrupt handler function for threaded interrupts |
102 | * @thread: thread pointer for threaded interrupts | 102 | * @thread: thread pointer for threaded interrupts |
103 | * @thread_flags: flags related to @thread | 103 | * @thread_flags: flags related to @thread |
104 | * @thread_mask: bitmask for keeping track of @thread activity | 104 | * @thread_mask: bitmask for keeping track of @thread activity |
@@ -338,14 +338,6 @@ static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long | |||
338 | /* IRQ wakeup (PM) control: */ | 338 | /* IRQ wakeup (PM) control: */ |
339 | extern int irq_set_irq_wake(unsigned int irq, unsigned int on); | 339 | extern int irq_set_irq_wake(unsigned int irq, unsigned int on); |
340 | 340 | ||
341 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
342 | /* Please do not use: Use the replacement functions instead */ | ||
343 | static inline int set_irq_wake(unsigned int irq, unsigned int on) | ||
344 | { | ||
345 | return irq_set_irq_wake(irq, on); | ||
346 | } | ||
347 | #endif | ||
348 | |||
349 | static inline int enable_irq_wake(unsigned int irq) | 341 | static inline int enable_irq_wake(unsigned int irq) |
350 | { | 342 | { |
351 | return irq_set_irq_wake(irq, 1); | 343 | return irq_set_irq_wake(irq, 1); |
@@ -422,7 +414,6 @@ enum | |||
422 | TASKLET_SOFTIRQ, | 414 | TASKLET_SOFTIRQ, |
423 | SCHED_SOFTIRQ, | 415 | SCHED_SOFTIRQ, |
424 | HRTIMER_SOFTIRQ, | 416 | HRTIMER_SOFTIRQ, |
425 | RCU_SOFTIRQ, /* Preferable RCU should always be the last softirq */ | ||
426 | 417 | ||
427 | NR_SOFTIRQS | 418 | NR_SOFTIRQS |
428 | }; | 419 | }; |
@@ -492,7 +483,7 @@ extern void __send_remote_softirq(struct call_single_data *cp, int cpu, | |||
492 | Properties: | 483 | Properties: |
493 | * If tasklet_schedule() is called, then tasklet is guaranteed | 484 | * If tasklet_schedule() is called, then tasklet is guaranteed |
494 | to be executed on some cpu at least once after this. | 485 | to be executed on some cpu at least once after this. |
495 | * If the tasklet is already scheduled, but its excecution is still not | 486 | * If the tasklet is already scheduled, but its execution is still not |
496 | started, it will be executed only once. | 487 | started, it will be executed only once. |
497 | * If this tasklet is already running on another CPU (or schedule is called | 488 | * If this tasklet is already running on another CPU (or schedule is called |
498 | from tasklet itself), it is rescheduled for later. | 489 | from tasklet itself), it is rescheduled for later. |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 045f2f275cd0..ca85cf894e33 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -111,7 +111,7 @@ struct ipmi_ipmb_addr { | |||
111 | * A LAN Address. This is an address to/from a LAN interface bridged | 111 | * A LAN Address. This is an address to/from a LAN interface bridged |
112 | * by the BMC, not an address actually out on the LAN. | 112 | * by the BMC, not an address actually out on the LAN. |
113 | * | 113 | * |
114 | * A concious decision was made here to deviate slightly from the IPMI | 114 | * A conscious decision was made here to deviate slightly from the IPMI |
115 | * spec. We do not use rqSWID and rsSWID like it shows in the | 115 | * spec. We do not use rqSWID and rsSWID like it shows in the |
116 | * message. Instead, we use remote_SWID and local_SWID. This means | 116 | * message. Instead, we use remote_SWID and local_SWID. This means |
117 | * that any message (a request or response) from another device will | 117 | * that any message (a request or response) from another device will |
@@ -259,7 +259,7 @@ struct ipmi_recv_msg { | |||
259 | void (*done)(struct ipmi_recv_msg *msg); | 259 | void (*done)(struct ipmi_recv_msg *msg); |
260 | 260 | ||
261 | /* Place-holder for the data, don't make any assumptions about | 261 | /* Place-holder for the data, don't make any assumptions about |
262 | the size or existance of this, since it may change. */ | 262 | the size or existence of this, since it may change. */ |
263 | unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; | 263 | unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; |
264 | }; | 264 | }; |
265 | 265 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 5d876c9b3a3d..8b4538446636 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -53,24 +53,18 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data); | |||
53 | * Bits which can be modified via irq_set/clear/modify_status_flags() | 53 | * Bits which can be modified via irq_set/clear/modify_status_flags() |
54 | * IRQ_LEVEL - Interrupt is level type. Will be also | 54 | * IRQ_LEVEL - Interrupt is level type. Will be also |
55 | * updated in the code when the above trigger | 55 | * updated in the code when the above trigger |
56 | * bits are modified via set_irq_type() | 56 | * bits are modified via irq_set_irq_type() |
57 | * IRQ_PER_CPU - Mark an interrupt PER_CPU. Will protect | 57 | * IRQ_PER_CPU - Mark an interrupt PER_CPU. Will protect |
58 | * it from affinity setting | 58 | * it from affinity setting |
59 | * IRQ_NOPROBE - Interrupt cannot be probed by autoprobing | 59 | * IRQ_NOPROBE - Interrupt cannot be probed by autoprobing |
60 | * IRQ_NOREQUEST - Interrupt cannot be requested via | 60 | * IRQ_NOREQUEST - Interrupt cannot be requested via |
61 | * request_irq() | 61 | * request_irq() |
62 | * IRQ_NOTHREAD - Interrupt cannot be threaded | ||
62 | * IRQ_NOAUTOEN - Interrupt is not automatically enabled in | 63 | * IRQ_NOAUTOEN - Interrupt is not automatically enabled in |
63 | * request/setup_irq() | 64 | * request/setup_irq() |
64 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) | 65 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) |
65 | * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context | 66 | * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context |
66 | * IRQ_NESTED_TRHEAD - Interrupt nests into another thread | 67 | * IRQ_NESTED_TRHEAD - Interrupt nests into another thread |
67 | * | ||
68 | * Deprecated bits. They are kept updated as long as | ||
69 | * CONFIG_GENERIC_HARDIRQS_NO_COMPAT is not set. Will go away soon. These bits | ||
70 | * are internal state of the core code and if you really need to acces | ||
71 | * them then talk to the genirq maintainer instead of hacking | ||
72 | * something weird. | ||
73 | * | ||
74 | */ | 68 | */ |
75 | enum { | 69 | enum { |
76 | IRQ_TYPE_NONE = 0x00000000, | 70 | IRQ_TYPE_NONE = 0x00000000, |
@@ -92,18 +86,7 @@ enum { | |||
92 | IRQ_NO_BALANCING = (1 << 13), | 86 | IRQ_NO_BALANCING = (1 << 13), |
93 | IRQ_MOVE_PCNTXT = (1 << 14), | 87 | IRQ_MOVE_PCNTXT = (1 << 14), |
94 | IRQ_NESTED_THREAD = (1 << 15), | 88 | IRQ_NESTED_THREAD = (1 << 15), |
95 | 89 | IRQ_NOTHREAD = (1 << 16), | |
96 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
97 | IRQ_INPROGRESS = (1 << 16), | ||
98 | IRQ_REPLAY = (1 << 17), | ||
99 | IRQ_WAITING = (1 << 18), | ||
100 | IRQ_DISABLED = (1 << 19), | ||
101 | IRQ_PENDING = (1 << 20), | ||
102 | IRQ_MASKED = (1 << 21), | ||
103 | IRQ_MOVE_PENDING = (1 << 22), | ||
104 | IRQ_AFFINITY_SET = (1 << 23), | ||
105 | IRQ_WAKEUP = (1 << 24), | ||
106 | #endif | ||
107 | }; | 90 | }; |
108 | 91 | ||
109 | #define IRQF_MODIFY_MASK \ | 92 | #define IRQF_MODIFY_MASK \ |
@@ -135,7 +118,7 @@ struct msi_desc; | |||
135 | * struct irq_data - per irq and irq chip data passed down to chip functions | 118 | * struct irq_data - per irq and irq chip data passed down to chip functions |
136 | * @irq: interrupt number | 119 | * @irq: interrupt number |
137 | * @node: node index useful for balancing | 120 | * @node: node index useful for balancing |
138 | * @state_use_accessor: status information for irq chip functions. | 121 | * @state_use_accessors: status information for irq chip functions. |
139 | * Use accessor functions to deal with it | 122 | * Use accessor functions to deal with it |
140 | * @chip: low level interrupt hardware access | 123 | * @chip: low level interrupt hardware access |
141 | * @handler_data: per-IRQ data for the irq_chip methods | 124 | * @handler_data: per-IRQ data for the irq_chip methods |
@@ -174,6 +157,9 @@ struct irq_data { | |||
174 | * from suspend | 157 | * from suspend |
175 | * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process | 158 | * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process |
176 | * context | 159 | * context |
160 | * IRQD_IRQ_DISABLED - Disabled state of the interrupt | ||
161 | * IRQD_IRQ_MASKED - Masked state of the interrupt | ||
162 | * IRQD_IRQ_INPROGRESS - In progress state of the interrupt | ||
177 | */ | 163 | */ |
178 | enum { | 164 | enum { |
179 | IRQD_TRIGGER_MASK = 0xf, | 165 | IRQD_TRIGGER_MASK = 0xf, |
@@ -184,6 +170,9 @@ enum { | |||
184 | IRQD_LEVEL = (1 << 13), | 170 | IRQD_LEVEL = (1 << 13), |
185 | IRQD_WAKEUP_STATE = (1 << 14), | 171 | IRQD_WAKEUP_STATE = (1 << 14), |
186 | IRQD_MOVE_PCNTXT = (1 << 15), | 172 | IRQD_MOVE_PCNTXT = (1 << 15), |
173 | IRQD_IRQ_DISABLED = (1 << 16), | ||
174 | IRQD_IRQ_MASKED = (1 << 17), | ||
175 | IRQD_IRQ_INPROGRESS = (1 << 18), | ||
187 | }; | 176 | }; |
188 | 177 | ||
189 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) | 178 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) |
@@ -206,6 +195,11 @@ static inline bool irqd_affinity_was_set(struct irq_data *d) | |||
206 | return d->state_use_accessors & IRQD_AFFINITY_SET; | 195 | return d->state_use_accessors & IRQD_AFFINITY_SET; |
207 | } | 196 | } |
208 | 197 | ||
198 | static inline void irqd_mark_affinity_was_set(struct irq_data *d) | ||
199 | { | ||
200 | d->state_use_accessors |= IRQD_AFFINITY_SET; | ||
201 | } | ||
202 | |||
209 | static inline u32 irqd_get_trigger_type(struct irq_data *d) | 203 | static inline u32 irqd_get_trigger_type(struct irq_data *d) |
210 | { | 204 | { |
211 | return d->state_use_accessors & IRQD_TRIGGER_MASK; | 205 | return d->state_use_accessors & IRQD_TRIGGER_MASK; |
@@ -235,27 +229,40 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d) | |||
235 | return d->state_use_accessors & IRQD_MOVE_PCNTXT; | 229 | return d->state_use_accessors & IRQD_MOVE_PCNTXT; |
236 | } | 230 | } |
237 | 231 | ||
232 | static inline bool irqd_irq_disabled(struct irq_data *d) | ||
233 | { | ||
234 | return d->state_use_accessors & IRQD_IRQ_DISABLED; | ||
235 | } | ||
236 | |||
237 | static inline bool irqd_irq_masked(struct irq_data *d) | ||
238 | { | ||
239 | return d->state_use_accessors & IRQD_IRQ_MASKED; | ||
240 | } | ||
241 | |||
242 | static inline bool irqd_irq_inprogress(struct irq_data *d) | ||
243 | { | ||
244 | return d->state_use_accessors & IRQD_IRQ_INPROGRESS; | ||
245 | } | ||
246 | |||
247 | /* | ||
248 | * Functions for chained handlers which can be enabled/disabled by the | ||
249 | * standard disable_irq/enable_irq calls. Must be called with | ||
250 | * irq_desc->lock held. | ||
251 | */ | ||
252 | static inline void irqd_set_chained_irq_inprogress(struct irq_data *d) | ||
253 | { | ||
254 | d->state_use_accessors |= IRQD_IRQ_INPROGRESS; | ||
255 | } | ||
256 | |||
257 | static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d) | ||
258 | { | ||
259 | d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; | ||
260 | } | ||
261 | |||
238 | /** | 262 | /** |
239 | * struct irq_chip - hardware interrupt chip descriptor | 263 | * struct irq_chip - hardware interrupt chip descriptor |
240 | * | 264 | * |
241 | * @name: name for /proc/interrupts | 265 | * @name: name for /proc/interrupts |
242 | * @startup: deprecated, replaced by irq_startup | ||
243 | * @shutdown: deprecated, replaced by irq_shutdown | ||
244 | * @enable: deprecated, replaced by irq_enable | ||
245 | * @disable: deprecated, replaced by irq_disable | ||
246 | * @ack: deprecated, replaced by irq_ack | ||
247 | * @mask: deprecated, replaced by irq_mask | ||
248 | * @mask_ack: deprecated, replaced by irq_mask_ack | ||
249 | * @unmask: deprecated, replaced by irq_unmask | ||
250 | * @eoi: deprecated, replaced by irq_eoi | ||
251 | * @end: deprecated, will go away with __do_IRQ() | ||
252 | * @set_affinity: deprecated, replaced by irq_set_affinity | ||
253 | * @retrigger: deprecated, replaced by irq_retrigger | ||
254 | * @set_type: deprecated, replaced by irq_set_type | ||
255 | * @set_wake: deprecated, replaced by irq_wake | ||
256 | * @bus_lock: deprecated, replaced by irq_bus_lock | ||
257 | * @bus_sync_unlock: deprecated, replaced by irq_bus_sync_unlock | ||
258 | * | ||
259 | * @irq_startup: start up the interrupt (defaults to ->enable if NULL) | 266 | * @irq_startup: start up the interrupt (defaults to ->enable if NULL) |
260 | * @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL) | 267 | * @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL) |
261 | * @irq_enable: enable the interrupt (defaults to chip->unmask if NULL) | 268 | * @irq_enable: enable the interrupt (defaults to chip->unmask if NULL) |
@@ -271,6 +278,11 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d) | |||
271 | * @irq_set_wake: enable/disable power-management wake-on of an IRQ | 278 | * @irq_set_wake: enable/disable power-management wake-on of an IRQ |
272 | * @irq_bus_lock: function to lock access to slow bus (i2c) chips | 279 | * @irq_bus_lock: function to lock access to slow bus (i2c) chips |
273 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips | 280 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips |
281 | * @irq_cpu_online: configure an interrupt source for a secondary CPU | ||
282 | * @irq_cpu_offline: un-configure an interrupt source for a secondary CPU | ||
283 | * @irq_suspend: function called from core code on suspend once per chip | ||
284 | * @irq_resume: function called from core code on resume once per chip | ||
285 | * @irq_pm_shutdown: function called from core code on shutdown once per chip | ||
274 | * @irq_print_chip: optional to print special chip info in show_interrupts | 286 | * @irq_print_chip: optional to print special chip info in show_interrupts |
275 | * @flags: chip specific flags | 287 | * @flags: chip specific flags |
276 | * | 288 | * |
@@ -278,28 +290,6 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d) | |||
278 | */ | 290 | */ |
279 | struct irq_chip { | 291 | struct irq_chip { |
280 | const char *name; | 292 | const char *name; |
281 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
282 | unsigned int (*startup)(unsigned int irq); | ||
283 | void (*shutdown)(unsigned int irq); | ||
284 | void (*enable)(unsigned int irq); | ||
285 | void (*disable)(unsigned int irq); | ||
286 | |||
287 | void (*ack)(unsigned int irq); | ||
288 | void (*mask)(unsigned int irq); | ||
289 | void (*mask_ack)(unsigned int irq); | ||
290 | void (*unmask)(unsigned int irq); | ||
291 | void (*eoi)(unsigned int irq); | ||
292 | |||
293 | void (*end)(unsigned int irq); | ||
294 | int (*set_affinity)(unsigned int irq, | ||
295 | const struct cpumask *dest); | ||
296 | int (*retrigger)(unsigned int irq); | ||
297 | int (*set_type)(unsigned int irq, unsigned int flow_type); | ||
298 | int (*set_wake)(unsigned int irq, unsigned int on); | ||
299 | |||
300 | void (*bus_lock)(unsigned int irq); | ||
301 | void (*bus_sync_unlock)(unsigned int irq); | ||
302 | #endif | ||
303 | unsigned int (*irq_startup)(struct irq_data *data); | 293 | unsigned int (*irq_startup)(struct irq_data *data); |
304 | void (*irq_shutdown)(struct irq_data *data); | 294 | void (*irq_shutdown)(struct irq_data *data); |
305 | void (*irq_enable)(struct irq_data *data); | 295 | void (*irq_enable)(struct irq_data *data); |
@@ -319,6 +309,13 @@ struct irq_chip { | |||
319 | void (*irq_bus_lock)(struct irq_data *data); | 309 | void (*irq_bus_lock)(struct irq_data *data); |
320 | void (*irq_bus_sync_unlock)(struct irq_data *data); | 310 | void (*irq_bus_sync_unlock)(struct irq_data *data); |
321 | 311 | ||
312 | void (*irq_cpu_online)(struct irq_data *data); | ||
313 | void (*irq_cpu_offline)(struct irq_data *data); | ||
314 | |||
315 | void (*irq_suspend)(struct irq_data *data); | ||
316 | void (*irq_resume)(struct irq_data *data); | ||
317 | void (*irq_pm_shutdown)(struct irq_data *data); | ||
318 | |||
322 | void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); | 319 | void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); |
323 | 320 | ||
324 | unsigned long flags; | 321 | unsigned long flags; |
@@ -335,11 +332,14 @@ struct irq_chip { | |||
335 | * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type() | 332 | * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type() |
336 | * IRQCHIP_EOI_IF_HANDLED: Only issue irq_eoi() when irq was handled | 333 | * IRQCHIP_EOI_IF_HANDLED: Only issue irq_eoi() when irq was handled |
337 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path | 334 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path |
335 | * IRQCHIP_ONOFFLINE_ENABLED: Only call irq_on/off_line callbacks | ||
336 | * when irq enabled | ||
338 | */ | 337 | */ |
339 | enum { | 338 | enum { |
340 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | 339 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), |
341 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), | 340 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), |
342 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), | 341 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), |
342 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), | ||
343 | }; | 343 | }; |
344 | 344 | ||
345 | /* This include will go away once we isolated irq_desc usage to core code */ | 345 | /* This include will go away once we isolated irq_desc usage to core code */ |
@@ -364,25 +364,22 @@ struct irqaction; | |||
364 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 364 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
365 | extern void remove_irq(unsigned int irq, struct irqaction *act); | 365 | extern void remove_irq(unsigned int irq, struct irqaction *act); |
366 | 366 | ||
367 | extern void irq_cpu_online(void); | ||
368 | extern void irq_cpu_offline(void); | ||
369 | extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask); | ||
370 | |||
367 | #ifdef CONFIG_GENERIC_HARDIRQS | 371 | #ifdef CONFIG_GENERIC_HARDIRQS |
368 | 372 | ||
369 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) | 373 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) |
370 | void move_native_irq(int irq); | ||
371 | void move_masked_irq(int irq); | ||
372 | void irq_move_irq(struct irq_data *data); | 374 | void irq_move_irq(struct irq_data *data); |
373 | void irq_move_masked_irq(struct irq_data *data); | 375 | void irq_move_masked_irq(struct irq_data *data); |
374 | #else | 376 | #else |
375 | static inline void move_native_irq(int irq) { } | ||
376 | static inline void move_masked_irq(int irq) { } | ||
377 | static inline void irq_move_irq(struct irq_data *data) { } | 377 | static inline void irq_move_irq(struct irq_data *data) { } |
378 | static inline void irq_move_masked_irq(struct irq_data *data) { } | 378 | static inline void irq_move_masked_irq(struct irq_data *data) { } |
379 | #endif | 379 | #endif |
380 | 380 | ||
381 | extern int no_irq_affinity; | 381 | extern int no_irq_affinity; |
382 | 382 | ||
383 | /* Handle irq action chains: */ | ||
384 | extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); | ||
385 | |||
386 | /* | 383 | /* |
387 | * Built-in IRQ handlers for various IRQ types, | 384 | * Built-in IRQ handlers for various IRQ types, |
388 | * callable via desc->handle_irq() | 385 | * callable via desc->handle_irq() |
@@ -390,6 +387,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); | |||
390 | extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); | 387 | extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); |
391 | extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); | 388 | extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); |
392 | extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); | 389 | extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); |
390 | extern void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc); | ||
393 | extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); | 391 | extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); |
394 | extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); | 392 | extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); |
395 | extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); | 393 | extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); |
@@ -433,7 +431,7 @@ irq_set_handler(unsigned int irq, irq_flow_handler_t handle) | |||
433 | /* | 431 | /* |
434 | * Set a highlevel chained flow handler for a given IRQ. | 432 | * Set a highlevel chained flow handler for a given IRQ. |
435 | * (a chained handler is automatically enabled and set to | 433 | * (a chained handler is automatically enabled and set to |
436 | * IRQ_NOREQUEST and IRQ_NOPROBE) | 434 | * IRQ_NOREQUEST, IRQ_NOPROBE, and IRQ_NOTHREAD) |
437 | */ | 435 | */ |
438 | static inline void | 436 | static inline void |
439 | irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle) | 437 | irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle) |
@@ -463,6 +461,16 @@ static inline void irq_set_probe(unsigned int irq) | |||
463 | irq_modify_status(irq, IRQ_NOPROBE, 0); | 461 | irq_modify_status(irq, IRQ_NOPROBE, 0); |
464 | } | 462 | } |
465 | 463 | ||
464 | static inline void irq_set_nothread(unsigned int irq) | ||
465 | { | ||
466 | irq_modify_status(irq, 0, IRQ_NOTHREAD); | ||
467 | } | ||
468 | |||
469 | static inline void irq_set_thread(unsigned int irq) | ||
470 | { | ||
471 | irq_modify_status(irq, IRQ_NOTHREAD, 0); | ||
472 | } | ||
473 | |||
466 | static inline void irq_set_nested_thread(unsigned int irq, bool nest) | 474 | static inline void irq_set_nested_thread(unsigned int irq, bool nest) |
467 | { | 475 | { |
468 | if (nest) | 476 | if (nest) |
@@ -538,89 +546,6 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d) | |||
538 | return d->msi_desc; | 546 | return d->msi_desc; |
539 | } | 547 | } |
540 | 548 | ||
541 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
542 | /* Please do not use: Use the replacement functions instead */ | ||
543 | static inline int set_irq_chip(unsigned int irq, struct irq_chip *chip) | ||
544 | { | ||
545 | return irq_set_chip(irq, chip); | ||
546 | } | ||
547 | static inline int set_irq_data(unsigned int irq, void *data) | ||
548 | { | ||
549 | return irq_set_handler_data(irq, data); | ||
550 | } | ||
551 | static inline int set_irq_chip_data(unsigned int irq, void *data) | ||
552 | { | ||
553 | return irq_set_chip_data(irq, data); | ||
554 | } | ||
555 | static inline int set_irq_type(unsigned int irq, unsigned int type) | ||
556 | { | ||
557 | return irq_set_irq_type(irq, type); | ||
558 | } | ||
559 | static inline int set_irq_msi(unsigned int irq, struct msi_desc *entry) | ||
560 | { | ||
561 | return irq_set_msi_desc(irq, entry); | ||
562 | } | ||
563 | static inline struct irq_chip *get_irq_chip(unsigned int irq) | ||
564 | { | ||
565 | return irq_get_chip(irq); | ||
566 | } | ||
567 | static inline void *get_irq_chip_data(unsigned int irq) | ||
568 | { | ||
569 | return irq_get_chip_data(irq); | ||
570 | } | ||
571 | static inline void *get_irq_data(unsigned int irq) | ||
572 | { | ||
573 | return irq_get_handler_data(irq); | ||
574 | } | ||
575 | static inline void *irq_data_get_irq_data(struct irq_data *d) | ||
576 | { | ||
577 | return irq_data_get_irq_handler_data(d); | ||
578 | } | ||
579 | static inline struct msi_desc *get_irq_msi(unsigned int irq) | ||
580 | { | ||
581 | return irq_get_msi_desc(irq); | ||
582 | } | ||
583 | static inline void set_irq_noprobe(unsigned int irq) | ||
584 | { | ||
585 | irq_set_noprobe(irq); | ||
586 | } | ||
587 | static inline void set_irq_probe(unsigned int irq) | ||
588 | { | ||
589 | irq_set_probe(irq); | ||
590 | } | ||
591 | static inline void set_irq_nested_thread(unsigned int irq, int nest) | ||
592 | { | ||
593 | irq_set_nested_thread(irq, nest); | ||
594 | } | ||
595 | static inline void | ||
596 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | ||
597 | irq_flow_handler_t handle, const char *name) | ||
598 | { | ||
599 | irq_set_chip_and_handler_name(irq, chip, handle, name); | ||
600 | } | ||
601 | static inline void | ||
602 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | ||
603 | irq_flow_handler_t handle) | ||
604 | { | ||
605 | irq_set_chip_and_handler(irq, chip, handle); | ||
606 | } | ||
607 | static inline void | ||
608 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | ||
609 | const char *name) | ||
610 | { | ||
611 | __irq_set_handler(irq, handle, is_chained, name); | ||
612 | } | ||
613 | static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | ||
614 | { | ||
615 | irq_set_handler(irq, handle); | ||
616 | } | ||
617 | static inline void | ||
618 | set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle) | ||
619 | { | ||
620 | irq_set_chained_handler(irq, handle); | ||
621 | } | ||
622 | #endif | ||
623 | |||
624 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); | 549 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); |
625 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 550 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
626 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | 551 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); |
@@ -650,6 +575,145 @@ static inline int irq_reserve_irq(unsigned int irq) | |||
650 | return irq_reserve_irqs(irq, 1); | 575 | return irq_reserve_irqs(irq, 1); |
651 | } | 576 | } |
652 | 577 | ||
578 | #ifndef irq_reg_writel | ||
579 | # define irq_reg_writel(val, addr) writel(val, addr) | ||
580 | #endif | ||
581 | #ifndef irq_reg_readl | ||
582 | # define irq_reg_readl(addr) readl(addr) | ||
583 | #endif | ||
584 | |||
585 | /** | ||
586 | * struct irq_chip_regs - register offsets for struct irq_gci | ||
587 | * @enable: Enable register offset to reg_base | ||
588 | * @disable: Disable register offset to reg_base | ||
589 | * @mask: Mask register offset to reg_base | ||
590 | * @ack: Ack register offset to reg_base | ||
591 | * @eoi: Eoi register offset to reg_base | ||
592 | * @type: Type configuration register offset to reg_base | ||
593 | * @polarity: Polarity configuration register offset to reg_base | ||
594 | */ | ||
595 | struct irq_chip_regs { | ||
596 | unsigned long enable; | ||
597 | unsigned long disable; | ||
598 | unsigned long mask; | ||
599 | unsigned long ack; | ||
600 | unsigned long eoi; | ||
601 | unsigned long type; | ||
602 | unsigned long polarity; | ||
603 | }; | ||
604 | |||
605 | /** | ||
606 | * struct irq_chip_type - Generic interrupt chip instance for a flow type | ||
607 | * @chip: The real interrupt chip which provides the callbacks | ||
608 | * @regs: Register offsets for this chip | ||
609 | * @handler: Flow handler associated with this chip | ||
610 | * @type: Chip can handle these flow types | ||
611 | * | ||
612 | * A irq_generic_chip can have several instances of irq_chip_type when | ||
613 | * it requires different functions and register offsets for different | ||
614 | * flow types. | ||
615 | */ | ||
616 | struct irq_chip_type { | ||
617 | struct irq_chip chip; | ||
618 | struct irq_chip_regs regs; | ||
619 | irq_flow_handler_t handler; | ||
620 | u32 type; | ||
621 | }; | ||
622 | |||
623 | /** | ||
624 | * struct irq_chip_generic - Generic irq chip data structure | ||
625 | * @lock: Lock to protect register and cache data access | ||
626 | * @reg_base: Register base address (virtual) | ||
627 | * @irq_base: Interrupt base nr for this chip | ||
628 | * @irq_cnt: Number of interrupts handled by this chip | ||
629 | * @mask_cache: Cached mask register | ||
630 | * @type_cache: Cached type register | ||
631 | * @polarity_cache: Cached polarity register | ||
632 | * @wake_enabled: Interrupt can wakeup from suspend | ||
633 | * @wake_active: Interrupt is marked as an wakeup from suspend source | ||
634 | * @num_ct: Number of available irq_chip_type instances (usually 1) | ||
635 | * @private: Private data for non generic chip callbacks | ||
636 | * @list: List head for keeping track of instances | ||
637 | * @chip_types: Array of interrupt irq_chip_types | ||
638 | * | ||
639 | * Note, that irq_chip_generic can have multiple irq_chip_type | ||
640 | * implementations which can be associated to a particular irq line of | ||
641 | * an irq_chip_generic instance. That allows to share and protect | ||
642 | * state in an irq_chip_generic instance when we need to implement | ||
643 | * different flow mechanisms (level/edge) for it. | ||
644 | */ | ||
645 | struct irq_chip_generic { | ||
646 | raw_spinlock_t lock; | ||
647 | void __iomem *reg_base; | ||
648 | unsigned int irq_base; | ||
649 | unsigned int irq_cnt; | ||
650 | u32 mask_cache; | ||
651 | u32 type_cache; | ||
652 | u32 polarity_cache; | ||
653 | u32 wake_enabled; | ||
654 | u32 wake_active; | ||
655 | unsigned int num_ct; | ||
656 | void *private; | ||
657 | struct list_head list; | ||
658 | struct irq_chip_type chip_types[0]; | ||
659 | }; | ||
660 | |||
661 | /** | ||
662 | * enum irq_gc_flags - Initialization flags for generic irq chips | ||
663 | * @IRQ_GC_INIT_MASK_CACHE: Initialize the mask_cache by reading mask reg | ||
664 | * @IRQ_GC_INIT_NESTED_LOCK: Set the lock class of the irqs to nested for | ||
665 | * irq chips which need to call irq_set_wake() on | ||
666 | * the parent irq. Usually GPIO implementations | ||
667 | */ | ||
668 | enum irq_gc_flags { | ||
669 | IRQ_GC_INIT_MASK_CACHE = 1 << 0, | ||
670 | IRQ_GC_INIT_NESTED_LOCK = 1 << 1, | ||
671 | }; | ||
672 | |||
673 | /* Generic chip callback functions */ | ||
674 | void irq_gc_noop(struct irq_data *d); | ||
675 | void irq_gc_mask_disable_reg(struct irq_data *d); | ||
676 | void irq_gc_mask_set_bit(struct irq_data *d); | ||
677 | void irq_gc_mask_clr_bit(struct irq_data *d); | ||
678 | void irq_gc_unmask_enable_reg(struct irq_data *d); | ||
679 | void irq_gc_ack(struct irq_data *d); | ||
680 | void irq_gc_mask_disable_reg_and_ack(struct irq_data *d); | ||
681 | void irq_gc_eoi(struct irq_data *d); | ||
682 | int irq_gc_set_wake(struct irq_data *d, unsigned int on); | ||
683 | |||
684 | /* Setup functions for irq_chip_generic */ | ||
685 | struct irq_chip_generic * | ||
686 | irq_alloc_generic_chip(const char *name, int nr_ct, unsigned int irq_base, | ||
687 | void __iomem *reg_base, irq_flow_handler_t handler); | ||
688 | void irq_setup_generic_chip(struct irq_chip_generic *gc, u32 msk, | ||
689 | enum irq_gc_flags flags, unsigned int clr, | ||
690 | unsigned int set); | ||
691 | int irq_setup_alt_chip(struct irq_data *d, unsigned int type); | ||
692 | void irq_remove_generic_chip(struct irq_chip_generic *gc, u32 msk, | ||
693 | unsigned int clr, unsigned int set); | ||
694 | |||
695 | static inline struct irq_chip_type *irq_data_get_chip_type(struct irq_data *d) | ||
696 | { | ||
697 | return container_of(d->chip, struct irq_chip_type, chip); | ||
698 | } | ||
699 | |||
700 | #define IRQ_MSK(n) (u32)((n) < 32 ? ((1 << (n)) - 1) : UINT_MAX) | ||
701 | |||
702 | #ifdef CONFIG_SMP | ||
703 | static inline void irq_gc_lock(struct irq_chip_generic *gc) | ||
704 | { | ||
705 | raw_spin_lock(&gc->lock); | ||
706 | } | ||
707 | |||
708 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) | ||
709 | { | ||
710 | raw_spin_unlock(&gc->lock); | ||
711 | } | ||
712 | #else | ||
713 | static inline void irq_gc_lock(struct irq_chip_generic *gc) { } | ||
714 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } | ||
715 | #endif | ||
716 | |||
653 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 717 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
654 | 718 | ||
655 | #endif /* !CONFIG_S390 */ | 719 | #endif /* !CONFIG_S390 */ |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 15e6c3905f41..2d921b35212c 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -16,16 +16,18 @@ struct timer_rand_state; | |||
16 | * @irq_data: per irq and chip data passed down to chip functions | 16 | * @irq_data: per irq and chip data passed down to chip functions |
17 | * @timer_rand_state: pointer to timer rand state struct | 17 | * @timer_rand_state: pointer to timer rand state struct |
18 | * @kstat_irqs: irq stats per cpu | 18 | * @kstat_irqs: irq stats per cpu |
19 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] | 19 | * @handle_irq: highlevel irq-events handler |
20 | * @preflow_handler: handler called before the flow handler (currently used by sparc) | ||
20 | * @action: the irq action chain | 21 | * @action: the irq action chain |
21 | * @status: status information | 22 | * @status: status information |
22 | * @core_internal_state__do_not_mess_with_it: core internal status information | 23 | * @core_internal_state__do_not_mess_with_it: core internal status information |
23 | * @depth: disable-depth, for nested irq_disable() calls | 24 | * @depth: disable-depth, for nested irq_disable() calls |
24 | * @wake_depth: enable depth, for multiple set_irq_wake() callers | 25 | * @wake_depth: enable depth, for multiple irq_set_irq_wake() callers |
25 | * @irq_count: stats field to detect stalled irqs | 26 | * @irq_count: stats field to detect stalled irqs |
26 | * @last_unhandled: aging timer for unhandled count | 27 | * @last_unhandled: aging timer for unhandled count |
27 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 28 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
28 | * @lock: locking for SMP | 29 | * @lock: locking for SMP |
30 | * @affinity_hint: hint to user space for preferred irq affinity | ||
29 | * @affinity_notify: context for notification of affinity changes | 31 | * @affinity_notify: context for notification of affinity changes |
30 | * @pending_mask: pending rebalanced interrupts | 32 | * @pending_mask: pending rebalanced interrupts |
31 | * @threads_oneshot: bitfield to handle shared oneshot threads | 33 | * @threads_oneshot: bitfield to handle shared oneshot threads |
@@ -35,32 +37,7 @@ struct timer_rand_state; | |||
35 | * @name: flow handler name for /proc/interrupts output | 37 | * @name: flow handler name for /proc/interrupts output |
36 | */ | 38 | */ |
37 | struct irq_desc { | 39 | struct irq_desc { |
38 | |||
39 | #ifdef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
40 | struct irq_data irq_data; | 40 | struct irq_data irq_data; |
41 | #else | ||
42 | /* | ||
43 | * This union will go away, once we fixed the direct access to | ||
44 | * irq_desc all over the place. The direct fields are a 1:1 | ||
45 | * overlay of irq_data. | ||
46 | */ | ||
47 | union { | ||
48 | struct irq_data irq_data; | ||
49 | struct { | ||
50 | unsigned int irq; | ||
51 | unsigned int node; | ||
52 | unsigned int pad_do_not_even_think_about_it; | ||
53 | struct irq_chip *chip; | ||
54 | void *handler_data; | ||
55 | void *chip_data; | ||
56 | struct msi_desc *msi_desc; | ||
57 | #ifdef CONFIG_SMP | ||
58 | cpumask_var_t affinity; | ||
59 | #endif | ||
60 | }; | ||
61 | }; | ||
62 | #endif | ||
63 | |||
64 | struct timer_rand_state *timer_rand_state; | 41 | struct timer_rand_state *timer_rand_state; |
65 | unsigned int __percpu *kstat_irqs; | 42 | unsigned int __percpu *kstat_irqs; |
66 | irq_flow_handler_t handle_irq; | 43 | irq_flow_handler_t handle_irq; |
@@ -68,11 +45,7 @@ struct irq_desc { | |||
68 | irq_preflow_handler_t preflow_handler; | 45 | irq_preflow_handler_t preflow_handler; |
69 | #endif | 46 | #endif |
70 | struct irqaction *action; /* IRQ action list */ | 47 | struct irqaction *action; /* IRQ action list */ |
71 | #ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
72 | unsigned int status_use_accessors; | 48 | unsigned int status_use_accessors; |
73 | #else | ||
74 | unsigned int status; /* IRQ status */ | ||
75 | #endif | ||
76 | unsigned int core_internal_state__do_not_mess_with_it; | 49 | unsigned int core_internal_state__do_not_mess_with_it; |
77 | unsigned int depth; /* nested irq disables */ | 50 | unsigned int depth; /* nested irq disables */ |
78 | unsigned int wake_depth; /* nested wake enables */ | 51 | unsigned int wake_depth; /* nested wake enables */ |
@@ -127,27 +100,6 @@ static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) | |||
127 | return desc->irq_data.msi_desc; | 100 | return desc->irq_data.msi_desc; |
128 | } | 101 | } |
129 | 102 | ||
130 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
131 | static inline struct irq_chip *get_irq_desc_chip(struct irq_desc *desc) | ||
132 | { | ||
133 | return irq_desc_get_chip(desc); | ||
134 | } | ||
135 | static inline void *get_irq_desc_data(struct irq_desc *desc) | ||
136 | { | ||
137 | return irq_desc_get_handler_data(desc); | ||
138 | } | ||
139 | |||
140 | static inline void *get_irq_desc_chip_data(struct irq_desc *desc) | ||
141 | { | ||
142 | return irq_desc_get_chip_data(desc); | ||
143 | } | ||
144 | |||
145 | static inline struct msi_desc *get_irq_desc_msi(struct irq_desc *desc) | ||
146 | { | ||
147 | return irq_desc_get_msi_desc(desc); | ||
148 | } | ||
149 | #endif | ||
150 | |||
151 | /* | 103 | /* |
152 | * Architectures call this to let the generic IRQ layer | 104 | * Architectures call this to let the generic IRQ layer |
153 | * handle an interrupt. If the descriptor is attached to an | 105 | * handle an interrupt. If the descriptor is attached to an |
@@ -159,10 +111,7 @@ static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *de | |||
159 | desc->handle_irq(irq, desc); | 111 | desc->handle_irq(irq, desc); |
160 | } | 112 | } |
161 | 113 | ||
162 | static inline void generic_handle_irq(unsigned int irq) | 114 | int generic_handle_irq(unsigned int irq); |
163 | { | ||
164 | generic_handle_irq_desc(irq, irq_to_desc(irq)); | ||
165 | } | ||
166 | 115 | ||
167 | /* Test to see if a driver has successfully requested an irq */ | 116 | /* Test to see if a driver has successfully requested an irq */ |
168 | static inline int irq_has_action(unsigned int irq) | 117 | static inline int irq_has_action(unsigned int irq) |
@@ -194,21 +143,13 @@ __irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip, | |||
194 | desc->name = name; | 143 | desc->name = name; |
195 | } | 144 | } |
196 | 145 | ||
197 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
198 | static inline void __set_irq_handler_unlocked(int irq, | ||
199 | irq_flow_handler_t handler) | ||
200 | { | ||
201 | __irq_set_handler_locked(irq, handler); | ||
202 | } | ||
203 | |||
204 | static inline int irq_balancing_disabled(unsigned int irq) | 146 | static inline int irq_balancing_disabled(unsigned int irq) |
205 | { | 147 | { |
206 | struct irq_desc *desc; | 148 | struct irq_desc *desc; |
207 | 149 | ||
208 | desc = irq_to_desc(irq); | 150 | desc = irq_to_desc(irq); |
209 | return desc->status & IRQ_NO_BALANCING_MASK; | 151 | return desc->status_use_accessors & IRQ_NO_BALANCING_MASK; |
210 | } | 152 | } |
211 | #endif | ||
212 | 153 | ||
213 | static inline void | 154 | static inline void |
214 | irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) | 155 | irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) |
diff --git a/include/linux/isdn/hdlc.h b/include/linux/isdn/hdlc.h index 4b3ecc40889a..96521370c782 100644 --- a/include/linux/isdn/hdlc.h +++ b/include/linux/isdn/hdlc.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * hdlc.h -- General purpose ISDN HDLC decoder. | 2 | * hdlc.h -- General purpose ISDN HDLC decoder. |
3 | * | 3 | * |
4 | * Implementation of a HDLC decoder/encoder in software. | 4 | * Implementation of a HDLC decoder/encoder in software. |
5 | * Neccessary because some ISDN devices don't have HDLC | 5 | * Necessary because some ISDN devices don't have HDLC |
6 | * controllers. | 6 | * controllers. |
7 | * | 7 | * |
8 | * Copyright (C) | 8 | * Copyright (C) |
diff --git a/include/linux/ixjuser.h b/include/linux/ixjuser.h index 88b45895746d..94ab5e942e53 100644 --- a/include/linux/ixjuser.h +++ b/include/linux/ixjuser.h | |||
@@ -50,7 +50,7 @@ | |||
50 | * IOCTL's used for the Quicknet Telephony Cards | 50 | * IOCTL's used for the Quicknet Telephony Cards |
51 | * | 51 | * |
52 | * If you use the IXJCTL_TESTRAM command, the card must be power cycled to | 52 | * If you use the IXJCTL_TESTRAM command, the card must be power cycled to |
53 | * reset the SRAM values before futher use. | 53 | * reset the SRAM values before further use. |
54 | * | 54 | * |
55 | ******************************************************************************/ | 55 | ******************************************************************************/ |
56 | 56 | ||
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 922aa313c9f9..f97672a36fa8 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -42,7 +42,7 @@ | |||
42 | /* LATCH is used in the interval timer and ftape setup. */ | 42 | /* LATCH is used in the interval timer and ftape setup. */ |
43 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | 43 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
44 | 44 | ||
45 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, then we can | 45 | /* Suppose we want to divide two numbers NOM and DEN: NOM/DEN, then we can |
46 | * improve accuracy by shifting LSH bits, hence calculating: | 46 | * improve accuracy by shifting LSH bits, hence calculating: |
47 | * (NOM << LSH) / DEN | 47 | * (NOM << LSH) / DEN |
48 | * This however means trouble for large NOM, because (NOM << LSH) may no | 48 | * This however means trouble for large NOM, because (NOM << LSH) may no |
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 7880f18e4b86..83e745f3ead7 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
@@ -1,20 +1,43 @@ | |||
1 | #ifndef _LINUX_JUMP_LABEL_H | 1 | #ifndef _LINUX_JUMP_LABEL_H |
2 | #define _LINUX_JUMP_LABEL_H | 2 | #define _LINUX_JUMP_LABEL_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | #include <linux/compiler.h> | ||
6 | |||
4 | #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) | 7 | #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) |
8 | |||
9 | struct jump_label_key { | ||
10 | atomic_t enabled; | ||
11 | struct jump_entry *entries; | ||
12 | #ifdef CONFIG_MODULES | ||
13 | struct jump_label_mod *next; | ||
14 | #endif | ||
15 | }; | ||
16 | |||
5 | # include <asm/jump_label.h> | 17 | # include <asm/jump_label.h> |
6 | # define HAVE_JUMP_LABEL | 18 | # define HAVE_JUMP_LABEL |
7 | #endif | 19 | #endif |
8 | 20 | ||
9 | enum jump_label_type { | 21 | enum jump_label_type { |
22 | JUMP_LABEL_DISABLE = 0, | ||
10 | JUMP_LABEL_ENABLE, | 23 | JUMP_LABEL_ENABLE, |
11 | JUMP_LABEL_DISABLE | ||
12 | }; | 24 | }; |
13 | 25 | ||
14 | struct module; | 26 | struct module; |
15 | 27 | ||
16 | #ifdef HAVE_JUMP_LABEL | 28 | #ifdef HAVE_JUMP_LABEL |
17 | 29 | ||
30 | #ifdef CONFIG_MODULES | ||
31 | #define JUMP_LABEL_INIT {{ 0 }, NULL, NULL} | ||
32 | #else | ||
33 | #define JUMP_LABEL_INIT {{ 0 }, NULL} | ||
34 | #endif | ||
35 | |||
36 | static __always_inline bool static_branch(struct jump_label_key *key) | ||
37 | { | ||
38 | return arch_static_branch(key); | ||
39 | } | ||
40 | |||
18 | extern struct jump_entry __start___jump_table[]; | 41 | extern struct jump_entry __start___jump_table[]; |
19 | extern struct jump_entry __stop___jump_table[]; | 42 | extern struct jump_entry __stop___jump_table[]; |
20 | 43 | ||
@@ -23,37 +46,37 @@ extern void jump_label_unlock(void); | |||
23 | extern void arch_jump_label_transform(struct jump_entry *entry, | 46 | extern void arch_jump_label_transform(struct jump_entry *entry, |
24 | enum jump_label_type type); | 47 | enum jump_label_type type); |
25 | extern void arch_jump_label_text_poke_early(jump_label_t addr); | 48 | extern void arch_jump_label_text_poke_early(jump_label_t addr); |
26 | extern void jump_label_update(unsigned long key, enum jump_label_type type); | ||
27 | extern void jump_label_apply_nops(struct module *mod); | ||
28 | extern int jump_label_text_reserved(void *start, void *end); | 49 | extern int jump_label_text_reserved(void *start, void *end); |
50 | extern void jump_label_inc(struct jump_label_key *key); | ||
51 | extern void jump_label_dec(struct jump_label_key *key); | ||
52 | extern bool jump_label_enabled(struct jump_label_key *key); | ||
53 | extern void jump_label_apply_nops(struct module *mod); | ||
29 | 54 | ||
30 | #define jump_label_enable(key) \ | 55 | #else |
31 | jump_label_update((unsigned long)key, JUMP_LABEL_ENABLE); | ||
32 | 56 | ||
33 | #define jump_label_disable(key) \ | 57 | #include <asm/atomic.h> |
34 | jump_label_update((unsigned long)key, JUMP_LABEL_DISABLE); | ||
35 | 58 | ||
36 | #else | 59 | #define JUMP_LABEL_INIT {ATOMIC_INIT(0)} |
37 | 60 | ||
38 | #define JUMP_LABEL(key, label) \ | 61 | struct jump_label_key { |
39 | do { \ | 62 | atomic_t enabled; |
40 | if (unlikely(*key)) \ | 63 | }; |
41 | goto label; \ | ||
42 | } while (0) | ||
43 | 64 | ||
44 | #define jump_label_enable(cond_var) \ | 65 | static __always_inline bool static_branch(struct jump_label_key *key) |
45 | do { \ | 66 | { |
46 | *(cond_var) = 1; \ | 67 | if (unlikely(atomic_read(&key->enabled))) |
47 | } while (0) | 68 | return true; |
69 | return false; | ||
70 | } | ||
48 | 71 | ||
49 | #define jump_label_disable(cond_var) \ | 72 | static inline void jump_label_inc(struct jump_label_key *key) |
50 | do { \ | 73 | { |
51 | *(cond_var) = 0; \ | 74 | atomic_inc(&key->enabled); |
52 | } while (0) | 75 | } |
53 | 76 | ||
54 | static inline int jump_label_apply_nops(struct module *mod) | 77 | static inline void jump_label_dec(struct jump_label_key *key) |
55 | { | 78 | { |
56 | return 0; | 79 | atomic_dec(&key->enabled); |
57 | } | 80 | } |
58 | 81 | ||
59 | static inline int jump_label_text_reserved(void *start, void *end) | 82 | static inline int jump_label_text_reserved(void *start, void *end) |
@@ -64,16 +87,16 @@ static inline int jump_label_text_reserved(void *start, void *end) | |||
64 | static inline void jump_label_lock(void) {} | 87 | static inline void jump_label_lock(void) {} |
65 | static inline void jump_label_unlock(void) {} | 88 | static inline void jump_label_unlock(void) {} |
66 | 89 | ||
67 | #endif | 90 | static inline bool jump_label_enabled(struct jump_label_key *key) |
91 | { | ||
92 | return !!atomic_read(&key->enabled); | ||
93 | } | ||
68 | 94 | ||
69 | #define COND_STMT(key, stmt) \ | 95 | static inline int jump_label_apply_nops(struct module *mod) |
70 | do { \ | 96 | { |
71 | __label__ jl_enabled; \ | 97 | return 0; |
72 | JUMP_LABEL(key, jl_enabled); \ | 98 | } |
73 | if (0) { \ | 99 | |
74 | jl_enabled: \ | 100 | #endif |
75 | stmt; \ | ||
76 | } \ | ||
77 | } while (0) | ||
78 | 101 | ||
79 | #endif | 102 | #endif |
diff --git a/include/linux/jump_label_ref.h b/include/linux/jump_label_ref.h deleted file mode 100644 index e5d012ad92c6..000000000000 --- a/include/linux/jump_label_ref.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #ifndef _LINUX_JUMP_LABEL_REF_H | ||
2 | #define _LINUX_JUMP_LABEL_REF_H | ||
3 | |||
4 | #include <linux/jump_label.h> | ||
5 | #include <asm/atomic.h> | ||
6 | |||
7 | #ifdef HAVE_JUMP_LABEL | ||
8 | |||
9 | static inline void jump_label_inc(atomic_t *key) | ||
10 | { | ||
11 | if (atomic_add_return(1, key) == 1) | ||
12 | jump_label_enable(key); | ||
13 | } | ||
14 | |||
15 | static inline void jump_label_dec(atomic_t *key) | ||
16 | { | ||
17 | if (atomic_dec_and_test(key)) | ||
18 | jump_label_disable(key); | ||
19 | } | ||
20 | |||
21 | #else /* !HAVE_JUMP_LABEL */ | ||
22 | |||
23 | static inline void jump_label_inc(atomic_t *key) | ||
24 | { | ||
25 | atomic_inc(key); | ||
26 | } | ||
27 | |||
28 | static inline void jump_label_dec(atomic_t *key) | ||
29 | { | ||
30 | atomic_dec(key); | ||
31 | } | ||
32 | |||
33 | #undef JUMP_LABEL | ||
34 | #define JUMP_LABEL(key, label) \ | ||
35 | do { \ | ||
36 | if (unlikely(__builtin_choose_expr( \ | ||
37 | __builtin_types_compatible_p(typeof(key), atomic_t *), \ | ||
38 | atomic_read((atomic_t *)(key)), *(key)))) \ | ||
39 | goto label; \ | ||
40 | } while (0) | ||
41 | |||
42 | #endif /* HAVE_JUMP_LABEL */ | ||
43 | |||
44 | #endif /* _LINUX_JUMP_LABEL_REF_H */ | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 00cec4dc0ae2..f37ba716ef8b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -283,6 +283,7 @@ extern char *get_options(const char *str, int nints, int *ints); | |||
283 | extern unsigned long long memparse(const char *ptr, char **retptr); | 283 | extern unsigned long long memparse(const char *ptr, char **retptr); |
284 | 284 | ||
285 | extern int core_kernel_text(unsigned long addr); | 285 | extern int core_kernel_text(unsigned long addr); |
286 | extern int core_kernel_data(unsigned long addr); | ||
286 | extern int __kernel_text_address(unsigned long addr); | 287 | extern int __kernel_text_address(unsigned long addr); |
287 | extern int kernel_text_address(unsigned long addr); | 288 | extern int kernel_text_address(unsigned long addr); |
288 | extern int func_ptr_is_kernel_text(void *ptr); | 289 | extern int func_ptr_is_kernel_text(void *ptr); |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 03e8e8dbc577..c2478a342cd7 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -208,6 +208,7 @@ int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, | |||
208 | unsigned long long *crash_size, unsigned long long *crash_base); | 208 | unsigned long long *crash_size, unsigned long long *crash_base); |
209 | int crash_shrink_memory(unsigned long new_size); | 209 | int crash_shrink_memory(unsigned long new_size); |
210 | size_t crash_get_memory_size(void); | 210 | size_t crash_get_memory_size(void); |
211 | void crash_free_reserved_phys_range(unsigned long begin, unsigned long end); | ||
211 | 212 | ||
212 | #else /* !CONFIG_KEXEC */ | 213 | #else /* !CONFIG_KEXEC */ |
213 | struct pt_regs; | 214 | struct pt_regs; |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 6efd7a78de6a..310231823852 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -113,5 +113,6 @@ extern void usermodehelper_init(void); | |||
113 | 113 | ||
114 | extern int usermodehelper_disable(void); | 114 | extern int usermodehelper_disable(void); |
115 | extern void usermodehelper_enable(void); | 115 | extern void usermodehelper_enable(void); |
116 | extern bool usermodehelper_is_disabled(void); | ||
116 | 117 | ||
117 | #endif /* __LINUX_KMOD_H__ */ | 118 | #endif /* __LINUX_KMOD_H__ */ |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index e1ceaa9b36bb..603bec2913b0 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -35,7 +35,7 @@ | |||
35 | * | 35 | * |
36 | * On 32-bit CPUs an optimized representation of the timespec structure | 36 | * On 32-bit CPUs an optimized representation of the timespec structure |
37 | * is used to avoid expensive conversions from and to timespecs. The | 37 | * is used to avoid expensive conversions from and to timespecs. The |
38 | * endian-aware order of the tv struct members is choosen to allow | 38 | * endian-aware order of the tv struct members is chosen to allow |
39 | * mathematical operations on the tv64 member of the union too, which | 39 | * mathematical operations on the tv64 member of the union too, which |
40 | * for certain operations produces better code. | 40 | * for certain operations produces better code. |
41 | * | 41 | * |
@@ -158,7 +158,7 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) | |||
158 | * @lhs: minuend | 158 | * @lhs: minuend |
159 | * @rhs: subtrahend | 159 | * @rhs: subtrahend |
160 | * | 160 | * |
161 | * Returns the remainder of the substraction | 161 | * Returns the remainder of the subtraction |
162 | */ | 162 | */ |
163 | static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) | 163 | static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) |
164 | { | 164 | { |
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h index bb69d20da0dc..58592fa67d24 100644 --- a/include/linux/led-lm3530.h +++ b/include/linux/led-lm3530.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define LM3530_RAMP_TIME_8s (7) | 41 | #define LM3530_RAMP_TIME_8s (7) |
42 | 42 | ||
43 | /* ALS Resistor Select */ | 43 | /* ALS Resistor Select */ |
44 | #define LM3530_ALS_IMPD_Z (0x00) /* ALS Impedence */ | 44 | #define LM3530_ALS_IMPD_Z (0x00) /* ALS Impedance */ |
45 | #define LM3530_ALS_IMPD_13_53kOhm (0x01) | 45 | #define LM3530_ALS_IMPD_13_53kOhm (0x01) |
46 | #define LM3530_ALS_IMPD_9_01kOhm (0x02) | 46 | #define LM3530_ALS_IMPD_9_01kOhm (0x02) |
47 | #define LM3530_ALS_IMPD_5_41kOhm (0x03) | 47 | #define LM3530_ALS_IMPD_5_41kOhm (0x03) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index c71f46960f39..5a9926b34072 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -137,8 +137,6 @@ enum { | |||
137 | ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ | 137 | ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ |
138 | ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ | 138 | ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ |
139 | ATA_DFLAG_AN = (1 << 7), /* AN configured */ | 139 | ATA_DFLAG_AN = (1 << 7), /* AN configured */ |
140 | ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */ | ||
141 | ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */ | ||
142 | ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */ | 140 | ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */ |
143 | ATA_DFLAG_CFG_MASK = (1 << 12) - 1, | 141 | ATA_DFLAG_CFG_MASK = (1 << 12) - 1, |
144 | 142 | ||
@@ -198,6 +196,7 @@ enum { | |||
198 | * management */ | 196 | * management */ |
199 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity | 197 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity |
200 | * led */ | 198 | * led */ |
199 | ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */ | ||
201 | 200 | ||
202 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ | 201 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ |
203 | 202 | ||
@@ -364,7 +363,7 @@ enum { | |||
364 | ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, | 363 | ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, |
365 | 364 | ||
366 | /* Horkage types. May be set by libata or controller on drives | 365 | /* Horkage types. May be set by libata or controller on drives |
367 | (some horkage may be drive/controller pair dependant */ | 366 | (some horkage may be drive/controller pair dependent */ |
368 | 367 | ||
369 | ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ | 368 | ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ |
370 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ | 369 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ |
@@ -1152,6 +1151,7 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
1152 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 1151 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |
1153 | ata_postreset_fn_t postreset); | 1152 | ata_postreset_fn_t postreset); |
1154 | extern void ata_std_error_handler(struct ata_port *ap); | 1153 | extern void ata_std_error_handler(struct ata_port *ap); |
1154 | extern int ata_link_nr_enabled(struct ata_link *link); | ||
1155 | 1155 | ||
1156 | /* | 1156 | /* |
1157 | * Base operations to inherit from and initializers for sht | 1157 | * Base operations to inherit from and initializers for sht |
diff --git a/include/linux/list.h b/include/linux/list.h index 3a54266a1e85..cc6d2aa6b415 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/stddef.h> | 5 | #include <linux/stddef.h> |
6 | #include <linux/poison.h> | 6 | #include <linux/poison.h> |
7 | #include <linux/prefetch.h> | 7 | #include <linux/const.h> |
8 | 8 | ||
9 | /* | 9 | /* |
10 | * Simple doubly linked list implementation. | 10 | * Simple doubly linked list implementation. |
@@ -367,18 +367,15 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
367 | * @head: the head for your list. | 367 | * @head: the head for your list. |
368 | */ | 368 | */ |
369 | #define list_for_each(pos, head) \ | 369 | #define list_for_each(pos, head) \ |
370 | for (pos = (head)->next; prefetch(pos->next), pos != (head); \ | 370 | for (pos = (head)->next; pos != (head); pos = pos->next) |
371 | pos = pos->next) | ||
372 | 371 | ||
373 | /** | 372 | /** |
374 | * __list_for_each - iterate over a list | 373 | * __list_for_each - iterate over a list |
375 | * @pos: the &struct list_head to use as a loop cursor. | 374 | * @pos: the &struct list_head to use as a loop cursor. |
376 | * @head: the head for your list. | 375 | * @head: the head for your list. |
377 | * | 376 | * |
378 | * This variant differs from list_for_each() in that it's the | 377 | * This variant doesn't differ from list_for_each() any more. |
379 | * simplest possible list iteration code, no prefetching is done. | 378 | * We don't do prefetching in either case. |
380 | * Use this for code that knows the list to be very short (empty | ||
381 | * or 1 entry) most of the time. | ||
382 | */ | 379 | */ |
383 | #define __list_for_each(pos, head) \ | 380 | #define __list_for_each(pos, head) \ |
384 | for (pos = (head)->next; pos != (head); pos = pos->next) | 381 | for (pos = (head)->next; pos != (head); pos = pos->next) |
@@ -389,8 +386,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
389 | * @head: the head for your list. | 386 | * @head: the head for your list. |
390 | */ | 387 | */ |
391 | #define list_for_each_prev(pos, head) \ | 388 | #define list_for_each_prev(pos, head) \ |
392 | for (pos = (head)->prev; prefetch(pos->prev), pos != (head); \ | 389 | for (pos = (head)->prev; pos != (head); pos = pos->prev) |
393 | pos = pos->prev) | ||
394 | 390 | ||
395 | /** | 391 | /** |
396 | * list_for_each_safe - iterate over a list safe against removal of list entry | 392 | * list_for_each_safe - iterate over a list safe against removal of list entry |
@@ -410,7 +406,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
410 | */ | 406 | */ |
411 | #define list_for_each_prev_safe(pos, n, head) \ | 407 | #define list_for_each_prev_safe(pos, n, head) \ |
412 | for (pos = (head)->prev, n = pos->prev; \ | 408 | for (pos = (head)->prev, n = pos->prev; \ |
413 | prefetch(pos->prev), pos != (head); \ | 409 | pos != (head); \ |
414 | pos = n, n = pos->prev) | 410 | pos = n, n = pos->prev) |
415 | 411 | ||
416 | /** | 412 | /** |
@@ -421,7 +417,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
421 | */ | 417 | */ |
422 | #define list_for_each_entry(pos, head, member) \ | 418 | #define list_for_each_entry(pos, head, member) \ |
423 | for (pos = list_entry((head)->next, typeof(*pos), member); \ | 419 | for (pos = list_entry((head)->next, typeof(*pos), member); \ |
424 | prefetch(pos->member.next), &pos->member != (head); \ | 420 | &pos->member != (head); \ |
425 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 421 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
426 | 422 | ||
427 | /** | 423 | /** |
@@ -432,7 +428,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
432 | */ | 428 | */ |
433 | #define list_for_each_entry_reverse(pos, head, member) \ | 429 | #define list_for_each_entry_reverse(pos, head, member) \ |
434 | for (pos = list_entry((head)->prev, typeof(*pos), member); \ | 430 | for (pos = list_entry((head)->prev, typeof(*pos), member); \ |
435 | prefetch(pos->member.prev), &pos->member != (head); \ | 431 | &pos->member != (head); \ |
436 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 432 | pos = list_entry(pos->member.prev, typeof(*pos), member)) |
437 | 433 | ||
438 | /** | 434 | /** |
@@ -457,7 +453,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
457 | */ | 453 | */ |
458 | #define list_for_each_entry_continue(pos, head, member) \ | 454 | #define list_for_each_entry_continue(pos, head, member) \ |
459 | for (pos = list_entry(pos->member.next, typeof(*pos), member); \ | 455 | for (pos = list_entry(pos->member.next, typeof(*pos), member); \ |
460 | prefetch(pos->member.next), &pos->member != (head); \ | 456 | &pos->member != (head); \ |
461 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 457 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
462 | 458 | ||
463 | /** | 459 | /** |
@@ -471,7 +467,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
471 | */ | 467 | */ |
472 | #define list_for_each_entry_continue_reverse(pos, head, member) \ | 468 | #define list_for_each_entry_continue_reverse(pos, head, member) \ |
473 | for (pos = list_entry(pos->member.prev, typeof(*pos), member); \ | 469 | for (pos = list_entry(pos->member.prev, typeof(*pos), member); \ |
474 | prefetch(pos->member.prev), &pos->member != (head); \ | 470 | &pos->member != (head); \ |
475 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 471 | pos = list_entry(pos->member.prev, typeof(*pos), member)) |
476 | 472 | ||
477 | /** | 473 | /** |
@@ -483,7 +479,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
483 | * Iterate over list of given type, continuing from current position. | 479 | * Iterate over list of given type, continuing from current position. |
484 | */ | 480 | */ |
485 | #define list_for_each_entry_from(pos, head, member) \ | 481 | #define list_for_each_entry_from(pos, head, member) \ |
486 | for (; prefetch(pos->member.next), &pos->member != (head); \ | 482 | for (; &pos->member != (head); \ |
487 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 483 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
488 | 484 | ||
489 | /** | 485 | /** |
@@ -664,8 +660,7 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
664 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member) | 660 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member) |
665 | 661 | ||
666 | #define hlist_for_each(pos, head) \ | 662 | #define hlist_for_each(pos, head) \ |
667 | for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \ | 663 | for (pos = (head)->first; pos ; pos = pos->next) |
668 | pos = pos->next) | ||
669 | 664 | ||
670 | #define hlist_for_each_safe(pos, n, head) \ | 665 | #define hlist_for_each_safe(pos, n, head) \ |
671 | for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \ | 666 | for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \ |
@@ -680,7 +675,7 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
680 | */ | 675 | */ |
681 | #define hlist_for_each_entry(tpos, pos, head, member) \ | 676 | #define hlist_for_each_entry(tpos, pos, head, member) \ |
682 | for (pos = (head)->first; \ | 677 | for (pos = (head)->first; \ |
683 | pos && ({ prefetch(pos->next); 1;}) && \ | 678 | pos && \ |
684 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ | 679 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ |
685 | pos = pos->next) | 680 | pos = pos->next) |
686 | 681 | ||
@@ -692,7 +687,7 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
692 | */ | 687 | */ |
693 | #define hlist_for_each_entry_continue(tpos, pos, member) \ | 688 | #define hlist_for_each_entry_continue(tpos, pos, member) \ |
694 | for (pos = (pos)->next; \ | 689 | for (pos = (pos)->next; \ |
695 | pos && ({ prefetch(pos->next); 1;}) && \ | 690 | pos && \ |
696 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ | 691 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ |
697 | pos = pos->next) | 692 | pos = pos->next) |
698 | 693 | ||
@@ -703,7 +698,7 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
703 | * @member: the name of the hlist_node within the struct. | 698 | * @member: the name of the hlist_node within the struct. |
704 | */ | 699 | */ |
705 | #define hlist_for_each_entry_from(tpos, pos, member) \ | 700 | #define hlist_for_each_entry_from(tpos, pos, member) \ |
706 | for (; pos && ({ prefetch(pos->next); 1;}) && \ | 701 | for (; pos && \ |
707 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ | 702 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ |
708 | pos = pos->next) | 703 | pos = pos->next) |
709 | 704 | ||
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h index 5bad17d1acde..31f9d75adc5b 100644 --- a/include/linux/list_bl.h +++ b/include/linux/list_bl.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_LIST_BL_H | 2 | #define _LINUX_LIST_BL_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/bit_spinlock.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * Special version of lists, where head of the list has a lock in the lowest | 8 | * Special version of lists, where head of the list has a lock in the lowest |
@@ -114,6 +115,16 @@ static inline void hlist_bl_del_init(struct hlist_bl_node *n) | |||
114 | } | 115 | } |
115 | } | 116 | } |
116 | 117 | ||
118 | static inline void hlist_bl_lock(struct hlist_bl_head *b) | ||
119 | { | ||
120 | bit_spin_lock(0, (unsigned long *)b); | ||
121 | } | ||
122 | |||
123 | static inline void hlist_bl_unlock(struct hlist_bl_head *b) | ||
124 | { | ||
125 | __bit_spin_unlock(0, (unsigned long *)b); | ||
126 | } | ||
127 | |||
117 | /** | 128 | /** |
118 | * hlist_bl_for_each_entry - iterate over list of given type | 129 | * hlist_bl_for_each_entry - iterate over list of given type |
119 | * @tpos: the type * to use as a loop cursor. | 130 | * @tpos: the type * to use as a loop cursor. |
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h index 78fbf24f357a..6a4fab7c6e09 100644 --- a/include/linux/lru_cache.h +++ b/include/linux/lru_cache.h | |||
@@ -148,7 +148,7 @@ write intent log information, three of which are mentioned here. | |||
148 | * | 148 | * |
149 | * DRBD currently (May 2009) only uses 61 elements on the resync lru_cache | 149 | * DRBD currently (May 2009) only uses 61 elements on the resync lru_cache |
150 | * (total memory usage 2 pages), and up to 3833 elements on the act_log | 150 | * (total memory usage 2 pages), and up to 3833 elements on the act_log |
151 | * lru_cache, totalling ~215 kB for 64bit architechture, ~53 pages. | 151 | * lru_cache, totalling ~215 kB for 64bit architecture, ~53 pages. |
152 | * | 152 | * |
153 | * We usually do not actually free these objects again, but only "recycle" | 153 | * We usually do not actually free these objects again, but only "recycle" |
154 | * them, as the change "index: -old_label, +LC_FREE" would need a transaction | 154 | * them, as the change "index: -old_label, +LC_FREE" would need a transaction |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 5a5ce7055839..5e9840f50980 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -216,7 +216,7 @@ static inline void mem_cgroup_del_lru_list(struct page *page, int lru) | |||
216 | return ; | 216 | return ; |
217 | } | 217 | } |
218 | 218 | ||
219 | static inline inline void mem_cgroup_rotate_reclaimable_page(struct page *page) | 219 | static inline void mem_cgroup_rotate_reclaimable_page(struct page *page) |
220 | { | 220 | { |
221 | return ; | 221 | return ; |
222 | } | 222 | } |
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h index 56f8dea72152..b31843075198 100644 --- a/include/linux/mfd/ab8500.h +++ b/include/linux/mfd/ab8500.h | |||
@@ -74,6 +74,45 @@ | |||
74 | #define AB8500_INT_ACC_DETECT_21DB_F 37 | 74 | #define AB8500_INT_ACC_DETECT_21DB_F 37 |
75 | #define AB8500_INT_ACC_DETECT_21DB_R 38 | 75 | #define AB8500_INT_ACC_DETECT_21DB_R 38 |
76 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 | 76 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 |
77 | #define AB8500_INT_ACC_DETECT_1DB_F 33 | ||
78 | #define AB8500_INT_ACC_DETECT_1DB_R 34 | ||
79 | #define AB8500_INT_ACC_DETECT_22DB_F 35 | ||
80 | #define AB8500_INT_ACC_DETECT_22DB_R 36 | ||
81 | #define AB8500_INT_ACC_DETECT_21DB_F 37 | ||
82 | #define AB8500_INT_ACC_DETECT_21DB_R 38 | ||
83 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 | ||
84 | #define AB8500_INT_GPIO6R 40 | ||
85 | #define AB8500_INT_GPIO7R 41 | ||
86 | #define AB8500_INT_GPIO8R 42 | ||
87 | #define AB8500_INT_GPIO9R 43 | ||
88 | #define AB8500_INT_GPIO10R 44 | ||
89 | #define AB8500_INT_GPIO11R 45 | ||
90 | #define AB8500_INT_GPIO12R 46 | ||
91 | #define AB8500_INT_GPIO13R 47 | ||
92 | #define AB8500_INT_GPIO24R 48 | ||
93 | #define AB8500_INT_GPIO25R 49 | ||
94 | #define AB8500_INT_GPIO36R 50 | ||
95 | #define AB8500_INT_GPIO37R 51 | ||
96 | #define AB8500_INT_GPIO38R 52 | ||
97 | #define AB8500_INT_GPIO39R 53 | ||
98 | #define AB8500_INT_GPIO40R 54 | ||
99 | #define AB8500_INT_GPIO41R 55 | ||
100 | #define AB8500_INT_GPIO6F 56 | ||
101 | #define AB8500_INT_GPIO7F 57 | ||
102 | #define AB8500_INT_GPIO8F 58 | ||
103 | #define AB8500_INT_GPIO9F 59 | ||
104 | #define AB8500_INT_GPIO10F 60 | ||
105 | #define AB8500_INT_GPIO11F 61 | ||
106 | #define AB8500_INT_GPIO12F 62 | ||
107 | #define AB8500_INT_GPIO13F 63 | ||
108 | #define AB8500_INT_GPIO24F 64 | ||
109 | #define AB8500_INT_GPIO25F 65 | ||
110 | #define AB8500_INT_GPIO36F 66 | ||
111 | #define AB8500_INT_GPIO37F 67 | ||
112 | #define AB8500_INT_GPIO38F 68 | ||
113 | #define AB8500_INT_GPIO39F 69 | ||
114 | #define AB8500_INT_GPIO40F 70 | ||
115 | #define AB8500_INT_GPIO41F 71 | ||
77 | #define AB8500_INT_ADP_SOURCE_ERROR 72 | 116 | #define AB8500_INT_ADP_SOURCE_ERROR 72 |
78 | #define AB8500_INT_ADP_SINK_ERROR 73 | 117 | #define AB8500_INT_ADP_SINK_ERROR 73 |
79 | #define AB8500_INT_ADP_PROBE_PLUG 74 | 118 | #define AB8500_INT_ADP_PROBE_PLUG 74 |
@@ -139,19 +178,27 @@ struct ab8500 { | |||
139 | u8 oldmask[AB8500_NUM_IRQ_REGS]; | 178 | u8 oldmask[AB8500_NUM_IRQ_REGS]; |
140 | }; | 179 | }; |
141 | 180 | ||
181 | struct regulator_reg_init; | ||
142 | struct regulator_init_data; | 182 | struct regulator_init_data; |
183 | struct ab8500_gpio_platform_data; | ||
143 | 184 | ||
144 | /** | 185 | /** |
145 | * struct ab8500_platform_data - AB8500 platform data | 186 | * struct ab8500_platform_data - AB8500 platform data |
146 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used | 187 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used |
147 | * @init: board-specific initialization after detection of ab8500 | 188 | * @init: board-specific initialization after detection of ab8500 |
189 | * @num_regulator_reg_init: number of regulator init registers | ||
190 | * @regulator_reg_init: regulator init registers | ||
191 | * @num_regulator: number of regulators | ||
148 | * @regulator: machine-specific constraints for regulators | 192 | * @regulator: machine-specific constraints for regulators |
149 | */ | 193 | */ |
150 | struct ab8500_platform_data { | 194 | struct ab8500_platform_data { |
151 | int irq_base; | 195 | int irq_base; |
152 | void (*init) (struct ab8500 *); | 196 | void (*init) (struct ab8500 *); |
197 | int num_regulator_reg_init; | ||
198 | struct ab8500_regulator_reg_init *regulator_reg_init; | ||
153 | int num_regulator; | 199 | int num_regulator; |
154 | struct regulator_init_data *regulator; | 200 | struct regulator_init_data *regulator; |
201 | struct ab8500_gpio_platform_data *gpio; | ||
155 | }; | 202 | }; |
156 | 203 | ||
157 | extern int __devinit ab8500_init(struct ab8500 *ab8500); | 204 | extern int __devinit ab8500_init(struct ab8500 *ab8500); |
diff --git a/include/linux/mfd/ab8500/gpio.h b/include/linux/mfd/ab8500/gpio.h new file mode 100644 index 000000000000..488a8c920a29 --- /dev/null +++ b/include/linux/mfd/ab8500/gpio.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright ST-Ericsson 2010. | ||
3 | * | ||
4 | * Author: Bibek Basu <bibek.basu@stericsson.com> | ||
5 | * Licensed under GPLv2. | ||
6 | */ | ||
7 | |||
8 | #ifndef _AB8500_GPIO_H | ||
9 | #define _AB8500_GPIO_H | ||
10 | |||
11 | /* | ||
12 | * Platform data to register a block: only the initial gpio/irq number. | ||
13 | */ | ||
14 | |||
15 | struct ab8500_gpio_platform_data { | ||
16 | int gpio_base; | ||
17 | u32 irq_base; | ||
18 | u8 config_reg[7]; | ||
19 | }; | ||
20 | |||
21 | #endif /* _AB8500_GPIO_H */ | ||
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 1408bf8eed5f..aef23309a742 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -63,21 +63,48 @@ extern int mfd_cell_enable(struct platform_device *pdev); | |||
63 | extern int mfd_cell_disable(struct platform_device *pdev); | 63 | extern int mfd_cell_disable(struct platform_device *pdev); |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * "Clone" multiple platform devices for a single cell. This is to be used | ||
67 | * for devices that have multiple users of a cell. For example, if an mfd | ||
68 | * driver wants the cell "foo" to be used by a GPIO driver, an MTD driver, | ||
69 | * and a platform driver, the following bit of code would be use after first | ||
70 | * calling mfd_add_devices(): | ||
71 | * | ||
72 | * const char *fclones[] = { "foo-gpio", "foo-mtd" }; | ||
73 | * err = mfd_clone_cells("foo", fclones, ARRAY_SIZE(fclones)); | ||
74 | * | ||
75 | * Each driver (MTD, GPIO, and platform driver) would then register | ||
76 | * platform_drivers for "foo-mtd", "foo-gpio", and "foo", respectively. | ||
77 | * The cell's .enable/.disable hooks should be used to deal with hardware | ||
78 | * resource contention. | ||
79 | */ | ||
80 | extern int mfd_clone_cell(const char *cell, const char **clones, | ||
81 | size_t n_clones); | ||
82 | |||
83 | /* | ||
66 | * Given a platform device that's been created by mfd_add_devices(), fetch | 84 | * Given a platform device that's been created by mfd_add_devices(), fetch |
67 | * the mfd_cell that created it. | 85 | * the mfd_cell that created it. |
68 | */ | 86 | */ |
69 | static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | 87 | static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) |
70 | { | 88 | { |
71 | return pdev->dev.platform_data; | 89 | return pdev->mfd_cell; |
72 | } | 90 | } |
73 | 91 | ||
74 | /* | 92 | /* |
75 | * Given a platform device that's been created by mfd_add_devices(), fetch | 93 | * Given a platform device that's been created by mfd_add_devices(), fetch |
76 | * the .mfd_data entry from the mfd_cell that created it. | 94 | * the .mfd_data entry from the mfd_cell that created it. |
95 | * Otherwise just return the platform_data pointer. | ||
96 | * This maintains compatibility with platform drivers whose devices aren't | ||
97 | * created by the mfd layer, and expect platform_data to contain what would've | ||
98 | * otherwise been in mfd_data. | ||
77 | */ | 99 | */ |
78 | static inline void *mfd_get_data(struct platform_device *pdev) | 100 | static inline void *mfd_get_data(struct platform_device *pdev) |
79 | { | 101 | { |
80 | return mfd_get_cell(pdev)->mfd_data; | 102 | const struct mfd_cell *cell = mfd_get_cell(pdev); |
103 | |||
104 | if (cell) | ||
105 | return cell->mfd_data; | ||
106 | else | ||
107 | return pdev->dev.platform_data; | ||
81 | } | 108 | } |
82 | 109 | ||
83 | extern int mfd_add_devices(struct device *parent, int id, | 110 | extern int mfd_add_devices(struct device *parent, int id, |
@@ -87,13 +114,4 @@ extern int mfd_add_devices(struct device *parent, int id, | |||
87 | 114 | ||
88 | extern void mfd_remove_devices(struct device *parent); | 115 | extern void mfd_remove_devices(struct device *parent); |
89 | 116 | ||
90 | /* | ||
91 | * For MFD drivers with clients sharing access to resources, these create | ||
92 | * multiple platform devices per cell. Contention handling must still be | ||
93 | * handled via drivers (ie, with enable/disable hooks). | ||
94 | */ | ||
95 | extern int mfd_shared_platform_driver_register(struct platform_driver *drv, | ||
96 | const char *cellname); | ||
97 | extern void mfd_shared_platform_driver_unregister(struct platform_driver *drv); | ||
98 | |||
99 | #endif | 117 | #endif |
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index 93a9477e075f..69d1010e2e51 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | 26 | ||
27 | #define MAX8997_REG_INVALID (0xff) | ||
28 | |||
27 | enum max8997_pmic_reg { | 29 | enum max8997_pmic_reg { |
28 | MAX8997_REG_PMIC_ID0 = 0x00, | 30 | MAX8997_REG_PMIC_ID0 = 0x00, |
29 | MAX8997_REG_PMIC_ID1 = 0x01, | 31 | MAX8997_REG_PMIC_ID1 = 0x01, |
@@ -313,6 +315,7 @@ enum max8997_irq { | |||
313 | #define MAX8997_REG_BUCK2DVS(x) (MAX8997_REG_BUCK2DVS1 + (x) - 1) | 315 | #define MAX8997_REG_BUCK2DVS(x) (MAX8997_REG_BUCK2DVS1 + (x) - 1) |
314 | #define MAX8997_REG_BUCK5DVS(x) (MAX8997_REG_BUCK5DVS1 + (x) - 1) | 316 | #define MAX8997_REG_BUCK5DVS(x) (MAX8997_REG_BUCK5DVS1 + (x) - 1) |
315 | 317 | ||
318 | #define MAX8997_NUM_GPIO 12 | ||
316 | struct max8997_dev { | 319 | struct max8997_dev { |
317 | struct device *dev; | 320 | struct device *dev; |
318 | struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ | 321 | struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ |
@@ -324,11 +327,19 @@ struct max8997_dev { | |||
324 | int type; | 327 | int type; |
325 | struct platform_device *battery; /* battery control (not fuel gauge) */ | 328 | struct platform_device *battery; /* battery control (not fuel gauge) */ |
326 | 329 | ||
330 | int irq; | ||
331 | int ono; | ||
332 | int irq_base; | ||
327 | bool wakeup; | 333 | bool wakeup; |
334 | struct mutex irqlock; | ||
335 | int irq_masks_cur[MAX8997_IRQ_GROUP_NR]; | ||
336 | int irq_masks_cache[MAX8997_IRQ_GROUP_NR]; | ||
328 | 337 | ||
329 | /* For hibernation */ | 338 | /* For hibernation */ |
330 | u8 reg_dump[MAX8997_REG_PMIC_END + MAX8997_MUIC_REG_END + | 339 | u8 reg_dump[MAX8997_REG_PMIC_END + MAX8997_MUIC_REG_END + |
331 | MAX8997_HAPTIC_REG_END]; | 340 | MAX8997_HAPTIC_REG_END]; |
341 | |||
342 | bool gpio_status[MAX8997_NUM_GPIO]; | ||
332 | }; | 343 | }; |
333 | 344 | ||
334 | enum max8997_types { | 345 | enum max8997_types { |
@@ -336,6 +347,10 @@ enum max8997_types { | |||
336 | TYPE_MAX8966, | 347 | TYPE_MAX8966, |
337 | }; | 348 | }; |
338 | 349 | ||
350 | extern int max8997_irq_init(struct max8997_dev *max8997); | ||
351 | extern void max8997_irq_exit(struct max8997_dev *max8997); | ||
352 | extern int max8997_irq_resume(struct max8997_dev *max8997); | ||
353 | |||
339 | extern int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); | 354 | extern int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); |
340 | extern int max8997_bulk_read(struct i2c_client *i2c, u8 reg, int count, | 355 | extern int max8997_bulk_read(struct i2c_client *i2c, u8 reg, int count, |
341 | u8 *buf); | 356 | u8 *buf); |
@@ -344,4 +359,10 @@ extern int max8997_bulk_write(struct i2c_client *i2c, u8 reg, int count, | |||
344 | u8 *buf); | 359 | u8 *buf); |
345 | extern int max8997_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask); | 360 | extern int max8997_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask); |
346 | 361 | ||
362 | #define MAX8997_GPIO_INT_BOTH (0x3 << 4) | ||
363 | #define MAX8997_GPIO_INT_RISE (0x2 << 4) | ||
364 | #define MAX8997_GPIO_INT_FALL (0x1 << 4) | ||
365 | |||
366 | #define MAX8997_GPIO_INT_MASK (0x3 << 4) | ||
367 | #define MAX8997_GPIO_DATA_MASK (0x1 << 2) | ||
347 | #endif /* __LINUX_MFD_MAX8997_PRIV_H */ | 368 | #endif /* __LINUX_MFD_MAX8997_PRIV_H */ |
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h index cb671b3451bf..60931d089422 100644 --- a/include/linux/mfd/max8997.h +++ b/include/linux/mfd/max8997.h | |||
@@ -78,8 +78,11 @@ struct max8997_regulator_data { | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | struct max8997_platform_data { | 80 | struct max8997_platform_data { |
81 | bool wakeup; | 81 | /* IRQ */ |
82 | /* IRQ: Not implemented */ | 82 | int irq_base; |
83 | int ono; | ||
84 | int wakeup; | ||
85 | |||
83 | /* ---- PMIC ---- */ | 86 | /* ---- PMIC ---- */ |
84 | struct max8997_regulator_data *regulators; | 87 | struct max8997_regulator_data *regulators; |
85 | int num_regulators; | 88 | int num_regulators; |
diff --git a/include/linux/mfd/wm831x/pdata.h b/include/linux/mfd/wm831x/pdata.h index afe4db49402d..632d1567a1b6 100644 --- a/include/linux/mfd/wm831x/pdata.h +++ b/include/linux/mfd/wm831x/pdata.h | |||
@@ -81,7 +81,9 @@ struct wm831x_touch_pdata { | |||
81 | int rpu; /** Pen down sensitivity resistor divider */ | 81 | int rpu; /** Pen down sensitivity resistor divider */ |
82 | int pressure; /** Report pressure (boolean) */ | 82 | int pressure; /** Report pressure (boolean) */ |
83 | unsigned int data_irq; /** Touch data ready IRQ */ | 83 | unsigned int data_irq; /** Touch data ready IRQ */ |
84 | int data_irqf; /** IRQ flags for data ready IRQ */ | ||
84 | unsigned int pd_irq; /** Touch pendown detect IRQ */ | 85 | unsigned int pd_irq; /** Touch pendown detect IRQ */ |
86 | int pd_irqf; /** IRQ flags for pen down IRQ */ | ||
85 | }; | 87 | }; |
86 | 88 | ||
87 | enum wm831x_watchdog_action { | 89 | enum wm831x_watchdog_action { |
diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h index e786fe9841ef..579b50ca2e02 100644 --- a/include/linux/mfd/wm8350/pmic.h +++ b/include/linux/mfd/wm8350/pmic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * pmic.h -- Power Managment Driver for Wolfson WM8350 PMIC | 2 | * pmic.h -- Power Management Driver for Wolfson WM8350 PMIC |
3 | * | 3 | * |
4 | * Copyright 2007 Wolfson Microelectronics PLC | 4 | * Copyright 2007 Wolfson Microelectronics PLC |
5 | * | 5 | * |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7606d7db96c9..6507dde38b16 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -137,7 +137,8 @@ extern unsigned int kobjsize(const void *objp); | |||
137 | #define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ) | 137 | #define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ) |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * special vmas that are non-mergable, non-mlock()able | 140 | * Special vmas that are non-mergable, non-mlock()able. |
141 | * Note: mm/huge_memory.c VM_NO_THP depends on this definition. | ||
141 | */ | 142 | */ |
142 | #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP) | 143 | #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP) |
143 | 144 | ||
@@ -608,7 +609,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma) | |||
608 | #endif | 609 | #endif |
609 | 610 | ||
610 | /* | 611 | /* |
611 | * Define the bit shifts to access each section. For non-existant | 612 | * Define the bit shifts to access each section. For non-existent |
612 | * sections we define the shift as 0; that plus a 0 mask ensures | 613 | * sections we define the shift as 0; that plus a 0 mask ensures |
613 | * the compiler will optimise away reference to them. | 614 | * the compiler will optimise away reference to them. |
614 | */ | 615 | */ |
@@ -1010,11 +1011,33 @@ int set_page_dirty_lock(struct page *page); | |||
1010 | int clear_page_dirty_for_io(struct page *page); | 1011 | int clear_page_dirty_for_io(struct page *page); |
1011 | 1012 | ||
1012 | /* Is the vma a continuation of the stack vma above it? */ | 1013 | /* Is the vma a continuation of the stack vma above it? */ |
1013 | static inline int vma_stack_continue(struct vm_area_struct *vma, unsigned long addr) | 1014 | static inline int vma_growsdown(struct vm_area_struct *vma, unsigned long addr) |
1014 | { | 1015 | { |
1015 | return vma && (vma->vm_end == addr) && (vma->vm_flags & VM_GROWSDOWN); | 1016 | return vma && (vma->vm_end == addr) && (vma->vm_flags & VM_GROWSDOWN); |
1016 | } | 1017 | } |
1017 | 1018 | ||
1019 | static inline int stack_guard_page_start(struct vm_area_struct *vma, | ||
1020 | unsigned long addr) | ||
1021 | { | ||
1022 | return (vma->vm_flags & VM_GROWSDOWN) && | ||
1023 | (vma->vm_start == addr) && | ||
1024 | !vma_growsdown(vma->vm_prev, addr); | ||
1025 | } | ||
1026 | |||
1027 | /* Is the vma a continuation of the stack vma below it? */ | ||
1028 | static inline int vma_growsup(struct vm_area_struct *vma, unsigned long addr) | ||
1029 | { | ||
1030 | return vma && (vma->vm_start == addr) && (vma->vm_flags & VM_GROWSUP); | ||
1031 | } | ||
1032 | |||
1033 | static inline int stack_guard_page_end(struct vm_area_struct *vma, | ||
1034 | unsigned long addr) | ||
1035 | { | ||
1036 | return (vma->vm_flags & VM_GROWSUP) && | ||
1037 | (vma->vm_end == addr) && | ||
1038 | !vma_growsup(vma->vm_next, addr); | ||
1039 | } | ||
1040 | |||
1018 | extern unsigned long move_page_tables(struct vm_area_struct *vma, | 1041 | extern unsigned long move_page_tables(struct vm_area_struct *vma, |
1019 | unsigned long old_addr, struct vm_area_struct *new_vma, | 1042 | unsigned long old_addr, struct vm_area_struct *new_vma, |
1020 | unsigned long new_addr, unsigned long len); | 1043 | unsigned long new_addr, unsigned long len); |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index c0207a770476..bdd7ceeb99e4 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
@@ -98,7 +98,7 @@ struct mmc_data; | |||
98 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related | 98 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related |
99 | * interrupts must be disabled and @data_status updated with a | 99 | * interrupts must be disabled and @data_status updated with a |
100 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the | 100 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the |
101 | * CMDRDY interupt must be disabled and @cmd_status updated with a | 101 | * CMDRDY interrupt must be disabled and @cmd_status updated with a |
102 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the | 102 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the |
103 | * bytes_xfered field of @data must be written. This is ensured by | 103 | * bytes_xfered field of @data must be written. This is ensured by |
104 | * using barriers. | 104 | * using barriers. |
@@ -172,7 +172,7 @@ struct dw_mci_dma_ops { | |||
172 | #define DW_MCI_QUIRK_IDMAC_DTO BIT(0) | 172 | #define DW_MCI_QUIRK_IDMAC_DTO BIT(0) |
173 | /* delay needed between retries on some 2.11a implementations */ | 173 | /* delay needed between retries on some 2.11a implementations */ |
174 | #define DW_MCI_QUIRK_RETRY_DELAY BIT(1) | 174 | #define DW_MCI_QUIRK_RETRY_DELAY BIT(1) |
175 | /* High Speed Capable - Supports HS cards (upto 50MHz) */ | 175 | /* High Speed Capable - Supports HS cards (up to 50MHz) */ |
176 | #define DW_MCI_QUIRK_HIGHSPEED BIT(2) | 176 | #define DW_MCI_QUIRK_HIGHSPEED BIT(2) |
177 | /* Unreliable card detection */ | 177 | /* Unreliable card detection */ |
178 | #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) | 178 | #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) |
diff --git a/include/linux/mfd/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h index c981b959760f..c981b959760f 100644 --- a/include/linux/mfd/sh_mobile_sdhi.h +++ b/include/linux/mmc/sh_mobile_sdhi.h | |||
diff --git a/include/linux/mmc/tmio.h b/include/linux/mmc/tmio.h new file mode 100644 index 000000000000..19490b942db0 --- /dev/null +++ b/include/linux/mmc/tmio.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * include/linux/mmc/tmio.h | ||
3 | * | ||
4 | * Copyright (C) 2007 Ian Molton | ||
5 | * Copyright (C) 2004 Ian Molton | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Driver for the MMC / SD / SDIO cell found in: | ||
12 | * | ||
13 | * TC6393XB TC6391XB TC6387XB T7L66XB ASIC3 | ||
14 | */ | ||
15 | #ifndef _LINUX_MMC_TMIO_H_ | ||
16 | #define _LINUX_MMC_TMIO_H_ | ||
17 | |||
18 | #define CTL_SD_CMD 0x00 | ||
19 | #define CTL_ARG_REG 0x04 | ||
20 | #define CTL_STOP_INTERNAL_ACTION 0x08 | ||
21 | #define CTL_XFER_BLK_COUNT 0xa | ||
22 | #define CTL_RESPONSE 0x0c | ||
23 | #define CTL_STATUS 0x1c | ||
24 | #define CTL_IRQ_MASK 0x20 | ||
25 | #define CTL_SD_CARD_CLK_CTL 0x24 | ||
26 | #define CTL_SD_XFER_LEN 0x26 | ||
27 | #define CTL_SD_MEM_CARD_OPT 0x28 | ||
28 | #define CTL_SD_ERROR_DETAIL_STATUS 0x2c | ||
29 | #define CTL_SD_DATA_PORT 0x30 | ||
30 | #define CTL_TRANSACTION_CTL 0x34 | ||
31 | #define CTL_SDIO_STATUS 0x36 | ||
32 | #define CTL_SDIO_IRQ_MASK 0x38 | ||
33 | #define CTL_RESET_SD 0xe0 | ||
34 | #define CTL_SDIO_REGS 0x100 | ||
35 | #define CTL_CLK_AND_WAIT_CTL 0x138 | ||
36 | #define CTL_RESET_SDIO 0x1e0 | ||
37 | |||
38 | /* Definitions for values the CTRL_STATUS register can take. */ | ||
39 | #define TMIO_STAT_CMDRESPEND 0x00000001 | ||
40 | #define TMIO_STAT_DATAEND 0x00000004 | ||
41 | #define TMIO_STAT_CARD_REMOVE 0x00000008 | ||
42 | #define TMIO_STAT_CARD_INSERT 0x00000010 | ||
43 | #define TMIO_STAT_SIGSTATE 0x00000020 | ||
44 | #define TMIO_STAT_WRPROTECT 0x00000080 | ||
45 | #define TMIO_STAT_CARD_REMOVE_A 0x00000100 | ||
46 | #define TMIO_STAT_CARD_INSERT_A 0x00000200 | ||
47 | #define TMIO_STAT_SIGSTATE_A 0x00000400 | ||
48 | #define TMIO_STAT_CMD_IDX_ERR 0x00010000 | ||
49 | #define TMIO_STAT_CRCFAIL 0x00020000 | ||
50 | #define TMIO_STAT_STOPBIT_ERR 0x00040000 | ||
51 | #define TMIO_STAT_DATATIMEOUT 0x00080000 | ||
52 | #define TMIO_STAT_RXOVERFLOW 0x00100000 | ||
53 | #define TMIO_STAT_TXUNDERRUN 0x00200000 | ||
54 | #define TMIO_STAT_CMDTIMEOUT 0x00400000 | ||
55 | #define TMIO_STAT_RXRDY 0x01000000 | ||
56 | #define TMIO_STAT_TXRQ 0x02000000 | ||
57 | #define TMIO_STAT_ILL_FUNC 0x20000000 | ||
58 | #define TMIO_STAT_CMD_BUSY 0x40000000 | ||
59 | #define TMIO_STAT_ILL_ACCESS 0x80000000 | ||
60 | |||
61 | #define TMIO_BBS 512 /* Boot block size */ | ||
62 | |||
63 | #endif /* _LINUX_MMC_TMIO_H_ */ | ||
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 48c007dae476..ae28e93fd072 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -382,6 +382,23 @@ struct ssb_device_id { | |||
382 | #define SSB_ANY_ID 0xFFFF | 382 | #define SSB_ANY_ID 0xFFFF |
383 | #define SSB_ANY_REV 0xFF | 383 | #define SSB_ANY_REV 0xFF |
384 | 384 | ||
385 | /* Broadcom's specific AMBA core, see drivers/bcma/ */ | ||
386 | struct bcma_device_id { | ||
387 | __u16 manuf; | ||
388 | __u16 id; | ||
389 | __u8 rev; | ||
390 | __u8 class; | ||
391 | }; | ||
392 | #define BCMA_CORE(_manuf, _id, _rev, _class) \ | ||
393 | { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, } | ||
394 | #define BCMA_CORETABLE_END \ | ||
395 | { 0, }, | ||
396 | |||
397 | #define BCMA_ANY_MANUF 0xFFFF | ||
398 | #define BCMA_ANY_ID 0xFFFF | ||
399 | #define BCMA_ANY_REV 0xFF | ||
400 | #define BCMA_ANY_CLASS 0xFF | ||
401 | |||
385 | struct virtio_device_id { | 402 | struct virtio_device_id { |
386 | __u32 device; | 403 | __u32 device; |
387 | __u32 vendor; | 404 | __u32 vendor; |
diff --git a/include/linux/module.h b/include/linux/module.h index 5de42043dff0..d9ca2d5dc6d0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -64,6 +64,9 @@ struct module_version_attribute { | |||
64 | const char *version; | 64 | const char *version; |
65 | } __attribute__ ((__aligned__(sizeof(void *)))); | 65 | } __attribute__ ((__aligned__(sizeof(void *)))); |
66 | 66 | ||
67 | extern ssize_t __modver_version_show(struct module_attribute *, | ||
68 | struct module *, char *); | ||
69 | |||
67 | struct module_kobject | 70 | struct module_kobject |
68 | { | 71 | { |
69 | struct kobject kobj; | 72 | struct kobject kobj; |
@@ -172,12 +175,7 @@ extern struct module __this_module; | |||
172 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) | 175 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) |
173 | #else | 176 | #else |
174 | #define MODULE_VERSION(_version) \ | 177 | #define MODULE_VERSION(_version) \ |
175 | extern ssize_t __modver_version_show(struct module_attribute *, \ | 178 | static struct module_version_attribute ___modver_attr = { \ |
176 | struct module *, char *); \ | ||
177 | static struct module_version_attribute __modver_version_attr \ | ||
178 | __used \ | ||
179 | __attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \ | ||
180 | = { \ | ||
181 | .mattr = { \ | 179 | .mattr = { \ |
182 | .attr = { \ | 180 | .attr = { \ |
183 | .name = "version", \ | 181 | .name = "version", \ |
@@ -187,7 +185,10 @@ extern struct module __this_module; | |||
187 | }, \ | 185 | }, \ |
188 | .module_name = KBUILD_MODNAME, \ | 186 | .module_name = KBUILD_MODNAME, \ |
189 | .version = _version, \ | 187 | .version = _version, \ |
190 | } | 188 | }; \ |
189 | static const struct module_version_attribute \ | ||
190 | __used __attribute__ ((__section__ ("__modver"))) \ | ||
191 | * __moduleparam_const __modver_attr = &___modver_attr | ||
191 | #endif | 192 | #endif |
192 | 193 | ||
193 | /* Optional firmware file (or files) needed by the module | 194 | /* Optional firmware file (or files) needed by the module |
@@ -223,7 +224,7 @@ struct module_use { | |||
223 | extern void *__crc_##sym __attribute__((weak)); \ | 224 | extern void *__crc_##sym __attribute__((weak)); \ |
224 | static const unsigned long __kcrctab_##sym \ | 225 | static const unsigned long __kcrctab_##sym \ |
225 | __used \ | 226 | __used \ |
226 | __attribute__((section("__kcrctab" sec), unused)) \ | 227 | __attribute__((section("___kcrctab" sec "+" #sym), unused)) \ |
227 | = (unsigned long) &__crc_##sym; | 228 | = (unsigned long) &__crc_##sym; |
228 | #else | 229 | #else |
229 | #define __CRC_SYMBOL(sym, sec) | 230 | #define __CRC_SYMBOL(sym, sec) |
@@ -238,7 +239,7 @@ struct module_use { | |||
238 | = MODULE_SYMBOL_PREFIX #sym; \ | 239 | = MODULE_SYMBOL_PREFIX #sym; \ |
239 | static const struct kernel_symbol __ksymtab_##sym \ | 240 | static const struct kernel_symbol __ksymtab_##sym \ |
240 | __used \ | 241 | __used \ |
241 | __attribute__((section("__ksymtab" sec), unused)) \ | 242 | __attribute__((section("___ksymtab" sec "+" #sym), unused)) \ |
242 | = { (unsigned long)&sym, __kstrtab_##sym } | 243 | = { (unsigned long)&sym, __kstrtab_##sym } |
243 | 244 | ||
244 | #define EXPORT_SYMBOL(sym) \ | 245 | #define EXPORT_SYMBOL(sym) \ |
@@ -367,34 +368,35 @@ struct module | |||
367 | struct module_notes_attrs *notes_attrs; | 368 | struct module_notes_attrs *notes_attrs; |
368 | #endif | 369 | #endif |
369 | 370 | ||
371 | /* The command line arguments (may be mangled). People like | ||
372 | keeping pointers to this stuff */ | ||
373 | char *args; | ||
374 | |||
370 | #ifdef CONFIG_SMP | 375 | #ifdef CONFIG_SMP |
371 | /* Per-cpu data. */ | 376 | /* Per-cpu data. */ |
372 | void __percpu *percpu; | 377 | void __percpu *percpu; |
373 | unsigned int percpu_size; | 378 | unsigned int percpu_size; |
374 | #endif | 379 | #endif |
375 | 380 | ||
376 | /* The command line arguments (may be mangled). People like | ||
377 | keeping pointers to this stuff */ | ||
378 | char *args; | ||
379 | #ifdef CONFIG_TRACEPOINTS | 381 | #ifdef CONFIG_TRACEPOINTS |
380 | struct tracepoint * const *tracepoints_ptrs; | ||
381 | unsigned int num_tracepoints; | 382 | unsigned int num_tracepoints; |
383 | struct tracepoint * const *tracepoints_ptrs; | ||
382 | #endif | 384 | #endif |
383 | #ifdef HAVE_JUMP_LABEL | 385 | #ifdef HAVE_JUMP_LABEL |
384 | struct jump_entry *jump_entries; | 386 | struct jump_entry *jump_entries; |
385 | unsigned int num_jump_entries; | 387 | unsigned int num_jump_entries; |
386 | #endif | 388 | #endif |
387 | #ifdef CONFIG_TRACING | 389 | #ifdef CONFIG_TRACING |
388 | const char **trace_bprintk_fmt_start; | ||
389 | unsigned int num_trace_bprintk_fmt; | 390 | unsigned int num_trace_bprintk_fmt; |
391 | const char **trace_bprintk_fmt_start; | ||
390 | #endif | 392 | #endif |
391 | #ifdef CONFIG_EVENT_TRACING | 393 | #ifdef CONFIG_EVENT_TRACING |
392 | struct ftrace_event_call **trace_events; | 394 | struct ftrace_event_call **trace_events; |
393 | unsigned int num_trace_events; | 395 | unsigned int num_trace_events; |
394 | #endif | 396 | #endif |
395 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 397 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
396 | unsigned long *ftrace_callsites; | ||
397 | unsigned int num_ftrace_callsites; | 398 | unsigned int num_ftrace_callsites; |
399 | unsigned long *ftrace_callsites; | ||
398 | #endif | 400 | #endif |
399 | 401 | ||
400 | #ifdef CONFIG_MODULE_UNLOAD | 402 | #ifdef CONFIG_MODULE_UNLOAD |
@@ -475,8 +477,9 @@ const struct kernel_symbol *find_symbol(const char *name, | |||
475 | bool warn); | 477 | bool warn); |
476 | 478 | ||
477 | /* Walk the exported symbol table */ | 479 | /* Walk the exported symbol table */ |
478 | bool each_symbol(bool (*fn)(const struct symsearch *arr, struct module *owner, | 480 | bool each_symbol_section(bool (*fn)(const struct symsearch *arr, |
479 | unsigned int symnum, void *data), void *data); | 481 | struct module *owner, |
482 | void *data), void *data); | ||
480 | 483 | ||
481 | /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if | 484 | /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if |
482 | symnum out of range. */ | 485 | symnum out of range. */ |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 07b41951e3fa..ddaae98c53f9 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -67,9 +67,9 @@ struct kparam_string { | |||
67 | struct kparam_array | 67 | struct kparam_array |
68 | { | 68 | { |
69 | unsigned int max; | 69 | unsigned int max; |
70 | unsigned int elemsize; | ||
70 | unsigned int *num; | 71 | unsigned int *num; |
71 | const struct kernel_param_ops *ops; | 72 | const struct kernel_param_ops *ops; |
72 | unsigned int elemsize; | ||
73 | void *elem; | 73 | void *elem; |
74 | }; | 74 | }; |
75 | 75 | ||
@@ -371,8 +371,9 @@ extern int param_get_invbool(char *buffer, const struct kernel_param *kp); | |||
371 | */ | 371 | */ |
372 | #define module_param_array_named(name, array, type, nump, perm) \ | 372 | #define module_param_array_named(name, array, type, nump, perm) \ |
373 | static const struct kparam_array __param_arr_##name \ | 373 | static const struct kparam_array __param_arr_##name \ |
374 | = { ARRAY_SIZE(array), nump, ¶m_ops_##type, \ | 374 | = { .max = ARRAY_SIZE(array), .num = nump, \ |
375 | sizeof(array[0]), array }; \ | 375 | .ops = ¶m_ops_##type, \ |
376 | .elemsize = sizeof(array[0]), .elem = array }; \ | ||
376 | __module_param_call(MODULE_PARAM_PREFIX, name, \ | 377 | __module_param_call(MODULE_PARAM_PREFIX, name, \ |
377 | ¶m_array_ops, \ | 378 | ¶m_array_ops, \ |
378 | .arr = &__param_arr_##name, \ | 379 | .arr = &__param_arr_##name, \ |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index b21d567692b2..46caaf44339d 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -244,6 +244,7 @@ struct mfc_cache { | |||
244 | #ifdef __KERNEL__ | 244 | #ifdef __KERNEL__ |
245 | struct rtmsg; | 245 | struct rtmsg; |
246 | extern int ipmr_get_route(struct net *net, struct sk_buff *skb, | 246 | extern int ipmr_get_route(struct net *net, struct sk_buff *skb, |
247 | __be32 saddr, __be32 daddr, | ||
247 | struct rtmsg *rtm, int nowait); | 248 | struct rtmsg *rtm, int nowait); |
248 | #endif | 249 | #endif |
249 | 250 | ||
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 9d2deb200f54..a3759cb0ac10 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
@@ -249,7 +249,7 @@ static inline int ip6mr_sk_done(struct sock *sk) | |||
249 | * Structure used to communicate from kernel to multicast router. | 249 | * Structure used to communicate from kernel to multicast router. |
250 | * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{} | 250 | * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{} |
251 | * used for IPv4 implementation). This is because this structure will be passed via an | 251 | * used for IPv4 implementation). This is because this structure will be passed via an |
252 | * IPv6 raw socket, on wich an application will only receiver the payload i.e the data after | 252 | * IPv6 raw socket, on which an application will only receiver the payload i.e the data after |
253 | * the IPv6 header and all the extension headers. (See section 3 of RFC 3542) | 253 | * the IPv6 header and all the extension headers. (See section 3 of RFC 3542) |
254 | */ | 254 | */ |
255 | 255 | ||
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h index 26529ebd59cc..1bbd9f289245 100644 --- a/include/linux/mtd/blktrans.h +++ b/include/linux/mtd/blktrans.h | |||
@@ -36,6 +36,7 @@ struct mtd_blktrans_dev { | |||
36 | struct mtd_info *mtd; | 36 | struct mtd_info *mtd; |
37 | struct mutex lock; | 37 | struct mutex lock; |
38 | int devnum; | 38 | int devnum; |
39 | bool bg_stop; | ||
39 | unsigned long size; | 40 | unsigned long size; |
40 | int readonly; | 41 | int readonly; |
41 | int open; | 42 | int open; |
@@ -62,6 +63,7 @@ struct mtd_blktrans_ops { | |||
62 | unsigned long block, char *buffer); | 63 | unsigned long block, char *buffer); |
63 | int (*discard)(struct mtd_blktrans_dev *dev, | 64 | int (*discard)(struct mtd_blktrans_dev *dev, |
64 | unsigned long block, unsigned nr_blocks); | 65 | unsigned long block, unsigned nr_blocks); |
66 | void (*background)(struct mtd_blktrans_dev *dev); | ||
65 | 67 | ||
66 | /* Block layer ioctls */ | 68 | /* Block layer ioctls */ |
67 | int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo); | 69 | int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo); |
@@ -85,6 +87,7 @@ extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr); | |||
85 | extern int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr); | 87 | extern int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr); |
86 | extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); | 88 | extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); |
87 | extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); | 89 | extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); |
90 | extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev); | ||
88 | 91 | ||
89 | 92 | ||
90 | #endif /* __MTD_TRANS_H__ */ | 93 | #endif /* __MTD_TRANS_H__ */ |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index a9baee6864af..d24925492972 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -308,7 +308,7 @@ static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, | |||
308 | 308 | ||
309 | addr = (cmd_ofs * type) * interleave; | 309 | addr = (cmd_ofs * type) * interleave; |
310 | 310 | ||
311 | /* Modify the unlock address if we are in compatiblity mode. | 311 | /* Modify the unlock address if we are in compatibility mode. |
312 | * For 16bit devices on 8 bit busses | 312 | * For 16bit devices on 8 bit busses |
313 | * and 32bit devices on 16 bit busses | 313 | * and 32bit devices on 16 bit busses |
314 | * set the low bit of the alternating bit sequence of the address. | 314 | * set the low bit of the alternating bit sequence of the address. |
@@ -535,6 +535,7 @@ struct cfi_fixup { | |||
535 | #define CFI_MFR_CONTINUATION 0x007F | 535 | #define CFI_MFR_CONTINUATION 0x007F |
536 | 536 | ||
537 | #define CFI_MFR_AMD 0x0001 | 537 | #define CFI_MFR_AMD 0x0001 |
538 | #define CFI_MFR_AMIC 0x0037 | ||
538 | #define CFI_MFR_ATMEL 0x001F | 539 | #define CFI_MFR_ATMEL 0x001F |
539 | #define CFI_MFR_EON 0x001C | 540 | #define CFI_MFR_EON 0x001C |
540 | #define CFI_MFR_FUJITSU 0x0004 | 541 | #define CFI_MFR_FUJITSU 0x0004 |
diff --git a/include/linux/mtd/latch-addr-flash.h b/include/linux/mtd/latch-addr-flash.h new file mode 100644 index 000000000000..e94b8e128074 --- /dev/null +++ b/include/linux/mtd/latch-addr-flash.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Interface for NOR flash driver whose high address lines are latched | ||
3 | * | ||
4 | * Copyright © 2008 MontaVista Software, Inc. <source@mvista.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | #ifndef __LATCH_ADDR_FLASH__ | ||
11 | #define __LATCH_ADDR_FLASH__ | ||
12 | |||
13 | struct map_info; | ||
14 | struct mtd_partition; | ||
15 | |||
16 | struct latch_addr_flash_data { | ||
17 | unsigned int width; | ||
18 | unsigned int size; | ||
19 | |||
20 | int (*init)(void *data, int cs); | ||
21 | void (*done)(void *data); | ||
22 | void (*set_window)(unsigned long offset, void *data); | ||
23 | void *data; | ||
24 | |||
25 | unsigned int nr_parts; | ||
26 | struct mtd_partition *parts; | ||
27 | }; | ||
28 | |||
29 | #endif | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 1f489b247a29..d44192740f6f 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -140,6 +140,7 @@ typedef enum { | |||
140 | NAND_ECC_HW, | 140 | NAND_ECC_HW, |
141 | NAND_ECC_HW_SYNDROME, | 141 | NAND_ECC_HW_SYNDROME, |
142 | NAND_ECC_HW_OOB_FIRST, | 142 | NAND_ECC_HW_OOB_FIRST, |
143 | NAND_ECC_SOFT_BCH, | ||
143 | } nand_ecc_modes_t; | 144 | } nand_ecc_modes_t; |
144 | 145 | ||
145 | /* | 146 | /* |
@@ -339,6 +340,7 @@ struct nand_hw_control { | |||
339 | * @prepad: padding information for syndrome based ecc generators | 340 | * @prepad: padding information for syndrome based ecc generators |
340 | * @postpad: padding information for syndrome based ecc generators | 341 | * @postpad: padding information for syndrome based ecc generators |
341 | * @layout: ECC layout control struct pointer | 342 | * @layout: ECC layout control struct pointer |
343 | * @priv: pointer to private ecc control data | ||
342 | * @hwctl: function to control hardware ecc generator. Must only | 344 | * @hwctl: function to control hardware ecc generator. Must only |
343 | * be provided if an hardware ECC is available | 345 | * be provided if an hardware ECC is available |
344 | * @calculate: function for ecc calculation or readback from ecc hardware | 346 | * @calculate: function for ecc calculation or readback from ecc hardware |
@@ -362,6 +364,7 @@ struct nand_ecc_ctrl { | |||
362 | int prepad; | 364 | int prepad; |
363 | int postpad; | 365 | int postpad; |
364 | struct nand_ecclayout *layout; | 366 | struct nand_ecclayout *layout; |
367 | void *priv; | ||
365 | void (*hwctl)(struct mtd_info *mtd, int mode); | 368 | void (*hwctl)(struct mtd_info *mtd, int mode); |
366 | int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, | 369 | int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, |
367 | uint8_t *ecc_code); | 370 | uint8_t *ecc_code); |
@@ -413,9 +416,9 @@ struct nand_buffers { | |||
413 | * @select_chip: [REPLACEABLE] select chip nr | 416 | * @select_chip: [REPLACEABLE] select chip nr |
414 | * @block_bad: [REPLACEABLE] check, if the block is bad | 417 | * @block_bad: [REPLACEABLE] check, if the block is bad |
415 | * @block_markbad: [REPLACEABLE] mark the block bad | 418 | * @block_markbad: [REPLACEABLE] mark the block bad |
416 | * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific funtion for controlling | 419 | * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific function for controlling |
417 | * ALE/CLE/nCE. Also used to write command and address | 420 | * ALE/CLE/nCE. Also used to write command and address |
418 | * @init_size: [BOARDSPECIFIC] hardwarespecific funtion for setting | 421 | * @init_size: [BOARDSPECIFIC] hardwarespecific function for setting |
419 | * mtd->oobsize, mtd->writesize and so on. | 422 | * mtd->oobsize, mtd->writesize and so on. |
420 | * @id_data contains the 8 bytes values of NAND_CMD_READID. | 423 | * @id_data contains the 8 bytes values of NAND_CMD_READID. |
421 | * Return with the bus width. | 424 | * Return with the bus width. |
@@ -434,7 +437,7 @@ struct nand_buffers { | |||
434 | * @erase_cmd: [INTERN] erase command write function, selectable due | 437 | * @erase_cmd: [INTERN] erase command write function, selectable due |
435 | * to AND support. | 438 | * to AND support. |
436 | * @scan_bbt: [REPLACEABLE] function to scan bad block table | 439 | * @scan_bbt: [REPLACEABLE] function to scan bad block table |
437 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering | 440 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transferring |
438 | * data from array to read regs (tR). | 441 | * data from array to read regs (tR). |
439 | * @state: [INTERN] the current state of the NAND device | 442 | * @state: [INTERN] the current state of the NAND device |
440 | * @oob_poi: poison value buffer | 443 | * @oob_poi: poison value buffer |
diff --git a/include/linux/mtd/nand_bch.h b/include/linux/mtd/nand_bch.h new file mode 100644 index 000000000000..74acf5367556 --- /dev/null +++ b/include/linux/mtd/nand_bch.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * Copyright © 2011 Ivan Djelic <ivan.djelic@parrot.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This file is the header for the NAND BCH ECC implementation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __MTD_NAND_BCH_H__ | ||
12 | #define __MTD_NAND_BCH_H__ | ||
13 | |||
14 | struct mtd_info; | ||
15 | struct nand_bch_control; | ||
16 | |||
17 | #if defined(CONFIG_MTD_NAND_ECC_BCH) | ||
18 | |||
19 | static inline int mtd_nand_has_bch(void) { return 1; } | ||
20 | |||
21 | /* | ||
22 | * Calculate BCH ecc code | ||
23 | */ | ||
24 | int nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, | ||
25 | u_char *ecc_code); | ||
26 | |||
27 | /* | ||
28 | * Detect and correct bit errors | ||
29 | */ | ||
30 | int nand_bch_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, | ||
31 | u_char *calc_ecc); | ||
32 | /* | ||
33 | * Initialize BCH encoder/decoder | ||
34 | */ | ||
35 | struct nand_bch_control * | ||
36 | nand_bch_init(struct mtd_info *mtd, unsigned int eccsize, | ||
37 | unsigned int eccbytes, struct nand_ecclayout **ecclayout); | ||
38 | /* | ||
39 | * Release BCH encoder/decoder resources | ||
40 | */ | ||
41 | void nand_bch_free(struct nand_bch_control *nbc); | ||
42 | |||
43 | #else /* !CONFIG_MTD_NAND_ECC_BCH */ | ||
44 | |||
45 | static inline int mtd_nand_has_bch(void) { return 0; } | ||
46 | |||
47 | static inline int | ||
48 | nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, | ||
49 | u_char *ecc_code) | ||
50 | { | ||
51 | return -1; | ||
52 | } | ||
53 | |||
54 | static inline int | ||
55 | nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf, | ||
56 | unsigned char *read_ecc, unsigned char *calc_ecc) | ||
57 | { | ||
58 | return -1; | ||
59 | } | ||
60 | |||
61 | static inline struct nand_bch_control * | ||
62 | nand_bch_init(struct mtd_info *mtd, unsigned int eccsize, | ||
63 | unsigned int eccbytes, struct nand_ecclayout **ecclayout) | ||
64 | { | ||
65 | return NULL; | ||
66 | } | ||
67 | |||
68 | static inline void nand_bch_free(struct nand_bch_control *nbc) {} | ||
69 | |||
70 | #endif /* CONFIG_MTD_NAND_ECC_BCH */ | ||
71 | |||
72 | #endif /* __MTD_NAND_BCH_H__ */ | ||
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index ae418e41d8f5..52b6f187bf49 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -198,6 +198,7 @@ struct onenand_chip { | |||
198 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) | 198 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) |
199 | #define ONENAND_PAGEBUF_ALLOC (0x1000) | 199 | #define ONENAND_PAGEBUF_ALLOC (0x1000) |
200 | #define ONENAND_OOBBUF_ALLOC (0x2000) | 200 | #define ONENAND_OOBBUF_ALLOC (0x2000) |
201 | #define ONENAND_SKIP_INITIAL_UNLOCKING (0x4000) | ||
201 | 202 | ||
202 | #define ONENAND_IS_4KB_PAGE(this) \ | 203 | #define ONENAND_IS_4KB_PAGE(this) \ |
203 | (this->options & ONENAND_HAS_4KB_PAGE) | 204 | (this->options & ONENAND_HAS_4KB_PAGE) |
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h index bcfd9f777454..49b959029417 100644 --- a/include/linux/mtd/physmap.h +++ b/include/linux/mtd/physmap.h | |||
@@ -22,7 +22,9 @@ struct map_info; | |||
22 | 22 | ||
23 | struct physmap_flash_data { | 23 | struct physmap_flash_data { |
24 | unsigned int width; | 24 | unsigned int width; |
25 | void (*set_vpp)(struct map_info *, int); | 25 | int (*init)(struct platform_device *); |
26 | void (*exit)(struct platform_device *); | ||
27 | void (*set_vpp)(struct platform_device *, int); | ||
26 | unsigned int nr_parts; | 28 | unsigned int nr_parts; |
27 | unsigned int pfow_base; | 29 | unsigned int pfow_base; |
28 | char *probe_type; | 30 | char *probe_type; |
diff --git a/include/linux/mtd/xip.h b/include/linux/mtd/xip.h index 36efcba15ecd..abed4dec5c2f 100644 --- a/include/linux/mtd/xip.h +++ b/include/linux/mtd/xip.h | |||
@@ -51,7 +51,7 @@ | |||
51 | * return in usecs the elapsed timebetween now and the reference x as | 51 | * return in usecs the elapsed timebetween now and the reference x as |
52 | * returned by xip_currtime(). | 52 | * returned by xip_currtime(). |
53 | * | 53 | * |
54 | * note 1: convertion to usec can be approximated, as long as the | 54 | * note 1: conversion to usec can be approximated, as long as the |
55 | * returned value is <= the real elapsed time. | 55 | * returned value is <= the real elapsed time. |
56 | * note 2: this should be able to cope with a few seconds without | 56 | * note 2: this should be able to cope with a few seconds without |
57 | * overflowing. | 57 | * overflowing. |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 94b48bd40dd7..c75471db576e 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -51,7 +51,7 @@ struct mutex { | |||
51 | spinlock_t wait_lock; | 51 | spinlock_t wait_lock; |
52 | struct list_head wait_list; | 52 | struct list_head wait_list; |
53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) | 53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) |
54 | struct thread_info *owner; | 54 | struct task_struct *owner; |
55 | #endif | 55 | #endif |
56 | #ifdef CONFIG_DEBUG_MUTEXES | 56 | #ifdef CONFIG_DEBUG_MUTEXES |
57 | const char *name; | 57 | const char *name; |
diff --git a/include/linux/net.h b/include/linux/net.h index 94de83c0f877..1da55e9b6f01 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ | 42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ |
43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ | 43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ |
44 | #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ | 44 | #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ |
45 | #define SYS_SENDMMSG 20 /* sys_sendmmsg(2) */ | ||
45 | 46 | ||
46 | typedef enum { | 47 | typedef enum { |
47 | SS_FREE = 0, /* not allocated */ | 48 | SS_FREE = 0, /* not allocated */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5eeb2cd3631c..ca333e79e10f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1020,9 +1020,6 @@ struct net_device { | |||
1020 | * part of the usual set specified in Space.c. | 1020 | * part of the usual set specified in Space.c. |
1021 | */ | 1021 | */ |
1022 | 1022 | ||
1023 | unsigned char if_port; /* Selectable AUI, TP,..*/ | ||
1024 | unsigned char dma; /* DMA channel */ | ||
1025 | |||
1026 | unsigned long state; | 1023 | unsigned long state; |
1027 | 1024 | ||
1028 | struct list_head dev_list; | 1025 | struct list_head dev_list; |
@@ -1035,7 +1032,7 @@ struct net_device { | |||
1035 | u32 hw_features; | 1032 | u32 hw_features; |
1036 | /* user-requested features */ | 1033 | /* user-requested features */ |
1037 | u32 wanted_features; | 1034 | u32 wanted_features; |
1038 | /* VLAN feature mask */ | 1035 | /* mask of features inheritable by VLAN devices */ |
1039 | u32 vlan_features; | 1036 | u32 vlan_features; |
1040 | 1037 | ||
1041 | /* Net device feature bits; if you change something, | 1038 | /* Net device feature bits; if you change something, |
@@ -1066,6 +1063,8 @@ struct net_device { | |||
1066 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ | 1063 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ |
1067 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ | 1064 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ |
1068 | #define NETIF_F_RXCSUM (1 << 29) /* Receive checksumming offload */ | 1065 | #define NETIF_F_RXCSUM (1 << 29) /* Receive checksumming offload */ |
1066 | #define NETIF_F_NOCACHE_COPY (1 << 30) /* Use no-cache copyfromuser */ | ||
1067 | #define NETIF_F_LOOPBACK (1 << 31) /* Enable loopback */ | ||
1069 | 1068 | ||
1070 | /* Segmentation offload features */ | 1069 | /* Segmentation offload features */ |
1071 | #define NETIF_F_GSO_SHIFT 16 | 1070 | #define NETIF_F_GSO_SHIFT 16 |
@@ -1079,9 +1078,9 @@ struct net_device { | |||
1079 | 1078 | ||
1080 | /* Features valid for ethtool to change */ | 1079 | /* Features valid for ethtool to change */ |
1081 | /* = all defined minus driver/device-class-related */ | 1080 | /* = all defined minus driver/device-class-related */ |
1082 | #define NETIF_F_NEVER_CHANGE (NETIF_F_HIGHDMA | NETIF_F_VLAN_CHALLENGED | \ | 1081 | #define NETIF_F_NEVER_CHANGE (NETIF_F_VLAN_CHALLENGED | \ |
1083 | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL) | 1082 | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL) |
1084 | #define NETIF_F_ETHTOOL_BITS (0x3f3fffff & ~NETIF_F_NEVER_CHANGE) | 1083 | #define NETIF_F_ETHTOOL_BITS (0xff3fffff & ~NETIF_F_NEVER_CHANGE) |
1085 | 1084 | ||
1086 | /* List of features with software fallbacks. */ | 1085 | /* List of features with software fallbacks. */ |
1087 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | \ | 1086 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | \ |
@@ -1095,9 +1094,14 @@ struct net_device { | |||
1095 | 1094 | ||
1096 | #define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) | 1095 | #define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) |
1097 | 1096 | ||
1097 | #define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \ | ||
1098 | NETIF_F_FSO) | ||
1099 | |||
1098 | #define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \ | 1100 | #define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \ |
1099 | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ | 1101 | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ |
1100 | NETIF_F_SCTP_CSUM | NETIF_F_FCOE_CRC) | 1102 | NETIF_F_HIGHDMA | \ |
1103 | NETIF_F_SCTP_CSUM | \ | ||
1104 | NETIF_F_ALL_FCOE) | ||
1101 | 1105 | ||
1102 | /* | 1106 | /* |
1103 | * If one device supports one of these features, then enable them | 1107 | * If one device supports one of these features, then enable them |
@@ -1105,7 +1109,12 @@ struct net_device { | |||
1105 | */ | 1109 | */ |
1106 | #define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \ | 1110 | #define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \ |
1107 | NETIF_F_SG | NETIF_F_HIGHDMA | \ | 1111 | NETIF_F_SG | NETIF_F_HIGHDMA | \ |
1108 | NETIF_F_FRAGLIST) | 1112 | NETIF_F_FRAGLIST | NETIF_F_VLAN_CHALLENGED) |
1113 | /* | ||
1114 | * If one device doesn't support one of these features, then disable it | ||
1115 | * for all in netdev_increment_features. | ||
1116 | */ | ||
1117 | #define NETIF_F_ALL_FOR_ALL (NETIF_F_NOCACHE_COPY | NETIF_F_FSO) | ||
1109 | 1118 | ||
1110 | /* changeable features with no special hardware requirements */ | 1119 | /* changeable features with no special hardware requirements */ |
1111 | #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) | 1120 | #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) |
@@ -1134,13 +1143,16 @@ struct net_device { | |||
1134 | const struct header_ops *header_ops; | 1143 | const struct header_ops *header_ops; |
1135 | 1144 | ||
1136 | unsigned int flags; /* interface flags (a la BSD) */ | 1145 | unsigned int flags; /* interface flags (a la BSD) */ |
1146 | unsigned int priv_flags; /* Like 'flags' but invisible to userspace. */ | ||
1137 | unsigned short gflags; | 1147 | unsigned short gflags; |
1138 | unsigned int priv_flags; /* Like 'flags' but invisible to userspace. */ | ||
1139 | unsigned short padded; /* How much padding added by alloc_netdev() */ | 1148 | unsigned short padded; /* How much padding added by alloc_netdev() */ |
1140 | 1149 | ||
1141 | unsigned char operstate; /* RFC2863 operstate */ | 1150 | unsigned char operstate; /* RFC2863 operstate */ |
1142 | unsigned char link_mode; /* mapping policy to operstate */ | 1151 | unsigned char link_mode; /* mapping policy to operstate */ |
1143 | 1152 | ||
1153 | unsigned char if_port; /* Selectable AUI, TP,..*/ | ||
1154 | unsigned char dma; /* DMA channel */ | ||
1155 | |||
1144 | unsigned int mtu; /* interface MTU value */ | 1156 | unsigned int mtu; /* interface MTU value */ |
1145 | unsigned short type; /* interface hardware type */ | 1157 | unsigned short type; /* interface hardware type */ |
1146 | unsigned short hard_header_len; /* hardware hdr length */ | 1158 | unsigned short hard_header_len; /* hardware hdr length */ |
@@ -1281,7 +1293,9 @@ struct net_device { | |||
1281 | NETREG_UNREGISTERED, /* completed unregister todo */ | 1293 | NETREG_UNREGISTERED, /* completed unregister todo */ |
1282 | NETREG_RELEASED, /* called free_netdev */ | 1294 | NETREG_RELEASED, /* called free_netdev */ |
1283 | NETREG_DUMMY, /* dummy device for NAPI poll */ | 1295 | NETREG_DUMMY, /* dummy device for NAPI poll */ |
1284 | } reg_state:16; | 1296 | } reg_state:8; |
1297 | |||
1298 | bool dismantle; /* device is going do be freed */ | ||
1285 | 1299 | ||
1286 | enum { | 1300 | enum { |
1287 | RTNL_LINK_INITIALIZED, | 1301 | RTNL_LINK_INITIALIZED, |
@@ -2513,6 +2527,7 @@ extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | |||
2513 | extern int netdev_max_backlog; | 2527 | extern int netdev_max_backlog; |
2514 | extern int netdev_tstamp_prequeue; | 2528 | extern int netdev_tstamp_prequeue; |
2515 | extern int weight_p; | 2529 | extern int weight_p; |
2530 | extern int bpf_jit_enable; | ||
2516 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); | 2531 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); |
2517 | extern int netdev_set_bond_master(struct net_device *dev, | 2532 | extern int netdev_set_bond_master(struct net_device *dev, |
2518 | struct net_device *master); | 2533 | struct net_device *master); |
@@ -2550,7 +2565,9 @@ static inline u32 netdev_get_wanted_features(struct net_device *dev) | |||
2550 | } | 2565 | } |
2551 | u32 netdev_increment_features(u32 all, u32 one, u32 mask); | 2566 | u32 netdev_increment_features(u32 all, u32 one, u32 mask); |
2552 | u32 netdev_fix_features(struct net_device *dev, u32 features); | 2567 | u32 netdev_fix_features(struct net_device *dev, u32 features); |
2568 | int __netdev_update_features(struct net_device *dev); | ||
2553 | void netdev_update_features(struct net_device *dev); | 2569 | void netdev_update_features(struct net_device *dev); |
2570 | void netdev_change_features(struct net_device *dev); | ||
2554 | 2571 | ||
2555 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2572 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
2556 | struct net_device *dev); | 2573 | struct net_device *dev); |
@@ -2588,18 +2605,13 @@ static inline int netif_is_bond_slave(struct net_device *dev) | |||
2588 | 2605 | ||
2589 | extern struct pernet_operations __net_initdata loopback_net_ops; | 2606 | extern struct pernet_operations __net_initdata loopback_net_ops; |
2590 | 2607 | ||
2591 | static inline int dev_ethtool_get_settings(struct net_device *dev, | 2608 | int dev_ethtool_get_settings(struct net_device *dev, |
2592 | struct ethtool_cmd *cmd) | 2609 | struct ethtool_cmd *cmd); |
2593 | { | ||
2594 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_settings) | ||
2595 | return -EOPNOTSUPP; | ||
2596 | return dev->ethtool_ops->get_settings(dev, cmd); | ||
2597 | } | ||
2598 | 2610 | ||
2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | 2611 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) |
2600 | { | 2612 | { |
2601 | if (dev->hw_features & NETIF_F_RXCSUM) | 2613 | if (dev->features & NETIF_F_RXCSUM) |
2602 | return !!(dev->features & NETIF_F_RXCSUM); | 2614 | return 1; |
2603 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) | 2615 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) |
2604 | return 0; | 2616 | return 0; |
2605 | return dev->ethtool_ops->get_rx_csum(dev); | 2617 | return dev->ethtool_ops->get_rx_csum(dev); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index eeec00abb664..7fa95df60146 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -270,7 +270,8 @@ struct nf_afinfo { | |||
270 | unsigned int dataoff, | 270 | unsigned int dataoff, |
271 | unsigned int len, | 271 | unsigned int len, |
272 | u_int8_t protocol); | 272 | u_int8_t protocol); |
273 | int (*route)(struct dst_entry **dst, struct flowi *fl); | 273 | int (*route)(struct net *net, struct dst_entry **dst, |
274 | struct flowi *fl, bool strict); | ||
274 | void (*saveroute)(const struct sk_buff *skb, | 275 | void (*saveroute)(const struct sk_buff *skb, |
275 | struct nf_queue_entry *entry); | 276 | struct nf_queue_entry *entry); |
276 | int (*reroute)(struct sk_buff *skb, | 277 | int (*reroute)(struct sk_buff *skb, |
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h index ec333d83f3b4..5a262e3ae715 100644 --- a/include/linux/netfilter/ipset/ip_set.h +++ b/include/linux/netfilter/ipset/ip_set.h | |||
@@ -293,7 +293,7 @@ struct ip_set { | |||
293 | /* Lock protecting the set data */ | 293 | /* Lock protecting the set data */ |
294 | rwlock_t lock; | 294 | rwlock_t lock; |
295 | /* References to the set */ | 295 | /* References to the set */ |
296 | atomic_t ref; | 296 | u32 ref; |
297 | /* The core set type */ | 297 | /* The core set type */ |
298 | struct ip_set_type *type; | 298 | struct ip_set_type *type; |
299 | /* The type variant doing the real job */ | 299 | /* The type variant doing the real job */ |
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h index ec9d9bea1e37..a0196ac79051 100644 --- a/include/linux/netfilter/ipset/ip_set_ahash.h +++ b/include/linux/netfilter/ipset/ip_set_ahash.h | |||
@@ -515,8 +515,7 @@ type_pf_head(struct ip_set *set, struct sk_buff *skb) | |||
515 | if (h->netmask != HOST_MASK) | 515 | if (h->netmask != HOST_MASK) |
516 | NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask); | 516 | NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask); |
517 | #endif | 517 | #endif |
518 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, | 518 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1)); |
519 | htonl(atomic_read(&set->ref) - 1)); | ||
520 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize)); | 519 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize)); |
521 | if (with_timeout(h->timeout)) | 520 | if (with_timeout(h->timeout)) |
522 | NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout)); | 521 | NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout)); |
diff --git a/include/linux/netfilter/ipset/ip_set_getport.h b/include/linux/netfilter/ipset/ip_set_getport.h index 5aebd170f899..90d09300e954 100644 --- a/include/linux/netfilter/ipset/ip_set_getport.h +++ b/include/linux/netfilter/ipset/ip_set_getport.h | |||
@@ -22,7 +22,9 @@ static inline bool ip_set_proto_with_ports(u8 proto) | |||
22 | { | 22 | { |
23 | switch (proto) { | 23 | switch (proto) { |
24 | case IPPROTO_TCP: | 24 | case IPPROTO_TCP: |
25 | case IPPROTO_SCTP: | ||
25 | case IPPROTO_UDP: | 26 | case IPPROTO_UDP: |
27 | case IPPROTO_UDPLITE: | ||
26 | return true; | 28 | return true; |
27 | } | 29 | } |
28 | return false; | 30 | return false; |
diff --git a/include/linux/netfilter/nf_conntrack_proto_gre.h b/include/linux/netfilter/nf_conntrack_proto_gre.h index 2a10efda17fb..6a0664c0c451 100644 --- a/include/linux/netfilter/nf_conntrack_proto_gre.h +++ b/include/linux/netfilter/nf_conntrack_proto_gre.h | |||
@@ -60,7 +60,7 @@ struct gre_hdr_pptp { | |||
60 | __be16 payload_len; /* size of ppp payload, not inc. gre header */ | 60 | __be16 payload_len; /* size of ppp payload, not inc. gre header */ |
61 | __be16 call_id; /* peer's call_id for this session */ | 61 | __be16 call_id; /* peer's call_id for this session */ |
62 | __be32 seq; /* sequence number. Present if S==1 */ | 62 | __be32 seq; /* sequence number. Present if S==1 */ |
63 | __be32 ack; /* seq number of highest packet recieved by */ | 63 | __be32 ack; /* seq number of highest packet received by */ |
64 | /* sender in this session */ | 64 | /* sender in this session */ |
65 | }; | 65 | }; |
66 | 66 | ||
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 37219525ff6f..32cddf78b13e 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -456,72 +456,60 @@ extern void xt_proto_fini(struct net *net, u_int8_t af); | |||
456 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 456 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
457 | extern void xt_free_table_info(struct xt_table_info *info); | 457 | extern void xt_free_table_info(struct xt_table_info *info); |
458 | 458 | ||
459 | /* | 459 | /** |
460 | * Per-CPU spinlock associated with per-cpu table entries, and | 460 | * xt_recseq - recursive seqcount for netfilter use |
461 | * with a counter for the "reading" side that allows a recursive | 461 | * |
462 | * reader to avoid taking the lock and deadlocking. | 462 | * Packet processing changes the seqcount only if no recursion happened |
463 | * | 463 | * get_counters() can use read_seqcount_begin()/read_seqcount_retry(), |
464 | * "reading" is used by ip/arp/ip6 tables rule processing which runs per-cpu. | 464 | * because we use the normal seqcount convention : |
465 | * It needs to ensure that the rules are not being changed while the packet | 465 | * Low order bit set to 1 if a writer is active. |
466 | * is being processed. In some cases, the read lock will be acquired | ||
467 | * twice on the same CPU; this is okay because of the count. | ||
468 | * | ||
469 | * "writing" is used when reading counters. | ||
470 | * During replace any readers that are using the old tables have to complete | ||
471 | * before freeing the old table. This is handled by the write locking | ||
472 | * necessary for reading the counters. | ||
473 | */ | 466 | */ |
474 | struct xt_info_lock { | 467 | DECLARE_PER_CPU(seqcount_t, xt_recseq); |
475 | seqlock_t lock; | ||
476 | unsigned char readers; | ||
477 | }; | ||
478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | ||
479 | 468 | ||
480 | /* | 469 | /** |
481 | * Note: we need to ensure that preemption is disabled before acquiring | 470 | * xt_write_recseq_begin - start of a write section |
482 | * the per-cpu-variable, so we do it as a two step process rather than | ||
483 | * using "spin_lock_bh()". | ||
484 | * | ||
485 | * We _also_ need to disable bottom half processing before updating our | ||
486 | * nesting count, to make sure that the only kind of re-entrancy is this | ||
487 | * code being called by itself: since the count+lock is not an atomic | ||
488 | * operation, we can allow no races. | ||
489 | * | 471 | * |
490 | * _Only_ that special combination of being per-cpu and never getting | 472 | * Begin packet processing : all readers must wait the end |
491 | * re-entered asynchronously means that the count is safe. | 473 | * 1) Must be called with preemption disabled |
474 | * 2) softirqs must be disabled too (or we should use irqsafe_cpu_add()) | ||
475 | * Returns : | ||
476 | * 1 if no recursion on this cpu | ||
477 | * 0 if recursion detected | ||
492 | */ | 478 | */ |
493 | static inline void xt_info_rdlock_bh(void) | 479 | static inline unsigned int xt_write_recseq_begin(void) |
494 | { | 480 | { |
495 | struct xt_info_lock *lock; | 481 | unsigned int addend; |
496 | 482 | ||
497 | local_bh_disable(); | 483 | /* |
498 | lock = &__get_cpu_var(xt_info_locks); | 484 | * Low order bit of sequence is set if we already |
499 | if (likely(!lock->readers++)) | 485 | * called xt_write_recseq_begin(). |
500 | write_seqlock(&lock->lock); | 486 | */ |
501 | } | 487 | addend = (__this_cpu_read(xt_recseq.sequence) + 1) & 1; |
502 | 488 | ||
503 | static inline void xt_info_rdunlock_bh(void) | 489 | /* |
504 | { | 490 | * This is kind of a write_seqcount_begin(), but addend is 0 or 1 |
505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | 491 | * We dont check addend value to avoid a test and conditional jump, |
492 | * since addend is most likely 1 | ||
493 | */ | ||
494 | __this_cpu_add(xt_recseq.sequence, addend); | ||
495 | smp_wmb(); | ||
506 | 496 | ||
507 | if (likely(!--lock->readers)) | 497 | return addend; |
508 | write_sequnlock(&lock->lock); | ||
509 | local_bh_enable(); | ||
510 | } | 498 | } |
511 | 499 | ||
512 | /* | 500 | /** |
513 | * The "writer" side needs to get exclusive access to the lock, | 501 | * xt_write_recseq_end - end of a write section |
514 | * regardless of readers. This must be called with bottom half | 502 | * @addend: return value from previous xt_write_recseq_begin() |
515 | * processing (and thus also preemption) disabled. | 503 | * |
504 | * End packet processing : all readers can proceed | ||
505 | * 1) Must be called with preemption disabled | ||
506 | * 2) softirqs must be disabled too (or we should use irqsafe_cpu_add()) | ||
516 | */ | 507 | */ |
517 | static inline void xt_info_wrlock(unsigned int cpu) | 508 | static inline void xt_write_recseq_end(unsigned int addend) |
518 | { | ||
519 | write_seqlock(&per_cpu(xt_info_locks, cpu).lock); | ||
520 | } | ||
521 | |||
522 | static inline void xt_info_wrunlock(unsigned int cpu) | ||
523 | { | 509 | { |
524 | write_sequnlock(&per_cpu(xt_info_locks, cpu).lock); | 510 | /* this is kind of a write_seqcount_end(), but addend is 0 or 1 */ |
511 | smp_wmb(); | ||
512 | __this_cpu_add(xt_recseq.sequence, addend); | ||
525 | } | 513 | } |
526 | 514 | ||
527 | /* | 515 | /* |
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index 1c6f0c5f530e..8797ed16feb2 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
@@ -92,7 +92,7 @@ struct ebt_entries { | |||
92 | 92 | ||
93 | /* This is a hack to make a difference between an ebt_entry struct and an | 93 | /* This is a hack to make a difference between an ebt_entry struct and an |
94 | * ebt_entries struct when traversing the entries from start to end. | 94 | * ebt_entries struct when traversing the entries from start to end. |
95 | * Using this simplifies the code alot, while still being able to use | 95 | * Using this simplifies the code a lot, while still being able to use |
96 | * ebt_entries. | 96 | * ebt_entries. |
97 | * Contrary, iptables doesn't use something like ebt_entries and therefore uses | 97 | * Contrary, iptables doesn't use something like ebt_entries and therefore uses |
98 | * different techniques for naming the policy and such. So, iptables doesn't | 98 | * different techniques for naming the policy and such. So, iptables doesn't |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index b528f6d4b860..178fafe0ff93 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -359,7 +359,7 @@ enum nfsstat4 { | |||
359 | /* Error 10073 is unused. */ | 359 | /* Error 10073 is unused. */ |
360 | NFS4ERR_CLIENTID_BUSY = 10074, /* clientid has state */ | 360 | NFS4ERR_CLIENTID_BUSY = 10074, /* clientid has state */ |
361 | NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */ | 361 | NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */ |
362 | NFS4ERR_SEQ_FALSE_RETRY = 10076, /* retry not origional */ | 362 | NFS4ERR_SEQ_FALSE_RETRY = 10076, /* retry not original */ |
363 | NFS4ERR_BAD_HIGH_SLOT = 10077, /* sequence arg bad */ | 363 | NFS4ERR_BAD_HIGH_SLOT = 10077, /* sequence arg bad */ |
364 | NFS4ERR_DEADSESSION = 10078, /* persistent session dead */ | 364 | NFS4ERR_DEADSESSION = 10078, /* persistent session dead */ |
365 | NFS4ERR_ENCR_ALG_UNSUPP = 10079, /* SSV alg mismatch */ | 365 | NFS4ERR_ENCR_ALG_UNSUPP = 10079, /* SSV alg mismatch */ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 216cea5db0aa..87694ca86914 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -47,6 +47,7 @@ struct nfs_client { | |||
47 | 47 | ||
48 | #ifdef CONFIG_NFS_V4 | 48 | #ifdef CONFIG_NFS_V4 |
49 | u64 cl_clientid; /* constant */ | 49 | u64 cl_clientid; /* constant */ |
50 | nfs4_verifier cl_confirm; /* Clientid verifier */ | ||
50 | unsigned long cl_state; | 51 | unsigned long cl_state; |
51 | 52 | ||
52 | spinlock_t cl_lock; | 53 | spinlock_t cl_lock; |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 8023e4e25133..91af2e49fa3a 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -78,7 +78,6 @@ extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, | |||
78 | struct page *page, | 78 | struct page *page, |
79 | unsigned int offset, | 79 | unsigned int offset, |
80 | unsigned int count); | 80 | unsigned int count); |
81 | extern void nfs_clear_request(struct nfs_page *req); | ||
82 | extern void nfs_release_request(struct nfs_page *req); | 81 | extern void nfs_release_request(struct nfs_page *req); |
83 | 82 | ||
84 | 83 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 78b101e487ea..7e371f7df9c4 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -50,6 +50,7 @@ struct nfs_fattr { | |||
50 | } du; | 50 | } du; |
51 | struct nfs_fsid fsid; | 51 | struct nfs_fsid fsid; |
52 | __u64 fileid; | 52 | __u64 fileid; |
53 | __u64 mounted_on_fileid; | ||
53 | struct timespec atime; | 54 | struct timespec atime; |
54 | struct timespec mtime; | 55 | struct timespec mtime; |
55 | struct timespec ctime; | 56 | struct timespec ctime; |
@@ -83,6 +84,7 @@ struct nfs_fattr { | |||
83 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) | 84 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) |
84 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ | 85 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ |
85 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ | 86 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ |
87 | #define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 21) | ||
86 | 88 | ||
87 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | 89 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ |
88 | | NFS_ATTR_FATTR_MODE \ | 90 | | NFS_ATTR_FATTR_MODE \ |
@@ -231,6 +233,7 @@ struct nfs4_layoutget { | |||
231 | struct nfs4_layoutget_args args; | 233 | struct nfs4_layoutget_args args; |
232 | struct nfs4_layoutget_res res; | 234 | struct nfs4_layoutget_res res; |
233 | struct pnfs_layout_segment **lsegpp; | 235 | struct pnfs_layout_segment **lsegpp; |
236 | gfp_t gfp_flags; | ||
234 | }; | 237 | }; |
235 | 238 | ||
236 | struct nfs4_getdeviceinfo_args { | 239 | struct nfs4_getdeviceinfo_args { |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index bd316159278c..84058ec69390 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -80,7 +80,7 @@ struct nfsd4_fs_locations { | |||
80 | 80 | ||
81 | /* | 81 | /* |
82 | * We keep an array of pseudoflavors with the export, in order from most | 82 | * We keep an array of pseudoflavors with the export, in order from most |
83 | * to least preferred. For the forseeable future, we don't expect more | 83 | * to least preferred. For the foreseeable future, we don't expect more |
84 | * than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3, | 84 | * than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3, |
85 | * spkm3i, and spkm3p (and using all 8 at once should be rare). | 85 | * spkm3i, and spkm3p (and using all 8 at once should be rare). |
86 | */ | 86 | */ |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 80d55bbc5365..f76d80ccec10 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -49,7 +49,7 @@ struct nfs_fhbase_old { | |||
49 | * | 49 | * |
50 | * The auth_type field specifies how the filehandle can be authenticated | 50 | * The auth_type field specifies how the filehandle can be authenticated |
51 | * This might allow a file to be confirmed to be in a writable part of a | 51 | * This might allow a file to be confirmed to be in a writable part of a |
52 | * filetree without checking the path from it upto the root. | 52 | * filetree without checking the path from it up to the root. |
53 | * Current values: | 53 | * Current values: |
54 | * 0 - No authentication. fb_auth is 0 bytes long | 54 | * 0 - No authentication. fb_auth is 0 bytes long |
55 | * Possible future values: | 55 | * Possible future values: |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 30022189104d..c7ccaae15af6 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -77,6 +77,39 @@ | |||
77 | */ | 77 | */ |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * DOC: Virtual interface / concurrency capabilities | ||
81 | * | ||
82 | * Some devices are able to operate with virtual MACs, they can have | ||
83 | * more than one virtual interface. The capability handling for this | ||
84 | * is a bit complex though, as there may be a number of restrictions | ||
85 | * on the types of concurrency that are supported. | ||
86 | * | ||
87 | * To start with, each device supports the interface types listed in | ||
88 | * the %NL80211_ATTR_SUPPORTED_IFTYPES attribute, but by listing the | ||
89 | * types there no concurrency is implied. | ||
90 | * | ||
91 | * Once concurrency is desired, more attributes must be observed: | ||
92 | * To start with, since some interface types are purely managed in | ||
93 | * software, like the AP-VLAN type in mac80211 for example, there's | ||
94 | * an additional list of these, they can be added at any time and | ||
95 | * are only restricted by some semantic restrictions (e.g. AP-VLAN | ||
96 | * cannot be added without a corresponding AP interface). This list | ||
97 | * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute. | ||
98 | * | ||
99 | * Further, the list of supported combinations is exported. This is | ||
100 | * in the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute. Basically, | ||
101 | * it exports a list of "groups", and at any point in time the | ||
102 | * interfaces that are currently active must fall into any one of | ||
103 | * the advertised groups. Within each group, there are restrictions | ||
104 | * on the number of interfaces of different types that are supported | ||
105 | * and also the number of different channels, along with potentially | ||
106 | * some other restrictions. See &enum nl80211_if_combination_attrs. | ||
107 | * | ||
108 | * All together, these attributes define the concurrency of virtual | ||
109 | * interfaces that a given device supports. | ||
110 | */ | ||
111 | |||
112 | /** | ||
80 | * enum nl80211_commands - supported nl80211 commands | 113 | * enum nl80211_commands - supported nl80211 commands |
81 | * | 114 | * |
82 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors | 115 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors |
@@ -203,6 +236,28 @@ | |||
203 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | 236 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, |
204 | * partial scan results may be available | 237 | * partial scan results may be available |
205 | * | 238 | * |
239 | * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain | ||
240 | * intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL. | ||
241 | * Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS) | ||
242 | * are passed, they are used in the probe requests. For | ||
243 | * broadcast, a broadcast SSID must be passed (ie. an empty | ||
244 | * string). If no SSID is passed, no probe requests are sent and | ||
245 | * a passive scan is performed. %NL80211_ATTR_SCAN_FREQUENCIES, | ||
246 | * if passed, define which channels should be scanned; if not | ||
247 | * passed, all channels allowed for the current regulatory domain | ||
248 | * are used. Extra IEs can also be passed from the userspace by | ||
249 | * using the %NL80211_ATTR_IE attribute. | ||
250 | * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan | ||
251 | * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan | ||
252 | * results available. | ||
253 | * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has | ||
254 | * stopped. The driver may issue this event at any time during a | ||
255 | * scheduled scan. One reason for stopping the scan is if the hardware | ||
256 | * does not support starting an association or a normal scan while running | ||
257 | * a scheduled scan. This event is also sent when the | ||
258 | * %NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface | ||
259 | * is brought down while a scheduled scan was running. | ||
260 | * | ||
206 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation | 261 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation |
207 | * or noise level | 262 | * or noise level |
208 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to | 263 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to |
@@ -410,11 +465,29 @@ | |||
410 | * notification. This event is used to indicate that an unprotected | 465 | * notification. This event is used to indicate that an unprotected |
411 | * disassociation frame was dropped when MFP is in use. | 466 | * disassociation frame was dropped when MFP is in use. |
412 | * | 467 | * |
468 | * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a | ||
469 | * beacon or probe response from a compatible mesh peer. This is only | ||
470 | * sent while no station information (sta_info) exists for the new peer | ||
471 | * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On | ||
472 | * reception of this notification, userspace may decide to create a new | ||
473 | * station (@NL80211_CMD_NEW_STATION). To stop this notification from | ||
474 | * reoccurring, the userspace authentication daemon may want to create the | ||
475 | * new station with the AUTHENTICATED flag unset and maybe change it later | ||
476 | * depending on the authentication result. | ||
477 | * | ||
478 | * @NL80211_CMD_GET_WOWLAN: get Wake-on-Wireless-LAN (WoWLAN) settings. | ||
479 | * @NL80211_CMD_SET_WOWLAN: set Wake-on-Wireless-LAN (WoWLAN) settings. | ||
480 | * Since wireless is more complex than wired ethernet, it supports | ||
481 | * various triggers. These triggers can be configured through this | ||
482 | * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For | ||
483 | * more background information, see | ||
484 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. | ||
485 | * | ||
413 | * @NL80211_CMD_MAX: highest used command number | 486 | * @NL80211_CMD_MAX: highest used command number |
414 | * @__NL80211_CMD_AFTER_LAST: internal use | 487 | * @__NL80211_CMD_AFTER_LAST: internal use |
415 | */ | 488 | */ |
416 | enum nl80211_commands { | 489 | enum nl80211_commands { |
417 | /* don't change the order or add anything inbetween, this is ABI! */ | 490 | /* don't change the order or add anything between, this is ABI! */ |
418 | NL80211_CMD_UNSPEC, | 491 | NL80211_CMD_UNSPEC, |
419 | 492 | ||
420 | NL80211_CMD_GET_WIPHY, /* can dump */ | 493 | NL80211_CMD_GET_WIPHY, /* can dump */ |
@@ -522,6 +595,16 @@ enum nl80211_commands { | |||
522 | NL80211_CMD_UNPROT_DEAUTHENTICATE, | 595 | NL80211_CMD_UNPROT_DEAUTHENTICATE, |
523 | NL80211_CMD_UNPROT_DISASSOCIATE, | 596 | NL80211_CMD_UNPROT_DISASSOCIATE, |
524 | 597 | ||
598 | NL80211_CMD_NEW_PEER_CANDIDATE, | ||
599 | |||
600 | NL80211_CMD_GET_WOWLAN, | ||
601 | NL80211_CMD_SET_WOWLAN, | ||
602 | |||
603 | NL80211_CMD_START_SCHED_SCAN, | ||
604 | NL80211_CMD_STOP_SCHED_SCAN, | ||
605 | NL80211_CMD_SCHED_SCAN_RESULTS, | ||
606 | NL80211_CMD_SCHED_SCAN_STOPPED, | ||
607 | |||
525 | /* add new commands above here */ | 608 | /* add new commands above here */ |
526 | 609 | ||
527 | /* used to define NL80211_CMD_MAX below */ | 610 | /* used to define NL80211_CMD_MAX below */ |
@@ -545,6 +628,7 @@ enum nl80211_commands { | |||
545 | /* source-level API compatibility */ | 628 | /* source-level API compatibility */ |
546 | #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG | 629 | #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG |
547 | #define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG | 630 | #define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG |
631 | #define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE | ||
548 | 632 | ||
549 | /** | 633 | /** |
550 | * enum nl80211_attrs - nl80211 netlink attributes | 634 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -860,7 +944,7 @@ enum nl80211_commands { | |||
860 | * This can be used to mask out antennas which are not attached or should | 944 | * This can be used to mask out antennas which are not attached or should |
861 | * not be used for receiving. If an antenna is not selected in this bitmap | 945 | * not be used for receiving. If an antenna is not selected in this bitmap |
862 | * the hardware should not be configured to receive on this antenna. | 946 | * the hardware should not be configured to receive on this antenna. |
863 | * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX. | 947 | * For a more detailed description see @NL80211_ATTR_WIPHY_ANTENNA_TX. |
864 | * | 948 | * |
865 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available | 949 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available |
866 | * for configuration as TX antennas via the above parameters. | 950 | * for configuration as TX antennas via the above parameters. |
@@ -886,12 +970,37 @@ enum nl80211_commands { | |||
886 | * changed once the mesh is active. | 970 | * changed once the mesh is active. |
887 | * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute | 971 | * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute |
888 | * containing attributes from &enum nl80211_meshconf_params. | 972 | * containing attributes from &enum nl80211_meshconf_params. |
973 | * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver | ||
974 | * allows auth frames in a mesh to be passed to userspace for processing via | ||
975 | * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag. | ||
976 | * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as | ||
977 | * defined in &enum nl80211_plink_state. Used when userspace is | ||
978 | * driving the peer link management state machine. | ||
979 | * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled. | ||
980 | * | ||
981 | * @NL80211_ATTR_WOWLAN_SUPPORTED: indicates, as part of the wiphy capabilities, | ||
982 | * the supported WoWLAN triggers | ||
983 | * @NL80211_ATTR_WOWLAN_TRIGGERS: used by %NL80211_CMD_SET_WOWLAN to | ||
984 | * indicate which WoW triggers should be enabled. This is also | ||
985 | * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN | ||
986 | * triggers. | ||
987 | |||
988 | * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan | ||
989 | * cycles, in msecs. | ||
990 | * | ||
991 | * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported | ||
992 | * interface combinations. In each nested item, it contains attributes | ||
993 | * defined in &enum nl80211_if_combination_attrs. | ||
994 | * @NL80211_ATTR_SOFTWARE_IFTYPES: Nested attribute (just like | ||
995 | * %NL80211_ATTR_SUPPORTED_IFTYPES) containing the interface types that | ||
996 | * are managed in software: interfaces of these types aren't subject to | ||
997 | * any restrictions in their number or combinations. | ||
889 | * | 998 | * |
890 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 999 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
891 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1000 | * @__NL80211_ATTR_AFTER_LAST: internal use |
892 | */ | 1001 | */ |
893 | enum nl80211_attrs { | 1002 | enum nl80211_attrs { |
894 | /* don't change the order or add anything inbetween, this is ABI! */ | 1003 | /* don't change the order or add anything between, this is ABI! */ |
895 | NL80211_ATTR_UNSPEC, | 1004 | NL80211_ATTR_UNSPEC, |
896 | 1005 | ||
897 | NL80211_ATTR_WIPHY, | 1006 | NL80211_ATTR_WIPHY, |
@@ -1074,6 +1183,17 @@ enum nl80211_attrs { | |||
1074 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, | 1183 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, |
1075 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, | 1184 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, |
1076 | 1185 | ||
1186 | NL80211_ATTR_SUPPORT_MESH_AUTH, | ||
1187 | NL80211_ATTR_STA_PLINK_STATE, | ||
1188 | |||
1189 | NL80211_ATTR_WOWLAN_TRIGGERS, | ||
1190 | NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, | ||
1191 | |||
1192 | NL80211_ATTR_SCHED_SCAN_INTERVAL, | ||
1193 | |||
1194 | NL80211_ATTR_INTERFACE_COMBINATIONS, | ||
1195 | NL80211_ATTR_SOFTWARE_IFTYPES, | ||
1196 | |||
1077 | /* add attributes here, update the policy in nl80211.c */ | 1197 | /* add attributes here, update the policy in nl80211.c */ |
1078 | 1198 | ||
1079 | __NL80211_ATTR_AFTER_LAST, | 1199 | __NL80211_ATTR_AFTER_LAST, |
@@ -1126,7 +1246,9 @@ enum nl80211_attrs { | |||
1126 | * @NL80211_IFTYPE_ADHOC: independent BSS member | 1246 | * @NL80211_IFTYPE_ADHOC: independent BSS member |
1127 | * @NL80211_IFTYPE_STATION: managed BSS member | 1247 | * @NL80211_IFTYPE_STATION: managed BSS member |
1128 | * @NL80211_IFTYPE_AP: access point | 1248 | * @NL80211_IFTYPE_AP: access point |
1129 | * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points | 1249 | * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points; VLAN interfaces |
1250 | * are a bit special in that they must always be tied to a pre-existing | ||
1251 | * AP type interface. | ||
1130 | * @NL80211_IFTYPE_WDS: wireless distribution interface | 1252 | * @NL80211_IFTYPE_WDS: wireless distribution interface |
1131 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames | 1253 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames |
1132 | * @NL80211_IFTYPE_MESH_POINT: mesh point | 1254 | * @NL80211_IFTYPE_MESH_POINT: mesh point |
@@ -1168,6 +1290,7 @@ enum nl80211_iftype { | |||
1168 | * with short barker preamble | 1290 | * with short barker preamble |
1169 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 1291 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
1170 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | 1292 | * @NL80211_STA_FLAG_MFP: station uses management frame protection |
1293 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated | ||
1171 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 1294 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
1172 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 1295 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
1173 | */ | 1296 | */ |
@@ -1177,6 +1300,7 @@ enum nl80211_sta_flags { | |||
1177 | NL80211_STA_FLAG_SHORT_PREAMBLE, | 1300 | NL80211_STA_FLAG_SHORT_PREAMBLE, |
1178 | NL80211_STA_FLAG_WME, | 1301 | NL80211_STA_FLAG_WME, |
1179 | NL80211_STA_FLAG_MFP, | 1302 | NL80211_STA_FLAG_MFP, |
1303 | NL80211_STA_FLAG_AUTHENTICATED, | ||
1180 | 1304 | ||
1181 | /* keep last */ | 1305 | /* keep last */ |
1182 | __NL80211_STA_FLAG_AFTER_LAST, | 1306 | __NL80211_STA_FLAG_AFTER_LAST, |
@@ -1222,6 +1346,36 @@ enum nl80211_rate_info { | |||
1222 | }; | 1346 | }; |
1223 | 1347 | ||
1224 | /** | 1348 | /** |
1349 | * enum nl80211_sta_bss_param - BSS information collected by STA | ||
1350 | * | ||
1351 | * These attribute types are used with %NL80211_STA_INFO_BSS_PARAM | ||
1352 | * when getting information about the bitrate of a station. | ||
1353 | * | ||
1354 | * @__NL80211_STA_BSS_PARAM_INVALID: attribute number 0 is reserved | ||
1355 | * @NL80211_STA_BSS_PARAM_CTS_PROT: whether CTS protection is enabled (flag) | ||
1356 | * @NL80211_STA_BSS_PARAM_SHORT_PREAMBLE: whether short preamble is enabled | ||
1357 | * (flag) | ||
1358 | * @NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME: whether short slot time is enabled | ||
1359 | * (flag) | ||
1360 | * @NL80211_STA_BSS_PARAM_DTIM_PERIOD: DTIM period for beaconing (u8) | ||
1361 | * @NL80211_STA_BSS_PARAM_BEACON_INTERVAL: Beacon interval (u16) | ||
1362 | * @NL80211_STA_BSS_PARAM_MAX: highest sta_bss_param number currently defined | ||
1363 | * @__NL80211_STA_BSS_PARAM_AFTER_LAST: internal use | ||
1364 | */ | ||
1365 | enum nl80211_sta_bss_param { | ||
1366 | __NL80211_STA_BSS_PARAM_INVALID, | ||
1367 | NL80211_STA_BSS_PARAM_CTS_PROT, | ||
1368 | NL80211_STA_BSS_PARAM_SHORT_PREAMBLE, | ||
1369 | NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME, | ||
1370 | NL80211_STA_BSS_PARAM_DTIM_PERIOD, | ||
1371 | NL80211_STA_BSS_PARAM_BEACON_INTERVAL, | ||
1372 | |||
1373 | /* keep last */ | ||
1374 | __NL80211_STA_BSS_PARAM_AFTER_LAST, | ||
1375 | NL80211_STA_BSS_PARAM_MAX = __NL80211_STA_BSS_PARAM_AFTER_LAST - 1 | ||
1376 | }; | ||
1377 | |||
1378 | /** | ||
1225 | * enum nl80211_sta_info - station information | 1379 | * enum nl80211_sta_info - station information |
1226 | * | 1380 | * |
1227 | * These attribute types are used with %NL80211_ATTR_STA_INFO | 1381 | * These attribute types are used with %NL80211_ATTR_STA_INFO |
@@ -1233,7 +1387,7 @@ enum nl80211_rate_info { | |||
1233 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) | 1387 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) |
1234 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 1388 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
1235 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 1389 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
1236 | * containing info as possible, see &enum nl80211_sta_info_txrate. | 1390 | * containing info as possible, see &enum nl80211_rate_info |
1237 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) | 1391 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) |
1238 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this | 1392 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this |
1239 | * station) | 1393 | * station) |
@@ -1243,8 +1397,12 @@ enum nl80211_rate_info { | |||
1243 | * @NL80211_STA_INFO_LLID: the station's mesh LLID | 1397 | * @NL80211_STA_INFO_LLID: the station's mesh LLID |
1244 | * @NL80211_STA_INFO_PLID: the station's mesh PLID | 1398 | * @NL80211_STA_INFO_PLID: the station's mesh PLID |
1245 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station | 1399 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station |
1400 | * (see %enum nl80211_plink_state) | ||
1246 | * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested | 1401 | * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested |
1247 | * attribute, like NL80211_STA_INFO_TX_BITRATE. | 1402 | * attribute, like NL80211_STA_INFO_TX_BITRATE. |
1403 | * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute | ||
1404 | * containing info as possible, see &enum nl80211_sta_bss_param | ||
1405 | * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected | ||
1248 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 1406 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
1249 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 1407 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
1250 | */ | 1408 | */ |
@@ -1264,6 +1422,8 @@ enum nl80211_sta_info { | |||
1264 | NL80211_STA_INFO_TX_FAILED, | 1422 | NL80211_STA_INFO_TX_FAILED, |
1265 | NL80211_STA_INFO_SIGNAL_AVG, | 1423 | NL80211_STA_INFO_SIGNAL_AVG, |
1266 | NL80211_STA_INFO_RX_BITRATE, | 1424 | NL80211_STA_INFO_RX_BITRATE, |
1425 | NL80211_STA_INFO_BSS_PARAM, | ||
1426 | NL80211_STA_INFO_CONNECTED_TIME, | ||
1267 | 1427 | ||
1268 | /* keep last */ | 1428 | /* keep last */ |
1269 | __NL80211_STA_INFO_AFTER_LAST, | 1429 | __NL80211_STA_INFO_AFTER_LAST, |
@@ -1419,7 +1579,7 @@ enum nl80211_bitrate_attr { | |||
1419 | * 802.11 country information element with regulatory information it | 1579 | * 802.11 country information element with regulatory information it |
1420 | * thinks we should consider. cfg80211 only processes the country | 1580 | * thinks we should consider. cfg80211 only processes the country |
1421 | * code from the IE, and relies on the regulatory domain information | 1581 | * code from the IE, and relies on the regulatory domain information |
1422 | * structure pased by userspace (CRDA) from our wireless-regdb. | 1582 | * structure passed by userspace (CRDA) from our wireless-regdb. |
1423 | * If a channel is enabled but the country code indicates it should | 1583 | * If a channel is enabled but the country code indicates it should |
1424 | * be disabled we disable the channel and re-enable it upon disassociation. | 1584 | * be disabled we disable the channel and re-enable it upon disassociation. |
1425 | */ | 1585 | */ |
@@ -1598,7 +1758,7 @@ enum nl80211_mntr_flags { | |||
1598 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in | 1758 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in |
1599 | * millisecond units, used by the Peer Link Open message | 1759 | * millisecond units, used by the Peer Link Open message |
1600 | * | 1760 | * |
1601 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the inital confirm timeout, in | 1761 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in |
1602 | * millisecond units, used by the peer link management to close a peer link | 1762 | * millisecond units, used by the peer link management to close a peer link |
1603 | * | 1763 | * |
1604 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in | 1764 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in |
@@ -1686,9 +1846,21 @@ enum nl80211_meshconf_params { | |||
1686 | * vendor specific path metric or disable it to use the default Airtime | 1846 | * vendor specific path metric or disable it to use the default Airtime |
1687 | * metric. | 1847 | * metric. |
1688 | * | 1848 | * |
1689 | * @NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE: A vendor specific information | 1849 | * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a |
1690 | * element that vendors will use to identify the path selection methods and | 1850 | * robust security network ie, or a vendor specific information element that |
1691 | * metrics in use. | 1851 | * vendors will use to identify the path selection methods and metrics in use. |
1852 | * | ||
1853 | * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication | ||
1854 | * daemon will be authenticating mesh candidates. | ||
1855 | * | ||
1856 | * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication | ||
1857 | * daemon will be securing peer link frames. AMPE is a secured version of Mesh | ||
1858 | * Peering Management (MPM) and is implemented with the assistance of a | ||
1859 | * userspace daemon. When this flag is set, the kernel will send peer | ||
1860 | * management frames to a userspace daemon that will implement AMPE | ||
1861 | * functionality (security capabilities selection, key confirmation, and key | ||
1862 | * management). When the flag is unset (default), the kernel can autonomously | ||
1863 | * complete (unsecured) mesh peering without the need of a userspace daemon. | ||
1692 | * | 1864 | * |
1693 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | 1865 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number |
1694 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | 1866 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use |
@@ -1697,7 +1869,9 @@ enum nl80211_mesh_setup_params { | |||
1697 | __NL80211_MESH_SETUP_INVALID, | 1869 | __NL80211_MESH_SETUP_INVALID, |
1698 | NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, | 1870 | NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, |
1699 | NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, | 1871 | NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, |
1700 | NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE, | 1872 | NL80211_MESH_SETUP_IE, |
1873 | NL80211_MESH_SETUP_USERSPACE_AUTH, | ||
1874 | NL80211_MESH_SETUP_USERSPACE_AMPE, | ||
1701 | 1875 | ||
1702 | /* keep last */ | 1876 | /* keep last */ |
1703 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, | 1877 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, |
@@ -2002,4 +2176,189 @@ enum nl80211_tx_power_setting { | |||
2002 | NL80211_TX_POWER_FIXED, | 2176 | NL80211_TX_POWER_FIXED, |
2003 | }; | 2177 | }; |
2004 | 2178 | ||
2179 | /** | ||
2180 | * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute | ||
2181 | * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute | ||
2182 | * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has | ||
2183 | * a zero bit are ignored | ||
2184 | * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have | ||
2185 | * a bit for each byte in the pattern. The lowest-order bit corresponds | ||
2186 | * to the first byte of the pattern, but the bytes of the pattern are | ||
2187 | * in a little-endian-like format, i.e. the 9th byte of the pattern | ||
2188 | * corresponds to the lowest-order bit in the second byte of the mask. | ||
2189 | * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where | ||
2190 | * xx indicates "don't care") would be represented by a pattern of | ||
2191 | * twelve zero bytes, and a mask of "0xed,0x07". | ||
2192 | * Note that the pattern matching is done as though frames were not | ||
2193 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked | ||
2194 | * first (including SNAP header unpacking) and then matched. | ||
2195 | * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes | ||
2196 | * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number | ||
2197 | */ | ||
2198 | enum nl80211_wowlan_packet_pattern_attr { | ||
2199 | __NL80211_WOWLAN_PKTPAT_INVALID, | ||
2200 | NL80211_WOWLAN_PKTPAT_MASK, | ||
2201 | NL80211_WOWLAN_PKTPAT_PATTERN, | ||
2202 | |||
2203 | NUM_NL80211_WOWLAN_PKTPAT, | ||
2204 | MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, | ||
2205 | }; | ||
2206 | |||
2207 | /** | ||
2208 | * struct nl80211_wowlan_pattern_support - pattern support information | ||
2209 | * @max_patterns: maximum number of patterns supported | ||
2210 | * @min_pattern_len: minimum length of each pattern | ||
2211 | * @max_pattern_len: maximum length of each pattern | ||
2212 | * | ||
2213 | * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when | ||
2214 | * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the | ||
2215 | * capability information given by the kernel to userspace. | ||
2216 | */ | ||
2217 | struct nl80211_wowlan_pattern_support { | ||
2218 | __u32 max_patterns; | ||
2219 | __u32 min_pattern_len; | ||
2220 | __u32 max_pattern_len; | ||
2221 | } __attribute__((packed)); | ||
2222 | |||
2223 | /** | ||
2224 | * enum nl80211_wowlan_triggers - WoWLAN trigger definitions | ||
2225 | * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes | ||
2226 | * @NL80211_WOWLAN_TRIG_ANY: wake up on any activity, do not really put | ||
2227 | * the chip into a special state -- works best with chips that have | ||
2228 | * support for low-power operation already (flag) | ||
2229 | * @NL80211_WOWLAN_TRIG_DISCONNECT: wake up on disconnect, the way disconnect | ||
2230 | * is detected is implementation-specific (flag) | ||
2231 | * @NL80211_WOWLAN_TRIG_MAGIC_PKT: wake up on magic packet (6x 0xff, followed | ||
2232 | * by 16 repetitions of MAC addr, anywhere in payload) (flag) | ||
2233 | * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns | ||
2234 | * which are passed in an array of nested attributes, each nested attribute | ||
2235 | * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern. | ||
2236 | * Each pattern defines a wakeup packet. The matching is done on the MSDU, | ||
2237 | * i.e. as though the packet was an 802.3 packet, so the pattern matching | ||
2238 | * is done after the packet is converted to the MSDU. | ||
2239 | * | ||
2240 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute | ||
2241 | * carrying a &struct nl80211_wowlan_pattern_support. | ||
2242 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers | ||
2243 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number | ||
2244 | */ | ||
2245 | enum nl80211_wowlan_triggers { | ||
2246 | __NL80211_WOWLAN_TRIG_INVALID, | ||
2247 | NL80211_WOWLAN_TRIG_ANY, | ||
2248 | NL80211_WOWLAN_TRIG_DISCONNECT, | ||
2249 | NL80211_WOWLAN_TRIG_MAGIC_PKT, | ||
2250 | NL80211_WOWLAN_TRIG_PKT_PATTERN, | ||
2251 | |||
2252 | /* keep last */ | ||
2253 | NUM_NL80211_WOWLAN_TRIG, | ||
2254 | MAX_NL80211_WOWLAN_TRIG = NUM_NL80211_WOWLAN_TRIG - 1 | ||
2255 | }; | ||
2256 | |||
2257 | /** | ||
2258 | * enum nl80211_iface_limit_attrs - limit attributes | ||
2259 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) | ||
2260 | * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that | ||
2261 | * can be chosen from this set of interface types (u32) | ||
2262 | * @NL80211_IFACE_LIMIT_TYPES: nested attribute containing a | ||
2263 | * flag attribute for each interface type in this set | ||
2264 | * @NUM_NL80211_IFACE_LIMIT: number of attributes | ||
2265 | * @MAX_NL80211_IFACE_LIMIT: highest attribute number | ||
2266 | */ | ||
2267 | enum nl80211_iface_limit_attrs { | ||
2268 | NL80211_IFACE_LIMIT_UNSPEC, | ||
2269 | NL80211_IFACE_LIMIT_MAX, | ||
2270 | NL80211_IFACE_LIMIT_TYPES, | ||
2271 | |||
2272 | /* keep last */ | ||
2273 | NUM_NL80211_IFACE_LIMIT, | ||
2274 | MAX_NL80211_IFACE_LIMIT = NUM_NL80211_IFACE_LIMIT - 1 | ||
2275 | }; | ||
2276 | |||
2277 | /** | ||
2278 | * enum nl80211_if_combination_attrs -- interface combination attributes | ||
2279 | * | ||
2280 | * @NL80211_IFACE_COMB_UNSPEC: (reserved) | ||
2281 | * @NL80211_IFACE_COMB_LIMITS: Nested attributes containing the limits | ||
2282 | * for given interface types, see &enum nl80211_iface_limit_attrs. | ||
2283 | * @NL80211_IFACE_COMB_MAXNUM: u32 attribute giving the total number of | ||
2284 | * interfaces that can be created in this group. This number doesn't | ||
2285 | * apply to interfaces purely managed in software, which are listed | ||
2286 | * in a separate attribute %NL80211_ATTR_INTERFACES_SOFTWARE. | ||
2287 | * @NL80211_IFACE_COMB_STA_AP_BI_MATCH: flag attribute specifying that | ||
2288 | * beacon intervals within this group must be all the same even for | ||
2289 | * infrastructure and AP/GO combinations, i.e. the GO(s) must adopt | ||
2290 | * the infrastructure network's beacon interval. | ||
2291 | * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many | ||
2292 | * different channels may be used within this group. | ||
2293 | * @NUM_NL80211_IFACE_COMB: number of attributes | ||
2294 | * @MAX_NL80211_IFACE_COMB: highest attribute number | ||
2295 | * | ||
2296 | * Examples: | ||
2297 | * limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2 | ||
2298 | * => allows an AP and a STA that must match BIs | ||
2299 | * | ||
2300 | * numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8 | ||
2301 | * => allows 8 of AP/GO | ||
2302 | * | ||
2303 | * numbers = [ #{STA} <= 2 ], channels = 2, max = 2 | ||
2304 | * => allows two STAs on different channels | ||
2305 | * | ||
2306 | * numbers = [ #{STA} <= 1, #{P2P-client,P2P-GO} <= 3 ], max = 4 | ||
2307 | * => allows a STA plus three P2P interfaces | ||
2308 | * | ||
2309 | * The list of these four possiblities could completely be contained | ||
2310 | * within the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute to indicate | ||
2311 | * that any of these groups must match. | ||
2312 | * | ||
2313 | * "Combinations" of just a single interface will not be listed here, | ||
2314 | * a single interface of any valid interface type is assumed to always | ||
2315 | * be possible by itself. This means that implicitly, for each valid | ||
2316 | * interface type, the following group always exists: | ||
2317 | * numbers = [ #{<type>} <= 1 ], channels = 1, max = 1 | ||
2318 | */ | ||
2319 | enum nl80211_if_combination_attrs { | ||
2320 | NL80211_IFACE_COMB_UNSPEC, | ||
2321 | NL80211_IFACE_COMB_LIMITS, | ||
2322 | NL80211_IFACE_COMB_MAXNUM, | ||
2323 | NL80211_IFACE_COMB_STA_AP_BI_MATCH, | ||
2324 | NL80211_IFACE_COMB_NUM_CHANNELS, | ||
2325 | |||
2326 | /* keep last */ | ||
2327 | NUM_NL80211_IFACE_COMB, | ||
2328 | MAX_NL80211_IFACE_COMB = NUM_NL80211_IFACE_COMB - 1 | ||
2329 | }; | ||
2330 | |||
2331 | |||
2332 | /** | ||
2333 | * enum nl80211_plink_state - state of a mesh peer link finite state machine | ||
2334 | * | ||
2335 | * @NL80211_PLINK_LISTEN: initial state, considered the implicit | ||
2336 | * state of non existant mesh peer links | ||
2337 | * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to | ||
2338 | * this mesh peer | ||
2339 | * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received | ||
2340 | * from this mesh peer | ||
2341 | * @NL80211_PLINK_CNF_RCVD: mesh plink confirm frame has been | ||
2342 | * received from this mesh peer | ||
2343 | * @NL80211_PLINK_ESTAB: mesh peer link is established | ||
2344 | * @NL80211_PLINK_HOLDING: mesh peer link is being closed or cancelled | ||
2345 | * @NL80211_PLINK_BLOCKED: all frames transmitted from this mesh | ||
2346 | * plink are discarded | ||
2347 | * @NUM_NL80211_PLINK_STATES: number of peer link states | ||
2348 | * @MAX_NL80211_PLINK_STATES: highest numerical value of plink states | ||
2349 | */ | ||
2350 | enum nl80211_plink_state { | ||
2351 | NL80211_PLINK_LISTEN, | ||
2352 | NL80211_PLINK_OPN_SNT, | ||
2353 | NL80211_PLINK_OPN_RCVD, | ||
2354 | NL80211_PLINK_CNF_RCVD, | ||
2355 | NL80211_PLINK_ESTAB, | ||
2356 | NL80211_PLINK_HOLDING, | ||
2357 | NL80211_PLINK_BLOCKED, | ||
2358 | |||
2359 | /* keep last */ | ||
2360 | NUM_NL80211_PLINK_STATES, | ||
2361 | MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1 | ||
2362 | }; | ||
2363 | |||
2005 | #endif /* __LINUX_NL80211_H */ | 2364 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 2026f9e1ceb8..621dfa16acc0 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -237,7 +237,7 @@ static inline int notifier_to_errno(int ret) | |||
237 | * enabling interrupts. Must not sleep, | 237 | * enabling interrupts. Must not sleep, |
238 | * must not fail */ | 238 | * must not fail */ |
239 | 239 | ||
240 | /* Used for CPU hotplug events occuring while tasks are frozen due to a suspend | 240 | /* Used for CPU hotplug events occurring while tasks are frozen due to a suspend |
241 | * operation in progress | 241 | * operation in progress |
242 | */ | 242 | */ |
243 | #define CPU_TASKS_FROZEN 0x0010 | 243 | #define CPU_TASKS_FROZEN 0x0010 |
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 8bfe6c1d4365..ae5638480ef2 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -21,8 +21,7 @@ extern void of_device_make_bus_id(struct device *dev); | |||
21 | static inline int of_driver_match_device(struct device *dev, | 21 | static inline int of_driver_match_device(struct device *dev, |
22 | const struct device_driver *drv) | 22 | const struct device_driver *drv) |
23 | { | 23 | { |
24 | dev->of_match = of_match_device(drv->of_match_table, dev); | 24 | return of_match_device(drv->of_match_table, dev) != NULL; |
25 | return dev->of_match != NULL; | ||
26 | } | 25 | } |
27 | 26 | ||
28 | extern struct platform_device *of_dev_get(struct platform_device *dev); | 27 | extern struct platform_device *of_dev_get(struct platform_device *dev); |
@@ -58,6 +57,11 @@ static inline int of_device_uevent(struct device *dev, | |||
58 | 57 | ||
59 | static inline void of_device_node_put(struct device *dev) { } | 58 | static inline void of_device_node_put(struct device *dev) { } |
60 | 59 | ||
60 | static inline const struct of_device_id *of_match_device( | ||
61 | const struct of_device_id *matches, const struct device *dev) | ||
62 | { | ||
63 | return NULL; | ||
64 | } | ||
61 | #endif /* CONFIG_OF_DEVICE */ | 65 | #endif /* CONFIG_OF_DEVICE */ |
62 | 66 | ||
63 | #endif /* _LINUX_OF_DEVICE_H */ | 67 | #endif /* _LINUX_OF_DEVICE_H */ |
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 109e013b1772..e6955f5d1f08 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h | |||
@@ -68,6 +68,7 @@ extern int of_irq_to_resource(struct device_node *dev, int index, | |||
68 | extern int of_irq_count(struct device_node *dev); | 68 | extern int of_irq_count(struct device_node *dev); |
69 | extern int of_irq_to_resource_table(struct device_node *dev, | 69 | extern int of_irq_to_resource_table(struct device_node *dev, |
70 | struct resource *res, int nr_irqs); | 70 | struct resource *res, int nr_irqs); |
71 | extern struct device_node *of_irq_find_parent(struct device_node *child); | ||
71 | 72 | ||
72 | #endif /* CONFIG_OF_IRQ */ | 73 | #endif /* CONFIG_OF_IRQ */ |
73 | #endif /* CONFIG_OF */ | 74 | #endif /* CONFIG_OF */ |
diff --git a/include/linux/omap3isp.h b/include/linux/omap3isp.h index 150822b4dbff..b6111f8cd49a 100644 --- a/include/linux/omap3isp.h +++ b/include/linux/omap3isp.h | |||
@@ -250,7 +250,7 @@ enum omap3isp_h3a_af_rgbpos { | |||
250 | /* Contains the information regarding the Horizontal Median Filter */ | 250 | /* Contains the information regarding the Horizontal Median Filter */ |
251 | struct omap3isp_h3a_af_hmf { | 251 | struct omap3isp_h3a_af_hmf { |
252 | __u8 enable; /* Status of Horizontal Median Filter */ | 252 | __u8 enable; /* Status of Horizontal Median Filter */ |
253 | __u8 threshold; /* Threshhold Value for Horizontal Median Filter */ | 253 | __u8 threshold; /* Threshold Value for Horizontal Median Filter */ |
254 | }; | 254 | }; |
255 | 255 | ||
256 | /* Contains the information regarding the IIR Filters */ | 256 | /* Contains the information regarding the IIR Filters */ |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index f5de21de31dd..961ecc7d30bc 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -138,7 +138,7 @@ static inline void move_unlock_page_cgroup(struct page_cgroup *pc, | |||
138 | 138 | ||
139 | #define PCG_ARRAYID_OFFSET (BITS_PER_LONG - PCG_ARRAYID_WIDTH) | 139 | #define PCG_ARRAYID_OFFSET (BITS_PER_LONG - PCG_ARRAYID_WIDTH) |
140 | /* | 140 | /* |
141 | * Zero the shift count for non-existant fields, to prevent compiler | 141 | * Zero the shift count for non-existent fields, to prevent compiler |
142 | * warnings and ensure references are optimized away. | 142 | * warnings and ensure references are optimized away. |
143 | */ | 143 | */ |
144 | #define PCG_ARRAYID_SHIFT (PCG_ARRAYID_OFFSET * (PCG_ARRAYID_WIDTH != 0)) | 144 | #define PCG_ARRAYID_SHIFT (PCG_ARRAYID_OFFSET * (PCG_ARRAYID_WIDTH != 0)) |
diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h new file mode 100644 index 000000000000..655824fa4c76 --- /dev/null +++ b/include/linux/pci-ats.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef LINUX_PCI_ATS_H | ||
2 | #define LINUX_PCI_ATS_H | ||
3 | |||
4 | /* Address Translation Service */ | ||
5 | struct pci_ats { | ||
6 | int pos; /* capability position */ | ||
7 | int stu; /* Smallest Translation Unit */ | ||
8 | int qdep; /* Invalidate Queue Depth */ | ||
9 | int ref_cnt; /* Physical Function reference count */ | ||
10 | unsigned int is_enabled:1; /* Enable bit is set */ | ||
11 | }; | ||
12 | |||
13 | #ifdef CONFIG_PCI_IOV | ||
14 | |||
15 | extern int pci_enable_ats(struct pci_dev *dev, int ps); | ||
16 | extern void pci_disable_ats(struct pci_dev *dev); | ||
17 | extern int pci_ats_queue_depth(struct pci_dev *dev); | ||
18 | /** | ||
19 | * pci_ats_enabled - query the ATS status | ||
20 | * @dev: the PCI device | ||
21 | * | ||
22 | * Returns 1 if ATS capability is enabled, or 0 if not. | ||
23 | */ | ||
24 | static inline int pci_ats_enabled(struct pci_dev *dev) | ||
25 | { | ||
26 | return dev->ats && dev->ats->is_enabled; | ||
27 | } | ||
28 | |||
29 | #else /* CONFIG_PCI_IOV */ | ||
30 | |||
31 | static inline int pci_enable_ats(struct pci_dev *dev, int ps) | ||
32 | { | ||
33 | return -ENODEV; | ||
34 | } | ||
35 | |||
36 | static inline void pci_disable_ats(struct pci_dev *dev) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | static inline int pci_ats_queue_depth(struct pci_dev *dev) | ||
41 | { | ||
42 | return -ENODEV; | ||
43 | } | ||
44 | |||
45 | static inline int pci_ats_enabled(struct pci_dev *dev) | ||
46 | { | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | #endif /* CONFIG_PCI_IOV */ | ||
51 | |||
52 | #endif /* LINUX_PCI_ATS_H*/ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 11fd38151cc9..8652a4fa3fe2 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -518,7 +518,7 @@ | |||
518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 | 518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 |
519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 | 519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 |
520 | #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 | 520 | #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 |
521 | #define PCI_DEVICE_ID_AMD_15H_NB_LINK 0x1604 | 521 | #define PCI_DEVICE_ID_AMD_15H_NB_F4 0x1604 |
522 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 | 522 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 |
523 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 523 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
524 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 524 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
@@ -608,6 +608,8 @@ | |||
608 | #define PCI_DEVICE_ID_MATROX_G550 0x2527 | 608 | #define PCI_DEVICE_ID_MATROX_G550 0x2527 |
609 | #define PCI_DEVICE_ID_MATROX_VIA 0x4536 | 609 | #define PCI_DEVICE_ID_MATROX_VIA 0x4536 |
610 | 610 | ||
611 | #define PCI_VENDOR_ID_MOBILITY_ELECTRONICS 0x14f2 | ||
612 | |||
611 | #define PCI_VENDOR_ID_CT 0x102c | 613 | #define PCI_VENDOR_ID_CT 0x102c |
612 | #define PCI_DEVICE_ID_CT_69000 0x00c0 | 614 | #define PCI_DEVICE_ID_CT_69000 0x00c0 |
613 | #define PCI_DEVICE_ID_CT_65545 0x00d8 | 615 | #define PCI_DEVICE_ID_CT_65545 0x00d8 |
@@ -2477,15 +2479,12 @@ | |||
2477 | #define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21 | 2479 | #define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21 |
2478 | #define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30 | 2480 | #define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30 |
2479 | #define PCI_DEVICE_ID_INTEL_IOAT 0x1a38 | 2481 | #define PCI_DEVICE_ID_INTEL_IOAT 0x1a38 |
2480 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 | ||
2481 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN 0x1c41 | 2482 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN 0x1c41 |
2482 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f | 2483 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f |
2483 | #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 | ||
2484 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_0 0x1d40 | 2484 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_0 0x1d40 |
2485 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_1 0x1d41 | 2485 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_1 0x1d41 |
2486 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MIN 0x2310 | 2486 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MIN 0x2310 |
2487 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MAX 0x231f | 2487 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MAX 0x231f |
2488 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS 0x2330 | ||
2489 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 | 2488 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 |
2490 | #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 | 2489 | #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 |
2491 | #define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 | 2490 | #define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 |
@@ -2696,7 +2695,6 @@ | |||
2696 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 | 2695 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 |
2697 | #define PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MIN 0x3b00 | 2696 | #define PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MIN 0x3b00 |
2698 | #define PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MAX 0x3b1f | 2697 | #define PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MAX 0x3b1f |
2699 | #define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30 | ||
2700 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f | 2698 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f |
2701 | #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 | 2699 | #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 |
2702 | #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 | 2700 | #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 5b7e6b1ba54f..be01380f798a 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -223,7 +223,7 @@ | |||
223 | #define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ | 223 | #define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ |
224 | #define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ | 224 | #define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ |
225 | #define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ | 225 | #define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ |
226 | #define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */ | 226 | #define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxiliary power support mask */ |
227 | #define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ | 227 | #define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ |
228 | #define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ | 228 | #define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ |
229 | #define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ | 229 | #define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ |
@@ -435,7 +435,7 @@ | |||
435 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ | 435 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ |
436 | #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ | 436 | #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ |
437 | #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* L1 Clock Power Management */ | 437 | #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* L1 Clock Power Management */ |
438 | #define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Suprise Down Error Reporting Capable */ | 438 | #define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Surprise Down Error Reporting Capable */ |
439 | #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ | 439 | #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ |
440 | #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ | 440 | #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ |
441 | #define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ | 441 | #define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 3a5c4449fd36..8b97308e65df 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -948,7 +948,7 @@ do { \ | |||
948 | irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) | 948 | irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) |
949 | # endif | 949 | # endif |
950 | # define irqsafe_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ | 950 | # define irqsafe_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ |
951 | __pcpu_double_call_return_int(irqsafe_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2)) | 951 | __pcpu_double_call_return_bool(irqsafe_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2)) |
952 | #endif | 952 | #endif |
953 | 953 | ||
954 | #endif /* __LINUX_PERCPU_H */ | 954 | #endif /* __LINUX_PERCPU_H */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 311b4dc785a1..3412684ce5d5 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Performance events: | 2 | * Performance events: |
3 | * | 3 | * |
4 | * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de> | 4 | * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de> |
5 | * Copyright (C) 2008-2009, Red Hat, Inc., Ingo Molnar | 5 | * Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar |
6 | * Copyright (C) 2008-2009, Red Hat, Inc., Peter Zijlstra | 6 | * Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra |
7 | * | 7 | * |
8 | * Data type definitions, declarations, prototypes. | 8 | * Data type definitions, declarations, prototypes. |
9 | * | 9 | * |
@@ -52,6 +52,8 @@ enum perf_hw_id { | |||
52 | PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, | 52 | PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, |
53 | PERF_COUNT_HW_BRANCH_MISSES = 5, | 53 | PERF_COUNT_HW_BRANCH_MISSES = 5, |
54 | PERF_COUNT_HW_BUS_CYCLES = 6, | 54 | PERF_COUNT_HW_BUS_CYCLES = 6, |
55 | PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, | ||
56 | PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, | ||
55 | 57 | ||
56 | PERF_COUNT_HW_MAX, /* non-ABI */ | 58 | PERF_COUNT_HW_MAX, /* non-ABI */ |
57 | }; | 59 | }; |
@@ -468,9 +470,9 @@ enum perf_callchain_context { | |||
468 | PERF_CONTEXT_MAX = (__u64)-4095, | 470 | PERF_CONTEXT_MAX = (__u64)-4095, |
469 | }; | 471 | }; |
470 | 472 | ||
471 | #define PERF_FLAG_FD_NO_GROUP (1U << 0) | 473 | #define PERF_FLAG_FD_NO_GROUP (1U << 0) |
472 | #define PERF_FLAG_FD_OUTPUT (1U << 1) | 474 | #define PERF_FLAG_FD_OUTPUT (1U << 1) |
473 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ | 475 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ |
474 | 476 | ||
475 | #ifdef __KERNEL__ | 477 | #ifdef __KERNEL__ |
476 | /* | 478 | /* |
@@ -484,9 +486,9 @@ enum perf_callchain_context { | |||
484 | #endif | 486 | #endif |
485 | 487 | ||
486 | struct perf_guest_info_callbacks { | 488 | struct perf_guest_info_callbacks { |
487 | int (*is_in_guest) (void); | 489 | int (*is_in_guest)(void); |
488 | int (*is_user_mode) (void); | 490 | int (*is_user_mode)(void); |
489 | unsigned long (*get_guest_ip) (void); | 491 | unsigned long (*get_guest_ip)(void); |
490 | }; | 492 | }; |
491 | 493 | ||
492 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 494 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
@@ -505,7 +507,7 @@ struct perf_guest_info_callbacks { | |||
505 | #include <linux/ftrace.h> | 507 | #include <linux/ftrace.h> |
506 | #include <linux/cpu.h> | 508 | #include <linux/cpu.h> |
507 | #include <linux/irq_work.h> | 509 | #include <linux/irq_work.h> |
508 | #include <linux/jump_label_ref.h> | 510 | #include <linux/jump_label.h> |
509 | #include <asm/atomic.h> | 511 | #include <asm/atomic.h> |
510 | #include <asm/local.h> | 512 | #include <asm/local.h> |
511 | 513 | ||
@@ -652,19 +654,19 @@ struct pmu { | |||
652 | * Start the transaction, after this ->add() doesn't need to | 654 | * Start the transaction, after this ->add() doesn't need to |
653 | * do schedulability tests. | 655 | * do schedulability tests. |
654 | */ | 656 | */ |
655 | void (*start_txn) (struct pmu *pmu); /* optional */ | 657 | void (*start_txn) (struct pmu *pmu); /* optional */ |
656 | /* | 658 | /* |
657 | * If ->start_txn() disabled the ->add() schedulability test | 659 | * If ->start_txn() disabled the ->add() schedulability test |
658 | * then ->commit_txn() is required to perform one. On success | 660 | * then ->commit_txn() is required to perform one. On success |
659 | * the transaction is closed. On error the transaction is kept | 661 | * the transaction is closed. On error the transaction is kept |
660 | * open until ->cancel_txn() is called. | 662 | * open until ->cancel_txn() is called. |
661 | */ | 663 | */ |
662 | int (*commit_txn) (struct pmu *pmu); /* optional */ | 664 | int (*commit_txn) (struct pmu *pmu); /* optional */ |
663 | /* | 665 | /* |
664 | * Will cancel the transaction, assumes ->del() is called | 666 | * Will cancel the transaction, assumes ->del() is called |
665 | * for each successfull ->add() during the transaction. | 667 | * for each successful ->add() during the transaction. |
666 | */ | 668 | */ |
667 | void (*cancel_txn) (struct pmu *pmu); /* optional */ | 669 | void (*cancel_txn) (struct pmu *pmu); /* optional */ |
668 | }; | 670 | }; |
669 | 671 | ||
670 | /** | 672 | /** |
@@ -712,15 +714,15 @@ typedef void (*perf_overflow_handler_t)(struct perf_event *, int, | |||
712 | struct pt_regs *regs); | 714 | struct pt_regs *regs); |
713 | 715 | ||
714 | enum perf_group_flag { | 716 | enum perf_group_flag { |
715 | PERF_GROUP_SOFTWARE = 0x1, | 717 | PERF_GROUP_SOFTWARE = 0x1, |
716 | }; | 718 | }; |
717 | 719 | ||
718 | #define SWEVENT_HLIST_BITS 8 | 720 | #define SWEVENT_HLIST_BITS 8 |
719 | #define SWEVENT_HLIST_SIZE (1 << SWEVENT_HLIST_BITS) | 721 | #define SWEVENT_HLIST_SIZE (1 << SWEVENT_HLIST_BITS) |
720 | 722 | ||
721 | struct swevent_hlist { | 723 | struct swevent_hlist { |
722 | struct hlist_head heads[SWEVENT_HLIST_SIZE]; | 724 | struct hlist_head heads[SWEVENT_HLIST_SIZE]; |
723 | struct rcu_head rcu_head; | 725 | struct rcu_head rcu_head; |
724 | }; | 726 | }; |
725 | 727 | ||
726 | #define PERF_ATTACH_CONTEXT 0x01 | 728 | #define PERF_ATTACH_CONTEXT 0x01 |
@@ -733,13 +735,13 @@ struct swevent_hlist { | |||
733 | * This is a per-cpu dynamically allocated data structure. | 735 | * This is a per-cpu dynamically allocated data structure. |
734 | */ | 736 | */ |
735 | struct perf_cgroup_info { | 737 | struct perf_cgroup_info { |
736 | u64 time; | 738 | u64 time; |
737 | u64 timestamp; | 739 | u64 timestamp; |
738 | }; | 740 | }; |
739 | 741 | ||
740 | struct perf_cgroup { | 742 | struct perf_cgroup { |
741 | struct cgroup_subsys_state css; | 743 | struct cgroup_subsys_state css; |
742 | struct perf_cgroup_info *info; /* timing info, one per cpu */ | 744 | struct perf_cgroup_info *info; /* timing info, one per cpu */ |
743 | }; | 745 | }; |
744 | #endif | 746 | #endif |
745 | 747 | ||
@@ -923,7 +925,7 @@ struct perf_event_context { | |||
923 | 925 | ||
924 | /* | 926 | /* |
925 | * Number of contexts where an event can trigger: | 927 | * Number of contexts where an event can trigger: |
926 | * task, softirq, hardirq, nmi. | 928 | * task, softirq, hardirq, nmi. |
927 | */ | 929 | */ |
928 | #define PERF_NR_CONTEXTS 4 | 930 | #define PERF_NR_CONTEXTS 4 |
929 | 931 | ||
@@ -1001,8 +1003,7 @@ struct perf_sample_data { | |||
1001 | struct perf_raw_record *raw; | 1003 | struct perf_raw_record *raw; |
1002 | }; | 1004 | }; |
1003 | 1005 | ||
1004 | static inline | 1006 | static inline void perf_sample_data_init(struct perf_sample_data *data, u64 addr) |
1005 | void perf_sample_data_init(struct perf_sample_data *data, u64 addr) | ||
1006 | { | 1007 | { |
1007 | data->addr = addr; | 1008 | data->addr = addr; |
1008 | data->raw = NULL; | 1009 | data->raw = NULL; |
@@ -1034,13 +1035,12 @@ static inline int is_software_event(struct perf_event *event) | |||
1034 | return event->pmu->task_ctx_nr == perf_sw_context; | 1035 | return event->pmu->task_ctx_nr == perf_sw_context; |
1035 | } | 1036 | } |
1036 | 1037 | ||
1037 | extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | 1038 | extern struct jump_label_key perf_swevent_enabled[PERF_COUNT_SW_MAX]; |
1038 | 1039 | ||
1039 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); | 1040 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); |
1040 | 1041 | ||
1041 | #ifndef perf_arch_fetch_caller_regs | 1042 | #ifndef perf_arch_fetch_caller_regs |
1042 | static inline void | 1043 | static inline void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip) { } |
1043 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip) { } | ||
1044 | #endif | 1044 | #endif |
1045 | 1045 | ||
1046 | /* | 1046 | /* |
@@ -1063,30 +1063,28 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | |||
1063 | { | 1063 | { |
1064 | struct pt_regs hot_regs; | 1064 | struct pt_regs hot_regs; |
1065 | 1065 | ||
1066 | JUMP_LABEL(&perf_swevent_enabled[event_id], have_event); | 1066 | if (static_branch(&perf_swevent_enabled[event_id])) { |
1067 | return; | 1067 | if (!regs) { |
1068 | 1068 | perf_fetch_caller_regs(&hot_regs); | |
1069 | have_event: | 1069 | regs = &hot_regs; |
1070 | if (!regs) { | 1070 | } |
1071 | perf_fetch_caller_regs(&hot_regs); | 1071 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
1072 | regs = &hot_regs; | ||
1073 | } | 1072 | } |
1074 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
1075 | } | 1073 | } |
1076 | 1074 | ||
1077 | extern atomic_t perf_sched_events; | 1075 | extern struct jump_label_key perf_sched_events; |
1078 | 1076 | ||
1079 | static inline void perf_event_task_sched_in(struct task_struct *task) | 1077 | static inline void perf_event_task_sched_in(struct task_struct *task) |
1080 | { | 1078 | { |
1081 | COND_STMT(&perf_sched_events, __perf_event_task_sched_in(task)); | 1079 | if (static_branch(&perf_sched_events)) |
1080 | __perf_event_task_sched_in(task); | ||
1082 | } | 1081 | } |
1083 | 1082 | ||
1084 | static inline | 1083 | static inline void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) |
1085 | void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) | ||
1086 | { | 1084 | { |
1087 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); | 1085 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); |
1088 | 1086 | ||
1089 | COND_STMT(&perf_sched_events, __perf_event_task_sched_out(task, next)); | 1087 | __perf_event_task_sched_out(task, next); |
1090 | } | 1088 | } |
1091 | 1089 | ||
1092 | extern void perf_event_mmap(struct vm_area_struct *vma); | 1090 | extern void perf_event_mmap(struct vm_area_struct *vma); |
@@ -1100,14 +1098,10 @@ extern void perf_event_fork(struct task_struct *tsk); | |||
1100 | /* Callchains */ | 1098 | /* Callchains */ |
1101 | DECLARE_PER_CPU(struct perf_callchain_entry, perf_callchain_entry); | 1099 | DECLARE_PER_CPU(struct perf_callchain_entry, perf_callchain_entry); |
1102 | 1100 | ||
1103 | extern void perf_callchain_user(struct perf_callchain_entry *entry, | 1101 | extern void perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs); |
1104 | struct pt_regs *regs); | 1102 | extern void perf_callchain_kernel(struct perf_callchain_entry *entry, struct pt_regs *regs); |
1105 | extern void perf_callchain_kernel(struct perf_callchain_entry *entry, | ||
1106 | struct pt_regs *regs); | ||
1107 | |||
1108 | 1103 | ||
1109 | static inline void | 1104 | static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64 ip) |
1110 | perf_callchain_store(struct perf_callchain_entry *entry, u64 ip) | ||
1111 | { | 1105 | { |
1112 | if (entry->nr < PERF_MAX_STACK_DEPTH) | 1106 | if (entry->nr < PERF_MAX_STACK_DEPTH) |
1113 | entry->ip[entry->nr++] = ip; | 1107 | entry->ip[entry->nr++] = ip; |
@@ -1143,9 +1137,9 @@ extern void perf_tp_event(u64 addr, u64 count, void *record, | |||
1143 | extern void perf_bp_event(struct perf_event *event, void *data); | 1137 | extern void perf_bp_event(struct perf_event *event, void *data); |
1144 | 1138 | ||
1145 | #ifndef perf_misc_flags | 1139 | #ifndef perf_misc_flags |
1146 | #define perf_misc_flags(regs) (user_mode(regs) ? PERF_RECORD_MISC_USER : \ | 1140 | # define perf_misc_flags(regs) \ |
1147 | PERF_RECORD_MISC_KERNEL) | 1141 | (user_mode(regs) ? PERF_RECORD_MISC_USER : PERF_RECORD_MISC_KERNEL) |
1148 | #define perf_instruction_pointer(regs) instruction_pointer(regs) | 1142 | # define perf_instruction_pointer(regs) instruction_pointer(regs) |
1149 | #endif | 1143 | #endif |
1150 | 1144 | ||
1151 | extern int perf_output_begin(struct perf_output_handle *handle, | 1145 | extern int perf_output_begin(struct perf_output_handle *handle, |
@@ -1180,9 +1174,9 @@ static inline void | |||
1180 | perf_bp_event(struct perf_event *event, void *data) { } | 1174 | perf_bp_event(struct perf_event *event, void *data) { } |
1181 | 1175 | ||
1182 | static inline int perf_register_guest_info_callbacks | 1176 | static inline int perf_register_guest_info_callbacks |
1183 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | 1177 | (struct perf_guest_info_callbacks *callbacks) { return 0; } |
1184 | static inline int perf_unregister_guest_info_callbacks | 1178 | static inline int perf_unregister_guest_info_callbacks |
1185 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | 1179 | (struct perf_guest_info_callbacks *callbacks) { return 0; } |
1186 | 1180 | ||
1187 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 1181 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
1188 | static inline void perf_event_comm(struct task_struct *tsk) { } | 1182 | static inline void perf_event_comm(struct task_struct *tsk) { } |
@@ -1195,23 +1189,22 @@ static inline void perf_event_disable(struct perf_event *event) { } | |||
1195 | static inline void perf_event_task_tick(void) { } | 1189 | static inline void perf_event_task_tick(void) { } |
1196 | #endif | 1190 | #endif |
1197 | 1191 | ||
1198 | #define perf_output_put(handle, x) \ | 1192 | #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x)) |
1199 | perf_output_copy((handle), &(x), sizeof(x)) | ||
1200 | 1193 | ||
1201 | /* | 1194 | /* |
1202 | * This has to have a higher priority than migration_notifier in sched.c. | 1195 | * This has to have a higher priority than migration_notifier in sched.c. |
1203 | */ | 1196 | */ |
1204 | #define perf_cpu_notifier(fn) \ | 1197 | #define perf_cpu_notifier(fn) \ |
1205 | do { \ | 1198 | do { \ |
1206 | static struct notifier_block fn##_nb __cpuinitdata = \ | 1199 | static struct notifier_block fn##_nb __cpuinitdata = \ |
1207 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ | 1200 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ |
1208 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | 1201 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ |
1209 | (void *)(unsigned long)smp_processor_id()); \ | 1202 | (void *)(unsigned long)smp_processor_id()); \ |
1210 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | 1203 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ |
1211 | (void *)(unsigned long)smp_processor_id()); \ | 1204 | (void *)(unsigned long)smp_processor_id()); \ |
1212 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ | 1205 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ |
1213 | (void *)(unsigned long)smp_processor_id()); \ | 1206 | (void *)(unsigned long)smp_processor_id()); \ |
1214 | register_cpu_notifier(&fn##_nb); \ | 1207 | register_cpu_notifier(&fn##_nb); \ |
1215 | } while (0) | 1208 | } while (0) |
1216 | 1209 | ||
1217 | #endif /* __KERNEL__ */ | 1210 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/pid.h b/include/linux/pid.h index efceda0a51b1..cdced84261d7 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -21,7 +21,7 @@ enum pid_type | |||
21 | * quickly from the numeric pid value. The attached processes may be | 21 | * quickly from the numeric pid value. The attached processes may be |
22 | * quickly accessed by following pointers from struct pid. | 22 | * quickly accessed by following pointers from struct pid. |
23 | * | 23 | * |
24 | * Storing pid_t values in the kernel and refering to them later has a | 24 | * Storing pid_t values in the kernel and referring to them later has a |
25 | * problem. The process originally with that pid may have exited and the | 25 | * problem. The process originally with that pid may have exited and the |
26 | * pid allocator wrapped, and another process could have come along | 26 | * pid allocator wrapped, and another process could have come along |
27 | * and been assigned that pid. | 27 | * and been assigned that pid. |
@@ -117,7 +117,7 @@ extern struct pid *find_vpid(int nr); | |||
117 | */ | 117 | */ |
118 | extern struct pid *find_get_pid(int nr); | 118 | extern struct pid *find_get_pid(int nr); |
119 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); | 119 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); |
120 | int next_pidmap(struct pid_namespace *pid_ns, int last); | 120 | int next_pidmap(struct pid_namespace *pid_ns, unsigned int last); |
121 | 121 | ||
122 | extern struct pid *alloc_pid(struct pid_namespace *ns); | 122 | extern struct pid *alloc_pid(struct pid_namespace *ns); |
123 | extern void free_pid(struct pid *pid); | 123 | extern void free_pid(struct pid *pid); |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index b1032a3fafdc..c5336705921f 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -223,7 +223,7 @@ struct tc_gred_qopt { | |||
223 | __u32 limit; /* HARD maximal queue length (bytes) */ | 223 | __u32 limit; /* HARD maximal queue length (bytes) */ |
224 | __u32 qth_min; /* Min average length threshold (bytes) */ | 224 | __u32 qth_min; /* Min average length threshold (bytes) */ |
225 | __u32 qth_max; /* Max average length threshold (bytes) */ | 225 | __u32 qth_max; /* Max average length threshold (bytes) */ |
226 | __u32 DP; /* upto 2^32 DPs */ | 226 | __u32 DP; /* up to 2^32 DPs */ |
227 | __u32 backlog; | 227 | __u32 backlog; |
228 | __u32 qave; | 228 | __u32 qave; |
229 | __u32 forced; | 229 | __u32 forced; |
@@ -588,4 +588,19 @@ struct tc_sfb_xstats { | |||
588 | 588 | ||
589 | #define SFB_MAX_PROB 0xFFFF | 589 | #define SFB_MAX_PROB 0xFFFF |
590 | 590 | ||
591 | /* QFQ */ | ||
592 | enum { | ||
593 | TCA_QFQ_UNSPEC, | ||
594 | TCA_QFQ_WEIGHT, | ||
595 | TCA_QFQ_LMAX, | ||
596 | __TCA_QFQ_MAX | ||
597 | }; | ||
598 | |||
599 | #define TCA_QFQ_MAX (__TCA_QFQ_MAX - 1) | ||
600 | |||
601 | struct tc_qfq_stats { | ||
602 | __u32 weight; | ||
603 | __u32 lmax; | ||
604 | }; | ||
605 | |||
591 | #endif | 606 | #endif |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index d96db9825708..ede1a80e3358 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/mod_devicetable.h> | 15 | #include <linux/mod_devicetable.h> |
16 | 16 | ||
17 | struct mfd_cell; | ||
18 | |||
17 | struct platform_device { | 19 | struct platform_device { |
18 | const char * name; | 20 | const char * name; |
19 | int id; | 21 | int id; |
@@ -23,6 +25,9 @@ struct platform_device { | |||
23 | 25 | ||
24 | const struct platform_device_id *id_entry; | 26 | const struct platform_device_id *id_entry; |
25 | 27 | ||
28 | /* MFD cell pointer */ | ||
29 | struct mfd_cell *mfd_cell; | ||
30 | |||
26 | /* arch specific additions */ | 31 | /* arch specific additions */ |
27 | struct pdev_archdata archdata; | 32 | struct pdev_archdata archdata; |
28 | }; | 33 | }; |
@@ -145,9 +150,6 @@ extern struct platform_device *platform_create_bundle(struct platform_driver *dr | |||
145 | struct resource *res, unsigned int n_res, | 150 | struct resource *res, unsigned int n_res, |
146 | const void *data, size_t size); | 151 | const void *data, size_t size); |
147 | 152 | ||
148 | extern const struct dev_pm_ops * platform_bus_get_pm_ops(void); | ||
149 | extern void platform_bus_set_pm_ops(const struct dev_pm_ops *pm); | ||
150 | |||
151 | /* early platform driver interface */ | 153 | /* early platform driver interface */ |
152 | struct early_platform_driver { | 154 | struct early_platform_driver { |
153 | const char *class_str; | 155 | const char *class_str; |
@@ -200,4 +202,64 @@ static inline char *early_platform_driver_setup_func(void) \ | |||
200 | } | 202 | } |
201 | #endif /* MODULE */ | 203 | #endif /* MODULE */ |
202 | 204 | ||
205 | #ifdef CONFIG_PM_SLEEP | ||
206 | extern int platform_pm_prepare(struct device *dev); | ||
207 | extern void platform_pm_complete(struct device *dev); | ||
208 | #else | ||
209 | #define platform_pm_prepare NULL | ||
210 | #define platform_pm_complete NULL | ||
211 | #endif | ||
212 | |||
213 | #ifdef CONFIG_SUSPEND | ||
214 | extern int platform_pm_suspend(struct device *dev); | ||
215 | extern int platform_pm_suspend_noirq(struct device *dev); | ||
216 | extern int platform_pm_resume(struct device *dev); | ||
217 | extern int platform_pm_resume_noirq(struct device *dev); | ||
218 | #else | ||
219 | #define platform_pm_suspend NULL | ||
220 | #define platform_pm_resume NULL | ||
221 | #define platform_pm_suspend_noirq NULL | ||
222 | #define platform_pm_resume_noirq NULL | ||
223 | #endif | ||
224 | |||
225 | #ifdef CONFIG_HIBERNATE_CALLBACKS | ||
226 | extern int platform_pm_freeze(struct device *dev); | ||
227 | extern int platform_pm_freeze_noirq(struct device *dev); | ||
228 | extern int platform_pm_thaw(struct device *dev); | ||
229 | extern int platform_pm_thaw_noirq(struct device *dev); | ||
230 | extern int platform_pm_poweroff(struct device *dev); | ||
231 | extern int platform_pm_poweroff_noirq(struct device *dev); | ||
232 | extern int platform_pm_restore(struct device *dev); | ||
233 | extern int platform_pm_restore_noirq(struct device *dev); | ||
234 | #else | ||
235 | #define platform_pm_freeze NULL | ||
236 | #define platform_pm_thaw NULL | ||
237 | #define platform_pm_poweroff NULL | ||
238 | #define platform_pm_restore NULL | ||
239 | #define platform_pm_freeze_noirq NULL | ||
240 | #define platform_pm_thaw_noirq NULL | ||
241 | #define platform_pm_poweroff_noirq NULL | ||
242 | #define platform_pm_restore_noirq NULL | ||
243 | #endif | ||
244 | |||
245 | #ifdef CONFIG_PM_SLEEP | ||
246 | #define USE_PLATFORM_PM_SLEEP_OPS \ | ||
247 | .prepare = platform_pm_prepare, \ | ||
248 | .complete = platform_pm_complete, \ | ||
249 | .suspend = platform_pm_suspend, \ | ||
250 | .resume = platform_pm_resume, \ | ||
251 | .freeze = platform_pm_freeze, \ | ||
252 | .thaw = platform_pm_thaw, \ | ||
253 | .poweroff = platform_pm_poweroff, \ | ||
254 | .restore = platform_pm_restore, \ | ||
255 | .suspend_noirq = platform_pm_suspend_noirq, \ | ||
256 | .resume_noirq = platform_pm_resume_noirq, \ | ||
257 | .freeze_noirq = platform_pm_freeze_noirq, \ | ||
258 | .thaw_noirq = platform_pm_thaw_noirq, \ | ||
259 | .poweroff_noirq = platform_pm_poweroff_noirq, \ | ||
260 | .restore_noirq = platform_pm_restore_noirq, | ||
261 | #else | ||
262 | #define USE_PLATFORM_PM_SLEEP_OPS | ||
263 | #endif | ||
264 | |||
203 | #endif /* _PLATFORM_DEVICE_H_ */ | 265 | #endif /* _PLATFORM_DEVICE_H_ */ |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 512e09177e57..3160648ccdda 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -460,6 +460,7 @@ struct dev_pm_info { | |||
460 | unsigned long active_jiffies; | 460 | unsigned long active_jiffies; |
461 | unsigned long suspended_jiffies; | 461 | unsigned long suspended_jiffies; |
462 | unsigned long accounting_timestamp; | 462 | unsigned long accounting_timestamp; |
463 | void *subsys_data; /* Owned by the subsystem. */ | ||
463 | #endif | 464 | #endif |
464 | }; | 465 | }; |
465 | 466 | ||
@@ -529,21 +530,17 @@ struct dev_power_domain { | |||
529 | */ | 530 | */ |
530 | 531 | ||
531 | #ifdef CONFIG_PM_SLEEP | 532 | #ifdef CONFIG_PM_SLEEP |
532 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
533 | extern int sysdev_suspend(pm_message_t state); | ||
534 | extern int sysdev_resume(void); | ||
535 | #else | ||
536 | static inline int sysdev_suspend(pm_message_t state) { return 0; } | ||
537 | static inline int sysdev_resume(void) { return 0; } | ||
538 | #endif | ||
539 | |||
540 | extern void device_pm_lock(void); | 533 | extern void device_pm_lock(void); |
541 | extern void dpm_resume_noirq(pm_message_t state); | 534 | extern void dpm_resume_noirq(pm_message_t state); |
542 | extern void dpm_resume_end(pm_message_t state); | 535 | extern void dpm_resume_end(pm_message_t state); |
536 | extern void dpm_resume(pm_message_t state); | ||
537 | extern void dpm_complete(pm_message_t state); | ||
543 | 538 | ||
544 | extern void device_pm_unlock(void); | 539 | extern void device_pm_unlock(void); |
545 | extern int dpm_suspend_noirq(pm_message_t state); | 540 | extern int dpm_suspend_noirq(pm_message_t state); |
546 | extern int dpm_suspend_start(pm_message_t state); | 541 | extern int dpm_suspend_start(pm_message_t state); |
542 | extern int dpm_suspend(pm_message_t state); | ||
543 | extern int dpm_prepare(pm_message_t state); | ||
547 | 544 | ||
548 | extern void __suspend_report_result(const char *function, void *fn, int ret); | 545 | extern void __suspend_report_result(const char *function, void *fn, int ret); |
549 | 546 | ||
@@ -553,6 +550,16 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
553 | } while (0) | 550 | } while (0) |
554 | 551 | ||
555 | extern int device_pm_wait_for_dev(struct device *sub, struct device *dev); | 552 | extern int device_pm_wait_for_dev(struct device *sub, struct device *dev); |
553 | |||
554 | extern int pm_generic_prepare(struct device *dev); | ||
555 | extern int pm_generic_suspend(struct device *dev); | ||
556 | extern int pm_generic_resume(struct device *dev); | ||
557 | extern int pm_generic_freeze(struct device *dev); | ||
558 | extern int pm_generic_thaw(struct device *dev); | ||
559 | extern int pm_generic_restore(struct device *dev); | ||
560 | extern int pm_generic_poweroff(struct device *dev); | ||
561 | extern void pm_generic_complete(struct device *dev); | ||
562 | |||
556 | #else /* !CONFIG_PM_SLEEP */ | 563 | #else /* !CONFIG_PM_SLEEP */ |
557 | 564 | ||
558 | #define device_pm_lock() do {} while (0) | 565 | #define device_pm_lock() do {} while (0) |
@@ -569,6 +576,15 @@ static inline int device_pm_wait_for_dev(struct device *a, struct device *b) | |||
569 | { | 576 | { |
570 | return 0; | 577 | return 0; |
571 | } | 578 | } |
579 | |||
580 | #define pm_generic_prepare NULL | ||
581 | #define pm_generic_suspend NULL | ||
582 | #define pm_generic_resume NULL | ||
583 | #define pm_generic_freeze NULL | ||
584 | #define pm_generic_thaw NULL | ||
585 | #define pm_generic_restore NULL | ||
586 | #define pm_generic_poweroff NULL | ||
587 | #define pm_generic_complete NULL | ||
572 | #endif /* !CONFIG_PM_SLEEP */ | 588 | #endif /* !CONFIG_PM_SLEEP */ |
573 | 589 | ||
574 | /* How to reorder dpm_list after device_move() */ | 590 | /* How to reorder dpm_list after device_move() */ |
@@ -579,11 +595,4 @@ enum dpm_order { | |||
579 | DPM_ORDER_DEV_LAST, | 595 | DPM_ORDER_DEV_LAST, |
580 | }; | 596 | }; |
581 | 597 | ||
582 | extern int pm_generic_suspend(struct device *dev); | ||
583 | extern int pm_generic_resume(struct device *dev); | ||
584 | extern int pm_generic_freeze(struct device *dev); | ||
585 | extern int pm_generic_thaw(struct device *dev); | ||
586 | extern int pm_generic_restore(struct device *dev); | ||
587 | extern int pm_generic_poweroff(struct device *dev); | ||
588 | |||
589 | #endif /* _LINUX_PM_H */ | 598 | #endif /* _LINUX_PM_H */ |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 8de9aa6e7def..878cf84baeb1 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -245,4 +245,46 @@ static inline void pm_runtime_dont_use_autosuspend(struct device *dev) | |||
245 | __pm_runtime_use_autosuspend(dev, false); | 245 | __pm_runtime_use_autosuspend(dev, false); |
246 | } | 246 | } |
247 | 247 | ||
248 | struct pm_clk_notifier_block { | ||
249 | struct notifier_block nb; | ||
250 | struct dev_power_domain *pwr_domain; | ||
251 | char *con_ids[]; | ||
252 | }; | ||
253 | |||
254 | #ifdef CONFIG_PM_RUNTIME_CLK | ||
255 | extern int pm_runtime_clk_init(struct device *dev); | ||
256 | extern void pm_runtime_clk_destroy(struct device *dev); | ||
257 | extern int pm_runtime_clk_add(struct device *dev, const char *con_id); | ||
258 | extern void pm_runtime_clk_remove(struct device *dev, const char *con_id); | ||
259 | extern int pm_runtime_clk_suspend(struct device *dev); | ||
260 | extern int pm_runtime_clk_resume(struct device *dev); | ||
261 | #else | ||
262 | static inline int pm_runtime_clk_init(struct device *dev) | ||
263 | { | ||
264 | return -EINVAL; | ||
265 | } | ||
266 | static inline void pm_runtime_clk_destroy(struct device *dev) | ||
267 | { | ||
268 | } | ||
269 | static inline int pm_runtime_clk_add(struct device *dev, const char *con_id) | ||
270 | { | ||
271 | return -EINVAL; | ||
272 | } | ||
273 | static inline void pm_runtime_clk_remove(struct device *dev, const char *con_id) | ||
274 | { | ||
275 | } | ||
276 | #define pm_runtime_clock_suspend NULL | ||
277 | #define pm_runtime_clock_resume NULL | ||
278 | #endif | ||
279 | |||
280 | #ifdef CONFIG_HAVE_CLK | ||
281 | extern void pm_runtime_clk_add_notifier(struct bus_type *bus, | ||
282 | struct pm_clk_notifier_block *clknb); | ||
283 | #else | ||
284 | static inline void pm_runtime_clk_add_notifier(struct bus_type *bus, | ||
285 | struct pm_clk_notifier_block *clknb) | ||
286 | { | ||
287 | } | ||
288 | #endif | ||
289 | |||
248 | #endif | 290 | #endif |
diff --git a/include/linux/poll.h b/include/linux/poll.h index 1a2ccd6f3823..cf40010ce0cd 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
@@ -82,7 +82,7 @@ static inline int poll_schedule(struct poll_wqueues *pwq, int state) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | /* | 84 | /* |
85 | * Scaleable version of the fd_set. | 85 | * Scalable version of the fd_set. |
86 | */ | 86 | */ |
87 | 87 | ||
88 | typedef struct { | 88 | typedef struct { |
diff --git a/include/linux/posix-clock.h b/include/linux/posix-clock.h index 369e19d3750b..7f1183dcd119 100644 --- a/include/linux/posix-clock.h +++ b/include/linux/posix-clock.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/poll.h> | 25 | #include <linux/poll.h> |
26 | #include <linux/posix-timers.h> | 26 | #include <linux/posix-timers.h> |
27 | #include <linux/rwsem.h> | ||
27 | 28 | ||
28 | struct posix_clock; | 29 | struct posix_clock; |
29 | 30 | ||
@@ -104,7 +105,7 @@ struct posix_clock_operations { | |||
104 | * @ops: Functional interface to the clock | 105 | * @ops: Functional interface to the clock |
105 | * @cdev: Character device instance for this clock | 106 | * @cdev: Character device instance for this clock |
106 | * @kref: Reference count. | 107 | * @kref: Reference count. |
107 | * @mutex: Protects the 'zombie' field from concurrent access. | 108 | * @rwsem: Protects the 'zombie' field from concurrent access. |
108 | * @zombie: If 'zombie' is true, then the hardware has disappeared. | 109 | * @zombie: If 'zombie' is true, then the hardware has disappeared. |
109 | * @release: A function to free the structure when the reference count reaches | 110 | * @release: A function to free the structure when the reference count reaches |
110 | * zero. May be NULL if structure is statically allocated. | 111 | * zero. May be NULL if structure is statically allocated. |
@@ -117,7 +118,7 @@ struct posix_clock { | |||
117 | struct posix_clock_operations ops; | 118 | struct posix_clock_operations ops; |
118 | struct cdev cdev; | 119 | struct cdev cdev; |
119 | struct kref kref; | 120 | struct kref kref; |
120 | struct mutex mutex; | 121 | struct rw_semaphore rwsem; |
121 | bool zombie; | 122 | bool zombie; |
122 | void (*release)(struct posix_clock *clk); | 123 | void (*release)(struct posix_clock *clk); |
123 | }; | 124 | }; |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index d51243ae0726..808227d40a64 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/timex.h> | 7 | #include <linux/timex.h> |
8 | #include <linux/alarmtimer.h> | ||
8 | 9 | ||
9 | union cpu_time_count { | 10 | union cpu_time_count { |
10 | cputime_t cpu; | 11 | cputime_t cpu; |
@@ -80,6 +81,7 @@ struct k_itimer { | |||
80 | unsigned long incr; | 81 | unsigned long incr; |
81 | unsigned long expires; | 82 | unsigned long expires; |
82 | } mmtimer; | 83 | } mmtimer; |
84 | struct alarm alarmtimer; | ||
83 | } it; | 85 | } it; |
84 | }; | 86 | }; |
85 | 87 | ||
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h index af7c36a5a521..a3bfbdf63d32 100644 --- a/include/linux/prefetch.h +++ b/include/linux/prefetch.h | |||
@@ -29,7 +29,7 @@ | |||
29 | prefetchw(x) - prefetches the cacheline at "x" for write | 29 | prefetchw(x) - prefetches the cacheline at "x" for write |
30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking | 30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking |
31 | 31 | ||
32 | there is also PREFETCH_STRIDE which is the architecure-prefered | 32 | there is also PREFETCH_STRIDE which is the architecure-preferred |
33 | "lookahead" size for prefetching streamed operations. | 33 | "lookahead" size for prefetching streamed operations. |
34 | 34 | ||
35 | */ | 35 | */ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 838c1149251a..eaf4350c0f90 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -208,6 +208,8 @@ static inline struct proc_dir_entry *proc_symlink(const char *name, | |||
208 | struct proc_dir_entry *parent,const char *dest) {return NULL;} | 208 | struct proc_dir_entry *parent,const char *dest) {return NULL;} |
209 | static inline struct proc_dir_entry *proc_mkdir(const char *name, | 209 | static inline struct proc_dir_entry *proc_mkdir(const char *name, |
210 | struct proc_dir_entry *parent) {return NULL;} | 210 | struct proc_dir_entry *parent) {return NULL;} |
211 | static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, | ||
212 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } | ||
211 | 213 | ||
212 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | 214 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, |
213 | mode_t mode, struct proc_dir_entry *base, | 215 | mode_t mode, struct proc_dir_entry *base, |
diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 41977737bb7d..2455ef2683f0 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h | |||
@@ -35,7 +35,9 @@ struct pstore_info { | |||
35 | struct mutex buf_mutex; /* serialize access to 'buf' */ | 35 | struct mutex buf_mutex; /* serialize access to 'buf' */ |
36 | char *buf; | 36 | char *buf; |
37 | size_t bufsize; | 37 | size_t bufsize; |
38 | size_t (*read)(u64 *id, enum pstore_type_id *type, | 38 | int (*open)(struct pstore_info *psi); |
39 | int (*close)(struct pstore_info *psi); | ||
40 | ssize_t (*read)(u64 *id, enum pstore_type_id *type, | ||
39 | struct timespec *time); | 41 | struct timespec *time); |
40 | u64 (*write)(enum pstore_type_id type, size_t size); | 42 | u64 (*write)(enum pstore_type_id type, size_t size); |
41 | int (*erase)(u64 id); | 43 | int (*erase)(u64 id); |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index a1147e5dd245..9178d5cc0b01 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -189,6 +189,10 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace) | |||
189 | child->ptrace = current->ptrace; | 189 | child->ptrace = current->ptrace; |
190 | __ptrace_link(child, current->parent); | 190 | __ptrace_link(child, current->parent); |
191 | } | 191 | } |
192 | |||
193 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
194 | atomic_set(&child->ptrace_bp_refcnt, 1); | ||
195 | #endif | ||
192 | } | 196 | } |
193 | 197 | ||
194 | /** | 198 | /** |
@@ -350,6 +354,13 @@ extern int task_current_syscall(struct task_struct *target, long *callno, | |||
350 | unsigned long args[6], unsigned int maxargs, | 354 | unsigned long args[6], unsigned int maxargs, |
351 | unsigned long *sp, unsigned long *pc); | 355 | unsigned long *sp, unsigned long *pc); |
352 | 356 | ||
353 | #endif | 357 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
358 | extern int ptrace_get_breakpoints(struct task_struct *tsk); | ||
359 | extern void ptrace_put_breakpoints(struct task_struct *tsk); | ||
360 | #else | ||
361 | static inline void ptrace_put_breakpoints(struct task_struct *tsk) { } | ||
362 | #endif /* CONFIG_HAVE_HW_BREAKPOINT */ | ||
363 | |||
364 | #endif /* __KERNEL */ | ||
354 | 365 | ||
355 | #endif | 366 | #endif |
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index 2f691e4e6222..44835fb39793 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h | |||
@@ -122,7 +122,7 @@ | |||
122 | #define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */ | 122 | #define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */ |
123 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ | 123 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ |
124 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ | 124 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ |
125 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */ | 125 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interrupt Enable */ |
126 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ | 126 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ |
127 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ | 127 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ |
128 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ | 128 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index ffa2efbbe382..75cbf4f62fe8 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -251,7 +251,7 @@ struct mdp_superblock_1 { | |||
251 | __le64 utime; /* 40 bits second, 24 btes microseconds */ | 251 | __le64 utime; /* 40 bits second, 24 btes microseconds */ |
252 | __le64 events; /* incremented when superblock updated */ | 252 | __le64 events; /* incremented when superblock updated */ |
253 | __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ | 253 | __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ |
254 | __le32 sb_csum; /* checksum upto devs[max_dev] */ | 254 | __le32 sb_csum; /* checksum up to devs[max_dev] */ |
255 | __le32 max_dev; /* size of devs[] array to consider */ | 255 | __le32 max_dev; /* size of devs[] array to consider */ |
256 | __u8 pad3[64-32]; /* set to 0 when writing */ | 256 | __u8 pad3[64-32]; /* set to 0 when writing */ |
257 | 257 | ||
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 7066acb2c530..033b507b33b1 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
@@ -136,6 +136,14 @@ static inline void rb_set_color(struct rb_node *rb, int color) | |||
136 | #define RB_EMPTY_NODE(node) (rb_parent(node) == node) | 136 | #define RB_EMPTY_NODE(node) (rb_parent(node) == node) |
137 | #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) | 137 | #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) |
138 | 138 | ||
139 | static inline void rb_init_node(struct rb_node *rb) | ||
140 | { | ||
141 | rb->rb_parent_color = 0; | ||
142 | rb->rb_right = NULL; | ||
143 | rb->rb_left = NULL; | ||
144 | RB_CLEAR_NODE(rb); | ||
145 | } | ||
146 | |||
139 | extern void rb_insert_color(struct rb_node *, struct rb_root *); | 147 | extern void rb_insert_color(struct rb_node *, struct rb_root *); |
140 | extern void rb_erase(struct rb_node *, struct rb_root *); | 148 | extern void rb_erase(struct rb_node *, struct rb_root *); |
141 | 149 | ||
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 2dea94fc4402..e3beb315517a 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
@@ -253,7 +253,7 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
253 | */ | 253 | */ |
254 | #define list_for_each_entry_rcu(pos, head, member) \ | 254 | #define list_for_each_entry_rcu(pos, head, member) \ |
255 | for (pos = list_entry_rcu((head)->next, typeof(*pos), member); \ | 255 | for (pos = list_entry_rcu((head)->next, typeof(*pos), member); \ |
256 | prefetch(pos->member.next), &pos->member != (head); \ | 256 | &pos->member != (head); \ |
257 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | 257 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) |
258 | 258 | ||
259 | 259 | ||
@@ -270,7 +270,7 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
270 | */ | 270 | */ |
271 | #define list_for_each_continue_rcu(pos, head) \ | 271 | #define list_for_each_continue_rcu(pos, head) \ |
272 | for ((pos) = rcu_dereference_raw(list_next_rcu(pos)); \ | 272 | for ((pos) = rcu_dereference_raw(list_next_rcu(pos)); \ |
273 | prefetch((pos)->next), (pos) != (head); \ | 273 | (pos) != (head); \ |
274 | (pos) = rcu_dereference_raw(list_next_rcu(pos))) | 274 | (pos) = rcu_dereference_raw(list_next_rcu(pos))) |
275 | 275 | ||
276 | /** | 276 | /** |
@@ -284,7 +284,7 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
284 | */ | 284 | */ |
285 | #define list_for_each_entry_continue_rcu(pos, head, member) \ | 285 | #define list_for_each_entry_continue_rcu(pos, head, member) \ |
286 | for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \ | 286 | for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \ |
287 | prefetch(pos->member.next), &pos->member != (head); \ | 287 | &pos->member != (head); \ |
288 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | 288 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) |
289 | 289 | ||
290 | /** | 290 | /** |
@@ -427,7 +427,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
427 | 427 | ||
428 | #define __hlist_for_each_rcu(pos, head) \ | 428 | #define __hlist_for_each_rcu(pos, head) \ |
429 | for (pos = rcu_dereference(hlist_first_rcu(head)); \ | 429 | for (pos = rcu_dereference(hlist_first_rcu(head)); \ |
430 | pos && ({ prefetch(pos->next); 1; }); \ | 430 | pos; \ |
431 | pos = rcu_dereference(hlist_next_rcu(pos))) | 431 | pos = rcu_dereference(hlist_next_rcu(pos))) |
432 | 432 | ||
433 | /** | 433 | /** |
@@ -443,7 +443,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
443 | */ | 443 | */ |
444 | #define hlist_for_each_entry_rcu(tpos, pos, head, member) \ | 444 | #define hlist_for_each_entry_rcu(tpos, pos, head, member) \ |
445 | for (pos = rcu_dereference_raw(hlist_first_rcu(head)); \ | 445 | for (pos = rcu_dereference_raw(hlist_first_rcu(head)); \ |
446 | pos && ({ prefetch(pos->next); 1; }) && \ | 446 | pos && \ |
447 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 447 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
448 | pos = rcu_dereference_raw(hlist_next_rcu(pos))) | 448 | pos = rcu_dereference_raw(hlist_next_rcu(pos))) |
449 | 449 | ||
@@ -460,7 +460,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
460 | */ | 460 | */ |
461 | #define hlist_for_each_entry_rcu_bh(tpos, pos, head, member) \ | 461 | #define hlist_for_each_entry_rcu_bh(tpos, pos, head, member) \ |
462 | for (pos = rcu_dereference_bh((head)->first); \ | 462 | for (pos = rcu_dereference_bh((head)->first); \ |
463 | pos && ({ prefetch(pos->next); 1; }) && \ | 463 | pos && \ |
464 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 464 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
465 | pos = rcu_dereference_bh(pos->next)) | 465 | pos = rcu_dereference_bh(pos->next)) |
466 | 466 | ||
@@ -472,7 +472,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
472 | */ | 472 | */ |
473 | #define hlist_for_each_entry_continue_rcu(tpos, pos, member) \ | 473 | #define hlist_for_each_entry_continue_rcu(tpos, pos, member) \ |
474 | for (pos = rcu_dereference((pos)->next); \ | 474 | for (pos = rcu_dereference((pos)->next); \ |
475 | pos && ({ prefetch(pos->next); 1; }) && \ | 475 | pos && \ |
476 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 476 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
477 | pos = rcu_dereference(pos->next)) | 477 | pos = rcu_dereference(pos->next)) |
478 | 478 | ||
@@ -484,7 +484,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
484 | */ | 484 | */ |
485 | #define hlist_for_each_entry_continue_rcu_bh(tpos, pos, member) \ | 485 | #define hlist_for_each_entry_continue_rcu_bh(tpos, pos, member) \ |
486 | for (pos = rcu_dereference_bh((pos)->next); \ | 486 | for (pos = rcu_dereference_bh((pos)->next); \ |
487 | pos && ({ prefetch(pos->next); 1; }) && \ | 487 | pos && \ |
488 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 488 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
489 | pos = rcu_dereference_bh(pos->next)) | 489 | pos = rcu_dereference_bh(pos->next)) |
490 | 490 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index af5614856285..99f9aa7c2804 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -47,6 +47,18 @@ | |||
47 | extern int rcutorture_runnable; /* for sysctl */ | 47 | extern int rcutorture_runnable; /* for sysctl */ |
48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
49 | 49 | ||
50 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | ||
51 | extern void rcutorture_record_test_transition(void); | ||
52 | extern void rcutorture_record_progress(unsigned long vernum); | ||
53 | #else | ||
54 | static inline void rcutorture_record_test_transition(void) | ||
55 | { | ||
56 | } | ||
57 | static inline void rcutorture_record_progress(unsigned long vernum) | ||
58 | { | ||
59 | } | ||
60 | #endif | ||
61 | |||
50 | #define UINT_CMP_GE(a, b) (UINT_MAX / 2 >= (a) - (b)) | 62 | #define UINT_CMP_GE(a, b) (UINT_MAX / 2 >= (a) - (b)) |
51 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) | 63 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) |
52 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | 64 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) |
@@ -68,7 +80,6 @@ extern void call_rcu_sched(struct rcu_head *head, | |||
68 | extern void synchronize_sched(void); | 80 | extern void synchronize_sched(void); |
69 | extern void rcu_barrier_bh(void); | 81 | extern void rcu_barrier_bh(void); |
70 | extern void rcu_barrier_sched(void); | 82 | extern void rcu_barrier_sched(void); |
71 | extern int sched_expedited_torture_stats(char *page); | ||
72 | 83 | ||
73 | static inline void __rcu_read_lock_bh(void) | 84 | static inline void __rcu_read_lock_bh(void) |
74 | { | 85 | { |
@@ -339,6 +350,12 @@ extern int rcu_my_thread_group_empty(void); | |||
339 | ((typeof(*p) __force __kernel *)(p)); \ | 350 | ((typeof(*p) __force __kernel *)(p)); \ |
340 | }) | 351 | }) |
341 | 352 | ||
353 | #define __rcu_access_index(p, space) \ | ||
354 | ({ \ | ||
355 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | ||
356 | rcu_dereference_sparse(p, space); \ | ||
357 | (_________p1); \ | ||
358 | }) | ||
342 | #define __rcu_dereference_index_check(p, c) \ | 359 | #define __rcu_dereference_index_check(p, c) \ |
343 | ({ \ | 360 | ({ \ |
344 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | 361 | typeof(p) _________p1 = ACCESS_ONCE(p); \ |
@@ -429,6 +446,20 @@ extern int rcu_my_thread_group_empty(void); | |||
429 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ | 446 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ |
430 | 447 | ||
431 | /** | 448 | /** |
449 | * rcu_access_index() - fetch RCU index with no dereferencing | ||
450 | * @p: The index to read | ||
451 | * | ||
452 | * Return the value of the specified RCU-protected index, but omit the | ||
453 | * smp_read_barrier_depends() and keep the ACCESS_ONCE(). This is useful | ||
454 | * when the value of this index is accessed, but the index is not | ||
455 | * dereferenced, for example, when testing an RCU-protected index against | ||
456 | * -1. Although rcu_access_index() may also be used in cases where | ||
457 | * update-side locks prevent the value of the index from changing, you | ||
458 | * should instead use rcu_dereference_index_protected() for this use case. | ||
459 | */ | ||
460 | #define rcu_access_index(p) __rcu_access_index((p), __rcu) | ||
461 | |||
462 | /** | ||
432 | * rcu_dereference_index_check() - rcu_dereference for indices with debug checking | 463 | * rcu_dereference_index_check() - rcu_dereference for indices with debug checking |
433 | * @p: The pointer to read, prior to dereferencing | 464 | * @p: The pointer to read, prior to dereferencing |
434 | * @c: The conditions under which the dereference will take place | 465 | * @c: The conditions under which the dereference will take place |
@@ -754,6 +785,7 @@ extern struct debug_obj_descr rcuhead_debug_descr; | |||
754 | 785 | ||
755 | static inline void debug_rcu_head_queue(struct rcu_head *head) | 786 | static inline void debug_rcu_head_queue(struct rcu_head *head) |
756 | { | 787 | { |
788 | WARN_ON_ONCE((unsigned long)head & 0x3); | ||
757 | debug_object_activate(head, &rcuhead_debug_descr); | 789 | debug_object_activate(head, &rcuhead_debug_descr); |
758 | debug_object_active_state(head, &rcuhead_debug_descr, | 790 | debug_object_active_state(head, &rcuhead_debug_descr, |
759 | STATE_RCU_HEAD_READY, | 791 | STATE_RCU_HEAD_READY, |
@@ -777,4 +809,60 @@ static inline void debug_rcu_head_unqueue(struct rcu_head *head) | |||
777 | } | 809 | } |
778 | #endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ | 810 | #endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ |
779 | 811 | ||
812 | static __always_inline bool __is_kfree_rcu_offset(unsigned long offset) | ||
813 | { | ||
814 | return offset < 4096; | ||
815 | } | ||
816 | |||
817 | static __always_inline | ||
818 | void __kfree_rcu(struct rcu_head *head, unsigned long offset) | ||
819 | { | ||
820 | typedef void (*rcu_callback)(struct rcu_head *); | ||
821 | |||
822 | BUILD_BUG_ON(!__builtin_constant_p(offset)); | ||
823 | |||
824 | /* See the kfree_rcu() header comment. */ | ||
825 | BUILD_BUG_ON(!__is_kfree_rcu_offset(offset)); | ||
826 | |||
827 | call_rcu(head, (rcu_callback)offset); | ||
828 | } | ||
829 | |||
830 | extern void kfree(const void *); | ||
831 | |||
832 | static inline void __rcu_reclaim(struct rcu_head *head) | ||
833 | { | ||
834 | unsigned long offset = (unsigned long)head->func; | ||
835 | |||
836 | if (__is_kfree_rcu_offset(offset)) | ||
837 | kfree((void *)head - offset); | ||
838 | else | ||
839 | head->func(head); | ||
840 | } | ||
841 | |||
842 | /** | ||
843 | * kfree_rcu() - kfree an object after a grace period. | ||
844 | * @ptr: pointer to kfree | ||
845 | * @rcu_head: the name of the struct rcu_head within the type of @ptr. | ||
846 | * | ||
847 | * Many rcu callbacks functions just call kfree() on the base structure. | ||
848 | * These functions are trivial, but their size adds up, and furthermore | ||
849 | * when they are used in a kernel module, that module must invoke the | ||
850 | * high-latency rcu_barrier() function at module-unload time. | ||
851 | * | ||
852 | * The kfree_rcu() function handles this issue. Rather than encoding a | ||
853 | * function address in the embedded rcu_head structure, kfree_rcu() instead | ||
854 | * encodes the offset of the rcu_head structure within the base structure. | ||
855 | * Because the functions are not allowed in the low-order 4096 bytes of | ||
856 | * kernel virtual memory, offsets up to 4095 bytes can be accommodated. | ||
857 | * If the offset is larger than 4095 bytes, a compile-time error will | ||
858 | * be generated in __kfree_rcu(). If this error is triggered, you can | ||
859 | * either fall back to use of call_rcu() or rearrange the structure to | ||
860 | * position the rcu_head structure into the first 4096 bytes. | ||
861 | * | ||
862 | * Note that the allowable offset might decrease in the future, for example, | ||
863 | * to allow something like kmem_cache_free_rcu(). | ||
864 | */ | ||
865 | #define kfree_rcu(ptr, rcu_head) \ | ||
866 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) | ||
867 | |||
780 | #endif /* __LINUX_RCUPDATE_H */ | 868 | #endif /* __LINUX_RCUPDATE_H */ |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 30ebd7c8d874..52b3e0281fd0 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -100,6 +100,14 @@ static inline void rcu_note_context_switch(int cpu) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Take advantage of the fact that there is only one CPU, which | ||
104 | * allows us to ignore virtualization-based context switches. | ||
105 | */ | ||
106 | static inline void rcu_virt_note_context_switch(int cpu) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | /* | ||
103 | * Return the number of grace periods. | 111 | * Return the number of grace periods. |
104 | */ | 112 | */ |
105 | static inline long rcu_batches_completed(void) | 113 | static inline long rcu_batches_completed(void) |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 3a933482734a..e65d06634dd8 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -35,6 +35,16 @@ extern void rcu_note_context_switch(int cpu); | |||
35 | extern int rcu_needs_cpu(int cpu); | 35 | extern int rcu_needs_cpu(int cpu); |
36 | extern void rcu_cpu_stall_reset(void); | 36 | extern void rcu_cpu_stall_reset(void); |
37 | 37 | ||
38 | /* | ||
39 | * Note a virtualization-based context switch. This is simply a | ||
40 | * wrapper around rcu_note_context_switch(), which allows TINY_RCU | ||
41 | * to save a few bytes. | ||
42 | */ | ||
43 | static inline void rcu_virt_note_context_switch(int cpu) | ||
44 | { | ||
45 | rcu_note_context_switch(cpu); | ||
46 | } | ||
47 | |||
38 | #ifdef CONFIG_TREE_PREEMPT_RCU | 48 | #ifdef CONFIG_TREE_PREEMPT_RCU |
39 | 49 | ||
40 | extern void exit_rcu(void); | 50 | extern void exit_rcu(void); |
@@ -58,9 +68,12 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
58 | 68 | ||
59 | extern void rcu_barrier(void); | 69 | extern void rcu_barrier(void); |
60 | 70 | ||
71 | extern unsigned long rcutorture_testseq; | ||
72 | extern unsigned long rcutorture_vernum; | ||
61 | extern long rcu_batches_completed(void); | 73 | extern long rcu_batches_completed(void); |
62 | extern long rcu_batches_completed_bh(void); | 74 | extern long rcu_batches_completed_bh(void); |
63 | extern long rcu_batches_completed_sched(void); | 75 | extern long rcu_batches_completed_sched(void); |
76 | |||
64 | extern void rcu_force_quiescent_state(void); | 77 | extern void rcu_force_quiescent_state(void); |
65 | extern void rcu_bh_force_quiescent_state(void); | 78 | extern void rcu_bh_force_quiescent_state(void); |
66 | extern void rcu_sched_force_quiescent_state(void); | 79 | extern void rcu_sched_force_quiescent_state(void); |
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 6a210f1511fc..76579f964a29 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * License Terms: GNU General Public License v2 | 4 | * License Terms: GNU General Public License v2 |
5 | * | 5 | * |
6 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson | 6 | * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson |
7 | * | 7 | * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H | 10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H |
@@ -17,6 +17,7 @@ enum ab8500_regulator_id { | |||
17 | AB8500_LDO_AUX3, | 17 | AB8500_LDO_AUX3, |
18 | AB8500_LDO_INTCORE, | 18 | AB8500_LDO_INTCORE, |
19 | AB8500_LDO_TVOUT, | 19 | AB8500_LDO_TVOUT, |
20 | AB8500_LDO_USB, | ||
20 | AB8500_LDO_AUDIO, | 21 | AB8500_LDO_AUDIO, |
21 | AB8500_LDO_ANAMIC1, | 22 | AB8500_LDO_ANAMIC1, |
22 | AB8500_LDO_ANAMIC2, | 23 | AB8500_LDO_ANAMIC2, |
@@ -24,4 +25,50 @@ enum ab8500_regulator_id { | |||
24 | AB8500_LDO_ANA, | 25 | AB8500_LDO_ANA, |
25 | AB8500_NUM_REGULATORS, | 26 | AB8500_NUM_REGULATORS, |
26 | }; | 27 | }; |
28 | |||
29 | /* AB8500 register initialization */ | ||
30 | struct ab8500_regulator_reg_init { | ||
31 | int id; | ||
32 | u8 value; | ||
33 | }; | ||
34 | |||
35 | #define INIT_REGULATOR_REGISTER(_id, _value) \ | ||
36 | { \ | ||
37 | .id = _id, \ | ||
38 | .value = _value, \ | ||
39 | } | ||
40 | |||
41 | /* AB8500 registers */ | ||
42 | enum ab8500_regulator_reg { | ||
43 | AB8500_REGUREQUESTCTRL2, | ||
44 | AB8500_REGUREQUESTCTRL3, | ||
45 | AB8500_REGUREQUESTCTRL4, | ||
46 | AB8500_REGUSYSCLKREQ1HPVALID1, | ||
47 | AB8500_REGUSYSCLKREQ1HPVALID2, | ||
48 | AB8500_REGUHWHPREQ1VALID1, | ||
49 | AB8500_REGUHWHPREQ1VALID2, | ||
50 | AB8500_REGUHWHPREQ2VALID1, | ||
51 | AB8500_REGUHWHPREQ2VALID2, | ||
52 | AB8500_REGUSWHPREQVALID1, | ||
53 | AB8500_REGUSWHPREQVALID2, | ||
54 | AB8500_REGUSYSCLKREQVALID1, | ||
55 | AB8500_REGUSYSCLKREQVALID2, | ||
56 | AB8500_REGUMISC1, | ||
57 | AB8500_VAUDIOSUPPLY, | ||
58 | AB8500_REGUCTRL1VAMIC, | ||
59 | AB8500_VPLLVANAREGU, | ||
60 | AB8500_VREFDDR, | ||
61 | AB8500_EXTSUPPLYREGU, | ||
62 | AB8500_VAUX12REGU, | ||
63 | AB8500_VRF1VAUX3REGU, | ||
64 | AB8500_VAUX1SEL, | ||
65 | AB8500_VAUX2SEL, | ||
66 | AB8500_VRF1VAUX3SEL, | ||
67 | AB8500_REGUCTRL2SPARE, | ||
68 | AB8500_REGUCTRLDISCH, | ||
69 | AB8500_REGUCTRLDISCH2, | ||
70 | AB8500_VSMPS1SEL1, | ||
71 | AB8500_NUM_REGULATOR_REGISTERS, | ||
72 | }; | ||
73 | |||
27 | #endif | 74 | #endif |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 7954f6bd7edb..9e87c1cb7270 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -153,6 +153,8 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector); | |||
153 | int regulator_is_supported_voltage(struct regulator *regulator, | 153 | int regulator_is_supported_voltage(struct regulator *regulator, |
154 | int min_uV, int max_uV); | 154 | int min_uV, int max_uV); |
155 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); | 155 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); |
156 | int regulator_set_voltage_time(struct regulator *regulator, | ||
157 | int old_uV, int new_uV); | ||
156 | int regulator_get_voltage(struct regulator *regulator); | 158 | int regulator_get_voltage(struct regulator *regulator); |
157 | int regulator_sync_voltage(struct regulator *regulator); | 159 | int regulator_sync_voltage(struct regulator *regulator); |
158 | int regulator_set_current_limit(struct regulator *regulator, | 160 | int regulator_set_current_limit(struct regulator *regulator, |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index b8ed16a33c47..6c433b89c80d 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -63,7 +63,11 @@ enum regulator_status { | |||
63 | * when running with the specified parameters. | 63 | * when running with the specified parameters. |
64 | * | 64 | * |
65 | * @enable_time: Time taken for the regulator voltage output voltage to | 65 | * @enable_time: Time taken for the regulator voltage output voltage to |
66 | * stabalise after being enabled, in microseconds. | 66 | * stabilise after being enabled, in microseconds. |
67 | * @set_voltage_time_sel: Time taken for the regulator voltage output voltage | ||
68 | * to stabilise after being set to a new value, in microseconds. | ||
69 | * The function provides the from and to voltage selector, the | ||
70 | * function should return the worst case. | ||
67 | * | 71 | * |
68 | * @set_suspend_voltage: Set the voltage for the regulator when the system | 72 | * @set_suspend_voltage: Set the voltage for the regulator when the system |
69 | * is suspended. | 73 | * is suspended. |
@@ -103,8 +107,11 @@ struct regulator_ops { | |||
103 | int (*set_mode) (struct regulator_dev *, unsigned int mode); | 107 | int (*set_mode) (struct regulator_dev *, unsigned int mode); |
104 | unsigned int (*get_mode) (struct regulator_dev *); | 108 | unsigned int (*get_mode) (struct regulator_dev *); |
105 | 109 | ||
106 | /* Time taken to enable the regulator */ | 110 | /* Time taken to enable or set voltage on the regulator */ |
107 | int (*enable_time) (struct regulator_dev *); | 111 | int (*enable_time) (struct regulator_dev *); |
112 | int (*set_voltage_time_sel) (struct regulator_dev *, | ||
113 | unsigned int old_selector, | ||
114 | unsigned int new_selector); | ||
108 | 115 | ||
109 | /* report regulator status ... most other accessors report | 116 | /* report regulator status ... most other accessors report |
110 | * control inputs, this reports results of combining inputs | 117 | * control inputs, this reports results of combining inputs |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 761c745b9c24..c4c4fc45f856 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
@@ -186,6 +186,7 @@ struct regulator_init_data { | |||
186 | }; | 186 | }; |
187 | 187 | ||
188 | int regulator_suspend_prepare(suspend_state_t state); | 188 | int regulator_suspend_prepare(suspend_state_t state); |
189 | int regulator_suspend_finish(void); | ||
189 | 190 | ||
190 | #ifdef CONFIG_REGULATOR | 191 | #ifdef CONFIG_REGULATOR |
191 | void regulator_has_full_constraints(void); | 192 | void regulator_has_full_constraints(void); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 0a3842aacba9..eca75df00fed 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1557,7 +1557,7 @@ struct tree_balance { | |||
1557 | /* When inserting an item. */ | 1557 | /* When inserting an item. */ |
1558 | #define M_INSERT 'i' | 1558 | #define M_INSERT 'i' |
1559 | /* When inserting into (directories only) or appending onto an already | 1559 | /* When inserting into (directories only) or appending onto an already |
1560 | existant item. */ | 1560 | existent item. */ |
1561 | #define M_PASTE 'p' | 1561 | #define M_PASTE 'p' |
1562 | /* When deleting an item. */ | 1562 | /* When deleting an item. */ |
1563 | #define M_DELETE 'd' | 1563 | #define M_DELETE 'd' |
diff --git a/include/linux/rfkill-regulator.h b/include/linux/rfkill-regulator.h new file mode 100644 index 000000000000..aca36bc83315 --- /dev/null +++ b/include/linux/rfkill-regulator.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * rfkill-regulator.c - Regulator consumer driver for rfkill | ||
3 | * | ||
4 | * Copyright (C) 2009 Guiming Zhuo <gmzhuo@gmail.com> | ||
5 | * Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_RFKILL_REGULATOR_H | ||
14 | #define __LINUX_RFKILL_REGULATOR_H | ||
15 | |||
16 | /* | ||
17 | * Use "vrfkill" as supply id when declaring the regulator consumer: | ||
18 | * | ||
19 | * static struct regulator_consumer_supply pcap_regulator_V6_consumers [] = { | ||
20 | * { .dev_name = "rfkill-regulator.0", .supply = "vrfkill" }, | ||
21 | * }; | ||
22 | * | ||
23 | * If you have several regulator driven rfkill, you can append a numerical id to | ||
24 | * .dev_name as done above, and use the same id when declaring the platform | ||
25 | * device: | ||
26 | * | ||
27 | * static struct rfkill_regulator_platform_data ezx_rfkill_bt_data = { | ||
28 | * .name = "ezx-bluetooth", | ||
29 | * .type = RFKILL_TYPE_BLUETOOTH, | ||
30 | * }; | ||
31 | * | ||
32 | * static struct platform_device a910_rfkill = { | ||
33 | * .name = "rfkill-regulator", | ||
34 | * .id = 0, | ||
35 | * .dev = { | ||
36 | * .platform_data = &ezx_rfkill_bt_data, | ||
37 | * }, | ||
38 | * }; | ||
39 | */ | ||
40 | |||
41 | #include <linux/rfkill.h> | ||
42 | |||
43 | struct rfkill_regulator_platform_data { | ||
44 | char *name; /* the name for the rfkill switch */ | ||
45 | enum rfkill_type type; /* the type as specified in rfkill.h */ | ||
46 | }; | ||
47 | |||
48 | #endif /* __LINUX_RFKILL_REGULATOR_H */ | ||
diff --git a/include/linux/rio.h b/include/linux/rio.h index 4e37a7cfa726..4d50611112ba 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -396,7 +396,7 @@ union rio_pw_msg { | |||
396 | }; | 396 | }; |
397 | 397 | ||
398 | /* Architecture and hardware-specific functions */ | 398 | /* Architecture and hardware-specific functions */ |
399 | extern void rio_register_mport(struct rio_mport *); | 399 | extern int rio_register_mport(struct rio_mport *); |
400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); | 400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); |
401 | extern void rio_close_inb_mbox(struct rio_mport *, int); | 401 | extern void rio_close_inb_mbox(struct rio_mport *, int); |
402 | extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); | 402 | extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); |
diff --git a/include/linux/rio_ids.h b/include/linux/rio_ids.h index 7410d3365e2a..0cee0152aca9 100644 --- a/include/linux/rio_ids.h +++ b/include/linux/rio_ids.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #define RIO_DID_IDTCPS6Q 0x035f | 35 | #define RIO_DID_IDTCPS6Q 0x035f |
36 | #define RIO_DID_IDTCPS10Q 0x035e | 36 | #define RIO_DID_IDTCPS10Q 0x035e |
37 | #define RIO_DID_IDTCPS1848 0x0374 | 37 | #define RIO_DID_IDTCPS1848 0x0374 |
38 | #define RIO_DID_IDTCPS1432 0x0375 | ||
38 | #define RIO_DID_IDTCPS1616 0x0379 | 39 | #define RIO_DID_IDTCPS1616 0x0379 |
39 | #define RIO_DID_IDTVPS1616 0x0377 | 40 | #define RIO_DID_IDTVPS1616 0x0377 |
40 | #define RIO_DID_IDTSPS1616 0x0378 | 41 | #define RIO_DID_IDTSPS1616 0x0378 |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 2ca7e8a78060..877ece45426f 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -228,6 +228,8 @@ extern int rtc_read_alarm(struct rtc_device *rtc, | |||
228 | struct rtc_wkalrm *alrm); | 228 | struct rtc_wkalrm *alrm); |
229 | extern int rtc_set_alarm(struct rtc_device *rtc, | 229 | extern int rtc_set_alarm(struct rtc_device *rtc, |
230 | struct rtc_wkalrm *alrm); | 230 | struct rtc_wkalrm *alrm); |
231 | extern int rtc_initialize_alarm(struct rtc_device *rtc, | ||
232 | struct rtc_wkalrm *alrm); | ||
231 | extern void rtc_update_irq(struct rtc_device *rtc, | 233 | extern void rtc_update_irq(struct rtc_device *rtc, |
232 | unsigned long num, unsigned long events); | 234 | unsigned long num, unsigned long events); |
233 | 235 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 83bd2e2982fc..885c4f242ad7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -360,7 +360,7 @@ extern signed long schedule_timeout_interruptible(signed long timeout); | |||
360 | extern signed long schedule_timeout_killable(signed long timeout); | 360 | extern signed long schedule_timeout_killable(signed long timeout); |
361 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 361 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
362 | asmlinkage void schedule(void); | 362 | asmlinkage void schedule(void); |
363 | extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | 363 | extern int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner); |
364 | 364 | ||
365 | struct nsproxy; | 365 | struct nsproxy; |
366 | struct user_namespace; | 366 | struct user_namespace; |
@@ -653,9 +653,8 @@ struct signal_struct { | |||
653 | * Bits in flags field of signal_struct. | 653 | * Bits in flags field of signal_struct. |
654 | */ | 654 | */ |
655 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ | 655 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ |
656 | #define SIGNAL_STOP_DEQUEUED 0x00000002 /* stop signal dequeued */ | 656 | #define SIGNAL_STOP_CONTINUED 0x00000002 /* SIGCONT since WCONTINUED reap */ |
657 | #define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */ | 657 | #define SIGNAL_GROUP_EXIT 0x00000004 /* group exit in progress */ |
658 | #define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */ | ||
659 | /* | 658 | /* |
660 | * Pending notifications to parent. | 659 | * Pending notifications to parent. |
661 | */ | 660 | */ |
@@ -731,10 +730,6 @@ struct sched_info { | |||
731 | /* timestamps */ | 730 | /* timestamps */ |
732 | unsigned long long last_arrival,/* when we last ran on a cpu */ | 731 | unsigned long long last_arrival,/* when we last ran on a cpu */ |
733 | last_queued; /* when we were last queued to run */ | 732 | last_queued; /* when we were last queued to run */ |
734 | #ifdef CONFIG_SCHEDSTATS | ||
735 | /* BKL stats */ | ||
736 | unsigned int bkl_count; | ||
737 | #endif | ||
738 | }; | 733 | }; |
739 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ | 734 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ |
740 | 735 | ||
@@ -854,7 +849,7 @@ extern int __weak arch_sd_sibiling_asym_packing(void); | |||
854 | 849 | ||
855 | /* | 850 | /* |
856 | * Optimise SD flags for power savings: | 851 | * Optimise SD flags for power savings: |
857 | * SD_BALANCE_NEWIDLE helps agressive task consolidation and power savings. | 852 | * SD_BALANCE_NEWIDLE helps aggressive task consolidation and power savings. |
858 | * Keep default SD flags if sched_{smt,mc}_power_saving=0 | 853 | * Keep default SD flags if sched_{smt,mc}_power_saving=0 |
859 | */ | 854 | */ |
860 | 855 | ||
@@ -868,6 +863,7 @@ static inline int sd_power_saving_flags(void) | |||
868 | 863 | ||
869 | struct sched_group { | 864 | struct sched_group { |
870 | struct sched_group *next; /* Must be a circular list */ | 865 | struct sched_group *next; /* Must be a circular list */ |
866 | atomic_t ref; | ||
871 | 867 | ||
872 | /* | 868 | /* |
873 | * CPU power of this group, SCHED_LOAD_SCALE being max power for a | 869 | * CPU power of this group, SCHED_LOAD_SCALE being max power for a |
@@ -882,9 +878,6 @@ struct sched_group { | |||
882 | * NOTE: this field is variable length. (Allocated dynamically | 878 | * NOTE: this field is variable length. (Allocated dynamically |
883 | * by attaching extra space to the end of the structure, | 879 | * by attaching extra space to the end of the structure, |
884 | * depending on how many CPUs the kernel has booted up with) | 880 | * depending on how many CPUs the kernel has booted up with) |
885 | * | ||
886 | * It is also be embedded into static data structures at build | ||
887 | * time. (See 'struct static_sched_group' in kernel/sched.c) | ||
888 | */ | 881 | */ |
889 | unsigned long cpumask[0]; | 882 | unsigned long cpumask[0]; |
890 | }; | 883 | }; |
@@ -894,17 +887,6 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg) | |||
894 | return to_cpumask(sg->cpumask); | 887 | return to_cpumask(sg->cpumask); |
895 | } | 888 | } |
896 | 889 | ||
897 | enum sched_domain_level { | ||
898 | SD_LV_NONE = 0, | ||
899 | SD_LV_SIBLING, | ||
900 | SD_LV_MC, | ||
901 | SD_LV_BOOK, | ||
902 | SD_LV_CPU, | ||
903 | SD_LV_NODE, | ||
904 | SD_LV_ALLNODES, | ||
905 | SD_LV_MAX | ||
906 | }; | ||
907 | |||
908 | struct sched_domain_attr { | 890 | struct sched_domain_attr { |
909 | int relax_domain_level; | 891 | int relax_domain_level; |
910 | }; | 892 | }; |
@@ -913,6 +895,8 @@ struct sched_domain_attr { | |||
913 | .relax_domain_level = -1, \ | 895 | .relax_domain_level = -1, \ |
914 | } | 896 | } |
915 | 897 | ||
898 | extern int sched_domain_level_max; | ||
899 | |||
916 | struct sched_domain { | 900 | struct sched_domain { |
917 | /* These fields must be setup */ | 901 | /* These fields must be setup */ |
918 | struct sched_domain *parent; /* top domain must be null terminated */ | 902 | struct sched_domain *parent; /* top domain must be null terminated */ |
@@ -930,7 +914,7 @@ struct sched_domain { | |||
930 | unsigned int forkexec_idx; | 914 | unsigned int forkexec_idx; |
931 | unsigned int smt_gain; | 915 | unsigned int smt_gain; |
932 | int flags; /* See SD_* */ | 916 | int flags; /* See SD_* */ |
933 | enum sched_domain_level level; | 917 | int level; |
934 | 918 | ||
935 | /* Runtime fields. */ | 919 | /* Runtime fields. */ |
936 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | 920 | unsigned long last_balance; /* init to jiffies. units in jiffies */ |
@@ -973,6 +957,10 @@ struct sched_domain { | |||
973 | #ifdef CONFIG_SCHED_DEBUG | 957 | #ifdef CONFIG_SCHED_DEBUG |
974 | char *name; | 958 | char *name; |
975 | #endif | 959 | #endif |
960 | union { | ||
961 | void *private; /* used during construction */ | ||
962 | struct rcu_head rcu; /* used during destruction */ | ||
963 | }; | ||
976 | 964 | ||
977 | unsigned int span_weight; | 965 | unsigned int span_weight; |
978 | /* | 966 | /* |
@@ -981,9 +969,6 @@ struct sched_domain { | |||
981 | * NOTE: this field is variable length. (Allocated dynamically | 969 | * NOTE: this field is variable length. (Allocated dynamically |
982 | * by attaching extra space to the end of the structure, | 970 | * by attaching extra space to the end of the structure, |
983 | * depending on how many CPUs the kernel has booted up with) | 971 | * depending on how many CPUs the kernel has booted up with) |
984 | * | ||
985 | * It is also be embedded into static data structures at build | ||
986 | * time. (See 'struct static_sched_domain' in kernel/sched.c) | ||
987 | */ | 972 | */ |
988 | unsigned long span[0]; | 973 | unsigned long span[0]; |
989 | }; | 974 | }; |
@@ -1048,8 +1033,12 @@ struct sched_domain; | |||
1048 | #define WF_FORK 0x02 /* child wakeup after fork */ | 1033 | #define WF_FORK 0x02 /* child wakeup after fork */ |
1049 | 1034 | ||
1050 | #define ENQUEUE_WAKEUP 1 | 1035 | #define ENQUEUE_WAKEUP 1 |
1051 | #define ENQUEUE_WAKING 2 | 1036 | #define ENQUEUE_HEAD 2 |
1052 | #define ENQUEUE_HEAD 4 | 1037 | #ifdef CONFIG_SMP |
1038 | #define ENQUEUE_WAKING 4 /* sched_class::task_waking was called */ | ||
1039 | #else | ||
1040 | #define ENQUEUE_WAKING 0 | ||
1041 | #endif | ||
1053 | 1042 | ||
1054 | #define DEQUEUE_SLEEP 1 | 1043 | #define DEQUEUE_SLEEP 1 |
1055 | 1044 | ||
@@ -1067,12 +1056,11 @@ struct sched_class { | |||
1067 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 1056 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
1068 | 1057 | ||
1069 | #ifdef CONFIG_SMP | 1058 | #ifdef CONFIG_SMP |
1070 | int (*select_task_rq)(struct rq *rq, struct task_struct *p, | 1059 | int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); |
1071 | int sd_flag, int flags); | ||
1072 | 1060 | ||
1073 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1061 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
1074 | void (*post_schedule) (struct rq *this_rq); | 1062 | void (*post_schedule) (struct rq *this_rq); |
1075 | void (*task_waking) (struct rq *this_rq, struct task_struct *task); | 1063 | void (*task_waking) (struct task_struct *task); |
1076 | void (*task_woken) (struct rq *this_rq, struct task_struct *task); | 1064 | void (*task_woken) (struct rq *this_rq, struct task_struct *task); |
1077 | 1065 | ||
1078 | void (*set_cpus_allowed)(struct task_struct *p, | 1066 | void (*set_cpus_allowed)(struct task_struct *p, |
@@ -1197,13 +1185,11 @@ struct task_struct { | |||
1197 | unsigned int flags; /* per process flags, defined below */ | 1185 | unsigned int flags; /* per process flags, defined below */ |
1198 | unsigned int ptrace; | 1186 | unsigned int ptrace; |
1199 | 1187 | ||
1200 | int lock_depth; /* BKL lock depth */ | ||
1201 | |||
1202 | #ifdef CONFIG_SMP | 1188 | #ifdef CONFIG_SMP |
1203 | #ifdef __ARCH_WANT_UNLOCKED_CTXSW | 1189 | struct task_struct *wake_entry; |
1204 | int oncpu; | 1190 | int on_cpu; |
1205 | #endif | ||
1206 | #endif | 1191 | #endif |
1192 | int on_rq; | ||
1207 | 1193 | ||
1208 | int prio, static_prio, normal_prio; | 1194 | int prio, static_prio, normal_prio; |
1209 | unsigned int rt_priority; | 1195 | unsigned int rt_priority; |
@@ -1254,6 +1240,9 @@ struct task_struct { | |||
1254 | #endif | 1240 | #endif |
1255 | 1241 | ||
1256 | struct mm_struct *mm, *active_mm; | 1242 | struct mm_struct *mm, *active_mm; |
1243 | #ifdef CONFIG_COMPAT_BRK | ||
1244 | unsigned brk_randomized:1; | ||
1245 | #endif | ||
1257 | #if defined(SPLIT_RSS_COUNTING) | 1246 | #if defined(SPLIT_RSS_COUNTING) |
1258 | struct task_rss_stat rss_stat; | 1247 | struct task_rss_stat rss_stat; |
1259 | #endif | 1248 | #endif |
@@ -1261,6 +1250,7 @@ struct task_struct { | |||
1261 | int exit_state; | 1250 | int exit_state; |
1262 | int exit_code, exit_signal; | 1251 | int exit_code, exit_signal; |
1263 | int pdeath_signal; /* The signal sent when the parent dies */ | 1252 | int pdeath_signal; /* The signal sent when the parent dies */ |
1253 | unsigned int group_stop; /* GROUP_STOP_*, siglock protected */ | ||
1264 | /* ??? */ | 1254 | /* ??? */ |
1265 | unsigned int personality; | 1255 | unsigned int personality; |
1266 | unsigned did_exec:1; | 1256 | unsigned did_exec:1; |
@@ -1271,6 +1261,7 @@ struct task_struct { | |||
1271 | 1261 | ||
1272 | /* Revert to default priority/policy when forking */ | 1262 | /* Revert to default priority/policy when forking */ |
1273 | unsigned sched_reset_on_fork:1; | 1263 | unsigned sched_reset_on_fork:1; |
1264 | unsigned sched_contributes_to_load:1; | ||
1274 | 1265 | ||
1275 | pid_t pid; | 1266 | pid_t pid; |
1276 | pid_t tgid; | 1267 | pid_t tgid; |
@@ -1534,6 +1525,9 @@ struct task_struct { | |||
1534 | unsigned long memsw_nr_pages; /* uncharged mem+swap usage */ | 1525 | unsigned long memsw_nr_pages; /* uncharged mem+swap usage */ |
1535 | } memcg_batch; | 1526 | } memcg_batch; |
1536 | #endif | 1527 | #endif |
1528 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
1529 | atomic_t ptrace_bp_refcnt; | ||
1530 | #endif | ||
1537 | }; | 1531 | }; |
1538 | 1532 | ||
1539 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | 1533 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ |
@@ -1777,6 +1771,17 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1777 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) | 1771 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) |
1778 | #define used_math() tsk_used_math(current) | 1772 | #define used_math() tsk_used_math(current) |
1779 | 1773 | ||
1774 | /* | ||
1775 | * task->group_stop flags | ||
1776 | */ | ||
1777 | #define GROUP_STOP_SIGMASK 0xffff /* signr of the last group stop */ | ||
1778 | #define GROUP_STOP_PENDING (1 << 16) /* task should stop for group stop */ | ||
1779 | #define GROUP_STOP_CONSUME (1 << 17) /* consume group stop count */ | ||
1780 | #define GROUP_STOP_TRAPPING (1 << 18) /* switching from STOPPED to TRACED */ | ||
1781 | #define GROUP_STOP_DEQUEUED (1 << 19) /* stop signal dequeued */ | ||
1782 | |||
1783 | extern void task_clear_group_stop_pending(struct task_struct *task); | ||
1784 | |||
1780 | #ifdef CONFIG_PREEMPT_RCU | 1785 | #ifdef CONFIG_PREEMPT_RCU |
1781 | 1786 | ||
1782 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | 1787 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ |
@@ -2057,14 +2062,13 @@ extern void xtime_update(unsigned long ticks); | |||
2057 | 2062 | ||
2058 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); | 2063 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); |
2059 | extern int wake_up_process(struct task_struct *tsk); | 2064 | extern int wake_up_process(struct task_struct *tsk); |
2060 | extern void wake_up_new_task(struct task_struct *tsk, | 2065 | extern void wake_up_new_task(struct task_struct *tsk); |
2061 | unsigned long clone_flags); | ||
2062 | #ifdef CONFIG_SMP | 2066 | #ifdef CONFIG_SMP |
2063 | extern void kick_process(struct task_struct *tsk); | 2067 | extern void kick_process(struct task_struct *tsk); |
2064 | #else | 2068 | #else |
2065 | static inline void kick_process(struct task_struct *tsk) { } | 2069 | static inline void kick_process(struct task_struct *tsk) { } |
2066 | #endif | 2070 | #endif |
2067 | extern void sched_fork(struct task_struct *p, int clone_flags); | 2071 | extern void sched_fork(struct task_struct *p); |
2068 | extern void sched_dead(struct task_struct *p); | 2072 | extern void sched_dead(struct task_struct *p); |
2069 | 2073 | ||
2070 | extern void proc_caches_init(void); | 2074 | extern void proc_caches_init(void); |
@@ -2189,8 +2193,10 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
2189 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2193 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
2190 | 2194 | ||
2191 | #ifdef CONFIG_SMP | 2195 | #ifdef CONFIG_SMP |
2196 | void scheduler_ipi(void); | ||
2192 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 2197 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
2193 | #else | 2198 | #else |
2199 | static inline void scheduler_ipi(void) { } | ||
2194 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 2200 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
2195 | long match_state) | 2201 | long match_state) |
2196 | { | 2202 | { |
diff --git a/include/linux/security.h b/include/linux/security.h index ca02f1716736..8ce59ef3e5af 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1456,7 +1456,7 @@ struct security_operations { | |||
1456 | struct inode *new_dir, struct dentry *new_dentry); | 1456 | struct inode *new_dir, struct dentry *new_dentry); |
1457 | int (*inode_readlink) (struct dentry *dentry); | 1457 | int (*inode_readlink) (struct dentry *dentry); |
1458 | int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd); | 1458 | int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd); |
1459 | int (*inode_permission) (struct inode *inode, int mask); | 1459 | int (*inode_permission) (struct inode *inode, int mask, unsigned flags); |
1460 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); | 1460 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); |
1461 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); | 1461 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); |
1462 | int (*inode_setxattr) (struct dentry *dentry, const char *name, | 1462 | int (*inode_setxattr) (struct dentry *dentry, const char *name, |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index e98cd2e57194..06d69648fc86 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -88,12 +88,12 @@ static __always_inline unsigned read_seqbegin(const seqlock_t *sl) | |||
88 | unsigned ret; | 88 | unsigned ret; |
89 | 89 | ||
90 | repeat: | 90 | repeat: |
91 | ret = sl->sequence; | 91 | ret = ACCESS_ONCE(sl->sequence); |
92 | smp_rmb(); | ||
93 | if (unlikely(ret & 1)) { | 92 | if (unlikely(ret & 1)) { |
94 | cpu_relax(); | 93 | cpu_relax(); |
95 | goto repeat; | 94 | goto repeat; |
96 | } | 95 | } |
96 | smp_rmb(); | ||
97 | 97 | ||
98 | return ret; | 98 | return ret; |
99 | } | 99 | } |
diff --git a/include/linux/signal.h b/include/linux/signal.h index fcd2b14b1932..a822300a253b 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
9 | 9 | ||
10 | struct task_struct; | ||
11 | |||
10 | /* for sysctl */ | 12 | /* for sysctl */ |
11 | extern int print_fatal_signals; | 13 | extern int print_fatal_signals; |
12 | /* | 14 | /* |
@@ -123,13 +125,13 @@ _SIG_SET_BINOP(sigorsets, _sig_or) | |||
123 | #define _sig_and(x,y) ((x) & (y)) | 125 | #define _sig_and(x,y) ((x) & (y)) |
124 | _SIG_SET_BINOP(sigandsets, _sig_and) | 126 | _SIG_SET_BINOP(sigandsets, _sig_and) |
125 | 127 | ||
126 | #define _sig_nand(x,y) ((x) & ~(y)) | 128 | #define _sig_andn(x,y) ((x) & ~(y)) |
127 | _SIG_SET_BINOP(signandsets, _sig_nand) | 129 | _SIG_SET_BINOP(sigandnsets, _sig_andn) |
128 | 130 | ||
129 | #undef _SIG_SET_BINOP | 131 | #undef _SIG_SET_BINOP |
130 | #undef _sig_or | 132 | #undef _sig_or |
131 | #undef _sig_and | 133 | #undef _sig_and |
132 | #undef _sig_nand | 134 | #undef _sig_andn |
133 | 135 | ||
134 | #define _SIG_SET_OP(name, op) \ | 136 | #define _SIG_SET_OP(name, op) \ |
135 | static inline void name(sigset_t *set) \ | 137 | static inline void name(sigset_t *set) \ |
@@ -234,6 +236,9 @@ static inline int valid_signal(unsigned long sig) | |||
234 | return sig <= _NSIG ? 1 : 0; | 236 | return sig <= _NSIG ? 1 : 0; |
235 | } | 237 | } |
236 | 238 | ||
239 | struct timespec; | ||
240 | struct pt_regs; | ||
241 | |||
237 | extern int next_signal(struct sigpending *pending, sigset_t *mask); | 242 | extern int next_signal(struct sigpending *pending, sigset_t *mask); |
238 | extern int do_send_sig_info(int sig, struct siginfo *info, | 243 | extern int do_send_sig_info(int sig, struct siginfo *info, |
239 | struct task_struct *p, bool group); | 244 | struct task_struct *p, bool group); |
@@ -242,10 +247,12 @@ extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); | |||
242 | extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, | 247 | extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, |
243 | siginfo_t *info); | 248 | siginfo_t *info); |
244 | extern long do_sigpending(void __user *, unsigned long); | 249 | extern long do_sigpending(void __user *, unsigned long); |
250 | extern int do_sigtimedwait(const sigset_t *, siginfo_t *, | ||
251 | const struct timespec *); | ||
245 | extern int sigprocmask(int, sigset_t *, sigset_t *); | 252 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
253 | extern void set_current_blocked(const sigset_t *); | ||
246 | extern int show_unhandled_signals; | 254 | extern int show_unhandled_signals; |
247 | 255 | ||
248 | struct pt_regs; | ||
249 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 256 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); |
250 | extern void exit_signals(struct task_struct *tsk); | 257 | extern void exit_signals(struct task_struct *tsk); |
251 | 258 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 24cfa626931e..79aafbbf430a 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -122,8 +122,14 @@ struct sk_buff_head { | |||
122 | 122 | ||
123 | struct sk_buff; | 123 | struct sk_buff; |
124 | 124 | ||
125 | /* To allow 64K frame to be packed as single skb without frag_list */ | 125 | /* To allow 64K frame to be packed as single skb without frag_list. Since |
126 | * GRO uses frags we allocate at least 16 regardless of page size. | ||
127 | */ | ||
128 | #if (65536/PAGE_SIZE + 2) < 16 | ||
129 | #define MAX_SKB_FRAGS 16UL | ||
130 | #else | ||
126 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) | 131 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) |
132 | #endif | ||
127 | 133 | ||
128 | typedef struct skb_frag_struct skb_frag_t; | 134 | typedef struct skb_frag_struct skb_frag_t; |
129 | 135 | ||
@@ -385,8 +391,8 @@ struct sk_buff { | |||
385 | 391 | ||
386 | __u32 rxhash; | 392 | __u32 rxhash; |
387 | 393 | ||
394 | __u16 queue_mapping; | ||
388 | kmemcheck_bitfield_begin(flags2); | 395 | kmemcheck_bitfield_begin(flags2); |
389 | __u16 queue_mapping:16; | ||
390 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 396 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
391 | __u8 ndisc_nodetype:2; | 397 | __u8 ndisc_nodetype:2; |
392 | #endif | 398 | #endif |
@@ -468,7 +474,7 @@ static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) | |||
468 | extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst); | 474 | extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst); |
469 | 475 | ||
470 | /** | 476 | /** |
471 | * skb_dst_is_noref - Test if skb dst isnt refcounted | 477 | * skb_dst_is_noref - Test if skb dst isn't refcounted |
472 | * @skb: buffer | 478 | * @skb: buffer |
473 | */ | 479 | */ |
474 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) | 480 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) |
diff --git a/include/linux/smc91x.h b/include/linux/smc91x.h index bc21db598c06..76199b75d584 100644 --- a/include/linux/smc91x.h +++ b/include/linux/smc91x.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define RPC_LED_10 (0x02) /* LED = 10Mbps link detect */ | 21 | #define RPC_LED_10 (0x02) /* LED = 10Mbps link detect */ |
22 | #define RPC_LED_FD (0x03) /* LED = Full Duplex Mode */ | 22 | #define RPC_LED_FD (0x03) /* LED = Full Duplex Mode */ |
23 | #define RPC_LED_TX_RX (0x04) /* LED = TX or RX packet occurred */ | 23 | #define RPC_LED_TX_RX (0x04) /* LED = TX or RX packet occurred */ |
24 | #define RPC_LED_100 (0x05) /* LED = 100Mbps link dectect */ | 24 | #define RPC_LED_100 (0x05) /* LED = 100Mbps link detect */ |
25 | #define RPC_LED_TX (0x06) /* LED = TX packet occurred */ | 25 | #define RPC_LED_TX (0x06) /* LED = TX packet occurred */ |
26 | #define RPC_LED_RX (0x07) /* LED = RX packet occurred */ | 26 | #define RPC_LED_RX (0x07) /* LED = RX packet occurred */ |
27 | 27 | ||
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h index 7144e8aa1e41..4dde70e74822 100644 --- a/include/linux/smsc911x.h +++ b/include/linux/smsc911x.h | |||
@@ -29,6 +29,7 @@ struct smsc911x_platform_config { | |||
29 | unsigned int irq_polarity; | 29 | unsigned int irq_polarity; |
30 | unsigned int irq_type; | 30 | unsigned int irq_type; |
31 | unsigned int flags; | 31 | unsigned int flags; |
32 | unsigned int shift; | ||
32 | phy_interface_t phy_interface; | 33 | phy_interface_t phy_interface; |
33 | unsigned char mac[6]; | 34 | unsigned char mac[6]; |
34 | }; | 35 | }; |
diff --git a/include/linux/socket.h b/include/linux/socket.h index edbb1d07ddf4..4ef98e422fde 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -88,7 +88,7 @@ struct cmsghdr { | |||
88 | }; | 88 | }; |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Ancilliary data object information MACROS | 91 | * Ancillary data object information MACROS |
92 | * Table 5-14 of POSIX 1003.1g | 92 | * Table 5-14 of POSIX 1003.1g |
93 | */ | 93 | */ |
94 | 94 | ||
@@ -333,5 +333,7 @@ struct timespec; | |||
333 | 333 | ||
334 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | 334 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, |
335 | unsigned int flags, struct timespec *timeout); | 335 | unsigned int flags, struct timespec *timeout); |
336 | extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, | ||
337 | unsigned int vlen, unsigned int flags); | ||
336 | #endif /* not kernel and not glibc */ | 338 | #endif /* not kernel and not glibc */ |
337 | #endif /* _LINUX_SOCKET_H */ | 339 | #endif /* _LINUX_SOCKET_H */ |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 0e6dc3891942..c0f87da78f8a 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | /* events the user application reading /dev/sonypi can use */ | 41 | /* events the user application reading /dev/sonypi can use */ |
42 | 42 | ||
43 | #define SONYPI_EVENT_IGNORE 0 | ||
43 | #define SONYPI_EVENT_JOGDIAL_DOWN 1 | 44 | #define SONYPI_EVENT_JOGDIAL_DOWN 1 |
44 | #define SONYPI_EVENT_JOGDIAL_UP 2 | 45 | #define SONYPI_EVENT_JOGDIAL_UP 2 |
45 | #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3 | 46 | #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3 |
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index 1904afedb82f..fe204fe39f7c 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h | |||
@@ -1231,7 +1231,7 @@ void seqbuf_dump(void); /* This function must be provided by programs */ | |||
1231 | #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) | 1231 | #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) |
1232 | 1232 | ||
1233 | /* | 1233 | /* |
1234 | * Timing and syncronization macros | 1234 | * Timing and synchronization macros |
1235 | */ | 1235 | */ |
1236 | 1236 | ||
1237 | #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ | 1237 | #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ |
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index bf0570a84f7a..52d9ed01855f 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
@@ -66,7 +66,7 @@ | |||
66 | * are in a different address space (and may be of different sizes in some | 66 | * are in a different address space (and may be of different sizes in some |
67 | * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). | 67 | * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). |
68 | * Zero-initialize the structure, including currently unused fields, to | 68 | * Zero-initialize the structure, including currently unused fields, to |
69 | * accomodate potential future updates. | 69 | * accommodate potential future updates. |
70 | * | 70 | * |
71 | * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). | 71 | * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). |
72 | * Pass it an array of related transfers, they'll execute together. | 72 | * Pass it an array of related transfers, they'll execute together. |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 80e535897de6..0b22d51258e6 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -81,7 +81,7 @@ | |||
81 | #include <linux/spinlock_types.h> | 81 | #include <linux/spinlock_types.h> |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Pull the arch_spin*() functions/declarations (UP-nondebug doesnt need them): | 84 | * Pull the arch_spin*() functions/declarations (UP-nondebug doesn't need them): |
85 | */ | 85 | */ |
86 | #ifdef CONFIG_SMP | 86 | #ifdef CONFIG_SMP |
87 | # include <asm/spinlock.h> | 87 | # include <asm/spinlock.h> |
diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index b14f6a91e19f..a26e2fb604e6 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h | |||
@@ -5,6 +5,8 @@ | |||
5 | # error "please don't include this file directly" | 5 | # error "please don't include this file directly" |
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | #include <asm/processor.h> /* for cpu_relax() */ | ||
9 | |||
8 | /* | 10 | /* |
9 | * include/linux/spinlock_up.h - UP-debug version of spinlocks. | 11 | * include/linux/spinlock_up.h - UP-debug version of spinlocks. |
10 | * | 12 | * |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 9659eff52ca2..252e44821787 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -308,7 +308,7 @@ struct ssb_bus { | |||
308 | 308 | ||
309 | /* ID information about the Chip. */ | 309 | /* ID information about the Chip. */ |
310 | u16 chip_id; | 310 | u16 chip_id; |
311 | u16 chip_rev; | 311 | u8 chip_rev; |
312 | u16 sprom_offset; | 312 | u16 sprom_offset; |
313 | u16 sprom_size; /* number of words in sprom */ | 313 | u16 sprom_size; /* number of words in sprom */ |
314 | u8 chip_package; | 314 | u8 chip_package; |
@@ -404,7 +404,9 @@ extern bool ssb_is_sprom_available(struct ssb_bus *bus); | |||
404 | 404 | ||
405 | /* Set a fallback SPROM. | 405 | /* Set a fallback SPROM. |
406 | * See kdoc at the function definition for complete documentation. */ | 406 | * See kdoc at the function definition for complete documentation. */ |
407 | extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); | 407 | extern int ssb_arch_register_fallback_sprom( |
408 | int (*sprom_callback)(struct ssb_bus *bus, | ||
409 | struct ssb_sprom *out)); | ||
408 | 410 | ||
409 | /* Suspend a SSB bus. | 411 | /* Suspend a SSB bus. |
410 | * Call this from the parent bus suspend routine. */ | 412 | * Call this from the parent bus suspend routine. */ |
@@ -518,6 +520,7 @@ extern int ssb_bus_may_powerdown(struct ssb_bus *bus); | |||
518 | * Otherwise static always-on powercontrol will be used. */ | 520 | * Otherwise static always-on powercontrol will be used. */ |
519 | extern int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl); | 521 | extern int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl); |
520 | 522 | ||
523 | extern void ssb_commit_settings(struct ssb_bus *bus); | ||
521 | 524 | ||
522 | /* Various helper functions */ | 525 | /* Various helper functions */ |
523 | extern u32 ssb_admatch_base(u32 adm); | 526 | extern u32 ssb_admatch_base(u32 adm); |
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index 2cdf249b4e5f..a08d693d8324 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
@@ -123,6 +123,8 @@ | |||
123 | #define SSB_CHIPCO_FLASHDATA 0x0048 | 123 | #define SSB_CHIPCO_FLASHDATA 0x0048 |
124 | #define SSB_CHIPCO_BCAST_ADDR 0x0050 | 124 | #define SSB_CHIPCO_BCAST_ADDR 0x0050 |
125 | #define SSB_CHIPCO_BCAST_DATA 0x0054 | 125 | #define SSB_CHIPCO_BCAST_DATA 0x0054 |
126 | #define SSB_CHIPCO_GPIOPULLUP 0x0058 /* Rev >= 20 only */ | ||
127 | #define SSB_CHIPCO_GPIOPULLDOWN 0x005C /* Rev >= 20 only */ | ||
126 | #define SSB_CHIPCO_GPIOIN 0x0060 | 128 | #define SSB_CHIPCO_GPIOIN 0x0060 |
127 | #define SSB_CHIPCO_GPIOOUT 0x0064 | 129 | #define SSB_CHIPCO_GPIOOUT 0x0064 |
128 | #define SSB_CHIPCO_GPIOOUTEN 0x0068 | 130 | #define SSB_CHIPCO_GPIOOUTEN 0x0068 |
@@ -131,6 +133,9 @@ | |||
131 | #define SSB_CHIPCO_GPIOIRQ 0x0074 | 133 | #define SSB_CHIPCO_GPIOIRQ 0x0074 |
132 | #define SSB_CHIPCO_WATCHDOG 0x0080 | 134 | #define SSB_CHIPCO_WATCHDOG 0x0080 |
133 | #define SSB_CHIPCO_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ | 135 | #define SSB_CHIPCO_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ |
136 | #define SSB_CHIPCO_GPIOTIMER_OFFTIME 0x0000FFFF | ||
137 | #define SSB_CHIPCO_GPIOTIMER_OFFTIME_SHIFT 0 | ||
138 | #define SSB_CHIPCO_GPIOTIMER_ONTIME 0xFFFF0000 | ||
134 | #define SSB_CHIPCO_GPIOTIMER_ONTIME_SHIFT 16 | 139 | #define SSB_CHIPCO_GPIOTIMER_ONTIME_SHIFT 16 |
135 | #define SSB_CHIPCO_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ | 140 | #define SSB_CHIPCO_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ |
136 | #define SSB_CHIPCO_CLOCK_N 0x0090 | 141 | #define SSB_CHIPCO_CLOCK_N 0x0090 |
@@ -189,8 +194,10 @@ | |||
189 | #define SSB_CHIPCO_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ | 194 | #define SSB_CHIPCO_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ |
190 | #define SSB_CHIPCO_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ | 195 | #define SSB_CHIPCO_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ |
191 | #define SSB_CHIPCO_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ | 196 | #define SSB_CHIPCO_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ |
192 | #define SSB_CHIPCO_CLKCTLST_HAVEHT 0x00010000 /* HT available */ | 197 | #define SSB_CHIPCO_CLKCTLST_HAVEALP 0x00010000 /* ALP available */ |
193 | #define SSB_CHIPCO_CLKCTLST_HAVEALP 0x00020000 /* APL available */ | 198 | #define SSB_CHIPCO_CLKCTLST_HAVEHT 0x00020000 /* HT available */ |
199 | #define SSB_CHIPCO_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */ | ||
200 | #define SSB_CHIPCO_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */ | ||
194 | #define SSB_CHIPCO_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | 201 | #define SSB_CHIPCO_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ |
195 | #define SSB_CHIPCO_UART0_DATA 0x0300 | 202 | #define SSB_CHIPCO_UART0_DATA 0x0300 |
196 | #define SSB_CHIPCO_UART0_IMR 0x0304 | 203 | #define SSB_CHIPCO_UART0_IMR 0x0304 |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 402955ae48ce..efbf459d571c 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -97,7 +97,7 @@ | |||
97 | #define SSB_INTVEC_ENET1 0x00000040 /* Enable interrupts for enet 1 */ | 97 | #define SSB_INTVEC_ENET1 0x00000040 /* Enable interrupts for enet 1 */ |
98 | #define SSB_TMSLOW 0x0F98 /* SB Target State Low */ | 98 | #define SSB_TMSLOW 0x0F98 /* SB Target State Low */ |
99 | #define SSB_TMSLOW_RESET 0x00000001 /* Reset */ | 99 | #define SSB_TMSLOW_RESET 0x00000001 /* Reset */ |
100 | #define SSB_TMSLOW_REJECT_22 0x00000002 /* Reject (Backplane rev 2.2) */ | 100 | #define SSB_TMSLOW_REJECT 0x00000002 /* Reject (Standard Backplane) */ |
101 | #define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ | 101 | #define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ |
102 | #define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ | 102 | #define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ |
103 | #define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ | 103 | #define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index e10352915698..9529e49b0385 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -26,7 +26,9 @@ | |||
26 | #ifndef __STMMAC_PLATFORM_DATA | 26 | #ifndef __STMMAC_PLATFORM_DATA |
27 | #define __STMMAC_PLATFORM_DATA | 27 | #define __STMMAC_PLATFORM_DATA |
28 | 28 | ||
29 | /* platfrom data for platfrom device structure's platfrom_data field */ | 29 | #include <linux/platform_device.h> |
30 | |||
31 | /* platform data for platform device structure's platform_data field */ | ||
30 | 32 | ||
31 | /* Private data for the STM on-board ethernet driver */ | 33 | /* Private data for the STM on-board ethernet driver */ |
32 | struct plat_stmmacenet_data { | 34 | struct plat_stmmacenet_data { |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 1808960c5059..092dc9b1ce7d 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
@@ -105,7 +105,7 @@ static inline int try_stop_cpus(const struct cpumask *cpumask, | |||
105 | * @cpus: the cpus to run the @fn() on (NULL = any online cpu) | 105 | * @cpus: the cpus to run the @fn() on (NULL = any online cpu) |
106 | * | 106 | * |
107 | * Description: This causes a thread to be scheduled on every cpu, | 107 | * Description: This causes a thread to be scheduled on every cpu, |
108 | * each of which disables interrupts. The result is that noone is | 108 | * each of which disables interrupts. The result is that no one is |
109 | * holding a spinlock or inside any other preempt-disabled region when | 109 | * holding a spinlock or inside any other preempt-disabled region when |
110 | * @fn() runs. | 110 | * @fn() runs. |
111 | * | 111 | * |
diff --git a/include/linux/string.h b/include/linux/string.h index a716ee2a8adb..a176db2f2c85 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -123,6 +123,7 @@ extern char **argv_split(gfp_t gfp, const char *str, int *argcp); | |||
123 | extern void argv_free(char **argv); | 123 | extern void argv_free(char **argv); |
124 | 124 | ||
125 | extern bool sysfs_streq(const char *s1, const char *s2); | 125 | extern bool sysfs_streq(const char *s1, const char *s2); |
126 | extern int strtobool(const char *s, bool *res); | ||
126 | 127 | ||
127 | #ifdef CONFIG_BINARY_PRINTF | 128 | #ifdef CONFIG_BINARY_PRINTF |
128 | int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args); | 129 | int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args); |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 7898ea13de70..8d2eef1a8582 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -35,10 +35,10 @@ | |||
35 | * Each cache must be registered so that it can be cleaned regularly. | 35 | * Each cache must be registered so that it can be cleaned regularly. |
36 | * When the cache is unregistered, it is flushed completely. | 36 | * When the cache is unregistered, it is flushed completely. |
37 | * | 37 | * |
38 | * Entries have a ref count and a 'hashed' flag which counts the existance | 38 | * Entries have a ref count and a 'hashed' flag which counts the existence |
39 | * in the hash table. | 39 | * in the hash table. |
40 | * We only expire entries when refcount is zero. | 40 | * We only expire entries when refcount is zero. |
41 | * Existance in the cache is counted the refcount. | 41 | * Existence in the cache is counted the refcount. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | /* Every cache item has a common header that is used | 44 | /* Every cache item has a common header that is used |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index d81db8012c63..f73c482ec9c6 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -127,13 +127,16 @@ struct rpc_task_setup { | |||
127 | #define RPC_TASK_KILLED 0x0100 /* task was killed */ | 127 | #define RPC_TASK_KILLED 0x0100 /* task was killed */ |
128 | #define RPC_TASK_SOFT 0x0200 /* Use soft timeouts */ | 128 | #define RPC_TASK_SOFT 0x0200 /* Use soft timeouts */ |
129 | #define RPC_TASK_SOFTCONN 0x0400 /* Fail if can't connect */ | 129 | #define RPC_TASK_SOFTCONN 0x0400 /* Fail if can't connect */ |
130 | #define RPC_TASK_SENT 0x0800 /* message was sent */ | ||
131 | #define RPC_TASK_TIMEOUT 0x1000 /* fail with ETIMEDOUT on timeout */ | ||
130 | 132 | ||
131 | #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC) | 133 | #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC) |
132 | #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) | 134 | #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) |
133 | #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS) | 135 | #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS) |
134 | #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) | 136 | #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) |
135 | #define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT) | 137 | #define RPC_IS_SOFT(t) ((t)->tk_flags & (RPC_TASK_SOFT|RPC_TASK_TIMEOUT)) |
136 | #define RPC_IS_SOFTCONN(t) ((t)->tk_flags & RPC_TASK_SOFTCONN) | 138 | #define RPC_IS_SOFTCONN(t) ((t)->tk_flags & RPC_TASK_SOFTCONN) |
139 | #define RPC_WAS_SENT(t) ((t)->tk_flags & RPC_TASK_SENT) | ||
137 | 140 | ||
138 | #define RPC_TASK_RUNNING 0 | 141 | #define RPC_TASK_RUNNING 0 |
139 | #define RPC_TASK_QUEUED 1 | 142 | #define RPC_TASK_QUEUED 1 |
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h index ca7d725861fc..83bbee3f089c 100644 --- a/include/linux/sunrpc/svcauth_gss.h +++ b/include/linux/sunrpc/svcauth_gss.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/include/linux/sunrpc/svcauth_gss.h | 2 | * linux/include/linux/sunrpc/svcauth_gss.h |
3 | * | 3 | * |
4 | * Bruce Fields <bfields@umich.edu> | 4 | * Bruce Fields <bfields@umich.edu> |
5 | * Copyright (c) 2002 The Regents of the Unviersity of Michigan | 5 | * Copyright (c) 2002 The Regents of the University of Michigan |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H | 8 | #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5a89e3612875..083ffea7ba18 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -249,6 +249,8 @@ extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); | |||
249 | extern int hibernate(void); | 249 | extern int hibernate(void); |
250 | extern bool system_entering_hibernation(void); | 250 | extern bool system_entering_hibernation(void); |
251 | #else /* CONFIG_HIBERNATION */ | 251 | #else /* CONFIG_HIBERNATION */ |
252 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} | ||
253 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} | ||
252 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 254 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
253 | static inline void swsusp_set_page_free(struct page *p) {} | 255 | static inline void swsusp_set_page_free(struct page *p) {} |
254 | static inline void swsusp_unset_page_free(struct page *p) {} | 256 | static inline void swsusp_unset_page_free(struct page *p) {} |
@@ -297,14 +299,7 @@ static inline bool pm_wakeup_pending(void) { return false; } | |||
297 | 299 | ||
298 | extern struct mutex pm_mutex; | 300 | extern struct mutex pm_mutex; |
299 | 301 | ||
300 | #ifndef CONFIG_HIBERNATION | 302 | #ifndef CONFIG_HIBERNATE_CALLBACKS |
301 | static inline void register_nosave_region(unsigned long b, unsigned long e) | ||
302 | { | ||
303 | } | ||
304 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | ||
305 | { | ||
306 | } | ||
307 | |||
308 | static inline void lock_system_sleep(void) {} | 303 | static inline void lock_system_sleep(void) {} |
309 | static inline void unlock_system_sleep(void) {} | 304 | static inline void unlock_system_sleep(void) {} |
310 | 305 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 83ecc1749ef6..ab71447d0c5a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -610,6 +610,8 @@ asmlinkage long sys_send(int, void __user *, size_t, unsigned); | |||
610 | asmlinkage long sys_sendto(int, void __user *, size_t, unsigned, | 610 | asmlinkage long sys_sendto(int, void __user *, size_t, unsigned, |
611 | struct sockaddr __user *, int); | 611 | struct sockaddr __user *, int); |
612 | asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags); | 612 | asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags); |
613 | asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg, | ||
614 | unsigned int vlen, unsigned flags); | ||
613 | asmlinkage long sys_recv(int, void __user *, size_t, unsigned); | 615 | asmlinkage long sys_recv(int, void __user *, size_t, unsigned); |
614 | asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, | 616 | asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, |
615 | struct sockaddr __user *, int __user *); | 617 | struct sockaddr __user *, int __user *); |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 8a75da551e4e..d35e783a598c 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -7,13 +7,13 @@ | |||
7 | * We still have a notion of a driver for a system device, because we still | 7 | * We still have a notion of a driver for a system device, because we still |
8 | * want to perform basic operations on these devices. | 8 | * want to perform basic operations on these devices. |
9 | * | 9 | * |
10 | * We also support auxillary drivers binding to devices of a certain class. | 10 | * We also support auxiliary drivers binding to devices of a certain class. |
11 | * | 11 | * |
12 | * This allows configurable drivers to register themselves for devices of | 12 | * This allows configurable drivers to register themselves for devices of |
13 | * a certain type. And, it allows class definitions to reside in generic | 13 | * a certain type. And, it allows class definitions to reside in generic |
14 | * code while arch-specific code can register specific drivers. | 14 | * code while arch-specific code can register specific drivers. |
15 | * | 15 | * |
16 | * Auxillary drivers registered with a NULL cls are registered as drivers | 16 | * Auxiliary drivers registered with a NULL cls are registered as drivers |
17 | * for all system devices, and get notification calls for each device. | 17 | * for all system devices, and get notification calls for each device. |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -34,12 +34,6 @@ struct sysdev_class { | |||
34 | struct list_head drivers; | 34 | struct list_head drivers; |
35 | struct sysdev_class_attribute **attrs; | 35 | struct sysdev_class_attribute **attrs; |
36 | struct kset kset; | 36 | struct kset kset; |
37 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
38 | /* Default operations for these types of devices */ | ||
39 | int (*shutdown)(struct sys_device *); | ||
40 | int (*suspend)(struct sys_device *, pm_message_t state); | ||
41 | int (*resume)(struct sys_device *); | ||
42 | #endif | ||
43 | }; | 37 | }; |
44 | 38 | ||
45 | struct sysdev_class_attribute { | 39 | struct sysdev_class_attribute { |
@@ -70,18 +64,13 @@ extern int sysdev_class_create_file(struct sysdev_class *, | |||
70 | extern void sysdev_class_remove_file(struct sysdev_class *, | 64 | extern void sysdev_class_remove_file(struct sysdev_class *, |
71 | struct sysdev_class_attribute *); | 65 | struct sysdev_class_attribute *); |
72 | /** | 66 | /** |
73 | * Auxillary system device drivers. | 67 | * Auxiliary system device drivers. |
74 | */ | 68 | */ |
75 | 69 | ||
76 | struct sysdev_driver { | 70 | struct sysdev_driver { |
77 | struct list_head entry; | 71 | struct list_head entry; |
78 | int (*add)(struct sys_device *); | 72 | int (*add)(struct sys_device *); |
79 | int (*remove)(struct sys_device *); | 73 | int (*remove)(struct sys_device *); |
80 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
81 | int (*shutdown)(struct sys_device *); | ||
82 | int (*suspend)(struct sys_device *, pm_message_t state); | ||
83 | int (*resume)(struct sys_device *); | ||
84 | #endif | ||
85 | }; | 74 | }; |
86 | 75 | ||
87 | 76 | ||
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 30b881555fa5..c3acda60eee0 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -176,7 +176,6 @@ struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, | |||
176 | const unsigned char *name); | 176 | const unsigned char *name); |
177 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); | 177 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); |
178 | void sysfs_put(struct sysfs_dirent *sd); | 178 | void sysfs_put(struct sysfs_dirent *sd); |
179 | void sysfs_printk_last_file(void); | ||
180 | 179 | ||
181 | /* Called to clear a ns tag when it is no longer valid */ | 180 | /* Called to clear a ns tag when it is no longer valid */ |
182 | void sysfs_exit_ns(enum kobj_ns_type type, const void *tag); | 181 | void sysfs_exit_ns(enum kobj_ns_type type, const void *tag); |
@@ -348,10 +347,6 @@ static inline int __must_check sysfs_init(void) | |||
348 | return 0; | 347 | return 0; |
349 | } | 348 | } |
350 | 349 | ||
351 | static inline void sysfs_printk_last_file(void) | ||
352 | { | ||
353 | } | ||
354 | |||
355 | #endif /* CONFIG_SYSFS */ | 350 | #endif /* CONFIG_SYSFS */ |
356 | 351 | ||
357 | #endif /* _SYSFS_H_ */ | 352 | #endif /* _SYSFS_H_ */ |
diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h index 7071ec5d0118..b004e557caa9 100644 --- a/include/linux/ti_wilink_st.h +++ b/include/linux/ti_wilink_st.h | |||
@@ -140,12 +140,12 @@ extern long st_unregister(struct st_proto_s *); | |||
140 | */ | 140 | */ |
141 | struct st_data_s { | 141 | struct st_data_s { |
142 | unsigned long st_state; | 142 | unsigned long st_state; |
143 | struct tty_struct *tty; | ||
144 | struct sk_buff *tx_skb; | 143 | struct sk_buff *tx_skb; |
145 | #define ST_TX_SENDING 1 | 144 | #define ST_TX_SENDING 1 |
146 | #define ST_TX_WAKEUP 2 | 145 | #define ST_TX_WAKEUP 2 |
147 | unsigned long tx_state; | 146 | unsigned long tx_state; |
148 | struct st_proto_s *list[ST_MAX_CHANNELS]; | 147 | struct st_proto_s *list[ST_MAX_CHANNELS]; |
148 | bool is_registered[ST_MAX_CHANNELS]; | ||
149 | unsigned long rx_state; | 149 | unsigned long rx_state; |
150 | unsigned long rx_count; | 150 | unsigned long rx_count; |
151 | struct sk_buff *rx_skb; | 151 | struct sk_buff *rx_skb; |
@@ -155,6 +155,7 @@ struct st_data_s { | |||
155 | unsigned char protos_registered; | 155 | unsigned char protos_registered; |
156 | unsigned long ll_state; | 156 | unsigned long ll_state; |
157 | void *kim_data; | 157 | void *kim_data; |
158 | struct tty_struct *tty; | ||
158 | }; | 159 | }; |
159 | 160 | ||
160 | /* | 161 | /* |
diff --git a/include/linux/time.h b/include/linux/time.h index 454a26205787..b3061782dec3 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -126,6 +126,7 @@ struct timespec __current_kernel_time(void); /* does not take xtime_lock */ | |||
126 | struct timespec get_monotonic_coarse(void); | 126 | struct timespec get_monotonic_coarse(void); |
127 | void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, | 127 | void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, |
128 | struct timespec *wtom, struct timespec *sleep); | 128 | struct timespec *wtom, struct timespec *sleep); |
129 | void timekeeping_inject_sleeptime(struct timespec *delta); | ||
129 | 130 | ||
130 | #define CURRENT_TIME (current_kernel_time()) | 131 | #define CURRENT_TIME (current_kernel_time()) |
131 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) | 132 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
@@ -294,6 +295,8 @@ struct itimerval { | |||
294 | #define CLOCK_REALTIME_COARSE 5 | 295 | #define CLOCK_REALTIME_COARSE 5 |
295 | #define CLOCK_MONOTONIC_COARSE 6 | 296 | #define CLOCK_MONOTONIC_COARSE 6 |
296 | #define CLOCK_BOOTTIME 7 | 297 | #define CLOCK_BOOTTIME 7 |
298 | #define CLOCK_REALTIME_ALARM 8 | ||
299 | #define CLOCK_BOOTTIME_ALARM 9 | ||
297 | 300 | ||
298 | /* | 301 | /* |
299 | * The IDs of various hardware clocks: | 302 | * The IDs of various hardware clocks: |
diff --git a/include/linux/timerqueue.h b/include/linux/timerqueue.h index d24aabaca474..5088727478fd 100644 --- a/include/linux/timerqueue.h +++ b/include/linux/timerqueue.h | |||
@@ -24,7 +24,7 @@ extern struct timerqueue_node *timerqueue_iterate_next( | |||
24 | struct timerqueue_node *node); | 24 | struct timerqueue_node *node); |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * timerqueue_getnext - Returns the timer with the earlies expiration time | 27 | * timerqueue_getnext - Returns the timer with the earliest expiration time |
28 | * | 28 | * |
29 | * @head: head of timerqueue | 29 | * @head: head of timerqueue |
30 | * | 30 | * |
@@ -39,7 +39,7 @@ struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) | |||
39 | 39 | ||
40 | static inline void timerqueue_init(struct timerqueue_node *node) | 40 | static inline void timerqueue_init(struct timerqueue_node *node) |
41 | { | 41 | { |
42 | RB_CLEAR_NODE(&node->node); | 42 | rb_init_node(&node->node); |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline void timerqueue_init_head(struct timerqueue_head *head) | 45 | static inline void timerqueue_init_head(struct timerqueue_head *head) |
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index a5b994a204d2..f2d90091cc20 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
@@ -101,7 +101,7 @@ static inline unsigned int tipc_node(__u32 addr) | |||
101 | * Limiting values for messages | 101 | * Limiting values for messages |
102 | */ | 102 | */ |
103 | 103 | ||
104 | #define TIPC_MAX_USER_MSG_SIZE 66000 | 104 | #define TIPC_MAX_USER_MSG_SIZE 66000U |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Message importance levels | 107 | * Message importance levels |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 3a2e66d88a32..e95f5236611f 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -169,7 +169,7 @@ static inline int tracehook_unsafe_exec(struct task_struct *task) | |||
169 | * tracehook_tracer_task - return the task that is tracing the given task | 169 | * tracehook_tracer_task - return the task that is tracing the given task |
170 | * @tsk: task to consider | 170 | * @tsk: task to consider |
171 | * | 171 | * |
172 | * Returns NULL if noone is tracing @task, or the &struct task_struct | 172 | * Returns NULL if no one is tracing @task, or the &struct task_struct |
173 | * pointer to its tracer. | 173 | * pointer to its tracer. |
174 | * | 174 | * |
175 | * Must called under rcu_read_lock(). The pointer returned might be kept | 175 | * Must called under rcu_read_lock(). The pointer returned might be kept |
@@ -448,7 +448,7 @@ static inline int tracehook_force_sigpending(void) | |||
448 | * | 448 | * |
449 | * Return zero to check for a real pending signal normally. | 449 | * Return zero to check for a real pending signal normally. |
450 | * Return -1 after releasing the siglock to repeat the check. | 450 | * Return -1 after releasing the siglock to repeat the check. |
451 | * Return a signal number to induce an artifical signal delivery, | 451 | * Return a signal number to induce an artificial signal delivery, |
452 | * setting *@info and *@return_ka to specify its details and behavior. | 452 | * setting *@info and *@return_ka to specify its details and behavior. |
453 | * | 453 | * |
454 | * The @return_ka->sa_handler value controls the disposition of the | 454 | * The @return_ka->sa_handler value controls the disposition of the |
@@ -469,33 +469,6 @@ static inline int tracehook_get_signal(struct task_struct *task, | |||
469 | } | 469 | } |
470 | 470 | ||
471 | /** | 471 | /** |
472 | * tracehook_notify_jctl - report about job control stop/continue | ||
473 | * @notify: zero, %CLD_STOPPED or %CLD_CONTINUED | ||
474 | * @why: %CLD_STOPPED or %CLD_CONTINUED | ||
475 | * | ||
476 | * This is called when we might call do_notify_parent_cldstop(). | ||
477 | * | ||
478 | * @notify is zero if we would not ordinarily send a %SIGCHLD, | ||
479 | * or is the %CLD_STOPPED or %CLD_CONTINUED .si_code for %SIGCHLD. | ||
480 | * | ||
481 | * @why is %CLD_STOPPED when about to stop for job control; | ||
482 | * we are already in %TASK_STOPPED state, about to call schedule(). | ||
483 | * It might also be that we have just exited (check %PF_EXITING), | ||
484 | * but need to report that a group-wide stop is complete. | ||
485 | * | ||
486 | * @why is %CLD_CONTINUED when waking up after job control stop and | ||
487 | * ready to make a delayed @notify report. | ||
488 | * | ||
489 | * Return the %CLD_* value for %SIGCHLD, or zero to generate no signal. | ||
490 | * | ||
491 | * Called with the siglock held. | ||
492 | */ | ||
493 | static inline int tracehook_notify_jctl(int notify, int why) | ||
494 | { | ||
495 | return notify ?: (current->ptrace & PT_PTRACED) ? why : 0; | ||
496 | } | ||
497 | |||
498 | /** | ||
499 | * tracehook_finish_jctl - report about return from job control stop | 472 | * tracehook_finish_jctl - report about return from job control stop |
500 | * | 473 | * |
501 | * This is called by do_signal_stop() after wakeup. | 474 | * This is called by do_signal_stop() after wakeup. |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 97c84a58efb8..d530a4460a0b 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -29,7 +29,7 @@ struct tracepoint_func { | |||
29 | 29 | ||
30 | struct tracepoint { | 30 | struct tracepoint { |
31 | const char *name; /* Tracepoint name */ | 31 | const char *name; /* Tracepoint name */ |
32 | int state; /* State. */ | 32 | struct jump_label_key key; |
33 | void (*regfunc)(void); | 33 | void (*regfunc)(void); |
34 | void (*unregfunc)(void); | 34 | void (*unregfunc)(void); |
35 | struct tracepoint_func __rcu *funcs; | 35 | struct tracepoint_func __rcu *funcs; |
@@ -146,9 +146,7 @@ void tracepoint_update_probe_range(struct tracepoint * const *begin, | |||
146 | extern struct tracepoint __tracepoint_##name; \ | 146 | extern struct tracepoint __tracepoint_##name; \ |
147 | static inline void trace_##name(proto) \ | 147 | static inline void trace_##name(proto) \ |
148 | { \ | 148 | { \ |
149 | JUMP_LABEL(&__tracepoint_##name.state, do_trace); \ | 149 | if (static_branch(&__tracepoint_##name.key)) \ |
150 | return; \ | ||
151 | do_trace: \ | ||
152 | __DO_TRACE(&__tracepoint_##name, \ | 150 | __DO_TRACE(&__tracepoint_##name, \ |
153 | TP_PROTO(data_proto), \ | 151 | TP_PROTO(data_proto), \ |
154 | TP_ARGS(data_args), \ | 152 | TP_ARGS(data_args), \ |
@@ -176,14 +174,14 @@ do_trace: \ | |||
176 | * structures, so we create an array of pointers that will be used for iteration | 174 | * structures, so we create an array of pointers that will be used for iteration |
177 | * on the tracepoints. | 175 | * on the tracepoints. |
178 | */ | 176 | */ |
179 | #define DEFINE_TRACE_FN(name, reg, unreg) \ | 177 | #define DEFINE_TRACE_FN(name, reg, unreg) \ |
180 | static const char __tpstrtab_##name[] \ | 178 | static const char __tpstrtab_##name[] \ |
181 | __attribute__((section("__tracepoints_strings"))) = #name; \ | 179 | __attribute__((section("__tracepoints_strings"))) = #name; \ |
182 | struct tracepoint __tracepoint_##name \ | 180 | struct tracepoint __tracepoint_##name \ |
183 | __attribute__((section("__tracepoints"))) = \ | 181 | __attribute__((section("__tracepoints"))) = \ |
184 | { __tpstrtab_##name, 0, reg, unreg, NULL }; \ | 182 | { __tpstrtab_##name, JUMP_LABEL_INIT, reg, unreg, NULL };\ |
185 | static struct tracepoint * const __tracepoint_ptr_##name __used \ | 183 | static struct tracepoint * const __tracepoint_ptr_##name __used \ |
186 | __attribute__((section("__tracepoints_ptrs"))) = \ | 184 | __attribute__((section("__tracepoints_ptrs"))) = \ |
187 | &__tracepoint_##name; | 185 | &__tracepoint_##name; |
188 | 186 | ||
189 | #define DEFINE_TRACE(name) \ | 187 | #define DEFINE_TRACE(name) \ |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index 1b4790911052..5c75153f9441 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * Copyright: MontaVista Software, Inc. | 8 | * Copyright: MontaVista Software, Inc. |
9 | * | 9 | * |
10 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> | 10 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> |
11 | * If something doesnt work and it worked before spliting, e-mail me, | 11 | * If something doesn't work and it worked before spliting, e-mail me, |
12 | * dont bother Nicolas please ;-) | 12 | * dont bother Nicolas please ;-) |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/usb.h b/include/linux/usb.h index e63efeb378e3..65f78ca5d88e 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -623,7 +623,7 @@ extern struct usb_host_interface *usb_find_alt_setting( | |||
623 | * USB hubs. That makes it stay the same until systems are physically | 623 | * USB hubs. That makes it stay the same until systems are physically |
624 | * reconfigured, by re-cabling a tree of USB devices or by moving USB host | 624 | * reconfigured, by re-cabling a tree of USB devices or by moving USB host |
625 | * controllers. Adding and removing devices, including virtual root hubs | 625 | * controllers. Adding and removing devices, including virtual root hubs |
626 | * in host controller driver modules, does not change these path identifers; | 626 | * in host controller driver modules, does not change these path identifiers; |
627 | * neither does rebooting or re-enumerating. These are more useful identifiers | 627 | * neither does rebooting or re-enumerating. These are more useful identifiers |
628 | * than changeable ("unstable") ones like bus numbers or device addresses. | 628 | * than changeable ("unstable") ones like bus numbers or device addresses. |
629 | * | 629 | * |
@@ -793,7 +793,7 @@ struct usbdrv_wrap { | |||
793 | * usb_set_intfdata() to associate driver-specific data with the | 793 | * usb_set_intfdata() to associate driver-specific data with the |
794 | * interface. It may also use usb_set_interface() to specify the | 794 | * interface. It may also use usb_set_interface() to specify the |
795 | * appropriate altsetting. If unwilling to manage the interface, | 795 | * appropriate altsetting. If unwilling to manage the interface, |
796 | * return -ENODEV, if genuine IO errors occured, an appropriate | 796 | * return -ENODEV, if genuine IO errors occurred, an appropriate |
797 | * negative errno value. | 797 | * negative errno value. |
798 | * @disconnect: Called when the interface is no longer accessible, usually | 798 | * @disconnect: Called when the interface is no longer accessible, usually |
799 | * because its device has been (or is being) disconnected or the | 799 | * because its device has been (or is being) disconnected or the |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 3d29a7dcac2d..882a084a8411 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -188,7 +188,7 @@ ep_choose(struct usb_gadget *g, struct usb_endpoint_descriptor *hs, | |||
188 | * @bind() method is then used to initialize all the functions and then | 188 | * @bind() method is then used to initialize all the functions and then |
189 | * call @usb_add_function() for them. | 189 | * call @usb_add_function() for them. |
190 | * | 190 | * |
191 | * Those functions would normally be independant of each other, but that's | 191 | * Those functions would normally be independent of each other, but that's |
192 | * not mandatory. CDC WMC devices are an example where functions often | 192 | * not mandatory. CDC WMC devices are an example where functions often |
193 | * depend on other functions, with some functions subsidiary to others. | 193 | * depend on other functions, with some functions subsidiary to others. |
194 | * Such interdependency may be managed in any way, so long as all of the | 194 | * Such interdependency may be managed in any way, so long as all of the |
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h index 656380245198..e49dfd45baa4 100644 --- a/include/linux/usb/ehci_def.h +++ b/include/linux/usb/ehci_def.h | |||
@@ -159,7 +159,7 @@ struct ehci_regs { | |||
159 | #define USBMODE_CM_IDLE (0<<0) /* idle state */ | 159 | #define USBMODE_CM_IDLE (0<<0) /* idle state */ |
160 | 160 | ||
161 | /* Moorestown has some non-standard registers, partially due to the fact that | 161 | /* Moorestown has some non-standard registers, partially due to the fact that |
162 | * its EHCI controller has both TT and LPM support. HOSTPCx are extentions to | 162 | * its EHCI controller has both TT and LPM support. HOSTPCx are extensions to |
163 | * PORTSCx | 163 | * PORTSCx |
164 | */ | 164 | */ |
165 | #define HOSTPC0 0x84 /* HOSTPC extension */ | 165 | #define HOSTPC0 0x84 /* HOSTPC extension */ |
diff --git a/include/linux/usb/functionfs.h b/include/linux/usb/functionfs.h index 6f649c13193b..7587ef934ba8 100644 --- a/include/linux/usb/functionfs.h +++ b/include/linux/usb/functionfs.h | |||
@@ -45,7 +45,7 @@ struct usb_functionfs_descs_head { | |||
45 | * | off | name | type | description | | 45 | * | off | name | type | description | |
46 | * |-----+-----------+--------------+--------------------------------------| | 46 | * |-----+-----------+--------------+--------------------------------------| |
47 | * | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC | | 47 | * | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC | |
48 | * | 4 | lenght | LE32 | length of the whole data chunk | | 48 | * | 4 | length | LE32 | length of the whole data chunk | |
49 | * | 8 | fs_count | LE32 | number of full-speed descriptors | | 49 | * | 8 | fs_count | LE32 | number of full-speed descriptors | |
50 | * | 12 | hs_count | LE32 | number of high-speed descriptors | | 50 | * | 12 | hs_count | LE32 | number of high-speed descriptors | |
51 | * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors | | 51 | * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors | |
@@ -86,7 +86,7 @@ struct usb_functionfs_strings_head { | |||
86 | * | 0 | lang | LE16 | language code | | 86 | * | 0 | lang | LE16 | language code | |
87 | * | 2 | strings | String[str_count] | array of strings in given language | | 87 | * | 2 | strings | String[str_count] | array of strings in given language | |
88 | * | 88 | * |
89 | * For each string ther is one strings entry (ie. there are str_count | 89 | * For each string there is one strings entry (ie. there are str_count |
90 | * string entries). Each String is a NUL terminated string encoded in | 90 | * string entries). Each String is a NUL terminated string encoded in |
91 | * UTF-8. | 91 | * UTF-8. |
92 | */ | 92 | */ |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 006412ce2303..e538172c0f64 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -72,7 +72,7 @@ struct usb_ep; | |||
72 | * Bulk endpoints can use any size buffers, and can also be used for interrupt | 72 | * Bulk endpoints can use any size buffers, and can also be used for interrupt |
73 | * transfers. interrupt-only endpoints can be much less functional. | 73 | * transfers. interrupt-only endpoints can be much less functional. |
74 | * | 74 | * |
75 | * NOTE: this is analagous to 'struct urb' on the host side, except that | 75 | * NOTE: this is analogous to 'struct urb' on the host side, except that |
76 | * it's thinner and promotes more pre-allocation. | 76 | * it's thinner and promotes more pre-allocation. |
77 | */ | 77 | */ |
78 | 78 | ||
@@ -269,7 +269,7 @@ static inline void usb_ep_free_request(struct usb_ep *ep, | |||
269 | * | 269 | * |
270 | * Control endpoints ... after getting a setup() callback, the driver queues | 270 | * Control endpoints ... after getting a setup() callback, the driver queues |
271 | * one response (even if it would be zero length). That enables the | 271 | * one response (even if it would be zero length). That enables the |
272 | * status ack, after transfering data as specified in the response. Setup | 272 | * status ack, after transferring data as specified in the response. Setup |
273 | * functions may return negative error codes to generate protocol stalls. | 273 | * functions may return negative error codes to generate protocol stalls. |
274 | * (Note that some USB device controllers disallow protocol stall responses | 274 | * (Note that some USB device controllers disallow protocol stall responses |
275 | * in some cases.) When control responses are deferred (the response is | 275 | * in some cases.) When control responses are deferred (the response is |
diff --git a/include/linux/usb/midi.h b/include/linux/usb/midi.h index 1d1040865661..c8c52e3c91de 100644 --- a/include/linux/usb/midi.h +++ b/include/linux/usb/midi.h | |||
@@ -70,7 +70,7 @@ struct usb_midi_out_jack_descriptor { | |||
70 | __u8 bJackID; | 70 | __u8 bJackID; |
71 | __u8 bNrInputPins; /* p */ | 71 | __u8 bNrInputPins; /* p */ |
72 | struct usb_midi_source_pin pins[]; /* [p] */ | 72 | struct usb_midi_source_pin pins[]; /* [p] */ |
73 | /*__u8 iJack; -- ommitted due to variable-sized pins[] */ | 73 | /*__u8 iJack; -- omitted due to variable-sized pins[] */ |
74 | } __attribute__ ((packed)); | 74 | } __attribute__ ((packed)); |
75 | 75 | ||
76 | #define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) | 76 | #define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) |
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 05ef52861988..88fceb718c77 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -256,6 +256,8 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */ | |||
256 | #define FLAG_RNDIS_PHYM_NOT_WIRELESS 0x0001 | 256 | #define FLAG_RNDIS_PHYM_NOT_WIRELESS 0x0001 |
257 | #define FLAG_RNDIS_PHYM_WIRELESS 0x0002 | 257 | #define FLAG_RNDIS_PHYM_WIRELESS 0x0002 |
258 | 258 | ||
259 | /* Flags for driver_info::data */ | ||
260 | #define RNDIS_DRIVER_DATA_POLL_STATUS 1 /* poll status before control */ | ||
259 | 261 | ||
260 | extern void rndis_status(struct usbnet *dev, struct urb *urb); | 262 | extern void rndis_status(struct usbnet *dev, struct urb *urb); |
261 | extern int | 263 | extern int |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 44842c8d38c0..605b0aa8d852 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -68,6 +68,7 @@ struct usbnet { | |||
68 | # define EVENT_RX_PAUSED 5 | 68 | # define EVENT_RX_PAUSED 5 |
69 | # define EVENT_DEV_WAKING 6 | 69 | # define EVENT_DEV_WAKING 6 |
70 | # define EVENT_DEV_ASLEEP 7 | 70 | # define EVENT_DEV_ASLEEP 7 |
71 | # define EVENT_DEV_OPEN 8 | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 74 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -97,11 +98,14 @@ struct driver_info { | |||
97 | 98 | ||
98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | 99 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ |
99 | 100 | ||
101 | #define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ | ||
102 | |||
100 | /* | 103 | /* |
101 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. | 104 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. |
102 | * Affects statistic (counters) and short packet handling. | 105 | * Affects statistic (counters) and short packet handling. |
103 | */ | 106 | */ |
104 | #define FLAG_MULTI_PACKET 0x1000 | 107 | #define FLAG_MULTI_PACKET 0x2000 |
108 | #define FLAG_RX_ASSEMBLE 0x4000 /* rx packets may span >1 frames */ | ||
105 | 109 | ||
106 | /* init device ... can sleep, or cause probe() failure */ | 110 | /* init device ... can sleep, or cause probe() failure */ |
107 | int (*bind)(struct usbnet *, struct usb_interface *); | 111 | int (*bind)(struct usbnet *, struct usb_interface *); |
@@ -172,7 +176,9 @@ struct cdc_state { | |||
172 | }; | 176 | }; |
173 | 177 | ||
174 | extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *); | 178 | extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *); |
179 | extern int usbnet_cdc_bind(struct usbnet *, struct usb_interface *); | ||
175 | extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *); | 180 | extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *); |
181 | extern void usbnet_cdc_status(struct usbnet *, struct urb *); | ||
176 | 182 | ||
177 | /* CDC and RNDIS support the same host-chosen packet filters for IN transfers */ | 183 | /* CDC and RNDIS support the same host-chosen packet filters for IN transfers */ |
178 | #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ | 184 | #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ |
diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h index 63ebdcc5dda6..0c4d4ca370ec 100644 --- a/include/linux/usb/wusb.h +++ b/include/linux/usb/wusb.h | |||
@@ -126,7 +126,7 @@ enum { | |||
126 | /** | 126 | /** |
127 | * WUSB IE: Channel Stop (WUSB1.0[7.5.8]) | 127 | * WUSB IE: Channel Stop (WUSB1.0[7.5.8]) |
128 | * | 128 | * |
129 | * Tells devices the host is going to stop sending MMCs and will dissapear. | 129 | * Tells devices the host is going to stop sending MMCs and will disappear. |
130 | */ | 130 | */ |
131 | struct wuie_channel_stop { | 131 | struct wuie_channel_stop { |
132 | struct wuie_hdr hdr; | 132 | struct wuie_hdr hdr; |
diff --git a/include/linux/uwb.h b/include/linux/uwb.h index 7fc9746f22cd..b0c564ec2160 100644 --- a/include/linux/uwb.h +++ b/include/linux/uwb.h | |||
@@ -274,7 +274,7 @@ static inline void uwb_mas_bm_copy_le(void *dst, const struct uwb_mas_bm *mas) | |||
274 | 274 | ||
275 | /** | 275 | /** |
276 | * struct uwb_drp_avail - a radio controller's view of MAS usage | 276 | * struct uwb_drp_avail - a radio controller's view of MAS usage |
277 | * @global: MAS unused by neighbors (excluding reservations targetted | 277 | * @global: MAS unused by neighbors (excluding reservations targeted |
278 | * or owned by the local radio controller) or the beaon period | 278 | * or owned by the local radio controller) or the beaon period |
279 | * @local: MAS unused by local established reservations | 279 | * @local: MAS unused by local established reservations |
280 | * @pending: MAS unused by local pending reservations | 280 | * @pending: MAS unused by local pending reservations |
@@ -702,10 +702,10 @@ void edc_init(struct edc *edc) | |||
702 | edc->timestart = jiffies; | 702 | edc->timestart = jiffies; |
703 | } | 703 | } |
704 | 704 | ||
705 | /* Called when an error occured. | 705 | /* Called when an error occurred. |
706 | * This is way to determine if the number of acceptable errors per time | 706 | * This is way to determine if the number of acceptable errors per time |
707 | * period has been exceeded. It is not accurate as there are cases in which | 707 | * period has been exceeded. It is not accurate as there are cases in which |
708 | * this scheme will not work, for example if there are periodic occurences | 708 | * this scheme will not work, for example if there are periodic occurrences |
709 | * of errors that straddle updates to the start time. This scheme is | 709 | * of errors that straddle updates to the start time. This scheme is |
710 | * sufficient for our usage. | 710 | * sufficient for our usage. |
711 | * | 711 | * |
diff --git a/include/linux/uwb/umc.h b/include/linux/uwb/umc.h index 4b4fc0f43855..7b4842028ca7 100644 --- a/include/linux/uwb/umc.h +++ b/include/linux/uwb/umc.h | |||
@@ -132,7 +132,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc); | |||
132 | * | 132 | * |
133 | * FIXME: This is as dirty as it gets, but we need some way to check | 133 | * FIXME: This is as dirty as it gets, but we need some way to check |
134 | * the correct type of umc_dev->parent (so that for example, we can | 134 | * the correct type of umc_dev->parent (so that for example, we can |
135 | * cast to pci_dev). Casting to pci_dev is necesary because at some | 135 | * cast to pci_dev). Casting to pci_dev is necessary because at some |
136 | * point we need to request resources from the device. Mapping is | 136 | * point we need to request resources from the device. Mapping is |
137 | * easily over come (ioremap and stuff are bus agnostic), but hooking | 137 | * easily over come (ioremap and stuff are bus agnostic), but hooking |
138 | * up to some error handlers (such as pci error handlers) might need | 138 | * up to some error handlers (such as pci error handlers) might need |
diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h index 7054a7a8065e..de5c15921025 100644 --- a/include/linux/v4l2-mediabus.h +++ b/include/linux/v4l2-mediabus.h | |||
@@ -47,7 +47,7 @@ enum v4l2_mbus_pixelcode { | |||
47 | V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, | 47 | V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, |
48 | V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, | 48 | V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, |
49 | 49 | ||
50 | /* YUV (including grey) - next is 0x2013 */ | 50 | /* YUV (including grey) - next is 0x2014 */ |
51 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, | 51 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, |
52 | V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, | 52 | V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, |
53 | V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003, | 53 | V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003, |
@@ -60,6 +60,7 @@ enum v4l2_mbus_pixelcode { | |||
60 | V4L2_MBUS_FMT_Y10_1X10 = 0x200a, | 60 | V4L2_MBUS_FMT_Y10_1X10 = 0x200a, |
61 | V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, | 61 | V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, |
62 | V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, | 62 | V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, |
63 | V4L2_MBUS_FMT_Y12_1X12 = 0x2013, | ||
63 | V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f, | 64 | V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f, |
64 | V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010, | 65 | V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010, |
65 | V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, | 66 | V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, |
@@ -67,9 +68,11 @@ enum v4l2_mbus_pixelcode { | |||
67 | V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, | 68 | V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, |
68 | V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, | 69 | V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, |
69 | 70 | ||
70 | /* Bayer - next is 0x3013 */ | 71 | /* Bayer - next is 0x3015 */ |
71 | V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, | 72 | V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, |
73 | V4L2_MBUS_FMT_SGBRG8_1X8 = 0x3013, | ||
72 | V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002, | 74 | V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002, |
75 | V4L2_MBUS_FMT_SRGGB8_1X8 = 0x3014, | ||
73 | V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b, | 76 | V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b, |
74 | V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c, | 77 | V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c, |
75 | V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009, | 78 | V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009, |
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index e9e1524b582c..9c3120dca294 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
@@ -78,7 +78,7 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev, | |||
78 | * wether the card is doing legacy decoding for that type of resource. If | 78 | * wether the card is doing legacy decoding for that type of resource. If |
79 | * yes, the lock is "converted" into a legacy resource lock. | 79 | * yes, the lock is "converted" into a legacy resource lock. |
80 | * The arbiter will first look for all VGA cards that might conflict | 80 | * The arbiter will first look for all VGA cards that might conflict |
81 | * and disable their IOs and/or Memory access, inlcuding VGA forwarding | 81 | * and disable their IOs and/or Memory access, including VGA forwarding |
82 | * on P2P bridges if necessary, so that the requested resources can | 82 | * on P2P bridges if necessary, so that the requested resources can |
83 | * be used. Then, the card is marked as locking these resources and | 83 | * be used. Then, the card is marked as locking these resources and |
84 | * the IO and/or Memory accesse are enabled on the card (including | 84 | * the IO and/or Memory accesse are enabled on the card (including |
@@ -187,7 +187,7 @@ extern struct pci_dev *vga_default_device(void); | |||
187 | * vga_conflicts | 187 | * vga_conflicts |
188 | * | 188 | * |
189 | * Architectures should define this if they have several | 189 | * Architectures should define this if they have several |
190 | * independant PCI domains that can afford concurrent VGA | 190 | * independent PCI domains that can afford concurrent VGA |
191 | * decoding | 191 | * decoding |
192 | */ | 192 | */ |
193 | 193 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index aa6c393b7ae9..be82c8ead1af 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -308,6 +308,7 @@ struct v4l2_pix_format { | |||
308 | #define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ | 308 | #define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ |
309 | #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ | 309 | #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ |
310 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ | 310 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ |
311 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ | ||
311 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ | 312 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
312 | 313 | ||
313 | /* Palette formats */ | 314 | /* Palette formats */ |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4ed6fcd6b726..9332e52ea8c2 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -95,10 +95,27 @@ extern struct vm_struct *remove_vm_area(const void *addr); | |||
95 | 95 | ||
96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
97 | struct page ***pages); | 97 | struct page ***pages); |
98 | #ifdef CONFIG_MMU | ||
98 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, | 99 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, |
99 | pgprot_t prot, struct page **pages); | 100 | pgprot_t prot, struct page **pages); |
100 | extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); | 101 | extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); |
101 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); | 102 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); |
103 | #else | ||
104 | static inline int | ||
105 | map_kernel_range_noflush(unsigned long start, unsigned long size, | ||
106 | pgprot_t prot, struct page **pages) | ||
107 | { | ||
108 | return size >> PAGE_SHIFT; | ||
109 | } | ||
110 | static inline void | ||
111 | unmap_kernel_range_noflush(unsigned long addr, unsigned long size) | ||
112 | { | ||
113 | } | ||
114 | static inline void | ||
115 | unmap_kernel_range(unsigned long addr, unsigned long size) | ||
116 | { | ||
117 | } | ||
118 | #endif | ||
102 | 119 | ||
103 | /* Allocate/destroy a 'vmalloc' VM area. */ | 120 | /* Allocate/destroy a 'vmalloc' VM area. */ |
104 | extern struct vm_struct *alloc_vm_area(size_t size); | 121 | extern struct vm_struct *alloc_vm_area(size_t size); |
@@ -116,11 +133,26 @@ extern struct vm_struct *vmlist; | |||
116 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); | 133 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); |
117 | 134 | ||
118 | #ifdef CONFIG_SMP | 135 | #ifdef CONFIG_SMP |
136 | # ifdef CONFIG_MMU | ||
119 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, | 137 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, |
120 | const size_t *sizes, int nr_vms, | 138 | const size_t *sizes, int nr_vms, |
121 | size_t align); | 139 | size_t align); |
122 | 140 | ||
123 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); | 141 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); |
142 | # else | ||
143 | static inline struct vm_struct ** | ||
144 | pcpu_get_vm_areas(const unsigned long *offsets, | ||
145 | const size_t *sizes, int nr_vms, | ||
146 | size_t align) | ||
147 | { | ||
148 | return NULL; | ||
149 | } | ||
150 | |||
151 | static inline void | ||
152 | pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms) | ||
153 | { | ||
154 | } | ||
155 | # endif | ||
124 | #endif | 156 | #endif |
125 | 157 | ||
126 | #endif /* _LINUX_VMALLOC_H */ | 158 | #endif /* _LINUX_VMALLOC_H */ |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 461c0119664f..2b3831b58aa4 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -58,6 +58,13 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
58 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ | 58 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ |
59 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ | 59 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ |
60 | UNEVICTABLE_MLOCKFREED, | 60 | UNEVICTABLE_MLOCKFREED, |
61 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
62 | THP_FAULT_ALLOC, | ||
63 | THP_FAULT_FALLBACK, | ||
64 | THP_COLLAPSE_ALLOC, | ||
65 | THP_COLLAPSE_ALLOC_FAILED, | ||
66 | THP_SPLIT, | ||
67 | #endif | ||
61 | NR_VM_EVENT_ITEMS | 68 | NR_VM_EVENT_ITEMS |
62 | }; | 69 | }; |
63 | 70 | ||
diff --git a/include/linux/wimax.h b/include/linux/wimax.h index 4fdcc5635518..9f6b77af2f6d 100644 --- a/include/linux/wimax.h +++ b/include/linux/wimax.h | |||
@@ -114,7 +114,7 @@ enum { | |||
114 | WIMAX_GNL_RESET_IFIDX = 1, | 114 | WIMAX_GNL_RESET_IFIDX = 1, |
115 | }; | 115 | }; |
116 | 116 | ||
117 | /* Atributes for wimax_state_get() */ | 117 | /* Attributes for wimax_state_get() */ |
118 | enum { | 118 | enum { |
119 | WIMAX_GNL_STGET_IFIDX = 1, | 119 | WIMAX_GNL_STGET_IFIDX = 1, |
120 | }; | 120 | }; |
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h index bebb8efea0a6..4b697395326e 100644 --- a/include/linux/wl12xx.h +++ b/include/linux/wl12xx.h | |||
@@ -24,12 +24,26 @@ | |||
24 | #ifndef _LINUX_WL12XX_H | 24 | #ifndef _LINUX_WL12XX_H |
25 | #define _LINUX_WL12XX_H | 25 | #define _LINUX_WL12XX_H |
26 | 26 | ||
27 | /* The board reference clock values */ | 27 | /* Reference clock values */ |
28 | enum { | 28 | enum { |
29 | WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ | 29 | WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ |
30 | WL12XX_REFCLOCK_26 = 1, /* 26 MHz */ | 30 | WL12XX_REFCLOCK_26 = 1, /* 26 MHz */ |
31 | WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */ | 31 | WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */ |
32 | WL12XX_REFCLOCK_54 = 3, /* 54 MHz */ | 32 | WL12XX_REFCLOCK_52 = 3, /* 52 MHz */ |
33 | WL12XX_REFCLOCK_38_XTAL = 4, /* 38.4 MHz, XTAL */ | ||
34 | WL12XX_REFCLOCK_26_XTAL = 5, /* 26 MHz, XTAL */ | ||
35 | }; | ||
36 | |||
37 | /* TCXO clock values */ | ||
38 | enum { | ||
39 | WL12XX_TCXOCLOCK_19_2 = 0, /* 19.2MHz */ | ||
40 | WL12XX_TCXOCLOCK_26 = 1, /* 26 MHz */ | ||
41 | WL12XX_TCXOCLOCK_38_4 = 2, /* 38.4MHz */ | ||
42 | WL12XX_TCXOCLOCK_52 = 3, /* 52 MHz */ | ||
43 | WL12XX_TCXOCLOCK_16_368 = 4, /* 16.368 MHz */ | ||
44 | WL12XX_TCXOCLOCK_32_736 = 5, /* 32.736 MHz */ | ||
45 | WL12XX_TCXOCLOCK_16_8 = 6, /* 16.8 MHz */ | ||
46 | WL12XX_TCXOCLOCK_33_6 = 7, /* 33.6 MHz */ | ||
33 | }; | 47 | }; |
34 | 48 | ||
35 | struct wl12xx_platform_data { | 49 | struct wl12xx_platform_data { |
@@ -38,8 +52,13 @@ struct wl12xx_platform_data { | |||
38 | int irq; | 52 | int irq; |
39 | bool use_eeprom; | 53 | bool use_eeprom; |
40 | int board_ref_clock; | 54 | int board_ref_clock; |
55 | int board_tcxo_clock; | ||
56 | unsigned long platform_quirks; | ||
41 | }; | 57 | }; |
42 | 58 | ||
59 | /* Platform does not support level trigger interrupts */ | ||
60 | #define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0) | ||
61 | |||
43 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | 62 | #ifdef CONFIG_WL12XX_PLATFORM_DATA |
44 | 63 | ||
45 | int wl12xx_set_platform_data(const struct wl12xx_platform_data *data); | 64 | int wl12xx_set_platform_data(const struct wl12xx_platform_data *data); |
diff --git a/include/linux/xilinxfb.h b/include/linux/xilinxfb.h index f2463f559fb9..5a155a968054 100644 --- a/include/linux/xilinxfb.h +++ b/include/linux/xilinxfb.h | |||
@@ -16,7 +16,7 @@ | |||
16 | /* ML300/403 reference design framebuffer driver platform data struct */ | 16 | /* ML300/403 reference design framebuffer driver platform data struct */ |
17 | struct xilinxfb_platform_data { | 17 | struct xilinxfb_platform_data { |
18 | u32 rotate_screen; /* Flag to rotate display 180 degrees */ | 18 | u32 rotate_screen; /* Flag to rotate display 180 degrees */ |
19 | u32 screen_height_mm; /* Physical dimentions of screen in mm */ | 19 | u32 screen_height_mm; /* Physical dimensions of screen in mm */ |
20 | u32 screen_width_mm; | 20 | u32 screen_width_mm; |
21 | u32 xres, yres; /* resolution of screen in pixels */ | 21 | u32 xres, yres; /* resolution of screen in pixels */ |
22 | u32 xvirt, yvirt; /* resolution of memory buffer */ | 22 | u32 xvirt, yvirt; /* resolution of memory buffer */ |
diff --git a/include/media/davinci/dm355_ccdc.h b/include/media/davinci/dm355_ccdc.h index df8a7b107477..adf2fe4bf0bb 100644 --- a/include/media/davinci/dm355_ccdc.h +++ b/include/media/davinci/dm355_ccdc.h | |||
@@ -193,7 +193,7 @@ struct ccdc_dft_corr_mem_ctl { | |||
193 | #define CCDC_DFT_TABLE_SIZE 16 | 193 | #define CCDC_DFT_TABLE_SIZE 16 |
194 | /* | 194 | /* |
195 | * Main Structure for vertical defect correction. Vertical defect | 195 | * Main Structure for vertical defect correction. Vertical defect |
196 | * correction can correct upto 16 defects if defects less than 16 | 196 | * correction can correct up to 16 defects if defects less than 16 |
197 | * then pad the rest with 0 | 197 | * then pad the rest with 0 |
198 | */ | 198 | */ |
199 | struct ccdc_vertical_dft { | 199 | struct ccdc_vertical_dft { |
diff --git a/include/media/davinci/isif.h b/include/media/davinci/isif.h index b0b74ad618cc..7f3d76a4b9e3 100644 --- a/include/media/davinci/isif.h +++ b/include/media/davinci/isif.h | |||
@@ -199,7 +199,7 @@ struct isif_black_clamp { | |||
199 | }; | 199 | }; |
200 | 200 | ||
201 | /************************************************************************* | 201 | /************************************************************************* |
202 | ** Color Space Convertion (CSC) | 202 | ** Color Space Conversion (CSC) |
203 | *************************************************************************/ | 203 | *************************************************************************/ |
204 | #define ISIF_CSC_NUM_COEFF 16 | 204 | #define ISIF_CSC_NUM_COEFF 16 |
205 | struct isif_color_space_conv { | 205 | struct isif_color_space_conv { |
diff --git a/include/media/lirc.h b/include/media/lirc.h index 6678a169fd9e..4b3ab2966b5a 100644 --- a/include/media/lirc.h +++ b/include/media/lirc.h | |||
@@ -137,7 +137,7 @@ | |||
137 | */ | 137 | */ |
138 | #define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) | 138 | #define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) |
139 | /* | 139 | /* |
140 | * if filter cannot be set independantly for pulse/space, this should | 140 | * if filter cannot be set independently for pulse/space, this should |
141 | * be used | 141 | * be used |
142 | */ | 142 | */ |
143 | #define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) | 143 | #define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) |
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index bd102cf509ac..d61febfb1668 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h | |||
@@ -163,7 +163,7 @@ v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev); | |||
163 | ({ \ | 163 | ({ \ |
164 | struct v4l2_subdev *__sd; \ | 164 | struct v4l2_subdev *__sd; \ |
165 | __v4l2_device_call_subdevs_until_err_p(v4l2_dev, __sd, cond, o, \ | 165 | __v4l2_device_call_subdevs_until_err_p(v4l2_dev, __sd, cond, o, \ |
166 | f, args...); \ | 166 | f , ##args); \ |
167 | }) | 167 | }) |
168 | 168 | ||
169 | /* Call the specified callback for all subdevs matching grp_id (if 0, then | 169 | /* Call the specified callback for all subdevs matching grp_id (if 0, then |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 6b75a6971346..d2df55b0c213 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -119,7 +119,7 @@ do { \ | |||
119 | * @P9_TREAD: request to transfer data from a file or directory | 119 | * @P9_TREAD: request to transfer data from a file or directory |
120 | * @P9_RREAD: response with data requested | 120 | * @P9_RREAD: response with data requested |
121 | * @P9_TWRITE: reuqest to transfer data to a file | 121 | * @P9_TWRITE: reuqest to transfer data to a file |
122 | * @P9_RWRITE: response with out much data was transfered to file | 122 | * @P9_RWRITE: response with out much data was transferred to file |
123 | * @P9_TCLUNK: forget about a handle to an entity within the file system | 123 | * @P9_TCLUNK: forget about a handle to an entity within the file system |
124 | * @P9_RCLUNK: response when server has forgotten about the handle | 124 | * @P9_RCLUNK: response when server has forgotten about the handle |
125 | * @P9_TREMOVE: request to remove an entity from the hierarchy | 125 | * @P9_TREMOVE: request to remove an entity from the hierarchy |
@@ -139,8 +139,6 @@ do { \ | |||
139 | */ | 139 | */ |
140 | 140 | ||
141 | enum p9_msg_t { | 141 | enum p9_msg_t { |
142 | P9_TSYNCFS = 0, | ||
143 | P9_RSYNCFS, | ||
144 | P9_TLERROR = 6, | 142 | P9_TLERROR = 6, |
145 | P9_RLERROR, | 143 | P9_RLERROR, |
146 | P9_TSTATFS = 8, | 144 | P9_TSTATFS = 8, |
@@ -294,7 +292,7 @@ enum p9_perm_t { | |||
294 | * | 292 | * |
295 | * QID types are a subset of permissions - they are primarily | 293 | * QID types are a subset of permissions - they are primarily |
296 | * used to differentiate semantics for a file system entity via | 294 | * used to differentiate semantics for a file system entity via |
297 | * a jump-table. Their value is also the most signifigant 16 bits | 295 | * a jump-table. Their value is also the most significant 16 bits |
298 | * of the permission_t | 296 | * of the permission_t |
299 | * | 297 | * |
300 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | 298 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat |
@@ -366,8 +364,8 @@ struct p9_qid { | |||
366 | /** | 364 | /** |
367 | * struct p9_stat - file system metadata information | 365 | * struct p9_stat - file system metadata information |
368 | * @size: length prefix for this stat structure instance | 366 | * @size: length prefix for this stat structure instance |
369 | * @type: the type of the server (equivilent to a major number) | 367 | * @type: the type of the server (equivalent to a major number) |
370 | * @dev: the sub-type of the server (equivilent to a minor number) | 368 | * @dev: the sub-type of the server (equivalent to a minor number) |
371 | * @qid: unique id from the server of type &p9_qid | 369 | * @qid: unique id from the server of type &p9_qid |
372 | * @mode: Plan 9 format permissions of type &p9_perm_t | 370 | * @mode: Plan 9 format permissions of type &p9_perm_t |
373 | * @atime: Last access/read time | 371 | * @atime: Last access/read time |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 0a30977e3c1f..051a99f79769 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -101,7 +101,7 @@ enum p9_req_status_t { | |||
101 | * Transport use an array to track outstanding requests | 101 | * Transport use an array to track outstanding requests |
102 | * instead of a list. While this may incurr overhead during initial | 102 | * instead of a list. While this may incurr overhead during initial |
103 | * allocation or expansion, it makes request lookup much easier as the | 103 | * allocation or expansion, it makes request lookup much easier as the |
104 | * tag id is a index into an array. (We use tag+1 so that we can accomodate | 104 | * tag id is a index into an array. (We use tag+1 so that we can accommodate |
105 | * the -1 tag for the T_VERSION request). | 105 | * the -1 tag for the T_VERSION request). |
106 | * This also has the nice effect of only having to allocate wait_queues | 106 | * This also has the nice effect of only having to allocate wait_queues |
107 | * once, instead of constantly allocating and freeing them. Its possible | 107 | * once, instead of constantly allocating and freeing them. Its possible |
@@ -218,8 +218,8 @@ void p9_client_disconnect(struct p9_client *clnt); | |||
218 | void p9_client_begin_disconnect(struct p9_client *clnt); | 218 | void p9_client_begin_disconnect(struct p9_client *clnt); |
219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
220 | char *uname, u32 n_uname, char *aname); | 220 | char *uname, u32 n_uname, char *aname); |
221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname, |
222 | int clone); | 222 | char **wnames, int clone); |
223 | int p9_client_open(struct p9_fid *fid, int mode); | 223 | int p9_client_open(struct p9_fid *fid, int mode); |
224 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, | 224 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, |
225 | char *extension); | 225 | char *extension); |
@@ -230,7 +230,6 @@ int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, | |||
230 | gid_t gid, struct p9_qid *qid); | 230 | gid_t gid, struct p9_qid *qid); |
231 | int p9_client_clunk(struct p9_fid *fid); | 231 | int p9_client_clunk(struct p9_fid *fid); |
232 | int p9_client_fsync(struct p9_fid *fid, int datasync); | 232 | int p9_client_fsync(struct p9_fid *fid, int datasync); |
233 | int p9_client_sync_fs(struct p9_fid *fid); | ||
234 | int p9_client_remove(struct p9_fid *fid); | 233 | int p9_client_remove(struct p9_fid *fid); |
235 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, | 234 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
236 | u64 offset, u32 count); | 235 | u64 offset, u32 count); |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 82868f18c573..8f08c736c4c3 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /* Default. Add Payload to PDU before sending it down to transport layer */ | 31 | /* Default. Add Payload to PDU before sending it down to transport layer */ |
32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 | 32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 |
33 | /* Send pay load seperately to transport layer along with PDU.*/ | 33 | /* Send pay load separately to transport layer along with PDU.*/ |
34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 | 34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 |
35 | 35 | ||
36 | /** | 36 | /** |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 23710aa6a181..582e4ae70753 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -42,8 +42,6 @@ struct prefix_info { | |||
42 | }; | 42 | }; |
43 | 43 | ||
44 | 44 | ||
45 | #ifdef __KERNEL__ | ||
46 | |||
47 | #include <linux/netdevice.h> | 45 | #include <linux/netdevice.h> |
48 | #include <net/if_inet6.h> | 46 | #include <net/if_inet6.h> |
49 | #include <net/ipv6.h> | 47 | #include <net/ipv6.h> |
@@ -61,16 +59,16 @@ extern int addrconf_set_dstaddr(struct net *net, | |||
61 | void __user *arg); | 59 | void __user *arg); |
62 | 60 | ||
63 | extern int ipv6_chk_addr(struct net *net, | 61 | extern int ipv6_chk_addr(struct net *net, |
64 | struct in6_addr *addr, | 62 | const struct in6_addr *addr, |
65 | struct net_device *dev, | 63 | struct net_device *dev, |
66 | int strict); | 64 | int strict); |
67 | 65 | ||
68 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) | 66 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
69 | extern int ipv6_chk_home_addr(struct net *net, | 67 | extern int ipv6_chk_home_addr(struct net *net, |
70 | struct in6_addr *addr); | 68 | const struct in6_addr *addr); |
71 | #endif | 69 | #endif |
72 | 70 | ||
73 | extern int ipv6_chk_prefix(struct in6_addr *addr, | 71 | extern int ipv6_chk_prefix(const struct in6_addr *addr, |
74 | struct net_device *dev); | 72 | struct net_device *dev); |
75 | 73 | ||
76 | extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, | 74 | extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, |
@@ -89,9 +87,9 @@ extern int ipv6_get_lladdr(struct net_device *dev, | |||
89 | extern int ipv6_rcv_saddr_equal(const struct sock *sk, | 87 | extern int ipv6_rcv_saddr_equal(const struct sock *sk, |
90 | const struct sock *sk2); | 88 | const struct sock *sk2); |
91 | extern void addrconf_join_solict(struct net_device *dev, | 89 | extern void addrconf_join_solict(struct net_device *dev, |
92 | struct in6_addr *addr); | 90 | const struct in6_addr *addr); |
93 | extern void addrconf_leave_solict(struct inet6_dev *idev, | 91 | extern void addrconf_leave_solict(struct inet6_dev *idev, |
94 | struct in6_addr *addr); | 92 | const struct in6_addr *addr); |
95 | 93 | ||
96 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, | 94 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, |
97 | unsigned unit) | 95 | unsigned unit) |
@@ -158,15 +156,15 @@ extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len); | |||
158 | /* | 156 | /* |
159 | * anycast prototypes (anycast.c) | 157 | * anycast prototypes (anycast.c) |
160 | */ | 158 | */ |
161 | extern int ipv6_sock_ac_join(struct sock *sk,int ifindex,struct in6_addr *addr); | 159 | extern int ipv6_sock_ac_join(struct sock *sk,int ifindex, const struct in6_addr *addr); |
162 | extern int ipv6_sock_ac_drop(struct sock *sk,int ifindex,struct in6_addr *addr); | 160 | extern int ipv6_sock_ac_drop(struct sock *sk,int ifindex, const struct in6_addr *addr); |
163 | extern void ipv6_sock_ac_close(struct sock *sk); | 161 | extern void ipv6_sock_ac_close(struct sock *sk); |
164 | extern int inet6_ac_check(struct sock *sk, struct in6_addr *addr, int ifindex); | 162 | extern int inet6_ac_check(struct sock *sk, const struct in6_addr *addr, int ifindex); |
165 | 163 | ||
166 | extern int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr); | 164 | extern int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr); |
167 | extern int __ipv6_dev_ac_dec(struct inet6_dev *idev, struct in6_addr *addr); | 165 | extern int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr); |
168 | extern int ipv6_chk_acast_addr(struct net *net, struct net_device *dev, | 166 | extern int ipv6_chk_acast_addr(struct net *net, struct net_device *dev, |
169 | struct in6_addr *addr); | 167 | const struct in6_addr *addr); |
170 | 168 | ||
171 | 169 | ||
172 | /* Device notifier */ | 170 | /* Device notifier */ |
@@ -285,4 +283,3 @@ extern void if6_proc_exit(void); | |||
285 | #endif | 283 | #endif |
286 | 284 | ||
287 | #endif | 285 | #endif |
288 | #endif | ||
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h index 00c2eaa07c25..03e6e9453623 100644 --- a/include/net/af_rxrpc.h +++ b/include/net/af_rxrpc.h | |||
@@ -12,8 +12,6 @@ | |||
12 | #ifndef _NET_RXRPC_H | 12 | #ifndef _NET_RXRPC_H |
13 | #define _NET_RXRPC_H | 13 | #define _NET_RXRPC_H |
14 | 14 | ||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | #include <linux/rxrpc.h> | 15 | #include <linux/rxrpc.h> |
18 | 16 | ||
19 | struct rxrpc_call; | 17 | struct rxrpc_call; |
@@ -53,5 +51,4 @@ extern struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *, | |||
53 | unsigned long); | 51 | unsigned long); |
54 | extern int rxrpc_kernel_reject_call(struct socket *); | 52 | extern int rxrpc_kernel_reject_call(struct socket *); |
55 | 53 | ||
56 | #endif /* __KERNEL__ */ | ||
57 | #endif /* _NET_RXRPC_H */ | 54 | #endif /* _NET_RXRPC_H */ |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 18e5c3f67580..91ab5b01678a 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -41,7 +41,6 @@ struct unix_skb_parms { | |||
41 | spin_lock_nested(&unix_sk(s)->lock, \ | 41 | spin_lock_nested(&unix_sk(s)->lock, \ |
42 | SINGLE_DEPTH_NESTING) | 42 | SINGLE_DEPTH_NESTING) |
43 | 43 | ||
44 | #ifdef __KERNEL__ | ||
45 | /* The AF_UNIX socket */ | 44 | /* The AF_UNIX socket */ |
46 | struct unix_sock { | 45 | struct unix_sock { |
47 | /* WARNING: sk has to be the first member */ | 46 | /* WARNING: sk has to be the first member */ |
@@ -72,4 +71,3 @@ static inline int unix_sysctl_register(struct net *net) { return 0; } | |||
72 | static inline void unix_sysctl_unregister(struct net *net) {} | 71 | static inline void unix_sysctl_unregister(struct net *net) {} |
73 | #endif | 72 | #endif |
74 | #endif | 73 | #endif |
75 | #endif | ||
diff --git a/include/net/atmclip.h b/include/net/atmclip.h index 467c531b8a7e..497ef6444a7a 100644 --- a/include/net/atmclip.h +++ b/include/net/atmclip.h | |||
@@ -54,8 +54,6 @@ struct clip_priv { | |||
54 | }; | 54 | }; |
55 | 55 | ||
56 | 56 | ||
57 | #ifdef __KERNEL__ | ||
58 | extern struct neigh_table *clip_tbl_hook; | 57 | extern struct neigh_table *clip_tbl_hook; |
59 | #endif | ||
60 | 58 | ||
61 | #endif | 59 | #endif |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index ec6acf2f1c0b..0c20227e57f6 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -84,6 +84,8 @@ enum { | |||
84 | HCI_SERVICE_CACHE, | 84 | HCI_SERVICE_CACHE, |
85 | HCI_LINK_KEYS, | 85 | HCI_LINK_KEYS, |
86 | HCI_DEBUG_KEYS, | 86 | HCI_DEBUG_KEYS, |
87 | |||
88 | HCI_RESET, | ||
87 | }; | 89 | }; |
88 | 90 | ||
89 | /* HCI ioctl defines */ | 91 | /* HCI ioctl defines */ |
@@ -244,6 +246,15 @@ enum { | |||
244 | #define HCI_AT_GENERAL_BONDING 0x04 | 246 | #define HCI_AT_GENERAL_BONDING 0x04 |
245 | #define HCI_AT_GENERAL_BONDING_MITM 0x05 | 247 | #define HCI_AT_GENERAL_BONDING_MITM 0x05 |
246 | 248 | ||
249 | /* Link Key types */ | ||
250 | #define HCI_LK_COMBINATION 0x00 | ||
251 | #define HCI_LK_LOCAL_UNIT 0x01 | ||
252 | #define HCI_LK_REMOTE_UNIT 0x02 | ||
253 | #define HCI_LK_DEBUG_COMBINATION 0x03 | ||
254 | #define HCI_LK_UNAUTH_COMBINATION 0x04 | ||
255 | #define HCI_LK_AUTH_COMBINATION 0x05 | ||
256 | #define HCI_LK_CHANGED_COMBINATION 0x06 | ||
257 | |||
247 | /* ----- HCI Commands ---- */ | 258 | /* ----- HCI Commands ---- */ |
248 | #define HCI_OP_NOP 0x0000 | 259 | #define HCI_OP_NOP 0x0000 |
249 | 260 | ||
@@ -426,6 +437,18 @@ struct hci_rp_user_confirm_reply { | |||
426 | 437 | ||
427 | #define HCI_OP_USER_CONFIRM_NEG_REPLY 0x042d | 438 | #define HCI_OP_USER_CONFIRM_NEG_REPLY 0x042d |
428 | 439 | ||
440 | #define HCI_OP_REMOTE_OOB_DATA_REPLY 0x0430 | ||
441 | struct hci_cp_remote_oob_data_reply { | ||
442 | bdaddr_t bdaddr; | ||
443 | __u8 hash[16]; | ||
444 | __u8 randomizer[16]; | ||
445 | } __packed; | ||
446 | |||
447 | #define HCI_OP_REMOTE_OOB_DATA_NEG_REPLY 0x0433 | ||
448 | struct hci_cp_remote_oob_data_neg_reply { | ||
449 | bdaddr_t bdaddr; | ||
450 | } __packed; | ||
451 | |||
429 | #define HCI_OP_IO_CAPABILITY_NEG_REPLY 0x0434 | 452 | #define HCI_OP_IO_CAPABILITY_NEG_REPLY 0x0434 |
430 | struct hci_cp_io_capability_neg_reply { | 453 | struct hci_cp_io_capability_neg_reply { |
431 | bdaddr_t bdaddr; | 454 | bdaddr_t bdaddr; |
@@ -535,15 +558,17 @@ struct hci_cp_delete_stored_link_key { | |||
535 | __u8 delete_all; | 558 | __u8 delete_all; |
536 | } __packed; | 559 | } __packed; |
537 | 560 | ||
561 | #define HCI_MAX_NAME_LENGTH 248 | ||
562 | |||
538 | #define HCI_OP_WRITE_LOCAL_NAME 0x0c13 | 563 | #define HCI_OP_WRITE_LOCAL_NAME 0x0c13 |
539 | struct hci_cp_write_local_name { | 564 | struct hci_cp_write_local_name { |
540 | __u8 name[248]; | 565 | __u8 name[HCI_MAX_NAME_LENGTH]; |
541 | } __packed; | 566 | } __packed; |
542 | 567 | ||
543 | #define HCI_OP_READ_LOCAL_NAME 0x0c14 | 568 | #define HCI_OP_READ_LOCAL_NAME 0x0c14 |
544 | struct hci_rp_read_local_name { | 569 | struct hci_rp_read_local_name { |
545 | __u8 status; | 570 | __u8 status; |
546 | __u8 name[248]; | 571 | __u8 name[HCI_MAX_NAME_LENGTH]; |
547 | } __packed; | 572 | } __packed; |
548 | 573 | ||
549 | #define HCI_OP_WRITE_CA_TIMEOUT 0x0c16 | 574 | #define HCI_OP_WRITE_CA_TIMEOUT 0x0c16 |
@@ -600,6 +625,14 @@ struct hci_cp_host_buffer_size { | |||
600 | 625 | ||
601 | #define HCI_OP_WRITE_INQUIRY_MODE 0x0c45 | 626 | #define HCI_OP_WRITE_INQUIRY_MODE 0x0c45 |
602 | 627 | ||
628 | #define HCI_MAX_EIR_LENGTH 240 | ||
629 | |||
630 | #define HCI_OP_WRITE_EIR 0x0c52 | ||
631 | struct hci_cp_write_eir { | ||
632 | uint8_t fec; | ||
633 | uint8_t data[HCI_MAX_EIR_LENGTH]; | ||
634 | } __packed; | ||
635 | |||
603 | #define HCI_OP_READ_SSP_MODE 0x0c55 | 636 | #define HCI_OP_READ_SSP_MODE 0x0c55 |
604 | struct hci_rp_read_ssp_mode { | 637 | struct hci_rp_read_ssp_mode { |
605 | __u8 status; | 638 | __u8 status; |
@@ -611,6 +644,13 @@ struct hci_cp_write_ssp_mode { | |||
611 | __u8 mode; | 644 | __u8 mode; |
612 | } __packed; | 645 | } __packed; |
613 | 646 | ||
647 | #define HCI_OP_READ_LOCAL_OOB_DATA 0x0c57 | ||
648 | struct hci_rp_read_local_oob_data { | ||
649 | __u8 status; | ||
650 | __u8 hash[16]; | ||
651 | __u8 randomizer[16]; | ||
652 | } __packed; | ||
653 | |||
614 | #define HCI_OP_READ_INQ_RSP_TX_POWER 0x0c58 | 654 | #define HCI_OP_READ_INQ_RSP_TX_POWER 0x0c58 |
615 | 655 | ||
616 | #define HCI_OP_READ_LOCAL_VERSION 0x1001 | 656 | #define HCI_OP_READ_LOCAL_VERSION 0x1001 |
@@ -745,7 +785,7 @@ struct hci_ev_auth_complete { | |||
745 | struct hci_ev_remote_name { | 785 | struct hci_ev_remote_name { |
746 | __u8 status; | 786 | __u8 status; |
747 | bdaddr_t bdaddr; | 787 | bdaddr_t bdaddr; |
748 | __u8 name[248]; | 788 | __u8 name[HCI_MAX_NAME_LENGTH]; |
749 | } __packed; | 789 | } __packed; |
750 | 790 | ||
751 | #define HCI_EV_ENCRYPT_CHANGE 0x08 | 791 | #define HCI_EV_ENCRYPT_CHANGE 0x08 |
@@ -953,6 +993,11 @@ struct hci_ev_user_confirm_req { | |||
953 | __le32 passkey; | 993 | __le32 passkey; |
954 | } __packed; | 994 | } __packed; |
955 | 995 | ||
996 | #define HCI_EV_REMOTE_OOB_DATA_REQUEST 0x35 | ||
997 | struct hci_ev_remote_oob_data_request { | ||
998 | bdaddr_t bdaddr; | ||
999 | } __packed; | ||
1000 | |||
956 | #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 | 1001 | #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 |
957 | struct hci_ev_simple_pair_complete { | 1002 | struct hci_ev_simple_pair_complete { |
958 | __u8 status; | 1003 | __u8 status; |
@@ -1031,7 +1076,6 @@ struct hci_sco_hdr { | |||
1031 | __u8 dlen; | 1076 | __u8 dlen; |
1032 | } __packed; | 1077 | } __packed; |
1033 | 1078 | ||
1034 | #ifdef __KERNEL__ | ||
1035 | #include <linux/skbuff.h> | 1079 | #include <linux/skbuff.h> |
1036 | static inline struct hci_event_hdr *hci_event_hdr(const struct sk_buff *skb) | 1080 | static inline struct hci_event_hdr *hci_event_hdr(const struct sk_buff *skb) |
1037 | { | 1081 | { |
@@ -1047,7 +1091,6 @@ static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb) | |||
1047 | { | 1091 | { |
1048 | return (struct hci_sco_hdr *) skb->data; | 1092 | return (struct hci_sco_hdr *) skb->data; |
1049 | } | 1093 | } |
1050 | #endif | ||
1051 | 1094 | ||
1052 | /* Command opcode pack/unpack */ | 1095 | /* Command opcode pack/unpack */ |
1053 | #define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10)) | 1096 | #define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10)) |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 441dadbf6a89..6c994c004d15 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -82,6 +82,13 @@ struct link_key { | |||
82 | u8 pin_len; | 82 | u8 pin_len; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | struct oob_data { | ||
86 | struct list_head list; | ||
87 | bdaddr_t bdaddr; | ||
88 | u8 hash[16]; | ||
89 | u8 randomizer[16]; | ||
90 | }; | ||
91 | |||
85 | #define NUM_REASSEMBLY 4 | 92 | #define NUM_REASSEMBLY 4 |
86 | struct hci_dev { | 93 | struct hci_dev { |
87 | struct list_head list; | 94 | struct list_head list; |
@@ -94,7 +101,8 @@ struct hci_dev { | |||
94 | __u8 bus; | 101 | __u8 bus; |
95 | __u8 dev_type; | 102 | __u8 dev_type; |
96 | bdaddr_t bdaddr; | 103 | bdaddr_t bdaddr; |
97 | __u8 dev_name[248]; | 104 | __u8 dev_name[HCI_MAX_NAME_LENGTH]; |
105 | __u8 eir[HCI_MAX_EIR_LENGTH]; | ||
98 | __u8 dev_class[3]; | 106 | __u8 dev_class[3]; |
99 | __u8 major_class; | 107 | __u8 major_class; |
100 | __u8 minor_class; | 108 | __u8 minor_class; |
@@ -118,6 +126,8 @@ struct hci_dev { | |||
118 | __u16 sniff_min_interval; | 126 | __u16 sniff_min_interval; |
119 | __u16 sniff_max_interval; | 127 | __u16 sniff_max_interval; |
120 | 128 | ||
129 | unsigned int auto_accept_delay; | ||
130 | |||
121 | unsigned long quirks; | 131 | unsigned long quirks; |
122 | 132 | ||
123 | atomic_t cmd_cnt; | 133 | atomic_t cmd_cnt; |
@@ -169,6 +179,8 @@ struct hci_dev { | |||
169 | 179 | ||
170 | struct list_head link_keys; | 180 | struct list_head link_keys; |
171 | 181 | ||
182 | struct list_head remote_oob_data; | ||
183 | |||
172 | struct hci_dev_stats stat; | 184 | struct hci_dev_stats stat; |
173 | 185 | ||
174 | struct sk_buff_head driver_init; | 186 | struct sk_buff_head driver_init; |
@@ -216,6 +228,7 @@ struct hci_conn { | |||
216 | __u16 pkt_type; | 228 | __u16 pkt_type; |
217 | __u16 link_policy; | 229 | __u16 link_policy; |
218 | __u32 link_mode; | 230 | __u32 link_mode; |
231 | __u8 key_type; | ||
219 | __u8 auth_type; | 232 | __u8 auth_type; |
220 | __u8 sec_level; | 233 | __u8 sec_level; |
221 | __u8 pending_sec_level; | 234 | __u8 pending_sec_level; |
@@ -235,6 +248,7 @@ struct hci_conn { | |||
235 | 248 | ||
236 | struct timer_list disc_timer; | 249 | struct timer_list disc_timer; |
237 | struct timer_list idle_timer; | 250 | struct timer_list idle_timer; |
251 | struct timer_list auto_accept_timer; | ||
238 | 252 | ||
239 | struct work_struct work_add; | 253 | struct work_struct work_add; |
240 | struct work_struct work_del; | 254 | struct work_struct work_del; |
@@ -408,6 +422,7 @@ void hci_conn_check_pending(struct hci_dev *hdev); | |||
408 | 422 | ||
409 | struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 sec_level, __u8 auth_type); | 423 | struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 sec_level, __u8 auth_type); |
410 | int hci_conn_check_link_mode(struct hci_conn *conn); | 424 | int hci_conn_check_link_mode(struct hci_conn *conn); |
425 | int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level); | ||
411 | int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type); | 426 | int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type); |
412 | int hci_conn_change_link_key(struct hci_conn *conn); | 427 | int hci_conn_change_link_key(struct hci_conn *conn); |
413 | int hci_conn_switch_role(struct hci_conn *conn, __u8 role); | 428 | int hci_conn_switch_role(struct hci_conn *conn, __u8 role); |
@@ -501,10 +516,17 @@ int hci_uuids_clear(struct hci_dev *hdev); | |||
501 | 516 | ||
502 | int hci_link_keys_clear(struct hci_dev *hdev); | 517 | int hci_link_keys_clear(struct hci_dev *hdev); |
503 | struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 518 | struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
504 | int hci_add_link_key(struct hci_dev *hdev, int new_key, bdaddr_t *bdaddr, | 519 | int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, |
505 | u8 *key, u8 type, u8 pin_len); | 520 | bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len); |
506 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 521 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
507 | 522 | ||
523 | int hci_remote_oob_data_clear(struct hci_dev *hdev); | ||
524 | struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev, | ||
525 | bdaddr_t *bdaddr); | ||
526 | int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash, | ||
527 | u8 *randomizer); | ||
528 | int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr); | ||
529 | |||
508 | void hci_del_off_timer(struct hci_dev *hdev); | 530 | void hci_del_off_timer(struct hci_dev *hdev); |
509 | 531 | ||
510 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); | 532 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); |
@@ -754,19 +776,27 @@ int mgmt_index_removed(u16 index); | |||
754 | int mgmt_powered(u16 index, u8 powered); | 776 | int mgmt_powered(u16 index, u8 powered); |
755 | int mgmt_discoverable(u16 index, u8 discoverable); | 777 | int mgmt_discoverable(u16 index, u8 discoverable); |
756 | int mgmt_connectable(u16 index, u8 connectable); | 778 | int mgmt_connectable(u16 index, u8 connectable); |
757 | int mgmt_new_key(u16 index, struct link_key *key, u8 old_key_type); | 779 | int mgmt_new_key(u16 index, struct link_key *key, u8 persistent); |
758 | int mgmt_connected(u16 index, bdaddr_t *bdaddr); | 780 | int mgmt_connected(u16 index, bdaddr_t *bdaddr); |
759 | int mgmt_disconnected(u16 index, bdaddr_t *bdaddr); | 781 | int mgmt_disconnected(u16 index, bdaddr_t *bdaddr); |
760 | int mgmt_disconnect_failed(u16 index); | 782 | int mgmt_disconnect_failed(u16 index); |
761 | int mgmt_connect_failed(u16 index, bdaddr_t *bdaddr, u8 status); | 783 | int mgmt_connect_failed(u16 index, bdaddr_t *bdaddr, u8 status); |
762 | int mgmt_pin_code_request(u16 index, bdaddr_t *bdaddr); | 784 | int mgmt_pin_code_request(u16 index, bdaddr_t *bdaddr, u8 secure); |
763 | int mgmt_pin_code_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | 785 | int mgmt_pin_code_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); |
764 | int mgmt_pin_code_neg_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | 786 | int mgmt_pin_code_neg_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); |
765 | int mgmt_user_confirm_request(u16 index, bdaddr_t *bdaddr, __le32 value); | 787 | int mgmt_user_confirm_request(u16 index, bdaddr_t *bdaddr, __le32 value, |
788 | u8 confirm_hint); | ||
766 | int mgmt_user_confirm_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | 789 | int mgmt_user_confirm_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); |
767 | int mgmt_user_confirm_neg_reply_complete(u16 index, bdaddr_t *bdaddr, | 790 | int mgmt_user_confirm_neg_reply_complete(u16 index, bdaddr_t *bdaddr, |
768 | u8 status); | 791 | u8 status); |
769 | int mgmt_auth_failed(u16 index, bdaddr_t *bdaddr, u8 status); | 792 | int mgmt_auth_failed(u16 index, bdaddr_t *bdaddr, u8 status); |
793 | int mgmt_set_local_name_complete(u16 index, u8 *name, u8 status); | ||
794 | int mgmt_read_local_oob_data_reply_complete(u16 index, u8 *hash, u8 *randomizer, | ||
795 | u8 status); | ||
796 | int mgmt_device_found(u16 index, bdaddr_t *bdaddr, u8 *dev_class, s8 rssi, | ||
797 | u8 *eir); | ||
798 | int mgmt_remote_name(u16 index, bdaddr_t *bdaddr, u8 *name); | ||
799 | int mgmt_discovering(u16 index, u8 discovering); | ||
770 | 800 | ||
771 | /* HCI info for socket */ | 801 | /* HCI info for socket */ |
772 | #define hci_pi(sk) ((struct hci_pinfo *) sk) | 802 | #define hci_pi(sk) ((struct hci_pinfo *) sk) |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 4f4bff1eaed6..d09c9b1118e3 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -276,63 +276,17 @@ struct l2cap_conn_param_update_rsp { | |||
276 | #define L2CAP_CONN_PARAM_ACCEPTED 0x0000 | 276 | #define L2CAP_CONN_PARAM_ACCEPTED 0x0000 |
277 | #define L2CAP_CONN_PARAM_REJECTED 0x0001 | 277 | #define L2CAP_CONN_PARAM_REJECTED 0x0001 |
278 | 278 | ||
279 | /* ----- L2CAP connections ----- */ | 279 | /* ----- L2CAP channels and connections ----- */ |
280 | struct l2cap_chan_list { | ||
281 | struct sock *head; | ||
282 | rwlock_t lock; | ||
283 | long num; | ||
284 | }; | ||
285 | |||
286 | struct l2cap_conn { | ||
287 | struct hci_conn *hcon; | ||
288 | |||
289 | bdaddr_t *dst; | ||
290 | bdaddr_t *src; | ||
291 | |||
292 | unsigned int mtu; | ||
293 | |||
294 | __u32 feat_mask; | ||
295 | |||
296 | __u8 info_state; | ||
297 | __u8 info_ident; | ||
298 | |||
299 | struct timer_list info_timer; | ||
300 | |||
301 | spinlock_t lock; | ||
302 | |||
303 | struct sk_buff *rx_skb; | ||
304 | __u32 rx_len; | ||
305 | __u8 rx_ident; | ||
306 | __u8 tx_ident; | ||
307 | |||
308 | __u8 disc_reason; | ||
309 | |||
310 | struct l2cap_chan_list chan_list; | ||
311 | }; | ||
312 | |||
313 | struct sock_del_list { | ||
314 | struct sock *sk; | ||
315 | struct list_head list; | ||
316 | }; | ||
317 | |||
318 | #define L2CAP_INFO_CL_MTU_REQ_SENT 0x01 | ||
319 | #define L2CAP_INFO_FEAT_MASK_REQ_SENT 0x04 | ||
320 | #define L2CAP_INFO_FEAT_MASK_REQ_DONE 0x08 | ||
321 | |||
322 | /* ----- L2CAP channel and socket info ----- */ | ||
323 | #define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) | ||
324 | #define TX_QUEUE(sk) (&l2cap_pi(sk)->tx_queue) | ||
325 | #define SREJ_QUEUE(sk) (&l2cap_pi(sk)->srej_queue) | ||
326 | #define BUSY_QUEUE(sk) (&l2cap_pi(sk)->busy_queue) | ||
327 | #define SREJ_LIST(sk) (&l2cap_pi(sk)->srej_l.list) | ||
328 | |||
329 | struct srej_list { | 280 | struct srej_list { |
330 | __u8 tx_seq; | 281 | __u8 tx_seq; |
331 | struct list_head list; | 282 | struct list_head list; |
332 | }; | 283 | }; |
333 | 284 | ||
334 | struct l2cap_pinfo { | 285 | struct l2cap_chan { |
335 | struct bt_sock bt; | 286 | struct sock *sk; |
287 | |||
288 | struct l2cap_conn *conn; | ||
289 | |||
336 | __le16 psm; | 290 | __le16 psm; |
337 | __u16 dcid; | 291 | __u16 dcid; |
338 | __u16 scid; | 292 | __u16 scid; |
@@ -341,17 +295,29 @@ struct l2cap_pinfo { | |||
341 | __u16 omtu; | 295 | __u16 omtu; |
342 | __u16 flush_to; | 296 | __u16 flush_to; |
343 | __u8 mode; | 297 | __u8 mode; |
344 | __u8 num_conf_req; | ||
345 | __u8 num_conf_rsp; | ||
346 | 298 | ||
347 | __u8 fcs; | 299 | __le16 sport; |
300 | |||
348 | __u8 sec_level; | 301 | __u8 sec_level; |
349 | __u8 role_switch; | 302 | __u8 role_switch; |
350 | __u8 force_reliable; | 303 | __u8 force_reliable; |
351 | __u8 flushable; | 304 | __u8 flushable; |
352 | 305 | ||
306 | __u8 ident; | ||
307 | |||
353 | __u8 conf_req[64]; | 308 | __u8 conf_req[64]; |
354 | __u8 conf_len; | 309 | __u8 conf_len; |
310 | __u8 num_conf_req; | ||
311 | __u8 num_conf_rsp; | ||
312 | |||
313 | __u8 fcs; | ||
314 | |||
315 | __u8 tx_win; | ||
316 | __u8 max_tx; | ||
317 | __u16 retrans_timeout; | ||
318 | __u16 monitor_timeout; | ||
319 | __u16 mps; | ||
320 | |||
355 | __u8 conf_state; | 321 | __u8 conf_state; |
356 | __u16 conn_state; | 322 | __u16 conn_state; |
357 | 323 | ||
@@ -369,30 +335,61 @@ struct l2cap_pinfo { | |||
369 | __u16 partial_sdu_len; | 335 | __u16 partial_sdu_len; |
370 | struct sk_buff *sdu; | 336 | struct sk_buff *sdu; |
371 | 337 | ||
372 | __u8 ident; | ||
373 | |||
374 | __u8 tx_win; | ||
375 | __u8 max_tx; | ||
376 | __u8 remote_tx_win; | 338 | __u8 remote_tx_win; |
377 | __u8 remote_max_tx; | 339 | __u8 remote_max_tx; |
378 | __u16 retrans_timeout; | ||
379 | __u16 monitor_timeout; | ||
380 | __u16 remote_mps; | 340 | __u16 remote_mps; |
381 | __u16 mps; | ||
382 | |||
383 | __le16 sport; | ||
384 | 341 | ||
385 | struct timer_list retrans_timer; | 342 | struct timer_list retrans_timer; |
386 | struct timer_list monitor_timer; | 343 | struct timer_list monitor_timer; |
387 | struct timer_list ack_timer; | 344 | struct timer_list ack_timer; |
388 | struct sk_buff_head tx_queue; | 345 | struct sk_buff *tx_send_head; |
389 | struct sk_buff_head srej_queue; | 346 | struct sk_buff_head tx_q; |
390 | struct sk_buff_head busy_queue; | 347 | struct sk_buff_head srej_q; |
348 | struct sk_buff_head busy_q; | ||
391 | struct work_struct busy_work; | 349 | struct work_struct busy_work; |
392 | struct srej_list srej_l; | 350 | struct list_head srej_l; |
393 | struct l2cap_conn *conn; | 351 | |
394 | struct sock *next_c; | 352 | struct list_head list; |
395 | struct sock *prev_c; | 353 | struct list_head global_l; |
354 | }; | ||
355 | |||
356 | struct l2cap_conn { | ||
357 | struct hci_conn *hcon; | ||
358 | |||
359 | bdaddr_t *dst; | ||
360 | bdaddr_t *src; | ||
361 | |||
362 | unsigned int mtu; | ||
363 | |||
364 | __u32 feat_mask; | ||
365 | |||
366 | __u8 info_state; | ||
367 | __u8 info_ident; | ||
368 | |||
369 | struct timer_list info_timer; | ||
370 | |||
371 | spinlock_t lock; | ||
372 | |||
373 | struct sk_buff *rx_skb; | ||
374 | __u32 rx_len; | ||
375 | __u8 tx_ident; | ||
376 | |||
377 | __u8 disc_reason; | ||
378 | |||
379 | struct list_head chan_l; | ||
380 | rwlock_t chan_lock; | ||
381 | }; | ||
382 | |||
383 | #define L2CAP_INFO_CL_MTU_REQ_SENT 0x01 | ||
384 | #define L2CAP_INFO_FEAT_MASK_REQ_SENT 0x04 | ||
385 | #define L2CAP_INFO_FEAT_MASK_REQ_DONE 0x08 | ||
386 | |||
387 | /* ----- L2CAP socket info ----- */ | ||
388 | #define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) | ||
389 | |||
390 | struct l2cap_pinfo { | ||
391 | struct bt_sock bt; | ||
392 | struct l2cap_chan *chan; | ||
396 | }; | 393 | }; |
397 | 394 | ||
398 | #define L2CAP_CONF_REQ_SENT 0x01 | 395 | #define L2CAP_CONF_REQ_SENT 0x01 |
@@ -419,24 +416,23 @@ struct l2cap_pinfo { | |||
419 | #define L2CAP_CONN_RNR_SENT 0x0200 | 416 | #define L2CAP_CONN_RNR_SENT 0x0200 |
420 | #define L2CAP_CONN_SAR_RETRY 0x0400 | 417 | #define L2CAP_CONN_SAR_RETRY 0x0400 |
421 | 418 | ||
422 | #define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ | 419 | #define __mod_retrans_timer() mod_timer(&chan->retrans_timer, \ |
423 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); | 420 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); |
424 | #define __mod_monitor_timer() mod_timer(&l2cap_pi(sk)->monitor_timer, \ | 421 | #define __mod_monitor_timer() mod_timer(&chan->monitor_timer, \ |
425 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO)); | 422 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO)); |
426 | #define __mod_ack_timer() mod_timer(&l2cap_pi(sk)->ack_timer, \ | 423 | #define __mod_ack_timer() mod_timer(&chan->ack_timer, \ |
427 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_ACK_TO)); | 424 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_ACK_TO)); |
428 | 425 | ||
429 | static inline int l2cap_tx_window_full(struct sock *sk) | 426 | static inline int l2cap_tx_window_full(struct l2cap_chan *ch) |
430 | { | 427 | { |
431 | struct l2cap_pinfo *pi = l2cap_pi(sk); | ||
432 | int sub; | 428 | int sub; |
433 | 429 | ||
434 | sub = (pi->next_tx_seq - pi->expected_ack_seq) % 64; | 430 | sub = (ch->next_tx_seq - ch->expected_ack_seq) % 64; |
435 | 431 | ||
436 | if (sub < 0) | 432 | if (sub < 0) |
437 | sub += 64; | 433 | sub += 64; |
438 | 434 | ||
439 | return sub == pi->remote_tx_win; | 435 | return sub == ch->remote_tx_win; |
440 | } | 436 | } |
441 | 437 | ||
442 | #define __get_txseq(ctrl) (((ctrl) & L2CAP_CTRL_TXSEQ) >> 1) | 438 | #define __get_txseq(ctrl) (((ctrl) & L2CAP_CTRL_TXSEQ) >> 1) |
@@ -446,24 +442,24 @@ static inline int l2cap_tx_window_full(struct sock *sk) | |||
446 | #define __is_sar_start(ctrl) (((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START) | 442 | #define __is_sar_start(ctrl) (((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START) |
447 | 443 | ||
448 | extern int disable_ertm; | 444 | extern int disable_ertm; |
449 | extern const struct proto_ops l2cap_sock_ops; | ||
450 | extern struct bt_sock_list l2cap_sk_list; | ||
451 | 445 | ||
452 | int l2cap_init_sockets(void); | 446 | int l2cap_init_sockets(void); |
453 | void l2cap_cleanup_sockets(void); | 447 | void l2cap_cleanup_sockets(void); |
454 | 448 | ||
455 | u8 l2cap_get_ident(struct l2cap_conn *conn); | ||
456 | void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len, void *data); | 449 | void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len, void *data); |
457 | int l2cap_build_conf_req(struct sock *sk, void *data); | 450 | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan); |
458 | int __l2cap_wait_ack(struct sock *sk); | 451 | int __l2cap_wait_ack(struct sock *sk); |
459 | 452 | ||
460 | struct sk_buff *l2cap_create_connless_pdu(struct sock *sk, struct msghdr *msg, size_t len); | 453 | struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan, struct msghdr *msg, size_t len); |
461 | struct sk_buff *l2cap_create_basic_pdu(struct sock *sk, struct msghdr *msg, size_t len); | 454 | struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan, struct msghdr *msg, size_t len); |
462 | struct sk_buff *l2cap_create_iframe_pdu(struct sock *sk, struct msghdr *msg, size_t len, u16 control, u16 sdulen); | 455 | struct sk_buff *l2cap_create_iframe_pdu(struct l2cap_chan *chan, struct msghdr *msg, size_t len, u16 control, u16 sdulen); |
463 | int l2cap_sar_segment_sdu(struct sock *sk, struct msghdr *msg, size_t len); | 456 | int l2cap_sar_segment_sdu(struct l2cap_chan *chan, struct msghdr *msg, size_t len); |
464 | void l2cap_do_send(struct sock *sk, struct sk_buff *skb); | 457 | void l2cap_do_send(struct l2cap_chan *chan, struct sk_buff *skb); |
465 | void l2cap_streaming_send(struct sock *sk); | 458 | void l2cap_streaming_send(struct l2cap_chan *chan); |
466 | int l2cap_ertm_send(struct sock *sk); | 459 | int l2cap_ertm_send(struct l2cap_chan *chan); |
460 | |||
461 | int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm); | ||
462 | int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid); | ||
467 | 463 | ||
468 | void l2cap_sock_set_timer(struct sock *sk, long timeout); | 464 | void l2cap_sock_set_timer(struct sock *sk, long timeout); |
469 | void l2cap_sock_clear_timer(struct sock *sk); | 465 | void l2cap_sock_clear_timer(struct sock *sk); |
@@ -472,8 +468,10 @@ void l2cap_sock_kill(struct sock *sk); | |||
472 | void l2cap_sock_init(struct sock *sk, struct sock *parent); | 468 | void l2cap_sock_init(struct sock *sk, struct sock *parent); |
473 | struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, | 469 | struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, |
474 | int proto, gfp_t prio); | 470 | int proto, gfp_t prio); |
475 | void l2cap_send_disconn_req(struct l2cap_conn *conn, struct sock *sk, int err); | 471 | void l2cap_send_disconn_req(struct l2cap_conn *conn, struct l2cap_chan *chan, int err); |
476 | void l2cap_chan_del(struct sock *sk, int err); | 472 | struct l2cap_chan *l2cap_chan_create(struct sock *sk); |
477 | int l2cap_do_connect(struct sock *sk); | 473 | void l2cap_chan_del(struct l2cap_chan *chan, int err); |
474 | void l2cap_chan_destroy(struct l2cap_chan *chan); | ||
475 | int l2cap_chan_connect(struct l2cap_chan *chan); | ||
478 | 476 | ||
479 | #endif /* __L2CAP_H */ | 477 | #endif /* __L2CAP_H */ |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 5fabfa886b3e..4899286ed4e4 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -41,6 +41,10 @@ struct mgmt_rp_read_index_list { | |||
41 | __le16 index[0]; | 41 | __le16 index[0]; |
42 | } __packed; | 42 | } __packed; |
43 | 43 | ||
44 | /* Reserve one extra byte for names in management messages so that they | ||
45 | * are always guaranteed to be nul-terminated */ | ||
46 | #define MGMT_MAX_NAME_LENGTH (HCI_MAX_NAME_LENGTH + 1) | ||
47 | |||
44 | #define MGMT_OP_READ_INFO 0x0004 | 48 | #define MGMT_OP_READ_INFO 0x0004 |
45 | struct mgmt_rp_read_info { | 49 | struct mgmt_rp_read_info { |
46 | __u8 type; | 50 | __u8 type; |
@@ -55,6 +59,7 @@ struct mgmt_rp_read_info { | |||
55 | __u16 manufacturer; | 59 | __u16 manufacturer; |
56 | __u8 hci_ver; | 60 | __u8 hci_ver; |
57 | __u16 hci_rev; | 61 | __u16 hci_rev; |
62 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
58 | } __packed; | 63 | } __packed; |
59 | 64 | ||
60 | struct mgmt_mode { | 65 | struct mgmt_mode { |
@@ -167,6 +172,33 @@ struct mgmt_rp_user_confirm_reply { | |||
167 | 172 | ||
168 | #define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x0016 | 173 | #define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x0016 |
169 | 174 | ||
175 | #define MGMT_OP_SET_LOCAL_NAME 0x0017 | ||
176 | struct mgmt_cp_set_local_name { | ||
177 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
178 | } __packed; | ||
179 | |||
180 | #define MGMT_OP_READ_LOCAL_OOB_DATA 0x0018 | ||
181 | struct mgmt_rp_read_local_oob_data { | ||
182 | __u8 hash[16]; | ||
183 | __u8 randomizer[16]; | ||
184 | } __packed; | ||
185 | |||
186 | #define MGMT_OP_ADD_REMOTE_OOB_DATA 0x0019 | ||
187 | struct mgmt_cp_add_remote_oob_data { | ||
188 | bdaddr_t bdaddr; | ||
189 | __u8 hash[16]; | ||
190 | __u8 randomizer[16]; | ||
191 | } __packed; | ||
192 | |||
193 | #define MGMT_OP_REMOVE_REMOTE_OOB_DATA 0x001A | ||
194 | struct mgmt_cp_remove_remote_oob_data { | ||
195 | bdaddr_t bdaddr; | ||
196 | } __packed; | ||
197 | |||
198 | #define MGMT_OP_START_DISCOVERY 0x001B | ||
199 | |||
200 | #define MGMT_OP_STOP_DISCOVERY 0x001C | ||
201 | |||
170 | #define MGMT_EV_CMD_COMPLETE 0x0001 | 202 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
171 | struct mgmt_ev_cmd_complete { | 203 | struct mgmt_ev_cmd_complete { |
172 | __le16 opcode; | 204 | __le16 opcode; |
@@ -198,8 +230,8 @@ struct mgmt_ev_controller_error { | |||
198 | 230 | ||
199 | #define MGMT_EV_NEW_KEY 0x000A | 231 | #define MGMT_EV_NEW_KEY 0x000A |
200 | struct mgmt_ev_new_key { | 232 | struct mgmt_ev_new_key { |
233 | __u8 store_hint; | ||
201 | struct mgmt_key_info key; | 234 | struct mgmt_key_info key; |
202 | __u8 old_key_type; | ||
203 | } __packed; | 235 | } __packed; |
204 | 236 | ||
205 | #define MGMT_EV_CONNECTED 0x000B | 237 | #define MGMT_EV_CONNECTED 0x000B |
@@ -221,11 +253,13 @@ struct mgmt_ev_connect_failed { | |||
221 | #define MGMT_EV_PIN_CODE_REQUEST 0x000E | 253 | #define MGMT_EV_PIN_CODE_REQUEST 0x000E |
222 | struct mgmt_ev_pin_code_request { | 254 | struct mgmt_ev_pin_code_request { |
223 | bdaddr_t bdaddr; | 255 | bdaddr_t bdaddr; |
256 | __u8 secure; | ||
224 | } __packed; | 257 | } __packed; |
225 | 258 | ||
226 | #define MGMT_EV_USER_CONFIRM_REQUEST 0x000F | 259 | #define MGMT_EV_USER_CONFIRM_REQUEST 0x000F |
227 | struct mgmt_ev_user_confirm_request { | 260 | struct mgmt_ev_user_confirm_request { |
228 | bdaddr_t bdaddr; | 261 | bdaddr_t bdaddr; |
262 | __u8 confirm_hint; | ||
229 | __le32 value; | 263 | __le32 value; |
230 | } __packed; | 264 | } __packed; |
231 | 265 | ||
@@ -234,3 +268,24 @@ struct mgmt_ev_auth_failed { | |||
234 | bdaddr_t bdaddr; | 268 | bdaddr_t bdaddr; |
235 | __u8 status; | 269 | __u8 status; |
236 | } __packed; | 270 | } __packed; |
271 | |||
272 | #define MGMT_EV_LOCAL_NAME_CHANGED 0x0011 | ||
273 | struct mgmt_ev_local_name_changed { | ||
274 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
275 | } __packed; | ||
276 | |||
277 | #define MGMT_EV_DEVICE_FOUND 0x0012 | ||
278 | struct mgmt_ev_device_found { | ||
279 | bdaddr_t bdaddr; | ||
280 | __u8 dev_class[3]; | ||
281 | __s8 rssi; | ||
282 | __u8 eir[HCI_MAX_EIR_LENGTH]; | ||
283 | } __packed; | ||
284 | |||
285 | #define MGMT_EV_REMOTE_NAME 0x0013 | ||
286 | struct mgmt_ev_remote_name { | ||
287 | bdaddr_t bdaddr; | ||
288 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
289 | } __packed; | ||
290 | |||
291 | #define MGMT_EV_DISCOVERING 0x0014 | ||
diff --git a/include/net/caif/caif_dev.h b/include/net/caif/caif_dev.h index 8eff83b95366..c011281d92c0 100644 --- a/include/net/caif/caif_dev.h +++ b/include/net/caif/caif_dev.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <net/caif/cfcnfg.h> | 11 | #include <net/caif/cfcnfg.h> |
12 | #include <linux/caif/caif_socket.h> | 12 | #include <linux/caif/caif_socket.h> |
13 | #include <linux/if.h> | 13 | #include <linux/if.h> |
14 | #include <linux/net.h> | ||
14 | 15 | ||
15 | /** | 16 | /** |
16 | * struct caif_param - CAIF parameters. | 17 | * struct caif_param - CAIF parameters. |
@@ -62,46 +63,45 @@ struct caif_connect_request { | |||
62 | * E.g. CAIF Socket will call this function for each socket it connects | 63 | * E.g. CAIF Socket will call this function for each socket it connects |
63 | * and have one client_layer instance for each socket. | 64 | * and have one client_layer instance for each socket. |
64 | */ | 65 | */ |
65 | int caif_connect_client(struct caif_connect_request *conn_req, | 66 | int caif_connect_client(struct net *net, |
67 | struct caif_connect_request *conn_req, | ||
66 | struct cflayer *client_layer, int *ifindex, | 68 | struct cflayer *client_layer, int *ifindex, |
67 | int *headroom, int *tailroom); | 69 | int *headroom, int *tailroom); |
68 | 70 | ||
69 | /** | 71 | /** |
70 | * caif_disconnect_client - Disconnects a client from the CAIF stack. | 72 | * caif_disconnect_client - Disconnects a client from the CAIF stack. |
71 | * | 73 | * |
72 | * @client_layer: Client layer to be removed. | 74 | * @client_layer: Client layer to be disconnected. |
73 | */ | 75 | */ |
74 | int caif_disconnect_client(struct cflayer *client_layer); | 76 | int caif_disconnect_client(struct net *net, struct cflayer *client_layer); |
77 | |||
75 | 78 | ||
76 | /** | 79 | /** |
77 | * caif_release_client - Release adaptation layer reference to client. | 80 | * caif_client_register_refcnt - register ref-count functions provided by client. |
78 | * | 81 | * |
79 | * @client_layer: Client layer. | 82 | * @adapt_layer: Client layer using CAIF Stack. |
83 | * @hold: Function provided by client layer increasing ref-count | ||
84 | * @put: Function provided by client layer decreasing ref-count | ||
80 | * | 85 | * |
81 | * Releases a client/adaptation layer use of the caif stack. | 86 | * Client of the CAIF Stack must register functions for reference counting. |
82 | * This function must be used after caif_disconnect_client to | 87 | * These functions are called by the CAIF Stack for every upstream packet, |
83 | * decrease the reference count of the service layer. | 88 | * and must therefore be implemented efficiently. |
84 | */ | ||
85 | void caif_release_client(struct cflayer *client_layer); | ||
86 | |||
87 | /** | ||
88 | * connect_req_to_link_param - Translate configuration parameters | ||
89 | * from socket format to internal format. | ||
90 | * @cnfg: Pointer to configuration handler | ||
91 | * @con_req: Configuration parameters supplied in function | ||
92 | * caif_connect_client | ||
93 | * @channel_setup_param: Parameters supplied to the CAIF Core stack for | ||
94 | * setting up channels. | ||
95 | * | 89 | * |
90 | * Client should call caif_free_client when reference count degrease to zero. | ||
96 | */ | 91 | */ |
97 | int connect_req_to_link_param(struct cfcnfg *cnfg, | ||
98 | struct caif_connect_request *con_req, | ||
99 | struct cfctrl_link_param *channel_setup_param); | ||
100 | 92 | ||
93 | void caif_client_register_refcnt(struct cflayer *adapt_layer, | ||
94 | void (*hold)(struct cflayer *lyr), | ||
95 | void (*put)(struct cflayer *lyr)); | ||
101 | /** | 96 | /** |
102 | * get_caif_conf() - Get the configuration handler. | 97 | * caif_free_client - Free memory used to manage the client in the CAIF Stack. |
98 | * | ||
99 | * @client_layer: Client layer to be removed. | ||
100 | * | ||
101 | * This function must be called from client layer in order to free memory. | ||
102 | * Caller must guarantee that no packets are in flight upstream when calling | ||
103 | * this function. | ||
103 | */ | 104 | */ |
104 | struct cfcnfg *get_caif_conf(void); | 105 | void caif_free_client(struct cflayer *adap_layer); |
105 | |||
106 | 106 | ||
107 | #endif /* CAIF_DEV_H_ */ | 107 | #endif /* CAIF_DEV_H_ */ |
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h index f688478bfb84..3e93a4a4b677 100644 --- a/include/net/caif/cfcnfg.h +++ b/include/net/caif/cfcnfg.h | |||
@@ -46,6 +46,12 @@ enum cfcnfg_phy_preference { | |||
46 | }; | 46 | }; |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * cfcnfg_create() - Get the CAIF configuration object given network. | ||
50 | * @net: Network for the CAIF configuration object. | ||
51 | */ | ||
52 | struct cfcnfg *get_cfcnfg(struct net *net); | ||
53 | |||
54 | /** | ||
49 | * cfcnfg_create() - Create the CAIF configuration object. | 55 | * cfcnfg_create() - Create the CAIF configuration object. |
50 | */ | 56 | */ |
51 | struct cfcnfg *cfcnfg_create(void); | 57 | struct cfcnfg *cfcnfg_create(void); |
@@ -65,8 +71,6 @@ void cfcnfg_remove(struct cfcnfg *cfg); | |||
65 | * @dev: Pointer to link layer device | 71 | * @dev: Pointer to link layer device |
66 | * @phy_layer: Specify the physical layer. The transmit function | 72 | * @phy_layer: Specify the physical layer. The transmit function |
67 | * MUST be set in the structure. | 73 | * MUST be set in the structure. |
68 | * @phyid: The assigned physical ID for this layer, used in | ||
69 | * cfcnfg_add_adapt_layer to specify PHY for the link. | ||
70 | * @pref: The phy (link layer) preference. | 74 | * @pref: The phy (link layer) preference. |
71 | * @fcs: Specify if checksum is used in CAIF Framing Layer. | 75 | * @fcs: Specify if checksum is used in CAIF Framing Layer. |
72 | * @stx: Specify if Start Of Frame eXtention is used. | 76 | * @stx: Specify if Start Of Frame eXtention is used. |
@@ -75,7 +79,7 @@ void cfcnfg_remove(struct cfcnfg *cfg); | |||
75 | void | 79 | void |
76 | cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type, | 80 | cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type, |
77 | struct net_device *dev, struct cflayer *phy_layer, | 81 | struct net_device *dev, struct cflayer *phy_layer, |
78 | u16 *phyid, enum cfcnfg_phy_preference pref, | 82 | enum cfcnfg_phy_preference pref, |
79 | bool fcs, bool stx); | 83 | bool fcs, bool stx); |
80 | 84 | ||
81 | /** | 85 | /** |
@@ -88,61 +92,12 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type, | |||
88 | int cfcnfg_del_phy_layer(struct cfcnfg *cnfg, struct cflayer *phy_layer); | 92 | int cfcnfg_del_phy_layer(struct cfcnfg *cnfg, struct cflayer *phy_layer); |
89 | 93 | ||
90 | /** | 94 | /** |
91 | * cfcnfg_disconn_adapt_layer - Disconnects an adaptation layer. | 95 | * cfcnfg_set_phy_state() - Set the state of the physical interface device. |
92 | * | ||
93 | * @cnfg: Pointer to a CAIF configuration object, created by | ||
94 | * cfcnfg_create(). | ||
95 | * @adap_layer: Adaptation layer to be removed. | ||
96 | */ | ||
97 | int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg, | ||
98 | struct cflayer *adap_layer); | ||
99 | |||
100 | /** | ||
101 | * cfcnfg_release_adap_layer - Used by client to release the adaptation layer. | ||
102 | * | ||
103 | * @adap_layer: Adaptation layer. | ||
104 | */ | ||
105 | void cfcnfg_release_adap_layer(struct cflayer *adap_layer); | ||
106 | |||
107 | /** | ||
108 | * cfcnfg_add_adaptation_layer - Add an adaptation layer to the CAIF stack. | ||
109 | * | ||
110 | * The adaptation Layer is where the interface to application or higher-level | ||
111 | * driver functionality is implemented. | ||
112 | * | ||
113 | * @cnfg: Pointer to a CAIF configuration object, created by | ||
114 | * cfcnfg_create(). | ||
115 | * @param: Link setup parameters. | ||
116 | * @adap_layer: Specify the adaptation layer; the receive and | ||
117 | * flow-control functions MUST be set in the structure. | ||
118 | * @ifindex: Link layer interface index used for this connection. | ||
119 | * @proto_head: Protocol head-space needed by CAIF protocol, | ||
120 | * excluding link layer. | ||
121 | * @proto_tail: Protocol tail-space needed by CAIF protocol, | ||
122 | * excluding link layer. | ||
123 | */ | ||
124 | int cfcnfg_add_adaptation_layer(struct cfcnfg *cnfg, | ||
125 | struct cfctrl_link_param *param, | ||
126 | struct cflayer *adap_layer, | ||
127 | int *ifindex, | ||
128 | int *proto_head, | ||
129 | int *proto_tail); | ||
130 | |||
131 | /** | ||
132 | * cfcnfg_get_phyid() - Get physical ID, given type. | ||
133 | * Returns one of the physical interfaces matching the given type. | ||
134 | * Zero if no match is found. | ||
135 | * @cnfg: Configuration object | 96 | * @cnfg: Configuration object |
136 | * @phy_pref: Caif Link Layer preference | 97 | * @phy_layer: Physical Layer representation |
98 | * @up: State of device | ||
137 | */ | 99 | */ |
138 | struct dev_info *cfcnfg_get_phyid(struct cfcnfg *cnfg, | 100 | int cfcnfg_set_phy_state(struct cfcnfg *cnfg, struct cflayer *phy_layer, |
139 | enum cfcnfg_phy_preference phy_pref); | 101 | bool up); |
140 | 102 | ||
141 | /** | ||
142 | * cfcnfg_get_id_from_ifi() - Get the Physical Identifier of ifindex, | ||
143 | * it matches caif physical id with the kernel interface id. | ||
144 | * @cnfg: Configuration object | ||
145 | * @ifi: ifindex obtained from socket.c bindtodevice. | ||
146 | */ | ||
147 | int cfcnfg_get_id_from_ifi(struct cfcnfg *cnfg, int ifi); | ||
148 | #endif /* CFCNFG_H_ */ | 103 | #endif /* CFCNFG_H_ */ |
diff --git a/include/net/caif/cfctrl.h b/include/net/caif/cfctrl.h index e54f6396fa4c..9e5425b4a1d7 100644 --- a/include/net/caif/cfctrl.h +++ b/include/net/caif/cfctrl.h | |||
@@ -121,19 +121,10 @@ int cfctrl_linkup_request(struct cflayer *cfctrl, | |||
121 | struct cflayer *user_layer); | 121 | struct cflayer *user_layer); |
122 | int cfctrl_linkdown_req(struct cflayer *cfctrl, u8 linkid, | 122 | int cfctrl_linkdown_req(struct cflayer *cfctrl, u8 linkid, |
123 | struct cflayer *client); | 123 | struct cflayer *client); |
124 | void cfctrl_sleep_req(struct cflayer *cfctrl); | 124 | |
125 | void cfctrl_wake_req(struct cflayer *cfctrl); | ||
126 | void cfctrl_getstartreason_req(struct cflayer *cfctrl); | ||
127 | struct cflayer *cfctrl_create(void); | 125 | struct cflayer *cfctrl_create(void); |
128 | void cfctrl_set_dnlayer(struct cflayer *this, struct cflayer *dn); | ||
129 | void cfctrl_set_uplayer(struct cflayer *this, struct cflayer *up); | ||
130 | struct cfctrl_rsp *cfctrl_get_respfuncs(struct cflayer *layer); | 126 | struct cfctrl_rsp *cfctrl_get_respfuncs(struct cflayer *layer); |
131 | bool cfctrl_req_eq(struct cfctrl_request_info *r1, | 127 | int cfctrl_cancel_req(struct cflayer *layr, struct cflayer *adap_layer); |
132 | struct cfctrl_request_info *r2); | 128 | void cfctrl_remove(struct cflayer *layr); |
133 | void cfctrl_insert_req(struct cfctrl *ctrl, | ||
134 | struct cfctrl_request_info *req); | ||
135 | struct cfctrl_request_info *cfctrl_remove_req(struct cfctrl *ctrl, | ||
136 | struct cfctrl_request_info *req); | ||
137 | void cfctrl_cancel_req(struct cflayer *layr, struct cflayer *adap_layer); | ||
138 | 129 | ||
139 | #endif /* CFCTRL_H_ */ | 130 | #endif /* CFCTRL_H_ */ |
diff --git a/include/net/caif/cffrml.h b/include/net/caif/cffrml.h index 3f14d2e1ce61..afac1a48cce7 100644 --- a/include/net/caif/cffrml.h +++ b/include/net/caif/cffrml.h | |||
@@ -7,10 +7,15 @@ | |||
7 | #ifndef CFFRML_H_ | 7 | #ifndef CFFRML_H_ |
8 | #define CFFRML_H_ | 8 | #define CFFRML_H_ |
9 | #include <net/caif/caif_layer.h> | 9 | #include <net/caif/caif_layer.h> |
10 | #include <linux/netdevice.h> | ||
10 | 11 | ||
11 | struct cffrml; | 12 | struct cffrml; |
12 | struct cflayer *cffrml_create(u16 phyid, bool DoFCS); | 13 | struct cflayer *cffrml_create(u16 phyid, bool use_fcs); |
14 | void cffrml_free(struct cflayer *layr); | ||
13 | void cffrml_set_uplayer(struct cflayer *this, struct cflayer *up); | 15 | void cffrml_set_uplayer(struct cflayer *this, struct cflayer *up); |
14 | void cffrml_set_dnlayer(struct cflayer *this, struct cflayer *dn); | 16 | void cffrml_set_dnlayer(struct cflayer *this, struct cflayer *dn); |
17 | void cffrml_put(struct cflayer *layr); | ||
18 | void cffrml_hold(struct cflayer *layr); | ||
19 | int cffrml_refcnt_read(struct cflayer *layr); | ||
15 | 20 | ||
16 | #endif /* CFFRML_H_ */ | 21 | #endif /* CFFRML_H_ */ |
diff --git a/include/net/caif/cfmuxl.h b/include/net/caif/cfmuxl.h index 4e1b4f33423e..5847a196b8ad 100644 --- a/include/net/caif/cfmuxl.h +++ b/include/net/caif/cfmuxl.h | |||
@@ -16,7 +16,5 @@ int cfmuxl_set_uplayer(struct cflayer *layr, struct cflayer *up, u8 linkid); | |||
16 | struct cflayer *cfmuxl_remove_dnlayer(struct cflayer *layr, u8 phyid); | 16 | struct cflayer *cfmuxl_remove_dnlayer(struct cflayer *layr, u8 phyid); |
17 | int cfmuxl_set_dnlayer(struct cflayer *layr, struct cflayer *up, u8 phyid); | 17 | int cfmuxl_set_dnlayer(struct cflayer *layr, struct cflayer *up, u8 phyid); |
18 | struct cflayer *cfmuxl_remove_uplayer(struct cflayer *layr, u8 linkid); | 18 | struct cflayer *cfmuxl_remove_uplayer(struct cflayer *layr, u8 linkid); |
19 | bool cfmuxl_is_phy_inuse(struct cflayer *layr, u8 phyid); | ||
20 | u8 cfmuxl_get_phyid(struct cflayer *layr, u8 channel_id); | ||
21 | 19 | ||
22 | #endif /* CFMUXL_H_ */ | 20 | #endif /* CFMUXL_H_ */ |
diff --git a/include/net/caif/cfpkt.h b/include/net/caif/cfpkt.h index fbc681beff52..6bd200a4754a 100644 --- a/include/net/caif/cfpkt.h +++ b/include/net/caif/cfpkt.h | |||
@@ -16,12 +16,6 @@ struct cfpkt; | |||
16 | */ | 16 | */ |
17 | struct cfpkt *cfpkt_create(u16 len); | 17 | struct cfpkt *cfpkt_create(u16 len); |
18 | 18 | ||
19 | /* Create a CAIF packet. | ||
20 | * data Data to copy. | ||
21 | * len Length of packet to be created | ||
22 | * @return New packet. | ||
23 | */ | ||
24 | struct cfpkt *cfpkt_create_uplink(const unsigned char *data, unsigned int len); | ||
25 | /* | 19 | /* |
26 | * Destroy a CAIF Packet. | 20 | * Destroy a CAIF Packet. |
27 | * pkt Packet to be destoyed. | 21 | * pkt Packet to be destoyed. |
@@ -181,22 +175,6 @@ u16 cfpkt_iterate(struct cfpkt *pkt, | |||
181 | u16 (*iter_func)(u16 chks, void *buf, u16 len), | 175 | u16 (*iter_func)(u16 chks, void *buf, u16 len), |
182 | u16 data); | 176 | u16 data); |
183 | 177 | ||
184 | /* Append by giving user access to packet buffer | ||
185 | * cfpkt Packet to append to | ||
186 | * buf Buffer inside pkt that user shall copy data into | ||
187 | * buflen Length of buffer and number of bytes added to packet | ||
188 | * @return 0 on error, 1 on success | ||
189 | */ | ||
190 | int cfpkt_raw_append(struct cfpkt *cfpkt, void **buf, unsigned int buflen); | ||
191 | |||
192 | /* Extract by giving user access to packet buffer | ||
193 | * cfpkt Packet to extract from | ||
194 | * buf Buffer inside pkt that user shall copy data from | ||
195 | * buflen Length of buffer and number of bytes removed from packet | ||
196 | * @return 0 on error, 1 on success | ||
197 | */ | ||
198 | int cfpkt_raw_extract(struct cfpkt *cfpkt, void **buf, unsigned int buflen); | ||
199 | |||
200 | /* Map from a "native" packet (e.g. Linux Socket Buffer) to a CAIF packet. | 178 | /* Map from a "native" packet (e.g. Linux Socket Buffer) to a CAIF packet. |
201 | * dir - Direction indicating whether this packet is to be sent or received. | 179 | * dir - Direction indicating whether this packet is to be sent or received. |
202 | * nativepkt - The native packet to be transformed to a CAIF packet | 180 | * nativepkt - The native packet to be transformed to a CAIF packet |
@@ -210,59 +188,6 @@ struct cfpkt *cfpkt_fromnative(enum caif_direction dir, void *nativepkt); | |||
210 | */ | 188 | */ |
211 | void *cfpkt_tonative(struct cfpkt *pkt); | 189 | void *cfpkt_tonative(struct cfpkt *pkt); |
212 | 190 | ||
213 | /* | ||
214 | * Insert a packet in the packet queue. | ||
215 | * pktq Packet queue to insert into | ||
216 | * pkt Packet to be inserted in queue | ||
217 | * prio Priority of packet | ||
218 | */ | ||
219 | void cfpkt_queue(struct cfpktq *pktq, struct cfpkt *pkt, | ||
220 | unsigned short prio); | ||
221 | |||
222 | /* | ||
223 | * Remove a packet from the packet queue. | ||
224 | * pktq Packet queue to fetch packets from. | ||
225 | * @return Dequeued packet. | ||
226 | */ | ||
227 | struct cfpkt *cfpkt_dequeue(struct cfpktq *pktq); | ||
228 | |||
229 | /* | ||
230 | * Peek into a packet from the packet queue. | ||
231 | * pktq Packet queue to fetch packets from. | ||
232 | * @return Peeked packet. | ||
233 | */ | ||
234 | struct cfpkt *cfpkt_qpeek(struct cfpktq *pktq); | ||
235 | |||
236 | /* | ||
237 | * Initiates the packet queue. | ||
238 | * @return Pointer to new packet queue. | ||
239 | */ | ||
240 | struct cfpktq *cfpktq_create(void); | ||
241 | |||
242 | /* | ||
243 | * Get the number of packets in the queue. | ||
244 | * pktq Packet queue to fetch count from. | ||
245 | * @return Number of packets in queue. | ||
246 | */ | ||
247 | int cfpkt_qcount(struct cfpktq *pktq); | ||
248 | |||
249 | /* | ||
250 | * Put content of packet into buffer for debuging purposes. | ||
251 | * pkt Packet to copy data from | ||
252 | * buf Buffer to copy data into | ||
253 | * buflen Length of data to copy | ||
254 | * @return Pointer to copied data | ||
255 | */ | ||
256 | char *cfpkt_log_pkt(struct cfpkt *pkt, char *buf, int buflen); | ||
257 | |||
258 | /* | ||
259 | * Clones a packet and releases the original packet. | ||
260 | * This is used for taking ownership of a packet e.g queueing. | ||
261 | * pkt Packet to clone and release. | ||
262 | * @return Cloned packet. | ||
263 | */ | ||
264 | struct cfpkt *cfpkt_clone_release(struct cfpkt *pkt); | ||
265 | |||
266 | 191 | ||
267 | /* | 192 | /* |
268 | * Returns packet information for a packet. | 193 | * Returns packet information for a packet. |
@@ -270,5 +195,4 @@ struct cfpkt *cfpkt_clone_release(struct cfpkt *pkt); | |||
270 | * @return Packet information | 195 | * @return Packet information |
271 | */ | 196 | */ |
272 | struct caif_payload_info *cfpkt_info(struct cfpkt *pkt); | 197 | struct caif_payload_info *cfpkt_info(struct cfpkt *pkt); |
273 | /*! @} */ | ||
274 | #endif /* CFPKT_H_ */ | 198 | #endif /* CFPKT_H_ */ |
diff --git a/include/net/caif/cfsrvl.h b/include/net/caif/cfsrvl.h index b1fa87ee0992..0f5905241843 100644 --- a/include/net/caif/cfsrvl.h +++ b/include/net/caif/cfsrvl.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/stddef.h> | 10 | #include <linux/stddef.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/kref.h> | 12 | #include <linux/kref.h> |
13 | #include <linux/rculist.h> | ||
13 | 14 | ||
14 | struct cfsrvl { | 15 | struct cfsrvl { |
15 | struct cflayer layer; | 16 | struct cflayer layer; |
@@ -17,12 +18,13 @@ struct cfsrvl { | |||
17 | bool phy_flow_on; | 18 | bool phy_flow_on; |
18 | bool modem_flow_on; | 19 | bool modem_flow_on; |
19 | bool supports_flowctrl; | 20 | bool supports_flowctrl; |
20 | void (*release)(struct kref *); | 21 | void (*release)(struct cflayer *layer); |
21 | struct dev_info dev_info; | 22 | struct dev_info dev_info; |
22 | struct kref ref; | 23 | void (*hold)(struct cflayer *lyr); |
24 | void (*put)(struct cflayer *lyr); | ||
25 | struct rcu_head rcu; | ||
23 | }; | 26 | }; |
24 | 27 | ||
25 | void cfsrvl_release(struct kref *kref); | ||
26 | struct cflayer *cfvei_create(u8 linkid, struct dev_info *dev_info); | 28 | struct cflayer *cfvei_create(u8 linkid, struct dev_info *dev_info); |
27 | struct cflayer *cfdgml_create(u8 linkid, struct dev_info *dev_info); | 29 | struct cflayer *cfdgml_create(u8 linkid, struct dev_info *dev_info); |
28 | struct cflayer *cfutill_create(u8 linkid, struct dev_info *dev_info); | 30 | struct cflayer *cfutill_create(u8 linkid, struct dev_info *dev_info); |
@@ -30,8 +32,12 @@ struct cflayer *cfvidl_create(u8 linkid, struct dev_info *dev_info); | |||
30 | struct cflayer *cfrfml_create(u8 linkid, struct dev_info *dev_info, | 32 | struct cflayer *cfrfml_create(u8 linkid, struct dev_info *dev_info, |
31 | int mtu_size); | 33 | int mtu_size); |
32 | struct cflayer *cfdbgl_create(u8 linkid, struct dev_info *dev_info); | 34 | struct cflayer *cfdbgl_create(u8 linkid, struct dev_info *dev_info); |
35 | |||
36 | void cfsrvl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, | ||
37 | int phyid); | ||
38 | |||
33 | bool cfsrvl_phyid_match(struct cflayer *layer, int phyid); | 39 | bool cfsrvl_phyid_match(struct cflayer *layer, int phyid); |
34 | void cfservl_destroy(struct cflayer *layer); | 40 | |
35 | void cfsrvl_init(struct cfsrvl *service, | 41 | void cfsrvl_init(struct cfsrvl *service, |
36 | u8 channel_id, | 42 | u8 channel_id, |
37 | struct dev_info *dev_info, | 43 | struct dev_info *dev_info, |
@@ -41,23 +47,19 @@ u8 cfsrvl_getphyid(struct cflayer *layer); | |||
41 | 47 | ||
42 | static inline void cfsrvl_get(struct cflayer *layr) | 48 | static inline void cfsrvl_get(struct cflayer *layr) |
43 | { | 49 | { |
44 | struct cfsrvl *s; | 50 | struct cfsrvl *s = container_of(layr, struct cfsrvl, layer); |
45 | if (layr == NULL) | 51 | if (layr == NULL || layr->up == NULL || s->hold == NULL) |
46 | return; | 52 | return; |
47 | s = container_of(layr, struct cfsrvl, layer); | 53 | |
48 | kref_get(&s->ref); | 54 | s->hold(layr->up); |
49 | } | 55 | } |
50 | 56 | ||
51 | static inline void cfsrvl_put(struct cflayer *layr) | 57 | static inline void cfsrvl_put(struct cflayer *layr) |
52 | { | 58 | { |
53 | struct cfsrvl *s; | 59 | struct cfsrvl *s = container_of(layr, struct cfsrvl, layer); |
54 | if (layr == NULL) | 60 | if (layr == NULL || layr->up == NULL || s->hold == NULL) |
55 | return; | 61 | return; |
56 | s = container_of(layr, struct cfsrvl, layer); | ||
57 | 62 | ||
58 | WARN_ON(!s->release); | 63 | s->put(layr->up); |
59 | if (s->release) | ||
60 | kref_put(&s->ref, s->release); | ||
61 | } | 64 | } |
62 | |||
63 | #endif /* CFSRVL_H_ */ | 65 | #endif /* CFSRVL_H_ */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index b2b9d28cb4ab..bfd6557946be 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -387,6 +387,7 @@ enum plink_actions { | |||
387 | * @listen_interval: listen interval or -1 for no change | 387 | * @listen_interval: listen interval or -1 for no change |
388 | * @aid: AID or zero for no change | 388 | * @aid: AID or zero for no change |
389 | * @plink_action: plink action to take | 389 | * @plink_action: plink action to take |
390 | * @plink_state: set the peer link state for a station | ||
390 | * @ht_capa: HT capabilities of station | 391 | * @ht_capa: HT capabilities of station |
391 | */ | 392 | */ |
392 | struct station_parameters { | 393 | struct station_parameters { |
@@ -397,6 +398,7 @@ struct station_parameters { | |||
397 | u16 aid; | 398 | u16 aid; |
398 | u8 supported_rates_len; | 399 | u8 supported_rates_len; |
399 | u8 plink_action; | 400 | u8 plink_action; |
401 | u8 plink_state; | ||
400 | struct ieee80211_ht_cap *ht_capa; | 402 | struct ieee80211_ht_cap *ht_capa; |
401 | }; | 403 | }; |
402 | 404 | ||
@@ -422,6 +424,8 @@ struct station_parameters { | |||
422 | * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled | 424 | * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled |
423 | * @STATION_INFO_SIGNAL_AVG: @signal_avg filled | 425 | * @STATION_INFO_SIGNAL_AVG: @signal_avg filled |
424 | * @STATION_INFO_RX_BITRATE: @rxrate fields are filled | 426 | * @STATION_INFO_RX_BITRATE: @rxrate fields are filled |
427 | * @STATION_INFO_BSS_PARAM: @bss_param filled | ||
428 | * @STATION_INFO_CONNECTED_TIME: @connected_time filled | ||
425 | */ | 429 | */ |
426 | enum station_info_flags { | 430 | enum station_info_flags { |
427 | STATION_INFO_INACTIVE_TIME = 1<<0, | 431 | STATION_INFO_INACTIVE_TIME = 1<<0, |
@@ -439,6 +443,8 @@ enum station_info_flags { | |||
439 | STATION_INFO_RX_DROP_MISC = 1<<12, | 443 | STATION_INFO_RX_DROP_MISC = 1<<12, |
440 | STATION_INFO_SIGNAL_AVG = 1<<13, | 444 | STATION_INFO_SIGNAL_AVG = 1<<13, |
441 | STATION_INFO_RX_BITRATE = 1<<14, | 445 | STATION_INFO_RX_BITRATE = 1<<14, |
446 | STATION_INFO_BSS_PARAM = 1<<15, | ||
447 | STATION_INFO_CONNECTED_TIME = 1<<16 | ||
442 | }; | 448 | }; |
443 | 449 | ||
444 | /** | 450 | /** |
@@ -473,11 +479,43 @@ struct rate_info { | |||
473 | }; | 479 | }; |
474 | 480 | ||
475 | /** | 481 | /** |
482 | * enum station_info_rate_flags - bitrate info flags | ||
483 | * | ||
484 | * Used by the driver to indicate the specific rate transmission | ||
485 | * type for 802.11n transmissions. | ||
486 | * | ||
487 | * @BSS_PARAM_FLAGS_CTS_PROT: whether CTS protection is enabled | ||
488 | * @BSS_PARAM_FLAGS_SHORT_PREAMBLE: whether short preamble is enabled | ||
489 | * @BSS_PARAM_FLAGS_SHORT_SLOT_TIME: whether short slot time is enabled | ||
490 | */ | ||
491 | enum bss_param_flags { | ||
492 | BSS_PARAM_FLAGS_CTS_PROT = 1<<0, | ||
493 | BSS_PARAM_FLAGS_SHORT_PREAMBLE = 1<<1, | ||
494 | BSS_PARAM_FLAGS_SHORT_SLOT_TIME = 1<<2, | ||
495 | }; | ||
496 | |||
497 | /** | ||
498 | * struct sta_bss_parameters - BSS parameters for the attached station | ||
499 | * | ||
500 | * Information about the currently associated BSS | ||
501 | * | ||
502 | * @flags: bitflag of flags from &enum bss_param_flags | ||
503 | * @dtim_period: DTIM period for the BSS | ||
504 | * @beacon_interval: beacon interval | ||
505 | */ | ||
506 | struct sta_bss_parameters { | ||
507 | u8 flags; | ||
508 | u8 dtim_period; | ||
509 | u16 beacon_interval; | ||
510 | }; | ||
511 | |||
512 | /** | ||
476 | * struct station_info - station information | 513 | * struct station_info - station information |
477 | * | 514 | * |
478 | * Station information filled by driver for get_station() and dump_station. | 515 | * Station information filled by driver for get_station() and dump_station. |
479 | * | 516 | * |
480 | * @filled: bitflag of flags from &enum station_info_flags | 517 | * @filled: bitflag of flags from &enum station_info_flags |
518 | * @connected_time: time(in secs) since a station is last connected | ||
481 | * @inactive_time: time since last station activity (tx/rx) in milliseconds | 519 | * @inactive_time: time since last station activity (tx/rx) in milliseconds |
482 | * @rx_bytes: bytes received from this station | 520 | * @rx_bytes: bytes received from this station |
483 | * @tx_bytes: bytes transmitted to this station | 521 | * @tx_bytes: bytes transmitted to this station |
@@ -500,6 +538,7 @@ struct rate_info { | |||
500 | */ | 538 | */ |
501 | struct station_info { | 539 | struct station_info { |
502 | u32 filled; | 540 | u32 filled; |
541 | u32 connected_time; | ||
503 | u32 inactive_time; | 542 | u32 inactive_time; |
504 | u32 rx_bytes; | 543 | u32 rx_bytes; |
505 | u32 tx_bytes; | 544 | u32 tx_bytes; |
@@ -515,6 +554,7 @@ struct station_info { | |||
515 | u32 tx_retries; | 554 | u32 tx_retries; |
516 | u32 tx_failed; | 555 | u32 tx_failed; |
517 | u32 rx_dropped_misc; | 556 | u32 rx_dropped_misc; |
557 | struct sta_bss_parameters bss_param; | ||
518 | 558 | ||
519 | int generation; | 559 | int generation; |
520 | }; | 560 | }; |
@@ -655,8 +695,10 @@ struct mesh_config { | |||
655 | * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes | 695 | * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes |
656 | * @path_sel_proto: which path selection protocol to use | 696 | * @path_sel_proto: which path selection protocol to use |
657 | * @path_metric: which metric to use | 697 | * @path_metric: which metric to use |
658 | * @vendor_ie: vendor information elements (optional) | 698 | * @ie: vendor information elements (optional) |
659 | * @vendor_ie_len: length of vendor information elements | 699 | * @ie_len: length of vendor information elements |
700 | * @is_authenticated: this mesh requires authentication | ||
701 | * @is_secure: this mesh uses security | ||
660 | * | 702 | * |
661 | * These parameters are fixed when the mesh is created. | 703 | * These parameters are fixed when the mesh is created. |
662 | */ | 704 | */ |
@@ -665,8 +707,10 @@ struct mesh_setup { | |||
665 | u8 mesh_id_len; | 707 | u8 mesh_id_len; |
666 | u8 path_sel_proto; | 708 | u8 path_sel_proto; |
667 | u8 path_metric; | 709 | u8 path_metric; |
668 | const u8 *vendor_ie; | 710 | const u8 *ie; |
669 | u8 vendor_ie_len; | 711 | u8 ie_len; |
712 | bool is_authenticated; | ||
713 | bool is_secure; | ||
670 | }; | 714 | }; |
671 | 715 | ||
672 | /** | 716 | /** |
@@ -753,6 +797,35 @@ struct cfg80211_scan_request { | |||
753 | }; | 797 | }; |
754 | 798 | ||
755 | /** | 799 | /** |
800 | * struct cfg80211_sched_scan_request - scheduled scan request description | ||
801 | * | ||
802 | * @ssids: SSIDs to scan for (passed in the probe_reqs in active scans) | ||
803 | * @n_ssids: number of SSIDs | ||
804 | * @n_channels: total number of channels to scan | ||
805 | * @interval: interval between each scheduled scan cycle | ||
806 | * @ie: optional information element(s) to add into Probe Request or %NULL | ||
807 | * @ie_len: length of ie in octets | ||
808 | * @wiphy: the wiphy this was for | ||
809 | * @dev: the interface | ||
810 | * @channels: channels to scan | ||
811 | */ | ||
812 | struct cfg80211_sched_scan_request { | ||
813 | struct cfg80211_ssid *ssids; | ||
814 | int n_ssids; | ||
815 | u32 n_channels; | ||
816 | u32 interval; | ||
817 | const u8 *ie; | ||
818 | size_t ie_len; | ||
819 | |||
820 | /* internal */ | ||
821 | struct wiphy *wiphy; | ||
822 | struct net_device *dev; | ||
823 | |||
824 | /* keep last */ | ||
825 | struct ieee80211_channel *channels[0]; | ||
826 | }; | ||
827 | |||
828 | /** | ||
756 | * enum cfg80211_signal_type - signal type | 829 | * enum cfg80211_signal_type - signal type |
757 | * | 830 | * |
758 | * @CFG80211_SIGNAL_TYPE_NONE: no signal strength information available | 831 | * @CFG80211_SIGNAL_TYPE_NONE: no signal strength information available |
@@ -1048,6 +1121,38 @@ struct cfg80211_pmksa { | |||
1048 | }; | 1121 | }; |
1049 | 1122 | ||
1050 | /** | 1123 | /** |
1124 | * struct cfg80211_wowlan_trig_pkt_pattern - packet pattern | ||
1125 | * @mask: bitmask where to match pattern and where to ignore bytes, | ||
1126 | * one bit per byte, in same format as nl80211 | ||
1127 | * @pattern: bytes to match where bitmask is 1 | ||
1128 | * @pattern_len: length of pattern (in bytes) | ||
1129 | * | ||
1130 | * Internal note: @mask and @pattern are allocated in one chunk of | ||
1131 | * memory, free @mask only! | ||
1132 | */ | ||
1133 | struct cfg80211_wowlan_trig_pkt_pattern { | ||
1134 | u8 *mask, *pattern; | ||
1135 | int pattern_len; | ||
1136 | }; | ||
1137 | |||
1138 | /** | ||
1139 | * struct cfg80211_wowlan - Wake on Wireless-LAN support info | ||
1140 | * | ||
1141 | * This structure defines the enabled WoWLAN triggers for the device. | ||
1142 | * @any: wake up on any activity -- special trigger if device continues | ||
1143 | * operating as normal during suspend | ||
1144 | * @disconnect: wake up if getting disconnected | ||
1145 | * @magic_pkt: wake up on receiving magic packet | ||
1146 | * @patterns: wake up on receiving packet matching a pattern | ||
1147 | * @n_patterns: number of patterns | ||
1148 | */ | ||
1149 | struct cfg80211_wowlan { | ||
1150 | bool any, disconnect, magic_pkt; | ||
1151 | struct cfg80211_wowlan_trig_pkt_pattern *patterns; | ||
1152 | int n_patterns; | ||
1153 | }; | ||
1154 | |||
1155 | /** | ||
1051 | * struct cfg80211_ops - backend description for wireless configuration | 1156 | * struct cfg80211_ops - backend description for wireless configuration |
1052 | * | 1157 | * |
1053 | * This struct is registered by fullmac card drivers and/or wireless stacks | 1158 | * This struct is registered by fullmac card drivers and/or wireless stacks |
@@ -1060,7 +1165,9 @@ struct cfg80211_pmksa { | |||
1060 | * wireless extensions but this is subject to reevaluation as soon as this | 1165 | * wireless extensions but this is subject to reevaluation as soon as this |
1061 | * code is used more widely and we have a first user without wext. | 1166 | * code is used more widely and we have a first user without wext. |
1062 | * | 1167 | * |
1063 | * @suspend: wiphy device needs to be suspended | 1168 | * @suspend: wiphy device needs to be suspended. The variable @wow will |
1169 | * be %NULL or contain the enabled Wake-on-Wireless triggers that are | ||
1170 | * configured for the device. | ||
1064 | * @resume: wiphy device needs to be resumed | 1171 | * @resume: wiphy device needs to be resumed |
1065 | * | 1172 | * |
1066 | * @add_virtual_intf: create a new virtual interface with the given name, | 1173 | * @add_virtual_intf: create a new virtual interface with the given name, |
@@ -1187,6 +1294,10 @@ struct cfg80211_pmksa { | |||
1187 | * @set_power_mgmt: Configure WLAN power management. A timeout value of -1 | 1294 | * @set_power_mgmt: Configure WLAN power management. A timeout value of -1 |
1188 | * allows the driver to adjust the dynamic ps timeout value. | 1295 | * allows the driver to adjust the dynamic ps timeout value. |
1189 | * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold. | 1296 | * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold. |
1297 | * @sched_scan_start: Tell the driver to start a scheduled scan. | ||
1298 | * @sched_scan_stop: Tell the driver to stop an ongoing scheduled | ||
1299 | * scan. The driver_initiated flag specifies whether the driver | ||
1300 | * itself has informed that the scan has stopped. | ||
1190 | * | 1301 | * |
1191 | * @mgmt_frame_register: Notify driver that a management frame type was | 1302 | * @mgmt_frame_register: Notify driver that a management frame type was |
1192 | * registered. Note that this callback may not sleep, and cannot run | 1303 | * registered. Note that this callback may not sleep, and cannot run |
@@ -1204,7 +1315,7 @@ struct cfg80211_pmksa { | |||
1204 | * @get_ringparam: Get tx and rx ring current and maximum sizes. | 1315 | * @get_ringparam: Get tx and rx ring current and maximum sizes. |
1205 | */ | 1316 | */ |
1206 | struct cfg80211_ops { | 1317 | struct cfg80211_ops { |
1207 | int (*suspend)(struct wiphy *wiphy); | 1318 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
1208 | int (*resume)(struct wiphy *wiphy); | 1319 | int (*resume)(struct wiphy *wiphy); |
1209 | 1320 | ||
1210 | struct net_device * (*add_virtual_intf)(struct wiphy *wiphy, | 1321 | struct net_device * (*add_virtual_intf)(struct wiphy *wiphy, |
@@ -1373,6 +1484,11 @@ struct cfg80211_ops { | |||
1373 | int (*set_ringparam)(struct wiphy *wiphy, u32 tx, u32 rx); | 1484 | int (*set_ringparam)(struct wiphy *wiphy, u32 tx, u32 rx); |
1374 | void (*get_ringparam)(struct wiphy *wiphy, | 1485 | void (*get_ringparam)(struct wiphy *wiphy, |
1375 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); | 1486 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); |
1487 | |||
1488 | int (*sched_scan_start)(struct wiphy *wiphy, | ||
1489 | struct net_device *dev, | ||
1490 | struct cfg80211_sched_scan_request *request); | ||
1491 | int (*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev); | ||
1376 | }; | 1492 | }; |
1377 | 1493 | ||
1378 | /* | 1494 | /* |
@@ -1404,6 +1520,10 @@ struct cfg80211_ops { | |||
1404 | * hints read the documenation for regulatory_hint_found_beacon() | 1520 | * hints read the documenation for regulatory_hint_found_beacon() |
1405 | * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this | 1521 | * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this |
1406 | * wiphy at all | 1522 | * wiphy at all |
1523 | * @WIPHY_FLAG_ENFORCE_COMBINATIONS: Set this flag to enforce interface | ||
1524 | * combinations for this device. This flag is used for backward | ||
1525 | * compatibility only until all drivers advertise combinations and | ||
1526 | * they will always be enforced. | ||
1407 | * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled | 1527 | * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled |
1408 | * by default -- this flag will be set depending on the kernel's default | 1528 | * by default -- this flag will be set depending on the kernel's default |
1409 | * on wiphy_new(), but can be changed by the driver if it has a good | 1529 | * on wiphy_new(), but can be changed by the driver if it has a good |
@@ -1415,8 +1535,9 @@ struct cfg80211_ops { | |||
1415 | * control port protocol ethertype. The device also honours the | 1535 | * control port protocol ethertype. The device also honours the |
1416 | * control_port_no_encrypt flag. | 1536 | * control_port_no_encrypt flag. |
1417 | * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN. | 1537 | * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN. |
1418 | * @WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS: The device supports separate | 1538 | * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing |
1419 | * unicast and multicast TX keys. | 1539 | * auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH. |
1540 | * @WIPHY_FLAG_SCHED_SCAN: The device supports scheduled scans. | ||
1420 | */ | 1541 | */ |
1421 | enum wiphy_flags { | 1542 | enum wiphy_flags { |
1422 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), | 1543 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), |
@@ -1428,7 +1549,83 @@ enum wiphy_flags { | |||
1428 | WIPHY_FLAG_4ADDR_STATION = BIT(6), | 1549 | WIPHY_FLAG_4ADDR_STATION = BIT(6), |
1429 | WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), | 1550 | WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), |
1430 | WIPHY_FLAG_IBSS_RSN = BIT(8), | 1551 | WIPHY_FLAG_IBSS_RSN = BIT(8), |
1431 | WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS= BIT(9), | 1552 | WIPHY_FLAG_MESH_AUTH = BIT(10), |
1553 | WIPHY_FLAG_SUPPORTS_SCHED_SCAN = BIT(11), | ||
1554 | WIPHY_FLAG_ENFORCE_COMBINATIONS = BIT(12), | ||
1555 | }; | ||
1556 | |||
1557 | /** | ||
1558 | * struct ieee80211_iface_limit - limit on certain interface types | ||
1559 | * @max: maximum number of interfaces of these types | ||
1560 | * @types: interface types (bits) | ||
1561 | */ | ||
1562 | struct ieee80211_iface_limit { | ||
1563 | u16 max; | ||
1564 | u16 types; | ||
1565 | }; | ||
1566 | |||
1567 | /** | ||
1568 | * struct ieee80211_iface_combination - possible interface combination | ||
1569 | * @limits: limits for the given interface types | ||
1570 | * @n_limits: number of limitations | ||
1571 | * @num_different_channels: can use up to this many different channels | ||
1572 | * @max_interfaces: maximum number of interfaces in total allowed in this | ||
1573 | * group | ||
1574 | * @beacon_int_infra_match: In this combination, the beacon intervals | ||
1575 | * between infrastructure and AP types must match. This is required | ||
1576 | * only in special cases. | ||
1577 | * | ||
1578 | * These examples can be expressed as follows: | ||
1579 | * | ||
1580 | * Allow #STA <= 1, #AP <= 1, matching BI, channels = 1, 2 total: | ||
1581 | * | ||
1582 | * struct ieee80211_iface_limit limits1[] = { | ||
1583 | * { .max = 1, .types = BIT(NL80211_IFTYPE_STATION), }, | ||
1584 | * { .max = 1, .types = BIT(NL80211_IFTYPE_AP}, }, | ||
1585 | * }; | ||
1586 | * struct ieee80211_iface_combination combination1 = { | ||
1587 | * .limits = limits1, | ||
1588 | * .n_limits = ARRAY_SIZE(limits1), | ||
1589 | * .max_interfaces = 2, | ||
1590 | * .beacon_int_infra_match = true, | ||
1591 | * }; | ||
1592 | * | ||
1593 | * | ||
1594 | * Allow #{AP, P2P-GO} <= 8, channels = 1, 8 total: | ||
1595 | * | ||
1596 | * struct ieee80211_iface_limit limits2[] = { | ||
1597 | * { .max = 8, .types = BIT(NL80211_IFTYPE_AP) | | ||
1598 | * BIT(NL80211_IFTYPE_P2P_GO), }, | ||
1599 | * }; | ||
1600 | * struct ieee80211_iface_combination combination2 = { | ||
1601 | * .limits = limits2, | ||
1602 | * .n_limits = ARRAY_SIZE(limits2), | ||
1603 | * .max_interfaces = 8, | ||
1604 | * .num_different_channels = 1, | ||
1605 | * }; | ||
1606 | * | ||
1607 | * | ||
1608 | * Allow #STA <= 1, #{P2P-client,P2P-GO} <= 3 on two channels, 4 total. | ||
1609 | * This allows for an infrastructure connection and three P2P connections. | ||
1610 | * | ||
1611 | * struct ieee80211_iface_limit limits3[] = { | ||
1612 | * { .max = 1, .types = BIT(NL80211_IFTYPE_STATION), }, | ||
1613 | * { .max = 3, .types = BIT(NL80211_IFTYPE_P2P_GO) | | ||
1614 | * BIT(NL80211_IFTYPE_P2P_CLIENT), }, | ||
1615 | * }; | ||
1616 | * struct ieee80211_iface_combination combination3 = { | ||
1617 | * .limits = limits3, | ||
1618 | * .n_limits = ARRAY_SIZE(limits3), | ||
1619 | * .max_interfaces = 4, | ||
1620 | * .num_different_channels = 2, | ||
1621 | * }; | ||
1622 | */ | ||
1623 | struct ieee80211_iface_combination { | ||
1624 | const struct ieee80211_iface_limit *limits; | ||
1625 | u32 num_different_channels; | ||
1626 | u16 max_interfaces; | ||
1627 | u8 n_limits; | ||
1628 | bool beacon_int_infra_match; | ||
1432 | }; | 1629 | }; |
1433 | 1630 | ||
1434 | struct mac_address { | 1631 | struct mac_address { |
@@ -1440,6 +1637,38 @@ struct ieee80211_txrx_stypes { | |||
1440 | }; | 1637 | }; |
1441 | 1638 | ||
1442 | /** | 1639 | /** |
1640 | * enum wiphy_wowlan_support_flags - WoWLAN support flags | ||
1641 | * @WIPHY_WOWLAN_ANY: supports wakeup for the special "any" | ||
1642 | * trigger that keeps the device operating as-is and | ||
1643 | * wakes up the host on any activity, for example a | ||
1644 | * received packet that passed filtering; note that the | ||
1645 | * packet should be preserved in that case | ||
1646 | * @WIPHY_WOWLAN_MAGIC_PKT: supports wakeup on magic packet | ||
1647 | * (see nl80211.h) | ||
1648 | * @WIPHY_WOWLAN_DISCONNECT: supports wakeup on disconnect | ||
1649 | */ | ||
1650 | enum wiphy_wowlan_support_flags { | ||
1651 | WIPHY_WOWLAN_ANY = BIT(0), | ||
1652 | WIPHY_WOWLAN_MAGIC_PKT = BIT(1), | ||
1653 | WIPHY_WOWLAN_DISCONNECT = BIT(2), | ||
1654 | }; | ||
1655 | |||
1656 | /** | ||
1657 | * struct wiphy_wowlan_support - WoWLAN support data | ||
1658 | * @flags: see &enum wiphy_wowlan_support_flags | ||
1659 | * @n_patterns: number of supported wakeup patterns | ||
1660 | * (see nl80211.h for the pattern definition) | ||
1661 | * @pattern_max_len: maximum length of each pattern | ||
1662 | * @pattern_min_len: minimum length of each pattern | ||
1663 | */ | ||
1664 | struct wiphy_wowlan_support { | ||
1665 | u32 flags; | ||
1666 | int n_patterns; | ||
1667 | int pattern_max_len; | ||
1668 | int pattern_min_len; | ||
1669 | }; | ||
1670 | |||
1671 | /** | ||
1443 | * struct wiphy - wireless hardware description | 1672 | * struct wiphy - wireless hardware description |
1444 | * @reg_notifier: the driver's regulatory notification callback, | 1673 | * @reg_notifier: the driver's regulatory notification callback, |
1445 | * note that if your driver uses wiphy_apply_custom_regulatory() | 1674 | * note that if your driver uses wiphy_apply_custom_regulatory() |
@@ -1476,6 +1705,11 @@ struct ieee80211_txrx_stypes { | |||
1476 | * @priv: driver private data (sized according to wiphy_new() parameter) | 1705 | * @priv: driver private data (sized according to wiphy_new() parameter) |
1477 | * @interface_modes: bitmask of interfaces types valid for this wiphy, | 1706 | * @interface_modes: bitmask of interfaces types valid for this wiphy, |
1478 | * must be set by driver | 1707 | * must be set by driver |
1708 | * @iface_combinations: Valid interface combinations array, should not | ||
1709 | * list single interface types. | ||
1710 | * @n_iface_combinations: number of entries in @iface_combinations array. | ||
1711 | * @software_iftypes: bitmask of software interface types, these are not | ||
1712 | * subject to any restrictions since they are purely managed in SW. | ||
1479 | * @flags: wiphy flags, see &enum wiphy_flags | 1713 | * @flags: wiphy flags, see &enum wiphy_flags |
1480 | * @bss_priv_size: each BSS struct has private data allocated with it, | 1714 | * @bss_priv_size: each BSS struct has private data allocated with it, |
1481 | * this variable determines its size | 1715 | * this variable determines its size |
@@ -1506,6 +1740,8 @@ struct ieee80211_txrx_stypes { | |||
1506 | * | 1740 | * |
1507 | * @max_remain_on_channel_duration: Maximum time a remain-on-channel operation | 1741 | * @max_remain_on_channel_duration: Maximum time a remain-on-channel operation |
1508 | * may request, if implemented. | 1742 | * may request, if implemented. |
1743 | * | ||
1744 | * @wowlan: WoWLAN support information | ||
1509 | */ | 1745 | */ |
1510 | struct wiphy { | 1746 | struct wiphy { |
1511 | /* assign these fields before you register the wiphy */ | 1747 | /* assign these fields before you register the wiphy */ |
@@ -1518,6 +1754,10 @@ struct wiphy { | |||
1518 | 1754 | ||
1519 | const struct ieee80211_txrx_stypes *mgmt_stypes; | 1755 | const struct ieee80211_txrx_stypes *mgmt_stypes; |
1520 | 1756 | ||
1757 | const struct ieee80211_iface_combination *iface_combinations; | ||
1758 | int n_iface_combinations; | ||
1759 | u16 software_iftypes; | ||
1760 | |||
1521 | u16 n_addresses; | 1761 | u16 n_addresses; |
1522 | 1762 | ||
1523 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ | 1763 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ |
@@ -1543,6 +1783,8 @@ struct wiphy { | |||
1543 | char fw_version[ETHTOOL_BUSINFO_LEN]; | 1783 | char fw_version[ETHTOOL_BUSINFO_LEN]; |
1544 | u32 hw_version; | 1784 | u32 hw_version; |
1545 | 1785 | ||
1786 | struct wiphy_wowlan_support wowlan; | ||
1787 | |||
1546 | u16 max_remain_on_channel_duration; | 1788 | u16 max_remain_on_channel_duration; |
1547 | 1789 | ||
1548 | u8 max_num_pmkids; | 1790 | u8 max_num_pmkids; |
@@ -1726,6 +1968,8 @@ struct cfg80211_cached_keys; | |||
1726 | * @mgmt_registrations_lock: lock for the list | 1968 | * @mgmt_registrations_lock: lock for the list |
1727 | * @mtx: mutex used to lock data in this struct | 1969 | * @mtx: mutex used to lock data in this struct |
1728 | * @cleanup_work: work struct used for cleanup that can't be done directly | 1970 | * @cleanup_work: work struct used for cleanup that can't be done directly |
1971 | * @beacon_interval: beacon interval used on this device for transmitting | ||
1972 | * beacons, 0 when not valid | ||
1729 | */ | 1973 | */ |
1730 | struct wireless_dev { | 1974 | struct wireless_dev { |
1731 | struct wiphy *wiphy; | 1975 | struct wiphy *wiphy; |
@@ -1766,6 +2010,8 @@ struct wireless_dev { | |||
1766 | bool ps; | 2010 | bool ps; |
1767 | int ps_timeout; | 2011 | int ps_timeout; |
1768 | 2012 | ||
2013 | int beacon_interval; | ||
2014 | |||
1769 | #ifdef CONFIG_CFG80211_WEXT | 2015 | #ifdef CONFIG_CFG80211_WEXT |
1770 | /* wext data */ | 2016 | /* wext data */ |
1771 | struct { | 2017 | struct { |
@@ -1991,10 +2237,12 @@ int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, | |||
1991 | * @addr: The device MAC address. | 2237 | * @addr: The device MAC address. |
1992 | * @iftype: The device interface type. | 2238 | * @iftype: The device interface type. |
1993 | * @extra_headroom: The hardware extra headroom for SKBs in the @list. | 2239 | * @extra_headroom: The hardware extra headroom for SKBs in the @list. |
2240 | * @has_80211_header: Set it true if SKB is with IEEE 802.11 header. | ||
1994 | */ | 2241 | */ |
1995 | void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, | 2242 | void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, |
1996 | const u8 *addr, enum nl80211_iftype iftype, | 2243 | const u8 *addr, enum nl80211_iftype iftype, |
1997 | const unsigned int extra_headroom); | 2244 | const unsigned int extra_headroom, |
2245 | bool has_80211_header); | ||
1998 | 2246 | ||
1999 | /** | 2247 | /** |
2000 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame | 2248 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame |
@@ -2214,6 +2462,24 @@ int cfg80211_wext_siwpmksa(struct net_device *dev, | |||
2214 | void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted); | 2462 | void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted); |
2215 | 2463 | ||
2216 | /** | 2464 | /** |
2465 | * cfg80211_sched_scan_results - notify that new scan results are available | ||
2466 | * | ||
2467 | * @wiphy: the wiphy which got scheduled scan results | ||
2468 | */ | ||
2469 | void cfg80211_sched_scan_results(struct wiphy *wiphy); | ||
2470 | |||
2471 | /** | ||
2472 | * cfg80211_sched_scan_stopped - notify that the scheduled scan has stopped | ||
2473 | * | ||
2474 | * @wiphy: the wiphy on which the scheduled scan stopped | ||
2475 | * | ||
2476 | * The driver can call this function to inform cfg80211 that the | ||
2477 | * scheduled scan had to be stopped, for whatever reason. The driver | ||
2478 | * is then called back via the sched_scan_stop operation when done. | ||
2479 | */ | ||
2480 | void cfg80211_sched_scan_stopped(struct wiphy *wiphy); | ||
2481 | |||
2482 | /** | ||
2217 | * cfg80211_inform_bss_frame - inform cfg80211 of a received BSS frame | 2483 | * cfg80211_inform_bss_frame - inform cfg80211 of a received BSS frame |
2218 | * | 2484 | * |
2219 | * @wiphy: the wiphy reporting the BSS | 2485 | * @wiphy: the wiphy reporting the BSS |
@@ -2450,6 +2716,22 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, | |||
2450 | void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); | 2716 | void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); |
2451 | 2717 | ||
2452 | /** | 2718 | /** |
2719 | * cfg80211_notify_new_candidate - notify cfg80211 of a new mesh peer candidate | ||
2720 | * | ||
2721 | * @dev: network device | ||
2722 | * @macaddr: the MAC address of the new candidate | ||
2723 | * @ie: information elements advertised by the peer candidate | ||
2724 | * @ie_len: lenght of the information elements buffer | ||
2725 | * @gfp: allocation flags | ||
2726 | * | ||
2727 | * This function notifies cfg80211 that the mesh peer candidate has been | ||
2728 | * detected, most likely via a beacon or, less likely, via a probe response. | ||
2729 | * cfg80211 then sends a notification to userspace. | ||
2730 | */ | ||
2731 | void cfg80211_notify_new_peer_candidate(struct net_device *dev, | ||
2732 | const u8 *macaddr, const u8 *ie, u8 ie_len, gfp_t gfp); | ||
2733 | |||
2734 | /** | ||
2453 | * DOC: RFkill integration | 2735 | * DOC: RFkill integration |
2454 | * | 2736 | * |
2455 | * RFkill integration in cfg80211 is almost invisible to drivers, | 2737 | * RFkill integration in cfg80211 is almost invisible to drivers, |
@@ -2667,6 +2949,15 @@ void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr, | |||
2667 | struct station_info *sinfo, gfp_t gfp); | 2949 | struct station_info *sinfo, gfp_t gfp); |
2668 | 2950 | ||
2669 | /** | 2951 | /** |
2952 | * cfg80211_del_sta - notify userspace about deletion of a station | ||
2953 | * | ||
2954 | * @dev: the netdev | ||
2955 | * @mac_addr: the station's address | ||
2956 | * @gfp: allocation flags | ||
2957 | */ | ||
2958 | void cfg80211_del_sta(struct net_device *dev, const u8 *mac_addr, gfp_t gfp); | ||
2959 | |||
2960 | /** | ||
2670 | * cfg80211_rx_mgmt - notification of received, unprocessed management frame | 2961 | * cfg80211_rx_mgmt - notification of received, unprocessed management frame |
2671 | * @dev: network device | 2962 | * @dev: network device |
2672 | * @freq: Frequency on which the frame was received in MHz | 2963 | * @freq: Frequency on which the frame was received in MHz |
diff --git a/include/net/compat.h b/include/net/compat.h index 28d5428ec6a2..9ee75edcc295 100644 --- a/include/net/compat.h +++ b/include/net/compat.h | |||
@@ -43,6 +43,8 @@ extern int compat_sock_get_timestampns(struct sock *, struct timespec __user *); | |||
43 | extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *); | 43 | extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *); |
44 | extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int); | 44 | extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int); |
45 | extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned); | 45 | extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned); |
46 | extern asmlinkage long compat_sys_sendmmsg(int, struct compat_mmsghdr __user *, | ||
47 | unsigned, unsigned); | ||
46 | extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned); | 48 | extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned); |
47 | extern asmlinkage long compat_sys_recvmmsg(int, struct compat_mmsghdr __user *, | 49 | extern asmlinkage long compat_sys_recvmmsg(int, struct compat_mmsghdr __user *, |
48 | unsigned, unsigned, | 50 | unsigned, unsigned, |
diff --git a/include/net/dst.h b/include/net/dst.h index 2a46cbaef92d..07a0402c52e6 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -16,13 +16,6 @@ | |||
16 | #include <net/neighbour.h> | 16 | #include <net/neighbour.h> |
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | 18 | ||
19 | /* | ||
20 | * 0 - no debugging messages | ||
21 | * 1 - rare events and bugs (default) | ||
22 | * 2 - trace mode. | ||
23 | */ | ||
24 | #define RT_CACHE_DEBUG 0 | ||
25 | |||
26 | #define DST_GC_MIN (HZ/10) | 19 | #define DST_GC_MIN (HZ/10) |
27 | #define DST_GC_INC (HZ/2) | 20 | #define DST_GC_INC (HZ/2) |
28 | #define DST_GC_MAX (120*HZ) | 21 | #define DST_GC_MAX (120*HZ) |
@@ -92,8 +85,6 @@ struct dst_entry { | |||
92 | }; | 85 | }; |
93 | }; | 86 | }; |
94 | 87 | ||
95 | #ifdef __KERNEL__ | ||
96 | |||
97 | extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); | 88 | extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); |
98 | extern const u32 dst_default_metrics[RTAX_MAX]; | 89 | extern const u32 dst_default_metrics[RTAX_MAX]; |
99 | 90 | ||
@@ -345,14 +336,15 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) | |||
345 | 336 | ||
346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) | 337 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) |
347 | { | 338 | { |
348 | struct dst_entry *child = skb_dst(skb)->child; | 339 | struct dst_entry *child = dst_clone(skb_dst(skb)->child); |
349 | 340 | ||
350 | skb_dst_drop(skb); | 341 | skb_dst_drop(skb); |
351 | return child; | 342 | return child; |
352 | } | 343 | } |
353 | 344 | ||
354 | extern int dst_discard(struct sk_buff *skb); | 345 | extern int dst_discard(struct sk_buff *skb); |
355 | extern void *dst_alloc(struct dst_ops * ops, int initial_ref); | 346 | extern void *dst_alloc(struct dst_ops * ops, struct net_device *dev, |
347 | int initial_ref, int initial_obsolete, int flags); | ||
356 | extern void __dst_free(struct dst_entry * dst); | 348 | extern void __dst_free(struct dst_entry * dst); |
357 | extern struct dst_entry *dst_destroy(struct dst_entry * dst); | 349 | extern struct dst_entry *dst_destroy(struct dst_entry * dst); |
358 | 350 | ||
@@ -438,6 +430,5 @@ extern struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig | |||
438 | const struct flowi *fl, struct sock *sk, | 430 | const struct flowi *fl, struct sock *sk, |
439 | int flags); | 431 | int flags); |
440 | #endif | 432 | #endif |
441 | #endif | ||
442 | 433 | ||
443 | #endif /* _NET_DST_H */ | 434 | #endif /* _NET_DST_H */ |
diff --git a/include/net/flow.h b/include/net/flow.h index 7fe5a0f9483a..c6d5fe5ec1bf 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -26,8 +26,8 @@ struct flowi_common { | |||
26 | 26 | ||
27 | union flowi_uli { | 27 | union flowi_uli { |
28 | struct { | 28 | struct { |
29 | __be16 sport; | ||
30 | __be16 dport; | 29 | __be16 dport; |
30 | __be16 sport; | ||
31 | } ports; | 31 | } ports; |
32 | 32 | ||
33 | struct { | 33 | struct { |
@@ -36,8 +36,8 @@ union flowi_uli { | |||
36 | } icmpt; | 36 | } icmpt; |
37 | 37 | ||
38 | struct { | 38 | struct { |
39 | __le16 sport; | ||
40 | __le16 dport; | 39 | __le16 dport; |
40 | __le16 sport; | ||
41 | } dnports; | 41 | } dnports; |
42 | 42 | ||
43 | __be32 spi; | 43 | __be32 spi; |
@@ -70,6 +70,27 @@ struct flowi4 { | |||
70 | #define fl4_gre_key uli.gre_key | 70 | #define fl4_gre_key uli.gre_key |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static inline void flowi4_init_output(struct flowi4 *fl4, int oif, | ||
74 | __u32 mark, __u8 tos, __u8 scope, | ||
75 | __u8 proto, __u8 flags, | ||
76 | __be32 daddr, __be32 saddr, | ||
77 | __be16 dport, __be32 sport) | ||
78 | { | ||
79 | fl4->flowi4_oif = oif; | ||
80 | fl4->flowi4_iif = 0; | ||
81 | fl4->flowi4_mark = mark; | ||
82 | fl4->flowi4_tos = tos; | ||
83 | fl4->flowi4_scope = scope; | ||
84 | fl4->flowi4_proto = proto; | ||
85 | fl4->flowi4_flags = flags; | ||
86 | fl4->flowi4_secid = 0; | ||
87 | fl4->daddr = daddr; | ||
88 | fl4->saddr = saddr; | ||
89 | fl4->fl4_dport = dport; | ||
90 | fl4->fl4_sport = sport; | ||
91 | } | ||
92 | |||
93 | |||
73 | struct flowi6 { | 94 | struct flowi6 { |
74 | struct flowi_common __fl_common; | 95 | struct flowi_common __fl_common; |
75 | #define flowi6_oif __fl_common.flowic_oif | 96 | #define flowi6_oif __fl_common.flowic_oif |
diff --git a/include/net/garp.h b/include/net/garp.h index f4c295984c45..834d8add9e5f 100644 --- a/include/net/garp.h +++ b/include/net/garp.h | |||
@@ -104,10 +104,12 @@ struct garp_applicant { | |||
104 | struct sk_buff_head queue; | 104 | struct sk_buff_head queue; |
105 | struct sk_buff *pdu; | 105 | struct sk_buff *pdu; |
106 | struct rb_root gid; | 106 | struct rb_root gid; |
107 | struct rcu_head rcu; | ||
107 | }; | 108 | }; |
108 | 109 | ||
109 | struct garp_port { | 110 | struct garp_port { |
110 | struct garp_applicant __rcu *applicants[GARP_APPLICATION_MAX + 1]; | 111 | struct garp_applicant __rcu *applicants[GARP_APPLICATION_MAX + 1]; |
112 | struct rcu_head rcu; | ||
111 | }; | 113 | }; |
112 | 114 | ||
113 | extern int garp_register_application(struct garp_application *app); | 115 | extern int garp_register_application(struct garp_application *app); |
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index fa157712e982..a79b6cfb02a8 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h | |||
@@ -11,7 +11,7 @@ struct gnet_dump { | |||
11 | struct sk_buff * skb; | 11 | struct sk_buff * skb; |
12 | struct nlattr * tail; | 12 | struct nlattr * tail; |
13 | 13 | ||
14 | /* Backward compatability */ | 14 | /* Backward compatibility */ |
15 | int compat_tc_stats; | 15 | int compat_tc_stats; |
16 | int compat_xstats; | 16 | int compat_xstats; |
17 | void * xstats; | 17 | void * xstats; |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 04977eefb0ee..11cf373970a9 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -30,8 +30,6 @@ | |||
30 | #define IF_PREFIX_ONLINK 0x01 | 30 | #define IF_PREFIX_ONLINK 0x01 |
31 | #define IF_PREFIX_AUTOCONF 0x02 | 31 | #define IF_PREFIX_AUTOCONF 0x02 |
32 | 32 | ||
33 | #ifdef __KERNEL__ | ||
34 | |||
35 | enum { | 33 | enum { |
36 | INET6_IFADDR_STATE_DAD, | 34 | INET6_IFADDR_STATE_DAD, |
37 | INET6_IFADDR_STATE_POSTDAD, | 35 | INET6_IFADDR_STATE_POSTDAD, |
@@ -156,8 +154,8 @@ struct ifacaddr6 { | |||
156 | struct ipv6_devstat { | 154 | struct ipv6_devstat { |
157 | struct proc_dir_entry *proc_dir_entry; | 155 | struct proc_dir_entry *proc_dir_entry; |
158 | DEFINE_SNMP_STAT(struct ipstats_mib, ipv6); | 156 | DEFINE_SNMP_STAT(struct ipstats_mib, ipv6); |
159 | DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6); | 157 | DEFINE_SNMP_STAT_ATOMIC(struct icmpv6_mib_device, icmpv6dev); |
160 | DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg); | 158 | DEFINE_SNMP_STAT_ATOMIC(struct icmpv6msg_mib_device, icmpv6msgdev); |
161 | }; | 159 | }; |
162 | 160 | ||
163 | struct inet6_dev { | 161 | struct inet6_dev { |
@@ -196,7 +194,7 @@ struct inet6_dev { | |||
196 | struct rcu_head rcu; | 194 | struct rcu_head rcu; |
197 | }; | 195 | }; |
198 | 196 | ||
199 | static inline void ipv6_eth_mc_map(struct in6_addr *addr, char *buf) | 197 | static inline void ipv6_eth_mc_map(const struct in6_addr *addr, char *buf) |
200 | { | 198 | { |
201 | /* | 199 | /* |
202 | * +-------+-------+-------+-------+-------+-------+ | 200 | * +-------+-------+-------+-------+-------+-------+ |
@@ -210,7 +208,7 @@ static inline void ipv6_eth_mc_map(struct in6_addr *addr, char *buf) | |||
210 | memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32)); | 208 | memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32)); |
211 | } | 209 | } |
212 | 210 | ||
213 | static inline void ipv6_tr_mc_map(struct in6_addr *addr, char *buf) | 211 | static inline void ipv6_tr_mc_map(const struct in6_addr *addr, char *buf) |
214 | { | 212 | { |
215 | /* All nodes FF01::1, FF02::1, FF02::1:FFxx:xxxx */ | 213 | /* All nodes FF01::1, FF02::1, FF02::1:FFxx:xxxx */ |
216 | 214 | ||
@@ -286,5 +284,20 @@ static inline void ipv6_ib_mc_map(const struct in6_addr *addr, | |||
286 | buf[9] = broadcast[9]; | 284 | buf[9] = broadcast[9]; |
287 | memcpy(buf + 10, addr->s6_addr + 6, 10); | 285 | memcpy(buf + 10, addr->s6_addr + 6, 10); |
288 | } | 286 | } |
289 | #endif | 287 | |
288 | static inline int ipv6_ipgre_mc_map(const struct in6_addr *addr, | ||
289 | const unsigned char *broadcast, char *buf) | ||
290 | { | ||
291 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) { | ||
292 | memcpy(buf, broadcast, 4); | ||
293 | } else { | ||
294 | /* v4mapped? */ | ||
295 | if ((addr->s6_addr32[0] | addr->s6_addr32[1] | | ||
296 | (addr->s6_addr32[2] ^ htonl(0x0000ffff))) != 0) | ||
297 | return -EINVAL; | ||
298 | memcpy(buf, &addr->s6_addr32[3], 4); | ||
299 | } | ||
300 | return 0; | ||
301 | } | ||
302 | |||
290 | #endif | 303 | #endif |
diff --git a/include/net/inet6_connection_sock.h b/include/net/inet6_connection_sock.h index ff013505236b..3207e58ee019 100644 --- a/include/net/inet6_connection_sock.h +++ b/include/net/inet6_connection_sock.h | |||
@@ -41,5 +41,5 @@ extern void inet6_csk_reqsk_queue_hash_add(struct sock *sk, | |||
41 | 41 | ||
42 | extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); | 42 | extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); |
43 | 43 | ||
44 | extern int inet6_csk_xmit(struct sk_buff *skb); | 44 | extern int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl); |
45 | #endif /* _INET6_CONNECTION_SOCK_H */ | 45 | #endif /* _INET6_CONNECTION_SOCK_H */ |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 6ac4e3b5007f..e6db62e756dc 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -36,7 +36,7 @@ struct tcp_congestion_ops; | |||
36 | * (i.e. things that depend on the address family) | 36 | * (i.e. things that depend on the address family) |
37 | */ | 37 | */ |
38 | struct inet_connection_sock_af_ops { | 38 | struct inet_connection_sock_af_ops { |
39 | int (*queue_xmit)(struct sk_buff *skb); | 39 | int (*queue_xmit)(struct sk_buff *skb, struct flowi *fl); |
40 | void (*send_check)(struct sock *sk, struct sk_buff *skb); | 40 | void (*send_check)(struct sock *sk, struct sk_buff *skb); |
41 | int (*rebuild_header)(struct sock *sk); | 41 | int (*rebuild_header)(struct sock *sk); |
42 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); | 42 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); |
@@ -249,7 +249,11 @@ extern int inet_csk_bind_conflict(const struct sock *sk, | |||
249 | extern int inet_csk_get_port(struct sock *sk, unsigned short snum); | 249 | extern int inet_csk_get_port(struct sock *sk, unsigned short snum); |
250 | 250 | ||
251 | extern struct dst_entry* inet_csk_route_req(struct sock *sk, | 251 | extern struct dst_entry* inet_csk_route_req(struct sock *sk, |
252 | struct flowi4 *fl4, | ||
252 | const struct request_sock *req); | 253 | const struct request_sock *req); |
254 | extern struct dst_entry* inet_csk_route_child_sock(struct sock *sk, | ||
255 | struct sock *newsk, | ||
256 | const struct request_sock *req); | ||
253 | 257 | ||
254 | static inline void inet_csk_reqsk_queue_add(struct sock *sk, | 258 | static inline void inet_csk_reqsk_queue_add(struct sock *sk, |
255 | struct request_sock *req, | 259 | struct request_sock *req, |
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 88bdd010d65d..2fa8d1341a0a 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) | |||
38 | return outer; | 38 | return outer; |
39 | } | 39 | } |
40 | 40 | ||
41 | #define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0) | 41 | static inline void INET_ECN_xmit(struct sock *sk) |
42 | #define INET_ECN_dontxmit(sk) \ | 42 | { |
43 | do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0) | 43 | inet_sk(sk)->tos |= INET_ECN_ECT_0; |
44 | if (inet6_sk(sk) != NULL) | ||
45 | inet6_sk(sk)->tclass |= INET_ECN_ECT_0; | ||
46 | } | ||
47 | |||
48 | static inline void INET_ECN_dontxmit(struct sock *sk) | ||
49 | { | ||
50 | inet_sk(sk)->tos &= ~INET_ECN_MASK; | ||
51 | if (inet6_sk(sk) != NULL) | ||
52 | inet6_sk(sk)->tclass &= ~INET_ECN_MASK; | ||
53 | } | ||
44 | 54 | ||
45 | #define IP6_ECN_flow_init(label) do { \ | 55 | #define IP6_ECN_flow_init(label) do { \ |
46 | (label) &= ~htonl(INET_ECN_MASK << 20); \ | 56 | (label) &= ~htonl(INET_ECN_MASK << 20); \ |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 7a37369f8ea3..caaff5f5f39f 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -57,7 +57,15 @@ struct ip_options { | |||
57 | unsigned char __data[0]; | 57 | unsigned char __data[0]; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #define optlength(opt) (sizeof(struct ip_options) + opt->optlen) | 60 | struct ip_options_rcu { |
61 | struct rcu_head rcu; | ||
62 | struct ip_options opt; | ||
63 | }; | ||
64 | |||
65 | struct ip_options_data { | ||
66 | struct ip_options_rcu opt; | ||
67 | char data[40]; | ||
68 | }; | ||
61 | 69 | ||
62 | struct inet_request_sock { | 70 | struct inet_request_sock { |
63 | struct request_sock req; | 71 | struct request_sock req; |
@@ -78,7 +86,7 @@ struct inet_request_sock { | |||
78 | acked : 1, | 86 | acked : 1, |
79 | no_srccheck: 1; | 87 | no_srccheck: 1; |
80 | kmemcheck_bitfield_end(flags); | 88 | kmemcheck_bitfield_end(flags); |
81 | struct ip_options *opt; | 89 | struct ip_options_rcu *opt; |
82 | }; | 90 | }; |
83 | 91 | ||
84 | static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) | 92 | static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) |
@@ -88,17 +96,21 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) | |||
88 | 96 | ||
89 | struct inet_cork { | 97 | struct inet_cork { |
90 | unsigned int flags; | 98 | unsigned int flags; |
91 | unsigned int fragsize; | 99 | __be32 addr; |
92 | struct ip_options *opt; | 100 | struct ip_options *opt; |
101 | unsigned int fragsize; | ||
93 | struct dst_entry *dst; | 102 | struct dst_entry *dst; |
94 | int length; /* Total length of all frames */ | 103 | int length; /* Total length of all frames */ |
95 | __be32 addr; | ||
96 | struct flowi fl; | ||
97 | struct page *page; | 104 | struct page *page; |
98 | u32 off; | 105 | u32 off; |
99 | u8 tx_flags; | 106 | u8 tx_flags; |
100 | }; | 107 | }; |
101 | 108 | ||
109 | struct inet_cork_full { | ||
110 | struct inet_cork base; | ||
111 | struct flowi fl; | ||
112 | }; | ||
113 | |||
102 | struct ip_mc_socklist; | 114 | struct ip_mc_socklist; |
103 | struct ipv6_pinfo; | 115 | struct ipv6_pinfo; |
104 | struct rtable; | 116 | struct rtable; |
@@ -140,7 +152,7 @@ struct inet_sock { | |||
140 | __be16 inet_sport; | 152 | __be16 inet_sport; |
141 | __u16 inet_id; | 153 | __u16 inet_id; |
142 | 154 | ||
143 | struct ip_options *opt; | 155 | struct ip_options_rcu __rcu *inet_opt; |
144 | __u8 tos; | 156 | __u8 tos; |
145 | __u8 min_ttl; | 157 | __u8 min_ttl; |
146 | __u8 mc_ttl; | 158 | __u8 mc_ttl; |
@@ -156,7 +168,7 @@ struct inet_sock { | |||
156 | int mc_index; | 168 | int mc_index; |
157 | __be32 mc_addr; | 169 | __be32 mc_addr; |
158 | struct ip_mc_socklist __rcu *mc_list; | 170 | struct ip_mc_socklist __rcu *mc_list; |
159 | struct inet_cork cork; | 171 | struct inet_cork_full cork; |
160 | }; | 172 | }; |
161 | 173 | ||
162 | #define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */ | 174 | #define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */ |
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index e6dd8da6b2ad..8a159cc3d68b 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
@@ -80,7 +80,7 @@ static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create) | |||
80 | return inet_getpeer(&daddr, create); | 80 | return inet_getpeer(&daddr, create); |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline struct inet_peer *inet_getpeer_v6(struct in6_addr *v6daddr, int create) | 83 | static inline struct inet_peer *inet_getpeer_v6(const struct in6_addr *v6daddr, int create) |
84 | { | 84 | { |
85 | struct inetpeer_addr daddr; | 85 | struct inetpeer_addr daddr; |
86 | 86 | ||
diff --git a/include/net/ip.h b/include/net/ip.h index a4f631108c54..66dd49149208 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -52,7 +52,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb) | |||
52 | struct ipcm_cookie { | 52 | struct ipcm_cookie { |
53 | __be32 addr; | 53 | __be32 addr; |
54 | int oif; | 54 | int oif; |
55 | struct ip_options *opt; | 55 | struct ip_options_rcu *opt; |
56 | __u8 tx_flags; | 56 | __u8 tx_flags; |
57 | }; | 57 | }; |
58 | 58 | ||
@@ -92,7 +92,7 @@ extern int igmp_mc_proc_init(void); | |||
92 | 92 | ||
93 | extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, | 93 | extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, |
94 | __be32 saddr, __be32 daddr, | 94 | __be32 saddr, __be32 daddr, |
95 | struct ip_options *opt); | 95 | struct ip_options_rcu *opt); |
96 | extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, | 96 | extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, |
97 | struct packet_type *pt, struct net_device *orig_dev); | 97 | struct packet_type *pt, struct net_device *orig_dev); |
98 | extern int ip_local_deliver(struct sk_buff *skb); | 98 | extern int ip_local_deliver(struct sk_buff *skb); |
@@ -104,9 +104,9 @@ extern int ip_do_nat(struct sk_buff *skb); | |||
104 | extern void ip_send_check(struct iphdr *ip); | 104 | extern void ip_send_check(struct iphdr *ip); |
105 | extern int __ip_local_out(struct sk_buff *skb); | 105 | extern int __ip_local_out(struct sk_buff *skb); |
106 | extern int ip_local_out(struct sk_buff *skb); | 106 | extern int ip_local_out(struct sk_buff *skb); |
107 | extern int ip_queue_xmit(struct sk_buff *skb); | 107 | extern int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl); |
108 | extern void ip_init(void); | 108 | extern void ip_init(void); |
109 | extern int ip_append_data(struct sock *sk, | 109 | extern int ip_append_data(struct sock *sk, struct flowi4 *fl4, |
110 | int getfrag(void *from, char *to, int offset, int len, | 110 | int getfrag(void *from, char *to, int offset, int len, |
111 | int odd, struct sk_buff *skb), | 111 | int odd, struct sk_buff *skb), |
112 | void *from, int len, int protolen, | 112 | void *from, int len, int protolen, |
@@ -114,15 +114,17 @@ extern int ip_append_data(struct sock *sk, | |||
114 | struct rtable **rt, | 114 | struct rtable **rt, |
115 | unsigned int flags); | 115 | unsigned int flags); |
116 | extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb); | 116 | extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb); |
117 | extern ssize_t ip_append_page(struct sock *sk, struct page *page, | 117 | extern ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page, |
118 | int offset, size_t size, int flags); | 118 | int offset, size_t size, int flags); |
119 | extern struct sk_buff *__ip_make_skb(struct sock *sk, | 119 | extern struct sk_buff *__ip_make_skb(struct sock *sk, |
120 | struct flowi4 *fl4, | ||
120 | struct sk_buff_head *queue, | 121 | struct sk_buff_head *queue, |
121 | struct inet_cork *cork); | 122 | struct inet_cork *cork); |
122 | extern int ip_send_skb(struct sk_buff *skb); | 123 | extern int ip_send_skb(struct sk_buff *skb); |
123 | extern int ip_push_pending_frames(struct sock *sk); | 124 | extern int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4); |
124 | extern void ip_flush_pending_frames(struct sock *sk); | 125 | extern void ip_flush_pending_frames(struct sock *sk); |
125 | extern struct sk_buff *ip_make_skb(struct sock *sk, | 126 | extern struct sk_buff *ip_make_skb(struct sock *sk, |
127 | struct flowi4 *fl4, | ||
126 | int getfrag(void *from, char *to, int offset, int len, | 128 | int getfrag(void *from, char *to, int offset, int len, |
127 | int odd, struct sk_buff *skb), | 129 | int odd, struct sk_buff *skb), |
128 | void *from, int length, int transhdrlen, | 130 | void *from, int length, int transhdrlen, |
@@ -130,9 +132,9 @@ extern struct sk_buff *ip_make_skb(struct sock *sk, | |||
130 | struct rtable **rtp, | 132 | struct rtable **rtp, |
131 | unsigned int flags); | 133 | unsigned int flags); |
132 | 134 | ||
133 | static inline struct sk_buff *ip_finish_skb(struct sock *sk) | 135 | static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4) |
134 | { | 136 | { |
135 | return __ip_make_skb(sk, &sk->sk_write_queue, &inet_sk(sk)->cork); | 137 | return __ip_make_skb(sk, fl4, &sk->sk_write_queue, &inet_sk(sk)->cork.base); |
136 | } | 138 | } |
137 | 139 | ||
138 | /* datagram.c */ | 140 | /* datagram.c */ |
@@ -172,8 +174,8 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg) | |||
172 | return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0; | 174 | return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0; |
173 | } | 175 | } |
174 | 176 | ||
175 | void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, | 177 | void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr, |
176 | unsigned int len); | 178 | struct ip_reply_arg *arg, unsigned int len); |
177 | 179 | ||
178 | struct ipv4_config { | 180 | struct ipv4_config { |
179 | int log_martians; | 181 | int log_martians; |
@@ -339,6 +341,14 @@ static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, ch | |||
339 | buf[16] = addr & 0x0f; | 341 | buf[16] = addr & 0x0f; |
340 | } | 342 | } |
341 | 343 | ||
344 | static inline void ip_ipgre_mc_map(__be32 naddr, const unsigned char *broadcast, char *buf) | ||
345 | { | ||
346 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) | ||
347 | memcpy(buf, broadcast, 4); | ||
348 | else | ||
349 | memcpy(buf, &naddr, sizeof(naddr)); | ||
350 | } | ||
351 | |||
342 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 352 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
343 | #include <linux/ipv6.h> | 353 | #include <linux/ipv6.h> |
344 | #endif | 354 | #endif |
@@ -408,14 +418,15 @@ extern int ip_forward(struct sk_buff *skb); | |||
408 | * Functions provided by ip_options.c | 418 | * Functions provided by ip_options.c |
409 | */ | 419 | */ |
410 | 420 | ||
411 | extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, __be32 daddr, struct rtable *rt, int is_frag); | 421 | extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, |
422 | __be32 daddr, struct rtable *rt, int is_frag); | ||
412 | extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb); | 423 | extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb); |
413 | extern void ip_options_fragment(struct sk_buff *skb); | 424 | extern void ip_options_fragment(struct sk_buff *skb); |
414 | extern int ip_options_compile(struct net *net, | 425 | extern int ip_options_compile(struct net *net, |
415 | struct ip_options *opt, struct sk_buff *skb); | 426 | struct ip_options *opt, struct sk_buff *skb); |
416 | extern int ip_options_get(struct net *net, struct ip_options **optp, | 427 | extern int ip_options_get(struct net *net, struct ip_options_rcu **optp, |
417 | unsigned char *data, int optlen); | 428 | unsigned char *data, int optlen); |
418 | extern int ip_options_get_from_user(struct net *net, struct ip_options **optp, | 429 | extern int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp, |
419 | unsigned char __user *data, int optlen); | 430 | unsigned char __user *data, int optlen); |
420 | extern void ip_options_undo(struct ip_options * opt); | 431 | extern void ip_options_undo(struct ip_options * opt); |
421 | extern void ip_forward_options(struct sk_buff *skb); | 432 | extern void ip_forward_options(struct sk_buff *skb); |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index bc3cde0a810c..477ef75f3873 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #ifndef _IP6_FIB_H | 13 | #ifndef _IP6_FIB_H |
14 | #define _IP6_FIB_H | 14 | #define _IP6_FIB_H |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | |||
18 | #include <linux/ipv6_route.h> | 16 | #include <linux/ipv6_route.h> |
19 | #include <linux/rtnetlink.h> | 17 | #include <linux/rtnetlink.h> |
20 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
@@ -42,6 +40,7 @@ struct fib6_config { | |||
42 | 40 | ||
43 | struct in6_addr fc_dst; | 41 | struct in6_addr fc_dst; |
44 | struct in6_addr fc_src; | 42 | struct in6_addr fc_src; |
43 | struct in6_addr fc_prefsrc; | ||
45 | struct in6_addr fc_gateway; | 44 | struct in6_addr fc_gateway; |
46 | 45 | ||
47 | unsigned long fc_expires; | 46 | unsigned long fc_expires; |
@@ -107,6 +106,7 @@ struct rt6_info { | |||
107 | struct rt6key rt6i_dst ____cacheline_aligned_in_smp; | 106 | struct rt6key rt6i_dst ____cacheline_aligned_in_smp; |
108 | u32 rt6i_flags; | 107 | u32 rt6i_flags; |
109 | struct rt6key rt6i_src; | 108 | struct rt6key rt6i_src; |
109 | struct rt6key rt6i_prefsrc; | ||
110 | u32 rt6i_metric; | 110 | u32 rt6i_metric; |
111 | u32 rt6i_peer_genid; | 111 | u32 rt6i_peer_genid; |
112 | 112 | ||
@@ -196,12 +196,12 @@ extern struct dst_entry *fib6_rule_lookup(struct net *net, | |||
196 | pol_lookup_t lookup); | 196 | pol_lookup_t lookup); |
197 | 197 | ||
198 | extern struct fib6_node *fib6_lookup(struct fib6_node *root, | 198 | extern struct fib6_node *fib6_lookup(struct fib6_node *root, |
199 | struct in6_addr *daddr, | 199 | const struct in6_addr *daddr, |
200 | struct in6_addr *saddr); | 200 | const struct in6_addr *saddr); |
201 | 201 | ||
202 | struct fib6_node *fib6_locate(struct fib6_node *root, | 202 | struct fib6_node *fib6_locate(struct fib6_node *root, |
203 | struct in6_addr *daddr, int dst_len, | 203 | const struct in6_addr *daddr, int dst_len, |
204 | struct in6_addr *saddr, int src_len); | 204 | const struct in6_addr *saddr, int src_len); |
205 | 205 | ||
206 | extern void fib6_clean_all(struct net *net, | 206 | extern void fib6_clean_all(struct net *net, |
207 | int (*func)(struct rt6_info *, void *arg), | 207 | int (*func)(struct rt6_info *, void *arg), |
@@ -238,4 +238,3 @@ static inline void fib6_rules_cleanup(void) | |||
238 | } | 238 | } |
239 | #endif | 239 | #endif |
240 | #endif | 240 | #endif |
241 | #endif | ||
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index c850e5fb967c..5e91b72fc718 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -21,8 +21,6 @@ struct route_info { | |||
21 | __u8 prefix[0]; /* 0,8 or 16 */ | 21 | __u8 prefix[0]; /* 0,8 or 16 */ |
22 | }; | 22 | }; |
23 | 23 | ||
24 | #ifdef __KERNEL__ | ||
25 | |||
26 | #include <net/flow.h> | 24 | #include <net/flow.h> |
27 | #include <net/ip6_fib.h> | 25 | #include <net/ip6_fib.h> |
28 | #include <net/sock.h> | 26 | #include <net/sock.h> |
@@ -84,6 +82,12 @@ extern int ip6_route_add(struct fib6_config *cfg); | |||
84 | extern int ip6_ins_rt(struct rt6_info *); | 82 | extern int ip6_ins_rt(struct rt6_info *); |
85 | extern int ip6_del_rt(struct rt6_info *); | 83 | extern int ip6_del_rt(struct rt6_info *); |
86 | 84 | ||
85 | extern int ip6_route_get_saddr(struct net *net, | ||
86 | struct rt6_info *rt, | ||
87 | const struct in6_addr *daddr, | ||
88 | unsigned int prefs, | ||
89 | struct in6_addr *saddr); | ||
90 | |||
87 | extern struct rt6_info *rt6_lookup(struct net *net, | 91 | extern struct rt6_info *rt6_lookup(struct net *net, |
88 | const struct in6_addr *daddr, | 92 | const struct in6_addr *daddr, |
89 | const struct in6_addr *saddr, | 93 | const struct in6_addr *saddr, |
@@ -106,9 +110,9 @@ extern int ip6_dst_hoplimit(struct dst_entry *dst); | |||
106 | * support functions for ND | 110 | * support functions for ND |
107 | * | 111 | * |
108 | */ | 112 | */ |
109 | extern struct rt6_info * rt6_get_dflt_router(struct in6_addr *addr, | 113 | extern struct rt6_info * rt6_get_dflt_router(const struct in6_addr *addr, |
110 | struct net_device *dev); | 114 | struct net_device *dev); |
111 | extern struct rt6_info * rt6_add_dflt_router(struct in6_addr *gwaddr, | 115 | extern struct rt6_info * rt6_add_dflt_router(const struct in6_addr *gwaddr, |
112 | struct net_device *dev, | 116 | struct net_device *dev, |
113 | unsigned int pref); | 117 | unsigned int pref); |
114 | 118 | ||
@@ -116,17 +120,17 @@ extern void rt6_purge_dflt_routers(struct net *net); | |||
116 | 120 | ||
117 | extern int rt6_route_rcv(struct net_device *dev, | 121 | extern int rt6_route_rcv(struct net_device *dev, |
118 | u8 *opt, int len, | 122 | u8 *opt, int len, |
119 | struct in6_addr *gwaddr); | 123 | const struct in6_addr *gwaddr); |
120 | 124 | ||
121 | extern void rt6_redirect(struct in6_addr *dest, | 125 | extern void rt6_redirect(const struct in6_addr *dest, |
122 | struct in6_addr *src, | 126 | const struct in6_addr *src, |
123 | struct in6_addr *saddr, | 127 | const struct in6_addr *saddr, |
124 | struct neighbour *neigh, | 128 | struct neighbour *neigh, |
125 | u8 *lladdr, | 129 | u8 *lladdr, |
126 | int on_link); | 130 | int on_link); |
127 | 131 | ||
128 | extern void rt6_pmtu_discovery(struct in6_addr *daddr, | 132 | extern void rt6_pmtu_discovery(const struct in6_addr *daddr, |
129 | struct in6_addr *saddr, | 133 | const struct in6_addr *saddr, |
130 | struct net_device *dev, | 134 | struct net_device *dev, |
131 | u32 pmtu); | 135 | u32 pmtu); |
132 | 136 | ||
@@ -141,6 +145,7 @@ struct rt6_rtnl_dump_arg { | |||
141 | extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); | 145 | extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); |
142 | extern void rt6_ifdown(struct net *net, struct net_device *dev); | 146 | extern void rt6_ifdown(struct net *net, struct net_device *dev); |
143 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); | 147 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); |
148 | extern void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); | ||
144 | 149 | ||
145 | 150 | ||
146 | /* | 151 | /* |
@@ -186,4 +191,3 @@ static inline int ip6_skb_dst_mtu(struct sk_buff *skb) | |||
186 | } | 191 | } |
187 | 192 | ||
188 | #endif | 193 | #endif |
189 | #endif | ||
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index e5d66ec88cf6..10422ef14e28 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -160,7 +160,8 @@ struct fib_table { | |||
160 | struct hlist_node tb_hlist; | 160 | struct hlist_node tb_hlist; |
161 | u32 tb_id; | 161 | u32 tb_id; |
162 | int tb_default; | 162 | int tb_default; |
163 | unsigned char tb_data[0]; | 163 | int tb_num_default; |
164 | unsigned long tb_data[0]; | ||
164 | }; | 165 | }; |
165 | 166 | ||
166 | extern int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp, | 167 | extern int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp, |
@@ -227,9 +228,9 @@ extern struct fib_table *fib_get_table(struct net *net, u32 id); | |||
227 | /* Exported by fib_frontend.c */ | 228 | /* Exported by fib_frontend.c */ |
228 | extern const struct nla_policy rtm_ipv4_policy[]; | 229 | extern const struct nla_policy rtm_ipv4_policy[]; |
229 | extern void ip_fib_init(void); | 230 | extern void ip_fib_init(void); |
230 | extern int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, | 231 | extern int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst, |
231 | struct net_device *dev, __be32 *spec_dst, | 232 | u8 tos, int oif, struct net_device *dev, |
232 | u32 *itag, u32 mark); | 233 | __be32 *spec_dst, u32 *itag); |
233 | extern void fib_select_default(struct fib_result *res); | 234 | extern void fib_select_default(struct fib_result *res); |
234 | 235 | ||
235 | /* Exported by fib_semantics.c */ | 236 | /* Exported by fib_semantics.c */ |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 30b49ed72f0d..4fff432aeade 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -8,9 +8,6 @@ | |||
8 | 8 | ||
9 | #include <linux/ip_vs.h> /* definitions shared with userland */ | 9 | #include <linux/ip_vs.h> /* definitions shared with userland */ |
10 | 10 | ||
11 | /* old ipvsadm versions still include this file directly */ | ||
12 | #ifdef __KERNEL__ | ||
13 | |||
14 | #include <asm/types.h> /* for __uXX types */ | 11 | #include <asm/types.h> /* for __uXX types */ |
15 | 12 | ||
16 | #include <linux/sysctl.h> /* for ctl_path */ | 13 | #include <linux/sysctl.h> /* for ctl_path */ |
@@ -52,7 +49,7 @@ static inline struct net *skb_net(const struct sk_buff *skb) | |||
52 | */ | 49 | */ |
53 | if (likely(skb->dev && skb->dev->nd_net)) | 50 | if (likely(skb->dev && skb->dev->nd_net)) |
54 | return dev_net(skb->dev); | 51 | return dev_net(skb->dev); |
55 | if (skb_dst(skb)->dev) | 52 | if (skb_dst(skb) && skb_dst(skb)->dev) |
56 | return dev_net(skb_dst(skb)->dev); | 53 | return dev_net(skb_dst(skb)->dev); |
57 | WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", | 54 | WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", |
58 | __func__, __LINE__); | 55 | __func__, __LINE__); |
@@ -92,7 +89,7 @@ static inline struct net *skb_sknet(const struct sk_buff *skb) | |||
92 | } | 89 | } |
93 | /* | 90 | /* |
94 | * This one needed for single_open_net since net is stored directly in | 91 | * This one needed for single_open_net since net is stored directly in |
95 | * private not as a struct i.e. seq_file_net cant be used. | 92 | * private not as a struct i.e. seq_file_net can't be used. |
96 | */ | 93 | */ |
97 | static inline struct net *seq_file_single_net(struct seq_file *seq) | 94 | static inline struct net *seq_file_single_net(struct seq_file *seq) |
98 | { | 95 | { |
@@ -668,9 +665,7 @@ struct ip_vs_dest { | |||
668 | struct dst_entry *dst_cache; /* destination cache entry */ | 665 | struct dst_entry *dst_cache; /* destination cache entry */ |
669 | u32 dst_rtos; /* RT_TOS(tos) for dst */ | 666 | u32 dst_rtos; /* RT_TOS(tos) for dst */ |
670 | u32 dst_cookie; | 667 | u32 dst_cookie; |
671 | #ifdef CONFIG_IP_VS_IPV6 | 668 | union nf_inet_addr dst_saddr; |
672 | struct in6_addr dst_saddr; | ||
673 | #endif | ||
674 | 669 | ||
675 | /* for virtual service */ | 670 | /* for virtual service */ |
676 | struct ip_vs_service *svc; /* service it belongs to */ | 671 | struct ip_vs_service *svc; /* service it belongs to */ |
@@ -791,6 +786,7 @@ struct ip_vs_app { | |||
791 | /* IPVS in network namespace */ | 786 | /* IPVS in network namespace */ |
792 | struct netns_ipvs { | 787 | struct netns_ipvs { |
793 | int gen; /* Generation */ | 788 | int gen; /* Generation */ |
789 | int enable; /* enable like nf_hooks do */ | ||
794 | /* | 790 | /* |
795 | * Hash table: for real service lookups | 791 | * Hash table: for real service lookups |
796 | */ | 792 | */ |
@@ -1089,6 +1085,22 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp) | |||
1089 | atomic_inc(&ctl_cp->n_control); | 1085 | atomic_inc(&ctl_cp->n_control); |
1090 | } | 1086 | } |
1091 | 1087 | ||
1088 | /* | ||
1089 | * IPVS netns init & cleanup functions | ||
1090 | */ | ||
1091 | extern int __ip_vs_estimator_init(struct net *net); | ||
1092 | extern int __ip_vs_control_init(struct net *net); | ||
1093 | extern int __ip_vs_protocol_init(struct net *net); | ||
1094 | extern int __ip_vs_app_init(struct net *net); | ||
1095 | extern int __ip_vs_conn_init(struct net *net); | ||
1096 | extern int __ip_vs_sync_init(struct net *net); | ||
1097 | extern void __ip_vs_conn_cleanup(struct net *net); | ||
1098 | extern void __ip_vs_app_cleanup(struct net *net); | ||
1099 | extern void __ip_vs_protocol_cleanup(struct net *net); | ||
1100 | extern void __ip_vs_control_cleanup(struct net *net); | ||
1101 | extern void __ip_vs_estimator_cleanup(struct net *net); | ||
1102 | extern void __ip_vs_sync_cleanup(struct net *net); | ||
1103 | extern void __ip_vs_service_cleanup(struct net *net); | ||
1092 | 1104 | ||
1093 | /* | 1105 | /* |
1094 | * IPVS application functions | 1106 | * IPVS application functions |
@@ -1239,7 +1251,8 @@ extern int ip_vs_tunnel_xmit | |||
1239 | extern int ip_vs_dr_xmit | 1251 | extern int ip_vs_dr_xmit |
1240 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); | 1252 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); |
1241 | extern int ip_vs_icmp_xmit | 1253 | extern int ip_vs_icmp_xmit |
1242 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, int offset); | 1254 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, |
1255 | int offset, unsigned int hooknum); | ||
1243 | extern void ip_vs_dst_reset(struct ip_vs_dest *dest); | 1256 | extern void ip_vs_dst_reset(struct ip_vs_dest *dest); |
1244 | 1257 | ||
1245 | #ifdef CONFIG_IP_VS_IPV6 | 1258 | #ifdef CONFIG_IP_VS_IPV6 |
@@ -1253,7 +1266,7 @@ extern int ip_vs_dr_xmit_v6 | |||
1253 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); | 1266 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); |
1254 | extern int ip_vs_icmp_xmit_v6 | 1267 | extern int ip_vs_icmp_xmit_v6 |
1255 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, | 1268 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, |
1256 | int offset); | 1269 | int offset, unsigned int hooknum); |
1257 | #endif | 1270 | #endif |
1258 | 1271 | ||
1259 | #ifdef CONFIG_SYSCTL | 1272 | #ifdef CONFIG_SYSCTL |
@@ -1415,6 +1428,4 @@ ip_vs_dest_conn_overhead(struct ip_vs_dest *dest) | |||
1415 | atomic_read(&dest->inactconns); | 1428 | atomic_read(&dest->inactconns); |
1416 | } | 1429 | } |
1417 | 1430 | ||
1418 | #endif /* __KERNEL__ */ | ||
1419 | |||
1420 | #endif /* _NET_IP_VS_H */ | 1431 | #endif /* _NET_IP_VS_H */ |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 34200f9e6805..c033ed00df7d 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -77,11 +77,9 @@ | |||
77 | /* | 77 | /* |
78 | * Addr scopes | 78 | * Addr scopes |
79 | */ | 79 | */ |
80 | #ifdef __KERNEL__ | ||
81 | #define IPV6_ADDR_MC_SCOPE(a) \ | 80 | #define IPV6_ADDR_MC_SCOPE(a) \ |
82 | ((a)->s6_addr[1] & 0x0f) /* nonstandard */ | 81 | ((a)->s6_addr[1] & 0x0f) /* nonstandard */ |
83 | #define __IPV6_ADDR_SCOPE_INVALID -1 | 82 | #define __IPV6_ADDR_SCOPE_INVALID -1 |
84 | #endif | ||
85 | #define IPV6_ADDR_SCOPE_NODELOCAL 0x01 | 83 | #define IPV6_ADDR_SCOPE_NODELOCAL 0x01 |
86 | #define IPV6_ADDR_SCOPE_LINKLOCAL 0x02 | 84 | #define IPV6_ADDR_SCOPE_LINKLOCAL 0x02 |
87 | #define IPV6_ADDR_SCOPE_SITELOCAL 0x05 | 85 | #define IPV6_ADDR_SCOPE_SITELOCAL 0x05 |
@@ -91,14 +89,12 @@ | |||
91 | /* | 89 | /* |
92 | * Addr flags | 90 | * Addr flags |
93 | */ | 91 | */ |
94 | #ifdef __KERNEL__ | ||
95 | #define IPV6_ADDR_MC_FLAG_TRANSIENT(a) \ | 92 | #define IPV6_ADDR_MC_FLAG_TRANSIENT(a) \ |
96 | ((a)->s6_addr[1] & 0x10) | 93 | ((a)->s6_addr[1] & 0x10) |
97 | #define IPV6_ADDR_MC_FLAG_PREFIX(a) \ | 94 | #define IPV6_ADDR_MC_FLAG_PREFIX(a) \ |
98 | ((a)->s6_addr[1] & 0x20) | 95 | ((a)->s6_addr[1] & 0x20) |
99 | #define IPV6_ADDR_MC_FLAG_RENDEZVOUS(a) \ | 96 | #define IPV6_ADDR_MC_FLAG_RENDEZVOUS(a) \ |
100 | ((a)->s6_addr[1] & 0x40) | 97 | ((a)->s6_addr[1] & 0x40) |
101 | #endif | ||
102 | 98 | ||
103 | /* | 99 | /* |
104 | * fragmentation header | 100 | * fragmentation header |
@@ -113,8 +109,6 @@ struct frag_hdr { | |||
113 | 109 | ||
114 | #define IP6_MF 0x0001 | 110 | #define IP6_MF 0x0001 |
115 | 111 | ||
116 | #ifdef __KERNEL__ | ||
117 | |||
118 | #include <net/sock.h> | 112 | #include <net/sock.h> |
119 | 113 | ||
120 | /* sysctls */ | 114 | /* sysctls */ |
@@ -129,6 +123,15 @@ extern struct ctl_path net_ipv6_ctl_path[]; | |||
129 | SNMP_INC_STATS##modifier((net)->mib.statname##_statistics, (field));\ | 123 | SNMP_INC_STATS##modifier((net)->mib.statname##_statistics, (field));\ |
130 | }) | 124 | }) |
131 | 125 | ||
126 | /* per device counters are atomic_long_t */ | ||
127 | #define _DEVINCATOMIC(net, statname, modifier, idev, field) \ | ||
128 | ({ \ | ||
129 | struct inet6_dev *_idev = (idev); \ | ||
130 | if (likely(_idev != NULL)) \ | ||
131 | SNMP_INC_STATS_ATOMIC_LONG((_idev)->stats.statname##dev, (field)); \ | ||
132 | SNMP_INC_STATS##modifier((net)->mib.statname##_statistics, (field));\ | ||
133 | }) | ||
134 | |||
132 | #define _DEVADD(net, statname, modifier, idev, field, val) \ | 135 | #define _DEVADD(net, statname, modifier, idev, field, val) \ |
133 | ({ \ | 136 | ({ \ |
134 | struct inet6_dev *_idev = (idev); \ | 137 | struct inet6_dev *_idev = (idev); \ |
@@ -160,16 +163,16 @@ extern struct ctl_path net_ipv6_ctl_path[]; | |||
160 | #define IP6_UPD_PO_STATS_BH(net, idev,field,val) \ | 163 | #define IP6_UPD_PO_STATS_BH(net, idev,field,val) \ |
161 | _DEVUPD(net, ipv6, 64_BH, idev, field, val) | 164 | _DEVUPD(net, ipv6, 64_BH, idev, field, val) |
162 | #define ICMP6_INC_STATS(net, idev, field) \ | 165 | #define ICMP6_INC_STATS(net, idev, field) \ |
163 | _DEVINC(net, icmpv6, , idev, field) | 166 | _DEVINCATOMIC(net, icmpv6, , idev, field) |
164 | #define ICMP6_INC_STATS_BH(net, idev, field) \ | 167 | #define ICMP6_INC_STATS_BH(net, idev, field) \ |
165 | _DEVINC(net, icmpv6, _BH, idev, field) | 168 | _DEVINCATOMIC(net, icmpv6, _BH, idev, field) |
166 | 169 | ||
167 | #define ICMP6MSGOUT_INC_STATS(net, idev, field) \ | 170 | #define ICMP6MSGOUT_INC_STATS(net, idev, field) \ |
168 | _DEVINC(net, icmpv6msg, , idev, field +256) | 171 | _DEVINCATOMIC(net, icmpv6msg, , idev, field +256) |
169 | #define ICMP6MSGOUT_INC_STATS_BH(net, idev, field) \ | 172 | #define ICMP6MSGOUT_INC_STATS_BH(net, idev, field) \ |
170 | _DEVINC(net, icmpv6msg, _BH, idev, field +256) | 173 | _DEVINCATOMIC(net, icmpv6msg, _BH, idev, field +256) |
171 | #define ICMP6MSGIN_INC_STATS_BH(net, idev, field) \ | 174 | #define ICMP6MSGIN_INC_STATS_BH(net, idev, field) \ |
172 | _DEVINC(net, icmpv6msg, _BH, idev, field) | 175 | _DEVINCATOMIC(net, icmpv6msg, _BH, idev, field) |
173 | 176 | ||
174 | struct ip6_ra_chain { | 177 | struct ip6_ra_chain { |
175 | struct ip6_ra_chain *next; | 178 | struct ip6_ra_chain *next; |
@@ -376,8 +379,8 @@ enum ip6_defrag_users { | |||
376 | struct ip6_create_arg { | 379 | struct ip6_create_arg { |
377 | __be32 id; | 380 | __be32 id; |
378 | u32 user; | 381 | u32 user; |
379 | struct in6_addr *src; | 382 | const struct in6_addr *src; |
380 | struct in6_addr *dst; | 383 | const struct in6_addr *dst; |
381 | }; | 384 | }; |
382 | 385 | ||
383 | void ip6_frag_init(struct inet_frag_queue *q, void *a); | 386 | void ip6_frag_init(struct inet_frag_queue *q, void *a); |
@@ -667,5 +670,4 @@ extern int ipv6_static_sysctl_register(void); | |||
667 | extern void ipv6_static_sysctl_unregister(void); | 670 | extern void ipv6_static_sysctl_unregister(void); |
668 | #endif | 671 | #endif |
669 | 672 | ||
670 | #endif /* __KERNEL__ */ | ||
671 | #endif /* _NET_IPV6_H */ | 673 | #endif /* _NET_IPV6_H */ |
diff --git a/include/net/ipx.h b/include/net/ipx.h index 05d7e4a88b49..c1fec6b464cc 100644 --- a/include/net/ipx.h +++ b/include/net/ipx.h | |||
@@ -80,7 +80,6 @@ struct ipx_route { | |||
80 | atomic_t refcnt; | 80 | atomic_t refcnt; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | #ifdef __KERNEL__ | ||
84 | struct ipx_cb { | 83 | struct ipx_cb { |
85 | u8 ipx_tctrl; | 84 | u8 ipx_tctrl; |
86 | __be32 ipx_dest_net; | 85 | __be32 ipx_dest_net; |
@@ -116,7 +115,6 @@ static inline struct ipx_sock *ipx_sk(struct sock *sk) | |||
116 | } | 115 | } |
117 | 116 | ||
118 | #define IPX_SKB_CB(__skb) ((struct ipx_cb *)&((__skb)->cb[0])) | 117 | #define IPX_SKB_CB(__skb) ((struct ipx_cb *)&((__skb)->cb[0])) |
119 | #endif | ||
120 | 118 | ||
121 | #define IPX_MIN_EPHEMERAL_SOCKET 0x4000 | 119 | #define IPX_MIN_EPHEMERAL_SOCKET 0x4000 |
122 | #define IPX_MAX_EPHEMERAL_SOCKET 0x7fff | 120 | #define IPX_MAX_EPHEMERAL_SOCKET 0x7fff |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index 17fcd964f9d9..fb4b76d5d7f1 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -204,7 +204,7 @@ struct irlap_cb { | |||
204 | 204 | ||
205 | notify_t notify; /* Callbacks to IrLMP */ | 205 | notify_t notify; /* Callbacks to IrLMP */ |
206 | 206 | ||
207 | int mtt_required; /* Minumum turnaround time required */ | 207 | int mtt_required; /* Minimum turnaround time required */ |
208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ | 208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ |
209 | int bofs_count; /* Negotiated extra BOFs */ | 209 | int bofs_count; /* Negotiated extra BOFs */ |
210 | int next_bofs; /* Negotiated extra BOFs after next frame */ | 210 | int next_bofs; /* Negotiated extra BOFs after next frame */ |
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h index 2942ad6ab932..eef53ebe3d76 100644 --- a/include/net/irda/wrapper.h +++ b/include/net/irda/wrapper.h | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | #define IRDA_TRANS 0x20 /* Asynchronous transparency modifier */ | 43 | #define IRDA_TRANS 0x20 /* Asynchronous transparency modifier */ |
44 | 44 | ||
45 | /* States for receving a frame in async mode */ | 45 | /* States for receiving a frame in async mode */ |
46 | enum { | 46 | enum { |
47 | OUTSIDE_FRAME, | 47 | OUTSIDE_FRAME, |
48 | BEGIN_FRAME, | 48 | BEGIN_FRAME, |
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 205a3360156e..1121baa9f695 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
@@ -173,7 +173,7 @@ struct iucv_handler { | |||
173 | /* | 173 | /* |
174 | * The message_pending function is called after an icuv interrupt | 174 | * The message_pending function is called after an icuv interrupt |
175 | * type 0x06 or type 0x07 has been received. A new message is | 175 | * type 0x06 or type 0x07 has been received. A new message is |
176 | * availabe and can be received with iucv_message_receive. | 176 | * available and can be received with iucv_message_receive. |
177 | */ | 177 | */ |
178 | void (*message_pending)(struct iucv_path *, struct iucv_message *); | 178 | void (*message_pending)(struct iucv_path *, struct iucv_message *); |
179 | /* | 179 | /* |
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h index 3afdb21cc31d..5d5a6a4732ef 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h | |||
@@ -91,7 +91,7 @@ | |||
91 | * -------------------- | 91 | * -------------------- |
92 | * The implementation goals were as follow : | 92 | * The implementation goals were as follow : |
93 | * o Obvious : you should not need a PhD to understand what's happening, | 93 | * o Obvious : you should not need a PhD to understand what's happening, |
94 | * the benefit is easier maintainance. | 94 | * the benefit is easier maintenance. |
95 | * o Flexible : it should accommodate a wide variety of driver | 95 | * o Flexible : it should accommodate a wide variety of driver |
96 | * implementations and be as flexible as the old API. | 96 | * implementations and be as flexible as the old API. |
97 | * o Lean : it should be efficient memory wise to minimise the impact | 97 | * o Lean : it should be efficient memory wise to minimise the impact |
@@ -129,7 +129,7 @@ | |||
129 | * | 129 | * |
130 | * Functions prototype uses union iwreq_data | 130 | * Functions prototype uses union iwreq_data |
131 | * ----------------------------------------- | 131 | * ----------------------------------------- |
132 | * Some would have prefered functions defined this way : | 132 | * Some would have preferred functions defined this way : |
133 | * static int mydriver_ioctl_setrate(struct net_device *dev, | 133 | * static int mydriver_ioctl_setrate(struct net_device *dev, |
134 | * long rate, int auto) | 134 | * long rate, int auto) |
135 | * 1) The kernel code doesn't "validate" the content of iwreq_data, and | 135 | * 1) The kernel code doesn't "validate" the content of iwreq_data, and |
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h index 75b8e2968c9b..f57e7d46a453 100644 --- a/include/net/llc_pdu.h +++ b/include/net/llc_pdu.h | |||
@@ -199,7 +199,7 @@ struct llc_pdu_sn { | |||
199 | u8 ssap; | 199 | u8 ssap; |
200 | u8 ctrl_1; | 200 | u8 ctrl_1; |
201 | u8 ctrl_2; | 201 | u8 ctrl_2; |
202 | }; | 202 | } __packed; |
203 | 203 | ||
204 | static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) | 204 | static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) |
205 | { | 205 | { |
@@ -211,7 +211,7 @@ struct llc_pdu_un { | |||
211 | u8 dsap; | 211 | u8 dsap; |
212 | u8 ssap; | 212 | u8 ssap; |
213 | u8 ctrl_1; | 213 | u8 ctrl_1; |
214 | }; | 214 | } __packed; |
215 | 215 | ||
216 | static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) | 216 | static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) |
217 | { | 217 | { |
@@ -359,7 +359,7 @@ struct llc_xid_info { | |||
359 | u8 fmt_id; /* always 0x81 for LLC */ | 359 | u8 fmt_id; /* always 0x81 for LLC */ |
360 | u8 type; /* different if NULL/non-NULL LSAP */ | 360 | u8 type; /* different if NULL/non-NULL LSAP */ |
361 | u8 rw; /* sender receive window */ | 361 | u8 rw; /* sender receive window */ |
362 | }; | 362 | } __packed; |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * llc_pdu_init_as_xid_cmd - sets bytes 3, 4 & 5 of LLC header as XID | 365 | * llc_pdu_init_as_xid_cmd - sets bytes 3, 4 & 5 of LLC header as XID |
@@ -415,7 +415,7 @@ struct llc_frmr_info { | |||
415 | u8 curr_ssv; /* current send state variable val */ | 415 | u8 curr_ssv; /* current send state variable val */ |
416 | u8 curr_rsv; /* current receive state variable */ | 416 | u8 curr_rsv; /* current receive state variable */ |
417 | u8 ind_bits; /* indicator bits set with macro */ | 417 | u8 ind_bits; /* indicator bits set with macro */ |
418 | }; | 418 | } __packed; |
419 | 419 | ||
420 | extern void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type); | 420 | extern void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type); |
421 | extern void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value); | 421 | extern void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value); |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index cefe1b37c493..8c7189c3f6ed 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -537,6 +537,21 @@ struct ieee80211_tx_info { | |||
537 | }; | 537 | }; |
538 | }; | 538 | }; |
539 | 539 | ||
540 | /** | ||
541 | * ieee80211_sched_scan_ies - scheduled scan IEs | ||
542 | * | ||
543 | * This structure is used to pass the appropriate IEs to be used in scheduled | ||
544 | * scans for all bands. It contains both the IEs passed from the userspace | ||
545 | * and the ones generated by mac80211. | ||
546 | * | ||
547 | * @ie: array with the IEs for each supported band | ||
548 | * @len: array with the total length of the IEs for each band | ||
549 | */ | ||
550 | struct ieee80211_sched_scan_ies { | ||
551 | u8 *ie[IEEE80211_NUM_BANDS]; | ||
552 | size_t len[IEEE80211_NUM_BANDS]; | ||
553 | }; | ||
554 | |||
540 | static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) | 555 | static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) |
541 | { | 556 | { |
542 | return (struct ieee80211_tx_info *)skb->cb; | 557 | return (struct ieee80211_tx_info *)skb->cb; |
@@ -1294,7 +1309,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1294 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key | 1309 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key |
1295 | * handler. | 1310 | * handler. |
1296 | * The update_tkip_key() call updates the driver with the new phase 1 key. | 1311 | * The update_tkip_key() call updates the driver with the new phase 1 key. |
1297 | * This happens everytime the iv16 wraps around (every 65536 packets). The | 1312 | * This happens every time the iv16 wraps around (every 65536 packets). The |
1298 | * set_key() call will happen only once for each key (unless the AP did | 1313 | * set_key() call will happen only once for each key (unless the AP did |
1299 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is | 1314 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is |
1300 | * provided by update_tkip_key only. The trigger that makes mac80211 call this | 1315 | * provided by update_tkip_key only. The trigger that makes mac80211 call this |
@@ -1606,6 +1621,18 @@ enum ieee80211_ampdu_mlme_action { | |||
1606 | * you should ensure to cancel it on this callback. | 1621 | * you should ensure to cancel it on this callback. |
1607 | * Must be implemented and can sleep. | 1622 | * Must be implemented and can sleep. |
1608 | * | 1623 | * |
1624 | * @suspend: Suspend the device; mac80211 itself will quiesce before and | ||
1625 | * stop transmitting and doing any other configuration, and then | ||
1626 | * ask the device to suspend. This is only invoked when WoWLAN is | ||
1627 | * configured, otherwise the device is deconfigured completely and | ||
1628 | * reconfigured at resume time. | ||
1629 | * | ||
1630 | * @resume: If WoWLAN was configured, this indicates that mac80211 is | ||
1631 | * now resuming its operation, after this the device must be fully | ||
1632 | * functional again. If this returns an error, the only way out is | ||
1633 | * to also unregister the device. If it returns 1, then mac80211 | ||
1634 | * will also go through the regular complete restart on resume. | ||
1635 | * | ||
1609 | * @add_interface: Called when a netdevice attached to the hardware is | 1636 | * @add_interface: Called when a netdevice attached to the hardware is |
1610 | * enabled. Because it is not called for monitor mode devices, @start | 1637 | * enabled. Because it is not called for monitor mode devices, @start |
1611 | * and @stop must be implemented. | 1638 | * and @stop must be implemented. |
@@ -1681,6 +1708,13 @@ enum ieee80211_ampdu_mlme_action { | |||
1681 | * any error unless this callback returned a negative error code. | 1708 | * any error unless this callback returned a negative error code. |
1682 | * The callback can sleep. | 1709 | * The callback can sleep. |
1683 | * | 1710 | * |
1711 | * @sched_scan_start: Ask the hardware to start scanning repeatedly at | ||
1712 | * specific intervals. The driver must call the | ||
1713 | * ieee80211_sched_scan_results() function whenever it finds results. | ||
1714 | * This process will continue until sched_scan_stop is called. | ||
1715 | * | ||
1716 | * @sched_scan_stop: Tell the hardware to stop an ongoing scheduled scan. | ||
1717 | * | ||
1684 | * @sw_scan_start: Notifier function that is called just before a software scan | 1718 | * @sw_scan_start: Notifier function that is called just before a software scan |
1685 | * is started. Can be NULL, if the driver doesn't need this notification. | 1719 | * is started. Can be NULL, if the driver doesn't need this notification. |
1686 | * The callback can sleep. | 1720 | * The callback can sleep. |
@@ -1753,8 +1787,19 @@ enum ieee80211_ampdu_mlme_action { | |||
1753 | * that TX/RX_STOP can pass NULL for this parameter. | 1787 | * that TX/RX_STOP can pass NULL for this parameter. |
1754 | * The @buf_size parameter is only valid when the action is set to | 1788 | * The @buf_size parameter is only valid when the action is set to |
1755 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder | 1789 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder |
1756 | * buffer size (number of subframes) for this session -- aggregates | 1790 | * buffer size (number of subframes) for this session -- the driver |
1757 | * containing more subframes than this may not be transmitted to the peer. | 1791 | * may neither send aggregates containing more subframes than this |
1792 | * nor send aggregates in a way that lost frames would exceed the | ||
1793 | * buffer size. If just limiting the aggregate size, this would be | ||
1794 | * possible with a buf_size of 8: | ||
1795 | * - TX: 1.....7 | ||
1796 | * - RX: 2....7 (lost frame #1) | ||
1797 | * - TX: 8..1... | ||
1798 | * which is invalid since #1 was now re-transmitted well past the | ||
1799 | * buffer size of 8. Correct ways to retransmit #1 would be: | ||
1800 | * - TX: 1 or 18 or 81 | ||
1801 | * Even "189" would be wrong since 1 could be lost again. | ||
1802 | * | ||
1758 | * Returns a negative error code on failure. | 1803 | * Returns a negative error code on failure. |
1759 | * The callback can sleep. | 1804 | * The callback can sleep. |
1760 | * | 1805 | * |
@@ -1808,11 +1853,22 @@ enum ieee80211_ampdu_mlme_action { | |||
1808 | * @set_ringparam: Set tx and rx ring sizes. | 1853 | * @set_ringparam: Set tx and rx ring sizes. |
1809 | * | 1854 | * |
1810 | * @get_ringparam: Get tx and rx ring current and maximum sizes. | 1855 | * @get_ringparam: Get tx and rx ring current and maximum sizes. |
1856 | * | ||
1857 | * @tx_frames_pending: Check if there is any pending frame in the hardware | ||
1858 | * queues before entering power save. | ||
1859 | * | ||
1860 | * @set_bitrate_mask: Set a mask of rates to be used for rate control selection | ||
1861 | * when transmitting a frame. Currently only legacy rates are handled. | ||
1862 | * The callback can sleep. | ||
1811 | */ | 1863 | */ |
1812 | struct ieee80211_ops { | 1864 | struct ieee80211_ops { |
1813 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1865 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
1814 | int (*start)(struct ieee80211_hw *hw); | 1866 | int (*start)(struct ieee80211_hw *hw); |
1815 | void (*stop)(struct ieee80211_hw *hw); | 1867 | void (*stop)(struct ieee80211_hw *hw); |
1868 | #ifdef CONFIG_PM | ||
1869 | int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); | ||
1870 | int (*resume)(struct ieee80211_hw *hw); | ||
1871 | #endif | ||
1816 | int (*add_interface)(struct ieee80211_hw *hw, | 1872 | int (*add_interface)(struct ieee80211_hw *hw, |
1817 | struct ieee80211_vif *vif); | 1873 | struct ieee80211_vif *vif); |
1818 | int (*change_interface)(struct ieee80211_hw *hw, | 1874 | int (*change_interface)(struct ieee80211_hw *hw, |
@@ -1843,6 +1899,12 @@ struct ieee80211_ops { | |||
1843 | u32 iv32, u16 *phase1key); | 1899 | u32 iv32, u16 *phase1key); |
1844 | int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 1900 | int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
1845 | struct cfg80211_scan_request *req); | 1901 | struct cfg80211_scan_request *req); |
1902 | int (*sched_scan_start)(struct ieee80211_hw *hw, | ||
1903 | struct ieee80211_vif *vif, | ||
1904 | struct cfg80211_sched_scan_request *req, | ||
1905 | struct ieee80211_sched_scan_ies *ies); | ||
1906 | void (*sched_scan_stop)(struct ieee80211_hw *hw, | ||
1907 | struct ieee80211_vif *vif); | ||
1846 | void (*sw_scan_start)(struct ieee80211_hw *hw); | 1908 | void (*sw_scan_start)(struct ieee80211_hw *hw); |
1847 | void (*sw_scan_complete)(struct ieee80211_hw *hw); | 1909 | void (*sw_scan_complete)(struct ieee80211_hw *hw); |
1848 | int (*get_stats)(struct ieee80211_hw *hw, | 1910 | int (*get_stats)(struct ieee80211_hw *hw, |
@@ -1895,6 +1957,9 @@ struct ieee80211_ops { | |||
1895 | int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); | 1957 | int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); |
1896 | void (*get_ringparam)(struct ieee80211_hw *hw, | 1958 | void (*get_ringparam)(struct ieee80211_hw *hw, |
1897 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); | 1959 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); |
1960 | bool (*tx_frames_pending)(struct ieee80211_hw *hw); | ||
1961 | int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | ||
1962 | const struct cfg80211_bitrate_mask *mask); | ||
1898 | }; | 1963 | }; |
1899 | 1964 | ||
1900 | /** | 1965 | /** |
@@ -2212,6 +2277,18 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta, | |||
2212 | #define IEEE80211_TX_STATUS_HEADROOM 13 | 2277 | #define IEEE80211_TX_STATUS_HEADROOM 13 |
2213 | 2278 | ||
2214 | /** | 2279 | /** |
2280 | * ieee80211_sta_set_tim - set the TIM bit for a sleeping station | ||
2281 | * | ||
2282 | * If a driver buffers frames for a powersave station instead of passing | ||
2283 | * them back to mac80211 for retransmission, the station needs to be told | ||
2284 | * to wake up using the TIM bitmap in the beacon. | ||
2285 | * | ||
2286 | * This function sets the station's TIM bit - it will be cleared when the | ||
2287 | * station wakes up. | ||
2288 | */ | ||
2289 | void ieee80211_sta_set_tim(struct ieee80211_sta *sta); | ||
2290 | |||
2291 | /** | ||
2215 | * ieee80211_tx_status - transmit status callback | 2292 | * ieee80211_tx_status - transmit status callback |
2216 | * | 2293 | * |
2217 | * Call this function for all transmitted frames after they have been | 2294 | * Call this function for all transmitted frames after they have been |
@@ -2265,6 +2342,17 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | |||
2265 | struct sk_buff *skb); | 2342 | struct sk_buff *skb); |
2266 | 2343 | ||
2267 | /** | 2344 | /** |
2345 | * ieee80211_report_low_ack - report non-responding station | ||
2346 | * | ||
2347 | * When operating in AP-mode, call this function to report a non-responding | ||
2348 | * connected STA. | ||
2349 | * | ||
2350 | * @sta: the non-responding connected sta | ||
2351 | * @num_packets: number of packets sent to @sta without a response | ||
2352 | */ | ||
2353 | void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets); | ||
2354 | |||
2355 | /** | ||
2268 | * ieee80211_beacon_get_tim - beacon generation function | 2356 | * ieee80211_beacon_get_tim - beacon generation function |
2269 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 2357 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
2270 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 2358 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
@@ -2534,6 +2622,28 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw); | |||
2534 | void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted); | 2622 | void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted); |
2535 | 2623 | ||
2536 | /** | 2624 | /** |
2625 | * ieee80211_sched_scan_results - got results from scheduled scan | ||
2626 | * | ||
2627 | * When a scheduled scan is running, this function needs to be called by the | ||
2628 | * driver whenever there are new scan results available. | ||
2629 | * | ||
2630 | * @hw: the hardware that is performing scheduled scans | ||
2631 | */ | ||
2632 | void ieee80211_sched_scan_results(struct ieee80211_hw *hw); | ||
2633 | |||
2634 | /** | ||
2635 | * ieee80211_sched_scan_stopped - inform that the scheduled scan has stopped | ||
2636 | * | ||
2637 | * When a scheduled scan is running, this function can be called by | ||
2638 | * the driver if it needs to stop the scan to perform another task. | ||
2639 | * Usual scenarios are drivers that cannot continue the scheduled scan | ||
2640 | * while associating, for instance. | ||
2641 | * | ||
2642 | * @hw: the hardware that is performing scheduled scans | ||
2643 | */ | ||
2644 | void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw); | ||
2645 | |||
2646 | /** | ||
2537 | * ieee80211_iterate_active_interfaces - iterate active interfaces | 2647 | * ieee80211_iterate_active_interfaces - iterate active interfaces |
2538 | * | 2648 | * |
2539 | * This function iterates over the interfaces associated with a given | 2649 | * This function iterates over the interfaces associated with a given |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index e0e594f8e9d9..62beeb97c4b1 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -42,8 +42,6 @@ enum { | |||
42 | #define ND_REACHABLE_TIME (30*HZ) | 42 | #define ND_REACHABLE_TIME (30*HZ) |
43 | #define ND_RETRANS_TIMER HZ | 43 | #define ND_RETRANS_TIMER HZ |
44 | 44 | ||
45 | #ifdef __KERNEL__ | ||
46 | |||
47 | #include <linux/compiler.h> | 45 | #include <linux/compiler.h> |
48 | #include <linux/icmpv6.h> | 46 | #include <linux/icmpv6.h> |
49 | #include <linux/in6.h> | 47 | #include <linux/in6.h> |
@@ -102,7 +100,8 @@ extern void ndisc_send_redirect(struct sk_buff *skb, | |||
102 | struct neighbour *neigh, | 100 | struct neighbour *neigh, |
103 | const struct in6_addr *target); | 101 | const struct in6_addr *target); |
104 | 102 | ||
105 | extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir); | 103 | extern int ndisc_mc_map(const struct in6_addr *addr, char *buf, |
104 | struct net_device *dev, int dir); | ||
106 | 105 | ||
107 | extern struct sk_buff *ndisc_build_skb(struct net_device *dev, | 106 | extern struct sk_buff *ndisc_build_skb(struct net_device *dev, |
108 | const struct in6_addr *daddr, | 107 | const struct in6_addr *daddr, |
@@ -155,8 +154,4 @@ static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, const s | |||
155 | return ERR_PTR(-ENODEV); | 154 | return ERR_PTR(-ENODEV); |
156 | } | 155 | } |
157 | 156 | ||
158 | |||
159 | #endif /* __KERNEL__ */ | ||
160 | |||
161 | |||
162 | #endif | 157 | #endif |
diff --git a/include/net/netevent.h b/include/net/netevent.h index 22b239c17eaa..086f8a5b59dc 100644 --- a/include/net/netevent.h +++ b/include/net/netevent.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | * Changes: | 11 | * Changes: |
12 | */ | 12 | */ |
13 | #ifdef __KERNEL__ | ||
14 | 13 | ||
15 | struct dst_entry; | 14 | struct dst_entry; |
16 | 15 | ||
@@ -29,4 +28,3 @@ extern int unregister_netevent_notifier(struct notifier_block *nb); | |||
29 | extern int call_netevent_notifiers(unsigned long val, void *v); | 28 | extern int call_netevent_notifiers(unsigned long val, void *v); |
30 | 29 | ||
31 | #endif | 30 | #endif |
32 | #endif | ||
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index d0d13378991e..c7c42e7acc31 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | #include <linux/netfilter/nf_conntrack_common.h> | 15 | #include <linux/netfilter/nf_conntrack_common.h> |
16 | 16 | ||
17 | #ifdef __KERNEL__ | ||
18 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
19 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
20 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
@@ -326,5 +325,4 @@ do { \ | |||
326 | #define MODULE_ALIAS_NFCT_HELPER(helper) \ | 325 | #define MODULE_ALIAS_NFCT_HELPER(helper) \ |
327 | MODULE_ALIAS("nfct-helper-" helper) | 326 | MODULE_ALIAS("nfct-helper-" helper) |
328 | 327 | ||
329 | #endif /* __KERNEL__ */ | ||
330 | #endif /* _NF_CONNTRACK_H */ | 328 | #endif /* _NF_CONNTRACK_H */ |
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index 4ee44c84a304..7ca6bdd5bae6 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -104,8 +104,6 @@ struct nf_conntrack_tuple_mask { | |||
104 | } src; | 104 | } src; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | #ifdef __KERNEL__ | ||
108 | |||
109 | static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t) | 107 | static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t) |
110 | { | 108 | { |
111 | #ifdef DEBUG | 109 | #ifdef DEBUG |
@@ -148,8 +146,6 @@ struct nf_conntrack_tuple_hash { | |||
148 | struct nf_conntrack_tuple tuple; | 146 | struct nf_conntrack_tuple tuple; |
149 | }; | 147 | }; |
150 | 148 | ||
151 | #endif /* __KERNEL__ */ | ||
152 | |||
153 | static inline bool __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1, | 149 | static inline bool __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1, |
154 | const struct nf_conntrack_tuple *t2) | 150 | const struct nf_conntrack_tuple *t2) |
155 | { | 151 | { |
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h index aff80b190c12..0346b0070864 100644 --- a/include/net/netfilter/nf_nat.h +++ b/include/net/netfilter/nf_nat.h | |||
@@ -48,7 +48,6 @@ struct nf_nat_multi_range_compat { | |||
48 | struct nf_nat_range range[1]; | 48 | struct nf_nat_range range[1]; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | #ifdef __KERNEL__ | ||
52 | #include <linux/list.h> | 51 | #include <linux/list.h> |
53 | #include <linux/netfilter/nf_conntrack_pptp.h> | 52 | #include <linux/netfilter/nf_conntrack_pptp.h> |
54 | #include <net/netfilter/nf_conntrack_extend.h> | 53 | #include <net/netfilter/nf_conntrack_extend.h> |
@@ -93,7 +92,4 @@ static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) | |||
93 | #endif | 92 | #endif |
94 | } | 93 | } |
95 | 94 | ||
96 | #else /* !__KERNEL__: iptables wants this to compile. */ | ||
97 | #define nf_nat_multi_range nf_nat_multi_range_compat | ||
98 | #endif /*__KERNEL__*/ | ||
99 | #endif | 95 | #endif |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 542195d9469e..d786b4fc02a4 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -54,6 +54,8 @@ struct netns_ipv4 { | |||
54 | int sysctl_rt_cache_rebuild_count; | 54 | int sysctl_rt_cache_rebuild_count; |
55 | int current_rt_cache_rebuild_count; | 55 | int current_rt_cache_rebuild_count; |
56 | 56 | ||
57 | unsigned int sysctl_ping_group_range[2]; | ||
58 | |||
57 | atomic_t rt_genid; | 59 | atomic_t rt_genid; |
58 | atomic_t dev_addr_genid; | 60 | atomic_t dev_addr_genid; |
59 | 61 | ||
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h index 13649eb57413..8639de5750f6 100644 --- a/include/net/phonet/pn_dev.h +++ b/include/net/phonet/pn_dev.h | |||
@@ -51,7 +51,7 @@ void phonet_address_notify(int event, struct net_device *dev, u8 addr); | |||
51 | int phonet_route_add(struct net_device *dev, u8 daddr); | 51 | int phonet_route_add(struct net_device *dev, u8 daddr); |
52 | int phonet_route_del(struct net_device *dev, u8 daddr); | 52 | int phonet_route_del(struct net_device *dev, u8 daddr); |
53 | void rtm_phonet_notify(int event, struct net_device *dev, u8 dst); | 53 | void rtm_phonet_notify(int event, struct net_device *dev, u8 dst); |
54 | struct net_device *phonet_route_get(struct net *net, u8 daddr); | 54 | struct net_device *phonet_route_get_rcu(struct net *net, u8 daddr); |
55 | struct net_device *phonet_route_output(struct net *net, u8 daddr); | 55 | struct net_device *phonet_route_output(struct net *net, u8 daddr); |
56 | 56 | ||
57 | #define PN_NO_ADDR 0xff | 57 | #define PN_NO_ADDR 0xff |
diff --git a/include/net/ping.h b/include/net/ping.h new file mode 100644 index 000000000000..682b5ae9af51 --- /dev/null +++ b/include/net/ping.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * INET An implementation of the TCP/IP protocol suite for the LINUX | ||
3 | * operating system. INET is implemented using the BSD Socket | ||
4 | * interface as the means of communication with the user level. | ||
5 | * | ||
6 | * Definitions for the "ping" module. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | */ | ||
13 | #ifndef _PING_H | ||
14 | #define _PING_H | ||
15 | |||
16 | #include <net/netns/hash.h> | ||
17 | |||
18 | /* PING_HTABLE_SIZE must be power of 2 */ | ||
19 | #define PING_HTABLE_SIZE 64 | ||
20 | #define PING_HTABLE_MASK (PING_HTABLE_SIZE-1) | ||
21 | |||
22 | #define ping_portaddr_for_each_entry(__sk, node, list) \ | ||
23 | hlist_nulls_for_each_entry(__sk, node, list, sk_nulls_node) | ||
24 | |||
25 | /* | ||
26 | * gid_t is either uint or ushort. We want to pass it to | ||
27 | * proc_dointvec_minmax(), so it must not be larger than MAX_INT | ||
28 | */ | ||
29 | #define GID_T_MAX (((gid_t)~0U) >> 1) | ||
30 | |||
31 | struct ping_table { | ||
32 | struct hlist_nulls_head hash[PING_HTABLE_SIZE]; | ||
33 | rwlock_t lock; | ||
34 | }; | ||
35 | |||
36 | struct ping_iter_state { | ||
37 | struct seq_net_private p; | ||
38 | int bucket; | ||
39 | }; | ||
40 | |||
41 | extern struct proto ping_prot; | ||
42 | |||
43 | |||
44 | extern void ping_rcv(struct sk_buff *); | ||
45 | extern void ping_err(struct sk_buff *, u32 info); | ||
46 | |||
47 | #ifdef CONFIG_PROC_FS | ||
48 | extern int __init ping_proc_init(void); | ||
49 | extern void ping_proc_exit(void); | ||
50 | #endif | ||
51 | |||
52 | void __init ping_init(void); | ||
53 | |||
54 | |||
55 | #endif /* _PING_H */ | ||
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index d9549af6929a..65afc4966204 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -32,7 +32,7 @@ static inline void *qdisc_priv(struct Qdisc *q) | |||
32 | 32 | ||
33 | The result: [34]86 is not good choice for QoS router :-( | 33 | The result: [34]86 is not good choice for QoS router :-( |
34 | 34 | ||
35 | The things are not so bad, because we may use artifical | 35 | The things are not so bad, because we may use artificial |
36 | clock evaluated by integration of network data flow | 36 | clock evaluated by integration of network data flow |
37 | in the most critical places. | 37 | in the most critical places. |
38 | */ | 38 | */ |
diff --git a/include/net/rawv6.h b/include/net/rawv6.h index f6b9b830df8c..cf7577234457 100644 --- a/include/net/rawv6.h +++ b/include/net/rawv6.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _NET_RAWV6_H | 1 | #ifndef _NET_RAWV6_H |
2 | #define _NET_RAWV6_H | 2 | #define _NET_RAWV6_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <net/protocol.h> | 4 | #include <net/protocol.h> |
7 | 5 | ||
8 | void raw6_icmp_error(struct sk_buff *, int nexthdr, | 6 | void raw6_icmp_error(struct sk_buff *, int nexthdr, |
@@ -20,5 +18,3 @@ int rawv6_mh_filter_unregister(int (*filter)(struct sock *sock, | |||
20 | #endif | 18 | #endif |
21 | 19 | ||
22 | #endif | 20 | #endif |
23 | |||
24 | #endif | ||
diff --git a/include/net/rose.h b/include/net/rose.h index 5ba9f02731eb..555dd198aab7 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -14,6 +14,12 @@ | |||
14 | 14 | ||
15 | #define ROSE_MIN_LEN 3 | 15 | #define ROSE_MIN_LEN 3 |
16 | 16 | ||
17 | #define ROSE_CALL_REQ_ADDR_LEN_OFF 3 | ||
18 | #define ROSE_CALL_REQ_ADDR_LEN_VAL 0xAA /* each address is 10 digits */ | ||
19 | #define ROSE_CALL_REQ_DEST_ADDR_OFF 4 | ||
20 | #define ROSE_CALL_REQ_SRC_ADDR_OFF 9 | ||
21 | #define ROSE_CALL_REQ_FACILITIES_OFF 14 | ||
22 | |||
17 | #define ROSE_GFI 0x10 | 23 | #define ROSE_GFI 0x10 |
18 | #define ROSE_Q_BIT 0x80 | 24 | #define ROSE_Q_BIT 0x80 |
19 | #define ROSE_D_BIT 0x40 | 25 | #define ROSE_D_BIT 0x40 |
@@ -214,7 +220,7 @@ extern void rose_requeue_frames(struct sock *); | |||
214 | extern int rose_validate_nr(struct sock *, unsigned short); | 220 | extern int rose_validate_nr(struct sock *, unsigned short); |
215 | extern void rose_write_internal(struct sock *, int); | 221 | extern void rose_write_internal(struct sock *, int); |
216 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); | 222 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); |
217 | extern int rose_parse_facilities(unsigned char *, struct rose_facilities_struct *); | 223 | extern int rose_parse_facilities(unsigned char *, unsigned int, struct rose_facilities_struct *); |
218 | extern void rose_disconnect(struct sock *, int, int, int); | 224 | extern void rose_disconnect(struct sock *, int, int, int); |
219 | 225 | ||
220 | /* rose_timer.c */ | 226 | /* rose_timer.c */ |
diff --git a/include/net/route.h b/include/net/route.h index f88429cad52a..db7b3432f07c 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -35,16 +35,8 @@ | |||
35 | #include <linux/cache.h> | 35 | #include <linux/cache.h> |
36 | #include <linux/security.h> | 36 | #include <linux/security.h> |
37 | 37 | ||
38 | #ifndef __KERNEL__ | ||
39 | #warning This file is not supposed to be used outside of kernel. | ||
40 | #endif | ||
41 | |||
42 | #define RTO_ONLINK 0x01 | 38 | #define RTO_ONLINK 0x01 |
43 | 39 | ||
44 | #define RTO_CONN 0 | ||
45 | /* RTO_CONN is not used (being alias for 0), but preserved not to break | ||
46 | * some modules referring to it. */ | ||
47 | |||
48 | #define RT_CONN_FLAGS(sk) (RT_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE)) | 40 | #define RT_CONN_FLAGS(sk) (RT_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE)) |
49 | 41 | ||
50 | struct fib_nh; | 42 | struct fib_nh; |
@@ -60,10 +52,11 @@ struct rtable { | |||
60 | int rt_genid; | 52 | int rt_genid; |
61 | unsigned rt_flags; | 53 | unsigned rt_flags; |
62 | __u16 rt_type; | 54 | __u16 rt_type; |
63 | __u8 rt_tos; | 55 | __u8 rt_key_tos; |
64 | 56 | ||
65 | __be32 rt_dst; /* Path destination */ | 57 | __be32 rt_dst; /* Path destination */ |
66 | __be32 rt_src; /* Path source */ | 58 | __be32 rt_src; /* Path source */ |
59 | int rt_route_iif; | ||
67 | int rt_iif; | 60 | int rt_iif; |
68 | int rt_oif; | 61 | int rt_oif; |
69 | __u32 rt_mark; | 62 | __u32 rt_mark; |
@@ -80,12 +73,12 @@ struct rtable { | |||
80 | 73 | ||
81 | static inline bool rt_is_input_route(struct rtable *rt) | 74 | static inline bool rt_is_input_route(struct rtable *rt) |
82 | { | 75 | { |
83 | return rt->rt_iif != 0; | 76 | return rt->rt_route_iif != 0; |
84 | } | 77 | } |
85 | 78 | ||
86 | static inline bool rt_is_output_route(struct rtable *rt) | 79 | static inline bool rt_is_output_route(struct rtable *rt) |
87 | { | 80 | { |
88 | return rt->rt_iif == 0; | 81 | return rt->rt_route_iif == 0; |
89 | } | 82 | } |
90 | 83 | ||
91 | struct ip_rt_acct { | 84 | struct ip_rt_acct { |
@@ -122,7 +115,7 @@ extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, | |||
122 | __be32 src, struct net_device *dev); | 115 | __be32 src, struct net_device *dev); |
123 | extern void rt_cache_flush(struct net *net, int how); | 116 | extern void rt_cache_flush(struct net *net, int how); |
124 | extern void rt_cache_flush_batch(struct net *net); | 117 | extern void rt_cache_flush_batch(struct net *net); |
125 | extern struct rtable *__ip_route_output_key(struct net *, const struct flowi4 *flp); | 118 | extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); |
126 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, | 119 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, |
127 | struct sock *sk); | 120 | struct sock *sk); |
128 | extern struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig); | 121 | extern struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig); |
@@ -144,40 +137,33 @@ static inline struct rtable *ip_route_output(struct net *net, __be32 daddr, | |||
144 | return ip_route_output_key(net, &fl4); | 137 | return ip_route_output_key(net, &fl4); |
145 | } | 138 | } |
146 | 139 | ||
147 | static inline struct rtable *ip_route_output_ports(struct net *net, struct sock *sk, | 140 | static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi4 *fl4, |
141 | struct sock *sk, | ||
148 | __be32 daddr, __be32 saddr, | 142 | __be32 daddr, __be32 saddr, |
149 | __be16 dport, __be16 sport, | 143 | __be16 dport, __be16 sport, |
150 | __u8 proto, __u8 tos, int oif) | 144 | __u8 proto, __u8 tos, int oif) |
151 | { | 145 | { |
152 | struct flowi4 fl4 = { | 146 | flowi4_init_output(fl4, oif, sk ? sk->sk_mark : 0, tos, |
153 | .flowi4_oif = oif, | 147 | RT_SCOPE_UNIVERSE, proto, |
154 | .flowi4_flags = sk ? inet_sk_flowi_flags(sk) : 0, | 148 | sk ? inet_sk_flowi_flags(sk) : 0, |
155 | .flowi4_mark = sk ? sk->sk_mark : 0, | 149 | daddr, saddr, dport, sport); |
156 | .daddr = daddr, | ||
157 | .saddr = saddr, | ||
158 | .flowi4_tos = tos, | ||
159 | .flowi4_proto = proto, | ||
160 | .fl4_dport = dport, | ||
161 | .fl4_sport = sport, | ||
162 | }; | ||
163 | if (sk) | 150 | if (sk) |
164 | security_sk_classify_flow(sk, flowi4_to_flowi(&fl4)); | 151 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); |
165 | return ip_route_output_flow(net, &fl4, sk); | 152 | return ip_route_output_flow(net, fl4, sk); |
166 | } | 153 | } |
167 | 154 | ||
168 | static inline struct rtable *ip_route_output_gre(struct net *net, | 155 | static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4 *fl4, |
169 | __be32 daddr, __be32 saddr, | 156 | __be32 daddr, __be32 saddr, |
170 | __be32 gre_key, __u8 tos, int oif) | 157 | __be32 gre_key, __u8 tos, int oif) |
171 | { | 158 | { |
172 | struct flowi4 fl4 = { | 159 | memset(fl4, 0, sizeof(*fl4)); |
173 | .flowi4_oif = oif, | 160 | fl4->flowi4_oif = oif; |
174 | .daddr = daddr, | 161 | fl4->daddr = daddr; |
175 | .saddr = saddr, | 162 | fl4->saddr = saddr; |
176 | .flowi4_tos = tos, | 163 | fl4->flowi4_tos = tos; |
177 | .flowi4_proto = IPPROTO_GRE, | 164 | fl4->flowi4_proto = IPPROTO_GRE; |
178 | .fl4_gre_key = gre_key, | 165 | fl4->fl4_gre_key = gre_key; |
179 | }; | 166 | return ip_route_output_key(net, fl4); |
180 | return ip_route_output_key(net, &fl4); | ||
181 | } | 167 | } |
182 | 168 | ||
183 | extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src, | 169 | extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src, |
@@ -195,14 +181,15 @@ static inline int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 s | |||
195 | return ip_route_input_common(skb, dst, src, tos, devin, true); | 181 | return ip_route_input_common(skb, dst, src, tos, devin, true); |
196 | } | 182 | } |
197 | 183 | ||
198 | extern unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph, unsigned short new_mtu, struct net_device *dev); | 184 | extern unsigned short ip_rt_frag_needed(struct net *net, const struct iphdr *iph, |
185 | unsigned short new_mtu, struct net_device *dev); | ||
199 | extern void ip_rt_send_redirect(struct sk_buff *skb); | 186 | extern void ip_rt_send_redirect(struct sk_buff *skb); |
200 | 187 | ||
201 | extern unsigned inet_addr_type(struct net *net, __be32 addr); | 188 | extern unsigned inet_addr_type(struct net *net, __be32 addr); |
202 | extern unsigned inet_dev_addr_type(struct net *net, const struct net_device *dev, __be32 addr); | 189 | extern unsigned inet_dev_addr_type(struct net *net, const struct net_device *dev, __be32 addr); |
203 | extern void ip_rt_multicast_event(struct in_device *); | 190 | extern void ip_rt_multicast_event(struct in_device *); |
204 | extern int ip_rt_ioctl(struct net *, unsigned int cmd, void __user *arg); | 191 | extern int ip_rt_ioctl(struct net *, unsigned int cmd, void __user *arg); |
205 | extern void ip_rt_get_source(u8 *src, struct rtable *rt); | 192 | extern void ip_rt_get_source(u8 *src, struct sk_buff *skb, struct rtable *rt); |
206 | extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); | 193 | extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); |
207 | 194 | ||
208 | struct in_ifaddr; | 195 | struct in_ifaddr; |
@@ -224,78 +211,93 @@ static inline char rt_tos2priority(u8 tos) | |||
224 | return ip_tos2prio[IPTOS_TOS(tos)>>1]; | 211 | return ip_tos2prio[IPTOS_TOS(tos)>>1]; |
225 | } | 212 | } |
226 | 213 | ||
227 | static inline struct rtable *ip_route_connect(__be32 dst, __be32 src, u32 tos, | 214 | /* ip_route_connect() and ip_route_newports() work in tandem whilst |
215 | * binding a socket for a new outgoing connection. | ||
216 | * | ||
217 | * In order to use IPSEC properly, we must, in the end, have a | ||
218 | * route that was looked up using all available keys including source | ||
219 | * and destination ports. | ||
220 | * | ||
221 | * However, if a source port needs to be allocated (the user specified | ||
222 | * a wildcard source port) we need to obtain addressing information | ||
223 | * in order to perform that allocation. | ||
224 | * | ||
225 | * So ip_route_connect() looks up a route using wildcarded source and | ||
226 | * destination ports in the key, simply so that we can get a pair of | ||
227 | * addresses to use for port allocation. | ||
228 | * | ||
229 | * Later, once the ports are allocated, ip_route_newports() will make | ||
230 | * another route lookup if needed to make sure we catch any IPSEC | ||
231 | * rules keyed on the port information. | ||
232 | * | ||
233 | * The callers allocate the flow key on their stack, and must pass in | ||
234 | * the same flowi4 object to both the ip_route_connect() and the | ||
235 | * ip_route_newports() calls. | ||
236 | */ | ||
237 | |||
238 | static inline void ip_route_connect_init(struct flowi4 *fl4, __be32 dst, __be32 src, | ||
239 | u32 tos, int oif, u8 protocol, | ||
240 | __be16 sport, __be16 dport, | ||
241 | struct sock *sk, bool can_sleep) | ||
242 | { | ||
243 | __u8 flow_flags = 0; | ||
244 | |||
245 | if (inet_sk(sk)->transparent) | ||
246 | flow_flags |= FLOWI_FLAG_ANYSRC; | ||
247 | if (protocol == IPPROTO_TCP) | ||
248 | flow_flags |= FLOWI_FLAG_PRECOW_METRICS; | ||
249 | if (can_sleep) | ||
250 | flow_flags |= FLOWI_FLAG_CAN_SLEEP; | ||
251 | |||
252 | flowi4_init_output(fl4, oif, sk->sk_mark, tos, RT_SCOPE_UNIVERSE, | ||
253 | protocol, flow_flags, dst, src, dport, sport); | ||
254 | } | ||
255 | |||
256 | static inline struct rtable *ip_route_connect(struct flowi4 *fl4, | ||
257 | __be32 dst, __be32 src, u32 tos, | ||
228 | int oif, u8 protocol, | 258 | int oif, u8 protocol, |
229 | __be16 sport, __be16 dport, | 259 | __be16 sport, __be16 dport, |
230 | struct sock *sk, bool can_sleep) | 260 | struct sock *sk, bool can_sleep) |
231 | { | 261 | { |
232 | struct flowi4 fl4 = { | ||
233 | .flowi4_oif = oif, | ||
234 | .flowi4_mark = sk->sk_mark, | ||
235 | .daddr = dst, | ||
236 | .saddr = src, | ||
237 | .flowi4_tos = tos, | ||
238 | .flowi4_proto = protocol, | ||
239 | .fl4_sport = sport, | ||
240 | .fl4_dport = dport, | ||
241 | }; | ||
242 | struct net *net = sock_net(sk); | 262 | struct net *net = sock_net(sk); |
243 | struct rtable *rt; | 263 | struct rtable *rt; |
244 | 264 | ||
245 | if (inet_sk(sk)->transparent) | 265 | ip_route_connect_init(fl4, dst, src, tos, oif, protocol, |
246 | fl4.flowi4_flags |= FLOWI_FLAG_ANYSRC; | 266 | sport, dport, sk, can_sleep); |
247 | if (protocol == IPPROTO_TCP) | ||
248 | fl4.flowi4_flags |= FLOWI_FLAG_PRECOW_METRICS; | ||
249 | if (can_sleep) | ||
250 | fl4.flowi4_flags |= FLOWI_FLAG_CAN_SLEEP; | ||
251 | 267 | ||
252 | if (!dst || !src) { | 268 | if (!dst || !src) { |
253 | rt = __ip_route_output_key(net, &fl4); | 269 | rt = __ip_route_output_key(net, fl4); |
254 | if (IS_ERR(rt)) | 270 | if (IS_ERR(rt)) |
255 | return rt; | 271 | return rt; |
256 | fl4.daddr = rt->rt_dst; | ||
257 | fl4.saddr = rt->rt_src; | ||
258 | ip_rt_put(rt); | 272 | ip_rt_put(rt); |
259 | } | 273 | } |
260 | security_sk_classify_flow(sk, flowi4_to_flowi(&fl4)); | 274 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); |
261 | return ip_route_output_flow(net, &fl4, sk); | 275 | return ip_route_output_flow(net, fl4, sk); |
262 | } | 276 | } |
263 | 277 | ||
264 | static inline struct rtable *ip_route_newports(struct rtable *rt, | 278 | static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable *rt, |
265 | u8 protocol, __be16 orig_sport, | 279 | __be16 orig_sport, __be16 orig_dport, |
266 | __be16 orig_dport, __be16 sport, | 280 | __be16 sport, __be16 dport, |
267 | __be16 dport, struct sock *sk) | 281 | struct sock *sk) |
268 | { | 282 | { |
269 | if (sport != orig_sport || dport != orig_dport) { | 283 | if (sport != orig_sport || dport != orig_dport) { |
270 | struct flowi4 fl4 = { | 284 | fl4->fl4_dport = dport; |
271 | .flowi4_oif = rt->rt_oif, | 285 | fl4->fl4_sport = sport; |
272 | .flowi4_mark = rt->rt_mark, | ||
273 | .daddr = rt->rt_dst, | ||
274 | .saddr = rt->rt_src, | ||
275 | .flowi4_tos = rt->rt_tos, | ||
276 | .flowi4_proto = protocol, | ||
277 | .fl4_sport = sport, | ||
278 | .fl4_dport = dport | ||
279 | }; | ||
280 | if (inet_sk(sk)->transparent) | ||
281 | fl4.flowi4_flags |= FLOWI_FLAG_ANYSRC; | ||
282 | if (protocol == IPPROTO_TCP) | ||
283 | fl4.flowi4_flags |= FLOWI_FLAG_PRECOW_METRICS; | ||
284 | ip_rt_put(rt); | 286 | ip_rt_put(rt); |
285 | security_sk_classify_flow(sk, flowi4_to_flowi(&fl4)); | 287 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); |
286 | return ip_route_output_flow(sock_net(sk), &fl4, sk); | 288 | return ip_route_output_flow(sock_net(sk), fl4, sk); |
287 | } | 289 | } |
288 | return rt; | 290 | return rt; |
289 | } | 291 | } |
290 | 292 | ||
291 | extern void rt_bind_peer(struct rtable *rt, int create); | 293 | extern void rt_bind_peer(struct rtable *rt, __be32 daddr, int create); |
292 | 294 | ||
293 | static inline struct inet_peer *rt_get_peer(struct rtable *rt) | 295 | static inline struct inet_peer *rt_get_peer(struct rtable *rt, __be32 daddr) |
294 | { | 296 | { |
295 | if (rt->peer) | 297 | if (rt->peer) |
296 | return rt->peer; | 298 | return rt->peer; |
297 | 299 | ||
298 | rt_bind_peer(rt, 0); | 300 | rt_bind_peer(rt, daddr, 0); |
299 | return rt->peer; | 301 | return rt->peer; |
300 | } | 302 | } |
301 | 303 | ||
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index c01dc99def07..2b447646ce4b 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
@@ -73,7 +73,6 @@ typedef enum { | |||
73 | SCTP_CMD_INIT_FAILED, /* High level, do init failure work. */ | 73 | SCTP_CMD_INIT_FAILED, /* High level, do init failure work. */ |
74 | SCTP_CMD_REPORT_DUP, /* Report a duplicate TSN. */ | 74 | SCTP_CMD_REPORT_DUP, /* Report a duplicate TSN. */ |
75 | SCTP_CMD_STRIKE, /* Mark a strike against a transport. */ | 75 | SCTP_CMD_STRIKE, /* Mark a strike against a transport. */ |
76 | SCTP_CMD_TRANSMIT, /* Transmit the outqueue. */ | ||
77 | SCTP_CMD_HB_TIMERS_START, /* Start the heartbeat timers. */ | 76 | SCTP_CMD_HB_TIMERS_START, /* Start the heartbeat timers. */ |
78 | SCTP_CMD_HB_TIMER_UPDATE, /* Update a heartbeat timers. */ | 77 | SCTP_CMD_HB_TIMER_UPDATE, /* Update a heartbeat timers. */ |
79 | SCTP_CMD_HB_TIMERS_STOP, /* Stop the heartbeat timers. */ | 78 | SCTP_CMD_HB_TIMERS_STOP, /* Stop the heartbeat timers. */ |
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index c70d8ccc55cb..942b864f6135 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -150,7 +150,6 @@ SCTP_SUBTYPE_CONSTRUCTOR(OTHER, sctp_event_other_t, other) | |||
150 | SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive) | 150 | SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive) |
151 | 151 | ||
152 | 152 | ||
153 | #define sctp_chunk_is_control(a) (a->chunk_hdr->type != SCTP_CID_DATA) | ||
154 | #define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA) | 153 | #define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA) |
155 | 154 | ||
156 | /* Calculate the actual data size in a data chunk */ | 155 | /* Calculate the actual data size in a data chunk */ |
@@ -188,15 +187,14 @@ typedef enum { | |||
188 | /* SCTP state defines for internal state machine */ | 187 | /* SCTP state defines for internal state machine */ |
189 | typedef enum { | 188 | typedef enum { |
190 | 189 | ||
191 | SCTP_STATE_EMPTY = 0, | 190 | SCTP_STATE_CLOSED = 0, |
192 | SCTP_STATE_CLOSED = 1, | 191 | SCTP_STATE_COOKIE_WAIT = 1, |
193 | SCTP_STATE_COOKIE_WAIT = 2, | 192 | SCTP_STATE_COOKIE_ECHOED = 2, |
194 | SCTP_STATE_COOKIE_ECHOED = 3, | 193 | SCTP_STATE_ESTABLISHED = 3, |
195 | SCTP_STATE_ESTABLISHED = 4, | 194 | SCTP_STATE_SHUTDOWN_PENDING = 4, |
196 | SCTP_STATE_SHUTDOWN_PENDING = 5, | 195 | SCTP_STATE_SHUTDOWN_SENT = 5, |
197 | SCTP_STATE_SHUTDOWN_SENT = 6, | 196 | SCTP_STATE_SHUTDOWN_RECEIVED = 6, |
198 | SCTP_STATE_SHUTDOWN_RECEIVED = 7, | 197 | SCTP_STATE_SHUTDOWN_ACK_SENT = 7, |
199 | SCTP_STATE_SHUTDOWN_ACK_SENT = 8, | ||
200 | 198 | ||
201 | } sctp_state_t; | 199 | } sctp_state_t; |
202 | 200 | ||
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 505845ddb0be..b2c2366676a7 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -115,7 +115,6 @@ | |||
115 | * sctp/protocol.c | 115 | * sctp/protocol.c |
116 | */ | 116 | */ |
117 | extern struct sock *sctp_get_ctl_sock(void); | 117 | extern struct sock *sctp_get_ctl_sock(void); |
118 | extern void sctp_local_addr_free(struct rcu_head *head); | ||
119 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, | 118 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, |
120 | sctp_scope_t, gfp_t gfp, | 119 | sctp_scope_t, gfp_t gfp, |
121 | int flags); | 120 | int flags); |
@@ -531,7 +530,6 @@ _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member) | |||
531 | 530 | ||
532 | #define _sctp_walk_params(pos, chunk, end, member)\ | 531 | #define _sctp_walk_params(pos, chunk, end, member)\ |
533 | for (pos.v = chunk->member;\ | 532 | for (pos.v = chunk->member;\ |
534 | pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\ | ||
535 | pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ | 533 | pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ |
536 | ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\ | 534 | ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\ |
537 | pos.v += WORD_ROUND(ntohs(pos.p->length))) | 535 | pos.v += WORD_ROUND(ntohs(pos.p->length))) |
@@ -542,7 +540,6 @@ _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length)) | |||
542 | #define _sctp_walk_errors(err, chunk_hdr, end)\ | 540 | #define _sctp_walk_errors(err, chunk_hdr, end)\ |
543 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ | 541 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ |
544 | sizeof(sctp_chunkhdr_t));\ | 542 | sizeof(sctp_chunkhdr_t));\ |
545 | (void *)err <= (void *)chunk_hdr + end - sizeof(sctp_errhdr_t) &&\ | ||
546 | (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ | 543 | (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ |
547 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ | 544 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ |
548 | err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length)))) | 545 | err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length)))) |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 9352d12f02de..9148632b8204 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -165,6 +165,7 @@ sctp_state_fn_t sctp_sf_do_prm_requestheartbeat; | |||
165 | sctp_state_fn_t sctp_sf_do_prm_asconf; | 165 | sctp_state_fn_t sctp_sf_do_prm_asconf; |
166 | 166 | ||
167 | /* Prototypes for other event state functions. */ | 167 | /* Prototypes for other event state functions. */ |
168 | sctp_state_fn_t sctp_sf_do_no_pending_tsn; | ||
168 | sctp_state_fn_t sctp_sf_do_9_2_start_shutdown; | 169 | sctp_state_fn_t sctp_sf_do_9_2_start_shutdown; |
169 | sctp_state_fn_t sctp_sf_do_9_2_shutdown_ack; | 170 | sctp_state_fn_t sctp_sf_do_9_2_shutdown_ack; |
170 | sctp_state_fn_t sctp_sf_ignore_other; | 171 | sctp_state_fn_t sctp_sf_ignore_other; |
@@ -232,9 +233,7 @@ struct sctp_chunk *sctp_make_violation_paramlen(const struct sctp_association *, | |||
232 | const struct sctp_chunk *, | 233 | const struct sctp_chunk *, |
233 | struct sctp_paramhdr *); | 234 | struct sctp_paramhdr *); |
234 | struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, | 235 | struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, |
235 | const struct sctp_transport *, | 236 | const struct sctp_transport *); |
236 | const void *payload, | ||
237 | const size_t paylen); | ||
238 | struct sctp_chunk *sctp_make_heartbeat_ack(const struct sctp_association *, | 237 | struct sctp_chunk *sctp_make_heartbeat_ack(const struct sctp_association *, |
239 | const struct sctp_chunk *, | 238 | const struct sctp_chunk *, |
240 | const void *payload, | 239 | const void *payload, |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index cc9185ca8fd1..795f4886e111 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -422,7 +422,7 @@ struct sctp_cookie { | |||
422 | __u32 adaptation_ind; | 422 | __u32 adaptation_ind; |
423 | 423 | ||
424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; | 424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; |
425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2]; | 425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2]; |
426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; | 426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; |
427 | 427 | ||
428 | /* This is a shim for my peer's INIT packet, followed by | 428 | /* This is a shim for my peer's INIT packet, followed by |
@@ -564,19 +564,15 @@ struct sctp_af { | |||
564 | int optname, | 564 | int optname, |
565 | char __user *optval, | 565 | char __user *optval, |
566 | int __user *optlen); | 566 | int __user *optlen); |
567 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, | 567 | void (*get_dst) (struct sctp_transport *t, |
568 | union sctp_addr *daddr, | 568 | union sctp_addr *saddr, |
569 | union sctp_addr *saddr); | 569 | struct flowi *fl, |
570 | struct sock *sk); | ||
570 | void (*get_saddr) (struct sctp_sock *sk, | 571 | void (*get_saddr) (struct sctp_sock *sk, |
571 | struct sctp_association *asoc, | 572 | struct sctp_transport *t, |
572 | struct dst_entry *dst, | 573 | struct flowi *fl); |
573 | union sctp_addr *daddr, | ||
574 | union sctp_addr *saddr); | ||
575 | void (*copy_addrlist) (struct list_head *, | 574 | void (*copy_addrlist) (struct list_head *, |
576 | struct net_device *); | 575 | struct net_device *); |
577 | void (*dst_saddr) (union sctp_addr *saddr, | ||
578 | struct dst_entry *dst, | ||
579 | __be16 port); | ||
580 | int (*cmp_addr) (const union sctp_addr *addr1, | 576 | int (*cmp_addr) (const union sctp_addr *addr1, |
581 | const union sctp_addr *addr2); | 577 | const union sctp_addr *addr2); |
582 | void (*addr_copy) (union sctp_addr *dst, | 578 | void (*addr_copy) (union sctp_addr *dst, |
@@ -898,6 +894,7 @@ struct sctp_transport { | |||
898 | /* Is this structure kfree()able? */ | 894 | /* Is this structure kfree()able? */ |
899 | malloced:1; | 895 | malloced:1; |
900 | 896 | ||
897 | struct flowi fl; | ||
901 | 898 | ||
902 | /* This is the peer's IP address and port. */ | 899 | /* This is the peer's IP address and port. */ |
903 | union sctp_addr ipaddr; | 900 | union sctp_addr ipaddr; |
@@ -1061,7 +1058,7 @@ void sctp_transport_set_owner(struct sctp_transport *, | |||
1061 | struct sctp_association *); | 1058 | struct sctp_association *); |
1062 | void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | 1059 | void sctp_transport_route(struct sctp_transport *, union sctp_addr *, |
1063 | struct sctp_sock *); | 1060 | struct sctp_sock *); |
1064 | void sctp_transport_pmtu(struct sctp_transport *); | 1061 | void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk); |
1065 | void sctp_transport_free(struct sctp_transport *); | 1062 | void sctp_transport_free(struct sctp_transport *); |
1066 | void sctp_transport_reset_timers(struct sctp_transport *); | 1063 | void sctp_transport_reset_timers(struct sctp_transport *); |
1067 | void sctp_transport_hold(struct sctp_transport *); | 1064 | void sctp_transport_hold(struct sctp_transport *); |
@@ -1400,7 +1397,7 @@ int sctp_has_association(const union sctp_addr *laddr, | |||
1400 | int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t, | 1397 | int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t, |
1401 | sctp_init_chunk_t *peer_init, struct sctp_chunk *chunk, | 1398 | sctp_init_chunk_t *peer_init, struct sctp_chunk *chunk, |
1402 | struct sctp_chunk **err_chunk); | 1399 | struct sctp_chunk **err_chunk); |
1403 | int sctp_process_init(struct sctp_association *, sctp_cid_t cid, | 1400 | int sctp_process_init(struct sctp_association *, struct sctp_chunk *chunk, |
1404 | const union sctp_addr *peer, | 1401 | const union sctp_addr *peer, |
1405 | sctp_init_chunk_t *init, gfp_t gfp); | 1402 | sctp_init_chunk_t *init, gfp_t gfp); |
1406 | __u32 sctp_generate_tag(const struct sctp_endpoint *); | 1403 | __u32 sctp_generate_tag(const struct sctp_endpoint *); |
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index 7ea12e8e6676..99b027b2adce 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h | |||
@@ -132,6 +132,9 @@ struct sctp_ulpevent *sctp_ulpevent_make_authkey( | |||
132 | const struct sctp_association *asoc, __u16 key_id, | 132 | const struct sctp_association *asoc, __u16 key_id, |
133 | __u32 indication, gfp_t gfp); | 133 | __u32 indication, gfp_t gfp); |
134 | 134 | ||
135 | struct sctp_ulpevent *sctp_ulpevent_make_sender_dry_event( | ||
136 | const struct sctp_association *asoc, gfp_t gfp); | ||
137 | |||
135 | void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, | 138 | void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, |
136 | struct msghdr *); | 139 | struct msghdr *); |
137 | __u16 sctp_ulpevent_get_notification_type(const struct sctp_ulpevent *event); | 140 | __u16 sctp_ulpevent_get_notification_type(const struct sctp_ulpevent *event); |
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index e73ebdae323d..32fd51274037 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -91,6 +91,7 @@ typedef __s32 sctp_assoc_t; | |||
91 | #define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */ | 91 | #define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */ |
92 | #define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */ | 92 | #define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */ |
93 | #define SCTP_GET_ASSOC_NUMBER 28 /* Read only */ | 93 | #define SCTP_GET_ASSOC_NUMBER 28 /* Read only */ |
94 | #define SCTP_GET_ASSOC_ID_LIST 29 /* Read only */ | ||
94 | 95 | ||
95 | /* Internal Socket Options. Some of the sctp library functions are | 96 | /* Internal Socket Options. Some of the sctp library functions are |
96 | * implemented using these socket options. | 97 | * implemented using these socket options. |
@@ -353,6 +354,20 @@ struct sctp_authkey_event { | |||
353 | 354 | ||
354 | enum { SCTP_AUTH_NEWKEY = 0, }; | 355 | enum { SCTP_AUTH_NEWKEY = 0, }; |
355 | 356 | ||
357 | /* | ||
358 | * 6.1.9. SCTP_SENDER_DRY_EVENT | ||
359 | * | ||
360 | * When the SCTP stack has no more user data to send or retransmit, this | ||
361 | * notification is given to the user. Also, at the time when a user app | ||
362 | * subscribes to this event, if there is no data to be sent or | ||
363 | * retransmit, the stack will immediately send up this notification. | ||
364 | */ | ||
365 | struct sctp_sender_dry_event { | ||
366 | __u16 sender_dry_type; | ||
367 | __u16 sender_dry_flags; | ||
368 | __u32 sender_dry_length; | ||
369 | sctp_assoc_t sender_dry_assoc_id; | ||
370 | }; | ||
356 | 371 | ||
357 | /* | 372 | /* |
358 | * Described in Section 7.3 | 373 | * Described in Section 7.3 |
@@ -368,6 +383,7 @@ struct sctp_event_subscribe { | |||
368 | __u8 sctp_partial_delivery_event; | 383 | __u8 sctp_partial_delivery_event; |
369 | __u8 sctp_adaptation_layer_event; | 384 | __u8 sctp_adaptation_layer_event; |
370 | __u8 sctp_authentication_event; | 385 | __u8 sctp_authentication_event; |
386 | __u8 sctp_sender_dry_event; | ||
371 | }; | 387 | }; |
372 | 388 | ||
373 | /* | 389 | /* |
@@ -391,6 +407,7 @@ union sctp_notification { | |||
391 | struct sctp_adaptation_event sn_adaptation_event; | 407 | struct sctp_adaptation_event sn_adaptation_event; |
392 | struct sctp_pdapi_event sn_pdapi_event; | 408 | struct sctp_pdapi_event sn_pdapi_event; |
393 | struct sctp_authkey_event sn_authkey_event; | 409 | struct sctp_authkey_event sn_authkey_event; |
410 | struct sctp_sender_dry_event sn_sender_dry_event; | ||
394 | }; | 411 | }; |
395 | 412 | ||
396 | /* Section 5.3.1 | 413 | /* Section 5.3.1 |
@@ -407,7 +424,9 @@ enum sctp_sn_type { | |||
407 | SCTP_SHUTDOWN_EVENT, | 424 | SCTP_SHUTDOWN_EVENT, |
408 | SCTP_PARTIAL_DELIVERY_EVENT, | 425 | SCTP_PARTIAL_DELIVERY_EVENT, |
409 | SCTP_ADAPTATION_INDICATION, | 426 | SCTP_ADAPTATION_INDICATION, |
410 | SCTP_AUTHENTICATION_INDICATION, | 427 | SCTP_AUTHENTICATION_EVENT, |
428 | #define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT | ||
429 | SCTP_SENDER_DRY_EVENT, | ||
411 | }; | 430 | }; |
412 | 431 | ||
413 | /* Notification error codes used to fill up the error fields in some | 432 | /* Notification error codes used to fill up the error fields in some |
@@ -669,6 +688,18 @@ struct sctp_authchunks { | |||
669 | }; | 688 | }; |
670 | 689 | ||
671 | /* | 690 | /* |
691 | * 8.2.6. Get the Current Identifiers of Associations | ||
692 | * (SCTP_GET_ASSOC_ID_LIST) | ||
693 | * | ||
694 | * This option gets the current list of SCTP association identifiers of | ||
695 | * the SCTP associations handled by a one-to-many style socket. | ||
696 | */ | ||
697 | struct sctp_assoc_ids { | ||
698 | __u32 gaids_number_of_ids; | ||
699 | sctp_assoc_t gaids_assoc_id[]; | ||
700 | }; | ||
701 | |||
702 | /* | ||
672 | * 8.3, 8.5 get all peer/local addresses in an association. | 703 | * 8.3, 8.5 get all peer/local addresses in an association. |
673 | * This parameter struct is used by SCTP_GET_PEER_ADDRS and | 704 | * This parameter struct is used by SCTP_GET_PEER_ADDRS and |
674 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement | 705 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement |
diff --git a/include/net/snmp.h b/include/net/snmp.h index 27461d6dd46f..479083a78b0c 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h | |||
@@ -72,14 +72,24 @@ struct icmpmsg_mib { | |||
72 | 72 | ||
73 | /* ICMP6 (IPv6-ICMP) */ | 73 | /* ICMP6 (IPv6-ICMP) */ |
74 | #define ICMP6_MIB_MAX __ICMP6_MIB_MAX | 74 | #define ICMP6_MIB_MAX __ICMP6_MIB_MAX |
75 | /* per network ns counters */ | ||
75 | struct icmpv6_mib { | 76 | struct icmpv6_mib { |
76 | unsigned long mibs[ICMP6_MIB_MAX]; | 77 | unsigned long mibs[ICMP6_MIB_MAX]; |
77 | }; | 78 | }; |
79 | /* per device counters, (shared on all cpus) */ | ||
80 | struct icmpv6_mib_device { | ||
81 | atomic_long_t mibs[ICMP6_MIB_MAX]; | ||
82 | }; | ||
78 | 83 | ||
79 | #define ICMP6MSG_MIB_MAX __ICMP6MSG_MIB_MAX | 84 | #define ICMP6MSG_MIB_MAX __ICMP6MSG_MIB_MAX |
85 | /* per network ns counters */ | ||
80 | struct icmpv6msg_mib { | 86 | struct icmpv6msg_mib { |
81 | unsigned long mibs[ICMP6MSG_MIB_MAX]; | 87 | unsigned long mibs[ICMP6MSG_MIB_MAX]; |
82 | }; | 88 | }; |
89 | /* per device counters, (shared on all cpus) */ | ||
90 | struct icmpv6msg_mib_device { | ||
91 | atomic_long_t mibs[ICMP6MSG_MIB_MAX]; | ||
92 | }; | ||
83 | 93 | ||
84 | 94 | ||
85 | /* TCP */ | 95 | /* TCP */ |
@@ -114,6 +124,8 @@ struct linux_xfrm_mib { | |||
114 | */ | 124 | */ |
115 | #define DEFINE_SNMP_STAT(type, name) \ | 125 | #define DEFINE_SNMP_STAT(type, name) \ |
116 | __typeof__(type) __percpu *name[2] | 126 | __typeof__(type) __percpu *name[2] |
127 | #define DEFINE_SNMP_STAT_ATOMIC(type, name) \ | ||
128 | __typeof__(type) *name | ||
117 | #define DECLARE_SNMP_STAT(type, name) \ | 129 | #define DECLARE_SNMP_STAT(type, name) \ |
118 | extern __typeof__(type) __percpu *name[2] | 130 | extern __typeof__(type) __percpu *name[2] |
119 | 131 | ||
@@ -124,6 +136,8 @@ struct linux_xfrm_mib { | |||
124 | __this_cpu_inc(mib[0]->mibs[field]) | 136 | __this_cpu_inc(mib[0]->mibs[field]) |
125 | #define SNMP_INC_STATS_USER(mib, field) \ | 137 | #define SNMP_INC_STATS_USER(mib, field) \ |
126 | this_cpu_inc(mib[1]->mibs[field]) | 138 | this_cpu_inc(mib[1]->mibs[field]) |
139 | #define SNMP_INC_STATS_ATOMIC_LONG(mib, field) \ | ||
140 | atomic_long_inc(&mib->mibs[field]) | ||
127 | #define SNMP_INC_STATS(mib, field) \ | 141 | #define SNMP_INC_STATS(mib, field) \ |
128 | this_cpu_inc(mib[!in_softirq()]->mibs[field]) | 142 | this_cpu_inc(mib[!in_softirq()]->mibs[field]) |
129 | #define SNMP_DEC_STATS(mib, field) \ | 143 | #define SNMP_DEC_STATS(mib, field) \ |
diff --git a/include/net/sock.h b/include/net/sock.h index da0534d3401c..f2046e404a61 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/mm.h> | 52 | #include <linux/mm.h> |
53 | #include <linux/security.h> | 53 | #include <linux/security.h> |
54 | #include <linux/slab.h> | 54 | #include <linux/slab.h> |
55 | #include <linux/uaccess.h> | ||
55 | 56 | ||
56 | #include <linux/filter.h> | 57 | #include <linux/filter.h> |
57 | #include <linux/rculist_nulls.h> | 58 | #include <linux/rculist_nulls.h> |
@@ -1389,6 +1390,59 @@ static inline void sk_nocaps_add(struct sock *sk, int flags) | |||
1389 | sk->sk_route_caps &= ~flags; | 1390 | sk->sk_route_caps &= ~flags; |
1390 | } | 1391 | } |
1391 | 1392 | ||
1393 | static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb, | ||
1394 | char __user *from, char *to, | ||
1395 | int copy, int offset) | ||
1396 | { | ||
1397 | if (skb->ip_summed == CHECKSUM_NONE) { | ||
1398 | int err = 0; | ||
1399 | __wsum csum = csum_and_copy_from_user(from, to, copy, 0, &err); | ||
1400 | if (err) | ||
1401 | return err; | ||
1402 | skb->csum = csum_block_add(skb->csum, csum, offset); | ||
1403 | } else if (sk->sk_route_caps & NETIF_F_NOCACHE_COPY) { | ||
1404 | if (!access_ok(VERIFY_READ, from, copy) || | ||
1405 | __copy_from_user_nocache(to, from, copy)) | ||
1406 | return -EFAULT; | ||
1407 | } else if (copy_from_user(to, from, copy)) | ||
1408 | return -EFAULT; | ||
1409 | |||
1410 | return 0; | ||
1411 | } | ||
1412 | |||
1413 | static inline int skb_add_data_nocache(struct sock *sk, struct sk_buff *skb, | ||
1414 | char __user *from, int copy) | ||
1415 | { | ||
1416 | int err, offset = skb->len; | ||
1417 | |||
1418 | err = skb_do_copy_data_nocache(sk, skb, from, skb_put(skb, copy), | ||
1419 | copy, offset); | ||
1420 | if (err) | ||
1421 | __skb_trim(skb, offset); | ||
1422 | |||
1423 | return err; | ||
1424 | } | ||
1425 | |||
1426 | static inline int skb_copy_to_page_nocache(struct sock *sk, char __user *from, | ||
1427 | struct sk_buff *skb, | ||
1428 | struct page *page, | ||
1429 | int off, int copy) | ||
1430 | { | ||
1431 | int err; | ||
1432 | |||
1433 | err = skb_do_copy_data_nocache(sk, skb, from, page_address(page) + off, | ||
1434 | copy, skb->len); | ||
1435 | if (err) | ||
1436 | return err; | ||
1437 | |||
1438 | skb->len += copy; | ||
1439 | skb->data_len += copy; | ||
1440 | skb->truesize += copy; | ||
1441 | sk->sk_wmem_queued += copy; | ||
1442 | sk_mem_charge(sk, copy); | ||
1443 | return 0; | ||
1444 | } | ||
1445 | |||
1392 | static inline int skb_copy_to_page(struct sock *sk, char __user *from, | 1446 | static inline int skb_copy_to_page(struct sock *sk, char __user *from, |
1393 | struct sk_buff *skb, struct page *page, | 1447 | struct sk_buff *skb, struct page *page, |
1394 | int off, int copy) | 1448 | int off, int copy) |
@@ -1749,7 +1803,7 @@ void sock_net_set(struct sock *sk, struct net *net) | |||
1749 | 1803 | ||
1750 | /* | 1804 | /* |
1751 | * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. | 1805 | * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. |
1752 | * They should not hold a referrence to a namespace in order to allow | 1806 | * They should not hold a reference to a namespace in order to allow |
1753 | * to stop it. | 1807 | * to stop it. |
1754 | * Sockets after sk_change_net should be released using sk_release_kernel | 1808 | * Sockets after sk_change_net should be released using sk_release_kernel |
1755 | */ | 1809 | */ |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index eeb077dd735f..5271a741c3a3 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -7,8 +7,6 @@ | |||
7 | * IPv6 transport protocols | 7 | * IPv6 transport protocols |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifdef __KERNEL__ | ||
11 | |||
12 | extern struct proto rawv6_prot; | 10 | extern struct proto rawv6_prot; |
13 | extern struct proto udpv6_prot; | 11 | extern struct proto udpv6_prot; |
14 | extern struct proto udplitev6_prot; | 12 | extern struct proto udplitev6_prot; |
@@ -16,7 +14,7 @@ extern struct proto tcpv6_prot; | |||
16 | 14 | ||
17 | struct flowi6; | 15 | struct flowi6; |
18 | 16 | ||
19 | /* extention headers */ | 17 | /* extension headers */ |
20 | extern int ipv6_exthdrs_init(void); | 18 | extern int ipv6_exthdrs_init(void); |
21 | extern void ipv6_exthdrs_exit(void); | 19 | extern void ipv6_exthdrs_exit(void); |
22 | extern int ipv6_frag_init(void); | 20 | extern int ipv6_frag_init(void); |
@@ -57,5 +55,3 @@ extern const struct inet_connection_sock_af_ops ipv4_specific; | |||
57 | extern void inet6_destroy_sock(struct sock *sk); | 55 | extern void inet6_destroy_sock(struct sock *sk); |
58 | 56 | ||
59 | #endif | 57 | #endif |
60 | |||
61 | #endif | ||
diff --git a/include/net/wimax.h b/include/net/wimax.h index 3461aa1df1e0..7328d5019d88 100644 --- a/include/net/wimax.h +++ b/include/net/wimax.h | |||
@@ -250,7 +250,6 @@ | |||
250 | 250 | ||
251 | #ifndef __NET__WIMAX_H__ | 251 | #ifndef __NET__WIMAX_H__ |
252 | #define __NET__WIMAX_H__ | 252 | #define __NET__WIMAX_H__ |
253 | #ifdef __KERNEL__ | ||
254 | 253 | ||
255 | #include <linux/wimax.h> | 254 | #include <linux/wimax.h> |
256 | #include <net/genetlink.h> | 255 | #include <net/genetlink.h> |
@@ -286,7 +285,7 @@ struct wimax_dev; | |||
286 | * does not disconnect the device from the bus and return 0. | 285 | * does not disconnect the device from the bus and return 0. |
287 | * If that fails, it should resort to some sort of cold or bus | 286 | * If that fails, it should resort to some sort of cold or bus |
288 | * reset (even if it implies a bus disconnection and device | 287 | * reset (even if it implies a bus disconnection and device |
289 | * dissapearance). In that case, -ENODEV should be returned to | 288 | * disappearance). In that case, -ENODEV should be returned to |
290 | * indicate the device is gone. | 289 | * indicate the device is gone. |
291 | * This operation has to be synchronous, and return only when the | 290 | * This operation has to be synchronous, and return only when the |
292 | * reset is complete. In case of having had to resort to bus/cold | 291 | * reset is complete. In case of having had to resort to bus/cold |
@@ -518,8 +517,4 @@ extern ssize_t wimax_msg_len(struct sk_buff *); | |||
518 | extern int wimax_rfkill(struct wimax_dev *, enum wimax_rf_state); | 517 | extern int wimax_rfkill(struct wimax_dev *, enum wimax_rf_state); |
519 | extern int wimax_reset(struct wimax_dev *); | 518 | extern int wimax_reset(struct wimax_dev *); |
520 | 519 | ||
521 | #else | ||
522 | /* You might be looking for linux/wimax.h */ | ||
523 | #error This file should not be included from user space. | ||
524 | #endif /* #ifdef __KERNEL__ */ | ||
525 | #endif /* #ifndef __NET__WIMAX_H__ */ | 520 | #endif /* #ifndef __NET__WIMAX_H__ */ |
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h index 85926231c07a..d86fffd3c03c 100644 --- a/include/net/wpan-phy.h +++ b/include/net/wpan-phy.h | |||
@@ -28,7 +28,7 @@ struct wpan_phy { | |||
28 | struct mutex pib_lock; | 28 | struct mutex pib_lock; |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * This is a PIB acording to 802.15.4-2006. | 31 | * This is a PIB according to 802.15.4-2006. |
32 | * We do not provide timing-related variables, as they | 32 | * We do not provide timing-related variables, as they |
33 | * aren't used outside of driver | 33 | * aren't used outside of driver |
34 | */ | 34 | */ |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index cffa5dc66449..b203e14d26b7 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -324,6 +324,7 @@ struct xfrm_state_afinfo { | |||
324 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); | 324 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); |
325 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); | 325 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); |
326 | int (*output)(struct sk_buff *skb); | 326 | int (*output)(struct sk_buff *skb); |
327 | int (*output_finish)(struct sk_buff *skb); | ||
327 | int (*extract_input)(struct xfrm_state *x, | 328 | int (*extract_input)(struct xfrm_state *x, |
328 | struct sk_buff *skb); | 329 | struct sk_buff *skb); |
329 | int (*extract_output)(struct xfrm_state *x, | 330 | int (*extract_output)(struct xfrm_state *x, |
@@ -957,6 +958,15 @@ struct sec_path { | |||
957 | struct xfrm_state *xvec[XFRM_MAX_DEPTH]; | 958 | struct xfrm_state *xvec[XFRM_MAX_DEPTH]; |
958 | }; | 959 | }; |
959 | 960 | ||
961 | static inline int secpath_exists(struct sk_buff *skb) | ||
962 | { | ||
963 | #ifdef CONFIG_XFRM | ||
964 | return skb->sp != NULL; | ||
965 | #else | ||
966 | return 0; | ||
967 | #endif | ||
968 | } | ||
969 | |||
960 | static inline struct sec_path * | 970 | static inline struct sec_path * |
961 | secpath_get(struct sec_path *sp) | 971 | secpath_get(struct sec_path *sp) |
962 | { | 972 | { |
@@ -1454,6 +1464,7 @@ static inline int xfrm4_rcv_spi(struct sk_buff *skb, int nexthdr, __be32 spi) | |||
1454 | extern int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb); | 1464 | extern int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb); |
1455 | extern int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb); | 1465 | extern int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb); |
1456 | extern int xfrm4_output(struct sk_buff *skb); | 1466 | extern int xfrm4_output(struct sk_buff *skb); |
1467 | extern int xfrm4_output_finish(struct sk_buff *skb); | ||
1457 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family); | 1468 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family); |
1458 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family); | 1469 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family); |
1459 | extern int xfrm6_extract_header(struct sk_buff *skb); | 1470 | extern int xfrm6_extract_header(struct sk_buff *skb); |
@@ -1466,10 +1477,11 @@ extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, | |||
1466 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family); | 1477 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family); |
1467 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family); | 1478 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family); |
1468 | extern __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr); | 1479 | extern __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr); |
1469 | extern __be32 xfrm6_tunnel_spi_lookup(struct net *net, xfrm_address_t *saddr); | 1480 | extern __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr); |
1470 | extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb); | 1481 | extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb); |
1471 | extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb); | 1482 | extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb); |
1472 | extern int xfrm6_output(struct sk_buff *skb); | 1483 | extern int xfrm6_output(struct sk_buff *skb); |
1484 | extern int xfrm6_output_finish(struct sk_buff *skb); | ||
1473 | extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, | 1485 | extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, |
1474 | u8 **prevhdr); | 1486 | u8 **prevhdr); |
1475 | 1487 | ||
@@ -1560,8 +1572,8 @@ static inline int xfrm_addr_cmp(const xfrm_address_t *a, | |||
1560 | case AF_INET: | 1572 | case AF_INET: |
1561 | return (__force u32)a->a4 - (__force u32)b->a4; | 1573 | return (__force u32)a->a4 - (__force u32)b->a4; |
1562 | case AF_INET6: | 1574 | case AF_INET6: |
1563 | return ipv6_addr_cmp((struct in6_addr *)a, | 1575 | return ipv6_addr_cmp((const struct in6_addr *)a, |
1564 | (struct in6_addr *)b); | 1576 | (const struct in6_addr *)b); |
1565 | } | 1577 | } |
1566 | } | 1578 | } |
1567 | 1579 | ||
@@ -1601,6 +1613,28 @@ static inline int xfrm_replay_state_esn_len(struct xfrm_replay_state_esn *replay | |||
1601 | } | 1613 | } |
1602 | 1614 | ||
1603 | #ifdef CONFIG_XFRM_MIGRATE | 1615 | #ifdef CONFIG_XFRM_MIGRATE |
1616 | static inline int xfrm_replay_clone(struct xfrm_state *x, | ||
1617 | struct xfrm_state *orig) | ||
1618 | { | ||
1619 | x->replay_esn = kzalloc(xfrm_replay_state_esn_len(orig->replay_esn), | ||
1620 | GFP_KERNEL); | ||
1621 | if (!x->replay_esn) | ||
1622 | return -ENOMEM; | ||
1623 | |||
1624 | x->replay_esn->bmp_len = orig->replay_esn->bmp_len; | ||
1625 | x->replay_esn->replay_window = orig->replay_esn->replay_window; | ||
1626 | |||
1627 | x->preplay_esn = kmemdup(x->replay_esn, | ||
1628 | xfrm_replay_state_esn_len(x->replay_esn), | ||
1629 | GFP_KERNEL); | ||
1630 | if (!x->preplay_esn) { | ||
1631 | kfree(x->replay_esn); | ||
1632 | return -ENOMEM; | ||
1633 | } | ||
1634 | |||
1635 | return 0; | ||
1636 | } | ||
1637 | |||
1604 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) | 1638 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) |
1605 | { | 1639 | { |
1606 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); | 1640 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); |
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index b5fc9f39122b..ae8c68f30f1b 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h | |||
@@ -217,18 +217,19 @@ static inline enum ib_mtu iboe_get_mtu(int mtu) | |||
217 | static inline int iboe_get_rate(struct net_device *dev) | 217 | static inline int iboe_get_rate(struct net_device *dev) |
218 | { | 218 | { |
219 | struct ethtool_cmd cmd; | 219 | struct ethtool_cmd cmd; |
220 | u32 speed; | ||
220 | 221 | ||
221 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_settings || | 222 | if (dev_ethtool_get_settings(dev, &cmd)) |
222 | dev->ethtool_ops->get_settings(dev, &cmd)) | ||
223 | return IB_RATE_PORT_CURRENT; | 223 | return IB_RATE_PORT_CURRENT; |
224 | 224 | ||
225 | if (cmd.speed >= 40000) | 225 | speed = ethtool_cmd_speed(&cmd); |
226 | if (speed >= 40000) | ||
226 | return IB_RATE_40_GBPS; | 227 | return IB_RATE_40_GBPS; |
227 | else if (cmd.speed >= 30000) | 228 | else if (speed >= 30000) |
228 | return IB_RATE_30_GBPS; | 229 | return IB_RATE_30_GBPS; |
229 | else if (cmd.speed >= 20000) | 230 | else if (speed >= 20000) |
230 | return IB_RATE_20_GBPS; | 231 | return IB_RATE_20_GBPS; |
231 | else if (cmd.speed >= 10000) | 232 | else if (speed >= 10000) |
232 | return IB_RATE_10_GBPS; | 233 | return IB_RATE_10_GBPS; |
233 | else | 234 | else |
234 | return IB_RATE_PORT_CURRENT; | 235 | return IB_RATE_PORT_CURRENT; |
diff --git a/include/rdma/iw_cm.h b/include/rdma/iw_cm.h index cbb822e8d791..2d0191c90f9e 100644 --- a/include/rdma/iw_cm.h +++ b/include/rdma/iw_cm.h | |||
@@ -46,18 +46,9 @@ enum iw_cm_event_type { | |||
46 | IW_CM_EVENT_CLOSE /* close complete */ | 46 | IW_CM_EVENT_CLOSE /* close complete */ |
47 | }; | 47 | }; |
48 | 48 | ||
49 | enum iw_cm_event_status { | ||
50 | IW_CM_EVENT_STATUS_OK = 0, /* request successful */ | ||
51 | IW_CM_EVENT_STATUS_ACCEPTED = 0, /* connect request accepted */ | ||
52 | IW_CM_EVENT_STATUS_REJECTED, /* connect request rejected */ | ||
53 | IW_CM_EVENT_STATUS_TIMEOUT, /* the operation timed out */ | ||
54 | IW_CM_EVENT_STATUS_RESET, /* reset from remote peer */ | ||
55 | IW_CM_EVENT_STATUS_EINVAL, /* asynchronous failure for bad parm */ | ||
56 | }; | ||
57 | |||
58 | struct iw_cm_event { | 49 | struct iw_cm_event { |
59 | enum iw_cm_event_type event; | 50 | enum iw_cm_event_type event; |
60 | enum iw_cm_event_status status; | 51 | int status; |
61 | struct sockaddr_in local_addr; | 52 | struct sockaddr_in local_addr; |
62 | struct sockaddr_in remote_addr; | 53 | struct sockaddr_in remote_addr; |
63 | void *private_data; | 54 | void *private_data; |
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 4fae90304648..169f7a53fb0c 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h | |||
@@ -329,4 +329,14 @@ void rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr); | |||
329 | */ | 329 | */ |
330 | void rdma_set_service_type(struct rdma_cm_id *id, int tos); | 330 | void rdma_set_service_type(struct rdma_cm_id *id, int tos); |
331 | 331 | ||
332 | /** | ||
333 | * rdma_set_reuseaddr - Allow the reuse of local addresses when binding | ||
334 | * the rdma_cm_id. | ||
335 | * @id: Communication identifier to configure. | ||
336 | * @reuse: Value indicating if the bound address is reusable. | ||
337 | * | ||
338 | * Reuse must be set before an address is bound to the id. | ||
339 | */ | ||
340 | int rdma_set_reuseaddr(struct rdma_cm_id *id, int reuse); | ||
341 | |||
332 | #endif /* RDMA_CM_H */ | 342 | #endif /* RDMA_CM_H */ |
diff --git a/include/rdma/rdma_user_cm.h b/include/rdma/rdma_user_cm.h index 1d165022c02d..fc82c1896f75 100644 --- a/include/rdma/rdma_user_cm.h +++ b/include/rdma/rdma_user_cm.h | |||
@@ -221,8 +221,9 @@ enum { | |||
221 | 221 | ||
222 | /* Option details */ | 222 | /* Option details */ |
223 | enum { | 223 | enum { |
224 | RDMA_OPTION_ID_TOS = 0, | 224 | RDMA_OPTION_ID_TOS = 0, |
225 | RDMA_OPTION_IB_PATH = 1 | 225 | RDMA_OPTION_ID_REUSEADDR = 1, |
226 | RDMA_OPTION_IB_PATH = 1 | ||
226 | }; | 227 | }; |
227 | 228 | ||
228 | struct rdma_ucm_set_option { | 229 | struct rdma_ucm_set_option { |
diff --git a/include/rxrpc/packet.h b/include/rxrpc/packet.h index 9b2c30897e50..f2902ef7ab75 100644 --- a/include/rxrpc/packet.h +++ b/include/rxrpc/packet.h | |||
@@ -148,7 +148,7 @@ struct rxkad_challenge { | |||
148 | * Kerberos security type-2 response packet | 148 | * Kerberos security type-2 response packet |
149 | */ | 149 | */ |
150 | struct rxkad_response { | 150 | struct rxkad_response { |
151 | __be32 version; /* version of this reponse type */ | 151 | __be32 version; /* version of this response type */ |
152 | __be32 __pad; | 152 | __be32 __pad; |
153 | 153 | ||
154 | /* encrypted bit of the response */ | 154 | /* encrypted bit of the response */ |
diff --git a/include/scsi/fc/fc_fcp.h b/include/scsi/fc/fc_fcp.h index 8a143ca79878..652dec230514 100644 --- a/include/scsi/fc/fc_fcp.h +++ b/include/scsi/fc/fc_fcp.h | |||
@@ -75,7 +75,7 @@ struct fcp_cmnd32 { | |||
75 | #define FCP_PTA_SIMPLE 0 /* simple task attribute */ | 75 | #define FCP_PTA_SIMPLE 0 /* simple task attribute */ |
76 | #define FCP_PTA_HEADQ 1 /* head of queue task attribute */ | 76 | #define FCP_PTA_HEADQ 1 /* head of queue task attribute */ |
77 | #define FCP_PTA_ORDERED 2 /* ordered task attribute */ | 77 | #define FCP_PTA_ORDERED 2 /* ordered task attribute */ |
78 | #define FCP_PTA_ACA 4 /* auto. contigent allegiance */ | 78 | #define FCP_PTA_ACA 4 /* auto. contingent allegiance */ |
79 | #define FCP_PTA_MASK 7 /* mask for task attribute field */ | 79 | #define FCP_PTA_MASK 7 /* mask for task attribute field */ |
80 | #define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */ | 80 | #define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */ |
81 | #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */ | 81 | #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */ |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index c3e1cbcc2ad2..ddb04568a509 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -292,7 +292,7 @@ enum iscsi_param { | |||
292 | ISCSI_PARAM_PERSISTENT_PORT, | 292 | ISCSI_PARAM_PERSISTENT_PORT, |
293 | ISCSI_PARAM_SESS_RECOVERY_TMO, | 293 | ISCSI_PARAM_SESS_RECOVERY_TMO, |
294 | 294 | ||
295 | /* pased in through bind conn using transport_fd */ | 295 | /* passed in through bind conn using transport_fd */ |
296 | ISCSI_PARAM_CONN_PORT, | 296 | ISCSI_PARAM_CONN_PORT, |
297 | ISCSI_PARAM_CONN_ADDRESS, | 297 | ISCSI_PARAM_CONN_ADDRESS, |
298 | 298 | ||
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 24193c1b0da0..a3cbda4ddb5c 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -260,7 +260,7 @@ struct fcoe_dev_stats { | |||
260 | /** | 260 | /** |
261 | * struct fc_seq_els_data - ELS data used for passing ELS specific responses | 261 | * struct fc_seq_els_data - ELS data used for passing ELS specific responses |
262 | * @reason: The reason for rejection | 262 | * @reason: The reason for rejection |
263 | * @explan: The explaination of the rejection | 263 | * @explan: The explanation of the rejection |
264 | * | 264 | * |
265 | * Mainly used by the exchange manager layer. | 265 | * Mainly used by the exchange manager layer. |
266 | */ | 266 | */ |
@@ -525,7 +525,7 @@ struct libfc_function_template { | |||
525 | struct fc_frame *); | 525 | struct fc_frame *); |
526 | 526 | ||
527 | /* | 527 | /* |
528 | * Send an ELS response using infomation from the received frame. | 528 | * Send an ELS response using information from the received frame. |
529 | * | 529 | * |
530 | * STATUS: OPTIONAL | 530 | * STATUS: OPTIONAL |
531 | */ | 531 | */ |
@@ -663,7 +663,7 @@ struct libfc_function_template { | |||
663 | int (*rport_logoff)(struct fc_rport_priv *); | 663 | int (*rport_logoff)(struct fc_rport_priv *); |
664 | 664 | ||
665 | /* | 665 | /* |
666 | * Recieve a request from a remote port. | 666 | * Receive a request from a remote port. |
667 | * | 667 | * |
668 | * STATUS: OPTIONAL | 668 | * STATUS: OPTIONAL |
669 | */ | 669 | */ |
@@ -704,7 +704,7 @@ struct libfc_function_template { | |||
704 | void *)); | 704 | void *)); |
705 | 705 | ||
706 | /* | 706 | /* |
707 | * Cleanup the FCP layer, used durring link down and reset | 707 | * Cleanup the FCP layer, used during link down and reset |
708 | * | 708 | * |
709 | * STATUS: OPTIONAL | 709 | * STATUS: OPTIONAL |
710 | */ | 710 | */ |
diff --git a/include/scsi/libiscsi_tcp.h b/include/scsi/libiscsi_tcp.h index e6b9fd2eea34..ac0cc1d925ef 100644 --- a/include/scsi/libiscsi_tcp.h +++ b/include/scsi/libiscsi_tcp.h | |||
@@ -52,7 +52,7 @@ struct iscsi_segment { | |||
52 | iscsi_segment_done_fn_t *done; | 52 | iscsi_segment_done_fn_t *done; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | /* Socket connection recieve helper */ | 55 | /* Socket connection receive helper */ |
56 | struct iscsi_tcp_recv { | 56 | struct iscsi_tcp_recv { |
57 | struct iscsi_hdr *hdr; | 57 | struct iscsi_hdr *hdr; |
58 | struct iscsi_segment segment; | 58 | struct iscsi_segment segment; |
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index 53a9e886612b..0a5079974fe9 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
@@ -265,7 +265,7 @@ int osd_execute_request_async(struct osd_request *or, | |||
265 | * @osi - Recievs a more detailed error report information (optional). | 265 | * @osi - Recievs a more detailed error report information (optional). |
266 | * @silent - Do not print to dmsg (Even if enabled) | 266 | * @silent - Do not print to dmsg (Even if enabled) |
267 | * @bad_obj_list - Some commands act on multiple objects. Failed objects will | 267 | * @bad_obj_list - Some commands act on multiple objects. Failed objects will |
268 | * be recieved here (optional) | 268 | * be received here (optional) |
269 | * @max_obj - Size of @bad_obj_list. | 269 | * @max_obj - Size of @bad_obj_list. |
270 | * @bad_attr_list - List of failing attributes (optional) | 270 | * @bad_attr_list - List of failing attributes (optional) |
271 | * @max_attr - Size of @bad_attr_list. | 271 | * @max_attr - Size of @bad_attr_list. |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 2d3ec5094685..dd82e02ddde3 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -169,6 +169,7 @@ struct scsi_device { | |||
169 | sdev_dev; | 169 | sdev_dev; |
170 | 170 | ||
171 | struct execute_work ew; /* used to get process context on put */ | 171 | struct execute_work ew; /* used to get process context on put */ |
172 | struct work_struct requeue_work; | ||
172 | 173 | ||
173 | struct scsi_dh_data *scsi_dh_data; | 174 | struct scsi_dh_data *scsi_dh_data; |
174 | enum scsi_device_state sdev_state; | 175 | enum scsi_device_state sdev_state; |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index e7e385842a38..f1f2644137b8 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -46,7 +46,7 @@ struct blk_queue_tags; | |||
46 | enum { | 46 | enum { |
47 | SCSI_QDEPTH_DEFAULT, /* default requested change, e.g. from sysfs */ | 47 | SCSI_QDEPTH_DEFAULT, /* default requested change, e.g. from sysfs */ |
48 | SCSI_QDEPTH_QFULL, /* scsi-ml requested due to queue full */ | 48 | SCSI_QDEPTH_QFULL, /* scsi-ml requested due to queue full */ |
49 | SCSI_QDEPTH_RAMP_UP, /* scsi-ml requested due to threshhold event */ | 49 | SCSI_QDEPTH_RAMP_UP, /* scsi-ml requested due to threshold event */ |
50 | }; | 50 | }; |
51 | 51 | ||
52 | struct scsi_host_template { | 52 | struct scsi_host_template { |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 59816fe31e68..2a65167a8f10 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -192,9 +192,9 @@ struct fc_vport_identifiers { | |||
192 | * | 192 | * |
193 | * This structure exists for each FC port is a virtual FC port. Virtual | 193 | * This structure exists for each FC port is a virtual FC port. Virtual |
194 | * ports share the physical link with the Physical port. Each virtual | 194 | * ports share the physical link with the Physical port. Each virtual |
195 | * ports has a unique presense on the SAN, and may be instantiated via | 195 | * ports has a unique presence on the SAN, and may be instantiated via |
196 | * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a | 196 | * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a |
197 | * unique presense, each vport has it's own view of the fabric, | 197 | * unique presence, each vport has it's own view of the fabric, |
198 | * authentication privilege, and priorities. | 198 | * authentication privilege, and priorities. |
199 | * | 199 | * |
200 | * A virtual port may support 1 or more FC4 roles. Typically it is a | 200 | * A virtual port may support 1 or more FC4 roles. Typically it is a |
@@ -370,7 +370,7 @@ struct fc_rport { /* aka fc_starget_attrs */ | |||
370 | /* | 370 | /* |
371 | * FC SCSI Target Attributes | 371 | * FC SCSI Target Attributes |
372 | * | 372 | * |
373 | * The SCSI Target is considered an extention of a remote port (as | 373 | * The SCSI Target is considered an extension of a remote port (as |
374 | * a remote port can be more than a SCSI Target). Within the scsi | 374 | * a remote port can be more than a SCSI Target). Within the scsi |
375 | * subsystem, we leave the Target as a separate entity. Doing so | 375 | * subsystem, we leave the Target as a separate entity. Doing so |
376 | * provides backward compatibility with prior FC transport api's, | 376 | * provides backward compatibility with prior FC transport api's, |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index f1dcefe4532b..02cbb50225bb 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -385,7 +385,7 @@ | |||
385 | #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ | 385 | #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ |
386 | #define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ | 386 | #define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ |
387 | #define AC97_SCAP_EAPD_LED (1<<10) /* EAPD as mute LED */ | 387 | #define AC97_SCAP_EAPD_LED (1<<10) /* EAPD as mute LED */ |
388 | #define AC97_SCAP_POWER_SAVE (1<<11) /* capable for aggresive power-saving */ | 388 | #define AC97_SCAP_POWER_SAVE (1<<11) /* capable for aggressive power-saving */ |
389 | 389 | ||
390 | /* ac97->flags */ | 390 | /* ac97->flags */ |
391 | #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ | 391 | #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ |
diff --git a/include/sound/control.h b/include/sound/control.h index e67db2869360..404acb859cee 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -191,7 +191,7 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave, | |||
191 | * Returns zero if successful or a negative error code. | 191 | * Returns zero if successful or a negative error code. |
192 | * | 192 | * |
193 | * All slaves must be the same type (returning the same information | 193 | * All slaves must be the same type (returning the same information |
194 | * via info callback). The fucntion doesn't check it, so it's your | 194 | * via info callback). The function doesn't check it, so it's your |
195 | * responsibility. | 195 | * responsibility. |
196 | * | 196 | * |
197 | * Also, some additional limitations: | 197 | * Also, some additional limitations: |
diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h index 49b03c9e5e55..8008c59288a6 100644 --- a/include/sound/cs46xx_dsp_spos.h +++ b/include/sound/cs46xx_dsp_spos.h | |||
@@ -147,7 +147,7 @@ struct dsp_pcm_channel_descriptor { | |||
147 | }; | 147 | }; |
148 | 148 | ||
149 | struct dsp_spos_instance { | 149 | struct dsp_spos_instance { |
150 | struct dsp_symbol_desc symbol_table; /* currently availble loaded symbols in SP */ | 150 | struct dsp_symbol_desc symbol_table; /* currently available loaded symbols in SP */ |
151 | 151 | ||
152 | int nmodules; | 152 | int nmodules; |
153 | struct dsp_module_desc * modules; /* modules loaded into SP */ | 153 | struct dsp_module_desc * modules; /* modules loaded into SP */ |
diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h index 1774ff5ff632..1f59ea2a4a76 100644 --- a/include/sound/hdspm.h +++ b/include/sound/hdspm.h | |||
@@ -193,7 +193,7 @@ struct hdspm_version { | |||
193 | * 32768 Bytes | 193 | * 32768 Bytes |
194 | */ | 194 | */ |
195 | 195 | ||
196 | /* organisation is 64 channelfader in a continous memory block */ | 196 | /* organisation is 64 channelfader in a continuous memory block */ |
197 | /* equivalent to hardware definition, maybe for future feature of mmap of | 197 | /* equivalent to hardware definition, maybe for future feature of mmap of |
198 | * them | 198 | * them |
199 | */ | 199 | */ |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 430a9cc045e2..e1bad1130616 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -1031,9 +1031,7 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s | |||
1031 | #define snd_pcm_lib_mmap_iomem NULL | 1031 | #define snd_pcm_lib_mmap_iomem NULL |
1032 | #endif | 1032 | #endif |
1033 | 1033 | ||
1034 | int snd_pcm_lib_mmap_noncached(struct snd_pcm_substream *substream, | 1034 | #define snd_pcm_lib_mmap_vmalloc NULL |
1035 | struct vm_area_struct *area); | ||
1036 | #define snd_pcm_lib_mmap_vmalloc snd_pcm_lib_mmap_noncached | ||
1037 | 1035 | ||
1038 | static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) | 1036 | static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) |
1039 | { | 1037 | { |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 979ed84e07d6..f72c1039a6fb 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -23,7 +23,7 @@ | |||
23 | /* | 23 | /* |
24 | * SoC dynamic audio power management | 24 | * SoC dynamic audio power management |
25 | * | 25 | * |
26 | * We can have upto 4 power domains | 26 | * We can have up to 4 power domains |
27 | * 1. Codec domain - VREF, VMID | 27 | * 1. Codec domain - VREF, VMID |
28 | * Usually controlled at codec probe/remove, although can be set | 28 | * Usually controlled at codec probe/remove, although can be set |
29 | * at stream time if power is not needed for sidetone, etc. | 29 | * at stream time if power is not needed for sidetone, etc. |
@@ -45,25 +45,25 @@ | |||
45 | /* platform domain */ | 45 | /* platform domain */ |
46 | #define SND_SOC_DAPM_INPUT(wname) \ | 46 | #define SND_SOC_DAPM_INPUT(wname) \ |
47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ | 47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ |
48 | .num_kcontrols = 0} | 48 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
49 | #define SND_SOC_DAPM_OUTPUT(wname) \ | 49 | #define SND_SOC_DAPM_OUTPUT(wname) \ |
50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ | 50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ |
51 | .num_kcontrols = 0} | 51 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ | 52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ |
53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ | 53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ |
54 | .num_kcontrols = 0, .event = wevent, \ | 54 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | 55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} |
56 | #define SND_SOC_DAPM_HP(wname, wevent) \ | 56 | #define SND_SOC_DAPM_HP(wname, wevent) \ |
57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ | 57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ |
58 | .num_kcontrols = 0, .event = wevent, \ | 58 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ | 60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ |
61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ | 61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ |
62 | .num_kcontrols = 0, .event = wevent, \ | 62 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ | 64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ |
65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ | 65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ |
66 | .num_kcontrols = 0, .event = wevent, \ | 66 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
68 | 68 | ||
69 | /* path domain */ | 69 | /* path domain */ |
@@ -189,11 +189,11 @@ | |||
189 | /* events that are pre and post DAPM */ | 189 | /* events that are pre and post DAPM */ |
190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ | 190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ |
191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ | 191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ |
192 | .num_kcontrols = 0, .event = wevent, \ | 192 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} | 193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} |
194 | #define SND_SOC_DAPM_POST(wname, wevent) \ | 194 | #define SND_SOC_DAPM_POST(wname, wevent) \ |
195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ | 195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ |
196 | .num_kcontrols = 0, .event = wevent, \ | 196 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} | 197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} |
198 | 198 | ||
199 | /* stream domain */ | 199 | /* stream domain */ |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index c15ed5026fb5..1d3b5b2f0dbc 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * Note that both include/scsi/scsi_cmnd.h:MAX_COMMAND_SIZE and | 22 | * Note that both include/scsi/scsi_cmnd.h:MAX_COMMAND_SIZE and |
23 | * include/linux/blkdev.h:BLOCK_MAX_CDB as of v2.6.36-rc4 still use | 23 | * include/linux/blkdev.h:BLOCK_MAX_CDB as of v2.6.36-rc4 still use |
24 | * 16-byte CDBs by default and require an extra allocation for | 24 | * 16-byte CDBs by default and require an extra allocation for |
25 | * 32-byte CDBs to becasue of legacy issues. | 25 | * 32-byte CDBs to because of legacy issues. |
26 | * | 26 | * |
27 | * Within TCM Core there are no such legacy limitiations, so we go ahead | 27 | * Within TCM Core there are no such legacy limitiations, so we go ahead |
28 | * use 32-byte CDBs by default and use include/scsi/scsi.h:scsi_command_size() | 28 | * use 32-byte CDBs by default and use include/scsi/scsi.h:scsi_command_size() |
@@ -302,7 +302,7 @@ struct t10_wwn { | |||
302 | 302 | ||
303 | 303 | ||
304 | /* | 304 | /* |
305 | * Used by TCM Core internally to signal if >= SPC-3 peristent reservations | 305 | * Used by TCM Core internally to signal if >= SPC-3 persistent reservations |
306 | * emulation is enabled or disabled, or running in with TCM/pSCSI passthrough | 306 | * emulation is enabled or disabled, or running in with TCM/pSCSI passthrough |
307 | * mode | 307 | * mode |
308 | */ | 308 | */ |
@@ -934,7 +934,7 @@ struct se_portal_group { | |||
934 | struct list_head acl_node_list; | 934 | struct list_head acl_node_list; |
935 | struct se_lun *tpg_lun_list; | 935 | struct se_lun *tpg_lun_list; |
936 | struct se_lun tpg_virt_lun0; | 936 | struct se_lun tpg_virt_lun0; |
937 | /* List of TCM sessions assoicated wth this TPG */ | 937 | /* List of TCM sessions associated wth this TPG */ |
938 | struct list_head tpg_sess_list; | 938 | struct list_head tpg_sess_list; |
939 | /* Pointer to $FABRIC_MOD dependent code */ | 939 | /* Pointer to $FABRIC_MOD dependent code */ |
940 | struct target_core_fabric_ops *se_tpg_tfo; | 940 | struct target_core_fabric_ops *se_tpg_tfo; |
diff --git a/include/target/target_core_fabric_ops.h b/include/target/target_core_fabric_ops.h index 5eb8b1ae59d1..dc78f77f9450 100644 --- a/include/target/target_core_fabric_ops.h +++ b/include/target/target_core_fabric_ops.h | |||
@@ -35,7 +35,7 @@ struct target_core_fabric_ops { | |||
35 | /* | 35 | /* |
36 | * Optional function pointer for TCM to perform command map | 36 | * Optional function pointer for TCM to perform command map |
37 | * from TCM processing thread context, for those struct se_cmd | 37 | * from TCM processing thread context, for those struct se_cmd |
38 | * initally allocated in interrupt context. | 38 | * initially allocated in interrupt context. |
39 | */ | 39 | */ |
40 | int (*new_cmd_map)(struct se_cmd *); | 40 | int (*new_cmd_map)(struct se_cmd *); |
41 | /* | 41 | /* |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 78f18adb49c8..bf366547da25 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -401,9 +401,9 @@ TRACE_EVENT(block_plug, | |||
401 | 401 | ||
402 | DECLARE_EVENT_CLASS(block_unplug, | 402 | DECLARE_EVENT_CLASS(block_unplug, |
403 | 403 | ||
404 | TP_PROTO(struct request_queue *q), | 404 | TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), |
405 | 405 | ||
406 | TP_ARGS(q), | 406 | TP_ARGS(q, depth, explicit), |
407 | 407 | ||
408 | TP_STRUCT__entry( | 408 | TP_STRUCT__entry( |
409 | __field( int, nr_rq ) | 409 | __field( int, nr_rq ) |
@@ -411,7 +411,7 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
411 | ), | 411 | ), |
412 | 412 | ||
413 | TP_fast_assign( | 413 | TP_fast_assign( |
414 | __entry->nr_rq = q->rq.count[READ] + q->rq.count[WRITE]; | 414 | __entry->nr_rq = depth; |
415 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | 415 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); |
416 | ), | 416 | ), |
417 | 417 | ||
@@ -419,31 +419,19 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
419 | ); | 419 | ); |
420 | 420 | ||
421 | /** | 421 | /** |
422 | * block_unplug_timer - timed release of operations requests in queue to device driver | 422 | * block_unplug - release of operations requests in request queue |
423 | * @q: request queue to unplug | ||
424 | * | ||
425 | * Unplug the request queue @q because a timer expired and allow block | ||
426 | * operation requests to be sent to the device driver. | ||
427 | */ | ||
428 | DEFINE_EVENT(block_unplug, block_unplug_timer, | ||
429 | |||
430 | TP_PROTO(struct request_queue *q), | ||
431 | |||
432 | TP_ARGS(q) | ||
433 | ); | ||
434 | |||
435 | /** | ||
436 | * block_unplug_io - release of operations requests in request queue | ||
437 | * @q: request queue to unplug | 423 | * @q: request queue to unplug |
424 | * @depth: number of requests just added to the queue | ||
425 | * @explicit: whether this was an explicit unplug, or one from schedule() | ||
438 | * | 426 | * |
439 | * Unplug request queue @q because device driver is scheduled to work | 427 | * Unplug request queue @q because device driver is scheduled to work |
440 | * on elements in the request queue. | 428 | * on elements in the request queue. |
441 | */ | 429 | */ |
442 | DEFINE_EVENT(block_unplug, block_unplug_io, | 430 | DEFINE_EVENT(block_unplug, block_unplug, |
443 | 431 | ||
444 | TP_PROTO(struct request_queue *q), | 432 | TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), |
445 | 433 | ||
446 | TP_ARGS(q) | 434 | TP_ARGS(q, depth, explicit) |
447 | ); | 435 | ); |
448 | 436 | ||
449 | /** | 437 | /** |
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h new file mode 100644 index 000000000000..f445cff66ab7 --- /dev/null +++ b/include/trace/events/btrfs.h | |||
@@ -0,0 +1,667 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM btrfs | ||
3 | |||
4 | #if !defined(_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_BTRFS_H | ||
6 | |||
7 | #include <linux/writeback.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | |||
10 | struct btrfs_root; | ||
11 | struct btrfs_fs_info; | ||
12 | struct btrfs_inode; | ||
13 | struct extent_map; | ||
14 | struct btrfs_ordered_extent; | ||
15 | struct btrfs_delayed_ref_node; | ||
16 | struct btrfs_delayed_tree_ref; | ||
17 | struct btrfs_delayed_data_ref; | ||
18 | struct btrfs_delayed_ref_head; | ||
19 | struct map_lookup; | ||
20 | struct extent_buffer; | ||
21 | |||
22 | #define show_ref_type(type) \ | ||
23 | __print_symbolic(type, \ | ||
24 | { BTRFS_TREE_BLOCK_REF_KEY, "TREE_BLOCK_REF" }, \ | ||
25 | { BTRFS_EXTENT_DATA_REF_KEY, "EXTENT_DATA_REF" }, \ | ||
26 | { BTRFS_EXTENT_REF_V0_KEY, "EXTENT_REF_V0" }, \ | ||
27 | { BTRFS_SHARED_BLOCK_REF_KEY, "SHARED_BLOCK_REF" }, \ | ||
28 | { BTRFS_SHARED_DATA_REF_KEY, "SHARED_DATA_REF" }) | ||
29 | |||
30 | #define __show_root_type(obj) \ | ||
31 | __print_symbolic(obj, \ | ||
32 | { BTRFS_ROOT_TREE_OBJECTID, "ROOT_TREE" }, \ | ||
33 | { BTRFS_EXTENT_TREE_OBJECTID, "EXTENT_TREE" }, \ | ||
34 | { BTRFS_CHUNK_TREE_OBJECTID, "CHUNK_TREE" }, \ | ||
35 | { BTRFS_DEV_TREE_OBJECTID, "DEV_TREE" }, \ | ||
36 | { BTRFS_FS_TREE_OBJECTID, "FS_TREE" }, \ | ||
37 | { BTRFS_ROOT_TREE_DIR_OBJECTID, "ROOT_TREE_DIR" }, \ | ||
38 | { BTRFS_CSUM_TREE_OBJECTID, "CSUM_TREE" }, \ | ||
39 | { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \ | ||
40 | { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \ | ||
41 | { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" }) | ||
42 | |||
43 | #define show_root_type(obj) \ | ||
44 | obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \ | ||
45 | (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-" | ||
46 | |||
47 | TRACE_EVENT(btrfs_transaction_commit, | ||
48 | |||
49 | TP_PROTO(struct btrfs_root *root), | ||
50 | |||
51 | TP_ARGS(root), | ||
52 | |||
53 | TP_STRUCT__entry( | ||
54 | __field( u64, generation ) | ||
55 | __field( u64, root_objectid ) | ||
56 | ), | ||
57 | |||
58 | TP_fast_assign( | ||
59 | __entry->generation = root->fs_info->generation; | ||
60 | __entry->root_objectid = root->root_key.objectid; | ||
61 | ), | ||
62 | |||
63 | TP_printk("root = %llu(%s), gen = %llu", | ||
64 | show_root_type(__entry->root_objectid), | ||
65 | (unsigned long long)__entry->generation) | ||
66 | ); | ||
67 | |||
68 | DECLARE_EVENT_CLASS(btrfs__inode, | ||
69 | |||
70 | TP_PROTO(struct inode *inode), | ||
71 | |||
72 | TP_ARGS(inode), | ||
73 | |||
74 | TP_STRUCT__entry( | ||
75 | __field( ino_t, ino ) | ||
76 | __field( blkcnt_t, blocks ) | ||
77 | __field( u64, disk_i_size ) | ||
78 | __field( u64, generation ) | ||
79 | __field( u64, last_trans ) | ||
80 | __field( u64, logged_trans ) | ||
81 | __field( u64, root_objectid ) | ||
82 | ), | ||
83 | |||
84 | TP_fast_assign( | ||
85 | __entry->ino = inode->i_ino; | ||
86 | __entry->blocks = inode->i_blocks; | ||
87 | __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; | ||
88 | __entry->generation = BTRFS_I(inode)->generation; | ||
89 | __entry->last_trans = BTRFS_I(inode)->last_trans; | ||
90 | __entry->logged_trans = BTRFS_I(inode)->logged_trans; | ||
91 | __entry->root_objectid = | ||
92 | BTRFS_I(inode)->root->root_key.objectid; | ||
93 | ), | ||
94 | |||
95 | TP_printk("root = %llu(%s), gen = %llu, ino = %lu, blocks = %llu, " | ||
96 | "disk_i_size = %llu, last_trans = %llu, logged_trans = %llu", | ||
97 | show_root_type(__entry->root_objectid), | ||
98 | (unsigned long long)__entry->generation, | ||
99 | (unsigned long)__entry->ino, | ||
100 | (unsigned long long)__entry->blocks, | ||
101 | (unsigned long long)__entry->disk_i_size, | ||
102 | (unsigned long long)__entry->last_trans, | ||
103 | (unsigned long long)__entry->logged_trans) | ||
104 | ); | ||
105 | |||
106 | DEFINE_EVENT(btrfs__inode, btrfs_inode_new, | ||
107 | |||
108 | TP_PROTO(struct inode *inode), | ||
109 | |||
110 | TP_ARGS(inode) | ||
111 | ); | ||
112 | |||
113 | DEFINE_EVENT(btrfs__inode, btrfs_inode_request, | ||
114 | |||
115 | TP_PROTO(struct inode *inode), | ||
116 | |||
117 | TP_ARGS(inode) | ||
118 | ); | ||
119 | |||
120 | DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, | ||
121 | |||
122 | TP_PROTO(struct inode *inode), | ||
123 | |||
124 | TP_ARGS(inode) | ||
125 | ); | ||
126 | |||
127 | #define __show_map_type(type) \ | ||
128 | __print_symbolic(type, \ | ||
129 | { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \ | ||
130 | { EXTENT_MAP_HOLE, "HOLE" }, \ | ||
131 | { EXTENT_MAP_INLINE, "INLINE" }, \ | ||
132 | { EXTENT_MAP_DELALLOC, "DELALLOC" }) | ||
133 | |||
134 | #define show_map_type(type) \ | ||
135 | type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type) | ||
136 | |||
137 | #define show_map_flags(flag) \ | ||
138 | __print_flags(flag, "|", \ | ||
139 | { EXTENT_FLAG_PINNED, "PINNED" }, \ | ||
140 | { EXTENT_FLAG_COMPRESSED, "COMPRESSED" }, \ | ||
141 | { EXTENT_FLAG_VACANCY, "VACANCY" }, \ | ||
142 | { EXTENT_FLAG_PREALLOC, "PREALLOC" }) | ||
143 | |||
144 | TRACE_EVENT(btrfs_get_extent, | ||
145 | |||
146 | TP_PROTO(struct btrfs_root *root, struct extent_map *map), | ||
147 | |||
148 | TP_ARGS(root, map), | ||
149 | |||
150 | TP_STRUCT__entry( | ||
151 | __field( u64, root_objectid ) | ||
152 | __field( u64, start ) | ||
153 | __field( u64, len ) | ||
154 | __field( u64, orig_start ) | ||
155 | __field( u64, block_start ) | ||
156 | __field( u64, block_len ) | ||
157 | __field( unsigned long, flags ) | ||
158 | __field( int, refs ) | ||
159 | __field( unsigned int, compress_type ) | ||
160 | ), | ||
161 | |||
162 | TP_fast_assign( | ||
163 | __entry->root_objectid = root->root_key.objectid; | ||
164 | __entry->start = map->start; | ||
165 | __entry->len = map->len; | ||
166 | __entry->orig_start = map->orig_start; | ||
167 | __entry->block_start = map->block_start; | ||
168 | __entry->block_len = map->block_len; | ||
169 | __entry->flags = map->flags; | ||
170 | __entry->refs = atomic_read(&map->refs); | ||
171 | __entry->compress_type = map->compress_type; | ||
172 | ), | ||
173 | |||
174 | TP_printk("root = %llu(%s), start = %llu, len = %llu, " | ||
175 | "orig_start = %llu, block_start = %llu(%s), " | ||
176 | "block_len = %llu, flags = %s, refs = %u, " | ||
177 | "compress_type = %u", | ||
178 | show_root_type(__entry->root_objectid), | ||
179 | (unsigned long long)__entry->start, | ||
180 | (unsigned long long)__entry->len, | ||
181 | (unsigned long long)__entry->orig_start, | ||
182 | show_map_type(__entry->block_start), | ||
183 | (unsigned long long)__entry->block_len, | ||
184 | show_map_flags(__entry->flags), | ||
185 | __entry->refs, __entry->compress_type) | ||
186 | ); | ||
187 | |||
188 | #define show_ordered_flags(flags) \ | ||
189 | __print_symbolic(flags, \ | ||
190 | { BTRFS_ORDERED_IO_DONE, "IO_DONE" }, \ | ||
191 | { BTRFS_ORDERED_COMPLETE, "COMPLETE" }, \ | ||
192 | { BTRFS_ORDERED_NOCOW, "NOCOW" }, \ | ||
193 | { BTRFS_ORDERED_COMPRESSED, "COMPRESSED" }, \ | ||
194 | { BTRFS_ORDERED_PREALLOC, "PREALLOC" }, \ | ||
195 | { BTRFS_ORDERED_DIRECT, "DIRECT" }) | ||
196 | |||
197 | DECLARE_EVENT_CLASS(btrfs__ordered_extent, | ||
198 | |||
199 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
200 | |||
201 | TP_ARGS(inode, ordered), | ||
202 | |||
203 | TP_STRUCT__entry( | ||
204 | __field( ino_t, ino ) | ||
205 | __field( u64, file_offset ) | ||
206 | __field( u64, start ) | ||
207 | __field( u64, len ) | ||
208 | __field( u64, disk_len ) | ||
209 | __field( u64, bytes_left ) | ||
210 | __field( unsigned long, flags ) | ||
211 | __field( int, compress_type ) | ||
212 | __field( int, refs ) | ||
213 | __field( u64, root_objectid ) | ||
214 | ), | ||
215 | |||
216 | TP_fast_assign( | ||
217 | __entry->ino = inode->i_ino; | ||
218 | __entry->file_offset = ordered->file_offset; | ||
219 | __entry->start = ordered->start; | ||
220 | __entry->len = ordered->len; | ||
221 | __entry->disk_len = ordered->disk_len; | ||
222 | __entry->bytes_left = ordered->bytes_left; | ||
223 | __entry->flags = ordered->flags; | ||
224 | __entry->compress_type = ordered->compress_type; | ||
225 | __entry->refs = atomic_read(&ordered->refs); | ||
226 | __entry->root_objectid = | ||
227 | BTRFS_I(inode)->root->root_key.objectid; | ||
228 | ), | ||
229 | |||
230 | TP_printk("root = %llu(%s), ino = %llu, file_offset = %llu, " | ||
231 | "start = %llu, len = %llu, disk_len = %llu, " | ||
232 | "bytes_left = %llu, flags = %s, compress_type = %d, " | ||
233 | "refs = %d", | ||
234 | show_root_type(__entry->root_objectid), | ||
235 | (unsigned long long)__entry->ino, | ||
236 | (unsigned long long)__entry->file_offset, | ||
237 | (unsigned long long)__entry->start, | ||
238 | (unsigned long long)__entry->len, | ||
239 | (unsigned long long)__entry->disk_len, | ||
240 | (unsigned long long)__entry->bytes_left, | ||
241 | show_ordered_flags(__entry->flags), | ||
242 | __entry->compress_type, __entry->refs) | ||
243 | ); | ||
244 | |||
245 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add, | ||
246 | |||
247 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
248 | |||
249 | TP_ARGS(inode, ordered) | ||
250 | ); | ||
251 | |||
252 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove, | ||
253 | |||
254 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
255 | |||
256 | TP_ARGS(inode, ordered) | ||
257 | ); | ||
258 | |||
259 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start, | ||
260 | |||
261 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
262 | |||
263 | TP_ARGS(inode, ordered) | ||
264 | ); | ||
265 | |||
266 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_put, | ||
267 | |||
268 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
269 | |||
270 | TP_ARGS(inode, ordered) | ||
271 | ); | ||
272 | |||
273 | DECLARE_EVENT_CLASS(btrfs__writepage, | ||
274 | |||
275 | TP_PROTO(struct page *page, struct inode *inode, | ||
276 | struct writeback_control *wbc), | ||
277 | |||
278 | TP_ARGS(page, inode, wbc), | ||
279 | |||
280 | TP_STRUCT__entry( | ||
281 | __field( ino_t, ino ) | ||
282 | __field( pgoff_t, index ) | ||
283 | __field( long, nr_to_write ) | ||
284 | __field( long, pages_skipped ) | ||
285 | __field( loff_t, range_start ) | ||
286 | __field( loff_t, range_end ) | ||
287 | __field( char, nonblocking ) | ||
288 | __field( char, for_kupdate ) | ||
289 | __field( char, for_reclaim ) | ||
290 | __field( char, range_cyclic ) | ||
291 | __field( pgoff_t, writeback_index ) | ||
292 | __field( u64, root_objectid ) | ||
293 | ), | ||
294 | |||
295 | TP_fast_assign( | ||
296 | __entry->ino = inode->i_ino; | ||
297 | __entry->index = page->index; | ||
298 | __entry->nr_to_write = wbc->nr_to_write; | ||
299 | __entry->pages_skipped = wbc->pages_skipped; | ||
300 | __entry->range_start = wbc->range_start; | ||
301 | __entry->range_end = wbc->range_end; | ||
302 | __entry->nonblocking = wbc->nonblocking; | ||
303 | __entry->for_kupdate = wbc->for_kupdate; | ||
304 | __entry->for_reclaim = wbc->for_reclaim; | ||
305 | __entry->range_cyclic = wbc->range_cyclic; | ||
306 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
307 | __entry->root_objectid = | ||
308 | BTRFS_I(inode)->root->root_key.objectid; | ||
309 | ), | ||
310 | |||
311 | TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, " | ||
312 | "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, " | ||
313 | "range_end = %llu, nonblocking = %d, for_kupdate = %d, " | ||
314 | "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu", | ||
315 | show_root_type(__entry->root_objectid), | ||
316 | (unsigned long)__entry->ino, __entry->index, | ||
317 | __entry->nr_to_write, __entry->pages_skipped, | ||
318 | __entry->range_start, __entry->range_end, | ||
319 | __entry->nonblocking, __entry->for_kupdate, | ||
320 | __entry->for_reclaim, __entry->range_cyclic, | ||
321 | (unsigned long)__entry->writeback_index) | ||
322 | ); | ||
323 | |||
324 | DEFINE_EVENT(btrfs__writepage, __extent_writepage, | ||
325 | |||
326 | TP_PROTO(struct page *page, struct inode *inode, | ||
327 | struct writeback_control *wbc), | ||
328 | |||
329 | TP_ARGS(page, inode, wbc) | ||
330 | ); | ||
331 | |||
332 | TRACE_EVENT(btrfs_writepage_end_io_hook, | ||
333 | |||
334 | TP_PROTO(struct page *page, u64 start, u64 end, int uptodate), | ||
335 | |||
336 | TP_ARGS(page, start, end, uptodate), | ||
337 | |||
338 | TP_STRUCT__entry( | ||
339 | __field( ino_t, ino ) | ||
340 | __field( pgoff_t, index ) | ||
341 | __field( u64, start ) | ||
342 | __field( u64, end ) | ||
343 | __field( int, uptodate ) | ||
344 | __field( u64, root_objectid ) | ||
345 | ), | ||
346 | |||
347 | TP_fast_assign( | ||
348 | __entry->ino = page->mapping->host->i_ino; | ||
349 | __entry->index = page->index; | ||
350 | __entry->start = start; | ||
351 | __entry->end = end; | ||
352 | __entry->uptodate = uptodate; | ||
353 | __entry->root_objectid = | ||
354 | BTRFS_I(page->mapping->host)->root->root_key.objectid; | ||
355 | ), | ||
356 | |||
357 | TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, start = %llu, " | ||
358 | "end = %llu, uptodate = %d", | ||
359 | show_root_type(__entry->root_objectid), | ||
360 | (unsigned long)__entry->ino, (unsigned long)__entry->index, | ||
361 | (unsigned long long)__entry->start, | ||
362 | (unsigned long long)__entry->end, __entry->uptodate) | ||
363 | ); | ||
364 | |||
365 | TRACE_EVENT(btrfs_sync_file, | ||
366 | |||
367 | TP_PROTO(struct file *file, int datasync), | ||
368 | |||
369 | TP_ARGS(file, datasync), | ||
370 | |||
371 | TP_STRUCT__entry( | ||
372 | __field( ino_t, ino ) | ||
373 | __field( ino_t, parent ) | ||
374 | __field( int, datasync ) | ||
375 | __field( u64, root_objectid ) | ||
376 | ), | ||
377 | |||
378 | TP_fast_assign( | ||
379 | struct dentry *dentry = file->f_path.dentry; | ||
380 | struct inode *inode = dentry->d_inode; | ||
381 | |||
382 | __entry->ino = inode->i_ino; | ||
383 | __entry->parent = dentry->d_parent->d_inode->i_ino; | ||
384 | __entry->datasync = datasync; | ||
385 | __entry->root_objectid = | ||
386 | BTRFS_I(inode)->root->root_key.objectid; | ||
387 | ), | ||
388 | |||
389 | TP_printk("root = %llu(%s), ino = %ld, parent = %ld, datasync = %d", | ||
390 | show_root_type(__entry->root_objectid), | ||
391 | (unsigned long)__entry->ino, (unsigned long)__entry->parent, | ||
392 | __entry->datasync) | ||
393 | ); | ||
394 | |||
395 | TRACE_EVENT(btrfs_sync_fs, | ||
396 | |||
397 | TP_PROTO(int wait), | ||
398 | |||
399 | TP_ARGS(wait), | ||
400 | |||
401 | TP_STRUCT__entry( | ||
402 | __field( int, wait ) | ||
403 | ), | ||
404 | |||
405 | TP_fast_assign( | ||
406 | __entry->wait = wait; | ||
407 | ), | ||
408 | |||
409 | TP_printk("wait = %d", __entry->wait) | ||
410 | ); | ||
411 | |||
412 | #define show_ref_action(action) \ | ||
413 | __print_symbolic(action, \ | ||
414 | { BTRFS_ADD_DELAYED_REF, "ADD_DELAYED_REF" }, \ | ||
415 | { BTRFS_DROP_DELAYED_REF, "DROP_DELAYED_REF" }, \ | ||
416 | { BTRFS_ADD_DELAYED_EXTENT, "ADD_DELAYED_EXTENT" }, \ | ||
417 | { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" }) | ||
418 | |||
419 | |||
420 | TRACE_EVENT(btrfs_delayed_tree_ref, | ||
421 | |||
422 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
423 | struct btrfs_delayed_tree_ref *full_ref, | ||
424 | int action), | ||
425 | |||
426 | TP_ARGS(ref, full_ref, action), | ||
427 | |||
428 | TP_STRUCT__entry( | ||
429 | __field( u64, bytenr ) | ||
430 | __field( u64, num_bytes ) | ||
431 | __field( int, action ) | ||
432 | __field( u64, parent ) | ||
433 | __field( u64, ref_root ) | ||
434 | __field( int, level ) | ||
435 | __field( int, type ) | ||
436 | ), | ||
437 | |||
438 | TP_fast_assign( | ||
439 | __entry->bytenr = ref->bytenr; | ||
440 | __entry->num_bytes = ref->num_bytes; | ||
441 | __entry->action = action; | ||
442 | __entry->parent = full_ref->parent; | ||
443 | __entry->ref_root = full_ref->root; | ||
444 | __entry->level = full_ref->level; | ||
445 | __entry->type = ref->type; | ||
446 | ), | ||
447 | |||
448 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " | ||
449 | "parent = %llu(%s), ref_root = %llu(%s), level = %d, " | ||
450 | "type = %s", | ||
451 | (unsigned long long)__entry->bytenr, | ||
452 | (unsigned long long)__entry->num_bytes, | ||
453 | show_ref_action(__entry->action), | ||
454 | show_root_type(__entry->parent), | ||
455 | show_root_type(__entry->ref_root), | ||
456 | __entry->level, show_ref_type(__entry->type)) | ||
457 | ); | ||
458 | |||
459 | TRACE_EVENT(btrfs_delayed_data_ref, | ||
460 | |||
461 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
462 | struct btrfs_delayed_data_ref *full_ref, | ||
463 | int action), | ||
464 | |||
465 | TP_ARGS(ref, full_ref, action), | ||
466 | |||
467 | TP_STRUCT__entry( | ||
468 | __field( u64, bytenr ) | ||
469 | __field( u64, num_bytes ) | ||
470 | __field( int, action ) | ||
471 | __field( u64, parent ) | ||
472 | __field( u64, ref_root ) | ||
473 | __field( u64, owner ) | ||
474 | __field( u64, offset ) | ||
475 | __field( int, type ) | ||
476 | ), | ||
477 | |||
478 | TP_fast_assign( | ||
479 | __entry->bytenr = ref->bytenr; | ||
480 | __entry->num_bytes = ref->num_bytes; | ||
481 | __entry->action = action; | ||
482 | __entry->parent = full_ref->parent; | ||
483 | __entry->ref_root = full_ref->root; | ||
484 | __entry->owner = full_ref->objectid; | ||
485 | __entry->offset = full_ref->offset; | ||
486 | __entry->type = ref->type; | ||
487 | ), | ||
488 | |||
489 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " | ||
490 | "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, " | ||
491 | "offset = %llu, type = %s", | ||
492 | (unsigned long long)__entry->bytenr, | ||
493 | (unsigned long long)__entry->num_bytes, | ||
494 | show_ref_action(__entry->action), | ||
495 | show_root_type(__entry->parent), | ||
496 | show_root_type(__entry->ref_root), | ||
497 | (unsigned long long)__entry->owner, | ||
498 | (unsigned long long)__entry->offset, | ||
499 | show_ref_type(__entry->type)) | ||
500 | ); | ||
501 | |||
502 | TRACE_EVENT(btrfs_delayed_ref_head, | ||
503 | |||
504 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
505 | struct btrfs_delayed_ref_head *head_ref, | ||
506 | int action), | ||
507 | |||
508 | TP_ARGS(ref, head_ref, action), | ||
509 | |||
510 | TP_STRUCT__entry( | ||
511 | __field( u64, bytenr ) | ||
512 | __field( u64, num_bytes ) | ||
513 | __field( int, action ) | ||
514 | __field( int, is_data ) | ||
515 | ), | ||
516 | |||
517 | TP_fast_assign( | ||
518 | __entry->bytenr = ref->bytenr; | ||
519 | __entry->num_bytes = ref->num_bytes; | ||
520 | __entry->action = action; | ||
521 | __entry->is_data = head_ref->is_data; | ||
522 | ), | ||
523 | |||
524 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, is_data = %d", | ||
525 | (unsigned long long)__entry->bytenr, | ||
526 | (unsigned long long)__entry->num_bytes, | ||
527 | show_ref_action(__entry->action), | ||
528 | __entry->is_data) | ||
529 | ); | ||
530 | |||
531 | #define show_chunk_type(type) \ | ||
532 | __print_flags(type, "|", \ | ||
533 | { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \ | ||
534 | { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \ | ||
535 | { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \ | ||
536 | { BTRFS_BLOCK_GROUP_RAID0, "RAID0" }, \ | ||
537 | { BTRFS_BLOCK_GROUP_RAID1, "RAID1" }, \ | ||
538 | { BTRFS_BLOCK_GROUP_DUP, "DUP" }, \ | ||
539 | { BTRFS_BLOCK_GROUP_RAID10, "RAID10"}) | ||
540 | |||
541 | DECLARE_EVENT_CLASS(btrfs__chunk, | ||
542 | |||
543 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
544 | u64 offset, u64 size), | ||
545 | |||
546 | TP_ARGS(root, map, offset, size), | ||
547 | |||
548 | TP_STRUCT__entry( | ||
549 | __field( int, num_stripes ) | ||
550 | __field( u64, type ) | ||
551 | __field( int, sub_stripes ) | ||
552 | __field( u64, offset ) | ||
553 | __field( u64, size ) | ||
554 | __field( u64, root_objectid ) | ||
555 | ), | ||
556 | |||
557 | TP_fast_assign( | ||
558 | __entry->num_stripes = map->num_stripes; | ||
559 | __entry->type = map->type; | ||
560 | __entry->sub_stripes = map->sub_stripes; | ||
561 | __entry->offset = offset; | ||
562 | __entry->size = size; | ||
563 | __entry->root_objectid = root->root_key.objectid; | ||
564 | ), | ||
565 | |||
566 | TP_printk("root = %llu(%s), offset = %llu, size = %llu, " | ||
567 | "num_stripes = %d, sub_stripes = %d, type = %s", | ||
568 | show_root_type(__entry->root_objectid), | ||
569 | (unsigned long long)__entry->offset, | ||
570 | (unsigned long long)__entry->size, | ||
571 | __entry->num_stripes, __entry->sub_stripes, | ||
572 | show_chunk_type(__entry->type)) | ||
573 | ); | ||
574 | |||
575 | DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc, | ||
576 | |||
577 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
578 | u64 offset, u64 size), | ||
579 | |||
580 | TP_ARGS(root, map, offset, size) | ||
581 | ); | ||
582 | |||
583 | DEFINE_EVENT(btrfs__chunk, btrfs_chunk_free, | ||
584 | |||
585 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
586 | u64 offset, u64 size), | ||
587 | |||
588 | TP_ARGS(root, map, offset, size) | ||
589 | ); | ||
590 | |||
591 | TRACE_EVENT(btrfs_cow_block, | ||
592 | |||
593 | TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf, | ||
594 | struct extent_buffer *cow), | ||
595 | |||
596 | TP_ARGS(root, buf, cow), | ||
597 | |||
598 | TP_STRUCT__entry( | ||
599 | __field( u64, root_objectid ) | ||
600 | __field( u64, buf_start ) | ||
601 | __field( int, refs ) | ||
602 | __field( u64, cow_start ) | ||
603 | __field( int, buf_level ) | ||
604 | __field( int, cow_level ) | ||
605 | ), | ||
606 | |||
607 | TP_fast_assign( | ||
608 | __entry->root_objectid = root->root_key.objectid; | ||
609 | __entry->buf_start = buf->start; | ||
610 | __entry->refs = atomic_read(&buf->refs); | ||
611 | __entry->cow_start = cow->start; | ||
612 | __entry->buf_level = btrfs_header_level(buf); | ||
613 | __entry->cow_level = btrfs_header_level(cow); | ||
614 | ), | ||
615 | |||
616 | TP_printk("root = %llu(%s), refs = %d, orig_buf = %llu " | ||
617 | "(orig_level = %d), cow_buf = %llu (cow_level = %d)", | ||
618 | show_root_type(__entry->root_objectid), | ||
619 | __entry->refs, | ||
620 | (unsigned long long)__entry->buf_start, | ||
621 | __entry->buf_level, | ||
622 | (unsigned long long)__entry->cow_start, | ||
623 | __entry->cow_level) | ||
624 | ); | ||
625 | |||
626 | DECLARE_EVENT_CLASS(btrfs__reserved_extent, | ||
627 | |||
628 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
629 | |||
630 | TP_ARGS(root, start, len), | ||
631 | |||
632 | TP_STRUCT__entry( | ||
633 | __field( u64, root_objectid ) | ||
634 | __field( u64, start ) | ||
635 | __field( u64, len ) | ||
636 | ), | ||
637 | |||
638 | TP_fast_assign( | ||
639 | __entry->root_objectid = root->root_key.objectid; | ||
640 | __entry->start = start; | ||
641 | __entry->len = len; | ||
642 | ), | ||
643 | |||
644 | TP_printk("root = %llu(%s), start = %llu, len = %llu", | ||
645 | show_root_type(__entry->root_objectid), | ||
646 | (unsigned long long)__entry->start, | ||
647 | (unsigned long long)__entry->len) | ||
648 | ); | ||
649 | |||
650 | DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | ||
651 | |||
652 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
653 | |||
654 | TP_ARGS(root, start, len) | ||
655 | ); | ||
656 | |||
657 | DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_free, | ||
658 | |||
659 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
660 | |||
661 | TP_ARGS(root, start, len) | ||
662 | ); | ||
663 | |||
664 | #endif /* _TRACE_BTRFS_H */ | ||
665 | |||
666 | /* This part must be outside protection */ | ||
667 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/gfpflags.h b/include/trace/events/gfpflags.h index e3615c093741..9fe3a36646e9 100644 --- a/include/trace/events/gfpflags.h +++ b/include/trace/events/gfpflags.h | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #define show_gfp_flags(flags) \ | 11 | #define show_gfp_flags(flags) \ |
12 | (flags) ? __print_flags(flags, "|", \ | 12 | (flags) ? __print_flags(flags, "|", \ |
13 | {(unsigned long)GFP_TRANSHUGE, "GFP_TRANSHUGE"}, \ | ||
13 | {(unsigned long)GFP_HIGHUSER_MOVABLE, "GFP_HIGHUSER_MOVABLE"}, \ | 14 | {(unsigned long)GFP_HIGHUSER_MOVABLE, "GFP_HIGHUSER_MOVABLE"}, \ |
14 | {(unsigned long)GFP_HIGHUSER, "GFP_HIGHUSER"}, \ | 15 | {(unsigned long)GFP_HIGHUSER, "GFP_HIGHUSER"}, \ |
15 | {(unsigned long)GFP_USER, "GFP_USER"}, \ | 16 | {(unsigned long)GFP_USER, "GFP_USER"}, \ |
@@ -32,6 +33,9 @@ | |||
32 | {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ | 33 | {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ |
33 | {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ | 34 | {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ |
34 | {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ | 35 | {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ |
35 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"} \ | 36 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"}, \ |
37 | {(unsigned long)__GFP_NOTRACK, "GFP_NOTRACK"}, \ | ||
38 | {(unsigned long)__GFP_NO_KSWAPD, "GFP_NO_KSWAPD"}, \ | ||
39 | {(unsigned long)__GFP_OTHER_NODE, "GFP_OTHER_NODE"} \ | ||
36 | ) : "GFP_NOWAIT" | 40 | ) : "GFP_NOWAIT" |
37 | 41 | ||
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index 1c09820df585..ae045ca7d356 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
@@ -20,8 +20,7 @@ struct softirq_action; | |||
20 | softirq_name(BLOCK_IOPOLL), \ | 20 | softirq_name(BLOCK_IOPOLL), \ |
21 | softirq_name(TASKLET), \ | 21 | softirq_name(TASKLET), \ |
22 | softirq_name(SCHED), \ | 22 | softirq_name(SCHED), \ |
23 | softirq_name(HRTIMER), \ | 23 | softirq_name(HRTIMER)) |
24 | softirq_name(RCU)) | ||
25 | 24 | ||
26 | /** | 25 | /** |
27 | * irq_handler_entry - called immediately before the irq action handler | 26 | * irq_handler_entry - called immediately before the irq action handler |
diff --git a/include/video/kyro.h b/include/video/kyro.h index dba7de2ee4a8..c563968e926c 100644 --- a/include/video/kyro.h +++ b/include/video/kyro.h | |||
@@ -32,7 +32,7 @@ struct kyrofb_info { | |||
32 | u32 PIXCLK; /* Pixel Clock */ | 32 | u32 PIXCLK; /* Pixel Clock */ |
33 | u32 HCLK; /* Hor Clock */ | 33 | u32 HCLK; /* Hor Clock */ |
34 | 34 | ||
35 | /* Usefull to hold depth here for Linux */ | 35 | /* Useful to hold depth here for Linux */ |
36 | u8 PIXDEPTH; | 36 | u8 PIXDEPTH; |
37 | 37 | ||
38 | #ifdef CONFIG_MTRR | 38 | #ifdef CONFIG_MTRR |
diff --git a/include/video/neomagic.h b/include/video/neomagic.h index 08b663782956..bc5013e8059d 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h | |||
@@ -129,7 +129,7 @@ struct neofb_par { | |||
129 | unsigned char CRTC[25]; /* Crtc Controller */ | 129 | unsigned char CRTC[25]; /* Crtc Controller */ |
130 | unsigned char Sequencer[5]; /* Video Sequencer */ | 130 | unsigned char Sequencer[5]; /* Video Sequencer */ |
131 | unsigned char Graphics[9]; /* Video Graphics */ | 131 | unsigned char Graphics[9]; /* Video Graphics */ |
132 | unsigned char Attribute[21]; /* Video Atribute */ | 132 | unsigned char Attribute[21]; /* Video Attribute */ |
133 | 133 | ||
134 | unsigned char GeneralLockReg; | 134 | unsigned char GeneralLockReg; |
135 | unsigned char ExtCRTDispAddr; | 135 | unsigned char ExtCRTDispAddr; |
diff --git a/include/video/newport.h b/include/video/newport.h index 001b935e71c4..3d7c4b492ec6 100644 --- a/include/video/newport.h +++ b/include/video/newport.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) | 6 | * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) |
7 | * | 7 | * |
8 | * Ulf Carlsson - Compability with the IRIX structures added | 8 | * Ulf Carlsson - Compatibility with the IRIX structures added |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _SGI_NEWPORT_H | 11 | #ifndef _SGI_NEWPORT_H |
diff --git a/include/video/sisfb.h b/include/video/sisfb.h index fdd74f1a6791..6dc5df9e43f3 100644 --- a/include/video/sisfb.h +++ b/include/video/sisfb.h | |||
@@ -151,7 +151,7 @@ struct sisfb_cmd { | |||
151 | __u32 sisfb_result[4]; | 151 | __u32 sisfb_result[4]; |
152 | }; | 152 | }; |
153 | 153 | ||
154 | /* Addtional IOCTLs for communication sisfb <> X driver */ | 154 | /* Additional IOCTLs for communication sisfb <> X driver */ |
155 | /* If changing this, vgatypes.h must also be changed (for X driver) */ | 155 | /* If changing this, vgatypes.h must also be changed (for X driver) */ |
156 | 156 | ||
157 | /* ioctl for identifying and giving some info (esp. memory heap start) */ | 157 | /* ioctl for identifying and giving some info (esp. memory heap start) */ |
diff --git a/include/video/sstfb.h b/include/video/sstfb.h index b52f07381243..c449eace12cd 100644 --- a/include/video/sstfb.h +++ b/include/video/sstfb.h | |||
@@ -156,7 +156,7 @@ | |||
156 | #define DAC_READ FBIINIT2 /* in remap mode */ | 156 | #define DAC_READ FBIINIT2 /* in remap mode */ |
157 | #define FBIINIT3 0x021c /* fbi controls */ | 157 | #define FBIINIT3 0x021c /* fbi controls */ |
158 | # define DISABLE_TEXTURE BIT(6) | 158 | # define DISABLE_TEXTURE BIT(6) |
159 | # define Y_SWAP_ORIGIN_SHIFT 22 /* Y swap substraction value */ | 159 | # define Y_SWAP_ORIGIN_SHIFT 22 /* Y swap subtraction value */ |
160 | #define HSYNC 0x0220 | 160 | #define HSYNC 0x0220 |
161 | #define VSYNC 0x0224 | 161 | #define VSYNC 0x0224 |
162 | #define DAC_DATA 0x022c | 162 | #define DAC_DATA 0x022c |
@@ -212,9 +212,9 @@ | |||
212 | # define DACREG_CR0_24BPP 0x50 /* mode 5 */ | 212 | # define DACREG_CR0_24BPP 0x50 /* mode 5 */ |
213 | #define DACREG_CR1_I 0x05 | 213 | #define DACREG_CR1_I 0x05 |
214 | #define DACREG_CC_I 0x06 | 214 | #define DACREG_CC_I 0x06 |
215 | # define DACREG_CC_CLKA BIT(7) /* clk A controled by regs */ | 215 | # define DACREG_CC_CLKA BIT(7) /* clk A controlled by regs */ |
216 | # define DACREG_CC_CLKA_C (2<<4) /* clk A uses reg C */ | 216 | # define DACREG_CC_CLKA_C (2<<4) /* clk A uses reg C */ |
217 | # define DACREG_CC_CLKB BIT(3) /* clk B controled by regs */ | 217 | # define DACREG_CC_CLKB BIT(3) /* clk B controlled by regs */ |
218 | # define DACREG_CC_CLKB_D 3 /* clkB uses reg D */ | 218 | # define DACREG_CC_CLKB_D 3 /* clkB uses reg D */ |
219 | #define DACREG_AC0_I 0x48 /* clock A reg C */ | 219 | #define DACREG_AC0_I 0x48 /* clock A reg C */ |
220 | #define DACREG_AC1_I 0x49 | 220 | #define DACREG_AC1_I 0x49 |
diff --git a/include/xen/events.h b/include/xen/events.h index f1b87ad48ac7..9af21e19545a 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -85,7 +85,8 @@ int xen_bind_pirq_gsi_to_irq(unsigned gsi, | |||
85 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); | 85 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); |
86 | /* Bind an PSI pirq to an irq. */ | 86 | /* Bind an PSI pirq to an irq. */ |
87 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, | 87 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, |
88 | int pirq, int vector, const char *name); | 88 | int pirq, int vector, const char *name, |
89 | domid_t domid); | ||
89 | #endif | 90 | #endif |
90 | 91 | ||
91 | /* De-allocates the above mentioned physical interrupt. */ | 92 | /* De-allocates the above mentioned physical interrupt. */ |
@@ -94,4 +95,10 @@ int xen_destroy_irq(int irq); | |||
94 | /* Return irq from pirq */ | 95 | /* Return irq from pirq */ |
95 | int xen_irq_from_pirq(unsigned pirq); | 96 | int xen_irq_from_pirq(unsigned pirq); |
96 | 97 | ||
98 | /* Return the pirq allocated to the irq. */ | ||
99 | int xen_pirq_from_irq(unsigned irq); | ||
100 | |||
101 | /* Determine whether to ignore this IRQ if it is passed to a guest. */ | ||
102 | int xen_test_irq_shared(int irq); | ||
103 | |||
97 | #endif /* _XEN_EVENTS_H */ | 104 | #endif /* _XEN_EVENTS_H */ |
diff --git a/include/xen/interface/elfnote.h b/include/xen/interface/elfnote.h index 7a8262c375cc..0360b15f4883 100644 --- a/include/xen/interface/elfnote.h +++ b/include/xen/interface/elfnote.h | |||
@@ -51,7 +51,7 @@ | |||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * The offset of the ELF paddr field from the acutal required | 53 | * The offset of the ELF paddr field from the acutal required |
54 | * psuedo-physical address (numeric). | 54 | * pseudo-physical address (numeric). |
55 | * | 55 | * |
56 | * This is used to maintain backwards compatibility with older kernels | 56 | * This is used to maintain backwards compatibility with older kernels |
57 | * which wrote __PAGE_OFFSET into that field. This field defaults to 0 | 57 | * which wrote __PAGE_OFFSET into that field. This field defaults to 0 |