diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-10-17 03:58:25 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-10-17 03:58:25 -0400 |
| commit | bb3c3e807140816b5f5fd4840473ee52a916ad4f (patch) | |
| tree | 9e8a69d266a7df86ca16177eefffab4b4e910753 /include | |
| parent | 595c36490deb49381dc51231a3d5e6b66786ed27 (diff) | |
| parent | 012abeea669ea49636cf952d13298bb68654146a (diff) | |
Merge commit 'v2.6.32-rc5' into perf/probes
Conflicts:
kernel/trace/trace_event_profile.c
Merge reason: update to -rc5 and resolve conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
130 files changed, 1837 insertions, 844 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 1cef1398e358..3cd9ccdcbd8f 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -70,7 +70,6 @@ enum acpi_bus_device_type { | |||
| 70 | ACPI_BUS_TYPE_POWER, | 70 | ACPI_BUS_TYPE_POWER, |
| 71 | ACPI_BUS_TYPE_PROCESSOR, | 71 | ACPI_BUS_TYPE_PROCESSOR, |
| 72 | ACPI_BUS_TYPE_THERMAL, | 72 | ACPI_BUS_TYPE_THERMAL, |
| 73 | ACPI_BUS_TYPE_SYSTEM, | ||
| 74 | ACPI_BUS_TYPE_POWER_BUTTON, | 73 | ACPI_BUS_TYPE_POWER_BUTTON, |
| 75 | ACPI_BUS_TYPE_SLEEP_BUTTON, | 74 | ACPI_BUS_TYPE_SLEEP_BUTTON, |
| 76 | ACPI_BUS_DEVICE_TYPE_COUNT | 75 | ACPI_BUS_DEVICE_TYPE_COUNT |
| @@ -142,10 +141,7 @@ struct acpi_device_status { | |||
| 142 | 141 | ||
| 143 | struct acpi_device_flags { | 142 | struct acpi_device_flags { |
| 144 | u32 dynamic_status:1; | 143 | u32 dynamic_status:1; |
| 145 | u32 hardware_id:1; | ||
| 146 | u32 compatible_ids:1; | ||
| 147 | u32 bus_address:1; | 144 | u32 bus_address:1; |
| 148 | u32 unique_id:1; | ||
| 149 | u32 removable:1; | 145 | u32 removable:1; |
| 150 | u32 ejectable:1; | 146 | u32 ejectable:1; |
| 151 | u32 lockable:1; | 147 | u32 lockable:1; |
| @@ -154,7 +150,7 @@ struct acpi_device_flags { | |||
| 154 | u32 performance_manageable:1; | 150 | u32 performance_manageable:1; |
| 155 | u32 wake_capable:1; /* Wakeup(_PRW) supported? */ | 151 | u32 wake_capable:1; /* Wakeup(_PRW) supported? */ |
| 156 | u32 force_power_state:1; | 152 | u32 force_power_state:1; |
| 157 | u32 reserved:19; | 153 | u32 reserved:22; |
| 158 | }; | 154 | }; |
| 159 | 155 | ||
| 160 | /* File System */ | 156 | /* File System */ |
| @@ -172,20 +168,23 @@ typedef unsigned long acpi_bus_address; | |||
| 172 | typedef char acpi_device_name[40]; | 168 | typedef char acpi_device_name[40]; |
| 173 | typedef char acpi_device_class[20]; | 169 | typedef char acpi_device_class[20]; |
| 174 | 170 | ||
| 171 | struct acpi_hardware_id { | ||
| 172 | struct list_head list; | ||
| 173 | char *id; | ||
| 174 | }; | ||
| 175 | |||
| 175 | struct acpi_device_pnp { | 176 | struct acpi_device_pnp { |
| 176 | acpi_bus_id bus_id; /* Object name */ | 177 | acpi_bus_id bus_id; /* Object name */ |
| 177 | acpi_bus_address bus_address; /* _ADR */ | 178 | acpi_bus_address bus_address; /* _ADR */ |
| 178 | char *hardware_id; /* _HID */ | ||
| 179 | struct acpica_device_id_list *cid_list; /* _CIDs */ | ||
| 180 | char *unique_id; /* _UID */ | 179 | char *unique_id; /* _UID */ |
| 180 | struct list_head ids; /* _HID and _CIDs */ | ||
| 181 | acpi_device_name device_name; /* Driver-determined */ | 181 | acpi_device_name device_name; /* Driver-determined */ |
| 182 | acpi_device_class device_class; /* " */ | 182 | acpi_device_class device_class; /* " */ |
| 183 | }; | 183 | }; |
| 184 | 184 | ||
| 185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) | 185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) |
| 186 | #define acpi_device_adr(d) ((d)->pnp.bus_address) | 186 | #define acpi_device_adr(d) ((d)->pnp.bus_address) |
| 187 | #define acpi_device_hid(d) ((d)->pnp.hardware_id) | 187 | char *acpi_device_hid(struct acpi_device *device); |
| 188 | #define acpi_device_uid(d) ((d)->pnp.unique_id) | ||
| 189 | #define acpi_device_name(d) ((d)->pnp.device_name) | 188 | #define acpi_device_name(d) ((d)->pnp.device_name) |
| 190 | #define acpi_device_class(d) ((d)->pnp.device_class) | 189 | #define acpi_device_class(d) ((d)->pnp.device_class) |
| 191 | 190 | ||
| @@ -262,7 +261,8 @@ struct acpi_device_wakeup { | |||
| 262 | /* Device */ | 261 | /* Device */ |
| 263 | 262 | ||
| 264 | struct acpi_device { | 263 | struct acpi_device { |
| 265 | acpi_handle handle; | 264 | int device_type; |
| 265 | acpi_handle handle; /* no handle for fixed hardware */ | ||
| 266 | struct acpi_device *parent; | 266 | struct acpi_device *parent; |
| 267 | struct list_head children; | 267 | struct list_head children; |
| 268 | struct list_head node; | 268 | struct list_head node; |
| @@ -322,6 +322,8 @@ extern void unregister_acpi_bus_notifier(struct notifier_block *nb); | |||
| 322 | 322 | ||
| 323 | int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); | 323 | int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); |
| 324 | void acpi_bus_data_handler(acpi_handle handle, void *context); | 324 | void acpi_bus_data_handler(acpi_handle handle, void *context); |
| 325 | acpi_status acpi_bus_get_status_handle(acpi_handle handle, | ||
| 326 | unsigned long long *sta); | ||
| 325 | int acpi_bus_get_status(struct acpi_device *device); | 327 | int acpi_bus_get_status(struct acpi_device *device); |
| 326 | int acpi_bus_get_power(acpi_handle handle, int *state); | 328 | int acpi_bus_get_power(acpi_handle handle, int *state); |
| 327 | int acpi_bus_set_power(acpi_handle handle, int state); | 329 | int acpi_bus_set_power(acpi_handle handle, int state); |
diff --git a/include/acpi/button.h b/include/acpi/button.h new file mode 100644 index 000000000000..97eea0e4c016 --- /dev/null +++ b/include/acpi/button.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifndef ACPI_BUTTON_H | ||
| 2 | #define ACPI_BUTTON_H | ||
| 3 | |||
| 4 | #include <linux/notifier.h> | ||
| 5 | |||
| 6 | #if defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) | ||
| 7 | extern int acpi_lid_notifier_register(struct notifier_block *nb); | ||
| 8 | extern int acpi_lid_notifier_unregister(struct notifier_block *nb); | ||
| 9 | extern int acpi_lid_open(void); | ||
| 10 | #else | ||
| 11 | static inline int acpi_lid_notifier_register(struct notifier_block *nb) | ||
| 12 | { | ||
| 13 | return 0; | ||
| 14 | } | ||
| 15 | static inline int acpi_lid_notifier_unregister(struct notifier_block *nb) | ||
| 16 | { | ||
| 17 | return 0; | ||
| 18 | } | ||
| 19 | static inline int acpi_lid_open(void) | ||
| 20 | { | ||
| 21 | return 1; | ||
| 22 | } | ||
| 23 | #endif /* defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) */ | ||
| 24 | |||
| 25 | #endif /* ACPI_BUTTON_H */ | ||
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h index 4d3e48373e74..0c3dd8603927 100644 --- a/include/asm-generic/fcntl.h +++ b/include/asm-generic/fcntl.h | |||
| @@ -73,6 +73,19 @@ | |||
| 73 | #define F_SETSIG 10 /* for sockets. */ | 73 | #define F_SETSIG 10 /* for sockets. */ |
| 74 | #define F_GETSIG 11 /* for sockets. */ | 74 | #define F_GETSIG 11 /* for sockets. */ |
| 75 | #endif | 75 | #endif |
| 76 | #ifndef F_SETOWN_EX | ||
| 77 | #define F_SETOWN_EX 12 | ||
| 78 | #define F_GETOWN_EX 13 | ||
| 79 | #endif | ||
| 80 | |||
| 81 | #define F_OWNER_TID 0 | ||
| 82 | #define F_OWNER_PID 1 | ||
| 83 | #define F_OWNER_GID 2 | ||
| 84 | |||
| 85 | struct f_owner_ex { | ||
| 86 | int type; | ||
| 87 | pid_t pid; | ||
| 88 | }; | ||
| 76 | 89 | ||
| 77 | /* for F_[GET|SET]FL */ | 90 | /* for F_[GET|SET]FL */ |
| 78 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | 91 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 9cca3785cab8..66d6106a2067 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _ASM_GENERIC_GPIO_H | 1 | #ifndef _ASM_GENERIC_GPIO_H |
| 2 | #define _ASM_GENERIC_GPIO_H | 2 | #define _ASM_GENERIC_GPIO_H |
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | ||
| 4 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 5 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
| 6 | 7 | ||
diff --git a/include/asm-generic/hardirq.h b/include/asm-generic/hardirq.h index 23bb4dad4962..62f59080e5cc 100644 --- a/include/asm-generic/hardirq.h +++ b/include/asm-generic/hardirq.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <linux/irq.h> | 6 | #include <linux/irq.h> |
| 7 | 7 | ||
| 8 | typedef struct { | 8 | typedef struct { |
| 9 | unsigned long __softirq_pending; | 9 | unsigned int __softirq_pending; |
| 10 | } ____cacheline_aligned irq_cpustat_t; | 10 | } ____cacheline_aligned irq_cpustat_t; |
| 11 | 11 | ||
| 12 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 12 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ |
diff --git a/include/asm-generic/mman-common.h b/include/asm-generic/mman-common.h index dd63bd38864b..5ee13b2fd223 100644 --- a/include/asm-generic/mman-common.h +++ b/include/asm-generic/mman-common.h | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #define MADV_REMOVE 9 /* remove these pages & resources */ | 34 | #define MADV_REMOVE 9 /* remove these pages & resources */ |
| 35 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | 35 | #define MADV_DONTFORK 10 /* don't inherit across fork */ |
| 36 | #define MADV_DOFORK 11 /* do inherit across fork */ | 36 | #define MADV_DOFORK 11 /* do inherit across fork */ |
| 37 | #define MADV_HWPOISON 100 /* poison a page for testing */ | ||
| 37 | 38 | ||
| 38 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | 39 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ |
| 39 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | 40 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ |
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index c840719a8c59..942d30b5aab1 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h | |||
| @@ -82,6 +82,7 @@ typedef struct siginfo { | |||
| 82 | #ifdef __ARCH_SI_TRAPNO | 82 | #ifdef __ARCH_SI_TRAPNO |
| 83 | int _trapno; /* TRAP # which caused the signal */ | 83 | int _trapno; /* TRAP # which caused the signal */ |
| 84 | #endif | 84 | #endif |
| 85 | short _addr_lsb; /* LSB of the reported address */ | ||
| 85 | } _sigfault; | 86 | } _sigfault; |
| 86 | 87 | ||
| 87 | /* SIGPOLL */ | 88 | /* SIGPOLL */ |
| @@ -112,6 +113,7 @@ typedef struct siginfo { | |||
| 112 | #ifdef __ARCH_SI_TRAPNO | 113 | #ifdef __ARCH_SI_TRAPNO |
| 113 | #define si_trapno _sifields._sigfault._trapno | 114 | #define si_trapno _sifields._sigfault._trapno |
| 114 | #endif | 115 | #endif |
| 116 | #define si_addr_lsb _sifields._sigfault._addr_lsb | ||
| 115 | #define si_band _sifields._sigpoll._band | 117 | #define si_band _sifields._sigpoll._band |
| 116 | #define si_fd _sifields._sigpoll._fd | 118 | #define si_fd _sifields._sigpoll._fd |
| 117 | 119 | ||
| @@ -192,7 +194,11 @@ typedef struct siginfo { | |||
| 192 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ | 194 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ |
| 193 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ | 195 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ |
| 194 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ | 196 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ |
| 195 | #define NSIGBUS 3 | 197 | /* hardware memory error consumed on a machine check: action required */ |
| 198 | #define BUS_MCEERR_AR (__SI_FAULT|4) | ||
| 199 | /* hardware memory error detected in process but not consumed: action optional*/ | ||
| 200 | #define BUS_MCEERR_AO (__SI_FAULT|5) | ||
| 201 | #define NSIGBUS 5 | ||
| 196 | 202 | ||
| 197 | /* | 203 | /* |
| 198 | * SIGTRAP si_codes | 204 | * SIGTRAP si_codes |
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 88bada2ebc4b..510df36dd5d4 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h | |||
| @@ -37,9 +37,6 @@ | |||
| 37 | #ifndef parent_node | 37 | #ifndef parent_node |
| 38 | #define parent_node(node) ((void)(node),0) | 38 | #define parent_node(node) ((void)(node),0) |
| 39 | #endif | 39 | #endif |
| 40 | #ifndef node_to_cpumask | ||
| 41 | #define node_to_cpumask(node) ((void)node, cpu_online_map) | ||
| 42 | #endif | ||
| 43 | #ifndef cpumask_of_node | 40 | #ifndef cpumask_of_node |
| 44 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) | 41 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) |
| 45 | #endif | 42 | #endif |
| @@ -55,18 +52,4 @@ | |||
| 55 | 52 | ||
| 56 | #endif /* CONFIG_NUMA */ | 53 | #endif /* CONFIG_NUMA */ |
| 57 | 54 | ||
| 58 | /* | ||
| 59 | * returns pointer to cpumask for specified node | ||
| 60 | * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)" | ||
| 61 | */ | ||
| 62 | #ifndef node_to_cpumask_ptr | ||
| 63 | |||
| 64 | #define node_to_cpumask_ptr(v, node) \ | ||
| 65 | cpumask_t _##v = node_to_cpumask(node); \ | ||
| 66 | const cpumask_t *v = &_##v | ||
| 67 | |||
| 68 | #define node_to_cpumask_ptr_next(v, node) \ | ||
| 69 | _##v = node_to_cpumask(node) | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #endif /* _ASM_GENERIC_TOPOLOGY_H */ | 55 | #endif /* _ASM_GENERIC_TOPOLOGY_H */ |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 29ca8f53ffbe..b6e818f4b247 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -721,12 +721,12 @@ | |||
| 721 | . = ALIGN(PAGE_SIZE); \ | 721 | . = ALIGN(PAGE_SIZE); \ |
| 722 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ | 722 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ |
| 723 | INIT_TASK_DATA(inittask) \ | 723 | INIT_TASK_DATA(inittask) \ |
| 724 | NOSAVE_DATA \ | ||
| 725 | PAGE_ALIGNED_DATA(pagealigned) \ | ||
| 724 | CACHELINE_ALIGNED_DATA(cacheline) \ | 726 | CACHELINE_ALIGNED_DATA(cacheline) \ |
| 725 | READ_MOSTLY_DATA(cacheline) \ | 727 | READ_MOSTLY_DATA(cacheline) \ |
| 726 | DATA_DATA \ | 728 | DATA_DATA \ |
| 727 | CONSTRUCTORS \ | 729 | CONSTRUCTORS \ |
| 728 | NOSAVE_DATA \ | ||
| 729 | PAGE_ALIGNED_DATA(pagealigned) \ | ||
| 730 | } | 730 | } |
| 731 | 731 | ||
| 732 | #define INIT_TEXT_SECTION(inittext_align) \ | 732 | #define INIT_TEXT_SECTION(inittext_align) \ |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index ae1e9e166959..b69347b8904f 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -387,6 +387,7 @@ struct drm_crtc { | |||
| 387 | * @get_modes: get mode list for this connector | 387 | * @get_modes: get mode list for this connector |
| 388 | * @set_property: property for this connector may need update | 388 | * @set_property: property for this connector may need update |
| 389 | * @destroy: make object go away | 389 | * @destroy: make object go away |
| 390 | * @force: notify the driver the connector is forced on | ||
| 390 | * | 391 | * |
| 391 | * Each CRTC may have one or more connectors attached to it. The functions | 392 | * Each CRTC may have one or more connectors attached to it. The functions |
| 392 | * below allow the core DRM code to control connectors, enumerate available modes, | 393 | * below allow the core DRM code to control connectors, enumerate available modes, |
| @@ -401,6 +402,7 @@ struct drm_connector_funcs { | |||
| 401 | int (*set_property)(struct drm_connector *connector, struct drm_property *property, | 402 | int (*set_property)(struct drm_connector *connector, struct drm_property *property, |
| 402 | uint64_t val); | 403 | uint64_t val); |
| 403 | void (*destroy)(struct drm_connector *connector); | 404 | void (*destroy)(struct drm_connector *connector); |
| 405 | void (*force)(struct drm_connector *connector); | ||
| 404 | }; | 406 | }; |
| 405 | 407 | ||
| 406 | struct drm_encoder_funcs { | 408 | struct drm_encoder_funcs { |
| @@ -429,6 +431,13 @@ struct drm_encoder { | |||
| 429 | void *helper_private; | 431 | void *helper_private; |
| 430 | }; | 432 | }; |
| 431 | 433 | ||
| 434 | enum drm_connector_force { | ||
| 435 | DRM_FORCE_UNSPECIFIED, | ||
| 436 | DRM_FORCE_OFF, | ||
| 437 | DRM_FORCE_ON, /* force on analog part normally */ | ||
| 438 | DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */ | ||
| 439 | }; | ||
| 440 | |||
| 432 | /** | 441 | /** |
| 433 | * drm_connector - central DRM connector control structure | 442 | * drm_connector - central DRM connector control structure |
| 434 | * @crtc: CRTC this connector is currently connected to, NULL if none | 443 | * @crtc: CRTC this connector is currently connected to, NULL if none |
| @@ -478,9 +487,12 @@ struct drm_connector { | |||
| 478 | 487 | ||
| 479 | void *helper_private; | 488 | void *helper_private; |
| 480 | 489 | ||
| 490 | /* forced on connector */ | ||
| 491 | enum drm_connector_force force; | ||
| 481 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; | 492 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; |
| 482 | uint32_t force_encoder_id; | 493 | uint32_t force_encoder_id; |
| 483 | struct drm_encoder *encoder; /* currently active encoder */ | 494 | struct drm_encoder *encoder; /* currently active encoder */ |
| 495 | void *fb_helper_private; | ||
| 484 | }; | 496 | }; |
| 485 | 497 | ||
| 486 | /** | 498 | /** |
| @@ -746,7 +758,7 @@ extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, | |||
| 746 | extern bool drm_detect_hdmi_monitor(struct edid *edid); | 758 | extern bool drm_detect_hdmi_monitor(struct edid *edid); |
| 747 | extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, | 759 | extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, |
| 748 | int hdisplay, int vdisplay, int vrefresh, | 760 | int hdisplay, int vdisplay, int vrefresh, |
| 749 | bool reduced, bool interlaced); | 761 | bool reduced, bool interlaced, bool margins); |
| 750 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, | 762 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, |
| 751 | int hdisplay, int vdisplay, int vrefresh, | 763 | int hdisplay, int vdisplay, int vrefresh, |
| 752 | bool interlaced, int margins); | 764 | bool interlaced, int margins); |
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index 4c8dacaf4f58..b29e20168b5f 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | #include <linux/fb.h> | 40 | #include <linux/fb.h> |
| 41 | 41 | ||
| 42 | #include "drm_fb_helper.h" | ||
| 42 | struct drm_crtc_helper_funcs { | 43 | struct drm_crtc_helper_funcs { |
| 43 | /* | 44 | /* |
| 44 | * Control power levels on the CRTC. If the mode passed in is | 45 | * Control power levels on the CRTC. If the mode passed in is |
| @@ -60,6 +61,9 @@ struct drm_crtc_helper_funcs { | |||
| 60 | /* Move the crtc on the current fb to the given position *optional* */ | 61 | /* Move the crtc on the current fb to the given position *optional* */ |
| 61 | int (*mode_set_base)(struct drm_crtc *crtc, int x, int y, | 62 | int (*mode_set_base)(struct drm_crtc *crtc, int x, int y, |
| 62 | struct drm_framebuffer *old_fb); | 63 | struct drm_framebuffer *old_fb); |
| 64 | |||
| 65 | /* reload the current crtc LUT */ | ||
| 66 | void (*load_lut)(struct drm_crtc *crtc); | ||
| 63 | }; | 67 | }; |
| 64 | 68 | ||
| 65 | struct drm_encoder_helper_funcs { | 69 | struct drm_encoder_helper_funcs { |
| @@ -119,10 +123,11 @@ static inline void drm_encoder_helper_add(struct drm_encoder *encoder, | |||
| 119 | encoder->helper_private = (void *)funcs; | 123 | encoder->helper_private = (void *)funcs; |
| 120 | } | 124 | } |
| 121 | 125 | ||
| 122 | static inline void drm_connector_helper_add(struct drm_connector *connector, | 126 | static inline int drm_connector_helper_add(struct drm_connector *connector, |
| 123 | const struct drm_connector_helper_funcs *funcs) | 127 | const struct drm_connector_helper_funcs *funcs) |
| 124 | { | 128 | { |
| 125 | connector->helper_private = (void *)funcs; | 129 | connector->helper_private = (void *)funcs; |
| 130 | return drm_fb_helper_add_connector(connector); | ||
| 126 | } | 131 | } |
| 127 | 132 | ||
| 128 | extern int drm_helper_resume_force_mode(struct drm_device *dev); | 133 | extern int drm_helper_resume_force_mode(struct drm_device *dev); |
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index 88fffbdfa26f..58c892a2cbfa 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h | |||
| @@ -35,9 +35,30 @@ struct drm_fb_helper_crtc { | |||
| 35 | struct drm_mode_set mode_set; | 35 | struct drm_mode_set mode_set; |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | |||
| 38 | struct drm_fb_helper_funcs { | 39 | struct drm_fb_helper_funcs { |
| 39 | void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green, | 40 | void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green, |
| 40 | u16 blue, int regno); | 41 | u16 blue, int regno); |
| 42 | void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green, | ||
| 43 | u16 *blue, int regno); | ||
| 44 | }; | ||
| 45 | |||
| 46 | /* mode specified on the command line */ | ||
| 47 | struct drm_fb_helper_cmdline_mode { | ||
| 48 | bool specified; | ||
| 49 | bool refresh_specified; | ||
| 50 | bool bpp_specified; | ||
| 51 | int xres, yres; | ||
| 52 | int bpp; | ||
| 53 | int refresh; | ||
| 54 | bool rb; | ||
| 55 | bool interlace; | ||
| 56 | bool cvt; | ||
| 57 | bool margins; | ||
| 58 | }; | ||
| 59 | |||
| 60 | struct drm_fb_helper_connector { | ||
| 61 | struct drm_fb_helper_cmdline_mode cmdline_mode; | ||
| 41 | }; | 62 | }; |
| 42 | 63 | ||
| 43 | struct drm_fb_helper { | 64 | struct drm_fb_helper { |
| @@ -52,11 +73,14 @@ struct drm_fb_helper { | |||
| 52 | }; | 73 | }; |
| 53 | 74 | ||
| 54 | int drm_fb_helper_single_fb_probe(struct drm_device *dev, | 75 | int drm_fb_helper_single_fb_probe(struct drm_device *dev, |
| 76 | int preferred_bpp, | ||
| 55 | int (*fb_create)(struct drm_device *dev, | 77 | int (*fb_create)(struct drm_device *dev, |
| 56 | uint32_t fb_width, | 78 | uint32_t fb_width, |
| 57 | uint32_t fb_height, | 79 | uint32_t fb_height, |
| 58 | uint32_t surface_width, | 80 | uint32_t surface_width, |
| 59 | uint32_t surface_height, | 81 | uint32_t surface_height, |
| 82 | uint32_t surface_depth, | ||
| 83 | uint32_t surface_bpp, | ||
| 60 | struct drm_framebuffer **fb_ptr)); | 84 | struct drm_framebuffer **fb_ptr)); |
| 61 | int drm_fb_helper_init_crtc_count(struct drm_fb_helper *helper, int crtc_count, | 85 | int drm_fb_helper_init_crtc_count(struct drm_fb_helper *helper, int crtc_count, |
| 62 | int max_conn); | 86 | int max_conn); |
| @@ -77,6 +101,11 @@ int drm_fb_helper_setcolreg(unsigned regno, | |||
| 77 | void drm_fb_helper_restore(void); | 101 | void drm_fb_helper_restore(void); |
| 78 | void drm_fb_helper_fill_var(struct fb_info *info, struct drm_framebuffer *fb, | 102 | void drm_fb_helper_fill_var(struct fb_info *info, struct drm_framebuffer *fb, |
| 79 | uint32_t fb_width, uint32_t fb_height); | 103 | uint32_t fb_width, uint32_t fb_height); |
| 80 | void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch); | 104 | void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, |
| 105 | uint32_t depth); | ||
| 106 | |||
| 107 | int drm_fb_helper_add_connector(struct drm_connector *connector); | ||
| 108 | int drm_fb_helper_parse_command_line(struct drm_device *dev); | ||
| 109 | int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); | ||
| 81 | 110 | ||
| 82 | #endif | 111 | #endif |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 853508499d20..e6f3b120f51a 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -80,7 +80,7 @@ | |||
| 80 | {0x1002, 0x5158, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV200}, \ | 80 | {0x1002, 0x5158, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV200}, \ |
| 81 | {0x1002, 0x5159, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ | 81 | {0x1002, 0x5159, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ |
| 82 | {0x1002, 0x515A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ | 82 | {0x1002, 0x515A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ |
| 83 | {0x1002, 0x515E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ | 83 | {0x1002, 0x515E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100|RADEON_SINGLE_CRTC}, \ |
| 84 | {0x1002, 0x5460, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ | 84 | {0x1002, 0x5460, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ |
| 85 | {0x1002, 0x5462, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ | 85 | {0x1002, 0x5462, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ |
| 86 | {0x1002, 0x5464, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ | 86 | {0x1002, 0x5464, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ |
| @@ -113,7 +113,7 @@ | |||
| 113 | {0x1002, 0x5962, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ | 113 | {0x1002, 0x5962, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ |
| 114 | {0x1002, 0x5964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ | 114 | {0x1002, 0x5964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ |
| 115 | {0x1002, 0x5965, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ | 115 | {0x1002, 0x5965, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ |
| 116 | {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ | 116 | {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100|RADEON_SINGLE_CRTC}, \ |
| 117 | {0x1002, 0x5a41, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART}, \ | 117 | {0x1002, 0x5a41, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART}, \ |
| 118 | {0x1002, 0x5a42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ | 118 | {0x1002, 0x5a42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ |
| 119 | {0x1002, 0x5a61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART}, \ | 119 | {0x1002, 0x5a61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART}, \ |
| @@ -552,6 +552,7 @@ | |||
| 552 | {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 552 | {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 553 | {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 553 | {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 554 | {0x8086, 0x2e32, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 554 | {0x8086, 0x2e32, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 555 | {0x8086, 0x2e42, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | ||
| 555 | {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 556 | {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 556 | {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 557 | {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 557 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 558 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 8e1e92583fbc..7e0cb1da92e6 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
| @@ -185,6 +185,7 @@ typedef struct _drm_i915_sarea { | |||
| 185 | #define DRM_I915_GEM_GET_APERTURE 0x23 | 185 | #define DRM_I915_GEM_GET_APERTURE 0x23 |
| 186 | #define DRM_I915_GEM_MMAP_GTT 0x24 | 186 | #define DRM_I915_GEM_MMAP_GTT 0x24 |
| 187 | #define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25 | 187 | #define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25 |
| 188 | #define DRM_I915_GEM_MADVISE 0x26 | ||
| 188 | 189 | ||
| 189 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 190 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
| 190 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 191 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
| @@ -221,6 +222,7 @@ typedef struct _drm_i915_sarea { | |||
| 221 | #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) | 222 | #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) |
| 222 | #define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) | 223 | #define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) |
| 223 | #define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_intel_get_pipe_from_crtc_id) | 224 | #define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_intel_get_pipe_from_crtc_id) |
| 225 | #define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise) | ||
| 224 | 226 | ||
| 225 | /* Allow drivers to submit batchbuffers directly to hardware, relying | 227 | /* Allow drivers to submit batchbuffers directly to hardware, relying |
| 226 | * on the security mechanisms provided by hardware. | 228 | * on the security mechanisms provided by hardware. |
| @@ -667,4 +669,21 @@ struct drm_i915_get_pipe_from_crtc_id { | |||
| 667 | __u32 pipe; | 669 | __u32 pipe; |
| 668 | }; | 670 | }; |
| 669 | 671 | ||
| 672 | #define I915_MADV_WILLNEED 0 | ||
| 673 | #define I915_MADV_DONTNEED 1 | ||
| 674 | #define __I915_MADV_PURGED 2 /* internal state */ | ||
| 675 | |||
| 676 | struct drm_i915_gem_madvise { | ||
| 677 | /** Handle of the buffer to change the backing store advice */ | ||
| 678 | __u32 handle; | ||
| 679 | |||
| 680 | /* Advice: either the buffer will be needed again in the near future, | ||
| 681 | * or wont be and could be discarded under memory pressure. | ||
| 682 | */ | ||
| 683 | __u32 madv; | ||
| 684 | |||
| 685 | /** Whether the backing store still exists. */ | ||
| 686 | __u32 retained; | ||
| 687 | }; | ||
| 688 | |||
| 670 | #endif /* _I915_DRM_H_ */ | 689 | #endif /* _I915_DRM_H_ */ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index cff4a101f266..3f384d4b163a 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -126,6 +126,7 @@ header-y += nfs_mount.h | |||
| 126 | header-y += nl80211.h | 126 | header-y += nl80211.h |
| 127 | header-y += param.h | 127 | header-y += param.h |
| 128 | header-y += pci_regs.h | 128 | header-y += pci_regs.h |
| 129 | header-y += perf_event.h | ||
| 129 | header-y += pfkeyv2.h | 130 | header-y += pfkeyv2.h |
| 130 | header-y += pg.h | 131 | header-y += pg.h |
| 131 | header-y += phantom.h | 132 | header-y += phantom.h |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 880130f7311f..9101ed64f803 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
| @@ -53,7 +53,7 @@ struct agp_kern_info { | |||
| 53 | int current_memory; | 53 | int current_memory; |
| 54 | bool cant_use_aperture; | 54 | bool cant_use_aperture; |
| 55 | unsigned long page_mask; | 55 | unsigned long page_mask; |
| 56 | struct vm_operations_struct *vm_ops; | 56 | const struct vm_operations_struct *vm_ops; |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | /* | 59 | /* |
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h new file mode 100644 index 000000000000..6b4241748dda --- /dev/null +++ b/include/linux/amba/mmci.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/amba/mmci.h | ||
| 3 | */ | ||
| 4 | #ifndef AMBA_MMCI_H | ||
| 5 | #define AMBA_MMCI_H | ||
| 6 | |||
| 7 | #include <linux/mmc/host.h> | ||
| 8 | |||
| 9 | struct mmci_platform_data { | ||
| 10 | unsigned int ocr_mask; /* available voltages */ | ||
| 11 | u32 (*translate_vdd)(struct device *, unsigned int); | ||
| 12 | unsigned int (*status)(struct device *); | ||
| 13 | int gpio_wp; | ||
| 14 | int gpio_cd; | ||
| 15 | unsigned long capabilities; | ||
| 16 | }; | ||
| 17 | |||
| 18 | #endif | ||
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h index dcad0ffd1755..e4836c6b3dd7 100644 --- a/include/linux/amba/pl022.h +++ b/include/linux/amba/pl022.h | |||
| @@ -136,12 +136,12 @@ enum ssp_tx_level_trig { | |||
| 136 | 136 | ||
| 137 | /** | 137 | /** |
| 138 | * enum SPI Clock Phase - clock phase (Motorola SPI interface only) | 138 | * enum SPI Clock Phase - clock phase (Motorola SPI interface only) |
| 139 | * @SSP_CLK_RISING_EDGE: Receive data on rising edge | 139 | * @SSP_CLK_FIRST_EDGE: Receive data on first edge transition (actual direction depends on polarity) |
| 140 | * @SSP_CLK_FALLING_EDGE: Receive data on falling edge | 140 | * @SSP_CLK_SECOND_EDGE: Receive data on second edge transition (actual direction depends on polarity) |
| 141 | */ | 141 | */ |
| 142 | enum ssp_spi_clk_phase { | 142 | enum ssp_spi_clk_phase { |
| 143 | SSP_CLK_RISING_EDGE, | 143 | SSP_CLK_FIRST_EDGE, |
| 144 | SSP_CLK_FALLING_EDGE | 144 | SSP_CLK_SECOND_EDGE |
| 145 | }; | 145 | }; |
| 146 | 146 | ||
| 147 | /** | 147 | /** |
diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h index 5fc2ef8d97fa..a1c486a88e88 100644 --- a/include/linux/async_tx.h +++ b/include/linux/async_tx.h | |||
| @@ -58,25 +58,60 @@ struct dma_chan_ref { | |||
| 58 | * array. | 58 | * array. |
| 59 | * @ASYNC_TX_ACK: immediately ack the descriptor, precludes setting up a | 59 | * @ASYNC_TX_ACK: immediately ack the descriptor, precludes setting up a |
| 60 | * dependency chain | 60 | * dependency chain |
| 61 | * @ASYNC_TX_DEP_ACK: ack the dependency descriptor. Useful for chaining. | 61 | * @ASYNC_TX_FENCE: specify that the next operation in the dependency |
| 62 | * chain uses this operation's result as an input | ||
| 62 | */ | 63 | */ |
| 63 | enum async_tx_flags { | 64 | enum async_tx_flags { |
| 64 | ASYNC_TX_XOR_ZERO_DST = (1 << 0), | 65 | ASYNC_TX_XOR_ZERO_DST = (1 << 0), |
| 65 | ASYNC_TX_XOR_DROP_DST = (1 << 1), | 66 | ASYNC_TX_XOR_DROP_DST = (1 << 1), |
| 66 | ASYNC_TX_ACK = (1 << 3), | 67 | ASYNC_TX_ACK = (1 << 2), |
| 67 | ASYNC_TX_DEP_ACK = (1 << 4), | 68 | ASYNC_TX_FENCE = (1 << 3), |
| 69 | }; | ||
| 70 | |||
| 71 | /** | ||
| 72 | * struct async_submit_ctl - async_tx submission/completion modifiers | ||
| 73 | * @flags: submission modifiers | ||
| 74 | * @depend_tx: parent dependency of the current operation being submitted | ||
| 75 | * @cb_fn: callback routine to run at operation completion | ||
| 76 | * @cb_param: parameter for the callback routine | ||
| 77 | * @scribble: caller provided space for dma/page address conversions | ||
| 78 | */ | ||
| 79 | struct async_submit_ctl { | ||
| 80 | enum async_tx_flags flags; | ||
| 81 | struct dma_async_tx_descriptor *depend_tx; | ||
| 82 | dma_async_tx_callback cb_fn; | ||
| 83 | void *cb_param; | ||
| 84 | void *scribble; | ||
| 68 | }; | 85 | }; |
| 69 | 86 | ||
| 70 | #ifdef CONFIG_DMA_ENGINE | 87 | #ifdef CONFIG_DMA_ENGINE |
| 71 | #define async_tx_issue_pending_all dma_issue_pending_all | 88 | #define async_tx_issue_pending_all dma_issue_pending_all |
| 89 | |||
| 90 | /** | ||
| 91 | * async_tx_issue_pending - send pending descriptor to the hardware channel | ||
| 92 | * @tx: descriptor handle to retrieve hardware context | ||
| 93 | * | ||
| 94 | * Note: any dependent operations will have already been issued by | ||
| 95 | * async_tx_channel_switch, or (in the case of no channel switch) will | ||
| 96 | * be already pending on this channel. | ||
| 97 | */ | ||
| 98 | static inline void async_tx_issue_pending(struct dma_async_tx_descriptor *tx) | ||
| 99 | { | ||
| 100 | if (likely(tx)) { | ||
| 101 | struct dma_chan *chan = tx->chan; | ||
| 102 | struct dma_device *dma = chan->device; | ||
| 103 | |||
| 104 | dma->device_issue_pending(chan); | ||
| 105 | } | ||
| 106 | } | ||
| 72 | #ifdef CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL | 107 | #ifdef CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL |
| 73 | #include <asm/async_tx.h> | 108 | #include <asm/async_tx.h> |
| 74 | #else | 109 | #else |
| 75 | #define async_tx_find_channel(dep, type, dst, dst_count, src, src_count, len) \ | 110 | #define async_tx_find_channel(dep, type, dst, dst_count, src, src_count, len) \ |
| 76 | __async_tx_find_channel(dep, type) | 111 | __async_tx_find_channel(dep, type) |
| 77 | struct dma_chan * | 112 | struct dma_chan * |
| 78 | __async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | 113 | __async_tx_find_channel(struct async_submit_ctl *submit, |
| 79 | enum dma_transaction_type tx_type); | 114 | enum dma_transaction_type tx_type); |
| 80 | #endif /* CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL */ | 115 | #endif /* CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL */ |
| 81 | #else | 116 | #else |
| 82 | static inline void async_tx_issue_pending_all(void) | 117 | static inline void async_tx_issue_pending_all(void) |
| @@ -84,10 +119,16 @@ static inline void async_tx_issue_pending_all(void) | |||
| 84 | do { } while (0); | 119 | do { } while (0); |
| 85 | } | 120 | } |
| 86 | 121 | ||
| 122 | static inline void async_tx_issue_pending(struct dma_async_tx_descriptor *tx) | ||
| 123 | { | ||
| 124 | do { } while (0); | ||
| 125 | } | ||
| 126 | |||
| 87 | static inline struct dma_chan * | 127 | static inline struct dma_chan * |
| 88 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | 128 | async_tx_find_channel(struct async_submit_ctl *submit, |
| 89 | enum dma_transaction_type tx_type, struct page **dst, int dst_count, | 129 | enum dma_transaction_type tx_type, struct page **dst, |
| 90 | struct page **src, int src_count, size_t len) | 130 | int dst_count, struct page **src, int src_count, |
| 131 | size_t len) | ||
| 91 | { | 132 | { |
| 92 | return NULL; | 133 | return NULL; |
| 93 | } | 134 | } |
| @@ -99,46 +140,70 @@ async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | |||
| 99 | * @cb_fn_param: parameter to pass to the callback routine | 140 | * @cb_fn_param: parameter to pass to the callback routine |
| 100 | */ | 141 | */ |
| 101 | static inline void | 142 | static inline void |
| 102 | async_tx_sync_epilog(dma_async_tx_callback cb_fn, void *cb_fn_param) | 143 | async_tx_sync_epilog(struct async_submit_ctl *submit) |
| 103 | { | 144 | { |
| 104 | if (cb_fn) | 145 | if (submit->cb_fn) |
| 105 | cb_fn(cb_fn_param); | 146 | submit->cb_fn(submit->cb_param); |
| 106 | } | 147 | } |
| 107 | 148 | ||
| 108 | void | 149 | typedef union { |
| 109 | async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx, | 150 | unsigned long addr; |
| 110 | enum async_tx_flags flags, struct dma_async_tx_descriptor *depend_tx, | 151 | struct page *page; |
| 111 | dma_async_tx_callback cb_fn, void *cb_fn_param); | 152 | dma_addr_t dma; |
| 153 | } addr_conv_t; | ||
| 154 | |||
| 155 | static inline void | ||
| 156 | init_async_submit(struct async_submit_ctl *args, enum async_tx_flags flags, | ||
| 157 | struct dma_async_tx_descriptor *tx, | ||
| 158 | dma_async_tx_callback cb_fn, void *cb_param, | ||
| 159 | addr_conv_t *scribble) | ||
| 160 | { | ||
| 161 | args->flags = flags; | ||
| 162 | args->depend_tx = tx; | ||
| 163 | args->cb_fn = cb_fn; | ||
| 164 | args->cb_param = cb_param; | ||
| 165 | args->scribble = scribble; | ||
| 166 | } | ||
| 167 | |||
| 168 | void async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx, | ||
| 169 | struct async_submit_ctl *submit); | ||
| 112 | 170 | ||
| 113 | struct dma_async_tx_descriptor * | 171 | struct dma_async_tx_descriptor * |
| 114 | async_xor(struct page *dest, struct page **src_list, unsigned int offset, | 172 | async_xor(struct page *dest, struct page **src_list, unsigned int offset, |
| 115 | int src_cnt, size_t len, enum async_tx_flags flags, | 173 | int src_cnt, size_t len, struct async_submit_ctl *submit); |
| 116 | struct dma_async_tx_descriptor *depend_tx, | ||
| 117 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
| 118 | 174 | ||
| 119 | struct dma_async_tx_descriptor * | 175 | struct dma_async_tx_descriptor * |
| 120 | async_xor_zero_sum(struct page *dest, struct page **src_list, | 176 | async_xor_val(struct page *dest, struct page **src_list, unsigned int offset, |
| 121 | unsigned int offset, int src_cnt, size_t len, | 177 | int src_cnt, size_t len, enum sum_check_flags *result, |
| 122 | u32 *result, enum async_tx_flags flags, | 178 | struct async_submit_ctl *submit); |
| 123 | struct dma_async_tx_descriptor *depend_tx, | ||
| 124 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
| 125 | 179 | ||
| 126 | struct dma_async_tx_descriptor * | 180 | struct dma_async_tx_descriptor * |
| 127 | async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | 181 | async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, |
| 128 | unsigned int src_offset, size_t len, enum async_tx_flags flags, | 182 | unsigned int src_offset, size_t len, |
| 129 | struct dma_async_tx_descriptor *depend_tx, | 183 | struct async_submit_ctl *submit); |
| 130 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
| 131 | 184 | ||
| 132 | struct dma_async_tx_descriptor * | 185 | struct dma_async_tx_descriptor * |
| 133 | async_memset(struct page *dest, int val, unsigned int offset, | 186 | async_memset(struct page *dest, int val, unsigned int offset, |
| 134 | size_t len, enum async_tx_flags flags, | 187 | size_t len, struct async_submit_ctl *submit); |
| 135 | struct dma_async_tx_descriptor *depend_tx, | 188 | |
| 136 | dma_async_tx_callback cb_fn, void *cb_fn_param); | 189 | struct dma_async_tx_descriptor *async_trigger_callback(struct async_submit_ctl *submit); |
| 190 | |||
| 191 | struct dma_async_tx_descriptor * | ||
| 192 | async_gen_syndrome(struct page **blocks, unsigned int offset, int src_cnt, | ||
| 193 | size_t len, struct async_submit_ctl *submit); | ||
| 194 | |||
| 195 | struct dma_async_tx_descriptor * | ||
| 196 | async_syndrome_val(struct page **blocks, unsigned int offset, int src_cnt, | ||
| 197 | size_t len, enum sum_check_flags *pqres, struct page *spare, | ||
| 198 | struct async_submit_ctl *submit); | ||
| 199 | |||
| 200 | struct dma_async_tx_descriptor * | ||
| 201 | async_raid6_2data_recov(int src_num, size_t bytes, int faila, int failb, | ||
| 202 | struct page **ptrs, struct async_submit_ctl *submit); | ||
| 137 | 203 | ||
| 138 | struct dma_async_tx_descriptor * | 204 | struct dma_async_tx_descriptor * |
| 139 | async_trigger_callback(enum async_tx_flags flags, | 205 | async_raid6_datap_recov(int src_num, size_t bytes, int faila, |
| 140 | struct dma_async_tx_descriptor *depend_tx, | 206 | struct page **ptrs, struct async_submit_ctl *submit); |
| 141 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
| 142 | 207 | ||
| 143 | void async_tx_quiesce(struct dma_async_tx_descriptor **tx); | 208 | void async_tx_quiesce(struct dma_async_tx_descriptor **tx); |
| 144 | #endif /* _ASYNC_TX_H_ */ | 209 | #endif /* _ASYNC_TX_H_ */ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 6299a259ed19..4fb357312b3b 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -334,9 +334,12 @@ enum { | |||
| 334 | SETFEATURES_SATA_DISABLE = 0x90, /* Disable use of SATA feature */ | 334 | SETFEATURES_SATA_DISABLE = 0x90, /* Disable use of SATA feature */ |
| 335 | 335 | ||
| 336 | /* SETFEATURE Sector counts for SATA features */ | 336 | /* SETFEATURE Sector counts for SATA features */ |
| 337 | SATA_AN = 0x05, /* Asynchronous Notification */ | 337 | SATA_FPDMA_OFFSET = 0x01, /* FPDMA non-zero buffer offsets */ |
| 338 | SATA_DIPM = 0x03, /* Device Initiated Power Management */ | 338 | SATA_FPDMA_AA = 0x02, /* FPDMA Setup FIS Auto-Activate */ |
| 339 | SATA_FPDMA_AA = 0x02, /* DMA Setup FIS Auto-Activate */ | 339 | SATA_DIPM = 0x03, /* Device Initiated Power Management */ |
| 340 | SATA_FPDMA_IN_ORDER = 0x04, /* FPDMA in-order data delivery */ | ||
| 341 | SATA_AN = 0x05, /* Asynchronous Notification */ | ||
| 342 | SATA_SSP = 0x06, /* Software Settings Preservation */ | ||
| 340 | 343 | ||
| 341 | /* feature values for SET_MAX */ | 344 | /* feature values for SET_MAX */ |
| 342 | ATA_SET_MAX_ADDR = 0x00, | 345 | ATA_SET_MAX_ADDR = 0x00, |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 086e5c362d3a..817b23705c91 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
| @@ -397,7 +397,7 @@ struct atmdev_ops { /* only send is required */ | |||
| 397 | int (*getsockopt)(struct atm_vcc *vcc,int level,int optname, | 397 | int (*getsockopt)(struct atm_vcc *vcc,int level,int optname, |
| 398 | void __user *optval,int optlen); | 398 | void __user *optval,int optlen); |
| 399 | int (*setsockopt)(struct atm_vcc *vcc,int level,int optname, | 399 | int (*setsockopt)(struct atm_vcc *vcc,int level,int optname, |
| 400 | void __user *optval,int optlen); | 400 | void __user *optval,unsigned int optlen); |
| 401 | int (*send)(struct atm_vcc *vcc,struct sk_buff *skb); | 401 | int (*send)(struct atm_vcc *vcc,struct sk_buff *skb); |
| 402 | int (*send_oam)(struct atm_vcc *vcc,void *cell,int flags); | 402 | int (*send_oam)(struct atm_vcc *vcc,void *cell,int flags); |
| 403 | void (*phy_put)(struct atm_dev *dev,unsigned char value, | 403 | void (*phy_put)(struct atm_dev *dev,unsigned char value, |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 0ee33c2e6129..b449e738533a 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -101,7 +101,8 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
| 101 | const char *fmt, ...); | 101 | const char *fmt, ...); |
| 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
| 103 | void bdi_unregister(struct backing_dev_info *bdi); | 103 | void bdi_unregister(struct backing_dev_info *bdi); |
| 104 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages); | 104 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, |
| 105 | long nr_pages); | ||
| 105 | int bdi_writeback_task(struct bdi_writeback *wb); | 106 | int bdi_writeback_task(struct bdi_writeback *wb); |
| 106 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 107 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
| 107 | 108 | ||
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 79ca2da81c87..0f5f57858a23 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
| @@ -27,6 +27,11 @@ | |||
| 27 | * Any other use of the locks below is probably wrong. | 27 | * Any other use of the locks below is probably wrong. |
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | enum backlight_update_reason { | ||
| 31 | BACKLIGHT_UPDATE_HOTKEY, | ||
| 32 | BACKLIGHT_UPDATE_SYSFS, | ||
| 33 | }; | ||
| 34 | |||
| 30 | struct backlight_device; | 35 | struct backlight_device; |
| 31 | struct fb_info; | 36 | struct fb_info; |
| 32 | 37 | ||
| @@ -100,6 +105,8 @@ static inline void backlight_update_status(struct backlight_device *bd) | |||
| 100 | extern struct backlight_device *backlight_device_register(const char *name, | 105 | extern struct backlight_device *backlight_device_register(const char *name, |
| 101 | struct device *dev, void *devdata, struct backlight_ops *ops); | 106 | struct device *dev, void *devdata, struct backlight_ops *ops); |
| 102 | extern void backlight_device_unregister(struct backlight_device *bd); | 107 | extern void backlight_device_unregister(struct backlight_device *bd); |
| 108 | extern void backlight_force_update(struct backlight_device *bd, | ||
| 109 | enum backlight_update_reason reason); | ||
| 103 | 110 | ||
| 104 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev) | 111 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev) |
| 105 | 112 | ||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 2046b5b8af48..aece486ac734 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -120,7 +120,7 @@ extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | |||
| 120 | extern int prepare_bprm_creds(struct linux_binprm *bprm); | 120 | extern int prepare_bprm_creds(struct linux_binprm *bprm); |
| 121 | extern void install_exec_creds(struct linux_binprm *bprm); | 121 | extern void install_exec_creds(struct linux_binprm *bprm); |
| 122 | extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); | 122 | extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); |
| 123 | extern int set_binfmt(struct linux_binfmt *new); | 123 | extern void set_binfmt(struct linux_binfmt *new); |
| 124 | extern void free_bprm(struct linux_binprm *); | 124 | extern void free_bprm(struct linux_binprm *); |
| 125 | 125 | ||
| 126 | #endif /* __KERNEL__ */ | 126 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e23a86cae5ac..221cecd86bd3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -82,7 +82,6 @@ enum rq_cmd_type_bits { | |||
| 82 | enum { | 82 | enum { |
| 83 | REQ_LB_OP_EJECT = 0x40, /* eject request */ | 83 | REQ_LB_OP_EJECT = 0x40, /* eject request */ |
| 84 | REQ_LB_OP_FLUSH = 0x41, /* flush request */ | 84 | REQ_LB_OP_FLUSH = 0x41, /* flush request */ |
| 85 | REQ_LB_OP_DISCARD = 0x42, /* discard sectors */ | ||
| 86 | }; | 85 | }; |
| 87 | 86 | ||
| 88 | /* | 87 | /* |
| @@ -261,7 +260,6 @@ typedef void (request_fn_proc) (struct request_queue *q); | |||
| 261 | typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); | 260 | typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); |
| 262 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); | 261 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); |
| 263 | typedef void (unplug_fn) (struct request_queue *); | 262 | typedef void (unplug_fn) (struct request_queue *); |
| 264 | typedef int (prepare_discard_fn) (struct request_queue *, struct request *); | ||
| 265 | 263 | ||
| 266 | struct bio_vec; | 264 | struct bio_vec; |
| 267 | struct bvec_merge_data { | 265 | struct bvec_merge_data { |
| @@ -313,6 +311,7 @@ struct queue_limits { | |||
| 313 | unsigned int alignment_offset; | 311 | unsigned int alignment_offset; |
| 314 | unsigned int io_min; | 312 | unsigned int io_min; |
| 315 | unsigned int io_opt; | 313 | unsigned int io_opt; |
| 314 | unsigned int max_discard_sectors; | ||
| 316 | 315 | ||
| 317 | unsigned short logical_block_size; | 316 | unsigned short logical_block_size; |
| 318 | unsigned short max_hw_segments; | 317 | unsigned short max_hw_segments; |
| @@ -340,7 +339,6 @@ struct request_queue | |||
| 340 | make_request_fn *make_request_fn; | 339 | make_request_fn *make_request_fn; |
| 341 | prep_rq_fn *prep_rq_fn; | 340 | prep_rq_fn *prep_rq_fn; |
| 342 | unplug_fn *unplug_fn; | 341 | unplug_fn *unplug_fn; |
| 343 | prepare_discard_fn *prepare_discard_fn; | ||
| 344 | merge_bvec_fn *merge_bvec_fn; | 342 | merge_bvec_fn *merge_bvec_fn; |
| 345 | prepare_flush_fn *prepare_flush_fn; | 343 | prepare_flush_fn *prepare_flush_fn; |
| 346 | softirq_done_fn *softirq_done_fn; | 344 | softirq_done_fn *softirq_done_fn; |
| @@ -460,6 +458,7 @@ struct request_queue | |||
| 460 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ | 458 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ |
| 461 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ | 459 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ |
| 462 | #define QUEUE_FLAG_CQ 16 /* hardware does queuing */ | 460 | #define QUEUE_FLAG_CQ 16 /* hardware does queuing */ |
| 461 | #define QUEUE_FLAG_DISCARD 17 /* supports DISCARD */ | ||
| 463 | 462 | ||
| 464 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 463 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
| 465 | (1 << QUEUE_FLAG_CLUSTER) | \ | 464 | (1 << QUEUE_FLAG_CLUSTER) | \ |
| @@ -591,6 +590,7 @@ enum { | |||
| 591 | #define blk_queue_flushing(q) ((q)->ordseq) | 590 | #define blk_queue_flushing(q) ((q)->ordseq) |
| 592 | #define blk_queue_stackable(q) \ | 591 | #define blk_queue_stackable(q) \ |
| 593 | test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) | 592 | test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) |
| 593 | #define blk_queue_discard(q) test_bit(QUEUE_FLAG_DISCARD, &(q)->queue_flags) | ||
| 594 | 594 | ||
| 595 | #define blk_fs_request(rq) ((rq)->cmd_type == REQ_TYPE_FS) | 595 | #define blk_fs_request(rq) ((rq)->cmd_type == REQ_TYPE_FS) |
| 596 | #define blk_pc_request(rq) ((rq)->cmd_type == REQ_TYPE_BLOCK_PC) | 596 | #define blk_pc_request(rq) ((rq)->cmd_type == REQ_TYPE_BLOCK_PC) |
| @@ -929,6 +929,8 @@ extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | |||
| 929 | extern void blk_queue_max_phys_segments(struct request_queue *, unsigned short); | 929 | extern void blk_queue_max_phys_segments(struct request_queue *, unsigned short); |
| 930 | extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short); | 930 | extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short); |
| 931 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 931 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
| 932 | extern void blk_queue_max_discard_sectors(struct request_queue *q, | ||
| 933 | unsigned int max_discard_sectors); | ||
| 932 | extern void blk_queue_logical_block_size(struct request_queue *, unsigned short); | 934 | extern void blk_queue_logical_block_size(struct request_queue *, unsigned short); |
| 933 | extern void blk_queue_physical_block_size(struct request_queue *, unsigned short); | 935 | extern void blk_queue_physical_block_size(struct request_queue *, unsigned short); |
| 934 | extern void blk_queue_alignment_offset(struct request_queue *q, | 936 | extern void blk_queue_alignment_offset(struct request_queue *q, |
| @@ -955,7 +957,6 @@ extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *); | |||
| 955 | extern void blk_queue_dma_alignment(struct request_queue *, int); | 957 | extern void blk_queue_dma_alignment(struct request_queue *, int); |
| 956 | extern void blk_queue_update_dma_alignment(struct request_queue *, int); | 958 | extern void blk_queue_update_dma_alignment(struct request_queue *, int); |
| 957 | extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *); | 959 | extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *); |
| 958 | extern void blk_queue_set_discard(struct request_queue *, prepare_discard_fn *); | ||
| 959 | extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *); | 960 | extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *); |
| 960 | extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); | 961 | extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); |
| 961 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 962 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
| @@ -1080,25 +1081,37 @@ static inline unsigned int queue_physical_block_size(struct request_queue *q) | |||
| 1080 | return q->limits.physical_block_size; | 1081 | return q->limits.physical_block_size; |
| 1081 | } | 1082 | } |
| 1082 | 1083 | ||
| 1084 | static inline int bdev_physical_block_size(struct block_device *bdev) | ||
| 1085 | { | ||
| 1086 | return queue_physical_block_size(bdev_get_queue(bdev)); | ||
| 1087 | } | ||
| 1088 | |||
| 1083 | static inline unsigned int queue_io_min(struct request_queue *q) | 1089 | static inline unsigned int queue_io_min(struct request_queue *q) |
| 1084 | { | 1090 | { |
| 1085 | return q->limits.io_min; | 1091 | return q->limits.io_min; |
| 1086 | } | 1092 | } |
| 1087 | 1093 | ||
| 1094 | static inline int bdev_io_min(struct block_device *bdev) | ||
| 1095 | { | ||
| 1096 | return queue_io_min(bdev_get_queue(bdev)); | ||
| 1097 | } | ||
| 1098 | |||
| 1088 | static inline unsigned int queue_io_opt(struct request_queue *q) | 1099 | static inline unsigned int queue_io_opt(struct request_queue *q) |
| 1089 | { | 1100 | { |
| 1090 | return q->limits.io_opt; | 1101 | return q->limits.io_opt; |
| 1091 | } | 1102 | } |
| 1092 | 1103 | ||
| 1104 | static inline int bdev_io_opt(struct block_device *bdev) | ||
| 1105 | { | ||
| 1106 | return queue_io_opt(bdev_get_queue(bdev)); | ||
| 1107 | } | ||
| 1108 | |||
| 1093 | static inline int queue_alignment_offset(struct request_queue *q) | 1109 | static inline int queue_alignment_offset(struct request_queue *q) |
| 1094 | { | 1110 | { |
| 1095 | if (q && q->limits.misaligned) | 1111 | if (q->limits.misaligned) |
| 1096 | return -1; | 1112 | return -1; |
| 1097 | 1113 | ||
| 1098 | if (q && q->limits.alignment_offset) | 1114 | return q->limits.alignment_offset; |
| 1099 | return q->limits.alignment_offset; | ||
| 1100 | |||
| 1101 | return 0; | ||
| 1102 | } | 1115 | } |
| 1103 | 1116 | ||
| 1104 | static inline int queue_sector_alignment_offset(struct request_queue *q, | 1117 | static inline int queue_sector_alignment_offset(struct request_queue *q, |
| @@ -1108,6 +1121,19 @@ static inline int queue_sector_alignment_offset(struct request_queue *q, | |||
| 1108 | & (q->limits.io_min - 1); | 1121 | & (q->limits.io_min - 1); |
| 1109 | } | 1122 | } |
| 1110 | 1123 | ||
| 1124 | static inline int bdev_alignment_offset(struct block_device *bdev) | ||
| 1125 | { | ||
| 1126 | struct request_queue *q = bdev_get_queue(bdev); | ||
| 1127 | |||
| 1128 | if (q->limits.misaligned) | ||
| 1129 | return -1; | ||
| 1130 | |||
| 1131 | if (bdev != bdev->bd_contains) | ||
| 1132 | return bdev->bd_part->alignment_offset; | ||
| 1133 | |||
| 1134 | return q->limits.alignment_offset; | ||
| 1135 | } | ||
| 1136 | |||
| 1111 | static inline int queue_dma_alignment(struct request_queue *q) | 1137 | static inline int queue_dma_alignment(struct request_queue *q) |
| 1112 | { | 1138 | { |
| 1113 | return q ? q->dma_alignment : 511; | 1139 | return q ? q->dma_alignment : 511; |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 7e4350ece0f8..3b73b9992b26 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
| @@ -198,6 +198,7 @@ extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
| 198 | char __user *arg); | 198 | char __user *arg); |
| 199 | extern int blk_trace_startstop(struct request_queue *q, int start); | 199 | extern int blk_trace_startstop(struct request_queue *q, int start); |
| 200 | extern int blk_trace_remove(struct request_queue *q); | 200 | extern int blk_trace_remove(struct request_queue *q); |
| 201 | extern void blk_trace_remove_sysfs(struct device *dev); | ||
| 201 | extern int blk_trace_init_sysfs(struct device *dev); | 202 | extern int blk_trace_init_sysfs(struct device *dev); |
| 202 | 203 | ||
| 203 | extern struct attribute_group blk_trace_attr_group; | 204 | extern struct attribute_group blk_trace_attr_group; |
| @@ -211,6 +212,7 @@ extern struct attribute_group blk_trace_attr_group; | |||
| 211 | # define blk_trace_startstop(q, start) (-ENOTTY) | 212 | # define blk_trace_startstop(q, start) (-ENOTTY) |
| 212 | # define blk_trace_remove(q) (-ENOTTY) | 213 | # define blk_trace_remove(q) (-ENOTTY) |
| 213 | # define blk_add_trace_msg(q, fmt, ...) do { } while (0) | 214 | # define blk_add_trace_msg(q, fmt, ...) do { } while (0) |
| 215 | # define blk_trace_remove_sysfs(dev) do { } while (0) | ||
| 214 | static inline int blk_trace_init_sysfs(struct device *dev) | 216 | static inline int blk_trace_init_sysfs(struct device *dev) |
| 215 | { | 217 | { |
| 216 | return 0; | 218 | return 0; |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 90bba9e62286..0008dee66514 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -37,7 +37,7 @@ extern void cgroup_exit(struct task_struct *p, int run_callbacks); | |||
| 37 | extern int cgroupstats_build(struct cgroupstats *stats, | 37 | extern int cgroupstats_build(struct cgroupstats *stats, |
| 38 | struct dentry *dentry); | 38 | struct dentry *dentry); |
| 39 | 39 | ||
| 40 | extern struct file_operations proc_cgroup_operations; | 40 | extern const struct file_operations proc_cgroup_operations; |
| 41 | 41 | ||
| 42 | /* Define the enumeration of all cgroup subsystems */ | 42 | /* Define the enumeration of all cgroup subsystems */ |
| 43 | #define SUBSYS(_x) _x ## _subsys_id, | 43 | #define SUBSYS(_x) _x ## _subsys_id, |
| @@ -141,6 +141,38 @@ enum { | |||
| 141 | CGRP_WAIT_ON_RMDIR, | 141 | CGRP_WAIT_ON_RMDIR, |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | /* which pidlist file are we talking about? */ | ||
| 145 | enum cgroup_filetype { | ||
| 146 | CGROUP_FILE_PROCS, | ||
| 147 | CGROUP_FILE_TASKS, | ||
| 148 | }; | ||
| 149 | |||
| 150 | /* | ||
| 151 | * A pidlist is a list of pids that virtually represents the contents of one | ||
| 152 | * of the cgroup files ("procs" or "tasks"). We keep a list of such pidlists, | ||
| 153 | * a pair (one each for procs, tasks) for each pid namespace that's relevant | ||
| 154 | * to the cgroup. | ||
| 155 | */ | ||
| 156 | struct cgroup_pidlist { | ||
| 157 | /* | ||
| 158 | * used to find which pidlist is wanted. doesn't change as long as | ||
| 159 | * this particular list stays in the list. | ||
| 160 | */ | ||
| 161 | struct { enum cgroup_filetype type; struct pid_namespace *ns; } key; | ||
| 162 | /* array of xids */ | ||
| 163 | pid_t *list; | ||
| 164 | /* how many elements the above list has */ | ||
| 165 | int length; | ||
| 166 | /* how many files are using the current array */ | ||
| 167 | int use_count; | ||
| 168 | /* each of these stored in a list by its cgroup */ | ||
| 169 | struct list_head links; | ||
| 170 | /* pointer to the cgroup we belong to, for list removal purposes */ | ||
| 171 | struct cgroup *owner; | ||
| 172 | /* protects the other fields */ | ||
| 173 | struct rw_semaphore mutex; | ||
| 174 | }; | ||
| 175 | |||
| 144 | struct cgroup { | 176 | struct cgroup { |
| 145 | unsigned long flags; /* "unsigned long" so bitops work */ | 177 | unsigned long flags; /* "unsigned long" so bitops work */ |
| 146 | 178 | ||
| @@ -179,11 +211,12 @@ struct cgroup { | |||
| 179 | */ | 211 | */ |
| 180 | struct list_head release_list; | 212 | struct list_head release_list; |
| 181 | 213 | ||
| 182 | /* pids_mutex protects pids_list and cached pid arrays. */ | 214 | /* |
| 183 | struct rw_semaphore pids_mutex; | 215 | * list of pidlists, up to two for each namespace (one for procs, one |
| 184 | 216 | * for tasks); created on demand. | |
| 185 | /* Linked list of struct cgroup_pids */ | 217 | */ |
| 186 | struct list_head pids_list; | 218 | struct list_head pidlists; |
| 219 | struct mutex pidlist_mutex; | ||
| 187 | 220 | ||
| 188 | /* For RCU-protected deletion */ | 221 | /* For RCU-protected deletion */ |
| 189 | struct rcu_head rcu_head; | 222 | struct rcu_head rcu_head; |
| @@ -227,6 +260,9 @@ struct css_set { | |||
| 227 | * during subsystem registration (at boot time). | 260 | * during subsystem registration (at boot time). |
| 228 | */ | 261 | */ |
| 229 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; | 262 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; |
| 263 | |||
| 264 | /* For RCU-protected deletion */ | ||
| 265 | struct rcu_head rcu_head; | ||
| 230 | }; | 266 | }; |
| 231 | 267 | ||
| 232 | /* | 268 | /* |
| @@ -389,10 +425,11 @@ struct cgroup_subsys { | |||
| 389 | struct cgroup *cgrp); | 425 | struct cgroup *cgrp); |
| 390 | int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 426 | int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
| 391 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 427 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
| 392 | int (*can_attach)(struct cgroup_subsys *ss, | 428 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
| 393 | struct cgroup *cgrp, struct task_struct *tsk); | 429 | struct task_struct *tsk, bool threadgroup); |
| 394 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 430 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
| 395 | struct cgroup *old_cgrp, struct task_struct *tsk); | 431 | struct cgroup *old_cgrp, struct task_struct *tsk, |
| 432 | bool threadgroup); | ||
| 396 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); | 433 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); |
| 397 | void (*exit)(struct cgroup_subsys *ss, struct task_struct *task); | 434 | void (*exit)(struct cgroup_subsys *ss, struct task_struct *task); |
| 398 | int (*populate)(struct cgroup_subsys *ss, | 435 | int (*populate)(struct cgroup_subsys *ss, |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index 7f627775c947..ddb7a97c78c2 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
| @@ -27,8 +27,8 @@ | |||
| 27 | * | 27 | * |
| 28 | * configfs Copyright (C) 2005 Oracle. All rights reserved. | 28 | * configfs Copyright (C) 2005 Oracle. All rights reserved. |
| 29 | * | 29 | * |
| 30 | * Please read Documentation/filesystems/configfs.txt before using the | 30 | * Please read Documentation/filesystems/configfs/configfs.txt before using |
| 31 | * configfs interface, ESPECIALLY the parts about reference counts and | 31 | * the configfs interface, ESPECIALLY the parts about reference counts and |
| 32 | * item destructors. | 32 | * item destructors. |
| 33 | */ | 33 | */ |
| 34 | 34 | ||
diff --git a/include/linux/connector.h b/include/linux/connector.h index 47ebf416f512..3a14615fd35c 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
| @@ -132,11 +132,8 @@ struct cn_callback_id { | |||
| 132 | }; | 132 | }; |
| 133 | 133 | ||
| 134 | struct cn_callback_data { | 134 | struct cn_callback_data { |
| 135 | void (*destruct_data) (void *); | 135 | struct sk_buff *skb; |
| 136 | void *ddata; | 136 | void (*callback) (struct cn_msg *, struct netlink_skb_parms *); |
| 137 | |||
| 138 | void *callback_priv; | ||
| 139 | void (*callback) (struct cn_msg *); | ||
| 140 | 137 | ||
| 141 | void *free; | 138 | void *free; |
| 142 | }; | 139 | }; |
| @@ -167,11 +164,11 @@ struct cn_dev { | |||
| 167 | struct cn_queue_dev *cbdev; | 164 | struct cn_queue_dev *cbdev; |
| 168 | }; | 165 | }; |
| 169 | 166 | ||
| 170 | int cn_add_callback(struct cb_id *, char *, void (*callback) (struct cn_msg *)); | 167 | int cn_add_callback(struct cb_id *, char *, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); |
| 171 | void cn_del_callback(struct cb_id *); | 168 | void cn_del_callback(struct cb_id *); |
| 172 | int cn_netlink_send(struct cn_msg *, u32, gfp_t); | 169 | int cn_netlink_send(struct cn_msg *, u32, gfp_t); |
| 173 | 170 | ||
| 174 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(struct cn_msg *)); | 171 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); |
| 175 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 172 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
| 176 | 173 | ||
| 177 | int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); | 174 | int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9b1d458aac6e..789cf5f920ce 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -3,444 +3,37 @@ | |||
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * Cpumasks provide a bitmap suitable for representing the | 5 | * Cpumasks provide a bitmap suitable for representing the |
| 6 | * set of CPU's in a system, one bit position per CPU number. | 6 | * set of CPU's in a system, one bit position per CPU number. In general, |
| 7 | * | 7 | * only nr_cpu_ids (<= NR_CPUS) bits are valid. |
| 8 | * The new cpumask_ ops take a "struct cpumask *"; the old ones | ||
| 9 | * use cpumask_t. | ||
| 10 | * | ||
| 11 | * See detailed comments in the file linux/bitmap.h describing the | ||
| 12 | * data type on which these cpumasks are based. | ||
| 13 | * | ||
| 14 | * For details of cpumask_scnprintf() and cpumask_parse_user(), | ||
| 15 | * see bitmap_scnprintf() and bitmap_parse_user() in lib/bitmap.c. | ||
| 16 | * For details of cpulist_scnprintf() and cpulist_parse(), see | ||
| 17 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. | ||
| 18 | * For details of cpu_remap(), see bitmap_bitremap in lib/bitmap.c | ||
| 19 | * For details of cpus_remap(), see bitmap_remap in lib/bitmap.c. | ||
| 20 | * For details of cpus_onto(), see bitmap_onto in lib/bitmap.c. | ||
| 21 | * For details of cpus_fold(), see bitmap_fold in lib/bitmap.c. | ||
| 22 | * | ||
| 23 | * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | ||
| 24 | * Note: The alternate operations with the suffix "_nr" are used | ||
| 25 | * to limit the range of the loop to nr_cpu_ids instead of | ||
| 26 | * NR_CPUS when NR_CPUS > 64 for performance reasons. | ||
| 27 | * If NR_CPUS is <= 64 then most assembler bitmask | ||
| 28 | * operators execute faster with a constant range, so | ||
| 29 | * the operator will continue to use NR_CPUS. | ||
| 30 | * | ||
| 31 | * Another consideration is that nr_cpu_ids is initialized | ||
| 32 | * to NR_CPUS and isn't lowered until the possible cpus are | ||
| 33 | * discovered (including any disabled cpus). So early uses | ||
| 34 | * will span the entire range of NR_CPUS. | ||
| 35 | * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | ||
| 36 | * | ||
| 37 | * The obsolescent cpumask operations are: | ||
| 38 | * | ||
| 39 | * void cpu_set(cpu, mask) turn on bit 'cpu' in mask | ||
| 40 | * void cpu_clear(cpu, mask) turn off bit 'cpu' in mask | ||
| 41 | * void cpus_setall(mask) set all bits | ||
| 42 | * void cpus_clear(mask) clear all bits | ||
| 43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask | ||
| 44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask | ||
| 45 | * | ||
| 46 | * int cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] | ||
| 47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] | ||
| 48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 | ||
| 49 | * int cpus_andnot(dst, src1, src2) dst = src1 & ~src2 | ||
| 50 | * void cpus_complement(dst, src) dst = ~src | ||
| 51 | * | ||
| 52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? | ||
| 53 | * int cpus_intersects(mask1, mask2) Do mask1 and mask2 intersect? | ||
| 54 | * int cpus_subset(mask1, mask2) Is mask1 a subset of mask2? | ||
| 55 | * int cpus_empty(mask) Is mask empty (no bits sets)? | ||
| 56 | * int cpus_full(mask) Is mask full (all bits sets)? | ||
| 57 | * int cpus_weight(mask) Hamming weigh - number of set bits | ||
| 58 | * int cpus_weight_nr(mask) Same using nr_cpu_ids instead of NR_CPUS | ||
| 59 | * | ||
| 60 | * void cpus_shift_right(dst, src, n) Shift right | ||
| 61 | * void cpus_shift_left(dst, src, n) Shift left | ||
| 62 | * | ||
| 63 | * int first_cpu(mask) Number lowest set bit, or NR_CPUS | ||
| 64 | * int next_cpu(cpu, mask) Next cpu past 'cpu', or NR_CPUS | ||
| 65 | * int next_cpu_nr(cpu, mask) Next cpu past 'cpu', or nr_cpu_ids | ||
| 66 | * | ||
| 67 | * cpumask_t cpumask_of_cpu(cpu) Return cpumask with bit 'cpu' set | ||
| 68 | * (can be used as an lvalue) | ||
| 69 | * CPU_MASK_ALL Initializer - all bits set | ||
| 70 | * CPU_MASK_NONE Initializer - no bits set | ||
| 71 | * unsigned long *cpus_addr(mask) Array of unsigned long's in mask | ||
| 72 | * | ||
| 73 | * CPUMASK_ALLOC kmalloc's a structure that is a composite of many cpumask_t | ||
| 74 | * variables, and CPUMASK_PTR provides pointers to each field. | ||
| 75 | * | ||
| 76 | * The structure should be defined something like this: | ||
| 77 | * struct my_cpumasks { | ||
| 78 | * cpumask_t mask1; | ||
| 79 | * cpumask_t mask2; | ||
| 80 | * }; | ||
| 81 | * | ||
| 82 | * Usage is then: | ||
| 83 | * CPUMASK_ALLOC(my_cpumasks); | ||
| 84 | * CPUMASK_PTR(mask1, my_cpumasks); | ||
| 85 | * CPUMASK_PTR(mask2, my_cpumasks); | ||
| 86 | * | ||
| 87 | * --- DO NOT reference cpumask_t pointers until this check --- | ||
| 88 | * if (my_cpumasks == NULL) | ||
| 89 | * "kmalloc failed"... | ||
| 90 | * | ||
| 91 | * References are now pointers to the cpumask_t variables (*mask1, ...) | ||
| 92 | * | ||
| 93 | *if NR_CPUS > BITS_PER_LONG | ||
| 94 | * CPUMASK_ALLOC(m) Declares and allocates struct m *m = | ||
| 95 | * kmalloc(sizeof(*m), GFP_KERNEL) | ||
| 96 | * CPUMASK_FREE(m) Macro for kfree(m) | ||
| 97 | *else | ||
| 98 | * CPUMASK_ALLOC(m) Declares struct m _m, *m = &_m | ||
| 99 | * CPUMASK_FREE(m) Nop | ||
| 100 | *endif | ||
| 101 | * CPUMASK_PTR(v, m) Declares cpumask_t *v = &(m->v) | ||
| 102 | * ------------------------------------------------------------------------ | ||
| 103 | * | ||
| 104 | * int cpumask_scnprintf(buf, len, mask) Format cpumask for printing | ||
| 105 | * int cpumask_parse_user(ubuf, ulen, mask) Parse ascii string as cpumask | ||
| 106 | * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing | ||
| 107 | * int cpulist_parse(buf, map) Parse ascii string as cpulist | ||
| 108 | * int cpu_remap(oldbit, old, new) newbit = map(old, new)(oldbit) | ||
| 109 | * void cpus_remap(dst, src, old, new) *dst = map(old, new)(src) | ||
| 110 | * void cpus_onto(dst, orig, relmap) *dst = orig relative to relmap | ||
| 111 | * void cpus_fold(dst, orig, sz) dst bits = orig bits mod sz | ||
| 112 | * | ||
| 113 | * for_each_cpu_mask(cpu, mask) for-loop cpu over mask using NR_CPUS | ||
| 114 | * for_each_cpu_mask_nr(cpu, mask) for-loop cpu over mask using nr_cpu_ids | ||
| 115 | * | ||
| 116 | * int num_online_cpus() Number of online CPUs | ||
| 117 | * int num_possible_cpus() Number of all possible CPUs | ||
| 118 | * int num_present_cpus() Number of present CPUs | ||
| 119 | * | ||
| 120 | * int cpu_online(cpu) Is some cpu online? | ||
| 121 | * int cpu_possible(cpu) Is some cpu possible? | ||
| 122 | * int cpu_present(cpu) Is some cpu present (can schedule)? | ||
| 123 | * | ||
| 124 | * int any_online_cpu(mask) First online cpu in mask | ||
| 125 | * | ||
| 126 | * for_each_possible_cpu(cpu) for-loop cpu over cpu_possible_map | ||
| 127 | * for_each_online_cpu(cpu) for-loop cpu over cpu_online_map | ||
| 128 | * for_each_present_cpu(cpu) for-loop cpu over cpu_present_map | ||
| 129 | * | ||
| 130 | * Subtlety: | ||
| 131 | * 1) The 'type-checked' form of cpu_isset() causes gcc (3.3.2, anyway) | ||
| 132 | * to generate slightly worse code. Note for example the additional | ||
| 133 | * 40 lines of assembly code compiling the "for each possible cpu" | ||
| 134 | * loops buried in the disk_stat_read() macros calls when compiling | ||
| 135 | * drivers/block/genhd.c (arch i386, CONFIG_SMP=y). So use a simple | ||
| 136 | * one-line #define for cpu_isset(), instead of wrapping an inline | ||
| 137 | * inside a macro, the way we do the other calls. | ||
| 138 | */ | 8 | */ |
| 139 | |||
| 140 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
| 141 | #include <linux/threads.h> | 10 | #include <linux/threads.h> |
| 142 | #include <linux/bitmap.h> | 11 | #include <linux/bitmap.h> |
| 143 | 12 | ||
| 144 | typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; | 13 | typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; |
| 145 | extern cpumask_t _unused_cpumask_arg_; | ||
| 146 | |||
| 147 | #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS | ||
| 148 | #define cpu_set(cpu, dst) __cpu_set((cpu), &(dst)) | ||
| 149 | static inline void __cpu_set(int cpu, volatile cpumask_t *dstp) | ||
| 150 | { | ||
| 151 | set_bit(cpu, dstp->bits); | ||
| 152 | } | ||
| 153 | |||
| 154 | #define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst)) | ||
| 155 | static inline void __cpu_clear(int cpu, volatile cpumask_t *dstp) | ||
| 156 | { | ||
| 157 | clear_bit(cpu, dstp->bits); | ||
| 158 | } | ||
| 159 | |||
| 160 | #define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS) | ||
| 161 | static inline void __cpus_setall(cpumask_t *dstp, int nbits) | ||
| 162 | { | ||
| 163 | bitmap_fill(dstp->bits, nbits); | ||
| 164 | } | ||
| 165 | |||
| 166 | #define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS) | ||
| 167 | static inline void __cpus_clear(cpumask_t *dstp, int nbits) | ||
| 168 | { | ||
| 169 | bitmap_zero(dstp->bits, nbits); | ||
| 170 | } | ||
| 171 | |||
| 172 | /* No static inline type checking - see Subtlety (1) above. */ | ||
| 173 | #define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits) | ||
| 174 | |||
| 175 | #define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask)) | ||
| 176 | static inline int __cpu_test_and_set(int cpu, cpumask_t *addr) | ||
| 177 | { | ||
| 178 | return test_and_set_bit(cpu, addr->bits); | ||
| 179 | } | ||
| 180 | |||
| 181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) | ||
| 182 | static inline int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, | ||
| 183 | const cpumask_t *src2p, int nbits) | ||
| 184 | { | ||
| 185 | return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); | ||
| 186 | } | ||
| 187 | |||
| 188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) | ||
| 189 | static inline void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p, | ||
| 190 | const cpumask_t *src2p, int nbits) | ||
| 191 | { | ||
| 192 | bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); | ||
| 193 | } | ||
| 194 | |||
| 195 | #define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS) | ||
| 196 | static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, | ||
| 197 | const cpumask_t *src2p, int nbits) | ||
| 198 | { | ||
| 199 | bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); | ||
| 200 | } | ||
| 201 | |||
| 202 | #define cpus_andnot(dst, src1, src2) \ | ||
| 203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) | ||
| 204 | static inline int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, | ||
| 205 | const cpumask_t *src2p, int nbits) | ||
| 206 | { | ||
| 207 | return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); | ||
| 208 | } | ||
| 209 | |||
| 210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) | ||
| 211 | static inline void __cpus_complement(cpumask_t *dstp, | ||
| 212 | const cpumask_t *srcp, int nbits) | ||
| 213 | { | ||
| 214 | bitmap_complement(dstp->bits, srcp->bits, nbits); | ||
| 215 | } | ||
| 216 | |||
| 217 | #define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS) | ||
| 218 | static inline int __cpus_equal(const cpumask_t *src1p, | ||
| 219 | const cpumask_t *src2p, int nbits) | ||
| 220 | { | ||
| 221 | return bitmap_equal(src1p->bits, src2p->bits, nbits); | ||
| 222 | } | ||
| 223 | |||
| 224 | #define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS) | ||
| 225 | static inline int __cpus_intersects(const cpumask_t *src1p, | ||
| 226 | const cpumask_t *src2p, int nbits) | ||
| 227 | { | ||
| 228 | return bitmap_intersects(src1p->bits, src2p->bits, nbits); | ||
| 229 | } | ||
| 230 | |||
| 231 | #define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS) | ||
| 232 | static inline int __cpus_subset(const cpumask_t *src1p, | ||
| 233 | const cpumask_t *src2p, int nbits) | ||
| 234 | { | ||
| 235 | return bitmap_subset(src1p->bits, src2p->bits, nbits); | ||
| 236 | } | ||
| 237 | |||
| 238 | #define cpus_empty(src) __cpus_empty(&(src), NR_CPUS) | ||
| 239 | static inline int __cpus_empty(const cpumask_t *srcp, int nbits) | ||
| 240 | { | ||
| 241 | return bitmap_empty(srcp->bits, nbits); | ||
| 242 | } | ||
| 243 | |||
| 244 | #define cpus_full(cpumask) __cpus_full(&(cpumask), NR_CPUS) | ||
| 245 | static inline int __cpus_full(const cpumask_t *srcp, int nbits) | ||
| 246 | { | ||
| 247 | return bitmap_full(srcp->bits, nbits); | ||
| 248 | } | ||
| 249 | |||
| 250 | #define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS) | ||
| 251 | static inline int __cpus_weight(const cpumask_t *srcp, int nbits) | ||
| 252 | { | ||
| 253 | return bitmap_weight(srcp->bits, nbits); | ||
| 254 | } | ||
| 255 | |||
| 256 | #define cpus_shift_right(dst, src, n) \ | ||
| 257 | __cpus_shift_right(&(dst), &(src), (n), NR_CPUS) | ||
| 258 | static inline void __cpus_shift_right(cpumask_t *dstp, | ||
| 259 | const cpumask_t *srcp, int n, int nbits) | ||
| 260 | { | ||
| 261 | bitmap_shift_right(dstp->bits, srcp->bits, n, nbits); | ||
| 262 | } | ||
| 263 | |||
| 264 | #define cpus_shift_left(dst, src, n) \ | ||
| 265 | __cpus_shift_left(&(dst), &(src), (n), NR_CPUS) | ||
| 266 | static inline void __cpus_shift_left(cpumask_t *dstp, | ||
| 267 | const cpumask_t *srcp, int n, int nbits) | ||
| 268 | { | ||
| 269 | bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); | ||
| 270 | } | ||
| 271 | #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ | ||
| 272 | 14 | ||
| 273 | /** | 15 | /** |
| 274 | * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask * | 16 | * cpumask_bits - get the bits in a cpumask |
| 275 | * @bitmap: the bitmap | 17 | * @maskp: the struct cpumask * |
| 276 | * | ||
| 277 | * There are a few places where cpumask_var_t isn't appropriate and | ||
| 278 | * static cpumasks must be used (eg. very early boot), yet we don't | ||
| 279 | * expose the definition of 'struct cpumask'. | ||
| 280 | * | ||
| 281 | * This does the conversion, and can be used as a constant initializer. | ||
| 282 | */ | ||
| 283 | #define to_cpumask(bitmap) \ | ||
| 284 | ((struct cpumask *)(1 ? (bitmap) \ | ||
| 285 | : (void *)sizeof(__check_is_bitmap(bitmap)))) | ||
| 286 | |||
| 287 | static inline int __check_is_bitmap(const unsigned long *bitmap) | ||
| 288 | { | ||
| 289 | return 1; | ||
| 290 | } | ||
| 291 | |||
| 292 | /* | ||
| 293 | * Special-case data structure for "single bit set only" constant CPU masks. | ||
| 294 | * | 18 | * |
| 295 | * We pre-generate all the 64 (or 32) possible bit positions, with enough | 19 | * You should only assume nr_cpu_ids bits of this mask are valid. This is |
| 296 | * padding to the left and the right, and return the constant pointer | 20 | * a macro so it's const-correct. |
| 297 | * appropriately offset. | ||
| 298 | */ | ||
| 299 | extern const unsigned long | ||
| 300 | cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)]; | ||
| 301 | |||
| 302 | static inline const struct cpumask *get_cpu_mask(unsigned int cpu) | ||
| 303 | { | ||
| 304 | const unsigned long *p = cpu_bit_bitmap[1 + cpu % BITS_PER_LONG]; | ||
| 305 | p -= cpu / BITS_PER_LONG; | ||
| 306 | return to_cpumask(p); | ||
| 307 | } | ||
| 308 | |||
| 309 | #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS | ||
| 310 | /* | ||
| 311 | * In cases where we take the address of the cpumask immediately, | ||
| 312 | * gcc optimizes it out (it's a constant) and there's no huge stack | ||
| 313 | * variable created: | ||
| 314 | */ | 21 | */ |
| 315 | #define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu)) | 22 | #define cpumask_bits(maskp) ((maskp)->bits) |
| 316 | |||
| 317 | |||
| 318 | #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) | ||
| 319 | |||
| 320 | #if NR_CPUS <= BITS_PER_LONG | ||
| 321 | |||
| 322 | #define CPU_MASK_ALL \ | ||
| 323 | (cpumask_t) { { \ | ||
| 324 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 325 | } } | ||
| 326 | |||
| 327 | #define CPU_MASK_ALL_PTR (&CPU_MASK_ALL) | ||
| 328 | |||
| 329 | #else | ||
| 330 | |||
| 331 | #define CPU_MASK_ALL \ | ||
| 332 | (cpumask_t) { { \ | ||
| 333 | [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ | ||
| 334 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 335 | } } | ||
| 336 | |||
| 337 | /* cpu_mask_all is in init/main.c */ | ||
| 338 | extern cpumask_t cpu_mask_all; | ||
| 339 | #define CPU_MASK_ALL_PTR (&cpu_mask_all) | ||
| 340 | |||
| 341 | #endif | ||
| 342 | |||
| 343 | #define CPU_MASK_NONE \ | ||
| 344 | (cpumask_t) { { \ | ||
| 345 | [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \ | ||
| 346 | } } | ||
| 347 | |||
| 348 | #define CPU_MASK_CPU0 \ | ||
| 349 | (cpumask_t) { { \ | ||
| 350 | [0] = 1UL \ | ||
| 351 | } } | ||
| 352 | |||
| 353 | #define cpus_addr(src) ((src).bits) | ||
| 354 | |||
| 355 | #if NR_CPUS > BITS_PER_LONG | ||
| 356 | #define CPUMASK_ALLOC(m) struct m *m = kmalloc(sizeof(*m), GFP_KERNEL) | ||
| 357 | #define CPUMASK_FREE(m) kfree(m) | ||
| 358 | #else | ||
| 359 | #define CPUMASK_ALLOC(m) struct m _m, *m = &_m | ||
| 360 | #define CPUMASK_FREE(m) | ||
| 361 | #endif | ||
| 362 | #define CPUMASK_PTR(v, m) cpumask_t *v = &(m->v) | ||
| 363 | |||
| 364 | #define cpu_remap(oldbit, old, new) \ | ||
| 365 | __cpu_remap((oldbit), &(old), &(new), NR_CPUS) | ||
| 366 | static inline int __cpu_remap(int oldbit, | ||
| 367 | const cpumask_t *oldp, const cpumask_t *newp, int nbits) | ||
| 368 | { | ||
| 369 | return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); | ||
| 370 | } | ||
| 371 | |||
| 372 | #define cpus_remap(dst, src, old, new) \ | ||
| 373 | __cpus_remap(&(dst), &(src), &(old), &(new), NR_CPUS) | ||
| 374 | static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, | ||
| 375 | const cpumask_t *oldp, const cpumask_t *newp, int nbits) | ||
| 376 | { | ||
| 377 | bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); | ||
| 378 | } | ||
| 379 | |||
| 380 | #define cpus_onto(dst, orig, relmap) \ | ||
| 381 | __cpus_onto(&(dst), &(orig), &(relmap), NR_CPUS) | ||
| 382 | static inline void __cpus_onto(cpumask_t *dstp, const cpumask_t *origp, | ||
| 383 | const cpumask_t *relmapp, int nbits) | ||
| 384 | { | ||
| 385 | bitmap_onto(dstp->bits, origp->bits, relmapp->bits, nbits); | ||
| 386 | } | ||
| 387 | |||
| 388 | #define cpus_fold(dst, orig, sz) \ | ||
| 389 | __cpus_fold(&(dst), &(orig), sz, NR_CPUS) | ||
| 390 | static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp, | ||
| 391 | int sz, int nbits) | ||
| 392 | { | ||
| 393 | bitmap_fold(dstp->bits, origp->bits, sz, nbits); | ||
| 394 | } | ||
| 395 | #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ | ||
| 396 | 23 | ||
| 397 | #if NR_CPUS == 1 | 24 | #if NR_CPUS == 1 |
| 398 | |||
| 399 | #define nr_cpu_ids 1 | 25 | #define nr_cpu_ids 1 |
| 400 | #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS | 26 | #else |
| 401 | #define first_cpu(src) ({ (void)(src); 0; }) | ||
| 402 | #define next_cpu(n, src) ({ (void)(src); 1; }) | ||
| 403 | #define any_online_cpu(mask) 0 | ||
| 404 | #define for_each_cpu_mask(cpu, mask) \ | ||
| 405 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) | ||
| 406 | #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ | ||
| 407 | #else /* NR_CPUS > 1 */ | ||
| 408 | |||
| 409 | extern int nr_cpu_ids; | 27 | extern int nr_cpu_ids; |
| 410 | #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS | ||
| 411 | int __first_cpu(const cpumask_t *srcp); | ||
| 412 | int __next_cpu(int n, const cpumask_t *srcp); | ||
| 413 | int __any_online_cpu(const cpumask_t *mask); | ||
| 414 | |||
| 415 | #define first_cpu(src) __first_cpu(&(src)) | ||
| 416 | #define next_cpu(n, src) __next_cpu((n), &(src)) | ||
| 417 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) | ||
| 418 | #define for_each_cpu_mask(cpu, mask) \ | ||
| 419 | for ((cpu) = -1; \ | ||
| 420 | (cpu) = next_cpu((cpu), (mask)), \ | ||
| 421 | (cpu) < NR_CPUS; ) | ||
| 422 | #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ | ||
| 423 | #endif | 28 | #endif |
| 424 | 29 | ||
| 425 | #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS | 30 | #ifdef CONFIG_CPUMASK_OFFSTACK |
| 426 | #if NR_CPUS <= 64 | 31 | /* Assuming NR_CPUS is huge, a runtime limit is more efficient. Also, |
| 427 | 32 | * not all bits may be allocated. */ | |
| 428 | #define next_cpu_nr(n, src) next_cpu(n, src) | 33 | #define nr_cpumask_bits nr_cpu_ids |
| 429 | #define cpus_weight_nr(cpumask) cpus_weight(cpumask) | 34 | #else |
| 430 | #define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask) | 35 | #define nr_cpumask_bits NR_CPUS |
| 431 | 36 | #endif | |
| 432 | #else /* NR_CPUS > 64 */ | ||
| 433 | |||
| 434 | int __next_cpu_nr(int n, const cpumask_t *srcp); | ||
| 435 | #define next_cpu_nr(n, src) __next_cpu_nr((n), &(src)) | ||
| 436 | #define cpus_weight_nr(cpumask) __cpus_weight(&(cpumask), nr_cpu_ids) | ||
| 437 | #define for_each_cpu_mask_nr(cpu, mask) \ | ||
| 438 | for ((cpu) = -1; \ | ||
| 439 | (cpu) = next_cpu_nr((cpu), (mask)), \ | ||
| 440 | (cpu) < nr_cpu_ids; ) | ||
| 441 | |||
| 442 | #endif /* NR_CPUS > 64 */ | ||
| 443 | #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ | ||
| 444 | 37 | ||
| 445 | /* | 38 | /* |
| 446 | * The following particular system cpumasks and operations manage | 39 | * The following particular system cpumasks and operations manage |
| @@ -487,12 +80,6 @@ extern const struct cpumask *const cpu_online_mask; | |||
| 487 | extern const struct cpumask *const cpu_present_mask; | 80 | extern const struct cpumask *const cpu_present_mask; |
| 488 | extern const struct cpumask *const cpu_active_mask; | 81 | extern const struct cpumask *const cpu_active_mask; |
| 489 | 82 | ||
| 490 | /* These strip const, as traditionally they weren't const. */ | ||
| 491 | #define cpu_possible_map (*(cpumask_t *)cpu_possible_mask) | ||
| 492 | #define cpu_online_map (*(cpumask_t *)cpu_online_mask) | ||
| 493 | #define cpu_present_map (*(cpumask_t *)cpu_present_mask) | ||
| 494 | #define cpu_active_map (*(cpumask_t *)cpu_active_mask) | ||
| 495 | |||
| 496 | #if NR_CPUS > 1 | 83 | #if NR_CPUS > 1 |
| 497 | #define num_online_cpus() cpumask_weight(cpu_online_mask) | 84 | #define num_online_cpus() cpumask_weight(cpu_online_mask) |
| 498 | #define num_possible_cpus() cpumask_weight(cpu_possible_mask) | 85 | #define num_possible_cpus() cpumask_weight(cpu_possible_mask) |
| @@ -511,35 +98,6 @@ extern const struct cpumask *const cpu_active_mask; | |||
| 511 | #define cpu_active(cpu) ((cpu) == 0) | 98 | #define cpu_active(cpu) ((cpu) == 0) |
| 512 | #endif | 99 | #endif |
| 513 | 100 | ||
| 514 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | ||
| 515 | |||
| 516 | /* These are the new versions of the cpumask operators: passed by pointer. | ||
| 517 | * The older versions will be implemented in terms of these, then deleted. */ | ||
| 518 | #define cpumask_bits(maskp) ((maskp)->bits) | ||
| 519 | |||
| 520 | #if NR_CPUS <= BITS_PER_LONG | ||
| 521 | #define CPU_BITS_ALL \ | ||
| 522 | { \ | ||
| 523 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 524 | } | ||
| 525 | |||
| 526 | #else /* NR_CPUS > BITS_PER_LONG */ | ||
| 527 | |||
| 528 | #define CPU_BITS_ALL \ | ||
| 529 | { \ | ||
| 530 | [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ | ||
| 531 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 532 | } | ||
| 533 | #endif /* NR_CPUS > BITS_PER_LONG */ | ||
| 534 | |||
| 535 | #ifdef CONFIG_CPUMASK_OFFSTACK | ||
| 536 | /* Assuming NR_CPUS is huge, a runtime limit is more efficient. Also, | ||
| 537 | * not all bits may be allocated. */ | ||
| 538 | #define nr_cpumask_bits nr_cpu_ids | ||
| 539 | #else | ||
| 540 | #define nr_cpumask_bits NR_CPUS | ||
| 541 | #endif | ||
| 542 | |||
| 543 | /* verify cpu argument to cpumask_* operators */ | 101 | /* verify cpu argument to cpumask_* operators */ |
| 544 | static inline unsigned int cpumask_check(unsigned int cpu) | 102 | static inline unsigned int cpumask_check(unsigned int cpu) |
| 545 | { | 103 | { |
| @@ -1100,4 +658,241 @@ void set_cpu_active(unsigned int cpu, bool active); | |||
| 1100 | void init_cpu_present(const struct cpumask *src); | 658 | void init_cpu_present(const struct cpumask *src); |
| 1101 | void init_cpu_possible(const struct cpumask *src); | 659 | void init_cpu_possible(const struct cpumask *src); |
| 1102 | void init_cpu_online(const struct cpumask *src); | 660 | void init_cpu_online(const struct cpumask *src); |
| 661 | |||
| 662 | /** | ||
| 663 | * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask * | ||
| 664 | * @bitmap: the bitmap | ||
| 665 | * | ||
| 666 | * There are a few places where cpumask_var_t isn't appropriate and | ||
| 667 | * static cpumasks must be used (eg. very early boot), yet we don't | ||
| 668 | * expose the definition of 'struct cpumask'. | ||
| 669 | * | ||
| 670 | * This does the conversion, and can be used as a constant initializer. | ||
| 671 | */ | ||
| 672 | #define to_cpumask(bitmap) \ | ||
| 673 | ((struct cpumask *)(1 ? (bitmap) \ | ||
| 674 | : (void *)sizeof(__check_is_bitmap(bitmap)))) | ||
| 675 | |||
| 676 | static inline int __check_is_bitmap(const unsigned long *bitmap) | ||
| 677 | { | ||
| 678 | return 1; | ||
| 679 | } | ||
| 680 | |||
| 681 | /* | ||
| 682 | * Special-case data structure for "single bit set only" constant CPU masks. | ||
| 683 | * | ||
| 684 | * We pre-generate all the 64 (or 32) possible bit positions, with enough | ||
| 685 | * padding to the left and the right, and return the constant pointer | ||
| 686 | * appropriately offset. | ||
| 687 | */ | ||
| 688 | extern const unsigned long | ||
| 689 | cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)]; | ||
| 690 | |||
| 691 | static inline const struct cpumask *get_cpu_mask(unsigned int cpu) | ||
| 692 | { | ||
| 693 | const unsigned long *p = cpu_bit_bitmap[1 + cpu % BITS_PER_LONG]; | ||
| 694 | p -= cpu / BITS_PER_LONG; | ||
| 695 | return to_cpumask(p); | ||
| 696 | } | ||
| 697 | |||
| 698 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | ||
| 699 | |||
| 700 | #if NR_CPUS <= BITS_PER_LONG | ||
| 701 | #define CPU_BITS_ALL \ | ||
| 702 | { \ | ||
| 703 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 704 | } | ||
| 705 | |||
| 706 | #else /* NR_CPUS > BITS_PER_LONG */ | ||
| 707 | |||
| 708 | #define CPU_BITS_ALL \ | ||
| 709 | { \ | ||
| 710 | [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ | ||
| 711 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 712 | } | ||
| 713 | #endif /* NR_CPUS > BITS_PER_LONG */ | ||
| 714 | |||
| 715 | /* | ||
| 716 | * | ||
| 717 | * From here down, all obsolete. Use cpumask_ variants! | ||
| 718 | * | ||
| 719 | */ | ||
| 720 | #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS | ||
| 721 | /* These strip const, as traditionally they weren't const. */ | ||
| 722 | #define cpu_possible_map (*(cpumask_t *)cpu_possible_mask) | ||
| 723 | #define cpu_online_map (*(cpumask_t *)cpu_online_mask) | ||
| 724 | #define cpu_present_map (*(cpumask_t *)cpu_present_mask) | ||
| 725 | #define cpu_active_map (*(cpumask_t *)cpu_active_mask) | ||
| 726 | |||
| 727 | #define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu)) | ||
| 728 | |||
| 729 | #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) | ||
| 730 | |||
| 731 | #if NR_CPUS <= BITS_PER_LONG | ||
| 732 | |||
| 733 | #define CPU_MASK_ALL \ | ||
| 734 | (cpumask_t) { { \ | ||
| 735 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 736 | } } | ||
| 737 | |||
| 738 | #else | ||
| 739 | |||
| 740 | #define CPU_MASK_ALL \ | ||
| 741 | (cpumask_t) { { \ | ||
| 742 | [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ | ||
| 743 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 744 | } } | ||
| 745 | |||
| 746 | #endif | ||
| 747 | |||
| 748 | #define CPU_MASK_NONE \ | ||
| 749 | (cpumask_t) { { \ | ||
| 750 | [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \ | ||
| 751 | } } | ||
| 752 | |||
| 753 | #define CPU_MASK_CPU0 \ | ||
| 754 | (cpumask_t) { { \ | ||
| 755 | [0] = 1UL \ | ||
| 756 | } } | ||
| 757 | |||
| 758 | #if NR_CPUS == 1 | ||
| 759 | #define first_cpu(src) ({ (void)(src); 0; }) | ||
| 760 | #define next_cpu(n, src) ({ (void)(src); 1; }) | ||
| 761 | #define any_online_cpu(mask) 0 | ||
| 762 | #define for_each_cpu_mask(cpu, mask) \ | ||
| 763 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) | ||
| 764 | #else /* NR_CPUS > 1 */ | ||
| 765 | int __first_cpu(const cpumask_t *srcp); | ||
| 766 | int __next_cpu(int n, const cpumask_t *srcp); | ||
| 767 | int __any_online_cpu(const cpumask_t *mask); | ||
| 768 | |||
| 769 | #define first_cpu(src) __first_cpu(&(src)) | ||
| 770 | #define next_cpu(n, src) __next_cpu((n), &(src)) | ||
| 771 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) | ||
| 772 | #define for_each_cpu_mask(cpu, mask) \ | ||
| 773 | for ((cpu) = -1; \ | ||
| 774 | (cpu) = next_cpu((cpu), (mask)), \ | ||
| 775 | (cpu) < NR_CPUS; ) | ||
| 776 | #endif /* SMP */ | ||
| 777 | |||
| 778 | #if NR_CPUS <= 64 | ||
| 779 | |||
| 780 | #define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask) | ||
| 781 | |||
| 782 | #else /* NR_CPUS > 64 */ | ||
| 783 | |||
| 784 | int __next_cpu_nr(int n, const cpumask_t *srcp); | ||
| 785 | #define for_each_cpu_mask_nr(cpu, mask) \ | ||
| 786 | for ((cpu) = -1; \ | ||
| 787 | (cpu) = __next_cpu_nr((cpu), &(mask)), \ | ||
| 788 | (cpu) < nr_cpu_ids; ) | ||
| 789 | |||
| 790 | #endif /* NR_CPUS > 64 */ | ||
| 791 | |||
| 792 | #define cpus_addr(src) ((src).bits) | ||
| 793 | |||
| 794 | #define cpu_set(cpu, dst) __cpu_set((cpu), &(dst)) | ||
| 795 | static inline void __cpu_set(int cpu, volatile cpumask_t *dstp) | ||
| 796 | { | ||
| 797 | set_bit(cpu, dstp->bits); | ||
| 798 | } | ||
| 799 | |||
| 800 | #define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst)) | ||
| 801 | static inline void __cpu_clear(int cpu, volatile cpumask_t *dstp) | ||
| 802 | { | ||
| 803 | clear_bit(cpu, dstp->bits); | ||
| 804 | } | ||
| 805 | |||
| 806 | #define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS) | ||
| 807 | static inline void __cpus_setall(cpumask_t *dstp, int nbits) | ||
| 808 | { | ||
| 809 | bitmap_fill(dstp->bits, nbits); | ||
| 810 | } | ||
| 811 | |||
| 812 | #define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS) | ||
| 813 | static inline void __cpus_clear(cpumask_t *dstp, int nbits) | ||
| 814 | { | ||
| 815 | bitmap_zero(dstp->bits, nbits); | ||
| 816 | } | ||
| 817 | |||
| 818 | /* No static inline type checking - see Subtlety (1) above. */ | ||
| 819 | #define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits) | ||
| 820 | |||
| 821 | #define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask)) | ||
| 822 | static inline int __cpu_test_and_set(int cpu, cpumask_t *addr) | ||
| 823 | { | ||
| 824 | return test_and_set_bit(cpu, addr->bits); | ||
| 825 | } | ||
| 826 | |||
| 827 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) | ||
| 828 | static inline int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, | ||
| 829 | const cpumask_t *src2p, int nbits) | ||
| 830 | { | ||
| 831 | return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); | ||
| 832 | } | ||
| 833 | |||
| 834 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) | ||
| 835 | static inline void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p, | ||
| 836 | const cpumask_t *src2p, int nbits) | ||
| 837 | { | ||
| 838 | bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); | ||
| 839 | } | ||
| 840 | |||
| 841 | #define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS) | ||
| 842 | static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, | ||
| 843 | const cpumask_t *src2p, int nbits) | ||
| 844 | { | ||
| 845 | bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); | ||
| 846 | } | ||
| 847 | |||
| 848 | #define cpus_andnot(dst, src1, src2) \ | ||
| 849 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) | ||
| 850 | static inline int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, | ||
| 851 | const cpumask_t *src2p, int nbits) | ||
| 852 | { | ||
| 853 | return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); | ||
| 854 | } | ||
| 855 | |||
| 856 | #define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS) | ||
| 857 | static inline int __cpus_equal(const cpumask_t *src1p, | ||
| 858 | const cpumask_t *src2p, int nbits) | ||
| 859 | { | ||
| 860 | return bitmap_equal(src1p->bits, src2p->bits, nbits); | ||
| 861 | } | ||
| 862 | |||
| 863 | #define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS) | ||
| 864 | static inline int __cpus_intersects(const cpumask_t *src1p, | ||
| 865 | const cpumask_t *src2p, int nbits) | ||
| 866 | { | ||
| 867 | return bitmap_intersects(src1p->bits, src2p->bits, nbits); | ||
| 868 | } | ||
| 869 | |||
| 870 | #define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS) | ||
| 871 | static inline int __cpus_subset(const cpumask_t *src1p, | ||
| 872 | const cpumask_t *src2p, int nbits) | ||
| 873 | { | ||
| 874 | return bitmap_subset(src1p->bits, src2p->bits, nbits); | ||
| 875 | } | ||
| 876 | |||
| 877 | #define cpus_empty(src) __cpus_empty(&(src), NR_CPUS) | ||
| 878 | static inline int __cpus_empty(const cpumask_t *srcp, int nbits) | ||
| 879 | { | ||
| 880 | return bitmap_empty(srcp->bits, nbits); | ||
| 881 | } | ||
| 882 | |||
| 883 | #define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS) | ||
| 884 | static inline int __cpus_weight(const cpumask_t *srcp, int nbits) | ||
| 885 | { | ||
| 886 | return bitmap_weight(srcp->bits, nbits); | ||
| 887 | } | ||
| 888 | |||
| 889 | #define cpus_shift_left(dst, src, n) \ | ||
| 890 | __cpus_shift_left(&(dst), &(src), (n), NR_CPUS) | ||
| 891 | static inline void __cpus_shift_left(cpumask_t *dstp, | ||
| 892 | const cpumask_t *srcp, int n, int nbits) | ||
| 893 | { | ||
| 894 | bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); | ||
| 895 | } | ||
| 896 | #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ | ||
| 897 | |||
| 1103 | #endif /* __LINUX_CPUMASK_H */ | 898 | #endif /* __LINUX_CPUMASK_H */ |
diff --git a/include/linux/cred.h b/include/linux/cred.h index fb371601a3b4..4e3387a89cb9 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
| @@ -176,23 +176,7 @@ extern void __invalid_creds(const struct cred *, const char *, unsigned); | |||
| 176 | extern void __validate_process_creds(struct task_struct *, | 176 | extern void __validate_process_creds(struct task_struct *, |
| 177 | const char *, unsigned); | 177 | const char *, unsigned); |
| 178 | 178 | ||
| 179 | static inline bool creds_are_invalid(const struct cred *cred) | 179 | extern bool creds_are_invalid(const struct cred *cred); |
| 180 | { | ||
| 181 | if (cred->magic != CRED_MAGIC) | ||
| 182 | return true; | ||
| 183 | if (atomic_read(&cred->usage) < atomic_read(&cred->subscribers)) | ||
| 184 | return true; | ||
| 185 | #ifdef CONFIG_SECURITY_SELINUX | ||
| 186 | if (selinux_is_enabled()) { | ||
| 187 | if ((unsigned long) cred->security < PAGE_SIZE) | ||
| 188 | return true; | ||
| 189 | if ((*(u32 *)cred->security & 0xffffff00) == | ||
| 190 | (POISON_FREE << 24 | POISON_FREE << 16 | POISON_FREE << 8)) | ||
| 191 | return true; | ||
| 192 | } | ||
| 193 | #endif | ||
| 194 | return false; | ||
| 195 | } | ||
| 196 | 180 | ||
| 197 | static inline void __validate_creds(const struct cred *cred, | 181 | static inline void __validate_creds(const struct cred *cred, |
| 198 | const char *file, unsigned line) | 182 | const char *file, unsigned line) |
diff --git a/include/linux/dca.h b/include/linux/dca.h index 9c20c7e87d0a..d27a7a05718d 100644 --- a/include/linux/dca.h +++ b/include/linux/dca.h | |||
| @@ -20,6 +20,9 @@ | |||
| 20 | */ | 20 | */ |
| 21 | #ifndef DCA_H | 21 | #ifndef DCA_H |
| 22 | #define DCA_H | 22 | #define DCA_H |
| 23 | |||
| 24 | #include <linux/pci.h> | ||
| 25 | |||
| 23 | /* DCA Provider API */ | 26 | /* DCA Provider API */ |
| 24 | 27 | ||
| 25 | /* DCA Notifier Interface */ | 28 | /* DCA Notifier Interface */ |
| @@ -36,6 +39,12 @@ struct dca_provider { | |||
| 36 | int id; | 39 | int id; |
| 37 | }; | 40 | }; |
| 38 | 41 | ||
| 42 | struct dca_domain { | ||
| 43 | struct list_head node; | ||
| 44 | struct list_head dca_providers; | ||
| 45 | struct pci_bus *pci_rc; | ||
| 46 | }; | ||
| 47 | |||
| 39 | struct dca_ops { | 48 | struct dca_ops { |
| 40 | int (*add_requester) (struct dca_provider *, struct device *); | 49 | int (*add_requester) (struct dca_provider *, struct device *); |
| 41 | int (*remove_requester) (struct dca_provider *, struct device *); | 50 | int (*remove_requester) (struct dca_provider *, struct device *); |
| @@ -47,7 +56,7 @@ struct dca_ops { | |||
| 47 | struct dca_provider *alloc_dca_provider(struct dca_ops *ops, int priv_size); | 56 | struct dca_provider *alloc_dca_provider(struct dca_ops *ops, int priv_size); |
| 48 | void free_dca_provider(struct dca_provider *dca); | 57 | void free_dca_provider(struct dca_provider *dca); |
| 49 | int register_dca_provider(struct dca_provider *dca, struct device *dev); | 58 | int register_dca_provider(struct dca_provider *dca, struct device *dev); |
| 50 | void unregister_dca_provider(struct dca_provider *dca); | 59 | void unregister_dca_provider(struct dca_provider *dca, struct device *dev); |
| 51 | 60 | ||
| 52 | static inline void *dca_priv(struct dca_provider *dca) | 61 | static inline void *dca_priv(struct dca_provider *dca) |
| 53 | { | 62 | { |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index eb5c2ba2f81a..fc1b930f246c 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * 2 as published by the Free Software Foundation. | 9 | * 2 as published by the Free Software Foundation. |
| 10 | * | 10 | * |
| 11 | * debugfs is for people to use instead of /proc or /sys. | 11 | * debugfs is for people to use instead of /proc or /sys. |
| 12 | * See Documentation/DocBook/kernel-api for more details. | 12 | * See Documentation/DocBook/filesystems for more details. |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #ifndef _DEBUGFS_H_ | 15 | #ifndef _DEBUGFS_H_ |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index ffefba81c818..2b9f2ac7ed60 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -48,19 +48,20 @@ enum dma_status { | |||
| 48 | 48 | ||
| 49 | /** | 49 | /** |
| 50 | * enum dma_transaction_type - DMA transaction types/indexes | 50 | * enum dma_transaction_type - DMA transaction types/indexes |
| 51 | * | ||
| 52 | * Note: The DMA_ASYNC_TX capability is not to be set by drivers. It is | ||
| 53 | * automatically set as dma devices are registered. | ||
| 51 | */ | 54 | */ |
| 52 | enum dma_transaction_type { | 55 | enum dma_transaction_type { |
| 53 | DMA_MEMCPY, | 56 | DMA_MEMCPY, |
| 54 | DMA_XOR, | 57 | DMA_XOR, |
| 55 | DMA_PQ_XOR, | 58 | DMA_PQ, |
| 56 | DMA_DUAL_XOR, | 59 | DMA_XOR_VAL, |
| 57 | DMA_PQ_UPDATE, | 60 | DMA_PQ_VAL, |
| 58 | DMA_ZERO_SUM, | ||
| 59 | DMA_PQ_ZERO_SUM, | ||
| 60 | DMA_MEMSET, | 61 | DMA_MEMSET, |
| 61 | DMA_MEMCPY_CRC32C, | ||
| 62 | DMA_INTERRUPT, | 62 | DMA_INTERRUPT, |
| 63 | DMA_PRIVATE, | 63 | DMA_PRIVATE, |
| 64 | DMA_ASYNC_TX, | ||
| 64 | DMA_SLAVE, | 65 | DMA_SLAVE, |
| 65 | }; | 66 | }; |
| 66 | 67 | ||
| @@ -70,18 +71,25 @@ enum dma_transaction_type { | |||
| 70 | 71 | ||
| 71 | /** | 72 | /** |
| 72 | * enum dma_ctrl_flags - DMA flags to augment operation preparation, | 73 | * enum dma_ctrl_flags - DMA flags to augment operation preparation, |
| 73 | * control completion, and communicate status. | 74 | * control completion, and communicate status. |
| 74 | * @DMA_PREP_INTERRUPT - trigger an interrupt (callback) upon completion of | 75 | * @DMA_PREP_INTERRUPT - trigger an interrupt (callback) upon completion of |
| 75 | * this transaction | 76 | * this transaction |
| 76 | * @DMA_CTRL_ACK - the descriptor cannot be reused until the client | 77 | * @DMA_CTRL_ACK - the descriptor cannot be reused until the client |
| 77 | * acknowledges receipt, i.e. has has a chance to establish any | 78 | * acknowledges receipt, i.e. has has a chance to establish any dependency |
| 78 | * dependency chains | 79 | * chains |
| 79 | * @DMA_COMPL_SKIP_SRC_UNMAP - set to disable dma-unmapping the source buffer(s) | 80 | * @DMA_COMPL_SKIP_SRC_UNMAP - set to disable dma-unmapping the source buffer(s) |
| 80 | * @DMA_COMPL_SKIP_DEST_UNMAP - set to disable dma-unmapping the destination(s) | 81 | * @DMA_COMPL_SKIP_DEST_UNMAP - set to disable dma-unmapping the destination(s) |
| 81 | * @DMA_COMPL_SRC_UNMAP_SINGLE - set to do the source dma-unmapping as single | 82 | * @DMA_COMPL_SRC_UNMAP_SINGLE - set to do the source dma-unmapping as single |
| 82 | * (if not set, do the source dma-unmapping as page) | 83 | * (if not set, do the source dma-unmapping as page) |
| 83 | * @DMA_COMPL_DEST_UNMAP_SINGLE - set to do the destination dma-unmapping as single | 84 | * @DMA_COMPL_DEST_UNMAP_SINGLE - set to do the destination dma-unmapping as single |
| 84 | * (if not set, do the destination dma-unmapping as page) | 85 | * (if not set, do the destination dma-unmapping as page) |
| 86 | * @DMA_PREP_PQ_DISABLE_P - prevent generation of P while generating Q | ||
| 87 | * @DMA_PREP_PQ_DISABLE_Q - prevent generation of Q while generating P | ||
| 88 | * @DMA_PREP_CONTINUE - indicate to a driver that it is reusing buffers as | ||
| 89 | * sources that were the result of a previous operation, in the case of a PQ | ||
| 90 | * operation it continues the calculation with new sources | ||
| 91 | * @DMA_PREP_FENCE - tell the driver that subsequent operations depend | ||
| 92 | * on the result of this operation | ||
| 85 | */ | 93 | */ |
| 86 | enum dma_ctrl_flags { | 94 | enum dma_ctrl_flags { |
| 87 | DMA_PREP_INTERRUPT = (1 << 0), | 95 | DMA_PREP_INTERRUPT = (1 << 0), |
| @@ -90,9 +98,32 @@ enum dma_ctrl_flags { | |||
| 90 | DMA_COMPL_SKIP_DEST_UNMAP = (1 << 3), | 98 | DMA_COMPL_SKIP_DEST_UNMAP = (1 << 3), |
| 91 | DMA_COMPL_SRC_UNMAP_SINGLE = (1 << 4), | 99 | DMA_COMPL_SRC_UNMAP_SINGLE = (1 << 4), |
| 92 | DMA_COMPL_DEST_UNMAP_SINGLE = (1 << 5), | 100 | DMA_COMPL_DEST_UNMAP_SINGLE = (1 << 5), |
| 101 | DMA_PREP_PQ_DISABLE_P = (1 << 6), | ||
| 102 | DMA_PREP_PQ_DISABLE_Q = (1 << 7), | ||
| 103 | DMA_PREP_CONTINUE = (1 << 8), | ||
| 104 | DMA_PREP_FENCE = (1 << 9), | ||
| 93 | }; | 105 | }; |
| 94 | 106 | ||
| 95 | /** | 107 | /** |
| 108 | * enum sum_check_bits - bit position of pq_check_flags | ||
| 109 | */ | ||
| 110 | enum sum_check_bits { | ||
| 111 | SUM_CHECK_P = 0, | ||
| 112 | SUM_CHECK_Q = 1, | ||
| 113 | }; | ||
| 114 | |||
| 115 | /** | ||
| 116 | * enum pq_check_flags - result of async_{xor,pq}_zero_sum operations | ||
| 117 | * @SUM_CHECK_P_RESULT - 1 if xor zero sum error, 0 otherwise | ||
| 118 | * @SUM_CHECK_Q_RESULT - 1 if reed-solomon zero sum error, 0 otherwise | ||
| 119 | */ | ||
| 120 | enum sum_check_flags { | ||
| 121 | SUM_CHECK_P_RESULT = (1 << SUM_CHECK_P), | ||
| 122 | SUM_CHECK_Q_RESULT = (1 << SUM_CHECK_Q), | ||
| 123 | }; | ||
| 124 | |||
| 125 | |||
| 126 | /** | ||
| 96 | * dma_cap_mask_t - capabilities bitmap modeled after cpumask_t. | 127 | * dma_cap_mask_t - capabilities bitmap modeled after cpumask_t. |
| 97 | * See linux/cpumask.h | 128 | * See linux/cpumask.h |
| 98 | */ | 129 | */ |
| @@ -180,8 +211,6 @@ typedef void (*dma_async_tx_callback)(void *dma_async_param); | |||
| 180 | * @flags: flags to augment operation preparation, control completion, and | 211 | * @flags: flags to augment operation preparation, control completion, and |
| 181 | * communicate status | 212 | * communicate status |
| 182 | * @phys: physical address of the descriptor | 213 | * @phys: physical address of the descriptor |
| 183 | * @tx_list: driver common field for operations that require multiple | ||
| 184 | * descriptors | ||
| 185 | * @chan: target channel for this operation | 214 | * @chan: target channel for this operation |
| 186 | * @tx_submit: set the prepared descriptor(s) to be executed by the engine | 215 | * @tx_submit: set the prepared descriptor(s) to be executed by the engine |
| 187 | * @callback: routine to call after this operation is complete | 216 | * @callback: routine to call after this operation is complete |
| @@ -195,7 +224,6 @@ struct dma_async_tx_descriptor { | |||
| 195 | dma_cookie_t cookie; | 224 | dma_cookie_t cookie; |
| 196 | enum dma_ctrl_flags flags; /* not a 'long' to pack with cookie */ | 225 | enum dma_ctrl_flags flags; /* not a 'long' to pack with cookie */ |
| 197 | dma_addr_t phys; | 226 | dma_addr_t phys; |
| 198 | struct list_head tx_list; | ||
| 199 | struct dma_chan *chan; | 227 | struct dma_chan *chan; |
| 200 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); | 228 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); |
| 201 | dma_async_tx_callback callback; | 229 | dma_async_tx_callback callback; |
| @@ -213,6 +241,11 @@ struct dma_async_tx_descriptor { | |||
| 213 | * @global_node: list_head for global dma_device_list | 241 | * @global_node: list_head for global dma_device_list |
| 214 | * @cap_mask: one or more dma_capability flags | 242 | * @cap_mask: one or more dma_capability flags |
| 215 | * @max_xor: maximum number of xor sources, 0 if no capability | 243 | * @max_xor: maximum number of xor sources, 0 if no capability |
| 244 | * @max_pq: maximum number of PQ sources and PQ-continue capability | ||
| 245 | * @copy_align: alignment shift for memcpy operations | ||
| 246 | * @xor_align: alignment shift for xor operations | ||
| 247 | * @pq_align: alignment shift for pq operations | ||
| 248 | * @fill_align: alignment shift for memset operations | ||
| 216 | * @dev_id: unique device ID | 249 | * @dev_id: unique device ID |
| 217 | * @dev: struct device reference for dma mapping api | 250 | * @dev: struct device reference for dma mapping api |
| 218 | * @device_alloc_chan_resources: allocate resources and return the | 251 | * @device_alloc_chan_resources: allocate resources and return the |
| @@ -220,7 +253,9 @@ struct dma_async_tx_descriptor { | |||
| 220 | * @device_free_chan_resources: release DMA channel's resources | 253 | * @device_free_chan_resources: release DMA channel's resources |
| 221 | * @device_prep_dma_memcpy: prepares a memcpy operation | 254 | * @device_prep_dma_memcpy: prepares a memcpy operation |
| 222 | * @device_prep_dma_xor: prepares a xor operation | 255 | * @device_prep_dma_xor: prepares a xor operation |
| 223 | * @device_prep_dma_zero_sum: prepares a zero_sum operation | 256 | * @device_prep_dma_xor_val: prepares a xor validation operation |
| 257 | * @device_prep_dma_pq: prepares a pq operation | ||
| 258 | * @device_prep_dma_pq_val: prepares a pqzero_sum operation | ||
| 224 | * @device_prep_dma_memset: prepares a memset operation | 259 | * @device_prep_dma_memset: prepares a memset operation |
| 225 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation | 260 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation |
| 226 | * @device_prep_slave_sg: prepares a slave dma operation | 261 | * @device_prep_slave_sg: prepares a slave dma operation |
| @@ -235,7 +270,13 @@ struct dma_device { | |||
| 235 | struct list_head channels; | 270 | struct list_head channels; |
| 236 | struct list_head global_node; | 271 | struct list_head global_node; |
| 237 | dma_cap_mask_t cap_mask; | 272 | dma_cap_mask_t cap_mask; |
| 238 | int max_xor; | 273 | unsigned short max_xor; |
| 274 | unsigned short max_pq; | ||
| 275 | u8 copy_align; | ||
| 276 | u8 xor_align; | ||
| 277 | u8 pq_align; | ||
| 278 | u8 fill_align; | ||
| 279 | #define DMA_HAS_PQ_CONTINUE (1 << 15) | ||
| 239 | 280 | ||
| 240 | int dev_id; | 281 | int dev_id; |
| 241 | struct device *dev; | 282 | struct device *dev; |
| @@ -249,9 +290,17 @@ struct dma_device { | |||
| 249 | struct dma_async_tx_descriptor *(*device_prep_dma_xor)( | 290 | struct dma_async_tx_descriptor *(*device_prep_dma_xor)( |
| 250 | struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src, | 291 | struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src, |
| 251 | unsigned int src_cnt, size_t len, unsigned long flags); | 292 | unsigned int src_cnt, size_t len, unsigned long flags); |
| 252 | struct dma_async_tx_descriptor *(*device_prep_dma_zero_sum)( | 293 | struct dma_async_tx_descriptor *(*device_prep_dma_xor_val)( |
| 253 | struct dma_chan *chan, dma_addr_t *src, unsigned int src_cnt, | 294 | struct dma_chan *chan, dma_addr_t *src, unsigned int src_cnt, |
| 254 | size_t len, u32 *result, unsigned long flags); | 295 | size_t len, enum sum_check_flags *result, unsigned long flags); |
| 296 | struct dma_async_tx_descriptor *(*device_prep_dma_pq)( | ||
| 297 | struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src, | ||
| 298 | unsigned int src_cnt, const unsigned char *scf, | ||
| 299 | size_t len, unsigned long flags); | ||
| 300 | struct dma_async_tx_descriptor *(*device_prep_dma_pq_val)( | ||
| 301 | struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src, | ||
| 302 | unsigned int src_cnt, const unsigned char *scf, size_t len, | ||
| 303 | enum sum_check_flags *pqres, unsigned long flags); | ||
| 255 | struct dma_async_tx_descriptor *(*device_prep_dma_memset)( | 304 | struct dma_async_tx_descriptor *(*device_prep_dma_memset)( |
| 256 | struct dma_chan *chan, dma_addr_t dest, int value, size_t len, | 305 | struct dma_chan *chan, dma_addr_t dest, int value, size_t len, |
| 257 | unsigned long flags); | 306 | unsigned long flags); |
| @@ -270,6 +319,96 @@ struct dma_device { | |||
| 270 | void (*device_issue_pending)(struct dma_chan *chan); | 319 | void (*device_issue_pending)(struct dma_chan *chan); |
| 271 | }; | 320 | }; |
| 272 | 321 | ||
| 322 | static inline bool dmaengine_check_align(u8 align, size_t off1, size_t off2, size_t len) | ||
| 323 | { | ||
| 324 | size_t mask; | ||
| 325 | |||
| 326 | if (!align) | ||
| 327 | return true; | ||
| 328 | mask = (1 << align) - 1; | ||
| 329 | if (mask & (off1 | off2 | len)) | ||
| 330 | return false; | ||
| 331 | return true; | ||
| 332 | } | ||
| 333 | |||
| 334 | static inline bool is_dma_copy_aligned(struct dma_device *dev, size_t off1, | ||
| 335 | size_t off2, size_t len) | ||
| 336 | { | ||
| 337 | return dmaengine_check_align(dev->copy_align, off1, off2, len); | ||
| 338 | } | ||
| 339 | |||
| 340 | static inline bool is_dma_xor_aligned(struct dma_device *dev, size_t off1, | ||
| 341 | size_t off2, size_t len) | ||
| 342 | { | ||
| 343 | return dmaengine_check_align(dev->xor_align, off1, off2, len); | ||
| 344 | } | ||
| 345 | |||
| 346 | static inline bool is_dma_pq_aligned(struct dma_device *dev, size_t off1, | ||
| 347 | size_t off2, size_t len) | ||
| 348 | { | ||
| 349 | return dmaengine_check_align(dev->pq_align, off1, off2, len); | ||
| 350 | } | ||
| 351 | |||
| 352 | static inline bool is_dma_fill_aligned(struct dma_device *dev, size_t off1, | ||
| 353 | size_t off2, size_t len) | ||
| 354 | { | ||
| 355 | return dmaengine_check_align(dev->fill_align, off1, off2, len); | ||
| 356 | } | ||
| 357 | |||
| 358 | static inline void | ||
| 359 | dma_set_maxpq(struct dma_device *dma, int maxpq, int has_pq_continue) | ||
| 360 | { | ||
| 361 | dma->max_pq = maxpq; | ||
| 362 | if (has_pq_continue) | ||
| 363 | dma->max_pq |= DMA_HAS_PQ_CONTINUE; | ||
| 364 | } | ||
| 365 | |||
| 366 | static inline bool dmaf_continue(enum dma_ctrl_flags flags) | ||
| 367 | { | ||
| 368 | return (flags & DMA_PREP_CONTINUE) == DMA_PREP_CONTINUE; | ||
| 369 | } | ||
| 370 | |||
| 371 | static inline bool dmaf_p_disabled_continue(enum dma_ctrl_flags flags) | ||
| 372 | { | ||
| 373 | enum dma_ctrl_flags mask = DMA_PREP_CONTINUE | DMA_PREP_PQ_DISABLE_P; | ||
| 374 | |||
| 375 | return (flags & mask) == mask; | ||
| 376 | } | ||
| 377 | |||
| 378 | static inline bool dma_dev_has_pq_continue(struct dma_device *dma) | ||
| 379 | { | ||
| 380 | return (dma->max_pq & DMA_HAS_PQ_CONTINUE) == DMA_HAS_PQ_CONTINUE; | ||
| 381 | } | ||
| 382 | |||
| 383 | static unsigned short dma_dev_to_maxpq(struct dma_device *dma) | ||
| 384 | { | ||
| 385 | return dma->max_pq & ~DMA_HAS_PQ_CONTINUE; | ||
| 386 | } | ||
| 387 | |||
| 388 | /* dma_maxpq - reduce maxpq in the face of continued operations | ||
| 389 | * @dma - dma device with PQ capability | ||
| 390 | * @flags - to check if DMA_PREP_CONTINUE and DMA_PREP_PQ_DISABLE_P are set | ||
| 391 | * | ||
| 392 | * When an engine does not support native continuation we need 3 extra | ||
| 393 | * source slots to reuse P and Q with the following coefficients: | ||
| 394 | * 1/ {00} * P : remove P from Q', but use it as a source for P' | ||
| 395 | * 2/ {01} * Q : use Q to continue Q' calculation | ||
| 396 | * 3/ {00} * Q : subtract Q from P' to cancel (2) | ||
| 397 | * | ||
| 398 | * In the case where P is disabled we only need 1 extra source: | ||
| 399 | * 1/ {01} * Q : use Q to continue Q' calculation | ||
| 400 | */ | ||
| 401 | static inline int dma_maxpq(struct dma_device *dma, enum dma_ctrl_flags flags) | ||
| 402 | { | ||
| 403 | if (dma_dev_has_pq_continue(dma) || !dmaf_continue(flags)) | ||
| 404 | return dma_dev_to_maxpq(dma); | ||
| 405 | else if (dmaf_p_disabled_continue(flags)) | ||
| 406 | return dma_dev_to_maxpq(dma) - 1; | ||
| 407 | else if (dmaf_continue(flags)) | ||
| 408 | return dma_dev_to_maxpq(dma) - 3; | ||
| 409 | BUG(); | ||
| 410 | } | ||
| 411 | |||
| 273 | /* --- public DMA engine API --- */ | 412 | /* --- public DMA engine API --- */ |
| 274 | 413 | ||
| 275 | #ifdef CONFIG_DMA_ENGINE | 414 | #ifdef CONFIG_DMA_ENGINE |
| @@ -299,7 +438,11 @@ static inline void net_dmaengine_put(void) | |||
| 299 | #ifdef CONFIG_ASYNC_TX_DMA | 438 | #ifdef CONFIG_ASYNC_TX_DMA |
| 300 | #define async_dmaengine_get() dmaengine_get() | 439 | #define async_dmaengine_get() dmaengine_get() |
| 301 | #define async_dmaengine_put() dmaengine_put() | 440 | #define async_dmaengine_put() dmaengine_put() |
| 441 | #ifdef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH | ||
| 442 | #define async_dma_find_channel(type) dma_find_channel(DMA_ASYNC_TX) | ||
| 443 | #else | ||
| 302 | #define async_dma_find_channel(type) dma_find_channel(type) | 444 | #define async_dma_find_channel(type) dma_find_channel(type) |
| 445 | #endif /* CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH */ | ||
| 303 | #else | 446 | #else |
| 304 | static inline void async_dmaengine_get(void) | 447 | static inline void async_dmaengine_get(void) |
| 305 | { | 448 | { |
| @@ -312,7 +455,7 @@ async_dma_find_channel(enum dma_transaction_type type) | |||
| 312 | { | 455 | { |
| 313 | return NULL; | 456 | return NULL; |
| 314 | } | 457 | } |
| 315 | #endif | 458 | #endif /* CONFIG_ASYNC_TX_DMA */ |
| 316 | 459 | ||
| 317 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | 460 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, |
| 318 | void *dest, void *src, size_t len); | 461 | void *dest, void *src, size_t len); |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 45a937be6d38..90a4ed0ea0e5 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
| @@ -361,6 +361,7 @@ typedef struct elf64_shdr { | |||
| 361 | #define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ | 361 | #define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ |
| 362 | #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ | 362 | #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ |
| 363 | #define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ | 363 | #define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ |
| 364 | #define NT_PRXSTATUS 0x300 /* s390 upper register halves */ | ||
| 364 | 365 | ||
| 365 | 366 | ||
| 366 | /* Note header in a PT_NOTE section */ | 367 | /* Note header in a PT_NOTE section */ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index f847df9e99b6..a34bdf5a9d23 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -133,6 +133,7 @@ struct dentry; | |||
| 133 | #define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */ | 133 | #define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */ |
| 134 | #define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */ | 134 | #define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */ |
| 135 | #define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */ | 135 | #define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */ |
| 136 | #define FB_ACCEL_PXA3XX 99 /* PXA3xx */ | ||
| 136 | 137 | ||
| 137 | #define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */ | 138 | #define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */ |
| 138 | #define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */ | 139 | #define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 51803528b095..2620a8c63571 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -300,6 +300,10 @@ struct inodes_stat_t { | |||
| 300 | #define BLKTRACESTOP _IO(0x12,117) | 300 | #define BLKTRACESTOP _IO(0x12,117) |
| 301 | #define BLKTRACETEARDOWN _IO(0x12,118) | 301 | #define BLKTRACETEARDOWN _IO(0x12,118) |
| 302 | #define BLKDISCARD _IO(0x12,119) | 302 | #define BLKDISCARD _IO(0x12,119) |
| 303 | #define BLKIOMIN _IO(0x12,120) | ||
| 304 | #define BLKIOOPT _IO(0x12,121) | ||
| 305 | #define BLKALIGNOFF _IO(0x12,122) | ||
| 306 | #define BLKPBSZGET _IO(0x12,123) | ||
| 303 | 307 | ||
| 304 | #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ | 308 | #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ |
| 305 | #define FIBMAP _IO(0x00,1) /* bmap access */ | 309 | #define FIBMAP _IO(0x00,1) /* bmap access */ |
| @@ -595,6 +599,7 @@ struct address_space_operations { | |||
| 595 | int (*launder_page) (struct page *); | 599 | int (*launder_page) (struct page *); |
| 596 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, | 600 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, |
| 597 | unsigned long); | 601 | unsigned long); |
| 602 | int (*error_remove_page)(struct address_space *, struct page *); | ||
| 598 | }; | 603 | }; |
| 599 | 604 | ||
| 600 | /* | 605 | /* |
| @@ -640,7 +645,6 @@ struct block_device { | |||
| 640 | struct super_block * bd_super; | 645 | struct super_block * bd_super; |
| 641 | int bd_openers; | 646 | int bd_openers; |
| 642 | struct mutex bd_mutex; /* open/close mutex */ | 647 | struct mutex bd_mutex; /* open/close mutex */ |
| 643 | struct semaphore bd_mount_sem; | ||
| 644 | struct list_head bd_inodes; | 648 | struct list_head bd_inodes; |
| 645 | void * bd_holder; | 649 | void * bd_holder; |
| 646 | int bd_holders; | 650 | int bd_holders; |
| @@ -1315,7 +1319,7 @@ struct super_block { | |||
| 1315 | unsigned long s_blocksize; | 1319 | unsigned long s_blocksize; |
| 1316 | unsigned char s_blocksize_bits; | 1320 | unsigned char s_blocksize_bits; |
| 1317 | unsigned char s_dirt; | 1321 | unsigned char s_dirt; |
| 1318 | unsigned long long s_maxbytes; /* Max file size */ | 1322 | loff_t s_maxbytes; /* Max file size */ |
| 1319 | struct file_system_type *s_type; | 1323 | struct file_system_type *s_type; |
| 1320 | const struct super_operations *s_op; | 1324 | const struct super_operations *s_op; |
| 1321 | const struct dquot_operations *dq_op; | 1325 | const struct dquot_operations *dq_op; |
| @@ -2156,6 +2160,7 @@ extern ino_t iunique(struct super_block *, ino_t); | |||
| 2156 | extern int inode_needs_sync(struct inode *inode); | 2160 | extern int inode_needs_sync(struct inode *inode); |
| 2157 | extern void generic_delete_inode(struct inode *inode); | 2161 | extern void generic_delete_inode(struct inode *inode); |
| 2158 | extern void generic_drop_inode(struct inode *inode); | 2162 | extern void generic_drop_inode(struct inode *inode); |
| 2163 | extern int generic_detach_inode(struct inode *inode); | ||
| 2159 | 2164 | ||
| 2160 | extern struct inode *ilookup5_nowait(struct super_block *sb, | 2165 | extern struct inode *ilookup5_nowait(struct super_block *sb, |
| 2161 | unsigned long hashval, int (*test)(struct inode *, void *), | 2166 | unsigned long hashval, int (*test)(struct inode *, void *), |
| @@ -2334,6 +2339,7 @@ extern void get_filesystem(struct file_system_type *fs); | |||
| 2334 | extern void put_filesystem(struct file_system_type *fs); | 2339 | extern void put_filesystem(struct file_system_type *fs); |
| 2335 | extern struct file_system_type *get_fs_type(const char *name); | 2340 | extern struct file_system_type *get_fs_type(const char *name); |
| 2336 | extern struct super_block *get_super(struct block_device *); | 2341 | extern struct super_block *get_super(struct block_device *); |
| 2342 | extern struct super_block *get_active_super(struct block_device *bdev); | ||
| 2337 | extern struct super_block *user_get_super(dev_t); | 2343 | extern struct super_block *user_get_super(dev_t); |
| 2338 | extern void drop_super(struct super_block *sb); | 2344 | extern void drop_super(struct super_block *sb); |
| 2339 | 2345 | ||
| @@ -2381,7 +2387,8 @@ extern int buffer_migrate_page(struct address_space *, | |||
| 2381 | #define buffer_migrate_page NULL | 2387 | #define buffer_migrate_page NULL |
| 2382 | #endif | 2388 | #endif |
| 2383 | 2389 | ||
| 2384 | extern int inode_change_ok(struct inode *, struct iattr *); | 2390 | extern int inode_change_ok(const struct inode *, struct iattr *); |
| 2391 | extern int inode_newsize_ok(const struct inode *, loff_t offset); | ||
| 2385 | extern int __must_check inode_setattr(struct inode *, struct iattr *); | 2392 | extern int __must_check inode_setattr(struct inode *, struct iattr *); |
| 2386 | 2393 | ||
| 2387 | extern void file_update_time(struct file *file); | 2394 | extern void file_update_time(struct file *file); |
| @@ -2443,7 +2450,7 @@ static int __fops ## _open(struct inode *inode, struct file *file) \ | |||
| 2443 | __simple_attr_check_format(__fmt, 0ull); \ | 2450 | __simple_attr_check_format(__fmt, 0ull); \ |
| 2444 | return simple_attr_open(inode, file, __get, __set, __fmt); \ | 2451 | return simple_attr_open(inode, file, __get, __set, __fmt); \ |
| 2445 | } \ | 2452 | } \ |
| 2446 | static struct file_operations __fops = { \ | 2453 | static const struct file_operations __fops = { \ |
| 2447 | .owner = THIS_MODULE, \ | 2454 | .owner = THIS_MODULE, \ |
| 2448 | .open = __fops ## _open, \ | 2455 | .open = __fops ## _open, \ |
| 2449 | .release = simple_attr_release, \ | 2456 | .release = simple_attr_release, \ |
| @@ -2467,7 +2474,7 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, | |||
| 2467 | size_t len, loff_t *ppos); | 2474 | size_t len, loff_t *ppos); |
| 2468 | 2475 | ||
| 2469 | struct ctl_table; | 2476 | struct ctl_table; |
| 2470 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, | 2477 | int proc_nr_files(struct ctl_table *table, int write, |
| 2471 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2478 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| 2472 | 2479 | ||
| 2473 | int __init get_filesystem_list(char *buf); | 2480 | int __init get_filesystem_list(char *buf); |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 3c0924a18daf..0b4f97d24d7f 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | extern int ftrace_enabled; | 19 | extern int ftrace_enabled; |
| 20 | extern int | 20 | extern int |
| 21 | ftrace_enable_sysctl(struct ctl_table *table, int write, | 21 | ftrace_enable_sysctl(struct ctl_table *table, int write, |
| 22 | struct file *filp, void __user *buffer, size_t *lenp, | 22 | void __user *buffer, size_t *lenp, |
| 23 | loff_t *ppos); | 23 | loff_t *ppos); |
| 24 | 24 | ||
| 25 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); | 25 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); |
| @@ -94,7 +94,7 @@ static inline void ftrace_start(void) { } | |||
| 94 | extern int stack_tracer_enabled; | 94 | extern int stack_tracer_enabled; |
| 95 | int | 95 | int |
| 96 | stack_trace_sysctl(struct ctl_table *table, int write, | 96 | stack_trace_sysctl(struct ctl_table *table, int write, |
| 97 | struct file *file, void __user *buffer, size_t *lenp, | 97 | void __user *buffer, size_t *lenp, |
| 98 | loff_t *ppos); | 98 | loff_t *ppos); |
| 99 | #endif | 99 | #endif |
| 100 | 100 | ||
| @@ -241,7 +241,7 @@ extern void ftrace_enable_daemon(void); | |||
| 241 | # define ftrace_set_filter(buf, len, reset) do { } while (0) | 241 | # define ftrace_set_filter(buf, len, reset) do { } while (0) |
| 242 | # define ftrace_disable_daemon() do { } while (0) | 242 | # define ftrace_disable_daemon() do { } while (0) |
| 243 | # define ftrace_enable_daemon() do { } while (0) | 243 | # define ftrace_enable_daemon() do { } while (0) |
| 244 | static inline void ftrace_release(void *start, unsigned long size) { } | 244 | static inline void ftrace_release_mod(struct module *mod) {} |
| 245 | static inline int register_ftrace_command(struct ftrace_func_command *cmd) | 245 | static inline int register_ftrace_command(struct ftrace_func_command *cmd) |
| 246 | { | 246 | { |
| 247 | return -EINVAL; | 247 | return -EINVAL; |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 34956c8fdebf..1e5a26d79232 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
| @@ -4,11 +4,6 @@ | |||
| 4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | 6 | ||
| 7 | struct inode; | ||
| 8 | struct mm_struct; | ||
| 9 | struct task_struct; | ||
| 10 | union ktime; | ||
| 11 | |||
| 12 | /* Second argument to futex syscall */ | 7 | /* Second argument to futex syscall */ |
| 13 | 8 | ||
| 14 | 9 | ||
| @@ -38,8 +33,8 @@ union ktime; | |||
| 38 | #define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) | 33 | #define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) |
| 39 | #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) | 34 | #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) |
| 40 | #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) | 35 | #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) |
| 41 | #define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITS | FUTEX_PRIVATE_FLAG) | 36 | #define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG) |
| 42 | #define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITS | FUTEX_PRIVATE_FLAG) | 37 | #define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG) |
| 43 | #define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ | 38 | #define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ |
| 44 | FUTEX_PRIVATE_FLAG) | 39 | FUTEX_PRIVATE_FLAG) |
| 45 | #define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ | 40 | #define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ |
| @@ -129,6 +124,11 @@ struct robust_list_head { | |||
| 129 | #define FUTEX_BITSET_MATCH_ANY 0xffffffff | 124 | #define FUTEX_BITSET_MATCH_ANY 0xffffffff |
| 130 | 125 | ||
| 131 | #ifdef __KERNEL__ | 126 | #ifdef __KERNEL__ |
| 127 | struct inode; | ||
| 128 | struct mm_struct; | ||
| 129 | struct task_struct; | ||
| 130 | union ktime; | ||
| 131 | |||
| 132 | long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout, | 132 | long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout, |
| 133 | u32 __user *uaddr2, u32 val2, u32 val3); | 133 | u32 __user *uaddr2, u32 val2, u32 val3); |
| 134 | 134 | ||
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 176e7ee73eff..41a59afc70fa 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -3,15 +3,15 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
| 5 | 5 | ||
| 6 | struct ctl_table; | ||
| 7 | struct user_struct; | ||
| 8 | |||
| 6 | #ifdef CONFIG_HUGETLB_PAGE | 9 | #ifdef CONFIG_HUGETLB_PAGE |
| 7 | 10 | ||
| 8 | #include <linux/mempolicy.h> | 11 | #include <linux/mempolicy.h> |
| 9 | #include <linux/shm.h> | 12 | #include <linux/shm.h> |
| 10 | #include <asm/tlbflush.h> | 13 | #include <asm/tlbflush.h> |
| 11 | 14 | ||
| 12 | struct ctl_table; | ||
| 13 | struct user_struct; | ||
| 14 | |||
| 15 | int PageHuge(struct page *page); | 15 | int PageHuge(struct page *page); |
| 16 | 16 | ||
| 17 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | 17 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) |
| @@ -20,9 +20,9 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | |||
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); | 22 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); |
| 23 | int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 23 | int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
| 24 | int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 24 | int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
| 25 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 25 | int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
| 26 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); | 26 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); |
| 27 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, | 27 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, |
| 28 | struct page **, struct vm_area_struct **, | 28 | struct page **, struct vm_area_struct **, |
| @@ -163,7 +163,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | extern const struct file_operations hugetlbfs_file_operations; | 165 | extern const struct file_operations hugetlbfs_file_operations; |
| 166 | extern struct vm_operations_struct hugetlb_vm_ops; | 166 | extern const struct vm_operations_struct hugetlb_vm_ops; |
| 167 | struct file *hugetlb_file_setup(const char *name, size_t size, int acct, | 167 | struct file *hugetlb_file_setup(const char *name, size_t size, int acct, |
| 168 | struct user_struct **user, int creat_flags); | 168 | struct user_struct **user, int creat_flags); |
| 169 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 169 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
| @@ -187,7 +187,11 @@ static inline void set_file_hugepages(struct file *file) | |||
| 187 | 187 | ||
| 188 | #define is_file_hugepages(file) 0 | 188 | #define is_file_hugepages(file) 0 |
| 189 | #define set_file_hugepages(file) BUG() | 189 | #define set_file_hugepages(file) BUG() |
| 190 | #define hugetlb_file_setup(name,size,acct,user,creat) ERR_PTR(-ENOSYS) | 190 | static inline struct file *hugetlb_file_setup(const char *name, size_t size, |
| 191 | int acctflag, struct user_struct **user, int creat_flags) | ||
| 192 | { | ||
| 193 | return ERR_PTR(-ENOSYS); | ||
| 194 | } | ||
| 191 | 195 | ||
| 192 | #endif /* !CONFIG_HUGETLBFS */ | 196 | #endif /* !CONFIG_HUGETLBFS */ |
| 193 | 197 | ||
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h new file mode 100644 index 000000000000..fc5db826b48e --- /dev/null +++ b/include/linux/i2c/adp5588.h | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | /* | ||
| 2 | * Analog Devices ADP5588 I/O Expander and QWERTY Keypad Controller | ||
| 3 | * | ||
| 4 | * Copyright 2009 Analog Devices Inc. | ||
| 5 | * | ||
| 6 | * Licensed under the GPL-2 or later. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _ADP5588_H | ||
| 10 | #define _ADP5588_H | ||
| 11 | |||
| 12 | #define DEV_ID 0x00 /* Device ID */ | ||
| 13 | #define CFG 0x01 /* Configuration Register1 */ | ||
| 14 | #define INT_STAT 0x02 /* Interrupt Status Register */ | ||
| 15 | #define KEY_LCK_EC_STAT 0x03 /* Key Lock and Event Counter Register */ | ||
| 16 | #define Key_EVENTA 0x04 /* Key Event Register A */ | ||
| 17 | #define Key_EVENTB 0x05 /* Key Event Register B */ | ||
| 18 | #define Key_EVENTC 0x06 /* Key Event Register C */ | ||
| 19 | #define Key_EVENTD 0x07 /* Key Event Register D */ | ||
| 20 | #define Key_EVENTE 0x08 /* Key Event Register E */ | ||
| 21 | #define Key_EVENTF 0x09 /* Key Event Register F */ | ||
| 22 | #define Key_EVENTG 0x0A /* Key Event Register G */ | ||
| 23 | #define Key_EVENTH 0x0B /* Key Event Register H */ | ||
| 24 | #define Key_EVENTI 0x0C /* Key Event Register I */ | ||
| 25 | #define Key_EVENTJ 0x0D /* Key Event Register J */ | ||
| 26 | #define KP_LCK_TMR 0x0E /* Keypad Lock1 to Lock2 Timer */ | ||
| 27 | #define UNLOCK1 0x0F /* Unlock Key1 */ | ||
| 28 | #define UNLOCK2 0x10 /* Unlock Key2 */ | ||
| 29 | #define GPIO_INT_STAT1 0x11 /* GPIO Interrupt Status */ | ||
| 30 | #define GPIO_INT_STAT2 0x12 /* GPIO Interrupt Status */ | ||
| 31 | #define GPIO_INT_STAT3 0x13 /* GPIO Interrupt Status */ | ||
| 32 | #define GPIO_DAT_STAT1 0x14 /* GPIO Data Status, Read twice to clear */ | ||
| 33 | #define GPIO_DAT_STAT2 0x15 /* GPIO Data Status, Read twice to clear */ | ||
| 34 | #define GPIO_DAT_STAT3 0x16 /* GPIO Data Status, Read twice to clear */ | ||
| 35 | #define GPIO_DAT_OUT1 0x17 /* GPIO DATA OUT */ | ||
| 36 | #define GPIO_DAT_OUT2 0x18 /* GPIO DATA OUT */ | ||
| 37 | #define GPIO_DAT_OUT3 0x19 /* GPIO DATA OUT */ | ||
| 38 | #define GPIO_INT_EN1 0x1A /* GPIO Interrupt Enable */ | ||
| 39 | #define GPIO_INT_EN2 0x1B /* GPIO Interrupt Enable */ | ||
| 40 | #define GPIO_INT_EN3 0x1C /* GPIO Interrupt Enable */ | ||
| 41 | #define KP_GPIO1 0x1D /* Keypad or GPIO Selection */ | ||
| 42 | #define KP_GPIO2 0x1E /* Keypad or GPIO Selection */ | ||
| 43 | #define KP_GPIO3 0x1F /* Keypad or GPIO Selection */ | ||
| 44 | #define GPI_EM1 0x20 /* GPI Event Mode 1 */ | ||
| 45 | #define GPI_EM2 0x21 /* GPI Event Mode 2 */ | ||
| 46 | #define GPI_EM3 0x22 /* GPI Event Mode 3 */ | ||
| 47 | #define GPIO_DIR1 0x23 /* GPIO Data Direction */ | ||
| 48 | #define GPIO_DIR2 0x24 /* GPIO Data Direction */ | ||
| 49 | #define GPIO_DIR3 0x25 /* GPIO Data Direction */ | ||
| 50 | #define GPIO_INT_LVL1 0x26 /* GPIO Edge/Level Detect */ | ||
| 51 | #define GPIO_INT_LVL2 0x27 /* GPIO Edge/Level Detect */ | ||
| 52 | #define GPIO_INT_LVL3 0x28 /* GPIO Edge/Level Detect */ | ||
| 53 | #define Debounce_DIS1 0x29 /* Debounce Disable */ | ||
| 54 | #define Debounce_DIS2 0x2A /* Debounce Disable */ | ||
| 55 | #define Debounce_DIS3 0x2B /* Debounce Disable */ | ||
| 56 | #define GPIO_PULL1 0x2C /* GPIO Pull Disable */ | ||
| 57 | #define GPIO_PULL2 0x2D /* GPIO Pull Disable */ | ||
| 58 | #define GPIO_PULL3 0x2E /* GPIO Pull Disable */ | ||
| 59 | #define CMP_CFG_STAT 0x30 /* Comparator Configuration and Status Register */ | ||
| 60 | #define CMP_CONFG_SENS1 0x31 /* Sensor1 Comparator Configuration Register */ | ||
| 61 | #define CMP_CONFG_SENS2 0x32 /* L2 Light Sensor Reference Level, Output Falling for Sensor 1 */ | ||
| 62 | #define CMP1_LVL2_TRIP 0x33 /* L2 Light Sensor Hysteresis (Active when Output Rising) for Sensor 1 */ | ||
| 63 | #define CMP1_LVL2_HYS 0x34 /* L3 Light Sensor Reference Level, Output Falling For Sensor 1 */ | ||
| 64 | #define CMP1_LVL3_TRIP 0x35 /* L3 Light Sensor Hysteresis (Active when Output Rising) For Sensor 1 */ | ||
| 65 | #define CMP1_LVL3_HYS 0x36 /* Sensor 2 Comparator Configuration Register */ | ||
| 66 | #define CMP2_LVL2_TRIP 0x37 /* L2 Light Sensor Reference Level, Output Falling for Sensor 2 */ | ||
| 67 | #define CMP2_LVL2_HYS 0x38 /* L2 Light Sensor Hysteresis (Active when Output Rising) for Sensor 2 */ | ||
| 68 | #define CMP2_LVL3_TRIP 0x39 /* L3 Light Sensor Reference Level, Output Falling For Sensor 2 */ | ||
| 69 | #define CMP2_LVL3_HYS 0x3A /* L3 Light Sensor Hysteresis (Active when Output Rising) For Sensor 2 */ | ||
| 70 | #define CMP1_ADC_DAT_R1 0x3B /* Comparator 1 ADC data Register1 */ | ||
| 71 | #define CMP1_ADC_DAT_R2 0x3C /* Comparator 1 ADC data Register2 */ | ||
| 72 | #define CMP2_ADC_DAT_R1 0x3D /* Comparator 2 ADC data Register1 */ | ||
| 73 | #define CMP2_ADC_DAT_R2 0x3E /* Comparator 2 ADC data Register2 */ | ||
| 74 | |||
| 75 | #define ADP5588_DEVICE_ID_MASK 0xF | ||
| 76 | |||
| 77 | /* Put one of these structures in i2c_board_info platform_data */ | ||
| 78 | |||
| 79 | #define ADP5588_KEYMAPSIZE 80 | ||
| 80 | |||
| 81 | struct adp5588_kpad_platform_data { | ||
| 82 | int rows; /* Number of rows */ | ||
| 83 | int cols; /* Number of columns */ | ||
| 84 | const unsigned short *keymap; /* Pointer to keymap */ | ||
| 85 | unsigned short keymapsize; /* Keymap size */ | ||
| 86 | unsigned repeat:1; /* Enable key repeat */ | ||
| 87 | unsigned en_keylock:1; /* Enable Key Lock feature */ | ||
| 88 | unsigned short unlock_key1; /* Unlock Key 1 */ | ||
| 89 | unsigned short unlock_key2; /* Unlock Key 2 */ | ||
| 90 | }; | ||
| 91 | |||
| 92 | #endif | ||
diff --git a/include/linux/i2c/mcs5000_ts.h b/include/linux/i2c/mcs5000_ts.h new file mode 100644 index 000000000000..5a117b5ca15e --- /dev/null +++ b/include/linux/i2c/mcs5000_ts.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * mcs5000_ts.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Samsung Electronics Co.Ltd | ||
| 5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __LINUX_MCS5000_TS_H | ||
| 15 | #define __LINUX_MCS5000_TS_H | ||
| 16 | |||
| 17 | /* platform data for the MELFAS MCS-5000 touchscreen driver */ | ||
| 18 | struct mcs5000_ts_platform_data { | ||
| 19 | void (*cfg_pin)(void); | ||
| 20 | int x_size; | ||
| 21 | int y_size; | ||
| 22 | }; | ||
| 23 | |||
| 24 | #endif /* __LINUX_MCS5000_TS_H */ | ||
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h index 2d02dfd7076c..508824ee35e6 100644 --- a/include/linux/i2c/twl4030.h +++ b/include/linux/i2c/twl4030.h | |||
| @@ -349,11 +349,11 @@ struct twl4030_madc_platform_data { | |||
| 349 | int irq_line; | 349 | int irq_line; |
| 350 | }; | 350 | }; |
| 351 | 351 | ||
| 352 | /* Boards have uniqe mappings of {col, row} --> keycode. | 352 | /* Boards have uniqe mappings of {row, col} --> keycode. |
| 353 | * Column and row are 4 bits, but range only from 0..7. | 353 | * Column and row are 8 bits each, but range only from 0..7. |
| 354 | * a PERSISTENT_KEY is "always on" and never reported. | 354 | * a PERSISTENT_KEY is "always on" and never reported. |
| 355 | */ | 355 | */ |
| 356 | #define PERSISTENT_KEY(c, r) KEY((c), (r), KEY_RESERVED) | 356 | #define PERSISTENT_KEY(r, c) KEY((r), (c), KEY_RESERVED) |
| 357 | 357 | ||
| 358 | struct twl4030_keypad_data { | 358 | struct twl4030_keypad_data { |
| 359 | const struct matrix_keymap_data *keymap_data; | 359 | const struct matrix_keymap_data *keymap_data; |
diff --git a/include/linux/i8042.h b/include/linux/i8042.h index 7907a72403ee..60c3360ef6ad 100644 --- a/include/linux/i8042.h +++ b/include/linux/i8042.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #include <linux/types.h> | ||
| 10 | 11 | ||
| 11 | /* | 12 | /* |
| 12 | * Standard commands. | 13 | * Standard commands. |
| @@ -30,6 +31,35 @@ | |||
| 30 | #define I8042_CMD_MUX_PFX 0x0090 | 31 | #define I8042_CMD_MUX_PFX 0x0090 |
| 31 | #define I8042_CMD_MUX_SEND 0x1090 | 32 | #define I8042_CMD_MUX_SEND 0x1090 |
| 32 | 33 | ||
| 34 | struct serio; | ||
| 35 | |||
| 36 | #if defined(CONFIG_SERIO_I8042) || defined(CONFIG_SERIO_I8042_MODULE) | ||
| 37 | |||
| 38 | void i8042_lock_chip(void); | ||
| 39 | void i8042_unlock_chip(void); | ||
| 33 | int i8042_command(unsigned char *param, int command); | 40 | int i8042_command(unsigned char *param, int command); |
| 41 | bool i8042_check_port_owner(const struct serio *); | ||
| 42 | |||
| 43 | #else | ||
| 44 | |||
| 45 | void i8042_lock_chip(void) | ||
| 46 | { | ||
| 47 | } | ||
| 48 | |||
| 49 | void i8042_unlock_chip(void) | ||
| 50 | { | ||
| 51 | } | ||
| 52 | |||
| 53 | int i8042_command(unsigned char *param, int command) | ||
| 54 | { | ||
| 55 | return -ENOSYS; | ||
| 56 | } | ||
| 57 | |||
| 58 | bool i8042_check_port_owner(const struct serio *serio) | ||
| 59 | { | ||
| 60 | return false; | ||
| 61 | } | ||
| 62 | |||
| 63 | #endif | ||
| 34 | 64 | ||
| 35 | #endif | 65 | #endif |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 5eb9b0f857e0..5a9aae4adb44 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
| @@ -44,7 +44,7 @@ struct ip_tunnel_prl { | |||
| 44 | __u16 flags; | 44 | __u16 flags; |
| 45 | __u16 __reserved; | 45 | __u16 __reserved; |
| 46 | __u32 datalen; | 46 | __u32 datalen; |
| 47 | __u32 rs_delay; | 47 | __u32 __reserved2; |
| 48 | /* data follows */ | 48 | /* data follows */ |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
diff --git a/include/linux/init.h b/include/linux/init.h index 400adbb45414..ff8bde520d03 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -271,6 +271,7 @@ void __init parse_early_options(char *cmdline); | |||
| 271 | #else /* MODULE */ | 271 | #else /* MODULE */ |
| 272 | 272 | ||
| 273 | /* Don't use these in modules, but some people do... */ | 273 | /* Don't use these in modules, but some people do... */ |
| 274 | #define early_initcall(fn) module_init(fn) | ||
| 274 | #define core_initcall(fn) module_init(fn) | 275 | #define core_initcall(fn) module_init(fn) |
| 275 | #define postcore_initcall(fn) module_init(fn) | 276 | #define postcore_initcall(fn) module_init(fn) |
| 276 | #define arch_initcall(fn) module_init(fn) | 277 | #define arch_initcall(fn) module_init(fn) |
diff --git a/include/linux/input.h b/include/linux/input.h index 8b3bc3e0d146..0ccfc30cd40f 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -1123,7 +1123,7 @@ struct input_dev { | |||
| 1123 | struct mutex mutex; | 1123 | struct mutex mutex; |
| 1124 | 1124 | ||
| 1125 | unsigned int users; | 1125 | unsigned int users; |
| 1126 | int going_away; | 1126 | bool going_away; |
| 1127 | 1127 | ||
| 1128 | struct device dev; | 1128 | struct device dev; |
| 1129 | 1129 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 8e9e151f811e..7ca72b74eec7 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | #include <linux/irqreturn.h> | 10 | #include <linux/irqreturn.h> |
| 11 | #include <linux/irqnr.h> | 11 | #include <linux/irqnr.h> |
| 12 | #include <linux/hardirq.h> | 12 | #include <linux/hardirq.h> |
| 13 | #include <linux/sched.h> | ||
| 14 | #include <linux/irqflags.h> | 13 | #include <linux/irqflags.h> |
| 15 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
| 16 | #include <linux/percpu.h> | 15 | #include <linux/percpu.h> |
| @@ -84,7 +83,6 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); | |||
| 84 | * struct irqaction - per interrupt action descriptor | 83 | * struct irqaction - per interrupt action descriptor |
| 85 | * @handler: interrupt handler function | 84 | * @handler: interrupt handler function |
| 86 | * @flags: flags (see IRQF_* above) | 85 | * @flags: flags (see IRQF_* above) |
| 87 | * @mask: no comment as it is useless and about to be removed | ||
| 88 | * @name: name of the device | 86 | * @name: name of the device |
| 89 | * @dev_id: cookie to identify the device | 87 | * @dev_id: cookie to identify the device |
| 90 | * @next: pointer to the next irqaction for shared interrupts | 88 | * @next: pointer to the next irqaction for shared interrupts |
| @@ -97,7 +95,6 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); | |||
| 97 | struct irqaction { | 95 | struct irqaction { |
| 98 | irq_handler_t handler; | 96 | irq_handler_t handler; |
| 99 | unsigned long flags; | 97 | unsigned long flags; |
| 100 | cpumask_t mask; | ||
| 101 | const char *name; | 98 | const char *name; |
| 102 | void *dev_id; | 99 | void *dev_id; |
| 103 | struct irqaction *next; | 100 | struct irqaction *next; |
| @@ -612,6 +609,7 @@ extern void debug_poll_all_shared_irqs(void); | |||
| 612 | static inline void debug_poll_all_shared_irqs(void) { } | 609 | static inline void debug_poll_all_shared_irqs(void) { } |
| 613 | #endif | 610 | #endif |
| 614 | 611 | ||
| 612 | struct seq_file; | ||
| 615 | int show_interrupts(struct seq_file *p, void *v); | 613 | int show_interrupts(struct seq_file *p, void *v); |
| 616 | 614 | ||
| 617 | struct irq_desc; | 615 | struct irq_desc; |
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index b8826107b518..3b1594d662b0 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
| @@ -78,8 +78,6 @@ struct ipc_kludge { | |||
| 78 | #define IPCCALL(version,op) ((version)<<16 | (op)) | 78 | #define IPCCALL(version,op) ((version)<<16 | (op)) |
| 79 | 79 | ||
| 80 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
| 81 | |||
| 82 | #include <linux/kref.h> | ||
| 83 | #include <linux/spinlock.h> | 81 | #include <linux/spinlock.h> |
| 84 | 82 | ||
| 85 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ | 83 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 52695d3dfd0b..f1011f7f3d41 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -464,9 +464,9 @@ struct handle_s | |||
| 464 | */ | 464 | */ |
| 465 | struct transaction_chp_stats_s { | 465 | struct transaction_chp_stats_s { |
| 466 | unsigned long cs_chp_time; | 466 | unsigned long cs_chp_time; |
| 467 | unsigned long cs_forced_to_close; | 467 | __u32 cs_forced_to_close; |
| 468 | unsigned long cs_written; | 468 | __u32 cs_written; |
| 469 | unsigned long cs_dropped; | 469 | __u32 cs_dropped; |
| 470 | }; | 470 | }; |
| 471 | 471 | ||
| 472 | /* The transaction_t type is the guts of the journaling mechanism. It | 472 | /* The transaction_t type is the guts of the journaling mechanism. It |
| @@ -668,23 +668,16 @@ struct transaction_run_stats_s { | |||
| 668 | unsigned long rs_flushing; | 668 | unsigned long rs_flushing; |
| 669 | unsigned long rs_logging; | 669 | unsigned long rs_logging; |
| 670 | 670 | ||
| 671 | unsigned long rs_handle_count; | 671 | __u32 rs_handle_count; |
| 672 | unsigned long rs_blocks; | 672 | __u32 rs_blocks; |
| 673 | unsigned long rs_blocks_logged; | 673 | __u32 rs_blocks_logged; |
| 674 | }; | 674 | }; |
| 675 | 675 | ||
| 676 | struct transaction_stats_s { | 676 | struct transaction_stats_s { |
| 677 | int ts_type; | ||
| 678 | unsigned long ts_tid; | 677 | unsigned long ts_tid; |
| 679 | union { | 678 | struct transaction_run_stats_s run; |
| 680 | struct transaction_run_stats_s run; | ||
| 681 | struct transaction_chp_stats_s chp; | ||
| 682 | } u; | ||
| 683 | }; | 679 | }; |
| 684 | 680 | ||
| 685 | #define JBD2_STATS_RUN 1 | ||
| 686 | #define JBD2_STATS_CHECKPOINT 2 | ||
| 687 | |||
| 688 | static inline unsigned long | 681 | static inline unsigned long |
| 689 | jbd2_time_diff(unsigned long start, unsigned long end) | 682 | jbd2_time_diff(unsigned long start, unsigned long end) |
| 690 | { | 683 | { |
| @@ -988,12 +981,6 @@ struct journal_s | |||
| 988 | /* | 981 | /* |
| 989 | * Journal statistics | 982 | * Journal statistics |
| 990 | */ | 983 | */ |
| 991 | struct transaction_stats_s *j_history; | ||
| 992 | int j_history_max; | ||
| 993 | int j_history_cur; | ||
| 994 | /* | ||
| 995 | * Protect the transactions statistics history | ||
| 996 | */ | ||
| 997 | spinlock_t j_history_lock; | 984 | spinlock_t j_history_lock; |
| 998 | struct proc_dir_entry *j_proc_entry; | 985 | struct proc_dir_entry *j_proc_entry; |
| 999 | struct transaction_stats_s j_stats; | 986 | struct transaction_stats_s j_stats; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d3cd23f30039..f4e3184fa054 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -659,6 +659,12 @@ extern int do_sysinfo(struct sysinfo *info); | |||
| 659 | 659 | ||
| 660 | #endif /* __KERNEL__ */ | 660 | #endif /* __KERNEL__ */ |
| 661 | 661 | ||
| 662 | #ifndef __EXPORTED_HEADERS__ | ||
| 663 | #ifndef __KERNEL__ | ||
| 664 | #warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders | ||
| 665 | #endif /* __KERNEL__ */ | ||
| 666 | #endif /* __EXPORTED_HEADERS__ */ | ||
| 667 | |||
| 662 | #define SI_LOAD_SHIFT 16 | 668 | #define SI_LOAD_SHIFT 16 |
| 663 | struct sysinfo { | 669 | struct sysinfo { |
| 664 | long uptime; /* Seconds since boot */ | 670 | long uptime; /* Seconds since boot */ |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 0cef6badd6fb..b0cb0ebad9e6 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
| @@ -16,7 +16,6 @@ | |||
| 16 | #define _KREF_H_ | 16 | #define _KREF_H_ |
| 17 | 17 | ||
| 18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
| 19 | #include <asm/atomic.h> | ||
| 20 | 19 | ||
| 21 | struct kref { | 20 | struct kref { |
| 22 | atomic_t refcount; | 21 | atomic_t refcount; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 76319bf03e37..87698640c091 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -418,6 +418,17 @@ enum { | |||
| 418 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | | 418 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | |
| 419 | ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE | | 419 | ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE | |
| 420 | ATA_TIMING_UDMA, | 420 | ATA_TIMING_UDMA, |
| 421 | |||
| 422 | /* ACPI constants */ | ||
| 423 | ATA_ACPI_FILTER_SETXFER = 1 << 0, | ||
| 424 | ATA_ACPI_FILTER_LOCK = 1 << 1, | ||
| 425 | ATA_ACPI_FILTER_DIPM = 1 << 2, | ||
| 426 | ATA_ACPI_FILTER_FPDMA_OFFSET = 1 << 3, /* FPDMA non-zero offset */ | ||
| 427 | ATA_ACPI_FILTER_FPDMA_AA = 1 << 4, /* FPDMA auto activate */ | ||
| 428 | |||
| 429 | ATA_ACPI_FILTER_DEFAULT = ATA_ACPI_FILTER_SETXFER | | ||
| 430 | ATA_ACPI_FILTER_LOCK | | ||
| 431 | ATA_ACPI_FILTER_DIPM, | ||
| 421 | }; | 432 | }; |
| 422 | 433 | ||
| 423 | enum ata_xfer_mask { | 434 | enum ata_xfer_mask { |
| @@ -587,6 +598,7 @@ struct ata_device { | |||
| 587 | #ifdef CONFIG_ATA_ACPI | 598 | #ifdef CONFIG_ATA_ACPI |
| 588 | acpi_handle acpi_handle; | 599 | acpi_handle acpi_handle; |
| 589 | union acpi_object *gtf_cache; | 600 | union acpi_object *gtf_cache; |
| 601 | unsigned int gtf_filter; | ||
| 590 | #endif | 602 | #endif |
| 591 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ | 603 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
| 592 | u64 n_sectors; /* size of device, if ATA */ | 604 | u64 n_sectors; /* size of device, if ATA */ |
diff --git a/include/linux/libps2.h b/include/linux/libps2.h index fcf5fbe6a50c..79603a6c356f 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h | |||
| @@ -44,6 +44,8 @@ struct ps2dev { | |||
| 44 | void ps2_init(struct ps2dev *ps2dev, struct serio *serio); | 44 | void ps2_init(struct ps2dev *ps2dev, struct serio *serio); |
| 45 | int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout); | 45 | int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout); |
| 46 | void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout); | 46 | void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout); |
| 47 | void ps2_begin_command(struct ps2dev *ps2dev); | ||
| 48 | void ps2_end_command(struct ps2dev *ps2dev); | ||
| 47 | int __ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); | 49 | int __ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); |
| 48 | int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); | 50 | int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); |
| 49 | int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); | 51 | int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 691f59171c6c..5126cceb6ae9 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
| @@ -57,6 +57,7 @@ | |||
| 57 | 57 | ||
| 58 | #ifdef __ASSEMBLY__ | 58 | #ifdef __ASSEMBLY__ |
| 59 | 59 | ||
| 60 | #ifndef LINKER_SCRIPT | ||
| 60 | #define ALIGN __ALIGN | 61 | #define ALIGN __ALIGN |
| 61 | #define ALIGN_STR __ALIGN_STR | 62 | #define ALIGN_STR __ALIGN_STR |
| 62 | 63 | ||
| @@ -66,6 +67,7 @@ | |||
| 66 | ALIGN; \ | 67 | ALIGN; \ |
| 67 | name: | 68 | name: |
| 68 | #endif | 69 | #endif |
| 70 | #endif /* LINKER_SCRIPT */ | ||
| 69 | 71 | ||
| 70 | #ifndef WEAK | 72 | #ifndef WEAK |
| 71 | #define WEAK(name) \ | 73 | #define WEAK(name) \ |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index e46a0734ab6e..bf9213b2db8f 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -118,6 +118,9 @@ static inline bool mem_cgroup_disabled(void) | |||
| 118 | 118 | ||
| 119 | extern bool mem_cgroup_oom_called(struct task_struct *task); | 119 | extern bool mem_cgroup_oom_called(struct task_struct *task); |
| 120 | void mem_cgroup_update_mapped_file_stat(struct page *page, int val); | 120 | void mem_cgroup_update_mapped_file_stat(struct page *page, int val); |
| 121 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | ||
| 122 | gfp_t gfp_mask, int nid, | ||
| 123 | int zid); | ||
| 121 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 124 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
| 122 | struct mem_cgroup; | 125 | struct mem_cgroup; |
| 123 | 126 | ||
| @@ -276,6 +279,13 @@ static inline void mem_cgroup_update_mapped_file_stat(struct page *page, | |||
| 276 | { | 279 | { |
| 277 | } | 280 | } |
| 278 | 281 | ||
| 282 | static inline | ||
| 283 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | ||
| 284 | gfp_t gfp_mask, int nid, int zid) | ||
| 285 | { | ||
| 286 | return 0; | ||
| 287 | } | ||
| 288 | |||
| 279 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 289 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
| 280 | 290 | ||
| 281 | #endif /* _LINUX_MEMCONTROL_H */ | 291 | #endif /* _LINUX_MEMCONTROL_H */ |
diff --git a/include/linux/mfd/wm831x/status.h b/include/linux/mfd/wm831x/status.h new file mode 100644 index 000000000000..6bc090d0e3ac --- /dev/null +++ b/include/linux/mfd/wm831x/status.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/mfd/wm831x/status.h -- Status LEDs for WM831x | ||
| 3 | * | ||
| 4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License as published by the | ||
| 10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 11 | * option) any later version. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __MFD_WM831X_STATUS_H__ | ||
| 16 | #define __MFD_WM831X_STATUS_H__ | ||
| 17 | |||
| 18 | #define WM831X_LED_SRC_MASK 0xC000 /* LED_SRC - [15:14] */ | ||
| 19 | #define WM831X_LED_SRC_SHIFT 14 /* LED_SRC - [15:14] */ | ||
| 20 | #define WM831X_LED_SRC_WIDTH 2 /* LED_SRC - [15:14] */ | ||
| 21 | #define WM831X_LED_MODE_MASK 0x0300 /* LED_MODE - [9:8] */ | ||
| 22 | #define WM831X_LED_MODE_SHIFT 8 /* LED_MODE - [9:8] */ | ||
| 23 | #define WM831X_LED_MODE_WIDTH 2 /* LED_MODE - [9:8] */ | ||
| 24 | #define WM831X_LED_SEQ_LEN_MASK 0x0030 /* LED_SEQ_LEN - [5:4] */ | ||
| 25 | #define WM831X_LED_SEQ_LEN_SHIFT 4 /* LED_SEQ_LEN - [5:4] */ | ||
| 26 | #define WM831X_LED_SEQ_LEN_WIDTH 2 /* LED_SEQ_LEN - [5:4] */ | ||
| 27 | #define WM831X_LED_DUR_MASK 0x000C /* LED_DUR - [3:2] */ | ||
| 28 | #define WM831X_LED_DUR_SHIFT 2 /* LED_DUR - [3:2] */ | ||
| 29 | #define WM831X_LED_DUR_WIDTH 2 /* LED_DUR - [3:2] */ | ||
| 30 | #define WM831X_LED_DUTY_CYC_MASK 0x0003 /* LED_DUTY_CYC - [1:0] */ | ||
| 31 | #define WM831X_LED_DUTY_CYC_SHIFT 0 /* LED_DUTY_CYC - [1:0] */ | ||
| 32 | #define WM831X_LED_DUTY_CYC_WIDTH 2 /* LED_DUTY_CYC - [1:0] */ | ||
| 33 | |||
| 34 | #endif | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index b6eae5e3144b..24c395694f4d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -288,7 +288,7 @@ static inline int is_vmalloc_addr(const void *x) | |||
| 288 | #ifdef CONFIG_MMU | 288 | #ifdef CONFIG_MMU |
| 289 | extern int is_vmalloc_or_module_addr(const void *x); | 289 | extern int is_vmalloc_or_module_addr(const void *x); |
| 290 | #else | 290 | #else |
| 291 | static int is_vmalloc_or_module_addr(const void *x) | 291 | static inline int is_vmalloc_or_module_addr(const void *x) |
| 292 | { | 292 | { |
| 293 | return 0; | 293 | return 0; |
| 294 | } | 294 | } |
| @@ -695,11 +695,12 @@ static inline int page_mapped(struct page *page) | |||
| 695 | #define VM_FAULT_SIGBUS 0x0002 | 695 | #define VM_FAULT_SIGBUS 0x0002 |
| 696 | #define VM_FAULT_MAJOR 0x0004 | 696 | #define VM_FAULT_MAJOR 0x0004 |
| 697 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 697 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
| 698 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned page */ | ||
| 698 | 699 | ||
| 699 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 700 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
| 700 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 701 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
| 701 | 702 | ||
| 702 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS) | 703 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON) |
| 703 | 704 | ||
| 704 | /* | 705 | /* |
| 705 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. | 706 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. |
| @@ -791,8 +792,14 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, | |||
| 791 | unmap_mapping_range(mapping, holebegin, holelen, 0); | 792 | unmap_mapping_range(mapping, holebegin, holelen, 0); |
| 792 | } | 793 | } |
| 793 | 794 | ||
| 794 | extern int vmtruncate(struct inode * inode, loff_t offset); | 795 | extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new); |
| 795 | extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); | 796 | extern int vmtruncate(struct inode *inode, loff_t offset); |
| 797 | extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end); | ||
| 798 | |||
| 799 | int truncate_inode_page(struct address_space *mapping, struct page *page); | ||
| 800 | int generic_error_remove_page(struct address_space *mapping, struct page *page); | ||
| 801 | |||
| 802 | int invalidate_inode_page(struct page *page); | ||
| 796 | 803 | ||
| 797 | #ifdef CONFIG_MMU | 804 | #ifdef CONFIG_MMU |
| 798 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 805 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
| @@ -1279,7 +1286,7 @@ int in_gate_area_no_task(unsigned long addr); | |||
| 1279 | #define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);}) | 1286 | #define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);}) |
| 1280 | #endif /* __HAVE_ARCH_GATE_AREA */ | 1287 | #endif /* __HAVE_ARCH_GATE_AREA */ |
| 1281 | 1288 | ||
| 1282 | int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, | 1289 | int drop_caches_sysctl_handler(struct ctl_table *, int, |
| 1283 | void __user *, size_t *, loff_t *); | 1290 | void __user *, size_t *, loff_t *); |
| 1284 | unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, | 1291 | unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, |
| 1285 | unsigned long lru_pages); | 1292 | unsigned long lru_pages); |
| @@ -1308,5 +1315,12 @@ void vmemmap_populate_print_last(void); | |||
| 1308 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, | 1315 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, |
| 1309 | size_t size); | 1316 | size_t size); |
| 1310 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); | 1317 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); |
| 1318 | |||
| 1319 | extern void memory_failure(unsigned long pfn, int trapno); | ||
| 1320 | extern int __memory_failure(unsigned long pfn, int trapno, int ref); | ||
| 1321 | extern int sysctl_memory_failure_early_kill; | ||
| 1322 | extern int sysctl_memory_failure_recovery; | ||
| 1323 | extern atomic_long_t mce_bad_pages; | ||
| 1324 | |||
| 1311 | #endif /* __KERNEL__ */ | 1325 | #endif /* __KERNEL__ */ |
| 1312 | #endif /* _LINUX_MM_H */ | 1326 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 0042090a4d70..84a524afb3dc 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -171,7 +171,7 @@ struct vm_area_struct { | |||
| 171 | struct anon_vma *anon_vma; /* Serialized by page_table_lock */ | 171 | struct anon_vma *anon_vma; /* Serialized by page_table_lock */ |
| 172 | 172 | ||
| 173 | /* Function pointers to deal with this struct. */ | 173 | /* Function pointers to deal with this struct. */ |
| 174 | struct vm_operations_struct * vm_ops; | 174 | const struct vm_operations_struct *vm_ops; |
| 175 | 175 | ||
| 176 | /* Information about our backing store: */ | 176 | /* Information about our backing store: */ |
| 177 | unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE | 177 | unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE |
| @@ -240,6 +240,8 @@ struct mm_struct { | |||
| 240 | 240 | ||
| 241 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ | 241 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ |
| 242 | 242 | ||
| 243 | struct linux_binfmt *binfmt; | ||
| 244 | |||
| 243 | cpumask_t cpu_vm_mask; | 245 | cpumask_t cpu_vm_mask; |
| 244 | 246 | ||
| 245 | /* Architecture-specific MM context */ | 247 | /* Architecture-specific MM context */ |
| @@ -259,11 +261,10 @@ struct mm_struct { | |||
| 259 | unsigned long flags; /* Must use atomic bitops to access the bits */ | 261 | unsigned long flags; /* Must use atomic bitops to access the bits */ |
| 260 | 262 | ||
| 261 | struct core_state *core_state; /* coredumping support */ | 263 | struct core_state *core_state; /* coredumping support */ |
| 262 | 264 | #ifdef CONFIG_AIO | |
| 263 | /* aio bits */ | ||
| 264 | spinlock_t ioctx_lock; | 265 | spinlock_t ioctx_lock; |
| 265 | struct hlist_head ioctx_list; | 266 | struct hlist_head ioctx_list; |
| 266 | 267 | #endif | |
| 267 | #ifdef CONFIG_MM_OWNER | 268 | #ifdef CONFIG_MM_OWNER |
| 268 | /* | 269 | /* |
| 269 | * "owner" points to a task that is regarded as the canonical | 270 | * "owner" points to a task that is regarded as the canonical |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 81bb42358595..eaf36364b7d4 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #define LINUX_MMC_HOST_H | 11 | #define LINUX_MMC_HOST_H |
| 12 | 12 | ||
| 13 | #include <linux/leds.h> | 13 | #include <linux/leds.h> |
| 14 | #include <linux/sched.h> | ||
| 14 | 15 | ||
| 15 | #include <linux/mmc/core.h> | 16 | #include <linux/mmc/core.h> |
| 16 | 17 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 652ef01be582..6f7561730d88 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -755,21 +755,20 @@ static inline int is_dma(struct zone *zone) | |||
| 755 | 755 | ||
| 756 | /* These two functions are used to setup the per zone pages min values */ | 756 | /* These two functions are used to setup the per zone pages min values */ |
| 757 | struct ctl_table; | 757 | struct ctl_table; |
| 758 | struct file; | 758 | int min_free_kbytes_sysctl_handler(struct ctl_table *, int, |
| 759 | int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, | ||
| 760 | void __user *, size_t *, loff_t *); | 759 | void __user *, size_t *, loff_t *); |
| 761 | extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; | 760 | extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; |
| 762 | int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, | 761 | int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, |
| 763 | void __user *, size_t *, loff_t *); | 762 | void __user *, size_t *, loff_t *); |
| 764 | int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *, | 763 | int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, |
| 765 | void __user *, size_t *, loff_t *); | 764 | void __user *, size_t *, loff_t *); |
| 766 | int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, | 765 | int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, |
| 767 | struct file *, void __user *, size_t *, loff_t *); | 766 | void __user *, size_t *, loff_t *); |
| 768 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, | 767 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, |
| 769 | struct file *, void __user *, size_t *, loff_t *); | 768 | void __user *, size_t *, loff_t *); |
| 770 | 769 | ||
| 771 | extern int numa_zonelist_order_handler(struct ctl_table *, int, | 770 | extern int numa_zonelist_order_handler(struct ctl_table *, int, |
| 772 | struct file *, void __user *, size_t *, loff_t *); | 771 | void __user *, size_t *, loff_t *); |
| 773 | extern char numa_zonelist_order[]; | 772 | extern char numa_zonelist_order[]; |
| 774 | #define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */ | 773 | #define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */ |
| 775 | 774 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index 1c755b2f937d..482efc865acf 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -128,7 +128,10 @@ extern struct module __this_module; | |||
| 128 | */ | 128 | */ |
| 129 | #define MODULE_LICENSE(_license) MODULE_INFO(license, _license) | 129 | #define MODULE_LICENSE(_license) MODULE_INFO(license, _license) |
| 130 | 130 | ||
| 131 | /* Author, ideally of form NAME[, NAME]*[ and NAME] */ | 131 | /* |
| 132 | * Author(s), use "Name <email>" or just "Name", for multiple | ||
| 133 | * authors use multiple MODULE_AUTHOR() statements/lines. | ||
| 134 | */ | ||
| 132 | #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) | 135 | #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) |
| 133 | 136 | ||
| 134 | /* What your module does. */ | 137 | /* What your module does. */ |
| @@ -308,10 +311,14 @@ struct module | |||
| 308 | #endif | 311 | #endif |
| 309 | 312 | ||
| 310 | #ifdef CONFIG_KALLSYMS | 313 | #ifdef CONFIG_KALLSYMS |
| 311 | /* We keep the symbol and string tables for kallsyms. */ | 314 | /* |
| 312 | Elf_Sym *symtab; | 315 | * We keep the symbol and string tables for kallsyms. |
| 313 | unsigned int num_symtab; | 316 | * The core_* fields below are temporary, loader-only (they |
| 314 | char *strtab; | 317 | * could really be discarded after module init). |
| 318 | */ | ||
| 319 | Elf_Sym *symtab, *core_symtab; | ||
| 320 | unsigned int num_symtab, core_num_syms; | ||
| 321 | char *strtab, *core_strtab; | ||
| 315 | 322 | ||
| 316 | /* Section attributes */ | 323 | /* Section attributes */ |
| 317 | struct module_sect_attrs *sect_attrs; | 324 | struct module_sect_attrs *sect_attrs; |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 0d45b4e8d367..08bc776d05e2 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
| @@ -145,14 +145,14 @@ static inline int ip_mroute_opt(int opt) | |||
| 145 | #endif | 145 | #endif |
| 146 | 146 | ||
| 147 | #ifdef CONFIG_IP_MROUTE | 147 | #ifdef CONFIG_IP_MROUTE |
| 148 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); | 148 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int); |
| 149 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 149 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
| 150 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); | 150 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); |
| 151 | extern int ip_mr_init(void); | 151 | extern int ip_mr_init(void); |
| 152 | #else | 152 | #else |
| 153 | static inline | 153 | static inline |
| 154 | int ip_mroute_setsockopt(struct sock *sock, | 154 | int ip_mroute_setsockopt(struct sock *sock, |
| 155 | int optname, char __user *optval, int optlen) | 155 | int optname, char __user *optval, unsigned int optlen) |
| 156 | { | 156 | { |
| 157 | return -ENOPROTOOPT; | 157 | return -ENOPROTOOPT; |
| 158 | } | 158 | } |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 43dc97e32183..b191865a6ca3 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
| @@ -134,7 +134,7 @@ static inline int ip6_mroute_opt(int opt) | |||
| 134 | struct sock; | 134 | struct sock; |
| 135 | 135 | ||
| 136 | #ifdef CONFIG_IPV6_MROUTE | 136 | #ifdef CONFIG_IPV6_MROUTE |
| 137 | extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, int); | 137 | extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned int); |
| 138 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 138 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
| 139 | extern int ip6_mr_input(struct sk_buff *skb); | 139 | extern int ip6_mr_input(struct sk_buff *skb); |
| 140 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); | 140 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); |
| @@ -143,7 +143,7 @@ extern void ip6_mr_cleanup(void); | |||
| 143 | #else | 143 | #else |
| 144 | static inline | 144 | static inline |
| 145 | int ip6_mroute_setsockopt(struct sock *sock, | 145 | int ip6_mroute_setsockopt(struct sock *sock, |
| 146 | int optname, char __user *optval, int optlen) | 146 | int optname, char __user *optval, unsigned int optlen) |
| 147 | { | 147 | { |
| 148 | return -ENOPROTOOPT; | 148 | return -ENOPROTOOPT; |
| 149 | } | 149 | } |
diff --git a/include/linux/net.h b/include/linux/net.h index 9040a10584f7..529a0931711d 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -178,11 +178,11 @@ struct proto_ops { | |||
| 178 | int (*listen) (struct socket *sock, int len); | 178 | int (*listen) (struct socket *sock, int len); |
| 179 | int (*shutdown) (struct socket *sock, int flags); | 179 | int (*shutdown) (struct socket *sock, int flags); |
| 180 | int (*setsockopt)(struct socket *sock, int level, | 180 | int (*setsockopt)(struct socket *sock, int level, |
| 181 | int optname, char __user *optval, int optlen); | 181 | int optname, char __user *optval, unsigned int optlen); |
| 182 | int (*getsockopt)(struct socket *sock, int level, | 182 | int (*getsockopt)(struct socket *sock, int level, |
| 183 | int optname, char __user *optval, int __user *optlen); | 183 | int optname, char __user *optval, int __user *optlen); |
| 184 | int (*compat_setsockopt)(struct socket *sock, int level, | 184 | int (*compat_setsockopt)(struct socket *sock, int level, |
| 185 | int optname, char __user *optval, int optlen); | 185 | int optname, char __user *optval, unsigned int optlen); |
| 186 | int (*compat_getsockopt)(struct socket *sock, int level, | 186 | int (*compat_getsockopt)(struct socket *sock, int level, |
| 187 | int optname, char __user *optval, int __user *optlen); | 187 | int optname, char __user *optval, int __user *optlen); |
| 188 | int (*sendmsg) (struct kiocb *iocb, struct socket *sock, | 188 | int (*sendmsg) (struct kiocb *iocb, struct socket *sock, |
| @@ -256,7 +256,7 @@ extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr, | |||
| 256 | extern int kernel_getsockopt(struct socket *sock, int level, int optname, | 256 | extern int kernel_getsockopt(struct socket *sock, int level, int optname, |
| 257 | char *optval, int *optlen); | 257 | char *optval, int *optlen); |
| 258 | extern int kernel_setsockopt(struct socket *sock, int level, int optname, | 258 | extern int kernel_setsockopt(struct socket *sock, int level, int optname, |
| 259 | char *optval, int optlen); | 259 | char *optval, unsigned int optlen); |
| 260 | extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, | 260 | extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, |
| 261 | size_t size, int flags); | 261 | size_t size, int flags); |
| 262 | extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); | 262 | extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); |
| @@ -313,7 +313,7 @@ SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \ | |||
| 313 | SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ | 313 | SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ |
| 314 | SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ | 314 | SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ |
| 315 | SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ | 315 | SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ |
| 316 | char __user *optval, int optlen), (sock, level, optname, optval, optlen)) \ | 316 | char __user *optval, unsigned int optlen), (sock, level, optname, optval, optlen)) \ |
| 317 | SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \ | 317 | SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \ |
| 318 | char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \ | 318 | char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \ |
| 319 | SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \ | 319 | SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 94958c109761..812a5f3c2abe 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -557,7 +557,7 @@ struct netdev_queue { | |||
| 557 | * Callback uses when the transmitter has not made any progress | 557 | * Callback uses when the transmitter has not made any progress |
| 558 | * for dev->watchdog ticks. | 558 | * for dev->watchdog ticks. |
| 559 | * | 559 | * |
| 560 | * struct net_device_stats* (*get_stats)(struct net_device *dev); | 560 | * struct net_device_stats* (*ndo_get_stats)(struct net_device *dev); |
| 561 | * Called when a user wants to get the network device usage | 561 | * Called when a user wants to get the network device usage |
| 562 | * statistics. If not defined, the counters in dev->stats will | 562 | * statistics. If not defined, the counters in dev->stats will |
| 563 | * be used. | 563 | * be used. |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 48cfe51bfddc..6132b5e6d9d3 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
| @@ -221,12 +221,12 @@ __ret;}) | |||
| 221 | 221 | ||
| 222 | /* Call setsockopt() */ | 222 | /* Call setsockopt() */ |
| 223 | int nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt, | 223 | int nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt, |
| 224 | int len); | 224 | unsigned int len); |
| 225 | int nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt, | 225 | int nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt, |
| 226 | int *len); | 226 | int *len); |
| 227 | 227 | ||
| 228 | int compat_nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, | 228 | int compat_nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, |
| 229 | char __user *opt, int len); | 229 | char __user *opt, unsigned int len); |
| 230 | int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, | 230 | int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, |
| 231 | char __user *opt, int *len); | 231 | char __user *opt, int *len); |
| 232 | 232 | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 080f6ba9e73a..ab5d3126831f 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -187,6 +187,7 @@ extern struct sock *netlink_kernel_create(struct net *net, | |||
| 187 | extern void netlink_kernel_release(struct sock *sk); | 187 | extern void netlink_kernel_release(struct sock *sk); |
| 188 | extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups); | 188 | extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups); |
| 189 | extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); | 189 | extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); |
| 190 | extern void __netlink_clear_multicast_users(struct sock *sk, unsigned int group); | ||
| 190 | extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group); | 191 | extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group); |
| 191 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); | 192 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); |
| 192 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); | 193 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index f6b90240dd41..d09db1bc9083 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -40,7 +40,6 @@ | |||
| 40 | #ifdef __KERNEL__ | 40 | #ifdef __KERNEL__ |
| 41 | 41 | ||
| 42 | #include <linux/in.h> | 42 | #include <linux/in.h> |
| 43 | #include <linux/kref.h> | ||
| 44 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
| 45 | #include <linux/pagemap.h> | 44 | #include <linux/pagemap.h> |
| 46 | #include <linux/rbtree.h> | 45 | #include <linux/rbtree.h> |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 13de789f0a5c..6b202b173955 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -51,6 +51,9 @@ | |||
| 51 | * PG_buddy is set to indicate that the page is free and in the buddy system | 51 | * PG_buddy is set to indicate that the page is free and in the buddy system |
| 52 | * (see mm/page_alloc.c). | 52 | * (see mm/page_alloc.c). |
| 53 | * | 53 | * |
| 54 | * PG_hwpoison indicates that a page got corrupted in hardware and contains | ||
| 55 | * data with incorrect ECC bits that triggered a machine check. Accessing is | ||
| 56 | * not safe since it may cause another machine check. Don't touch! | ||
| 54 | */ | 57 | */ |
| 55 | 58 | ||
| 56 | /* | 59 | /* |
| @@ -102,6 +105,9 @@ enum pageflags { | |||
| 102 | #ifdef CONFIG_ARCH_USES_PG_UNCACHED | 105 | #ifdef CONFIG_ARCH_USES_PG_UNCACHED |
| 103 | PG_uncached, /* Page has been mapped as uncached */ | 106 | PG_uncached, /* Page has been mapped as uncached */ |
| 104 | #endif | 107 | #endif |
| 108 | #ifdef CONFIG_MEMORY_FAILURE | ||
| 109 | PG_hwpoison, /* hardware poisoned page. Don't touch */ | ||
| 110 | #endif | ||
| 105 | __NR_PAGEFLAGS, | 111 | __NR_PAGEFLAGS, |
| 106 | 112 | ||
| 107 | /* Filesystems */ | 113 | /* Filesystems */ |
| @@ -269,6 +275,15 @@ PAGEFLAG(Uncached, uncached) | |||
| 269 | PAGEFLAG_FALSE(Uncached) | 275 | PAGEFLAG_FALSE(Uncached) |
| 270 | #endif | 276 | #endif |
| 271 | 277 | ||
| 278 | #ifdef CONFIG_MEMORY_FAILURE | ||
| 279 | PAGEFLAG(HWPoison, hwpoison) | ||
| 280 | TESTSETFLAG(HWPoison, hwpoison) | ||
| 281 | #define __PG_HWPOISON (1UL << PG_hwpoison) | ||
| 282 | #else | ||
| 283 | PAGEFLAG_FALSE(HWPoison) | ||
| 284 | #define __PG_HWPOISON 0 | ||
| 285 | #endif | ||
| 286 | |||
| 272 | static inline int PageUptodate(struct page *page) | 287 | static inline int PageUptodate(struct page *page) |
| 273 | { | 288 | { |
| 274 | int ret = test_bit(PG_uptodate, &(page)->flags); | 289 | int ret = test_bit(PG_uptodate, &(page)->flags); |
| @@ -393,7 +408,7 @@ static inline void __ClearPageTail(struct page *page) | |||
| 393 | 1 << PG_private | 1 << PG_private_2 | \ | 408 | 1 << PG_private | 1 << PG_private_2 | \ |
| 394 | 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \ | 409 | 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \ |
| 395 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ | 410 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ |
| 396 | 1 << PG_unevictable | __PG_MLOCKED) | 411 | 1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON) |
| 397 | 412 | ||
| 398 | /* | 413 | /* |
| 399 | * Flags checked when a page is prepped for return by the page allocator. | 414 | * Flags checked when a page is prepped for return by the page allocator. |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index ada779f24178..4b938d4f3ac2 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -38,6 +38,7 @@ enum { | |||
| 38 | PCG_LOCK, /* page cgroup is locked */ | 38 | PCG_LOCK, /* page cgroup is locked */ |
| 39 | PCG_CACHE, /* charged as cache */ | 39 | PCG_CACHE, /* charged as cache */ |
| 40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
| 41 | PCG_ACCT_LRU, /* page has been accounted for */ | ||
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 43 | #define TESTPCGFLAG(uname, lname) \ | 44 | #define TESTPCGFLAG(uname, lname) \ |
| @@ -52,11 +53,23 @@ static inline void SetPageCgroup##uname(struct page_cgroup *pc)\ | |||
| 52 | static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \ | 53 | static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \ |
| 53 | { clear_bit(PCG_##lname, &pc->flags); } | 54 | { clear_bit(PCG_##lname, &pc->flags); } |
| 54 | 55 | ||
| 56 | #define TESTCLEARPCGFLAG(uname, lname) \ | ||
| 57 | static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \ | ||
| 58 | { return test_and_clear_bit(PCG_##lname, &pc->flags); } | ||
| 59 | |||
| 55 | /* Cache flag is set only once (at allocation) */ | 60 | /* Cache flag is set only once (at allocation) */ |
| 56 | TESTPCGFLAG(Cache, CACHE) | 61 | TESTPCGFLAG(Cache, CACHE) |
| 62 | CLEARPCGFLAG(Cache, CACHE) | ||
| 63 | SETPCGFLAG(Cache, CACHE) | ||
| 57 | 64 | ||
| 58 | TESTPCGFLAG(Used, USED) | 65 | TESTPCGFLAG(Used, USED) |
| 59 | CLEARPCGFLAG(Used, USED) | 66 | CLEARPCGFLAG(Used, USED) |
| 67 | SETPCGFLAG(Used, USED) | ||
| 68 | |||
| 69 | SETPCGFLAG(AcctLRU, ACCT_LRU) | ||
| 70 | CLEARPCGFLAG(AcctLRU, ACCT_LRU) | ||
| 71 | TESTPCGFLAG(AcctLRU, ACCT_LRU) | ||
| 72 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) | ||
| 60 | 73 | ||
| 61 | static inline int page_cgroup_nid(struct page_cgroup *pc) | 74 | static inline int page_cgroup_nid(struct page_cgroup *pc) |
| 62 | { | 75 | { |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7803565aa877..f490e7a7307a 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -776,6 +776,7 @@ | |||
| 776 | #define PCI_DEVICE_ID_TI_X515 0x8036 | 776 | #define PCI_DEVICE_ID_TI_X515 0x8036 |
| 777 | #define PCI_DEVICE_ID_TI_XX12 0x8039 | 777 | #define PCI_DEVICE_ID_TI_XX12 0x8039 |
| 778 | #define PCI_DEVICE_ID_TI_XX12_FM 0x803b | 778 | #define PCI_DEVICE_ID_TI_XX12_FM 0x803b |
| 779 | #define PCI_DEVICE_ID_TI_XIO2000A 0x8231 | ||
| 779 | #define PCI_DEVICE_ID_TI_1130 0xac12 | 780 | #define PCI_DEVICE_ID_TI_1130 0xac12 |
| 780 | #define PCI_DEVICE_ID_TI_1031 0xac13 | 781 | #define PCI_DEVICE_ID_TI_1031 0xac13 |
| 781 | #define PCI_DEVICE_ID_TI_1131 0xac15 | 782 | #define PCI_DEVICE_ID_TI_1131 0xac15 |
| @@ -2527,6 +2528,16 @@ | |||
| 2527 | #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e | 2528 | #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e |
| 2528 | #define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b | 2529 | #define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b |
| 2529 | #define PCI_DEVICE_ID_INTEL_FBD_CNB 0x360c | 2530 | #define PCI_DEVICE_ID_INTEL_FBD_CNB 0x360c |
| 2531 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF0 0x3710 | ||
| 2532 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF1 0x3711 | ||
| 2533 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF2 0x3712 | ||
| 2534 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF3 0x3713 | ||
| 2535 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF4 0x3714 | ||
| 2536 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF5 0x3715 | ||
| 2537 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF6 0x3716 | ||
| 2538 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF7 0x3717 | ||
| 2539 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF8 0x3718 | ||
| 2540 | #define PCI_DEVICE_ID_INTEL_IOAT_JSF9 0x3719 | ||
| 2530 | #define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14 | 2541 | #define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14 |
| 2531 | #define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 | 2542 | #define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 |
| 2532 | #define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18 | 2543 | #define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18 |
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 368bd70f1d2d..7b7fbf433cff 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
| @@ -361,7 +361,7 @@ enum perf_event_type { | |||
| 361 | * struct perf_event_header header; | 361 | * struct perf_event_header header; |
| 362 | * u32 pid, ppid; | 362 | * u32 pid, ppid; |
| 363 | * u32 tid, ptid; | 363 | * u32 tid, ptid; |
| 364 | * { u64 time; } && PERF_SAMPLE_TIME | 364 | * u64 time; |
| 365 | * }; | 365 | * }; |
| 366 | */ | 366 | */ |
| 367 | PERF_EVENT_FORK = 7, | 367 | PERF_EVENT_FORK = 7, |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index acefaf71e6dd..2e6d95f97419 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -357,7 +357,7 @@ enum perf_event_type { | |||
| 357 | * struct perf_event_header header; | 357 | * struct perf_event_header header; |
| 358 | * u32 pid, ppid; | 358 | * u32 pid, ppid; |
| 359 | * u32 tid, ptid; | 359 | * u32 tid, ptid; |
| 360 | * { u64 time; } && PERF_SAMPLE_TIME | 360 | * u64 time; |
| 361 | * }; | 361 | * }; |
| 362 | */ | 362 | */ |
| 363 | PERF_RECORD_FORK = 7, | 363 | PERF_RECORD_FORK = 7, |
| @@ -442,6 +442,7 @@ enum perf_callchain_context { | |||
| 442 | #include <linux/hrtimer.h> | 442 | #include <linux/hrtimer.h> |
| 443 | #include <linux/fs.h> | 443 | #include <linux/fs.h> |
| 444 | #include <linux/pid_namespace.h> | 444 | #include <linux/pid_namespace.h> |
| 445 | #include <linux/workqueue.h> | ||
| 445 | #include <asm/atomic.h> | 446 | #include <asm/atomic.h> |
| 446 | 447 | ||
| 447 | #define PERF_MAX_STACK_DEPTH 255 | 448 | #define PERF_MAX_STACK_DEPTH 255 |
| @@ -513,6 +514,10 @@ struct file; | |||
| 513 | 514 | ||
| 514 | struct perf_mmap_data { | 515 | struct perf_mmap_data { |
| 515 | struct rcu_head rcu_head; | 516 | struct rcu_head rcu_head; |
| 517 | #ifdef CONFIG_PERF_USE_VMALLOC | ||
| 518 | struct work_struct work; | ||
| 519 | #endif | ||
| 520 | int data_order; | ||
| 516 | int nr_pages; /* nr of data pages */ | 521 | int nr_pages; /* nr of data pages */ |
| 517 | int writable; /* are we writable */ | 522 | int writable; /* are we writable */ |
| 518 | int nr_locked; /* nr pages mlocked */ | 523 | int nr_locked; /* nr pages mlocked */ |
diff --git a/include/linux/phonet.h b/include/linux/phonet.h index 1ef5a0781831..e5126cff9b2a 100644 --- a/include/linux/phonet.h +++ b/include/linux/phonet.h | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #define PNPIPE_IFINDEX 2 | 38 | #define PNPIPE_IFINDEX 2 |
| 39 | 39 | ||
| 40 | #define PNADDR_ANY 0 | 40 | #define PNADDR_ANY 0 |
| 41 | #define PNADDR_BROADCAST 0xFC | ||
| 41 | #define PNPORT_RESOURCE_ROUTING 0 | 42 | #define PNPORT_RESOURCE_ROUTING 0 |
| 42 | 43 | ||
| 43 | /* Values for PNPIPE_ENCAP option */ | 44 | /* Values for PNPIPE_ENCAP option */ |
diff --git a/include/linux/poll.h b/include/linux/poll.h index fa287f25138d..6673743946f7 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
| @@ -6,10 +6,10 @@ | |||
| 6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
| 7 | 7 | ||
| 8 | #include <linux/compiler.h> | 8 | #include <linux/compiler.h> |
| 9 | #include <linux/ktime.h> | ||
| 9 | #include <linux/wait.h> | 10 | #include <linux/wait.h> |
| 10 | #include <linux/string.h> | 11 | #include <linux/string.h> |
| 11 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
| 12 | #include <linux/sched.h> | ||
| 13 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
| 14 | 14 | ||
| 15 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating | 15 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 07bff666e65b..931150566ade 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
| @@ -88,4 +88,6 @@ | |||
| 88 | #define PR_TASK_PERF_EVENTS_DISABLE 31 | 88 | #define PR_TASK_PERF_EVENTS_DISABLE 31 |
| 89 | #define PR_TASK_PERF_EVENTS_ENABLE 32 | 89 | #define PR_TASK_PERF_EVENTS_ENABLE 32 |
| 90 | 90 | ||
| 91 | #define PR_MCE_KILL 33 | ||
| 92 | |||
| 91 | #endif /* _LINUX_PRCTL_H */ | 93 | #endif /* _LINUX_PRCTL_H */ |
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index 37aaf2b39863..4e768dda87b0 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
| @@ -17,7 +17,7 @@ extern int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma); | |||
| 17 | #endif | 17 | #endif |
| 18 | 18 | ||
| 19 | extern const struct file_operations ramfs_file_operations; | 19 | extern const struct file_operations ramfs_file_operations; |
| 20 | extern struct vm_operations_struct generic_file_vm_ops; | 20 | extern const struct vm_operations_struct generic_file_vm_ops; |
| 21 | extern int __init init_rootfs(void); | 21 | extern int __init init_rootfs(void); |
| 22 | 22 | ||
| 23 | #endif | 23 | #endif |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 6fe0363724e9..3ebd0b7bcb08 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -77,7 +77,7 @@ extern int rcu_scheduler_active; | |||
| 77 | #error "Unknown RCU implementation specified to kernel configuration" | 77 | #error "Unknown RCU implementation specified to kernel configuration" |
| 78 | #endif | 78 | #endif |
| 79 | 79 | ||
| 80 | #define RCU_HEAD_INIT { .next = NULL, .func = NULL } | 80 | #define RCU_HEAD_INIT { .next = NULL, .func = NULL } |
| 81 | #define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT | 81 | #define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT |
| 82 | #define INIT_RCU_HEAD(ptr) do { \ | 82 | #define INIT_RCU_HEAD(ptr) do { \ |
| 83 | (ptr)->next = NULL; (ptr)->func = NULL; \ | 83 | (ptr)->next = NULL; (ptr)->func = NULL; \ |
| @@ -129,12 +129,6 @@ static inline void rcu_read_lock(void) | |||
| 129 | rcu_read_acquire(); | 129 | rcu_read_acquire(); |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | /** | ||
| 133 | * rcu_read_unlock - marks the end of an RCU read-side critical section. | ||
| 134 | * | ||
| 135 | * See rcu_read_lock() for more information. | ||
| 136 | */ | ||
| 137 | |||
| 138 | /* | 132 | /* |
| 139 | * So where is rcu_write_lock()? It does not exist, as there is no | 133 | * So where is rcu_write_lock()? It does not exist, as there is no |
| 140 | * way for writers to lock out RCU readers. This is a feature, not | 134 | * way for writers to lock out RCU readers. This is a feature, not |
| @@ -144,6 +138,12 @@ static inline void rcu_read_lock(void) | |||
| 144 | * used as well. RCU does not care how the writers keep out of each | 138 | * used as well. RCU does not care how the writers keep out of each |
| 145 | * others' way, as long as they do so. | 139 | * others' way, as long as they do so. |
| 146 | */ | 140 | */ |
| 141 | |||
| 142 | /** | ||
| 143 | * rcu_read_unlock - marks the end of an RCU read-side critical section. | ||
| 144 | * | ||
| 145 | * See rcu_read_lock() for more information. | ||
| 146 | */ | ||
| 147 | static inline void rcu_read_unlock(void) | 147 | static inline void rcu_read_unlock(void) |
| 148 | { | 148 | { |
| 149 | rcu_read_release(); | 149 | rcu_read_release(); |
| @@ -196,6 +196,8 @@ static inline void rcu_read_lock_sched(void) | |||
| 196 | __acquire(RCU_SCHED); | 196 | __acquire(RCU_SCHED); |
| 197 | rcu_read_acquire(); | 197 | rcu_read_acquire(); |
| 198 | } | 198 | } |
| 199 | |||
| 200 | /* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */ | ||
| 199 | static inline notrace void rcu_read_lock_sched_notrace(void) | 201 | static inline notrace void rcu_read_lock_sched_notrace(void) |
| 200 | { | 202 | { |
| 201 | preempt_disable_notrace(); | 203 | preempt_disable_notrace(); |
| @@ -213,6 +215,8 @@ static inline void rcu_read_unlock_sched(void) | |||
| 213 | __release(RCU_SCHED); | 215 | __release(RCU_SCHED); |
| 214 | preempt_enable(); | 216 | preempt_enable(); |
| 215 | } | 217 | } |
| 218 | |||
| 219 | /* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */ | ||
| 216 | static inline notrace void rcu_read_unlock_sched_notrace(void) | 220 | static inline notrace void rcu_read_unlock_sched_notrace(void) |
| 217 | { | 221 | { |
| 218 | __release(RCU_SCHED); | 222 | __release(RCU_SCHED); |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 37682770e9d2..46e9ab3ee6e1 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -30,10 +30,14 @@ | |||
| 30 | #ifndef __LINUX_RCUTREE_H | 30 | #ifndef __LINUX_RCUTREE_H |
| 31 | #define __LINUX_RCUTREE_H | 31 | #define __LINUX_RCUTREE_H |
| 32 | 32 | ||
| 33 | struct notifier_block; | ||
| 34 | |||
| 33 | extern void rcu_sched_qs(int cpu); | 35 | extern void rcu_sched_qs(int cpu); |
| 34 | extern void rcu_bh_qs(int cpu); | 36 | extern void rcu_bh_qs(int cpu); |
| 35 | 37 | extern int rcu_cpu_notify(struct notifier_block *self, | |
| 38 | unsigned long action, void *hcpu); | ||
| 36 | extern int rcu_needs_cpu(int cpu); | 39 | extern int rcu_needs_cpu(int cpu); |
| 40 | extern int rcu_expedited_torture_stats(char *page); | ||
| 37 | 41 | ||
| 38 | #ifdef CONFIG_TREE_PREEMPT_RCU | 42 | #ifdef CONFIG_TREE_PREEMPT_RCU |
| 39 | 43 | ||
| @@ -85,16 +89,11 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
| 85 | 89 | ||
| 86 | extern void __rcu_init(void); | 90 | extern void __rcu_init(void); |
| 87 | extern void rcu_check_callbacks(int cpu, int user); | 91 | extern void rcu_check_callbacks(int cpu, int user); |
| 88 | extern void rcu_restart_cpu(int cpu); | ||
| 89 | 92 | ||
| 90 | extern long rcu_batches_completed(void); | 93 | extern long rcu_batches_completed(void); |
| 91 | extern long rcu_batches_completed_bh(void); | 94 | extern long rcu_batches_completed_bh(void); |
| 92 | extern long rcu_batches_completed_sched(void); | 95 | extern long rcu_batches_completed_sched(void); |
| 93 | 96 | ||
| 94 | static inline void rcu_init_sched(void) | ||
| 95 | { | ||
| 96 | } | ||
| 97 | |||
| 98 | #ifdef CONFIG_NO_HZ | 97 | #ifdef CONFIG_NO_HZ |
| 99 | void rcu_enter_nohz(void); | 98 | void rcu_enter_nohz(void); |
| 100 | void rcu_exit_nohz(void); | 99 | void rcu_exit_nohz(void); |
| @@ -107,7 +106,7 @@ static inline void rcu_exit_nohz(void) | |||
| 107 | } | 106 | } |
| 108 | #endif /* CONFIG_NO_HZ */ | 107 | #endif /* CONFIG_NO_HZ */ |
| 109 | 108 | ||
| 110 | /* A context switch is a grace period for rcutree. */ | 109 | /* A context switch is a grace period for RCU-sched and RCU-bh. */ |
| 111 | static inline int rcu_blocking_is_gp(void) | 110 | static inline int rcu_blocking_is_gp(void) |
| 112 | { | 111 | { |
| 113 | return num_online_cpus() == 1; | 112 | return num_online_cpus() == 1; |
diff --git a/include/linux/relay.h b/include/linux/relay.h index 953fc055e875..14a86bc7102b 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
| @@ -140,7 +140,7 @@ struct rchan_callbacks | |||
| 140 | * cause relay_open() to create a single global buffer rather | 140 | * cause relay_open() to create a single global buffer rather |
| 141 | * than the default set of per-cpu buffers. | 141 | * than the default set of per-cpu buffers. |
| 142 | * | 142 | * |
| 143 | * See Documentation/filesystems/relayfs.txt for more info. | 143 | * See Documentation/filesystems/relay.txt for more info. |
| 144 | */ | 144 | */ |
| 145 | struct dentry *(*create_buf_file)(const char *filename, | 145 | struct dentry *(*create_buf_file)(const char *filename, |
| 146 | struct dentry *parent, | 146 | struct dentry *parent, |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 511f42fc6816..fcb9884df618 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
| @@ -35,6 +35,10 @@ struct res_counter { | |||
| 35 | */ | 35 | */ |
| 36 | unsigned long long limit; | 36 | unsigned long long limit; |
| 37 | /* | 37 | /* |
| 38 | * the limit that usage can be exceed | ||
| 39 | */ | ||
| 40 | unsigned long long soft_limit; | ||
| 41 | /* | ||
| 38 | * the number of unsuccessful attempts to consume the resource | 42 | * the number of unsuccessful attempts to consume the resource |
| 39 | */ | 43 | */ |
| 40 | unsigned long long failcnt; | 44 | unsigned long long failcnt; |
| @@ -87,6 +91,7 @@ enum { | |||
| 87 | RES_MAX_USAGE, | 91 | RES_MAX_USAGE, |
| 88 | RES_LIMIT, | 92 | RES_LIMIT, |
| 89 | RES_FAILCNT, | 93 | RES_FAILCNT, |
| 94 | RES_SOFT_LIMIT, | ||
| 90 | }; | 95 | }; |
| 91 | 96 | ||
| 92 | /* | 97 | /* |
| @@ -132,6 +137,36 @@ static inline bool res_counter_limit_check_locked(struct res_counter *cnt) | |||
| 132 | return false; | 137 | return false; |
| 133 | } | 138 | } |
| 134 | 139 | ||
| 140 | static inline bool res_counter_soft_limit_check_locked(struct res_counter *cnt) | ||
| 141 | { | ||
| 142 | if (cnt->usage < cnt->soft_limit) | ||
| 143 | return true; | ||
| 144 | |||
| 145 | return false; | ||
| 146 | } | ||
| 147 | |||
| 148 | /** | ||
| 149 | * Get the difference between the usage and the soft limit | ||
| 150 | * @cnt: The counter | ||
| 151 | * | ||
| 152 | * Returns 0 if usage is less than or equal to soft limit | ||
| 153 | * The difference between usage and soft limit, otherwise. | ||
| 154 | */ | ||
| 155 | static inline unsigned long long | ||
| 156 | res_counter_soft_limit_excess(struct res_counter *cnt) | ||
| 157 | { | ||
| 158 | unsigned long long excess; | ||
| 159 | unsigned long flags; | ||
| 160 | |||
| 161 | spin_lock_irqsave(&cnt->lock, flags); | ||
| 162 | if (cnt->usage <= cnt->soft_limit) | ||
| 163 | excess = 0; | ||
| 164 | else | ||
| 165 | excess = cnt->usage - cnt->soft_limit; | ||
| 166 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
| 167 | return excess; | ||
| 168 | } | ||
| 169 | |||
| 135 | /* | 170 | /* |
| 136 | * Helper function to detect if the cgroup is within it's limit or | 171 | * Helper function to detect if the cgroup is within it's limit or |
| 137 | * not. It's currently called from cgroup_rss_prepare() | 172 | * not. It's currently called from cgroup_rss_prepare() |
| @@ -147,6 +182,17 @@ static inline bool res_counter_check_under_limit(struct res_counter *cnt) | |||
| 147 | return ret; | 182 | return ret; |
| 148 | } | 183 | } |
| 149 | 184 | ||
| 185 | static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) | ||
| 186 | { | ||
| 187 | bool ret; | ||
| 188 | unsigned long flags; | ||
| 189 | |||
| 190 | spin_lock_irqsave(&cnt->lock, flags); | ||
| 191 | ret = res_counter_soft_limit_check_locked(cnt); | ||
| 192 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
| 193 | return ret; | ||
| 194 | } | ||
| 195 | |||
| 150 | static inline void res_counter_reset_max(struct res_counter *cnt) | 196 | static inline void res_counter_reset_max(struct res_counter *cnt) |
| 151 | { | 197 | { |
| 152 | unsigned long flags; | 198 | unsigned long flags; |
| @@ -180,4 +226,16 @@ static inline int res_counter_set_limit(struct res_counter *cnt, | |||
| 180 | return ret; | 226 | return ret; |
| 181 | } | 227 | } |
| 182 | 228 | ||
| 229 | static inline int | ||
| 230 | res_counter_set_soft_limit(struct res_counter *cnt, | ||
| 231 | unsigned long long soft_limit) | ||
| 232 | { | ||
| 233 | unsigned long flags; | ||
| 234 | |||
| 235 | spin_lock_irqsave(&cnt->lock, flags); | ||
| 236 | cnt->soft_limit = soft_limit; | ||
| 237 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
| 238 | return 0; | ||
| 239 | } | ||
| 240 | |||
| 183 | #endif | 241 | #endif |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 477841d29fce..cb0ba7032609 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
| @@ -81,7 +81,19 @@ static inline void page_dup_rmap(struct page *page) | |||
| 81 | */ | 81 | */ |
| 82 | int page_referenced(struct page *, int is_locked, | 82 | int page_referenced(struct page *, int is_locked, |
| 83 | struct mem_cgroup *cnt, unsigned long *vm_flags); | 83 | struct mem_cgroup *cnt, unsigned long *vm_flags); |
| 84 | int try_to_unmap(struct page *, int ignore_refs); | 84 | enum ttu_flags { |
| 85 | TTU_UNMAP = 0, /* unmap mode */ | ||
| 86 | TTU_MIGRATION = 1, /* migration mode */ | ||
| 87 | TTU_MUNLOCK = 2, /* munlock mode */ | ||
| 88 | TTU_ACTION_MASK = 0xff, | ||
| 89 | |||
| 90 | TTU_IGNORE_MLOCK = (1 << 8), /* ignore mlock */ | ||
| 91 | TTU_IGNORE_ACCESS = (1 << 9), /* don't age */ | ||
| 92 | TTU_IGNORE_HWPOISON = (1 << 10),/* corrupted page is recoverable */ | ||
| 93 | }; | ||
| 94 | #define TTU_ACTION(x) ((x) & TTU_ACTION_MASK) | ||
| 95 | |||
| 96 | int try_to_unmap(struct page *, enum ttu_flags flags); | ||
| 85 | 97 | ||
| 86 | /* | 98 | /* |
| 87 | * Called from mm/filemap_xip.c to unmap empty zero page | 99 | * Called from mm/filemap_xip.c to unmap empty zero page |
| @@ -108,6 +120,13 @@ int page_mkclean(struct page *); | |||
| 108 | */ | 120 | */ |
| 109 | int try_to_munlock(struct page *); | 121 | int try_to_munlock(struct page *); |
| 110 | 122 | ||
| 123 | /* | ||
| 124 | * Called by memory-failure.c to kill processes. | ||
| 125 | */ | ||
| 126 | struct anon_vma *page_lock_anon_vma(struct page *page); | ||
| 127 | void page_unlock_anon_vma(struct anon_vma *anon_vma); | ||
| 128 | int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); | ||
| 129 | |||
| 111 | #else /* !CONFIG_MMU */ | 130 | #else /* !CONFIG_MMU */ |
| 112 | 131 | ||
| 113 | #define anon_vma_init() do {} while (0) | 132 | #define anon_vma_init() do {} while (0) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index cbf2a3b46280..75e6e60bf583 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -309,7 +309,7 @@ extern void softlockup_tick(void); | |||
| 309 | extern void touch_softlockup_watchdog(void); | 309 | extern void touch_softlockup_watchdog(void); |
| 310 | extern void touch_all_softlockup_watchdogs(void); | 310 | extern void touch_all_softlockup_watchdogs(void); |
| 311 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, | 311 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, |
| 312 | struct file *filp, void __user *buffer, | 312 | void __user *buffer, |
| 313 | size_t *lenp, loff_t *ppos); | 313 | size_t *lenp, loff_t *ppos); |
| 314 | extern unsigned int softlockup_panic; | 314 | extern unsigned int softlockup_panic; |
| 315 | extern int softlockup_thresh; | 315 | extern int softlockup_thresh; |
| @@ -331,7 +331,7 @@ extern unsigned long sysctl_hung_task_check_count; | |||
| 331 | extern unsigned long sysctl_hung_task_timeout_secs; | 331 | extern unsigned long sysctl_hung_task_timeout_secs; |
| 332 | extern unsigned long sysctl_hung_task_warnings; | 332 | extern unsigned long sysctl_hung_task_warnings; |
| 333 | extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, | 333 | extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, |
| 334 | struct file *filp, void __user *buffer, | 334 | void __user *buffer, |
| 335 | size_t *lenp, loff_t *ppos); | 335 | size_t *lenp, loff_t *ppos); |
| 336 | #endif | 336 | #endif |
| 337 | 337 | ||
| @@ -1271,7 +1271,6 @@ struct task_struct { | |||
| 1271 | struct mm_struct *mm, *active_mm; | 1271 | struct mm_struct *mm, *active_mm; |
| 1272 | 1272 | ||
| 1273 | /* task state */ | 1273 | /* task state */ |
| 1274 | struct linux_binfmt *binfmt; | ||
| 1275 | int exit_state; | 1274 | int exit_state; |
| 1276 | int exit_code, exit_signal; | 1275 | int exit_code, exit_signal; |
| 1277 | int pdeath_signal; /* The signal sent when the parent dies */ | 1276 | int pdeath_signal; /* The signal sent when the parent dies */ |
| @@ -1735,6 +1734,7 @@ extern cputime_t task_gtime(struct task_struct *p); | |||
| 1735 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ | 1734 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ |
| 1736 | #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ | 1735 | #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ |
| 1737 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ | 1736 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ |
| 1737 | #define PF_MCE_PROCESS 0x00000080 /* process policy on mce errors */ | ||
| 1738 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ | 1738 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ |
| 1739 | #define PF_DUMPCORE 0x00000200 /* dumped core */ | 1739 | #define PF_DUMPCORE 0x00000200 /* dumped core */ |
| 1740 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ | 1740 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ |
| @@ -1754,6 +1754,7 @@ extern cputime_t task_gtime(struct task_struct *p); | |||
| 1754 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 1754 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
| 1755 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 1755 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
| 1756 | #define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */ | 1756 | #define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */ |
| 1757 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ | ||
| 1757 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 1758 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
| 1758 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1759 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
| 1759 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ | 1760 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ |
| @@ -1817,10 +1818,13 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p, | |||
| 1817 | return 0; | 1818 | return 0; |
| 1818 | } | 1819 | } |
| 1819 | #endif | 1820 | #endif |
| 1821 | |||
| 1822 | #ifndef CONFIG_CPUMASK_OFFSTACK | ||
| 1820 | static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | 1823 | static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) |
| 1821 | { | 1824 | { |
| 1822 | return set_cpus_allowed_ptr(p, &new_mask); | 1825 | return set_cpus_allowed_ptr(p, &new_mask); |
| 1823 | } | 1826 | } |
| 1827 | #endif | ||
| 1824 | 1828 | ||
| 1825 | /* | 1829 | /* |
| 1826 | * Architectures can set this to 1 if they have specified | 1830 | * Architectures can set this to 1 if they have specified |
| @@ -1903,7 +1907,7 @@ extern unsigned int sysctl_sched_time_avg; | |||
| 1903 | extern unsigned int sysctl_timer_migration; | 1907 | extern unsigned int sysctl_timer_migration; |
| 1904 | 1908 | ||
| 1905 | int sched_nr_latency_handler(struct ctl_table *table, int write, | 1909 | int sched_nr_latency_handler(struct ctl_table *table, int write, |
| 1906 | struct file *file, void __user *buffer, size_t *length, | 1910 | void __user *buffer, size_t *length, |
| 1907 | loff_t *ppos); | 1911 | loff_t *ppos); |
| 1908 | #endif | 1912 | #endif |
| 1909 | #ifdef CONFIG_SCHED_DEBUG | 1913 | #ifdef CONFIG_SCHED_DEBUG |
| @@ -1921,7 +1925,7 @@ extern unsigned int sysctl_sched_rt_period; | |||
| 1921 | extern int sysctl_sched_rt_runtime; | 1925 | extern int sysctl_sched_rt_runtime; |
| 1922 | 1926 | ||
| 1923 | int sched_rt_handler(struct ctl_table *table, int write, | 1927 | int sched_rt_handler(struct ctl_table *table, int write, |
| 1924 | struct file *filp, void __user *buffer, size_t *lenp, | 1928 | void __user *buffer, size_t *lenp, |
| 1925 | loff_t *ppos); | 1929 | loff_t *ppos); |
| 1926 | 1930 | ||
| 1927 | extern unsigned int sysctl_sched_compat_yield; | 1931 | extern unsigned int sysctl_sched_compat_yield; |
| @@ -2056,6 +2060,7 @@ extern int kill_pgrp(struct pid *pid, int sig, int priv); | |||
| 2056 | extern int kill_pid(struct pid *pid, int sig, int priv); | 2060 | extern int kill_pid(struct pid *pid, int sig, int priv); |
| 2057 | extern int kill_proc_info(int, struct siginfo *, pid_t); | 2061 | extern int kill_proc_info(int, struct siginfo *, pid_t); |
| 2058 | extern int do_notify_parent(struct task_struct *, int); | 2062 | extern int do_notify_parent(struct task_struct *, int); |
| 2063 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); | ||
| 2059 | extern void force_sig(int, struct task_struct *); | 2064 | extern void force_sig(int, struct task_struct *); |
| 2060 | extern void force_sig_specific(int, struct task_struct *); | 2065 | extern void force_sig_specific(int, struct task_struct *); |
| 2061 | extern int send_sig(int, struct task_struct *, int); | 2066 | extern int send_sig(int, struct task_struct *, int); |
| @@ -2333,7 +2338,10 @@ static inline int signal_pending(struct task_struct *p) | |||
| 2333 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); | 2338 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); |
| 2334 | } | 2339 | } |
| 2335 | 2340 | ||
| 2336 | extern int __fatal_signal_pending(struct task_struct *p); | 2341 | static inline int __fatal_signal_pending(struct task_struct *p) |
| 2342 | { | ||
| 2343 | return unlikely(sigismember(&p->pending.signal, SIGKILL)); | ||
| 2344 | } | ||
| 2337 | 2345 | ||
| 2338 | static inline int fatal_signal_pending(struct task_struct *p) | 2346 | static inline int fatal_signal_pending(struct task_struct *p) |
| 2339 | { | 2347 | { |
diff --git a/include/linux/security.h b/include/linux/security.h index d050b66ab9ef..239e40d0450b 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -133,7 +133,7 @@ static inline unsigned long round_hint_to_min(unsigned long hint) | |||
| 133 | return PAGE_ALIGN(mmap_min_addr); | 133 | return PAGE_ALIGN(mmap_min_addr); |
| 134 | return hint; | 134 | return hint; |
| 135 | } | 135 | } |
| 136 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp, | 136 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, |
| 137 | void __user *buffer, size_t *lenp, loff_t *ppos); | 137 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| 138 | 138 | ||
| 139 | #ifdef CONFIG_SECURITY | 139 | #ifdef CONFIG_SECURITY |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 0c6a86b79596..8366d8f12e53 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -35,6 +35,44 @@ struct seq_operations { | |||
| 35 | 35 | ||
| 36 | #define SEQ_SKIP 1 | 36 | #define SEQ_SKIP 1 |
| 37 | 37 | ||
| 38 | /** | ||
| 39 | * seq_get_buf - get buffer to write arbitrary data to | ||
| 40 | * @m: the seq_file handle | ||
| 41 | * @bufp: the beginning of the buffer is stored here | ||
| 42 | * | ||
| 43 | * Return the number of bytes available in the buffer, or zero if | ||
| 44 | * there's no space. | ||
| 45 | */ | ||
| 46 | static inline size_t seq_get_buf(struct seq_file *m, char **bufp) | ||
| 47 | { | ||
| 48 | BUG_ON(m->count > m->size); | ||
| 49 | if (m->count < m->size) | ||
| 50 | *bufp = m->buf + m->count; | ||
| 51 | else | ||
| 52 | *bufp = NULL; | ||
| 53 | |||
| 54 | return m->size - m->count; | ||
| 55 | } | ||
| 56 | |||
| 57 | /** | ||
| 58 | * seq_commit - commit data to the buffer | ||
| 59 | * @m: the seq_file handle | ||
| 60 | * @num: the number of bytes to commit | ||
| 61 | * | ||
| 62 | * Commit @num bytes of data written to a buffer previously acquired | ||
| 63 | * by seq_buf_get. To signal an error condition, or that the data | ||
| 64 | * didn't fit in the available space, pass a negative @num value. | ||
| 65 | */ | ||
| 66 | static inline void seq_commit(struct seq_file *m, int num) | ||
| 67 | { | ||
| 68 | if (num < 0) { | ||
| 69 | m->count = m->size; | ||
| 70 | } else { | ||
| 71 | BUG_ON(m->count + num > m->size); | ||
| 72 | m->count += num; | ||
| 73 | } | ||
| 74 | } | ||
| 75 | |||
| 38 | char *mangle_path(char *s, char *p, char *esc); | 76 | char *mangle_path(char *s, char *p, char *esc); |
| 39 | int seq_open(struct file *, const struct seq_operations *); | 77 | int seq_open(struct file *, const struct seq_operations *); |
| 40 | ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); | 78 | ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index fe661afe0713..db532ce288be 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -176,6 +176,9 @@ | |||
| 176 | /* Qualcomm MSM SoCs */ | 176 | /* Qualcomm MSM SoCs */ |
| 177 | #define PORT_MSM 88 | 177 | #define PORT_MSM 88 |
| 178 | 178 | ||
| 179 | /* BCM63xx family SoCs */ | ||
| 180 | #define PORT_BCM63XX 89 | ||
| 181 | |||
| 179 | #ifdef __KERNEL__ | 182 | #ifdef __KERNEL__ |
| 180 | 183 | ||
| 181 | #include <linux/compiler.h> | 184 | #include <linux/compiler.h> |
diff --git a/include/linux/signal.h b/include/linux/signal.h index c7552836bd95..ab9272cc270c 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -233,6 +233,8 @@ static inline int valid_signal(unsigned long sig) | |||
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | extern int next_signal(struct sigpending *pending, sigset_t *mask); | 235 | extern int next_signal(struct sigpending *pending, sigset_t *mask); |
| 236 | extern int do_send_sig_info(int sig, struct siginfo *info, | ||
| 237 | struct task_struct *p, bool group); | ||
| 236 | extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); | 238 | extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); |
| 237 | extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); | 239 | extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); |
| 238 | extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, | 240 | extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 9e3d8af09207..39c64bae776d 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -73,15 +73,6 @@ int smp_call_function(void(*func)(void *info), void *info, int wait); | |||
| 73 | void smp_call_function_many(const struct cpumask *mask, | 73 | void smp_call_function_many(const struct cpumask *mask, |
| 74 | void (*func)(void *info), void *info, bool wait); | 74 | void (*func)(void *info), void *info, bool wait); |
| 75 | 75 | ||
| 76 | /* Deprecated: Use smp_call_function_many which takes a pointer to the mask. */ | ||
| 77 | static inline int | ||
| 78 | smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, | ||
| 79 | int wait) | ||
| 80 | { | ||
| 81 | smp_call_function_many(&mask, func, info, wait); | ||
| 82 | return 0; | ||
| 83 | } | ||
| 84 | |||
| 85 | void __smp_call_function_single(int cpuid, struct call_single_data *data, | 76 | void __smp_call_function_single(int cpuid, struct call_single_data *data, |
| 86 | int wait); | 77 | int wait); |
| 87 | 78 | ||
| @@ -144,8 +135,6 @@ static inline int up_smp_call_function(void (*func)(void *), void *info) | |||
| 144 | static inline void smp_send_reschedule(int cpu) { } | 135 | static inline void smp_send_reschedule(int cpu) { } |
| 145 | #define num_booting_cpus() 1 | 136 | #define num_booting_cpus() 1 |
| 146 | #define smp_prepare_boot_cpu() do {} while (0) | 137 | #define smp_prepare_boot_cpu() do {} while (0) |
| 147 | #define smp_call_function_mask(mask, func, info, wait) \ | ||
| 148 | (up_smp_call_function(func, info)) | ||
| 149 | #define smp_call_function_many(mask, func, info, wait) \ | 138 | #define smp_call_function_many(mask, func, info, wait) \ |
| 150 | (up_smp_call_function(func, info)) | 139 | (up_smp_call_function(func, info)) |
| 151 | static inline void init_call_single_data(void) | 140 | static inline void init_call_single_data(void) |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 3b461dffe244..3273a0c5043b 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { | |||
| 16 | /* _SS_MAXSIZE value minus size of ss_family */ | 16 | /* _SS_MAXSIZE value minus size of ss_family */ |
| 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ |
| 18 | 18 | ||
| 19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 19 | #ifdef __KERNEL__ |
| 20 | 20 | ||
| 21 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
| 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
| @@ -101,21 +101,6 @@ struct cmsghdr { | |||
| 101 | ((char *)(cmsg) - (char *)(mhdr)->msg_control))) | 101 | ((char *)(cmsg) - (char *)(mhdr)->msg_control))) |
| 102 | 102 | ||
| 103 | /* | 103 | /* |
| 104 | * This mess will go away with glibc | ||
| 105 | */ | ||
| 106 | |||
| 107 | #ifdef __KERNEL__ | ||
| 108 | #define __KINLINE static inline | ||
| 109 | #elif defined(__GNUC__) | ||
| 110 | #define __KINLINE static __inline__ | ||
| 111 | #elif defined(__cplusplus) | ||
| 112 | #define __KINLINE static inline | ||
| 113 | #else | ||
| 114 | #define __KINLINE static | ||
| 115 | #endif | ||
| 116 | |||
| 117 | |||
| 118 | /* | ||
| 119 | * Get the next cmsg header | 104 | * Get the next cmsg header |
| 120 | * | 105 | * |
| 121 | * PLEASE, do not touch this function. If you think, that it is | 106 | * PLEASE, do not touch this function. If you think, that it is |
| @@ -128,7 +113,7 @@ struct cmsghdr { | |||
| 128 | * ancillary object DATA. --ANK (980731) | 113 | * ancillary object DATA. --ANK (980731) |
| 129 | */ | 114 | */ |
| 130 | 115 | ||
| 131 | __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, | 116 | static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, |
| 132 | struct cmsghdr *__cmsg) | 117 | struct cmsghdr *__cmsg) |
| 133 | { | 118 | { |
| 134 | struct cmsghdr * __ptr; | 119 | struct cmsghdr * __ptr; |
| @@ -140,7 +125,7 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, | |||
| 140 | return __ptr; | 125 | return __ptr; |
| 141 | } | 126 | } |
| 142 | 127 | ||
| 143 | __KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) | 128 | static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) |
| 144 | { | 129 | { |
| 145 | return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); | 130 | return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); |
| 146 | } | 131 | } |
diff --git a/include/linux/spi/lms283gf05.h b/include/linux/spi/lms283gf05.h new file mode 100644 index 000000000000..555d254e6606 --- /dev/null +++ b/include/linux/spi/lms283gf05.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * lms283gf05.h - Platform glue for Samsung LMS283GF05 LCD | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Marek Vasut <marek.vasut@gmail.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _INCLUDE_LINUX_SPI_LMS283GF05_H_ | ||
| 21 | #define _INCLUDE_LINUX_SPI_LMS283GF05_H_ | ||
| 22 | |||
| 23 | struct lms283gf05_pdata { | ||
| 24 | unsigned long reset_gpio; | ||
| 25 | bool reset_inverted; | ||
| 26 | }; | ||
| 27 | |||
| 28 | #endif /* _INCLUDE_LINUX_SPI_LMS283GF05_H_ */ | ||
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 7da466ba4b0d..f5cc0898bc53 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/uio.h> | 12 | #include <linux/uio.h> |
| 13 | #include <asm/byteorder.h> | 13 | #include <asm/byteorder.h> |
| 14 | #include <asm/unaligned.h> | ||
| 14 | #include <linux/scatterlist.h> | 15 | #include <linux/scatterlist.h> |
| 15 | 16 | ||
| 16 | /* | 17 | /* |
| @@ -117,14 +118,14 @@ static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int le | |||
| 117 | static inline __be32 * | 118 | static inline __be32 * |
| 118 | xdr_encode_hyper(__be32 *p, __u64 val) | 119 | xdr_encode_hyper(__be32 *p, __u64 val) |
| 119 | { | 120 | { |
| 120 | *(__be64 *)p = cpu_to_be64(val); | 121 | put_unaligned_be64(val, p); |
| 121 | return p + 2; | 122 | return p + 2; |
| 122 | } | 123 | } |
| 123 | 124 | ||
| 124 | static inline __be32 * | 125 | static inline __be32 * |
| 125 | xdr_decode_hyper(__be32 *p, __u64 *valp) | 126 | xdr_decode_hyper(__be32 *p, __u64 *valp) |
| 126 | { | 127 | { |
| 127 | *valp = be64_to_cpup((__be64 *)p); | 128 | *valp = get_unaligned_be64(p); |
| 128 | return p + 2; | 129 | return p + 2; |
| 129 | } | 130 | } |
| 130 | 131 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 6c990e658f4e..4ec90019c1a4 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -34,16 +34,38 @@ static inline int current_is_kswapd(void) | |||
| 34 | * the type/offset into the pte as 5/27 as well. | 34 | * the type/offset into the pte as 5/27 as well. |
| 35 | */ | 35 | */ |
| 36 | #define MAX_SWAPFILES_SHIFT 5 | 36 | #define MAX_SWAPFILES_SHIFT 5 |
| 37 | #ifndef CONFIG_MIGRATION | 37 | |
| 38 | #define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT) | 38 | /* |
| 39 | * Use some of the swap files numbers for other purposes. This | ||
| 40 | * is a convenient way to hook into the VM to trigger special | ||
| 41 | * actions on faults. | ||
| 42 | */ | ||
| 43 | |||
| 44 | /* | ||
| 45 | * NUMA node memory migration support | ||
| 46 | */ | ||
| 47 | #ifdef CONFIG_MIGRATION | ||
| 48 | #define SWP_MIGRATION_NUM 2 | ||
| 49 | #define SWP_MIGRATION_READ (MAX_SWAPFILES + SWP_HWPOISON_NUM) | ||
| 50 | #define SWP_MIGRATION_WRITE (MAX_SWAPFILES + SWP_HWPOISON_NUM + 1) | ||
| 39 | #else | 51 | #else |
| 40 | /* Use last two entries for page migration swap entries */ | 52 | #define SWP_MIGRATION_NUM 0 |
| 41 | #define MAX_SWAPFILES ((1 << MAX_SWAPFILES_SHIFT)-2) | ||
| 42 | #define SWP_MIGRATION_READ MAX_SWAPFILES | ||
| 43 | #define SWP_MIGRATION_WRITE (MAX_SWAPFILES + 1) | ||
| 44 | #endif | 53 | #endif |
| 45 | 54 | ||
| 46 | /* | 55 | /* |
| 56 | * Handling of hardware poisoned pages with memory corruption. | ||
| 57 | */ | ||
| 58 | #ifdef CONFIG_MEMORY_FAILURE | ||
| 59 | #define SWP_HWPOISON_NUM 1 | ||
| 60 | #define SWP_HWPOISON MAX_SWAPFILES | ||
| 61 | #else | ||
| 62 | #define SWP_HWPOISON_NUM 0 | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #define MAX_SWAPFILES \ | ||
| 66 | ((1 << MAX_SWAPFILES_SHIFT) - SWP_MIGRATION_NUM - SWP_HWPOISON_NUM) | ||
| 67 | |||
| 68 | /* | ||
| 47 | * Magic header for a swap area. The first part of the union is | 69 | * Magic header for a swap area. The first part of the union is |
| 48 | * what the swap magic looks like for the old (limited to 128MB) | 70 | * what the swap magic looks like for the old (limited to 128MB) |
| 49 | * swap area format, the second part of the union adds - in the | 71 | * swap area format, the second part of the union adds - in the |
| @@ -217,6 +239,11 @@ extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | |||
| 217 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | 239 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, |
| 218 | gfp_t gfp_mask, bool noswap, | 240 | gfp_t gfp_mask, bool noswap, |
| 219 | unsigned int swappiness); | 241 | unsigned int swappiness); |
| 242 | extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, | ||
| 243 | gfp_t gfp_mask, bool noswap, | ||
| 244 | unsigned int swappiness, | ||
| 245 | struct zone *zone, | ||
| 246 | int nid); | ||
| 220 | extern int __isolate_lru_page(struct page *page, int mode, int file); | 247 | extern int __isolate_lru_page(struct page *page, int mode, int file); |
| 221 | extern unsigned long shrink_all_memory(unsigned long nr_pages); | 248 | extern unsigned long shrink_all_memory(unsigned long nr_pages); |
| 222 | extern int vm_swappiness; | 249 | extern int vm_swappiness; |
| @@ -240,7 +267,7 @@ extern int page_evictable(struct page *page, struct vm_area_struct *vma); | |||
| 240 | extern void scan_mapping_unevictable_pages(struct address_space *); | 267 | extern void scan_mapping_unevictable_pages(struct address_space *); |
| 241 | 268 | ||
| 242 | extern unsigned long scan_unevictable_pages; | 269 | extern unsigned long scan_unevictable_pages; |
| 243 | extern int scan_unevictable_handler(struct ctl_table *, int, struct file *, | 270 | extern int scan_unevictable_handler(struct ctl_table *, int, |
| 244 | void __user *, size_t *, loff_t *); | 271 | void __user *, size_t *, loff_t *); |
| 245 | extern int scan_unevictable_register_node(struct node *node); | 272 | extern int scan_unevictable_register_node(struct node *node); |
| 246 | extern void scan_unevictable_unregister_node(struct node *node); | 273 | extern void scan_unevictable_unregister_node(struct node *node); |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 6ec39ab27b4b..cd42e30b7c6e 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
| @@ -131,3 +131,41 @@ static inline int is_write_migration_entry(swp_entry_t entry) | |||
| 131 | 131 | ||
| 132 | #endif | 132 | #endif |
| 133 | 133 | ||
| 134 | #ifdef CONFIG_MEMORY_FAILURE | ||
| 135 | /* | ||
| 136 | * Support for hardware poisoned pages | ||
| 137 | */ | ||
| 138 | static inline swp_entry_t make_hwpoison_entry(struct page *page) | ||
| 139 | { | ||
| 140 | BUG_ON(!PageLocked(page)); | ||
| 141 | return swp_entry(SWP_HWPOISON, page_to_pfn(page)); | ||
| 142 | } | ||
| 143 | |||
| 144 | static inline int is_hwpoison_entry(swp_entry_t entry) | ||
| 145 | { | ||
| 146 | return swp_type(entry) == SWP_HWPOISON; | ||
| 147 | } | ||
| 148 | #else | ||
| 149 | |||
| 150 | static inline swp_entry_t make_hwpoison_entry(struct page *page) | ||
| 151 | { | ||
| 152 | return swp_entry(0, 0); | ||
| 153 | } | ||
| 154 | |||
| 155 | static inline int is_hwpoison_entry(swp_entry_t swp) | ||
| 156 | { | ||
| 157 | return 0; | ||
| 158 | } | ||
| 159 | #endif | ||
| 160 | |||
| 161 | #if defined(CONFIG_MEMORY_FAILURE) || defined(CONFIG_MIGRATION) | ||
| 162 | static inline int non_swap_entry(swp_entry_t entry) | ||
| 163 | { | ||
| 164 | return swp_type(entry) >= MAX_SWAPFILES; | ||
| 165 | } | ||
| 166 | #else | ||
| 167 | static inline int non_swap_entry(swp_entry_t entry) | ||
| 168 | { | ||
| 169 | return 0; | ||
| 170 | } | ||
| 171 | #endif | ||
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index e76d3b22a466..1e4743ee6831 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -29,7 +29,6 @@ | |||
| 29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
| 30 | #include <linux/compiler.h> | 30 | #include <linux/compiler.h> |
| 31 | 31 | ||
| 32 | struct file; | ||
| 33 | struct completion; | 32 | struct completion; |
| 34 | 33 | ||
| 35 | #define CTL_MAXNAME 10 /* how many path components do we allow in a | 34 | #define CTL_MAXNAME 10 /* how many path components do we allow in a |
| @@ -977,25 +976,25 @@ typedef int ctl_handler (struct ctl_table *table, | |||
| 977 | void __user *oldval, size_t __user *oldlenp, | 976 | void __user *oldval, size_t __user *oldlenp, |
| 978 | void __user *newval, size_t newlen); | 977 | void __user *newval, size_t newlen); |
| 979 | 978 | ||
| 980 | typedef int proc_handler (struct ctl_table *ctl, int write, struct file * filp, | 979 | typedef int proc_handler (struct ctl_table *ctl, int write, |
| 981 | void __user *buffer, size_t *lenp, loff_t *ppos); | 980 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| 982 | 981 | ||
| 983 | extern int proc_dostring(struct ctl_table *, int, struct file *, | 982 | extern int proc_dostring(struct ctl_table *, int, |
| 984 | void __user *, size_t *, loff_t *); | 983 | void __user *, size_t *, loff_t *); |
| 985 | extern int proc_dointvec(struct ctl_table *, int, struct file *, | 984 | extern int proc_dointvec(struct ctl_table *, int, |
| 986 | void __user *, size_t *, loff_t *); | 985 | void __user *, size_t *, loff_t *); |
| 987 | extern int proc_dointvec_minmax(struct ctl_table *, int, struct file *, | 986 | extern int proc_dointvec_minmax(struct ctl_table *, int, |
| 988 | void __user *, size_t *, loff_t *); | 987 | void __user *, size_t *, loff_t *); |
| 989 | extern int proc_dointvec_jiffies(struct ctl_table *, int, struct file *, | 988 | extern int proc_dointvec_jiffies(struct ctl_table *, int, |
| 990 | void __user *, size_t *, loff_t *); | 989 | void __user *, size_t *, loff_t *); |
| 991 | extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, struct file *, | 990 | extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, |
| 992 | void __user *, size_t *, loff_t *); | 991 | void __user *, size_t *, loff_t *); |
| 993 | extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, struct file *, | 992 | extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, |
| 994 | void __user *, size_t *, loff_t *); | 993 | void __user *, size_t *, loff_t *); |
| 995 | extern int proc_doulongvec_minmax(struct ctl_table *, int, struct file *, | 994 | extern int proc_doulongvec_minmax(struct ctl_table *, int, |
| 996 | void __user *, size_t *, loff_t *); | 995 | void __user *, size_t *, loff_t *); |
| 997 | extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, | 996 | extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, |
| 998 | struct file *, void __user *, size_t *, loff_t *); | 997 | void __user *, size_t *, loff_t *); |
| 999 | 998 | ||
| 1000 | extern int do_sysctl (int __user *name, int nlen, | 999 | extern int do_sysctl (int __user *name, int nlen, |
| 1001 | void __user *oldval, size_t __user *oldlenp, | 1000 | void __user *oldval, size_t __user *oldlenp, |
diff --git a/include/linux/time.h b/include/linux/time.h index 56787c093345..fe04e5ef6a59 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -155,6 +155,34 @@ extern void timekeeping_leap_insert(int leapsecond); | |||
| 155 | struct tms; | 155 | struct tms; |
| 156 | extern void do_sys_times(struct tms *); | 156 | extern void do_sys_times(struct tms *); |
| 157 | 157 | ||
| 158 | /* | ||
| 159 | * Similar to the struct tm in userspace <time.h>, but it needs to be here so | ||
| 160 | * that the kernel source is self contained. | ||
| 161 | */ | ||
| 162 | struct tm { | ||
| 163 | /* | ||
| 164 | * the number of seconds after the minute, normally in the range | ||
| 165 | * 0 to 59, but can be up to 60 to allow for leap seconds | ||
| 166 | */ | ||
| 167 | int tm_sec; | ||
| 168 | /* the number of minutes after the hour, in the range 0 to 59*/ | ||
| 169 | int tm_min; | ||
| 170 | /* the number of hours past midnight, in the range 0 to 23 */ | ||
| 171 | int tm_hour; | ||
| 172 | /* the day of the month, in the range 1 to 31 */ | ||
| 173 | int tm_mday; | ||
| 174 | /* the number of months since January, in the range 0 to 11 */ | ||
| 175 | int tm_mon; | ||
| 176 | /* the number of years since 1900 */ | ||
| 177 | long tm_year; | ||
| 178 | /* the number of days since Sunday, in the range 0 to 6 */ | ||
| 179 | int tm_wday; | ||
| 180 | /* the number of days since January 1, in the range 0 to 365 */ | ||
| 181 | int tm_yday; | ||
| 182 | }; | ||
| 183 | |||
| 184 | void time_to_tm(time_t totalsecs, int offset, struct tm *result); | ||
| 185 | |||
| 158 | /** | 186 | /** |
| 159 | * timespec_to_ns - Convert timespec to nanoseconds | 187 | * timespec_to_ns - Convert timespec to nanoseconds |
| 160 | * @ts: pointer to the timespec variable to be converted | 188 | * @ts: pointer to the timespec variable to be converted |
diff --git a/include/linux/topology.h b/include/linux/topology.h index 809b26c07090..fc0bf3edeb67 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
| @@ -211,12 +211,6 @@ int arch_update_cpu_topology(void); | |||
| 211 | #ifndef topology_core_id | 211 | #ifndef topology_core_id |
| 212 | #define topology_core_id(cpu) ((void)(cpu), 0) | 212 | #define topology_core_id(cpu) ((void)(cpu), 0) |
| 213 | #endif | 213 | #endif |
| 214 | #ifndef topology_thread_siblings | ||
| 215 | #define topology_thread_siblings(cpu) cpumask_of_cpu(cpu) | ||
| 216 | #endif | ||
| 217 | #ifndef topology_core_siblings | ||
| 218 | #define topology_core_siblings(cpu) cpumask_of_cpu(cpu) | ||
| 219 | #endif | ||
| 220 | #ifndef topology_thread_cpumask | 214 | #ifndef topology_thread_cpumask |
| 221 | #define topology_thread_cpumask(cpu) cpumask_of(cpu) | 215 | #define topology_thread_cpumask(cpu) cpumask_of(cpu) |
| 222 | #endif | 216 | #endif |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 17ba82efa483..1eb44a924e56 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Tracing hooks | 2 | * Tracing hooks |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2008 Red Hat, Inc. All rights reserved. | 4 | * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * This copyrighted material is made available to anyone wishing to use, | 6 | * This copyrighted material is made available to anyone wishing to use, |
| 7 | * modify, copy, or redistribute it subject to the terms and conditions | 7 | * modify, copy, or redistribute it subject to the terms and conditions |
| @@ -463,22 +463,38 @@ static inline int tracehook_get_signal(struct task_struct *task, | |||
| 463 | 463 | ||
| 464 | /** | 464 | /** |
| 465 | * tracehook_notify_jctl - report about job control stop/continue | 465 | * tracehook_notify_jctl - report about job control stop/continue |
| 466 | * @notify: nonzero if this is the last thread in the group to stop | 466 | * @notify: zero, %CLD_STOPPED or %CLD_CONTINUED |
| 467 | * @why: %CLD_STOPPED or %CLD_CONTINUED | 467 | * @why: %CLD_STOPPED or %CLD_CONTINUED |
| 468 | * | 468 | * |
| 469 | * This is called when we might call do_notify_parent_cldstop(). | 469 | * This is called when we might call do_notify_parent_cldstop(). |
| 470 | * It's called when about to stop for job control; we are already in | ||
| 471 | * %TASK_STOPPED state, about to call schedule(). It's also called when | ||
| 472 | * a delayed %CLD_STOPPED or %CLD_CONTINUED report is ready to be made. | ||
| 473 | * | 470 | * |
| 474 | * Return nonzero to generate a %SIGCHLD with @why, which is | 471 | * @notify is zero if we would not ordinarily send a %SIGCHLD, |
| 475 | * normal if @notify is nonzero. | 472 | * or is the %CLD_STOPPED or %CLD_CONTINUED .si_code for %SIGCHLD. |
| 476 | * | 473 | * |
| 477 | * Called with no locks held. | 474 | * @why is %CLD_STOPPED when about to stop for job control; |
| 475 | * we are already in %TASK_STOPPED state, about to call schedule(). | ||
| 476 | * It might also be that we have just exited (check %PF_EXITING), | ||
| 477 | * but need to report that a group-wide stop is complete. | ||
| 478 | * | ||
| 479 | * @why is %CLD_CONTINUED when waking up after job control stop and | ||
| 480 | * ready to make a delayed @notify report. | ||
| 481 | * | ||
| 482 | * Return the %CLD_* value for %SIGCHLD, or zero to generate no signal. | ||
| 483 | * | ||
| 484 | * Called with the siglock held. | ||
| 478 | */ | 485 | */ |
| 479 | static inline int tracehook_notify_jctl(int notify, int why) | 486 | static inline int tracehook_notify_jctl(int notify, int why) |
| 480 | { | 487 | { |
| 481 | return notify || (current->ptrace & PT_PTRACED); | 488 | return notify ?: (current->ptrace & PT_PTRACED) ? why : 0; |
| 489 | } | ||
| 490 | |||
| 491 | /** | ||
| 492 | * tracehook_finish_jctl - report about return from job control stop | ||
| 493 | * | ||
| 494 | * This is called by do_signal_stop() after wakeup. | ||
| 495 | */ | ||
| 496 | static inline void tracehook_finish_jctl(void) | ||
| 497 | { | ||
| 482 | } | 498 | } |
| 483 | 499 | ||
| 484 | #define DEATH_REAP -1 | 500 | #define DEATH_REAP -1 |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 63a3f7a80580..2aac8a83e89b 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * Kernel Tracepoint API. | 5 | * Kernel Tracepoint API. |
| 6 | * | 6 | * |
| 7 | * See Documentation/tracepoint.txt. | 7 | * See Documentation/trace/tracepoints.txt. |
| 8 | * | 8 | * |
| 9 | * (C) Copyright 2008 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 9 | * (C) Copyright 2008 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> |
| 10 | * | 10 | * |
| @@ -36,7 +36,7 @@ struct tracepoint { | |||
| 36 | #ifndef DECLARE_TRACE | 36 | #ifndef DECLARE_TRACE |
| 37 | 37 | ||
| 38 | #define TP_PROTO(args...) args | 38 | #define TP_PROTO(args...) args |
| 39 | #define TP_ARGS(args...) args | 39 | #define TP_ARGS(args...) args |
| 40 | 40 | ||
| 41 | #ifdef CONFIG_TRACEPOINTS | 41 | #ifdef CONFIG_TRACEPOINTS |
| 42 | 42 | ||
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 3566129384a4..b08677982525 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
| @@ -45,8 +45,16 @@ | |||
| 45 | * | 45 | * |
| 46 | * void (*shutdown)(struct tty_struct * tty); | 46 | * void (*shutdown)(struct tty_struct * tty); |
| 47 | * | 47 | * |
| 48 | * This routine is called when a particular tty device is closed for | 48 | * This routine is called synchronously when a particular tty device |
| 49 | * the last time freeing up the resources. | 49 | * is closed for the last time freeing up the resources. |
| 50 | * | ||
| 51 | * | ||
| 52 | * void (*cleanup)(struct tty_struct * tty); | ||
| 53 | * | ||
| 54 | * This routine is called asynchronously when a particular tty device | ||
| 55 | * is closed for the last time freeing up the resources. This is | ||
| 56 | * actually the second part of shutdown for routines that might sleep. | ||
| 57 | * | ||
| 50 | * | 58 | * |
| 51 | * int (*write)(struct tty_struct * tty, | 59 | * int (*write)(struct tty_struct * tty, |
| 52 | * const unsigned char *buf, int count); | 60 | * const unsigned char *buf, int count); |
| @@ -233,6 +241,7 @@ struct tty_operations { | |||
| 233 | int (*open)(struct tty_struct * tty, struct file * filp); | 241 | int (*open)(struct tty_struct * tty, struct file * filp); |
| 234 | void (*close)(struct tty_struct * tty, struct file * filp); | 242 | void (*close)(struct tty_struct * tty, struct file * filp); |
| 235 | void (*shutdown)(struct tty_struct *tty); | 243 | void (*shutdown)(struct tty_struct *tty); |
| 244 | void (*cleanup)(struct tty_struct *tty); | ||
| 236 | int (*write)(struct tty_struct * tty, | 245 | int (*write)(struct tty_struct * tty, |
| 237 | const unsigned char *buf, int count); | 246 | const unsigned char *buf, int count); |
| 238 | int (*put_char)(struct tty_struct *tty, unsigned char ch); | 247 | int (*put_char)(struct tty_struct *tty, unsigned char ch); |
diff --git a/include/linux/unaligned/be_byteshift.h b/include/linux/unaligned/be_byteshift.h index 46dd12c5709e..9356b24223ac 100644 --- a/include/linux/unaligned/be_byteshift.h +++ b/include/linux/unaligned/be_byteshift.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef _LINUX_UNALIGNED_BE_BYTESHIFT_H | 1 | #ifndef _LINUX_UNALIGNED_BE_BYTESHIFT_H |
| 2 | #define _LINUX_UNALIGNED_BE_BYTESHIFT_H | 2 | #define _LINUX_UNALIGNED_BE_BYTESHIFT_H |
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | static inline u16 __get_unaligned_be16(const u8 *p) | 6 | static inline u16 __get_unaligned_be16(const u8 *p) |
| 7 | { | 7 | { |
diff --git a/include/linux/unaligned/le_byteshift.h b/include/linux/unaligned/le_byteshift.h index 59777e951baf..be376fb79b64 100644 --- a/include/linux/unaligned/le_byteshift.h +++ b/include/linux/unaligned/le_byteshift.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef _LINUX_UNALIGNED_LE_BYTESHIFT_H | 1 | #ifndef _LINUX_UNALIGNED_LE_BYTESHIFT_H |
| 2 | #define _LINUX_UNALIGNED_LE_BYTESHIFT_H | 2 | #define _LINUX_UNALIGNED_LE_BYTESHIFT_H |
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | static inline u16 __get_unaligned_le16(const u8 *p) | 6 | static inline u16 __get_unaligned_le16(const u8 *p) |
| 7 | { | 7 | { |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index c17eb64d7213..ce911ebf91e8 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -150,6 +150,7 @@ struct usb_serial { | |||
| 150 | struct usb_interface *interface; | 150 | struct usb_interface *interface; |
| 151 | unsigned char disconnected:1; | 151 | unsigned char disconnected:1; |
| 152 | unsigned char suspending:1; | 152 | unsigned char suspending:1; |
| 153 | unsigned char attached:1; | ||
| 153 | unsigned char minor; | 154 | unsigned char minor; |
| 154 | unsigned char num_ports; | 155 | unsigned char num_ports; |
| 155 | unsigned char num_port_pointers; | 156 | unsigned char num_port_pointers; |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index bb69e256cd16..f81473052059 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -89,6 +89,7 @@ struct driver_info { | |||
| 89 | #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ | 89 | #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ |
| 90 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ | 90 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ |
| 91 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ | 91 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ |
| 92 | #define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ | ||
| 92 | 93 | ||
| 93 | 94 | ||
| 94 | /* init device ... can sleep, or cause probe() failure */ | 95 | /* init device ... can sleep, or cause probe() failure */ |
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index 3656b300de3a..69f39974c041 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
| @@ -36,7 +36,6 @@ struct new_utsname { | |||
| 36 | #include <linux/kref.h> | 36 | #include <linux/kref.h> |
| 37 | #include <linux/nsproxy.h> | 37 | #include <linux/nsproxy.h> |
| 38 | #include <linux/err.h> | 38 | #include <linux/err.h> |
| 39 | #include <asm/atomic.h> | ||
| 40 | 39 | ||
| 41 | struct uts_namespace { | 40 | struct uts_namespace { |
| 42 | struct kref kref; | 41 | struct kref kref; |
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index 923f9040ea20..2dfaa293ae8c 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * vgaarb.c | 2 | * The VGA aribiter manages VGA space routing and VGA resource decode to |
| 3 | * allow multiple VGA devices to be used in a system in a safe way. | ||
| 3 | * | 4 | * |
| 4 | * (C) Copyright 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> | 5 | * (C) Copyright 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> |
| 5 | * (C) Copyright 2007 Paulo R. Zanoni <przanoni@gmail.com> | 6 | * (C) Copyright 2007 Paulo R. Zanoni <przanoni@gmail.com> |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 7ef0c7b94f31..cf24c20de9e4 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -207,6 +207,7 @@ extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | |||
| 207 | 207 | ||
| 208 | extern void flush_workqueue(struct workqueue_struct *wq); | 208 | extern void flush_workqueue(struct workqueue_struct *wq); |
| 209 | extern void flush_scheduled_work(void); | 209 | extern void flush_scheduled_work(void); |
| 210 | extern void flush_delayed_work(struct delayed_work *work); | ||
| 210 | 211 | ||
| 211 | extern int schedule_work(struct work_struct *work); | 212 | extern int schedule_work(struct work_struct *work); |
| 212 | extern int schedule_work_on(int cpu, struct work_struct *work); | 213 | extern int schedule_work_on(int cpu, struct work_struct *work); |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 75cf58666ff9..66ebddcff664 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -110,21 +110,20 @@ extern int laptop_mode; | |||
| 110 | extern unsigned long determine_dirtyable_memory(void); | 110 | extern unsigned long determine_dirtyable_memory(void); |
| 111 | 111 | ||
| 112 | extern int dirty_background_ratio_handler(struct ctl_table *table, int write, | 112 | extern int dirty_background_ratio_handler(struct ctl_table *table, int write, |
| 113 | struct file *filp, void __user *buffer, size_t *lenp, | 113 | void __user *buffer, size_t *lenp, |
| 114 | loff_t *ppos); | 114 | loff_t *ppos); |
| 115 | extern int dirty_background_bytes_handler(struct ctl_table *table, int write, | 115 | extern int dirty_background_bytes_handler(struct ctl_table *table, int write, |
| 116 | struct file *filp, void __user *buffer, size_t *lenp, | 116 | void __user *buffer, size_t *lenp, |
| 117 | loff_t *ppos); | 117 | loff_t *ppos); |
| 118 | extern int dirty_ratio_handler(struct ctl_table *table, int write, | 118 | extern int dirty_ratio_handler(struct ctl_table *table, int write, |
| 119 | struct file *filp, void __user *buffer, size_t *lenp, | 119 | void __user *buffer, size_t *lenp, |
| 120 | loff_t *ppos); | 120 | loff_t *ppos); |
| 121 | extern int dirty_bytes_handler(struct ctl_table *table, int write, | 121 | extern int dirty_bytes_handler(struct ctl_table *table, int write, |
| 122 | struct file *filp, void __user *buffer, size_t *lenp, | 122 | void __user *buffer, size_t *lenp, |
| 123 | loff_t *ppos); | 123 | loff_t *ppos); |
| 124 | 124 | ||
| 125 | struct ctl_table; | 125 | struct ctl_table; |
| 126 | struct file; | 126 | int dirty_writeback_centisecs_handler(struct ctl_table *, int, |
| 127 | int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *, | ||
| 128 | void __user *, size_t *, loff_t *); | 127 | void __user *, size_t *, loff_t *); |
| 129 | 128 | ||
| 130 | void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty, | 129 | void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty, |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index b77c1478c99f..a7fb54808a23 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
| @@ -38,6 +38,8 @@ | |||
| 38 | * @P9_DEBUG_SLABS: memory management tracing | 38 | * @P9_DEBUG_SLABS: memory management tracing |
| 39 | * @P9_DEBUG_FCALL: verbose dump of protocol messages | 39 | * @P9_DEBUG_FCALL: verbose dump of protocol messages |
| 40 | * @P9_DEBUG_FID: fid allocation/deallocation tracking | 40 | * @P9_DEBUG_FID: fid allocation/deallocation tracking |
| 41 | * @P9_DEBUG_PKT: packet marshalling/unmarshalling | ||
| 42 | * @P9_DEBUG_FSC: FS-cache tracing | ||
| 41 | * | 43 | * |
| 42 | * These flags are passed at mount time to turn on various levels of | 44 | * These flags are passed at mount time to turn on various levels of |
| 43 | * verbosity and tracing which will be output to the system logs. | 45 | * verbosity and tracing which will be output to the system logs. |
| @@ -54,6 +56,7 @@ enum p9_debug_flags { | |||
| 54 | P9_DEBUG_FCALL = (1<<8), | 56 | P9_DEBUG_FCALL = (1<<8), |
| 55 | P9_DEBUG_FID = (1<<9), | 57 | P9_DEBUG_FID = (1<<9), |
| 56 | P9_DEBUG_PKT = (1<<10), | 58 | P9_DEBUG_PKT = (1<<10), |
| 59 | P9_DEBUG_FSC = (1<<11), | ||
| 57 | }; | 60 | }; |
| 58 | 61 | ||
| 59 | #ifdef CONFIG_NET_9P_DEBUG | 62 | #ifdef CONFIG_NET_9P_DEBUG |
diff --git a/include/net/compat.h b/include/net/compat.h index 5bbf8bf9efea..7c3002832d05 100644 --- a/include/net/compat.h +++ b/include/net/compat.h | |||
| @@ -40,8 +40,8 @@ extern int put_cmsg_compat(struct msghdr*, int, int, int, void *); | |||
| 40 | 40 | ||
| 41 | extern int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *, unsigned char *, int); | 41 | extern int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *, unsigned char *, int); |
| 42 | 42 | ||
| 43 | extern int compat_mc_setsockopt(struct sock *, int, int, char __user *, int, | 43 | extern int compat_mc_setsockopt(struct sock *, int, int, char __user *, unsigned int, |
| 44 | int (*)(struct sock *, int, int, char __user *, int)); | 44 | int (*)(struct sock *, int, int, char __user *, unsigned int)); |
| 45 | extern int compat_mc_getsockopt(struct sock *, int, int, char __user *, | 45 | extern int compat_mc_getsockopt(struct sock *, int, int, char __user *, |
| 46 | int __user *, int (*)(struct sock *, int, int, char __user *, | 46 | int __user *, int (*)(struct sock *, int, int, char __user *, |
| 47 | int __user *)); | 47 | int __user *)); |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 03cffd9f64e3..696d6e4ce68a 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
| @@ -48,13 +48,13 @@ struct inet_connection_sock_af_ops { | |||
| 48 | u16 net_header_len; | 48 | u16 net_header_len; |
| 49 | u16 sockaddr_len; | 49 | u16 sockaddr_len; |
| 50 | int (*setsockopt)(struct sock *sk, int level, int optname, | 50 | int (*setsockopt)(struct sock *sk, int level, int optname, |
| 51 | char __user *optval, int optlen); | 51 | char __user *optval, unsigned int optlen); |
| 52 | int (*getsockopt)(struct sock *sk, int level, int optname, | 52 | int (*getsockopt)(struct sock *sk, int level, int optname, |
| 53 | char __user *optval, int __user *optlen); | 53 | char __user *optval, int __user *optlen); |
| 54 | #ifdef CONFIG_COMPAT | 54 | #ifdef CONFIG_COMPAT |
| 55 | int (*compat_setsockopt)(struct sock *sk, | 55 | int (*compat_setsockopt)(struct sock *sk, |
| 56 | int level, int optname, | 56 | int level, int optname, |
| 57 | char __user *optval, int optlen); | 57 | char __user *optval, unsigned int optlen); |
| 58 | int (*compat_getsockopt)(struct sock *sk, | 58 | int (*compat_getsockopt)(struct sock *sk, |
| 59 | int level, int optname, | 59 | int level, int optname, |
| 60 | char __user *optval, int __user *optlen); | 60 | char __user *optval, int __user *optlen); |
| @@ -332,5 +332,5 @@ extern void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); | |||
| 332 | extern int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname, | 332 | extern int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname, |
| 333 | char __user *optval, int __user *optlen); | 333 | char __user *optval, int __user *optlen); |
| 334 | extern int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname, | 334 | extern int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname, |
| 335 | char __user *optval, int optlen); | 335 | char __user *optval, unsigned int optlen); |
| 336 | #endif /* _INET_CONNECTION_SOCK_H */ | 336 | #endif /* _INET_CONNECTION_SOCK_H */ |
diff --git a/include/net/ip.h b/include/net/ip.h index 72c36926c26d..2f47e5482b55 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -381,10 +381,10 @@ extern int ip_options_rcv_srr(struct sk_buff *skb); | |||
| 381 | extern void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); | 381 | extern void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); |
| 382 | extern int ip_cmsg_send(struct net *net, | 382 | extern int ip_cmsg_send(struct net *net, |
| 383 | struct msghdr *msg, struct ipcm_cookie *ipc); | 383 | struct msghdr *msg, struct ipcm_cookie *ipc); |
| 384 | extern int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, int optlen); | 384 | extern int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen); |
| 385 | extern int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen); | 385 | extern int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen); |
| 386 | extern int compat_ip_setsockopt(struct sock *sk, int level, | 386 | extern int compat_ip_setsockopt(struct sock *sk, int level, |
| 387 | int optname, char __user *optval, int optlen); | 387 | int optname, char __user *optval, unsigned int optlen); |
| 388 | extern int compat_ip_getsockopt(struct sock *sk, int level, | 388 | extern int compat_ip_getsockopt(struct sock *sk, int level, |
| 389 | int optname, char __user *optval, int __user *optlen); | 389 | int optname, char __user *optval, int __user *optlen); |
| 390 | extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *)); | 390 | extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *)); |
| @@ -399,7 +399,7 @@ extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, | |||
| 399 | * fed into the routing cache should use these handlers. | 399 | * fed into the routing cache should use these handlers. |
| 400 | */ | 400 | */ |
| 401 | int ipv4_doint_and_flush(ctl_table *ctl, int write, | 401 | int ipv4_doint_and_flush(ctl_table *ctl, int write, |
| 402 | struct file* filp, void __user *buffer, | 402 | void __user *buffer, |
| 403 | size_t *lenp, loff_t *ppos); | 403 | size_t *lenp, loff_t *ppos); |
| 404 | int ipv4_doint_and_flush_strategy(ctl_table *table, | 404 | int ipv4_doint_and_flush_strategy(ctl_table *table, |
| 405 | void __user *oldval, size_t __user *oldlenp, | 405 | void __user *oldval, size_t __user *oldlenp, |
diff --git a/include/net/ipip.h b/include/net/ipip.h index 5d3036fa1511..87acf8f3a155 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
| @@ -12,7 +12,6 @@ struct ip_tunnel | |||
| 12 | struct ip_tunnel *next; | 12 | struct ip_tunnel *next; |
| 13 | struct net_device *dev; | 13 | struct net_device *dev; |
| 14 | 14 | ||
| 15 | int recursion; /* Depth of hard_start_xmit recursion */ | ||
| 16 | int err_count; /* Number of arrived ICMP errors */ | 15 | int err_count; /* Number of arrived ICMP errors */ |
| 17 | unsigned long err_time; /* Time when the last ICMP error arrived */ | 16 | unsigned long err_time; /* Time when the last ICMP error arrived */ |
| 18 | 17 | ||
| @@ -28,18 +27,11 @@ struct ip_tunnel | |||
| 28 | unsigned int prl_count; /* # of entries in PRL */ | 27 | unsigned int prl_count; /* # of entries in PRL */ |
| 29 | }; | 28 | }; |
| 30 | 29 | ||
| 31 | /* ISATAP: default interval between RS in secondy */ | ||
| 32 | #define IPTUNNEL_RS_DEFAULT_DELAY (900) | ||
| 33 | |||
| 34 | struct ip_tunnel_prl_entry | 30 | struct ip_tunnel_prl_entry |
| 35 | { | 31 | { |
| 36 | struct ip_tunnel_prl_entry *next; | 32 | struct ip_tunnel_prl_entry *next; |
| 37 | __be32 addr; | 33 | __be32 addr; |
| 38 | u16 flags; | 34 | u16 flags; |
| 39 | unsigned long rs_delay; | ||
| 40 | struct timer_list rs_timer; | ||
| 41 | struct ip_tunnel *tunnel; | ||
| 42 | spinlock_t lock; | ||
| 43 | }; | 35 | }; |
| 44 | 36 | ||
| 45 | #define IPTUNNEL_XMIT() do { \ | 37 | #define IPTUNNEL_XMIT() do { \ |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index ad9a51130254..8c31d8a0c1fe 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -550,7 +550,7 @@ extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); | |||
| 550 | extern int ipv6_setsockopt(struct sock *sk, int level, | 550 | extern int ipv6_setsockopt(struct sock *sk, int level, |
| 551 | int optname, | 551 | int optname, |
| 552 | char __user *optval, | 552 | char __user *optval, |
| 553 | int optlen); | 553 | unsigned int optlen); |
| 554 | extern int ipv6_getsockopt(struct sock *sk, int level, | 554 | extern int ipv6_getsockopt(struct sock *sk, int level, |
| 555 | int optname, | 555 | int optname, |
| 556 | char __user *optval, | 556 | char __user *optval, |
| @@ -559,7 +559,7 @@ extern int compat_ipv6_setsockopt(struct sock *sk, | |||
| 559 | int level, | 559 | int level, |
| 560 | int optname, | 560 | int optname, |
| 561 | char __user *optval, | 561 | char __user *optval, |
| 562 | int optlen); | 562 | unsigned int optlen); |
| 563 | extern int compat_ipv6_getsockopt(struct sock *sk, | 563 | extern int compat_ipv6_getsockopt(struct sock *sk, |
| 564 | int level, | 564 | int level, |
| 565 | int optname, | 565 | int optname, |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 466859b285e1..c75b960c8ac8 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -1669,6 +1669,8 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw); | |||
| 1669 | * to this function and ieee80211_rx_irqsafe() may not be mixed for a | 1669 | * to this function and ieee80211_rx_irqsafe() may not be mixed for a |
| 1670 | * single hardware. | 1670 | * single hardware. |
| 1671 | * | 1671 | * |
| 1672 | * Note that right now, this function must be called with softirqs disabled. | ||
| 1673 | * | ||
| 1672 | * @hw: the hardware this frame came in on | 1674 | * @hw: the hardware this frame came in on |
| 1673 | * @skb: the buffer to receive, owned by mac80211 after this call | 1675 | * @skb: the buffer to receive, owned by mac80211 after this call |
| 1674 | */ | 1676 | */ |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 1459ed3e2697..f76f22d05721 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
| @@ -55,7 +55,6 @@ enum { | |||
| 55 | #include <net/neighbour.h> | 55 | #include <net/neighbour.h> |
| 56 | 56 | ||
| 57 | struct ctl_table; | 57 | struct ctl_table; |
| 58 | struct file; | ||
| 59 | struct inet6_dev; | 58 | struct inet6_dev; |
| 60 | struct net_device; | 59 | struct net_device; |
| 61 | struct net_proto_family; | 60 | struct net_proto_family; |
| @@ -139,7 +138,6 @@ extern int igmp6_event_report(struct sk_buff *skb); | |||
| 139 | #ifdef CONFIG_SYSCTL | 138 | #ifdef CONFIG_SYSCTL |
| 140 | extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, | 139 | extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, |
| 141 | int write, | 140 | int write, |
| 142 | struct file * filp, | ||
| 143 | void __user *buffer, | 141 | void __user *buffer, |
| 144 | size_t *lenp, | 142 | size_t *lenp, |
| 145 | loff_t *ppos); | 143 | loff_t *ppos); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 42d00ced5eb8..6e5f0e0c7967 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -544,7 +544,7 @@ struct sctp_af { | |||
| 544 | int level, | 544 | int level, |
| 545 | int optname, | 545 | int optname, |
| 546 | char __user *optval, | 546 | char __user *optval, |
| 547 | int optlen); | 547 | unsigned int optlen); |
| 548 | int (*getsockopt) (struct sock *sk, | 548 | int (*getsockopt) (struct sock *sk, |
| 549 | int level, | 549 | int level, |
| 550 | int optname, | 550 | int optname, |
| @@ -554,7 +554,7 @@ struct sctp_af { | |||
| 554 | int level, | 554 | int level, |
| 555 | int optname, | 555 | int optname, |
| 556 | char __user *optval, | 556 | char __user *optval, |
| 557 | int optlen); | 557 | unsigned int optlen); |
| 558 | int (*compat_getsockopt) (struct sock *sk, | 558 | int (*compat_getsockopt) (struct sock *sk, |
| 559 | int level, | 559 | int level, |
| 560 | int optname, | 560 | int optname, |
diff --git a/include/net/sock.h b/include/net/sock.h index 950409dcec3d..9f96394f694e 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -226,12 +226,12 @@ struct sock { | |||
| 226 | #define sk_prot __sk_common.skc_prot | 226 | #define sk_prot __sk_common.skc_prot |
| 227 | #define sk_net __sk_common.skc_net | 227 | #define sk_net __sk_common.skc_net |
| 228 | kmemcheck_bitfield_begin(flags); | 228 | kmemcheck_bitfield_begin(flags); |
| 229 | unsigned char sk_shutdown : 2, | 229 | unsigned int sk_shutdown : 2, |
| 230 | sk_no_check : 2, | 230 | sk_no_check : 2, |
| 231 | sk_userlocks : 4; | 231 | sk_userlocks : 4, |
| 232 | sk_protocol : 8, | ||
| 233 | sk_type : 16; | ||
| 232 | kmemcheck_bitfield_end(flags); | 234 | kmemcheck_bitfield_end(flags); |
| 233 | unsigned char sk_protocol; | ||
| 234 | unsigned short sk_type; | ||
| 235 | int sk_rcvbuf; | 235 | int sk_rcvbuf; |
| 236 | socket_lock_t sk_lock; | 236 | socket_lock_t sk_lock; |
| 237 | /* | 237 | /* |
| @@ -624,7 +624,7 @@ struct proto { | |||
| 624 | void (*shutdown)(struct sock *sk, int how); | 624 | void (*shutdown)(struct sock *sk, int how); |
| 625 | int (*setsockopt)(struct sock *sk, int level, | 625 | int (*setsockopt)(struct sock *sk, int level, |
| 626 | int optname, char __user *optval, | 626 | int optname, char __user *optval, |
| 627 | int optlen); | 627 | unsigned int optlen); |
| 628 | int (*getsockopt)(struct sock *sk, int level, | 628 | int (*getsockopt)(struct sock *sk, int level, |
| 629 | int optname, char __user *optval, | 629 | int optname, char __user *optval, |
| 630 | int __user *option); | 630 | int __user *option); |
| @@ -632,7 +632,7 @@ struct proto { | |||
| 632 | int (*compat_setsockopt)(struct sock *sk, | 632 | int (*compat_setsockopt)(struct sock *sk, |
| 633 | int level, | 633 | int level, |
| 634 | int optname, char __user *optval, | 634 | int optname, char __user *optval, |
| 635 | int optlen); | 635 | unsigned int optlen); |
| 636 | int (*compat_getsockopt)(struct sock *sk, | 636 | int (*compat_getsockopt)(struct sock *sk, |
| 637 | int level, | 637 | int level, |
| 638 | int optname, char __user *optval, | 638 | int optname, char __user *optval, |
| @@ -951,7 +951,7 @@ extern void sock_rfree(struct sk_buff *skb); | |||
| 951 | 951 | ||
| 952 | extern int sock_setsockopt(struct socket *sock, int level, | 952 | extern int sock_setsockopt(struct socket *sock, int level, |
| 953 | int op, char __user *optval, | 953 | int op, char __user *optval, |
| 954 | int optlen); | 954 | unsigned int optlen); |
| 955 | 955 | ||
| 956 | extern int sock_getsockopt(struct socket *sock, int level, | 956 | extern int sock_getsockopt(struct socket *sock, int level, |
| 957 | int op, char __user *optval, | 957 | int op, char __user *optval, |
| @@ -993,7 +993,7 @@ extern int sock_no_shutdown(struct socket *, int); | |||
| 993 | extern int sock_no_getsockopt(struct socket *, int , int, | 993 | extern int sock_no_getsockopt(struct socket *, int , int, |
| 994 | char __user *, int __user *); | 994 | char __user *, int __user *); |
| 995 | extern int sock_no_setsockopt(struct socket *, int, int, | 995 | extern int sock_no_setsockopt(struct socket *, int, int, |
| 996 | char __user *, int); | 996 | char __user *, unsigned int); |
| 997 | extern int sock_no_sendmsg(struct kiocb *, struct socket *, | 997 | extern int sock_no_sendmsg(struct kiocb *, struct socket *, |
| 998 | struct msghdr *, size_t); | 998 | struct msghdr *, size_t); |
| 999 | extern int sock_no_recvmsg(struct kiocb *, struct socket *, | 999 | extern int sock_no_recvmsg(struct kiocb *, struct socket *, |
| @@ -1015,11 +1015,11 @@ extern int sock_common_getsockopt(struct socket *sock, int level, int optname, | |||
| 1015 | extern int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock, | 1015 | extern int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock, |
| 1016 | struct msghdr *msg, size_t size, int flags); | 1016 | struct msghdr *msg, size_t size, int flags); |
| 1017 | extern int sock_common_setsockopt(struct socket *sock, int level, int optname, | 1017 | extern int sock_common_setsockopt(struct socket *sock, int level, int optname, |
| 1018 | char __user *optval, int optlen); | 1018 | char __user *optval, unsigned int optlen); |
| 1019 | extern int compat_sock_common_getsockopt(struct socket *sock, int level, | 1019 | extern int compat_sock_common_getsockopt(struct socket *sock, int level, |
| 1020 | int optname, char __user *optval, int __user *optlen); | 1020 | int optname, char __user *optval, int __user *optlen); |
| 1021 | extern int compat_sock_common_setsockopt(struct socket *sock, int level, | 1021 | extern int compat_sock_common_setsockopt(struct socket *sock, int level, |
| 1022 | int optname, char __user *optval, int optlen); | 1022 | int optname, char __user *optval, unsigned int optlen); |
| 1023 | 1023 | ||
| 1024 | extern void sk_common_release(struct sock *sk); | 1024 | extern void sk_common_release(struct sock *sk); |
| 1025 | 1025 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 56b76027b85e..03a49c703377 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -394,13 +394,13 @@ extern int tcp_getsockopt(struct sock *sk, int level, | |||
| 394 | int __user *optlen); | 394 | int __user *optlen); |
| 395 | extern int tcp_setsockopt(struct sock *sk, int level, | 395 | extern int tcp_setsockopt(struct sock *sk, int level, |
| 396 | int optname, char __user *optval, | 396 | int optname, char __user *optval, |
| 397 | int optlen); | 397 | unsigned int optlen); |
| 398 | extern int compat_tcp_getsockopt(struct sock *sk, | 398 | extern int compat_tcp_getsockopt(struct sock *sk, |
| 399 | int level, int optname, | 399 | int level, int optname, |
| 400 | char __user *optval, int __user *optlen); | 400 | char __user *optval, int __user *optlen); |
| 401 | extern int compat_tcp_setsockopt(struct sock *sk, | 401 | extern int compat_tcp_setsockopt(struct sock *sk, |
| 402 | int level, int optname, | 402 | int level, int optname, |
| 403 | char __user *optval, int optlen); | 403 | char __user *optval, unsigned int optlen); |
| 404 | extern void tcp_set_keepalive(struct sock *sk, int val); | 404 | extern void tcp_set_keepalive(struct sock *sk, int val); |
| 405 | extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, | 405 | extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, |
| 406 | struct msghdr *msg, | 406 | struct msghdr *msg, |
diff --git a/include/net/udp.h b/include/net/udp.h index 5fb029f817a3..f98abd2ce709 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
| @@ -144,7 +144,7 @@ extern unsigned int udp_poll(struct file *file, struct socket *sock, | |||
| 144 | extern int udp_lib_getsockopt(struct sock *sk, int level, int optname, | 144 | extern int udp_lib_getsockopt(struct sock *sk, int level, int optname, |
| 145 | char __user *optval, int __user *optlen); | 145 | char __user *optval, int __user *optlen); |
| 146 | extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, | 146 | extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, |
| 147 | char __user *optval, int optlen, | 147 | char __user *optval, unsigned int optlen, |
| 148 | int (*push_pending_frames)(struct sock *)); | 148 | int (*push_pending_frames)(struct sock *)); |
| 149 | 149 | ||
| 150 | extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, | 150 | extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, |
diff --git a/include/net/wext.h b/include/net/wext.h index 6d76a39a9c5b..3f2b94de2cfa 100644 --- a/include/net/wext.h +++ b/include/net/wext.h | |||
| @@ -14,6 +14,7 @@ extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cm | |||
| 14 | void __user *arg); | 14 | void __user *arg); |
| 15 | extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd, | 15 | extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd, |
| 16 | unsigned long arg); | 16 | unsigned long arg); |
| 17 | extern struct iw_statistics *get_wireless_stats(struct net_device *dev); | ||
| 17 | #else | 18 | #else |
| 18 | static inline int wext_proc_init(struct net *net) | 19 | static inline int wext_proc_init(struct net *net) |
| 19 | { | 20 | { |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 9a3b49865173..d696a692d94a 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
| @@ -279,7 +279,7 @@ extern struct pccard_resource_ops pccard_iodyn_ops; | |||
| 279 | extern struct pccard_resource_ops pccard_nonstatic_ops; | 279 | extern struct pccard_resource_ops pccard_nonstatic_ops; |
| 280 | 280 | ||
| 281 | /* socket drivers are expected to use these callbacks in their .drv struct */ | 281 | /* socket drivers are expected to use these callbacks in their .drv struct */ |
| 282 | extern int pcmcia_socket_dev_suspend(struct device *dev, pm_message_t state); | 282 | extern int pcmcia_socket_dev_suspend(struct device *dev); |
| 283 | extern int pcmcia_socket_dev_resume(struct device *dev); | 283 | extern int pcmcia_socket_dev_resume(struct device *dev); |
| 284 | 284 | ||
| 285 | /* socket drivers use this callback in their IRQ handler */ | 285 | /* socket drivers use this callback in their IRQ handler */ |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 887e57e3e223..a72edd4eceec 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
| @@ -303,6 +303,7 @@ struct iscsi_session { | |||
| 303 | int cmds_max; /* size of cmds array */ | 303 | int cmds_max; /* size of cmds array */ |
| 304 | struct iscsi_task **cmds; /* Original Cmds arr */ | 304 | struct iscsi_task **cmds; /* Original Cmds arr */ |
| 305 | struct iscsi_pool cmdpool; /* PDU's pool */ | 305 | struct iscsi_pool cmdpool; /* PDU's pool */ |
| 306 | void *dd_data; /* LLD private data */ | ||
| 306 | }; | 307 | }; |
| 307 | 308 | ||
| 308 | enum { | 309 | enum { |
| @@ -363,7 +364,7 @@ extern int iscsi_target_alloc(struct scsi_target *starget); | |||
| 363 | */ | 364 | */ |
| 364 | extern struct iscsi_cls_session * | 365 | extern struct iscsi_cls_session * |
| 365 | iscsi_session_setup(struct iscsi_transport *, struct Scsi_Host *shost, | 366 | iscsi_session_setup(struct iscsi_transport *, struct Scsi_Host *shost, |
| 366 | uint16_t, int, uint32_t, unsigned int); | 367 | uint16_t, int, int, uint32_t, unsigned int); |
| 367 | extern void iscsi_session_teardown(struct iscsi_cls_session *); | 368 | extern void iscsi_session_teardown(struct iscsi_cls_session *); |
| 368 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); | 369 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); |
| 369 | extern int iscsi_set_param(struct iscsi_cls_conn *cls_conn, | 370 | extern int iscsi_set_param(struct iscsi_cls_conn *cls_conn, |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 084478e14d24..34c46ab5c31b 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
| @@ -129,6 +129,9 @@ struct scsi_cmnd; | |||
| 129 | #define MI_REPORT_TARGET_PGS 0x0a | 129 | #define MI_REPORT_TARGET_PGS 0x0a |
| 130 | /* values for maintenance out */ | 130 | /* values for maintenance out */ |
| 131 | #define MO_SET_TARGET_PGS 0x0a | 131 | #define MO_SET_TARGET_PGS 0x0a |
| 132 | /* values for variable length command */ | ||
| 133 | #define READ_32 0x09 | ||
| 134 | #define WRITE_32 0x0b | ||
| 132 | 135 | ||
| 133 | /* Values for T10/04-262r7 */ | 136 | /* Values for T10/04-262r7 */ |
| 134 | #define ATA_16 0x85 /* 16-byte pass-thru */ | 137 | #define ATA_16 0x85 /* 16-byte pass-thru */ |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 3878d1dc7f59..a5e885a111df 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
| @@ -229,10 +229,6 @@ enum scsi_prot_operations { | |||
| 229 | /* OS-HBA: Protected, HBA-Target: Protected */ | 229 | /* OS-HBA: Protected, HBA-Target: Protected */ |
| 230 | SCSI_PROT_READ_PASS, | 230 | SCSI_PROT_READ_PASS, |
| 231 | SCSI_PROT_WRITE_PASS, | 231 | SCSI_PROT_WRITE_PASS, |
| 232 | |||
| 233 | /* OS-HBA: Protected, HBA-Target: Protected, checksum conversion */ | ||
| 234 | SCSI_PROT_READ_CONVERT, | ||
| 235 | SCSI_PROT_WRITE_CONVERT, | ||
| 236 | }; | 232 | }; |
| 237 | 233 | ||
| 238 | static inline void scsi_set_prot_op(struct scsi_cmnd *scmd, unsigned char op) | 234 | static inline void scsi_set_prot_op(struct scsi_cmnd *scmd, unsigned char op) |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index b62a097b3ecb..6e728b176904 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
| @@ -798,9 +798,15 @@ static inline unsigned int scsi_host_get_prot(struct Scsi_Host *shost) | |||
| 798 | static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsigned int target_type) | 798 | static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsigned int target_type) |
| 799 | { | 799 | { |
| 800 | switch (target_type) { | 800 | switch (target_type) { |
| 801 | case 1: return shost->prot_capabilities & SHOST_DIF_TYPE1_PROTECTION; | 801 | case 1: |
| 802 | case 2: return shost->prot_capabilities & SHOST_DIF_TYPE2_PROTECTION; | 802 | if (shost->prot_capabilities & SHOST_DIF_TYPE1_PROTECTION) |
| 803 | case 3: return shost->prot_capabilities & SHOST_DIF_TYPE3_PROTECTION; | 803 | return target_type; |
| 804 | case 2: | ||
| 805 | if (shost->prot_capabilities & SHOST_DIF_TYPE2_PROTECTION) | ||
| 806 | return target_type; | ||
| 807 | case 3: | ||
| 808 | if (shost->prot_capabilities & SHOST_DIF_TYPE3_PROTECTION) | ||
| 809 | return target_type; | ||
| 804 | } | 810 | } |
| 805 | 811 | ||
| 806 | return 0; | 812 | return 0; |
| @@ -808,13 +814,14 @@ static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsign | |||
| 808 | 814 | ||
| 809 | static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) | 815 | static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) |
| 810 | { | 816 | { |
| 817 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
| 811 | switch (target_type) { | 818 | switch (target_type) { |
| 812 | case 0: return shost->prot_capabilities & SHOST_DIX_TYPE0_PROTECTION; | 819 | case 0: return shost->prot_capabilities & SHOST_DIX_TYPE0_PROTECTION; |
| 813 | case 1: return shost->prot_capabilities & SHOST_DIX_TYPE1_PROTECTION; | 820 | case 1: return shost->prot_capabilities & SHOST_DIX_TYPE1_PROTECTION; |
| 814 | case 2: return shost->prot_capabilities & SHOST_DIX_TYPE2_PROTECTION; | 821 | case 2: return shost->prot_capabilities & SHOST_DIX_TYPE2_PROTECTION; |
| 815 | case 3: return shost->prot_capabilities & SHOST_DIX_TYPE3_PROTECTION; | 822 | case 3: return shost->prot_capabilities & SHOST_DIX_TYPE3_PROTECTION; |
| 816 | } | 823 | } |
| 817 | 824 | #endif | |
| 818 | return 0; | 825 | return 0; |
| 819 | } | 826 | } |
| 820 | 827 | ||
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index d86af94691c2..00405b5f624a 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
| @@ -488,6 +488,39 @@ TRACE_EVENT(block_remap, | |||
| 488 | (unsigned long long)__entry->old_sector) | 488 | (unsigned long long)__entry->old_sector) |
| 489 | ); | 489 | ); |
| 490 | 490 | ||
| 491 | TRACE_EVENT(block_rq_remap, | ||
| 492 | |||
| 493 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, | ||
| 494 | sector_t from), | ||
| 495 | |||
| 496 | TP_ARGS(q, rq, dev, from), | ||
| 497 | |||
| 498 | TP_STRUCT__entry( | ||
| 499 | __field( dev_t, dev ) | ||
| 500 | __field( sector_t, sector ) | ||
| 501 | __field( unsigned int, nr_sector ) | ||
| 502 | __field( dev_t, old_dev ) | ||
| 503 | __field( sector_t, old_sector ) | ||
| 504 | __array( char, rwbs, 6 ) | ||
| 505 | ), | ||
| 506 | |||
| 507 | TP_fast_assign( | ||
| 508 | __entry->dev = disk_devt(rq->rq_disk); | ||
| 509 | __entry->sector = blk_rq_pos(rq); | ||
| 510 | __entry->nr_sector = blk_rq_sectors(rq); | ||
| 511 | __entry->old_dev = dev; | ||
| 512 | __entry->old_sector = from; | ||
| 513 | blk_fill_rwbs_rq(__entry->rwbs, rq); | ||
| 514 | ), | ||
| 515 | |||
| 516 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", | ||
| 517 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, | ||
| 518 | (unsigned long long)__entry->sector, | ||
| 519 | __entry->nr_sector, | ||
| 520 | MAJOR(__entry->old_dev), MINOR(__entry->old_dev), | ||
| 521 | (unsigned long long)__entry->old_sector) | ||
| 522 | ); | ||
| 523 | |||
| 491 | #endif /* _TRACE_BLOCK_H */ | 524 | #endif /* _TRACE_BLOCK_H */ |
| 492 | 525 | ||
| 493 | /* This part must be outside protection */ | 526 | /* This part must be outside protection */ |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index c1bd8f1e8b94..d09550bf3f95 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
| @@ -11,6 +11,7 @@ struct ext4_allocation_context; | |||
| 11 | struct ext4_allocation_request; | 11 | struct ext4_allocation_request; |
| 12 | struct ext4_prealloc_space; | 12 | struct ext4_prealloc_space; |
| 13 | struct ext4_inode_info; | 13 | struct ext4_inode_info; |
| 14 | struct mpage_da_data; | ||
| 14 | 15 | ||
| 15 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) | 16 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) |
| 16 | 17 | ||
| @@ -236,6 +237,7 @@ TRACE_EVENT(ext4_da_writepages, | |||
| 236 | __field( char, for_kupdate ) | 237 | __field( char, for_kupdate ) |
| 237 | __field( char, for_reclaim ) | 238 | __field( char, for_reclaim ) |
| 238 | __field( char, range_cyclic ) | 239 | __field( char, range_cyclic ) |
| 240 | __field( pgoff_t, writeback_index ) | ||
| 239 | ), | 241 | ), |
| 240 | 242 | ||
| 241 | TP_fast_assign( | 243 | TP_fast_assign( |
| @@ -249,15 +251,17 @@ TRACE_EVENT(ext4_da_writepages, | |||
| 249 | __entry->for_kupdate = wbc->for_kupdate; | 251 | __entry->for_kupdate = wbc->for_kupdate; |
| 250 | __entry->for_reclaim = wbc->for_reclaim; | 252 | __entry->for_reclaim = wbc->for_reclaim; |
| 251 | __entry->range_cyclic = wbc->range_cyclic; | 253 | __entry->range_cyclic = wbc->range_cyclic; |
| 254 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
| 252 | ), | 255 | ), |
| 253 | 256 | ||
| 254 | TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d", | 257 | TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu", |
| 255 | jbd2_dev_to_name(__entry->dev), | 258 | jbd2_dev_to_name(__entry->dev), |
| 256 | (unsigned long) __entry->ino, __entry->nr_to_write, | 259 | (unsigned long) __entry->ino, __entry->nr_to_write, |
| 257 | __entry->pages_skipped, __entry->range_start, | 260 | __entry->pages_skipped, __entry->range_start, |
| 258 | __entry->range_end, __entry->nonblocking, | 261 | __entry->range_end, __entry->nonblocking, |
| 259 | __entry->for_kupdate, __entry->for_reclaim, | 262 | __entry->for_kupdate, __entry->for_reclaim, |
| 260 | __entry->range_cyclic) | 263 | __entry->range_cyclic, |
| 264 | (unsigned long) __entry->writeback_index) | ||
| 261 | ); | 265 | ); |
| 262 | 266 | ||
| 263 | TRACE_EVENT(ext4_da_write_pages, | 267 | TRACE_EVENT(ext4_da_write_pages, |
| @@ -309,6 +313,7 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
| 309 | __field( char, encountered_congestion ) | 313 | __field( char, encountered_congestion ) |
| 310 | __field( char, more_io ) | 314 | __field( char, more_io ) |
| 311 | __field( char, no_nrwrite_index_update ) | 315 | __field( char, no_nrwrite_index_update ) |
| 316 | __field( pgoff_t, writeback_index ) | ||
| 312 | ), | 317 | ), |
| 313 | 318 | ||
| 314 | TP_fast_assign( | 319 | TP_fast_assign( |
| @@ -320,14 +325,16 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
| 320 | __entry->encountered_congestion = wbc->encountered_congestion; | 325 | __entry->encountered_congestion = wbc->encountered_congestion; |
| 321 | __entry->more_io = wbc->more_io; | 326 | __entry->more_io = wbc->more_io; |
| 322 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; | 327 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; |
| 328 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
| 323 | ), | 329 | ), |
| 324 | 330 | ||
| 325 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", | 331 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d writeback_index %lu", |
| 326 | jbd2_dev_to_name(__entry->dev), | 332 | jbd2_dev_to_name(__entry->dev), |
| 327 | (unsigned long) __entry->ino, __entry->ret, | 333 | (unsigned long) __entry->ino, __entry->ret, |
| 328 | __entry->pages_written, __entry->pages_skipped, | 334 | __entry->pages_written, __entry->pages_skipped, |
| 329 | __entry->encountered_congestion, __entry->more_io, | 335 | __entry->encountered_congestion, __entry->more_io, |
| 330 | __entry->no_nrwrite_index_update) | 336 | __entry->no_nrwrite_index_update, |
| 337 | (unsigned long) __entry->writeback_index) | ||
| 331 | ); | 338 | ); |
| 332 | 339 | ||
| 333 | TRACE_EVENT(ext4_da_write_begin, | 340 | TRACE_EVENT(ext4_da_write_begin, |
| @@ -737,6 +744,169 @@ TRACE_EVENT(ext4_alloc_da_blocks, | |||
| 737 | __entry->data_blocks, __entry->meta_blocks) | 744 | __entry->data_blocks, __entry->meta_blocks) |
| 738 | ); | 745 | ); |
| 739 | 746 | ||
| 747 | TRACE_EVENT(ext4_mballoc_alloc, | ||
| 748 | TP_PROTO(struct ext4_allocation_context *ac), | ||
| 749 | |||
| 750 | TP_ARGS(ac), | ||
| 751 | |||
| 752 | TP_STRUCT__entry( | ||
| 753 | __field( dev_t, dev ) | ||
| 754 | __field( ino_t, ino ) | ||
| 755 | __field( __u16, found ) | ||
| 756 | __field( __u16, groups ) | ||
| 757 | __field( __u16, buddy ) | ||
| 758 | __field( __u16, flags ) | ||
| 759 | __field( __u16, tail ) | ||
| 760 | __field( __u8, cr ) | ||
| 761 | __field( __u32, orig_logical ) | ||
| 762 | __field( int, orig_start ) | ||
| 763 | __field( __u32, orig_group ) | ||
| 764 | __field( int, orig_len ) | ||
| 765 | __field( __u32, goal_logical ) | ||
| 766 | __field( int, goal_start ) | ||
| 767 | __field( __u32, goal_group ) | ||
| 768 | __field( int, goal_len ) | ||
| 769 | __field( __u32, result_logical ) | ||
| 770 | __field( int, result_start ) | ||
| 771 | __field( __u32, result_group ) | ||
| 772 | __field( int, result_len ) | ||
| 773 | ), | ||
| 774 | |||
| 775 | TP_fast_assign( | ||
| 776 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
| 777 | __entry->ino = ac->ac_inode->i_ino; | ||
| 778 | __entry->found = ac->ac_found; | ||
| 779 | __entry->flags = ac->ac_flags; | ||
| 780 | __entry->groups = ac->ac_groups_scanned; | ||
| 781 | __entry->buddy = ac->ac_buddy; | ||
| 782 | __entry->tail = ac->ac_tail; | ||
| 783 | __entry->cr = ac->ac_criteria; | ||
| 784 | __entry->orig_logical = ac->ac_o_ex.fe_logical; | ||
| 785 | __entry->orig_start = ac->ac_o_ex.fe_start; | ||
| 786 | __entry->orig_group = ac->ac_o_ex.fe_group; | ||
| 787 | __entry->orig_len = ac->ac_o_ex.fe_len; | ||
| 788 | __entry->goal_logical = ac->ac_g_ex.fe_logical; | ||
| 789 | __entry->goal_start = ac->ac_g_ex.fe_start; | ||
| 790 | __entry->goal_group = ac->ac_g_ex.fe_group; | ||
| 791 | __entry->goal_len = ac->ac_g_ex.fe_len; | ||
| 792 | __entry->result_logical = ac->ac_f_ex.fe_logical; | ||
| 793 | __entry->result_start = ac->ac_f_ex.fe_start; | ||
| 794 | __entry->result_group = ac->ac_f_ex.fe_group; | ||
| 795 | __entry->result_len = ac->ac_f_ex.fe_len; | ||
| 796 | ), | ||
| 797 | |||
| 798 | TP_printk("dev %s inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " | ||
| 799 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " | ||
| 800 | "tail %u broken %u", | ||
| 801 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 802 | __entry->orig_group, __entry->orig_start, | ||
| 803 | __entry->orig_len, __entry->orig_logical, | ||
| 804 | __entry->goal_group, __entry->goal_start, | ||
| 805 | __entry->goal_len, __entry->goal_logical, | ||
| 806 | __entry->result_group, __entry->result_start, | ||
| 807 | __entry->result_len, __entry->result_logical, | ||
| 808 | __entry->found, __entry->groups, __entry->cr, | ||
| 809 | __entry->flags, __entry->tail, | ||
| 810 | __entry->buddy ? 1 << __entry->buddy : 0) | ||
| 811 | ); | ||
| 812 | |||
| 813 | TRACE_EVENT(ext4_mballoc_prealloc, | ||
| 814 | TP_PROTO(struct ext4_allocation_context *ac), | ||
| 815 | |||
| 816 | TP_ARGS(ac), | ||
| 817 | |||
| 818 | TP_STRUCT__entry( | ||
| 819 | __field( dev_t, dev ) | ||
| 820 | __field( ino_t, ino ) | ||
| 821 | __field( __u32, orig_logical ) | ||
| 822 | __field( int, orig_start ) | ||
| 823 | __field( __u32, orig_group ) | ||
| 824 | __field( int, orig_len ) | ||
| 825 | __field( __u32, result_logical ) | ||
| 826 | __field( int, result_start ) | ||
| 827 | __field( __u32, result_group ) | ||
| 828 | __field( int, result_len ) | ||
| 829 | ), | ||
| 830 | |||
| 831 | TP_fast_assign( | ||
| 832 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
| 833 | __entry->ino = ac->ac_inode->i_ino; | ||
| 834 | __entry->orig_logical = ac->ac_o_ex.fe_logical; | ||
| 835 | __entry->orig_start = ac->ac_o_ex.fe_start; | ||
| 836 | __entry->orig_group = ac->ac_o_ex.fe_group; | ||
| 837 | __entry->orig_len = ac->ac_o_ex.fe_len; | ||
| 838 | __entry->result_logical = ac->ac_b_ex.fe_logical; | ||
| 839 | __entry->result_start = ac->ac_b_ex.fe_start; | ||
| 840 | __entry->result_group = ac->ac_b_ex.fe_group; | ||
| 841 | __entry->result_len = ac->ac_b_ex.fe_len; | ||
| 842 | ), | ||
| 843 | |||
| 844 | TP_printk("dev %s inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", | ||
| 845 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 846 | __entry->orig_group, __entry->orig_start, | ||
| 847 | __entry->orig_len, __entry->orig_logical, | ||
| 848 | __entry->result_group, __entry->result_start, | ||
| 849 | __entry->result_len, __entry->result_logical) | ||
| 850 | ); | ||
| 851 | |||
| 852 | TRACE_EVENT(ext4_mballoc_discard, | ||
| 853 | TP_PROTO(struct ext4_allocation_context *ac), | ||
| 854 | |||
| 855 | TP_ARGS(ac), | ||
| 856 | |||
| 857 | TP_STRUCT__entry( | ||
| 858 | __field( dev_t, dev ) | ||
| 859 | __field( ino_t, ino ) | ||
| 860 | __field( __u32, result_logical ) | ||
| 861 | __field( int, result_start ) | ||
| 862 | __field( __u32, result_group ) | ||
| 863 | __field( int, result_len ) | ||
| 864 | ), | ||
| 865 | |||
| 866 | TP_fast_assign( | ||
| 867 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
| 868 | __entry->ino = ac->ac_inode->i_ino; | ||
| 869 | __entry->result_logical = ac->ac_b_ex.fe_logical; | ||
| 870 | __entry->result_start = ac->ac_b_ex.fe_start; | ||
| 871 | __entry->result_group = ac->ac_b_ex.fe_group; | ||
| 872 | __entry->result_len = ac->ac_b_ex.fe_len; | ||
| 873 | ), | ||
| 874 | |||
| 875 | TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", | ||
| 876 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 877 | __entry->result_group, __entry->result_start, | ||
| 878 | __entry->result_len, __entry->result_logical) | ||
| 879 | ); | ||
| 880 | |||
| 881 | TRACE_EVENT(ext4_mballoc_free, | ||
| 882 | TP_PROTO(struct ext4_allocation_context *ac), | ||
| 883 | |||
| 884 | TP_ARGS(ac), | ||
| 885 | |||
| 886 | TP_STRUCT__entry( | ||
| 887 | __field( dev_t, dev ) | ||
| 888 | __field( ino_t, ino ) | ||
| 889 | __field( __u32, result_logical ) | ||
| 890 | __field( int, result_start ) | ||
| 891 | __field( __u32, result_group ) | ||
| 892 | __field( int, result_len ) | ||
| 893 | ), | ||
| 894 | |||
| 895 | TP_fast_assign( | ||
| 896 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
| 897 | __entry->ino = ac->ac_inode->i_ino; | ||
| 898 | __entry->result_logical = ac->ac_b_ex.fe_logical; | ||
| 899 | __entry->result_start = ac->ac_b_ex.fe_start; | ||
| 900 | __entry->result_group = ac->ac_b_ex.fe_group; | ||
| 901 | __entry->result_len = ac->ac_b_ex.fe_len; | ||
| 902 | ), | ||
| 903 | |||
| 904 | TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", | ||
| 905 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 906 | __entry->result_group, __entry->result_start, | ||
| 907 | __entry->result_len, __entry->result_logical) | ||
| 908 | ); | ||
| 909 | |||
| 740 | #endif /* _TRACE_EXT4_H */ | 910 | #endif /* _TRACE_EXT4_H */ |
| 741 | 911 | ||
| 742 | /* This part must be outside protection */ | 912 | /* This part must be outside protection */ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index b851f0b4701c..3c60b75adb9e 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
| @@ -7,6 +7,9 @@ | |||
| 7 | #include <linux/jbd2.h> | 7 | #include <linux/jbd2.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | 9 | ||
| 10 | struct transaction_chp_stats_s; | ||
| 11 | struct transaction_run_stats_s; | ||
| 12 | |||
| 10 | TRACE_EVENT(jbd2_checkpoint, | 13 | TRACE_EVENT(jbd2_checkpoint, |
| 11 | 14 | ||
| 12 | TP_PROTO(journal_t *journal, int result), | 15 | TP_PROTO(journal_t *journal, int result), |
| @@ -162,6 +165,81 @@ TRACE_EVENT(jbd2_submit_inode_data, | |||
| 162 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) | 165 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) |
| 163 | ); | 166 | ); |
| 164 | 167 | ||
| 168 | TRACE_EVENT(jbd2_run_stats, | ||
| 169 | TP_PROTO(dev_t dev, unsigned long tid, | ||
| 170 | struct transaction_run_stats_s *stats), | ||
| 171 | |||
| 172 | TP_ARGS(dev, tid, stats), | ||
| 173 | |||
| 174 | TP_STRUCT__entry( | ||
| 175 | __field( dev_t, dev ) | ||
| 176 | __field( unsigned long, tid ) | ||
| 177 | __field( unsigned long, wait ) | ||
| 178 | __field( unsigned long, running ) | ||
| 179 | __field( unsigned long, locked ) | ||
| 180 | __field( unsigned long, flushing ) | ||
| 181 | __field( unsigned long, logging ) | ||
| 182 | __field( __u32, handle_count ) | ||
| 183 | __field( __u32, blocks ) | ||
| 184 | __field( __u32, blocks_logged ) | ||
| 185 | ), | ||
| 186 | |||
| 187 | TP_fast_assign( | ||
| 188 | __entry->dev = dev; | ||
| 189 | __entry->tid = tid; | ||
| 190 | __entry->wait = stats->rs_wait; | ||
| 191 | __entry->running = stats->rs_running; | ||
| 192 | __entry->locked = stats->rs_locked; | ||
| 193 | __entry->flushing = stats->rs_flushing; | ||
| 194 | __entry->logging = stats->rs_logging; | ||
| 195 | __entry->handle_count = stats->rs_handle_count; | ||
| 196 | __entry->blocks = stats->rs_blocks; | ||
| 197 | __entry->blocks_logged = stats->rs_blocks_logged; | ||
| 198 | ), | ||
| 199 | |||
| 200 | TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u " | ||
| 201 | "logging %u handle_count %u blocks %u blocks_logged %u", | ||
| 202 | jbd2_dev_to_name(__entry->dev), __entry->tid, | ||
| 203 | jiffies_to_msecs(__entry->wait), | ||
| 204 | jiffies_to_msecs(__entry->running), | ||
| 205 | jiffies_to_msecs(__entry->locked), | ||
| 206 | jiffies_to_msecs(__entry->flushing), | ||
| 207 | jiffies_to_msecs(__entry->logging), | ||
| 208 | __entry->handle_count, __entry->blocks, | ||
| 209 | __entry->blocks_logged) | ||
| 210 | ); | ||
| 211 | |||
| 212 | TRACE_EVENT(jbd2_checkpoint_stats, | ||
| 213 | TP_PROTO(dev_t dev, unsigned long tid, | ||
| 214 | struct transaction_chp_stats_s *stats), | ||
| 215 | |||
| 216 | TP_ARGS(dev, tid, stats), | ||
| 217 | |||
| 218 | TP_STRUCT__entry( | ||
| 219 | __field( dev_t, dev ) | ||
| 220 | __field( unsigned long, tid ) | ||
| 221 | __field( unsigned long, chp_time ) | ||
| 222 | __field( __u32, forced_to_close ) | ||
| 223 | __field( __u32, written ) | ||
| 224 | __field( __u32, dropped ) | ||
| 225 | ), | ||
| 226 | |||
| 227 | TP_fast_assign( | ||
| 228 | __entry->dev = dev; | ||
| 229 | __entry->tid = tid; | ||
| 230 | __entry->chp_time = stats->cs_chp_time; | ||
| 231 | __entry->forced_to_close= stats->cs_forced_to_close; | ||
| 232 | __entry->written = stats->cs_written; | ||
| 233 | __entry->dropped = stats->cs_dropped; | ||
| 234 | ), | ||
| 235 | |||
| 236 | TP_printk("dev %s tid %lu chp_time %u forced_to_close %u " | ||
| 237 | "written %u dropped %u", | ||
| 238 | jbd2_dev_to_name(__entry->dev), __entry->tid, | ||
| 239 | jiffies_to_msecs(__entry->chp_time), | ||
| 240 | __entry->forced_to_close, __entry->written, __entry->dropped) | ||
| 241 | ); | ||
| 242 | |||
| 165 | #endif /* _TRACE_JBD2_H */ | 243 | #endif /* _TRACE_JBD2_H */ |
| 166 | 244 | ||
| 167 | /* This part must be outside protection */ | 245 | /* This part must be outside protection */ |
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index fcfd9a1e4b96..e4612dbd7ba6 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
| @@ -26,7 +26,7 @@ TRACE_EVENT(workqueue_insertion, | |||
| 26 | __entry->func = work->func; | 26 | __entry->func = work->func; |
| 27 | ), | 27 | ), |
| 28 | 28 | ||
| 29 | TP_printk("thread=%s:%d func=%pF", __entry->thread_comm, | 29 | TP_printk("thread=%s:%d func=%pf", __entry->thread_comm, |
| 30 | __entry->thread_pid, __entry->func) | 30 | __entry->thread_pid, __entry->func) |
| 31 | ); | 31 | ); |
| 32 | 32 | ||
| @@ -48,7 +48,7 @@ TRACE_EVENT(workqueue_execution, | |||
| 48 | __entry->func = work->func; | 48 | __entry->func = work->func; |
| 49 | ), | 49 | ), |
| 50 | 50 | ||
| 51 | TP_printk("thread=%s:%d func=%pF", __entry->thread_comm, | 51 | TP_printk("thread=%s:%d func=%pf", __entry->thread_comm, |
| 52 | __entry->thread_pid, __entry->func) | 52 | __entry->thread_pid, __entry->func) |
| 53 | ); | 53 | ); |
| 54 | 54 | ||
