diff options
Diffstat (limited to 'include')
56 files changed, 248 insertions, 402 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 2fe8639b3ae7..7c9aebe8a7aa 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -218,9 +218,13 @@ acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width); | |||
218 | */ | 218 | */ |
219 | acpi_status | 219 | acpi_status |
220 | acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width); | 220 | acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width); |
221 | acpi_status | ||
222 | acpi_os_read_memory64(acpi_physical_address address, u64 *value, u32 width); | ||
221 | 223 | ||
222 | acpi_status | 224 | acpi_status |
223 | acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); | 225 | acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); |
226 | acpi_status | ||
227 | acpi_os_write_memory64(acpi_physical_address address, u64 value, u32 width); | ||
224 | 228 | ||
225 | /* | 229 | /* |
226 | * Platform and hardware-independent PCI configuration space access | 230 | * Platform and hardware-independent PCI configuration space access |
diff --git a/include/acpi/atomicio.h b/include/acpi/atomicio.h deleted file mode 100644 index 8b9fb4b0b9ce..000000000000 --- a/include/acpi/atomicio.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef ACPI_ATOMIC_IO_H | ||
2 | #define ACPI_ATOMIC_IO_H | ||
3 | |||
4 | int acpi_pre_map_gar(struct acpi_generic_address *reg); | ||
5 | int acpi_post_unmap_gar(struct acpi_generic_address *reg); | ||
6 | |||
7 | int acpi_atomic_read(u64 *val, struct acpi_generic_address *reg); | ||
8 | int acpi_atomic_write(u64 val, struct acpi_generic_address *reg); | ||
9 | |||
10 | #endif | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 610f6fb1bbc2..8cf7e98a2c7b 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -195,6 +195,7 @@ struct acpi_processor_flags { | |||
195 | u8 has_cst:1; | 195 | u8 has_cst:1; |
196 | u8 power_setup_done:1; | 196 | u8 power_setup_done:1; |
197 | u8 bm_rld_set:1; | 197 | u8 bm_rld_set:1; |
198 | u8 need_hotplug_init:1; | ||
198 | }; | 199 | }; |
199 | 200 | ||
200 | struct acpi_processor { | 201 | struct acpi_processor { |
diff --git a/include/asm-generic/pci_iomap.h b/include/asm-generic/pci_iomap.h index 8de4b73e19e2..e58fcf891370 100644 --- a/include/asm-generic/pci_iomap.h +++ b/include/asm-generic/pci_iomap.h | |||
@@ -15,6 +15,16 @@ struct pci_dev; | |||
15 | #ifdef CONFIG_PCI | 15 | #ifdef CONFIG_PCI |
16 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | 16 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ |
17 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | 17 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); |
18 | /* Create a virtual mapping cookie for a port on a given PCI device. | ||
19 | * Do not call this directly, it exists to make it easier for architectures | ||
20 | * to override */ | ||
21 | #ifdef CONFIG_NO_GENERIC_PCI_IOPORT_MAP | ||
22 | extern void __iomem *__pci_ioport_map(struct pci_dev *dev, unsigned long port, | ||
23 | unsigned int nr); | ||
24 | #else | ||
25 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) | ||
26 | #endif | ||
27 | |||
18 | #else | 28 | #else |
19 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | 29 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) |
20 | { | 30 | { |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 76caa67c22e2..92f0981b5fb8 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1328,6 +1328,7 @@ extern int drm_getmagic(struct drm_device *dev, void *data, | |||
1328 | struct drm_file *file_priv); | 1328 | struct drm_file *file_priv); |
1329 | extern int drm_authmagic(struct drm_device *dev, void *data, | 1329 | extern int drm_authmagic(struct drm_device *dev, void *data, |
1330 | struct drm_file *file_priv); | 1330 | struct drm_file *file_priv); |
1331 | extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic); | ||
1331 | 1332 | ||
1332 | /* Cache management (drm_cache.c) */ | 1333 | /* Cache management (drm_cache.c) */ |
1333 | void drm_clflush_pages(struct page *pages[], unsigned long num_pages); | 1334 | void drm_clflush_pages(struct page *pages[], unsigned long num_pages); |
diff --git a/include/keys/user-type.h b/include/keys/user-type.h index c37c34275a44..bc9ec1d7698c 100644 --- a/include/keys/user-type.h +++ b/include/keys/user-type.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | /*****************************************************************************/ | 18 | /*****************************************************************************/ |
19 | /* | 19 | /* |
20 | * the payload for a key of type "user" | 20 | * the payload for a key of type "user" or "logon" |
21 | * - once filled in and attached to a key: | 21 | * - once filled in and attached to a key: |
22 | * - the payload struct is invariant may not be changed, only replaced | 22 | * - the payload struct is invariant may not be changed, only replaced |
23 | * - the payload must be read with RCU procedures or with the key semaphore | 23 | * - the payload must be read with RCU procedures or with the key semaphore |
@@ -33,6 +33,7 @@ struct user_key_payload { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | extern struct key_type key_type_user; | 35 | extern struct key_type key_type_user; |
36 | extern struct key_type key_type_logon; | ||
36 | 37 | ||
37 | extern int user_instantiate(struct key *key, const void *data, size_t datalen); | 38 | extern int user_instantiate(struct key *key, const void *data, size_t datalen); |
38 | extern int user_update(struct key *key, const void *data, size_t datalen); | 39 | extern int user_update(struct key *key, const void *data, size_t datalen); |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index fd88a3945aa1..0092102db2de 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -18,7 +18,7 @@ struct pt_regs; | |||
18 | #define BINPRM_BUF_SIZE 128 | 18 | #define BINPRM_BUF_SIZE 128 |
19 | 19 | ||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | #include <linux/list.h> | 21 | #include <linux/sched.h> |
22 | 22 | ||
23 | #define CORENAME_MAX_SIZE 128 | 23 | #define CORENAME_MAX_SIZE 128 |
24 | 24 | ||
@@ -58,6 +58,7 @@ struct linux_binprm { | |||
58 | unsigned interp_flags; | 58 | unsigned interp_flags; |
59 | unsigned interp_data; | 59 | unsigned interp_data; |
60 | unsigned long loader, exec; | 60 | unsigned long loader, exec; |
61 | char tcomm[TASK_COMM_LEN]; | ||
61 | }; | 62 | }; |
62 | 63 | ||
63 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 | 64 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 |
diff --git a/include/linux/device.h b/include/linux/device.h index 5b3adb8f9588..b63fb393aa58 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -279,11 +279,11 @@ struct device *driver_find_device(struct device_driver *drv, | |||
279 | 279 | ||
280 | /** | 280 | /** |
281 | * struct subsys_interface - interfaces to device functions | 281 | * struct subsys_interface - interfaces to device functions |
282 | * @name name of the device function | 282 | * @name: name of the device function |
283 | * @subsystem subsytem of the devices to attach to | 283 | * @subsys: subsytem of the devices to attach to |
284 | * @node the list of functions registered at the subsystem | 284 | * @node: the list of functions registered at the subsystem |
285 | * @add device hookup to device function handler | 285 | * @add_dev: device hookup to device function handler |
286 | * @remove device hookup to device function handler | 286 | * @remove_dev: device hookup to device function handler |
287 | * | 287 | * |
288 | * Simple interfaces attached to a subsystem. Multiple interfaces can | 288 | * Simple interfaces attached to a subsystem. Multiple interfaces can |
289 | * attach to a subsystem and its devices. Unlike drivers, they do not | 289 | * attach to a subsystem and its devices. Unlike drivers, they do not |
@@ -612,6 +612,7 @@ struct device_dma_parameters { | |||
612 | * @archdata: For arch-specific additions. | 612 | * @archdata: For arch-specific additions. |
613 | * @of_node: Associated device tree node. | 613 | * @of_node: Associated device tree node. |
614 | * @devt: For creating the sysfs "dev". | 614 | * @devt: For creating the sysfs "dev". |
615 | * @id: device instance | ||
615 | * @devres_lock: Spinlock to protect the resource of the device. | 616 | * @devres_lock: Spinlock to protect the resource of the device. |
616 | * @devres_head: The resources list of the device. | 617 | * @devres_head: The resources list of the device. |
617 | * @knode_class: The node used to add the device to the class list. | 618 | * @knode_class: The node used to add the device to the class list. |
@@ -1003,6 +1004,10 @@ extern long sysfs_deprecated; | |||
1003 | * Each module may only use this macro once, and calling it replaces | 1004 | * Each module may only use this macro once, and calling it replaces |
1004 | * module_init() and module_exit(). | 1005 | * module_init() and module_exit(). |
1005 | * | 1006 | * |
1007 | * @__driver: driver name | ||
1008 | * @__register: register function for this driver type | ||
1009 | * @__unregister: unregister function for this driver type | ||
1010 | * | ||
1006 | * Use this macro to construct bus specific macros for registering | 1011 | * Use this macro to construct bus specific macros for registering |
1007 | * drivers, and do not use it on its own. | 1012 | * drivers, and do not use it on its own. |
1008 | */ | 1013 | */ |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 0ab54e16a91f..d09af4b67cf1 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -39,6 +39,7 @@ extern bool __refrigerator(bool check_kthr_stop); | |||
39 | extern int freeze_processes(void); | 39 | extern int freeze_processes(void); |
40 | extern int freeze_kernel_threads(void); | 40 | extern int freeze_kernel_threads(void); |
41 | extern void thaw_processes(void); | 41 | extern void thaw_processes(void); |
42 | extern void thaw_kernel_threads(void); | ||
42 | 43 | ||
43 | static inline bool try_to_freeze(void) | 44 | static inline bool try_to_freeze(void) |
44 | { | 45 | { |
@@ -174,6 +175,7 @@ static inline bool __refrigerator(bool check_kthr_stop) { return false; } | |||
174 | static inline int freeze_processes(void) { return -ENOSYS; } | 175 | static inline int freeze_processes(void) { return -ENOSYS; } |
175 | static inline int freeze_kernel_threads(void) { return -ENOSYS; } | 176 | static inline int freeze_kernel_threads(void) { return -ENOSYS; } |
176 | static inline void thaw_processes(void) {} | 177 | static inline void thaw_processes(void) {} |
178 | static inline void thaw_kernel_threads(void) {} | ||
177 | 179 | ||
178 | static inline bool try_to_freeze(void) { return false; } | 180 | static inline bool try_to_freeze(void) { return false; } |
179 | 181 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0244082d42c5..386da09f229d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -396,6 +396,7 @@ struct inodes_stat_t { | |||
396 | #include <linux/rculist_bl.h> | 396 | #include <linux/rculist_bl.h> |
397 | #include <linux/atomic.h> | 397 | #include <linux/atomic.h> |
398 | #include <linux/shrinker.h> | 398 | #include <linux/shrinker.h> |
399 | #include <linux/migrate_mode.h> | ||
399 | 400 | ||
400 | #include <asm/byteorder.h> | 401 | #include <asm/byteorder.h> |
401 | 402 | ||
@@ -526,7 +527,6 @@ enum positive_aop_returns { | |||
526 | struct page; | 527 | struct page; |
527 | struct address_space; | 528 | struct address_space; |
528 | struct writeback_control; | 529 | struct writeback_control; |
529 | enum migrate_mode; | ||
530 | 530 | ||
531 | struct iov_iter { | 531 | struct iov_iter { |
532 | const struct iovec *iov; | 532 | const struct iovec *iov; |
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index b5ca4b2c08ec..004ff33ab38e 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _GPIO_KEYS_H | 1 | #ifndef _GPIO_KEYS_H |
2 | #define _GPIO_KEYS_H | 2 | #define _GPIO_KEYS_H |
3 | 3 | ||
4 | struct device; | ||
5 | |||
4 | struct gpio_keys_button { | 6 | struct gpio_keys_button { |
5 | /* Configuration parameters */ | 7 | /* Configuration parameters */ |
6 | unsigned int code; /* input event code (KEY_*, SW_*) */ | 8 | unsigned int code; /* input event code (KEY_*, SW_*) */ |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 62b908e0e591..0ae065a5fcb2 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/mod_devicetable.h> | 35 | #include <linux/mod_devicetable.h> |
36 | 36 | ||
37 | 37 | ||
38 | #define MAX_PAGE_BUFFER_COUNT 18 | 38 | #define MAX_PAGE_BUFFER_COUNT 19 |
39 | #define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */ | 39 | #define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */ |
40 | 40 | ||
41 | #pragma pack(push, 1) | 41 | #pragma pack(push, 1) |
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 828181fbad5d..58404b0c5010 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
@@ -46,6 +46,10 @@ struct team_port { | |||
46 | u32 speed; | 46 | u32 speed; |
47 | u8 duplex; | 47 | u8 duplex; |
48 | 48 | ||
49 | /* Custom gennetlink interface related flags */ | ||
50 | bool changed; | ||
51 | bool removed; | ||
52 | |||
49 | struct rcu_head rcu; | 53 | struct rcu_head rcu; |
50 | }; | 54 | }; |
51 | 55 | ||
@@ -72,6 +76,10 @@ struct team_option { | |||
72 | enum team_option_type type; | 76 | enum team_option_type type; |
73 | int (*getter)(struct team *team, void *arg); | 77 | int (*getter)(struct team *team, void *arg); |
74 | int (*setter)(struct team *team, void *arg); | 78 | int (*setter)(struct team *team, void *arg); |
79 | |||
80 | /* Custom gennetlink interface related flags */ | ||
81 | bool changed; | ||
82 | bool removed; | ||
75 | }; | 83 | }; |
76 | 84 | ||
77 | struct team_mode { | 85 | struct team_mode { |
@@ -207,6 +215,7 @@ enum { | |||
207 | TEAM_ATTR_OPTION_CHANGED, /* flag */ | 215 | TEAM_ATTR_OPTION_CHANGED, /* flag */ |
208 | TEAM_ATTR_OPTION_TYPE, /* u8 */ | 216 | TEAM_ATTR_OPTION_TYPE, /* u8 */ |
209 | TEAM_ATTR_OPTION_DATA, /* dynamic */ | 217 | TEAM_ATTR_OPTION_DATA, /* dynamic */ |
218 | TEAM_ATTR_OPTION_REMOVED, /* flag */ | ||
210 | 219 | ||
211 | __TEAM_ATTR_OPTION_MAX, | 220 | __TEAM_ATTR_OPTION_MAX, |
212 | TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1, | 221 | TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1, |
@@ -227,6 +236,7 @@ enum { | |||
227 | TEAM_ATTR_PORT_LINKUP, /* flag */ | 236 | TEAM_ATTR_PORT_LINKUP, /* flag */ |
228 | TEAM_ATTR_PORT_SPEED, /* u32 */ | 237 | TEAM_ATTR_PORT_SPEED, /* u32 */ |
229 | TEAM_ATTR_PORT_DUPLEX, /* u8 */ | 238 | TEAM_ATTR_PORT_DUPLEX, /* u8 */ |
239 | TEAM_ATTR_PORT_REMOVED, /* flag */ | ||
230 | 240 | ||
231 | __TEAM_ATTR_PORT_MAX, | 241 | __TEAM_ATTR_PORT_MAX, |
232 | TEAM_ATTR_PORT_MAX = __TEAM_ATTR_PORT_MAX - 1, | 242 | TEAM_ATTR_PORT_MAX = __TEAM_ATTR_PORT_MAX - 1, |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 2fa0901219d4..0d7d6a1b172f 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -50,9 +50,11 @@ | |||
50 | * note header. For kdump, the code in vmcore.c runs in the context | 50 | * note header. For kdump, the code in vmcore.c runs in the context |
51 | * of the second kernel to combine them into one note. | 51 | * of the second kernel to combine them into one note. |
52 | */ | 52 | */ |
53 | #ifndef KEXEC_NOTE_BYTES | ||
53 | #define KEXEC_NOTE_BYTES ( (KEXEC_NOTE_HEAD_BYTES * 2) + \ | 54 | #define KEXEC_NOTE_BYTES ( (KEXEC_NOTE_HEAD_BYTES * 2) + \ |
54 | KEXEC_CORE_NOTE_NAME_BYTES + \ | 55 | KEXEC_CORE_NOTE_NAME_BYTES + \ |
55 | KEXEC_CORE_NOTE_DESC_BYTES ) | 56 | KEXEC_CORE_NOTE_DESC_BYTES ) |
57 | #endif | ||
56 | 58 | ||
57 | /* | 59 | /* |
58 | * This structure is used to hold the arguments that are used when loading | 60 | * This structure is used to hold the arguments that are used when loading |
diff --git a/include/linux/key.h b/include/linux/key.h index bfc014c57351..5253471cd2ea 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -271,7 +271,7 @@ extern int keyring_add_key(struct key *keyring, | |||
271 | 271 | ||
272 | extern struct key *key_lookup(key_serial_t id); | 272 | extern struct key *key_lookup(key_serial_t id); |
273 | 273 | ||
274 | static inline key_serial_t key_serial(struct key *key) | 274 | static inline key_serial_t key_serial(const struct key *key) |
275 | { | 275 | { |
276 | return key ? key->serial : 0; | 276 | return key ? key->serial : 0; |
277 | } | 277 | } |
diff --git a/include/linux/lp8727.h b/include/linux/lp8727.h index d21fa2865bf4..d21fa2865bf4 100755..100644 --- a/include/linux/lp8727.h +++ b/include/linux/lp8727.h | |||
diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h index 1515e64e3663..f88c1cc0cb0f 100644 --- a/include/linux/mfd/mcp.h +++ b/include/linux/mfd/mcp.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef MCP_H | 10 | #ifndef MCP_H |
11 | #define MCP_H | 11 | #define MCP_H |
12 | 12 | ||
13 | #include <linux/mod_devicetable.h> | ||
14 | #include <mach/dma.h> | 13 | #include <mach/dma.h> |
15 | 14 | ||
16 | struct mcp_ops; | 15 | struct mcp_ops; |
@@ -27,7 +26,7 @@ struct mcp { | |||
27 | dma_device_t dma_telco_rd; | 26 | dma_device_t dma_telco_rd; |
28 | dma_device_t dma_telco_wr; | 27 | dma_device_t dma_telco_wr; |
29 | struct device attached_device; | 28 | struct device attached_device; |
30 | const char *codec; | 29 | int gpio_base; |
31 | }; | 30 | }; |
32 | 31 | ||
33 | struct mcp_ops { | 32 | struct mcp_ops { |
@@ -45,11 +44,10 @@ void mcp_reg_write(struct mcp *, unsigned int, unsigned int); | |||
45 | unsigned int mcp_reg_read(struct mcp *, unsigned int); | 44 | unsigned int mcp_reg_read(struct mcp *, unsigned int); |
46 | void mcp_enable(struct mcp *); | 45 | void mcp_enable(struct mcp *); |
47 | void mcp_disable(struct mcp *); | 46 | void mcp_disable(struct mcp *); |
48 | const struct mcp_device_id *mcp_get_device_id(const struct mcp *mcp); | ||
49 | #define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) | 47 | #define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) |
50 | 48 | ||
51 | struct mcp *mcp_host_alloc(struct device *, size_t); | 49 | struct mcp *mcp_host_alloc(struct device *, size_t); |
52 | int mcp_host_register(struct mcp *, void *); | 50 | int mcp_host_register(struct mcp *); |
53 | void mcp_host_unregister(struct mcp *); | 51 | void mcp_host_unregister(struct mcp *); |
54 | 52 | ||
55 | struct mcp_driver { | 53 | struct mcp_driver { |
@@ -58,7 +56,6 @@ struct mcp_driver { | |||
58 | void (*remove)(struct mcp *); | 56 | void (*remove)(struct mcp *); |
59 | int (*suspend)(struct mcp *, pm_message_t); | 57 | int (*suspend)(struct mcp *, pm_message_t); |
60 | int (*resume)(struct mcp *); | 58 | int (*resume)(struct mcp *); |
61 | const struct mcp_device_id *id_table; | ||
62 | }; | 59 | }; |
63 | 60 | ||
64 | int mcp_driver_register(struct mcp_driver *); | 61 | int mcp_driver_register(struct mcp_driver *); |
@@ -67,6 +64,9 @@ void mcp_driver_unregister(struct mcp_driver *); | |||
67 | #define mcp_get_drvdata(mcp) dev_get_drvdata(&(mcp)->attached_device) | 64 | #define mcp_get_drvdata(mcp) dev_get_drvdata(&(mcp)->attached_device) |
68 | #define mcp_set_drvdata(mcp,d) dev_set_drvdata(&(mcp)->attached_device, d) | 65 | #define mcp_set_drvdata(mcp,d) dev_set_drvdata(&(mcp)->attached_device, d) |
69 | 66 | ||
70 | #define mcp_priv(mcp) ((void *)((mcp)+1)) | 67 | static inline void *mcp_priv(struct mcp *mcp) |
68 | { | ||
69 | return mcp + 1; | ||
70 | } | ||
71 | 71 | ||
72 | #endif | 72 | #endif |
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h index 2463c2619596..9bc9ac651dad 100644 --- a/include/linux/mfd/twl6040.h +++ b/include/linux/mfd/twl6040.h | |||
@@ -187,8 +187,10 @@ struct twl6040 { | |||
187 | int rev; | 187 | int rev; |
188 | u8 vibra_ctrl_cache[2]; | 188 | u8 vibra_ctrl_cache[2]; |
189 | 189 | ||
190 | /* PLL configuration */ | ||
190 | int pll; | 191 | int pll; |
191 | unsigned int sysclk; | 192 | unsigned int sysclk; |
193 | unsigned int mclk; | ||
192 | 194 | ||
193 | unsigned int irq; | 195 | unsigned int irq; |
194 | unsigned int irq_base; | 196 | unsigned int irq_base; |
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h index bc19e5fb7ea8..4321f044d1e4 100644 --- a/include/linux/mfd/ucb1x00.h +++ b/include/linux/mfd/ucb1x00.h | |||
@@ -104,9 +104,6 @@ | |||
104 | #define UCB_MODE_DYN_VFLAG_ENA (1 << 12) | 104 | #define UCB_MODE_DYN_VFLAG_ENA (1 << 12) |
105 | #define UCB_MODE_AUD_OFF_CAN (1 << 13) | 105 | #define UCB_MODE_AUD_OFF_CAN (1 << 13) |
106 | 106 | ||
107 | struct ucb1x00_plat_data { | ||
108 | int gpio_base; | ||
109 | }; | ||
110 | 107 | ||
111 | struct ucb1x00_irq { | 108 | struct ucb1x00_irq { |
112 | void *devid; | 109 | void *devid; |
@@ -119,7 +116,7 @@ struct ucb1x00 { | |||
119 | unsigned int irq; | 116 | unsigned int irq; |
120 | struct semaphore adc_sem; | 117 | struct semaphore adc_sem; |
121 | spinlock_t io_lock; | 118 | spinlock_t io_lock; |
122 | const struct mcp_device_id *id; | 119 | u16 id; |
123 | u16 io_dir; | 120 | u16 io_dir; |
124 | u16 io_out; | 121 | u16 io_out; |
125 | u16 adc_cr; | 122 | u16 adc_cr; |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index eaf867412f7a..05ed2828a553 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -3,22 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/mempolicy.h> | 5 | #include <linux/mempolicy.h> |
6 | #include <linux/migrate_mode.h> | ||
6 | 7 | ||
7 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); | 8 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); |
8 | 9 | ||
9 | /* | ||
10 | * MIGRATE_ASYNC means never block | ||
11 | * MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking | ||
12 | * on most operations but not ->writepage as the potential stall time | ||
13 | * is too significant | ||
14 | * MIGRATE_SYNC will block when migrating pages | ||
15 | */ | ||
16 | enum migrate_mode { | ||
17 | MIGRATE_ASYNC, | ||
18 | MIGRATE_SYNC_LIGHT, | ||
19 | MIGRATE_SYNC, | ||
20 | }; | ||
21 | |||
22 | #ifdef CONFIG_MIGRATION | 10 | #ifdef CONFIG_MIGRATION |
23 | #define PAGE_MIGRATION 1 | 11 | #define PAGE_MIGRATION 1 |
24 | 12 | ||
diff --git a/include/linux/migrate_mode.h b/include/linux/migrate_mode.h new file mode 100644 index 000000000000..ebf3d89a3919 --- /dev/null +++ b/include/linux/migrate_mode.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef MIGRATE_MODE_H_INCLUDED | ||
2 | #define MIGRATE_MODE_H_INCLUDED | ||
3 | /* | ||
4 | * MIGRATE_ASYNC means never block | ||
5 | * MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking | ||
6 | * on most operations but not ->writepage as the potential stall time | ||
7 | * is too significant | ||
8 | * MIGRATE_SYNC will block when migrating pages | ||
9 | */ | ||
10 | enum migrate_mode { | ||
11 | MIGRATE_ASYNC, | ||
12 | MIGRATE_SYNC_LIGHT, | ||
13 | MIGRATE_SYNC, | ||
14 | }; | ||
15 | |||
16 | #endif /* MIGRATE_MODE_H_INCLUDED */ | ||
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 5c4fe8e5bfe5..aea61905499b 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -621,6 +621,7 @@ void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac); | |||
621 | int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac); | 621 | int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac); |
622 | int mlx4_get_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn); | 622 | int mlx4_get_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn); |
623 | void mlx4_put_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int qpn); | 623 | void mlx4_put_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int qpn); |
624 | void mlx4_set_stats_bitmap(struct mlx4_dev *dev, u64 *stats_bitmap); | ||
624 | 625 | ||
625 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); | 626 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); |
626 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); | 627 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index b29e7f6f8fa5..83ac0713ed0a 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -436,17 +436,6 @@ struct spi_device_id { | |||
436 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 436 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
437 | }; | 437 | }; |
438 | 438 | ||
439 | /* mcp */ | ||
440 | |||
441 | #define MCP_NAME_SIZE 20 | ||
442 | #define MCP_MODULE_PREFIX "mcp:" | ||
443 | |||
444 | struct mcp_device_id { | ||
445 | char name[MCP_NAME_SIZE]; | ||
446 | kernel_ulong_t driver_data /* Data private to the driver */ | ||
447 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | ||
448 | }; | ||
449 | |||
450 | /* dmi */ | 439 | /* dmi */ |
451 | enum dmi_field { | 440 | enum dmi_field { |
452 | DMI_NONE, | 441 | DMI_NONE, |
diff --git a/include/linux/mpi.h b/include/linux/mpi.h index 06f88994ccaa..d02cca6cc8ce 100644 --- a/include/linux/mpi.h +++ b/include/linux/mpi.h | |||
@@ -57,8 +57,6 @@ struct gcry_mpi { | |||
57 | 57 | ||
58 | typedef struct gcry_mpi *MPI; | 58 | typedef struct gcry_mpi *MPI; |
59 | 59 | ||
60 | #define MPI_NULL NULL | ||
61 | |||
62 | #define mpi_get_nlimbs(a) ((a)->nlimbs) | 60 | #define mpi_get_nlimbs(a) ((a)->nlimbs) |
63 | #define mpi_is_neg(a) ((a)->sign) | 61 | #define mpi_is_neg(a) ((a)->sign) |
64 | 62 | ||
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 1a81fde8f333..d43dc25af82e 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -427,9 +427,7 @@ static inline int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) | |||
427 | 427 | ||
428 | static inline int mtd_suspend(struct mtd_info *mtd) | 428 | static inline int mtd_suspend(struct mtd_info *mtd) |
429 | { | 429 | { |
430 | if (!mtd->suspend) | 430 | return mtd->suspend ? mtd->suspend(mtd) : 0; |
431 | return -EOPNOTSUPP; | ||
432 | return mtd->suspend(mtd); | ||
433 | } | 431 | } |
434 | 432 | ||
435 | static inline void mtd_resume(struct mtd_info *mtd) | 433 | static inline void mtd_resume(struct mtd_info *mtd) |
@@ -441,7 +439,7 @@ static inline void mtd_resume(struct mtd_info *mtd) | |||
441 | static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) | 439 | static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) |
442 | { | 440 | { |
443 | if (!mtd->block_isbad) | 441 | if (!mtd->block_isbad) |
444 | return -EOPNOTSUPP; | 442 | return 0; |
445 | return mtd->block_isbad(mtd, ofs); | 443 | return mtd->block_isbad(mtd, ofs); |
446 | } | 444 | } |
447 | 445 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 08855613ceb3..abb2776be1ba 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -587,6 +587,7 @@ struct hw_perf_event { | |||
587 | u64 sample_period; | 587 | u64 sample_period; |
588 | u64 last_period; | 588 | u64 last_period; |
589 | local64_t period_left; | 589 | local64_t period_left; |
590 | u64 interrupts_seq; | ||
590 | u64 interrupts; | 591 | u64 interrupts; |
591 | 592 | ||
592 | u64 freq_time_stamp; | 593 | u64 freq_time_stamp; |
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index e5bbcbaa6f57..4d99e4e6ef83 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h | |||
@@ -110,7 +110,19 @@ static inline void pm_qos_remove_request(struct pm_qos_request *req) | |||
110 | { return; } | 110 | { return; } |
111 | 111 | ||
112 | static inline int pm_qos_request(int pm_qos_class) | 112 | static inline int pm_qos_request(int pm_qos_class) |
113 | { return 0; } | 113 | { |
114 | switch (pm_qos_class) { | ||
115 | case PM_QOS_CPU_DMA_LATENCY: | ||
116 | return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE; | ||
117 | case PM_QOS_NETWORK_LATENCY: | ||
118 | return PM_QOS_NETWORK_LAT_DEFAULT_VALUE; | ||
119 | case PM_QOS_NETWORK_THROUGHPUT: | ||
120 | return PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE; | ||
121 | default: | ||
122 | return PM_QOS_DEFAULT_VALUE; | ||
123 | } | ||
124 | } | ||
125 | |||
114 | static inline int pm_qos_add_notifier(int pm_qos_class, | 126 | static inline int pm_qos_add_notifier(int pm_qos_class, |
115 | struct notifier_block *notifier) | 127 | struct notifier_block *notifier) |
116 | { return 0; } | 128 | { return 0; } |
diff --git a/include/linux/proportions.h b/include/linux/proportions.h index ef35bb73f69b..26a8a4ed9b07 100644 --- a/include/linux/proportions.h +++ b/include/linux/proportions.h | |||
@@ -81,7 +81,11 @@ void prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl) | |||
81 | * Limit the time part in order to ensure there are some bits left for the | 81 | * Limit the time part in order to ensure there are some bits left for the |
82 | * cycle counter and fraction multiply. | 82 | * cycle counter and fraction multiply. |
83 | */ | 83 | */ |
84 | #if BITS_PER_LONG == 32 | ||
84 | #define PROP_MAX_SHIFT (3*BITS_PER_LONG/4) | 85 | #define PROP_MAX_SHIFT (3*BITS_PER_LONG/4) |
86 | #else | ||
87 | #define PROP_MAX_SHIFT (BITS_PER_LONG/2) | ||
88 | #endif | ||
85 | 89 | ||
86 | #define PROP_FRAC_SHIFT (BITS_PER_LONG - PROP_MAX_SHIFT - 1) | 90 | #define PROP_FRAC_SHIFT (BITS_PER_LONG - PROP_MAX_SHIFT - 1) |
87 | #define PROP_FRAC_BASE (1UL << PROP_FRAC_SHIFT) | 91 | #define PROP_FRAC_BASE (1UL << PROP_FRAC_SHIFT) |
diff --git a/include/linux/quota.h b/include/linux/quota.h index cb7855699037..c09fa042b5ea 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -230,7 +230,11 @@ struct mem_dqinfo { | |||
230 | struct super_block; | 230 | struct super_block; |
231 | 231 | ||
232 | #define DQF_MASK 0xffff /* Mask for format specific flags */ | 232 | #define DQF_MASK 0xffff /* Mask for format specific flags */ |
233 | #define DQF_INFO_DIRTY_B 16 | 233 | #define DQF_GETINFO_MASK 0x1ffff /* Mask for flags passed to userspace */ |
234 | #define DQF_SETINFO_MASK 0xffff /* Mask for flags modifiable from userspace */ | ||
235 | #define DQF_SYS_FILE_B 16 | ||
236 | #define DQF_SYS_FILE (1 << DQF_SYS_FILE_B) /* Quota file stored as system file */ | ||
237 | #define DQF_INFO_DIRTY_B 31 | ||
234 | #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ | 238 | #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ |
235 | 239 | ||
236 | extern void mark_info_dirty(struct super_block *sb, int type); | 240 | extern void mark_info_dirty(struct super_block *sb, int type); |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index c9d625ca659e..da81af086eaf 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -109,12 +109,18 @@ void res_counter_init(struct res_counter *counter, struct res_counter *parent); | |||
109 | * | 109 | * |
110 | * returns 0 on success and <0 if the counter->usage will exceed the | 110 | * returns 0 on success and <0 if the counter->usage will exceed the |
111 | * counter->limit _locked call expects the counter->lock to be taken | 111 | * counter->limit _locked call expects the counter->lock to be taken |
112 | * | ||
113 | * charge_nofail works the same, except that it charges the resource | ||
114 | * counter unconditionally, and returns < 0 if the after the current | ||
115 | * charge we are over limit. | ||
112 | */ | 116 | */ |
113 | 117 | ||
114 | int __must_check res_counter_charge_locked(struct res_counter *counter, | 118 | int __must_check res_counter_charge_locked(struct res_counter *counter, |
115 | unsigned long val); | 119 | unsigned long val); |
116 | int __must_check res_counter_charge(struct res_counter *counter, | 120 | int __must_check res_counter_charge(struct res_counter *counter, |
117 | unsigned long val, struct res_counter **limit_fail_at); | 121 | unsigned long val, struct res_counter **limit_fail_at); |
122 | int __must_check res_counter_charge_nofail(struct res_counter *counter, | ||
123 | unsigned long val, struct res_counter **limit_fail_at); | ||
118 | 124 | ||
119 | /* | 125 | /* |
120 | * uncharge - tell that some portion of the resource is released | 126 | * uncharge - tell that some portion of the resource is released |
@@ -142,7 +148,10 @@ static inline unsigned long long res_counter_margin(struct res_counter *cnt) | |||
142 | unsigned long flags; | 148 | unsigned long flags; |
143 | 149 | ||
144 | spin_lock_irqsave(&cnt->lock, flags); | 150 | spin_lock_irqsave(&cnt->lock, flags); |
145 | margin = cnt->limit - cnt->usage; | 151 | if (cnt->limit > cnt->usage) |
152 | margin = cnt->limit - cnt->usage; | ||
153 | else | ||
154 | margin = 0; | ||
146 | spin_unlock_irqrestore(&cnt->lock, flags); | 155 | spin_unlock_irqrestore(&cnt->lock, flags); |
147 | return margin; | 156 | return margin; |
148 | } | 157 | } |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4032ec1cf836..7d379a6bfd88 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2088,9 +2088,9 @@ extern int sched_setscheduler_nocheck(struct task_struct *, int, | |||
2088 | extern struct task_struct *idle_task(int cpu); | 2088 | extern struct task_struct *idle_task(int cpu); |
2089 | /** | 2089 | /** |
2090 | * is_idle_task - is the specified task an idle task? | 2090 | * is_idle_task - is the specified task an idle task? |
2091 | * @tsk: the task in question. | 2091 | * @p: the task in question. |
2092 | */ | 2092 | */ |
2093 | static inline bool is_idle_task(struct task_struct *p) | 2093 | static inline bool is_idle_task(const struct task_struct *p) |
2094 | { | 2094 | { |
2095 | return p->pid == 0; | 2095 | return p->pid == 0; |
2096 | } | 2096 | } |
@@ -2259,6 +2259,12 @@ static inline void mmdrop(struct mm_struct * mm) | |||
2259 | extern void mmput(struct mm_struct *); | 2259 | extern void mmput(struct mm_struct *); |
2260 | /* Grab a reference to a task's mm, if it is not already going away */ | 2260 | /* Grab a reference to a task's mm, if it is not already going away */ |
2261 | extern struct mm_struct *get_task_mm(struct task_struct *task); | 2261 | extern struct mm_struct *get_task_mm(struct task_struct *task); |
2262 | /* | ||
2263 | * Grab a reference to a task's mm, if it is not already going away | ||
2264 | * and ptrace_may_access with the mode parameter passed to it | ||
2265 | * succeeds. | ||
2266 | */ | ||
2267 | extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode); | ||
2262 | /* Remove the current tasks stale references to the old mm_struct */ | 2268 | /* Remove the current tasks stale references to the old mm_struct */ |
2263 | extern void mm_release(struct task_struct *, struct mm_struct *); | 2269 | extern void mm_release(struct task_struct *, struct mm_struct *); |
2264 | /* Allocate a new mm structure and copy contents from tsk->mm */ | 2270 | /* Allocate a new mm structure and copy contents from tsk->mm */ |
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h index 8cd7fe59cf1a..425450b980b8 100644 --- a/include/linux/sh_dma.h +++ b/include/linux/sh_dma.h | |||
@@ -70,6 +70,7 @@ struct sh_dmae_pdata { | |||
70 | unsigned int needs_tend_set:1; | 70 | unsigned int needs_tend_set:1; |
71 | unsigned int no_dmars:1; | 71 | unsigned int no_dmars:1; |
72 | unsigned int chclr_present:1; | 72 | unsigned int chclr_present:1; |
73 | unsigned int slave_only:1; | ||
73 | }; | 74 | }; |
74 | 75 | ||
75 | /* DMA register */ | 76 | /* DMA register */ |
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index e4c711c6f321..79ab2555b3b0 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
@@ -48,6 +48,7 @@ extern struct file *shmem_file_setup(const char *name, | |||
48 | loff_t size, unsigned long flags); | 48 | loff_t size, unsigned long flags); |
49 | extern int shmem_zero_setup(struct vm_area_struct *); | 49 | extern int shmem_zero_setup(struct vm_area_struct *); |
50 | extern int shmem_lock(struct file *file, int lock, struct user_struct *user); | 50 | extern int shmem_lock(struct file *file, int lock, struct user_struct *user); |
51 | extern void shmem_unlock_mapping(struct address_space *mapping); | ||
51 | extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, | 52 | extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, |
52 | pgoff_t index, gfp_t gfp_mask); | 53 | pgoff_t index, gfp_t gfp_mask); |
53 | extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end); | 54 | extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end); |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index e16557a357e5..c1241c428179 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
@@ -192,7 +192,6 @@ enum | |||
192 | LINUX_MIB_TCPPARTIALUNDO, /* TCPPartialUndo */ | 192 | LINUX_MIB_TCPPARTIALUNDO, /* TCPPartialUndo */ |
193 | LINUX_MIB_TCPDSACKUNDO, /* TCPDSACKUndo */ | 193 | LINUX_MIB_TCPDSACKUNDO, /* TCPDSACKUndo */ |
194 | LINUX_MIB_TCPLOSSUNDO, /* TCPLossUndo */ | 194 | LINUX_MIB_TCPLOSSUNDO, /* TCPLossUndo */ |
195 | LINUX_MIB_TCPLOSS, /* TCPLoss */ | ||
196 | LINUX_MIB_TCPLOSTRETRANSMIT, /* TCPLostRetransmit */ | 195 | LINUX_MIB_TCPLOSTRETRANSMIT, /* TCPLostRetransmit */ |
197 | LINUX_MIB_TCPRENOFAILURES, /* TCPRenoFailures */ | 196 | LINUX_MIB_TCPRENOFAILURES, /* TCPRenoFailures */ |
198 | LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */ | 197 | LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */ |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 95040cc33107..91784a4f8608 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -357,14 +357,29 @@ extern bool pm_save_wakeup_count(unsigned int count); | |||
357 | 357 | ||
358 | static inline void lock_system_sleep(void) | 358 | static inline void lock_system_sleep(void) |
359 | { | 359 | { |
360 | freezer_do_not_count(); | 360 | current->flags |= PF_FREEZER_SKIP; |
361 | mutex_lock(&pm_mutex); | 361 | mutex_lock(&pm_mutex); |
362 | } | 362 | } |
363 | 363 | ||
364 | static inline void unlock_system_sleep(void) | 364 | static inline void unlock_system_sleep(void) |
365 | { | 365 | { |
366 | /* | ||
367 | * Don't use freezer_count() because we don't want the call to | ||
368 | * try_to_freeze() here. | ||
369 | * | ||
370 | * Reason: | ||
371 | * Fundamentally, we just don't need it, because freezing condition | ||
372 | * doesn't come into effect until we release the pm_mutex lock, | ||
373 | * since the freezer always works with pm_mutex held. | ||
374 | * | ||
375 | * More importantly, in the case of hibernation, | ||
376 | * unlock_system_sleep() gets called in snapshot_read() and | ||
377 | * snapshot_write() when the freezing condition is still in effect. | ||
378 | * Which means, if we use try_to_freeze() here, it would make them | ||
379 | * enter the refrigerator, thus causing hibernation to lockup. | ||
380 | */ | ||
381 | current->flags &= ~PF_FREEZER_SKIP; | ||
366 | mutex_unlock(&pm_mutex); | 382 | mutex_unlock(&pm_mutex); |
367 | freezer_count(); | ||
368 | } | 383 | } |
369 | 384 | ||
370 | #else /* !CONFIG_PM_SLEEP */ | 385 | #else /* !CONFIG_PM_SLEEP */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 06061a7f8e69..3e60228e7299 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -273,7 +273,7 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | |||
273 | #endif | 273 | #endif |
274 | 274 | ||
275 | extern int page_evictable(struct page *page, struct vm_area_struct *vma); | 275 | extern int page_evictable(struct page *page, struct vm_area_struct *vma); |
276 | extern void scan_mapping_unevictable_pages(struct address_space *); | 276 | extern void check_move_unevictable_pages(struct page **, int nr_pages); |
277 | 277 | ||
278 | extern unsigned long scan_unevictable_pages; | 278 | extern unsigned long scan_unevictable_pages; |
279 | extern int scan_unevictable_handler(struct ctl_table *, int, | 279 | extern int scan_unevictable_handler(struct ctl_table *, int, |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h deleted file mode 100644 index 20f63d3e6144..000000000000 --- a/include/linux/sysdev.h +++ /dev/null | |||
@@ -1,164 +0,0 @@ | |||
1 | /** | ||
2 | * System devices follow a slightly different driver model. | ||
3 | * They don't need to do dynammic driver binding, can't be probed, | ||
4 | * and don't reside on any type of peripheral bus. | ||
5 | * So, we represent and treat them a little differently. | ||
6 | * | ||
7 | * We still have a notion of a driver for a system device, because we still | ||
8 | * want to perform basic operations on these devices. | ||
9 | * | ||
10 | * We also support auxiliary drivers binding to devices of a certain class. | ||
11 | * | ||
12 | * This allows configurable drivers to register themselves for devices of | ||
13 | * a certain type. And, it allows class definitions to reside in generic | ||
14 | * code while arch-specific code can register specific drivers. | ||
15 | * | ||
16 | * Auxiliary drivers registered with a NULL cls are registered as drivers | ||
17 | * for all system devices, and get notification calls for each device. | ||
18 | */ | ||
19 | |||
20 | |||
21 | #ifndef _SYSDEV_H_ | ||
22 | #define _SYSDEV_H_ | ||
23 | |||
24 | #include <linux/kobject.h> | ||
25 | #include <linux/pm.h> | ||
26 | |||
27 | |||
28 | struct sys_device; | ||
29 | struct sysdev_class_attribute; | ||
30 | |||
31 | struct sysdev_class { | ||
32 | const char *name; | ||
33 | struct list_head drivers; | ||
34 | struct sysdev_class_attribute **attrs; | ||
35 | struct kset kset; | ||
36 | }; | ||
37 | |||
38 | struct sysdev_class_attribute { | ||
39 | struct attribute attr; | ||
40 | ssize_t (*show)(struct sysdev_class *, struct sysdev_class_attribute *, | ||
41 | char *); | ||
42 | ssize_t (*store)(struct sysdev_class *, struct sysdev_class_attribute *, | ||
43 | const char *, size_t); | ||
44 | }; | ||
45 | |||
46 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ | ||
47 | { \ | ||
48 | .attr = {.name = __stringify(_name), .mode = _mode }, \ | ||
49 | .show = _show, \ | ||
50 | .store = _store, \ | ||
51 | } | ||
52 | |||
53 | #define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ | ||
54 | struct sysdev_class_attribute attr_##_name = \ | ||
55 | _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) | ||
56 | |||
57 | |||
58 | extern int sysdev_class_register(struct sysdev_class *); | ||
59 | extern void sysdev_class_unregister(struct sysdev_class *); | ||
60 | |||
61 | extern int sysdev_class_create_file(struct sysdev_class *, | ||
62 | struct sysdev_class_attribute *); | ||
63 | extern void sysdev_class_remove_file(struct sysdev_class *, | ||
64 | struct sysdev_class_attribute *); | ||
65 | /** | ||
66 | * Auxiliary system device drivers. | ||
67 | */ | ||
68 | |||
69 | struct sysdev_driver { | ||
70 | struct list_head entry; | ||
71 | int (*add)(struct sys_device *); | ||
72 | int (*remove)(struct sys_device *); | ||
73 | }; | ||
74 | |||
75 | |||
76 | extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *); | ||
77 | extern void sysdev_driver_unregister(struct sysdev_class *, struct sysdev_driver *); | ||
78 | |||
79 | |||
80 | /** | ||
81 | * sys_devices can be simplified a lot from regular devices, because they're | ||
82 | * simply not as versatile. | ||
83 | */ | ||
84 | |||
85 | struct sys_device { | ||
86 | u32 id; | ||
87 | struct sysdev_class * cls; | ||
88 | struct kobject kobj; | ||
89 | }; | ||
90 | |||
91 | extern int sysdev_register(struct sys_device *); | ||
92 | extern void sysdev_unregister(struct sys_device *); | ||
93 | |||
94 | |||
95 | struct sysdev_attribute { | ||
96 | struct attribute attr; | ||
97 | ssize_t (*show)(struct sys_device *, struct sysdev_attribute *, char *); | ||
98 | ssize_t (*store)(struct sys_device *, struct sysdev_attribute *, | ||
99 | const char *, size_t); | ||
100 | }; | ||
101 | |||
102 | |||
103 | #define _SYSDEV_ATTR(_name, _mode, _show, _store) \ | ||
104 | { \ | ||
105 | .attr = { .name = __stringify(_name), .mode = _mode }, \ | ||
106 | .show = _show, \ | ||
107 | .store = _store, \ | ||
108 | } | ||
109 | |||
110 | #define SYSDEV_ATTR(_name, _mode, _show, _store) \ | ||
111 | struct sysdev_attribute attr_##_name = \ | ||
112 | _SYSDEV_ATTR(_name, _mode, _show, _store); | ||
113 | |||
114 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); | ||
115 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); | ||
116 | |||
117 | /* Create/remove NULL terminated attribute list */ | ||
118 | static inline int | ||
119 | sysdev_create_files(struct sys_device *d, struct sysdev_attribute **a) | ||
120 | { | ||
121 | return sysfs_create_files(&d->kobj, (const struct attribute **)a); | ||
122 | } | ||
123 | |||
124 | static inline void | ||
125 | sysdev_remove_files(struct sys_device *d, struct sysdev_attribute **a) | ||
126 | { | ||
127 | return sysfs_remove_files(&d->kobj, (const struct attribute **)a); | ||
128 | } | ||
129 | |||
130 | struct sysdev_ext_attribute { | ||
131 | struct sysdev_attribute attr; | ||
132 | void *var; | ||
133 | }; | ||
134 | |||
135 | /* | ||
136 | * Support for simple variable sysdev attributes. | ||
137 | * The pointer to the variable is stored in a sysdev_ext_attribute | ||
138 | */ | ||
139 | |||
140 | /* Add more types as needed */ | ||
141 | |||
142 | extern ssize_t sysdev_show_ulong(struct sys_device *, struct sysdev_attribute *, | ||
143 | char *); | ||
144 | extern ssize_t sysdev_store_ulong(struct sys_device *, | ||
145 | struct sysdev_attribute *, const char *, size_t); | ||
146 | extern ssize_t sysdev_show_int(struct sys_device *, struct sysdev_attribute *, | ||
147 | char *); | ||
148 | extern ssize_t sysdev_store_int(struct sys_device *, | ||
149 | struct sysdev_attribute *, const char *, size_t); | ||
150 | |||
151 | #define _SYSDEV_ULONG_ATTR(_name, _mode, _var) \ | ||
152 | { _SYSDEV_ATTR(_name, _mode, sysdev_show_ulong, sysdev_store_ulong), \ | ||
153 | &(_var) } | ||
154 | #define SYSDEV_ULONG_ATTR(_name, _mode, _var) \ | ||
155 | struct sysdev_ext_attribute attr_##_name = \ | ||
156 | _SYSDEV_ULONG_ATTR(_name, _mode, _var); | ||
157 | #define _SYSDEV_INT_ATTR(_name, _mode, _var) \ | ||
158 | { _SYSDEV_ATTR(_name, _mode, sysdev_show_int, sysdev_store_int), \ | ||
159 | &(_var) } | ||
160 | #define SYSDEV_INT_ATTR(_name, _mode, _var) \ | ||
161 | struct sysdev_ext_attribute attr_##_name = \ | ||
162 | _SYSDEV_INT_ATTR(_name, _mode, _var); | ||
163 | |||
164 | #endif /* _SYSDEV_H_ */ | ||
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 47b4a27e6e97..796f1ff0388c 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -152,9 +152,9 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | |||
152 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | 152 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); |
153 | 153 | ||
154 | #ifdef CONFIG_NET | 154 | #ifdef CONFIG_NET |
155 | extern int generate_netlink_event(u32 orig, enum events event); | 155 | extern int thermal_generate_netlink_event(u32 orig, enum events event); |
156 | #else | 156 | #else |
157 | static inline int generate_netlink_event(u32 orig, enum events event) | 157 | static inline int thermal_generate_netlink_event(u32 orig, enum events event) |
158 | { | 158 | { |
159 | return 0; | 159 | return 0; |
160 | } | 160 | } |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 27a4e16d2bf1..69d845739bc2 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1073,6 +1073,7 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1073 | * which the host controller driver should use in preference to the | 1073 | * which the host controller driver should use in preference to the |
1074 | * transfer_buffer. | 1074 | * transfer_buffer. |
1075 | * @sg: scatter gather buffer list | 1075 | * @sg: scatter gather buffer list |
1076 | * @num_mapped_sgs: (internal) number of mapped sg entries | ||
1076 | * @num_sgs: number of entries in the sg list | 1077 | * @num_sgs: number of entries in the sg list |
1077 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may | 1078 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may |
1078 | * be broken up into chunks according to the current maximum packet | 1079 | * be broken up into chunks according to the current maximum packet |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 61b29057b054..3b6f628880f8 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -589,7 +589,7 @@ static inline int usb_endpoint_is_isoc_out( | |||
589 | */ | 589 | */ |
590 | static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) | 590 | static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) |
591 | { | 591 | { |
592 | return le16_to_cpu(epd->wMaxPacketSize); | 592 | return __le16_to_cpu(epd->wMaxPacketSize); |
593 | } | 593 | } |
594 | 594 | ||
595 | /*-------------------------------------------------------------------------*/ | 595 | /*-------------------------------------------------------------------------*/ |
diff --git a/include/linux/usb/langwell_otg.h b/include/linux/usb/langwell_otg.h deleted file mode 100644 index 51f17b16d312..000000000000 --- a/include/linux/usb/langwell_otg.h +++ /dev/null | |||
@@ -1,139 +0,0 @@ | |||
1 | /* | ||
2 | * Intel Langwell USB OTG transceiver driver | ||
3 | * Copyright (C) 2008 - 2010, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef __LANGWELL_OTG_H | ||
21 | #define __LANGWELL_OTG_H | ||
22 | |||
23 | #include <linux/usb/intel_mid_otg.h> | ||
24 | |||
25 | #define CI_USBCMD 0x30 | ||
26 | # define USBCMD_RST BIT(1) | ||
27 | # define USBCMD_RS BIT(0) | ||
28 | #define CI_USBSTS 0x34 | ||
29 | # define USBSTS_SLI BIT(8) | ||
30 | # define USBSTS_URI BIT(6) | ||
31 | # define USBSTS_PCI BIT(2) | ||
32 | #define CI_PORTSC1 0x74 | ||
33 | # define PORTSC_PP BIT(12) | ||
34 | # define PORTSC_LS (BIT(11) | BIT(10)) | ||
35 | # define PORTSC_SUSP BIT(7) | ||
36 | # define PORTSC_CCS BIT(0) | ||
37 | #define CI_HOSTPC1 0xb4 | ||
38 | # define HOSTPC1_PHCD BIT(22) | ||
39 | #define CI_OTGSC 0xf4 | ||
40 | # define OTGSC_DPIE BIT(30) | ||
41 | # define OTGSC_1MSE BIT(29) | ||
42 | # define OTGSC_BSEIE BIT(28) | ||
43 | # define OTGSC_BSVIE BIT(27) | ||
44 | # define OTGSC_ASVIE BIT(26) | ||
45 | # define OTGSC_AVVIE BIT(25) | ||
46 | # define OTGSC_IDIE BIT(24) | ||
47 | # define OTGSC_DPIS BIT(22) | ||
48 | # define OTGSC_1MSS BIT(21) | ||
49 | # define OTGSC_BSEIS BIT(20) | ||
50 | # define OTGSC_BSVIS BIT(19) | ||
51 | # define OTGSC_ASVIS BIT(18) | ||
52 | # define OTGSC_AVVIS BIT(17) | ||
53 | # define OTGSC_IDIS BIT(16) | ||
54 | # define OTGSC_DPS BIT(14) | ||
55 | # define OTGSC_1MST BIT(13) | ||
56 | # define OTGSC_BSE BIT(12) | ||
57 | # define OTGSC_BSV BIT(11) | ||
58 | # define OTGSC_ASV BIT(10) | ||
59 | # define OTGSC_AVV BIT(9) | ||
60 | # define OTGSC_ID BIT(8) | ||
61 | # define OTGSC_HABA BIT(7) | ||
62 | # define OTGSC_HADP BIT(6) | ||
63 | # define OTGSC_IDPU BIT(5) | ||
64 | # define OTGSC_DP BIT(4) | ||
65 | # define OTGSC_OT BIT(3) | ||
66 | # define OTGSC_HAAR BIT(2) | ||
67 | # define OTGSC_VC BIT(1) | ||
68 | # define OTGSC_VD BIT(0) | ||
69 | # define OTGSC_INTEN_MASK (0x7f << 24) | ||
70 | # define OTGSC_INT_MASK (0x5f << 24) | ||
71 | # define OTGSC_INTSTS_MASK (0x7f << 16) | ||
72 | #define CI_USBMODE 0xf8 | ||
73 | # define USBMODE_CM (BIT(1) | BIT(0)) | ||
74 | # define USBMODE_IDLE 0 | ||
75 | # define USBMODE_DEVICE 0x2 | ||
76 | # define USBMODE_HOST 0x3 | ||
77 | #define USBCFG_ADDR 0xff10801c | ||
78 | #define USBCFG_LEN 4 | ||
79 | # define USBCFG_VBUSVAL BIT(14) | ||
80 | # define USBCFG_AVALID BIT(13) | ||
81 | # define USBCFG_BVALID BIT(12) | ||
82 | # define USBCFG_SESEND BIT(11) | ||
83 | |||
84 | #define INTR_DUMMY_MASK (USBSTS_SLI | USBSTS_URI | USBSTS_PCI) | ||
85 | |||
86 | enum langwell_otg_timer_type { | ||
87 | TA_WAIT_VRISE_TMR, | ||
88 | TA_WAIT_BCON_TMR, | ||
89 | TA_AIDL_BDIS_TMR, | ||
90 | TB_ASE0_BRST_TMR, | ||
91 | TB_SE0_SRP_TMR, | ||
92 | TB_SRP_INIT_TMR, | ||
93 | TB_SRP_FAIL_TMR, | ||
94 | TB_BUS_SUSPEND_TMR | ||
95 | }; | ||
96 | |||
97 | #define TA_WAIT_VRISE 100 | ||
98 | #define TA_WAIT_BCON 30000 | ||
99 | #define TA_AIDL_BDIS 15000 | ||
100 | #define TB_ASE0_BRST 5000 | ||
101 | #define TB_SE0_SRP 2 | ||
102 | #define TB_SRP_INIT 100 | ||
103 | #define TB_SRP_FAIL 5500 | ||
104 | #define TB_BUS_SUSPEND 500 | ||
105 | |||
106 | struct langwell_otg_timer { | ||
107 | unsigned long expires; /* Number of count increase to timeout */ | ||
108 | unsigned long count; /* Tick counter */ | ||
109 | void (*function)(unsigned long); /* Timeout function */ | ||
110 | unsigned long data; /* Data passed to function */ | ||
111 | struct list_head list; | ||
112 | }; | ||
113 | |||
114 | struct langwell_otg { | ||
115 | struct intel_mid_otg_xceiv iotg; | ||
116 | struct device *dev; | ||
117 | |||
118 | void __iomem *usbcfg; /* SCCBUSB config Reg */ | ||
119 | |||
120 | unsigned region; | ||
121 | unsigned cfg_region; | ||
122 | |||
123 | struct work_struct work; | ||
124 | struct workqueue_struct *qwork; | ||
125 | struct timer_list hsm_timer; | ||
126 | |||
127 | spinlock_t lock; | ||
128 | spinlock_t wq_lock; | ||
129 | |||
130 | struct notifier_block iotg_notifier; | ||
131 | }; | ||
132 | |||
133 | static inline | ||
134 | struct langwell_otg *mid_xceiv_to_lnw(struct intel_mid_otg_xceiv *iotg) | ||
135 | { | ||
136 | return container_of(iotg, struct langwell_otg, iotg); | ||
137 | } | ||
138 | |||
139 | #endif /* __LANGWELL_OTG_H__ */ | ||
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 5b2fed5eebf2..00596e816b4d 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -1388,6 +1388,6 @@ struct hci_inquiry_req { | |||
1388 | }; | 1388 | }; |
1389 | #define IREQ_CACHE_FLUSH 0x0001 | 1389 | #define IREQ_CACHE_FLUSH 0x0001 |
1390 | 1390 | ||
1391 | extern int enable_hs; | 1391 | extern bool enable_hs; |
1392 | 1392 | ||
1393 | #endif /* __HCI_H */ | 1393 | #endif /* __HCI_H */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 15f4be7d768e..a067d30ce73e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1140,6 +1140,7 @@ struct cfg80211_disassoc_request { | |||
1140 | * @bssid: Fixed BSSID requested, maybe be %NULL, if set do not | 1140 | * @bssid: Fixed BSSID requested, maybe be %NULL, if set do not |
1141 | * search for IBSSs with a different BSSID. | 1141 | * search for IBSSs with a different BSSID. |
1142 | * @channel: The channel to use if no IBSS can be found to join. | 1142 | * @channel: The channel to use if no IBSS can be found to join. |
1143 | * @channel_type: channel type (HT mode) | ||
1143 | * @channel_fixed: The channel should be fixed -- do not search for | 1144 | * @channel_fixed: The channel should be fixed -- do not search for |
1144 | * IBSSs to join on other channels. | 1145 | * IBSSs to join on other channels. |
1145 | * @ie: information element(s) to include in the beacon | 1146 | * @ie: information element(s) to include in the beacon |
@@ -1978,6 +1979,11 @@ struct wiphy_wowlan_support { | |||
1978 | * configured as RX antennas. Antenna configuration commands will be | 1979 | * configured as RX antennas. Antenna configuration commands will be |
1979 | * rejected unless this or @available_antennas_tx is set. | 1980 | * rejected unless this or @available_antennas_tx is set. |
1980 | * | 1981 | * |
1982 | * @probe_resp_offload: | ||
1983 | * Bitmap of supported protocols for probe response offloading. | ||
1984 | * See &enum nl80211_probe_resp_offload_support_attr. Only valid | ||
1985 | * when the wiphy flag @WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD is set. | ||
1986 | * | ||
1981 | * @max_remain_on_channel_duration: Maximum time a remain-on-channel operation | 1987 | * @max_remain_on_channel_duration: Maximum time a remain-on-channel operation |
1982 | * may request, if implemented. | 1988 | * may request, if implemented. |
1983 | * | 1989 | * |
diff --git a/include/net/flow.h b/include/net/flow.h index 9b582437fbea..6c469dbdb917 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -93,6 +93,16 @@ static inline void flowi4_init_output(struct flowi4 *fl4, int oif, | |||
93 | fl4->fl4_dport = dport; | 93 | fl4->fl4_dport = dport; |
94 | fl4->fl4_sport = sport; | 94 | fl4->fl4_sport = sport; |
95 | } | 95 | } |
96 | |||
97 | /* Reset some input parameters after previous lookup */ | ||
98 | static inline void flowi4_update_output(struct flowi4 *fl4, int oif, __u8 tos, | ||
99 | __be32 daddr, __be32 saddr) | ||
100 | { | ||
101 | fl4->flowi4_oif = oif; | ||
102 | fl4->flowi4_tos = tos; | ||
103 | fl4->daddr = daddr; | ||
104 | fl4->saddr = saddr; | ||
105 | } | ||
96 | 106 | ||
97 | 107 | ||
98 | struct flowi6 { | 108 | struct flowi6 { |
diff --git a/include/net/netns/generic.h b/include/net/netns/generic.h index 3419bf5cd154..d55f43443335 100644 --- a/include/net/netns/generic.h +++ b/include/net/netns/generic.h | |||
@@ -41,6 +41,7 @@ static inline void *net_generic(const struct net *net, int id) | |||
41 | ptr = ng->ptr[id - 1]; | 41 | ptr = ng->ptr[id - 1]; |
42 | rcu_read_unlock(); | 42 | rcu_read_unlock(); |
43 | 43 | ||
44 | BUG_ON(!ptr); | ||
44 | return ptr; | 45 | return ptr; |
45 | } | 46 | } |
46 | #endif | 47 | #endif |
diff --git a/include/net/netprio_cgroup.h b/include/net/netprio_cgroup.h index e503b87c4c1b..d58fdec47597 100644 --- a/include/net/netprio_cgroup.h +++ b/include/net/netprio_cgroup.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #ifndef _NETPRIO_CGROUP_H | 14 | #ifndef _NETPRIO_CGROUP_H |
15 | #define _NETPRIO_CGROUP_H | 15 | #define _NETPRIO_CGROUP_H |
16 | #include <linux/module.h> | ||
17 | #include <linux/cgroup.h> | 16 | #include <linux/cgroup.h> |
18 | #include <linux/hardirq.h> | 17 | #include <linux/hardirq.h> |
19 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
@@ -38,19 +37,51 @@ extern int net_prio_subsys_id; | |||
38 | 37 | ||
39 | extern void sock_update_netprioidx(struct sock *sk); | 38 | extern void sock_update_netprioidx(struct sock *sk); |
40 | 39 | ||
41 | static inline struct cgroup_netprio_state | 40 | #if IS_BUILTIN(CONFIG_NETPRIO_CGROUP) |
42 | *task_netprio_state(struct task_struct *p) | 41 | |
42 | static inline u32 task_netprioidx(struct task_struct *p) | ||
43 | { | 43 | { |
44 | #if IS_ENABLED(CONFIG_NETPRIO_CGROUP) | 44 | struct cgroup_netprio_state *state; |
45 | return container_of(task_subsys_state(p, net_prio_subsys_id), | 45 | u32 idx; |
46 | struct cgroup_netprio_state, css); | 46 | |
47 | #else | 47 | rcu_read_lock(); |
48 | return NULL; | 48 | state = container_of(task_subsys_state(p, net_prio_subsys_id), |
49 | #endif | 49 | struct cgroup_netprio_state, css); |
50 | idx = state->prioidx; | ||
51 | rcu_read_unlock(); | ||
52 | return idx; | ||
53 | } | ||
54 | |||
55 | #elif IS_MODULE(CONFIG_NETPRIO_CGROUP) | ||
56 | |||
57 | static inline u32 task_netprioidx(struct task_struct *p) | ||
58 | { | ||
59 | struct cgroup_netprio_state *state; | ||
60 | int subsys_id; | ||
61 | u32 idx = 0; | ||
62 | |||
63 | rcu_read_lock(); | ||
64 | subsys_id = rcu_dereference_index_check(net_prio_subsys_id, | ||
65 | rcu_read_lock_held()); | ||
66 | if (subsys_id >= 0) { | ||
67 | state = container_of(task_subsys_state(p, subsys_id), | ||
68 | struct cgroup_netprio_state, css); | ||
69 | idx = state->prioidx; | ||
70 | } | ||
71 | rcu_read_unlock(); | ||
72 | return idx; | ||
50 | } | 73 | } |
51 | 74 | ||
52 | #else | 75 | #else |
53 | 76 | ||
77 | static inline u32 task_netprioidx(struct task_struct *p) | ||
78 | { | ||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | #endif /* CONFIG_NETPRIO_CGROUP */ | ||
83 | |||
84 | #else | ||
54 | #define sock_update_netprioidx(sk) | 85 | #define sock_update_netprioidx(sk) |
55 | #endif | 86 | #endif |
56 | 87 | ||
diff --git a/include/net/route.h b/include/net/route.h index 91855d185b53..b1c0d5b564c2 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -270,6 +270,7 @@ static inline struct rtable *ip_route_connect(struct flowi4 *fl4, | |||
270 | if (IS_ERR(rt)) | 270 | if (IS_ERR(rt)) |
271 | return rt; | 271 | return rt; |
272 | ip_rt_put(rt); | 272 | ip_rt_put(rt); |
273 | flowi4_update_output(fl4, oif, tos, fl4->daddr, fl4->saddr); | ||
273 | } | 274 | } |
274 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); | 275 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); |
275 | return ip_route_output_flow(net, fl4, sk); | 276 | return ip_route_output_flow(net, fl4, sk); |
@@ -284,6 +285,9 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable | |||
284 | fl4->fl4_dport = dport; | 285 | fl4->fl4_dport = dport; |
285 | fl4->fl4_sport = sport; | 286 | fl4->fl4_sport = sport; |
286 | ip_rt_put(rt); | 287 | ip_rt_put(rt); |
288 | flowi4_update_output(fl4, sk->sk_bound_dev_if, | ||
289 | RT_CONN_FLAGS(sk), fl4->daddr, | ||
290 | fl4->saddr); | ||
287 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); | 291 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); |
288 | return ip_route_output_flow(sock_net(sk), fl4, sk); | 292 | return ip_route_output_flow(sock_net(sk), fl4, sk); |
289 | } | 293 | } |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index f6bb08b73ca4..55ce96b53b09 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -220,9 +220,16 @@ struct tcf_proto { | |||
220 | 220 | ||
221 | struct qdisc_skb_cb { | 221 | struct qdisc_skb_cb { |
222 | unsigned int pkt_len; | 222 | unsigned int pkt_len; |
223 | long data[]; | 223 | unsigned char data[24]; |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) | ||
227 | { | ||
228 | struct qdisc_skb_cb *qcb; | ||
229 | BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz); | ||
230 | BUILD_BUG_ON(sizeof(qcb->data) < sz); | ||
231 | } | ||
232 | |||
226 | static inline int qdisc_qlen(const struct Qdisc *q) | 233 | static inline int qdisc_qlen(const struct Qdisc *q) |
227 | { | 234 | { |
228 | return q->q.qlen; | 235 | return q->q.qlen; |
diff --git a/include/net/sock.h b/include/net/sock.h index bb972d254dff..91c1c8baf020 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/uaccess.h> | 55 | #include <linux/uaccess.h> |
56 | #include <linux/memcontrol.h> | 56 | #include <linux/memcontrol.h> |
57 | #include <linux/res_counter.h> | 57 | #include <linux/res_counter.h> |
58 | #include <linux/jump_label.h> | ||
58 | 59 | ||
59 | #include <linux/filter.h> | 60 | #include <linux/filter.h> |
60 | #include <linux/rculist_nulls.h> | 61 | #include <linux/rculist_nulls.h> |
@@ -226,6 +227,7 @@ struct cg_proto; | |||
226 | * @sk_ack_backlog: current listen backlog | 227 | * @sk_ack_backlog: current listen backlog |
227 | * @sk_max_ack_backlog: listen backlog set in listen() | 228 | * @sk_max_ack_backlog: listen backlog set in listen() |
228 | * @sk_priority: %SO_PRIORITY setting | 229 | * @sk_priority: %SO_PRIORITY setting |
230 | * @sk_cgrp_prioidx: socket group's priority map index | ||
229 | * @sk_type: socket type (%SOCK_STREAM, etc) | 231 | * @sk_type: socket type (%SOCK_STREAM, etc) |
230 | * @sk_protocol: which protocol this socket belongs in this network family | 232 | * @sk_protocol: which protocol this socket belongs in this network family |
231 | * @sk_peer_pid: &struct pid for this socket's peer | 233 | * @sk_peer_pid: &struct pid for this socket's peer |
@@ -921,7 +923,7 @@ inline void sk_refcnt_debug_release(const struct sock *sk) | |||
921 | #define sk_refcnt_debug_release(sk) do { } while (0) | 923 | #define sk_refcnt_debug_release(sk) do { } while (0) |
922 | #endif /* SOCK_REFCNT_DEBUG */ | 924 | #endif /* SOCK_REFCNT_DEBUG */ |
923 | 925 | ||
924 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM | 926 | #if defined(CONFIG_CGROUP_MEM_RES_CTLR_KMEM) && defined(CONFIG_NET) |
925 | extern struct jump_label_key memcg_socket_limit_enabled; | 927 | extern struct jump_label_key memcg_socket_limit_enabled; |
926 | static inline struct cg_proto *parent_cg_proto(struct proto *proto, | 928 | static inline struct cg_proto *parent_cg_proto(struct proto *proto, |
927 | struct cg_proto *cg_proto) | 929 | struct cg_proto *cg_proto) |
@@ -1007,9 +1009,8 @@ static inline void memcg_memory_allocated_add(struct cg_proto *prot, | |||
1007 | struct res_counter *fail; | 1009 | struct res_counter *fail; |
1008 | int ret; | 1010 | int ret; |
1009 | 1011 | ||
1010 | ret = res_counter_charge(prot->memory_allocated, | 1012 | ret = res_counter_charge_nofail(prot->memory_allocated, |
1011 | amt << PAGE_SHIFT, &fail); | 1013 | amt << PAGE_SHIFT, &fail); |
1012 | |||
1013 | if (ret < 0) | 1014 | if (ret < 0) |
1014 | *parent_status = OVER_LIMIT; | 1015 | *parent_status = OVER_LIMIT; |
1015 | } | 1016 | } |
@@ -1053,12 +1054,11 @@ sk_memory_allocated_add(struct sock *sk, int amt, int *parent_status) | |||
1053 | } | 1054 | } |
1054 | 1055 | ||
1055 | static inline void | 1056 | static inline void |
1056 | sk_memory_allocated_sub(struct sock *sk, int amt, int parent_status) | 1057 | sk_memory_allocated_sub(struct sock *sk, int amt) |
1057 | { | 1058 | { |
1058 | struct proto *prot = sk->sk_prot; | 1059 | struct proto *prot = sk->sk_prot; |
1059 | 1060 | ||
1060 | if (mem_cgroup_sockets_enabled && sk->sk_cgrp && | 1061 | if (mem_cgroup_sockets_enabled && sk->sk_cgrp) |
1061 | parent_status != OVER_LIMIT) /* Otherwise was uncharged already */ | ||
1062 | memcg_memory_allocated_sub(sk->sk_cgrp, amt); | 1062 | memcg_memory_allocated_sub(sk->sk_cgrp, amt); |
1063 | 1063 | ||
1064 | atomic_long_sub(amt, prot->memory_allocated); | 1064 | atomic_long_sub(amt, prot->memory_allocated); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 0118ea999f67..42c29bfbcee3 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -273,6 +273,14 @@ static inline int between(__u32 seq1, __u32 seq2, __u32 seq3) | |||
273 | return seq3 - seq2 >= seq1 - seq2; | 273 | return seq3 - seq2 >= seq1 - seq2; |
274 | } | 274 | } |
275 | 275 | ||
276 | static inline bool tcp_out_of_memory(struct sock *sk) | ||
277 | { | ||
278 | if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && | ||
279 | sk_memory_allocated(sk) > sk_prot_mem_limits(sk, 2)) | ||
280 | return true; | ||
281 | return false; | ||
282 | } | ||
283 | |||
276 | static inline bool tcp_too_many_orphans(struct sock *sk, int shift) | 284 | static inline bool tcp_too_many_orphans(struct sock *sk, int shift) |
277 | { | 285 | { |
278 | struct percpu_counter *ocp = sk->sk_prot->orphan_count; | 286 | struct percpu_counter *ocp = sk->sk_prot->orphan_count; |
@@ -283,13 +291,11 @@ static inline bool tcp_too_many_orphans(struct sock *sk, int shift) | |||
283 | if (orphans << shift > sysctl_tcp_max_orphans) | 291 | if (orphans << shift > sysctl_tcp_max_orphans) |
284 | return true; | 292 | return true; |
285 | } | 293 | } |
286 | |||
287 | if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && | ||
288 | sk_memory_allocated(sk) > sk_prot_mem_limits(sk, 2)) | ||
289 | return true; | ||
290 | return false; | 294 | return false; |
291 | } | 295 | } |
292 | 296 | ||
297 | extern bool tcp_check_oom(struct sock *sk, int shift); | ||
298 | |||
293 | /* syncookies: remember time of last synqueue overflow */ | 299 | /* syncookies: remember time of last synqueue overflow */ |
294 | static inline void tcp_synq_overflow(struct sock *sk) | 300 | static inline void tcp_synq_overflow(struct sock *sk) |
295 | { | 301 | { |
@@ -311,6 +317,8 @@ extern struct proto tcp_prot; | |||
311 | #define TCP_ADD_STATS_USER(net, field, val) SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val) | 317 | #define TCP_ADD_STATS_USER(net, field, val) SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val) |
312 | #define TCP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val) | 318 | #define TCP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val) |
313 | 319 | ||
320 | extern void tcp_init_mem(struct net *net); | ||
321 | |||
314 | extern void tcp_v4_err(struct sk_buff *skb, u32); | 322 | extern void tcp_v4_err(struct sk_buff *skb, u32); |
315 | 323 | ||
316 | extern void tcp_shutdown (struct sock *sk, int how); | 324 | extern void tcp_shutdown (struct sock *sk, int how); |
diff --git a/include/sound/core.h b/include/sound/core.h index 5ab255f196cc..cea1b5426dfa 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -417,6 +417,7 @@ static inline int __snd_bug_on(int cond) | |||
417 | #define gameport_get_port_data(gp) (gp)->port_data | 417 | #define gameport_get_port_data(gp) (gp)->port_data |
418 | #endif | 418 | #endif |
419 | 419 | ||
420 | #ifdef CONFIG_PCI | ||
420 | /* PCI quirk list helper */ | 421 | /* PCI quirk list helper */ |
421 | struct snd_pci_quirk { | 422 | struct snd_pci_quirk { |
422 | unsigned short subvendor; /* PCI subvendor ID */ | 423 | unsigned short subvendor; /* PCI subvendor ID */ |
@@ -456,5 +457,6 @@ snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list); | |||
456 | const struct snd_pci_quirk * | 457 | const struct snd_pci_quirk * |
457 | snd_pci_quirk_lookup_id(u16 vendor, u16 device, | 458 | snd_pci_quirk_lookup_id(u16 vendor, u16 device, |
458 | const struct snd_pci_quirk *list); | 459 | const struct snd_pci_quirk *list); |
460 | #endif | ||
459 | 461 | ||
460 | #endif /* __SOUND_CORE_H */ | 462 | #endif /* __SOUND_CORE_H */ |
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 4866499bdeeb..e5e6ff98f0fa 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
@@ -59,7 +59,7 @@ int transport_set_vpd_ident_type(struct t10_vpd *, unsigned char *); | |||
59 | int transport_set_vpd_ident(struct t10_vpd *, unsigned char *); | 59 | int transport_set_vpd_ident(struct t10_vpd *, unsigned char *); |
60 | 60 | ||
61 | /* core helpers also used by command snooping in pscsi */ | 61 | /* core helpers also used by command snooping in pscsi */ |
62 | void *transport_kmap_first_data_page(struct se_cmd *); | 62 | void *transport_kmap_data_sg(struct se_cmd *); |
63 | void transport_kunmap_first_data_page(struct se_cmd *); | 63 | void transport_kunmap_data_sg(struct se_cmd *); |
64 | 64 | ||
65 | #endif /* TARGET_CORE_BACKEND_H */ | 65 | #endif /* TARGET_CORE_BACKEND_H */ |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index daf532bc721a..dc4e345a0163 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -582,6 +582,7 @@ struct se_cmd { | |||
582 | 582 | ||
583 | struct scatterlist *t_data_sg; | 583 | struct scatterlist *t_data_sg; |
584 | unsigned int t_data_nents; | 584 | unsigned int t_data_nents; |
585 | void *t_data_vmap; | ||
585 | struct scatterlist *t_bidi_data_sg; | 586 | struct scatterlist *t_bidi_data_sg; |
586 | unsigned int t_bidi_data_nents; | 587 | unsigned int t_bidi_data_nents; |
587 | 588 | ||
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 523e8bc104d4..d36fad317e78 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
@@ -114,7 +114,7 @@ void transport_init_se_cmd(struct se_cmd *, struct target_core_fabric_ops *, | |||
114 | struct se_session *, u32, int, int, unsigned char *); | 114 | struct se_session *, u32, int, int, unsigned char *); |
115 | int transport_lookup_cmd_lun(struct se_cmd *, u32); | 115 | int transport_lookup_cmd_lun(struct se_cmd *, u32); |
116 | int transport_generic_allocate_tasks(struct se_cmd *, unsigned char *); | 116 | int transport_generic_allocate_tasks(struct se_cmd *, unsigned char *); |
117 | int target_submit_cmd(struct se_cmd *, struct se_session *, unsigned char *, | 117 | void target_submit_cmd(struct se_cmd *, struct se_session *, unsigned char *, |
118 | unsigned char *, u32, u32, int, int, int); | 118 | unsigned char *, u32, u32, int, int, int); |
119 | int transport_handle_cdb_direct(struct se_cmd *); | 119 | int transport_handle_cdb_direct(struct se_cmd *); |
120 | int transport_generic_handle_cdb_map(struct se_cmd *); | 120 | int transport_generic_handle_cdb_map(struct se_cmd *); |
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index 8588a8918023..5973410e8f8c 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
@@ -47,7 +47,10 @@ DECLARE_EVENT_CLASS(writeback_work_class, | |||
47 | __field(int, reason) | 47 | __field(int, reason) |
48 | ), | 48 | ), |
49 | TP_fast_assign( | 49 | TP_fast_assign( |
50 | strncpy(__entry->name, dev_name(bdi->dev), 32); | 50 | struct device *dev = bdi->dev; |
51 | if (!dev) | ||
52 | dev = default_backing_dev_info.dev; | ||
53 | strncpy(__entry->name, dev_name(dev), 32); | ||
51 | __entry->nr_pages = work->nr_pages; | 54 | __entry->nr_pages = work->nr_pages; |
52 | __entry->sb_dev = work->sb ? work->sb->s_dev : 0; | 55 | __entry->sb_dev = work->sb ? work->sb->s_dev : 0; |
53 | __entry->sync_mode = work->sync_mode; | 56 | __entry->sync_mode = work->sync_mode; |
@@ -426,7 +429,7 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template, | |||
426 | 429 | ||
427 | TP_fast_assign( | 430 | TP_fast_assign( |
428 | strncpy(__entry->name, | 431 | strncpy(__entry->name, |
429 | dev_name(inode->i_mapping->backing_dev_info->dev), 32); | 432 | dev_name(inode_to_bdi(inode)->dev), 32); |
430 | __entry->ino = inode->i_ino; | 433 | __entry->ino = inode->i_ino; |
431 | __entry->state = inode->i_state; | 434 | __entry->state = inode->i_state; |
432 | __entry->dirtied_when = inode->dirtied_when; | 435 | __entry->dirtied_when = inode->dirtied_when; |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 062b3b24ff10..483f67caa7ad 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -590,6 +590,11 @@ struct omap_dss_device { | |||
590 | int (*get_backlight)(struct omap_dss_device *dssdev); | 590 | int (*get_backlight)(struct omap_dss_device *dssdev); |
591 | }; | 591 | }; |
592 | 592 | ||
593 | struct omap_dss_hdmi_data | ||
594 | { | ||
595 | int hpd_gpio; | ||
596 | }; | ||
597 | |||
593 | struct omap_dss_driver { | 598 | struct omap_dss_driver { |
594 | struct device_driver driver; | 599 | struct device_driver driver; |
595 | 600 | ||