aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpiosxf.h4
-rw-r--r--include/acpi/atomicio.h10
-rw-r--r--include/acpi/processor.h1
-rw-r--r--include/drm/drmP.h1
-rw-r--r--include/keys/user-type.h3
-rw-r--r--include/linux/device.h15
-rw-r--r--include/linux/freezer.h2
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/if_team.h10
-rw-r--r--include/linux/kexec.h2
-rw-r--r--include/linux/mfd/mcp.h12
-rw-r--r--include/linux/mfd/ucb1x00.h5
-rw-r--r--include/linux/migrate.h14
-rw-r--r--include/linux/migrate_mode.h16
-rw-r--r--include/linux/mlx4/device.h1
-rw-r--r--include/linux/mod_devicetable.h11
-rw-r--r--include/linux/mtd/mtd.h4
-rw-r--r--include/linux/quota.h6
-rw-r--r--include/linux/res_counter.h11
-rw-r--r--include/linux/sched.h4
-rw-r--r--include/linux/shmem_fs.h1
-rw-r--r--include/linux/snmp.h1
-rw-r--r--include/linux/suspend.h19
-rw-r--r--include/linux/swap.h2
-rw-r--r--include/linux/sysdev.h164
-rw-r--r--include/linux/thermal.h4
-rw-r--r--include/linux/usb.h1
-rw-r--r--include/linux/usb/langwell_otg.h139
-rw-r--r--include/net/bluetooth/hci.h2
-rw-r--r--include/net/cfg80211.h6
-rw-r--r--include/net/netns/generic.h1
-rw-r--r--include/net/netprio_cgroup.h1
-rw-r--r--include/net/sock.h14
-rw-r--r--include/net/tcp.h2
34 files changed, 116 insertions, 375 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 */
219acpi_status 219acpi_status
220acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width); 220acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width);
221acpi_status
222acpi_os_read_memory64(acpi_physical_address address, u64 *value, u32 width);
221 223
222acpi_status 224acpi_status
223acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); 225acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width);
226acpi_status
227acpi_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
4int acpi_pre_map_gar(struct acpi_generic_address *reg);
5int acpi_post_unmap_gar(struct acpi_generic_address *reg);
6
7int acpi_atomic_read(u64 *val, struct acpi_generic_address *reg);
8int 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
200struct acpi_processor { 201struct acpi_processor {
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);
1329extern int drm_authmagic(struct drm_device *dev, void *data, 1329extern int drm_authmagic(struct drm_device *dev, void *data,
1330 struct drm_file *file_priv); 1330 struct drm_file *file_priv);
1331extern 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) */
1333void drm_clflush_pages(struct page *pages[], unsigned long num_pages); 1334void 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
35extern struct key_type key_type_user; 35extern struct key_type key_type_user;
36extern struct key_type key_type_logon;
36 37
37extern int user_instantiate(struct key *key, const void *data, size_t datalen); 38extern int user_instantiate(struct key *key, const void *data, size_t datalen);
38extern int user_update(struct key *key, const void *data, size_t datalen); 39extern int user_update(struct key *key, const void *data, size_t datalen);
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);
39extern int freeze_processes(void); 39extern int freeze_processes(void);
40extern int freeze_kernel_threads(void); 40extern int freeze_kernel_threads(void);
41extern void thaw_processes(void); 41extern void thaw_processes(void);
42extern void thaw_kernel_threads(void);
42 43
43static inline bool try_to_freeze(void) 44static inline bool try_to_freeze(void)
44{ 45{
@@ -174,6 +175,7 @@ static inline bool __refrigerator(bool check_kthr_stop) { return false; }
174static inline int freeze_processes(void) { return -ENOSYS; } 175static inline int freeze_processes(void) { return -ENOSYS; }
175static inline int freeze_kernel_threads(void) { return -ENOSYS; } 176static inline int freeze_kernel_threads(void) { return -ENOSYS; }
176static inline void thaw_processes(void) {} 177static inline void thaw_processes(void) {}
178static inline void thaw_kernel_threads(void) {}
177 179
178static inline bool try_to_freeze(void) { return false; } 180static 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 {
526struct page; 527struct page;
527struct address_space; 528struct address_space;
528struct writeback_control; 529struct writeback_control;
529enum migrate_mode;
530 530
531struct iov_iter { 531struct iov_iter {
532 const struct iovec *iov; 532 const struct iovec *iov;
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
77struct team_mode { 85struct 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/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
16struct mcp_ops; 15struct 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
33struct mcp_ops { 32struct mcp_ops {
@@ -45,11 +44,10 @@ void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
45unsigned int mcp_reg_read(struct mcp *, unsigned int); 44unsigned int mcp_reg_read(struct mcp *, unsigned int);
46void mcp_enable(struct mcp *); 45void mcp_enable(struct mcp *);
47void mcp_disable(struct mcp *); 46void mcp_disable(struct mcp *);
48const 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
51struct mcp *mcp_host_alloc(struct device *, size_t); 49struct mcp *mcp_host_alloc(struct device *, size_t);
52int mcp_host_register(struct mcp *, void *); 50int mcp_host_register(struct mcp *);
53void mcp_host_unregister(struct mcp *); 51void mcp_host_unregister(struct mcp *);
54 52
55struct mcp_driver { 53struct 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
64int mcp_driver_register(struct mcp_driver *); 61int 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)) 67static 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/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
107struct ucb1x00_plat_data {
108 int gpio_base;
109};
110 107
111struct ucb1x00_irq { 108struct 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
7typedef struct page *new_page_t(struct page *, unsigned long private, int **); 8typedef 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 */
16enum 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 */
10enum 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);
621int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac); 621int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac);
622int mlx4_get_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn); 622int mlx4_get_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn);
623void mlx4_put_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int qpn); 623void mlx4_put_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int qpn);
624void mlx4_set_stats_bitmap(struct mlx4_dev *dev, u64 *stats_bitmap);
624 625
625int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); 626int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx);
626int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); 627int 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
444struct 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 */
451enum dmi_field { 440enum dmi_field {
452 DMI_NONE, 441 DMI_NONE,
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 1a81fde8f333..221295208fd0 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -441,7 +441,7 @@ static inline void mtd_resume(struct mtd_info *mtd)
441static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) 441static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs)
442{ 442{
443 if (!mtd->block_isbad) 443 if (!mtd->block_isbad)
444 return -EOPNOTSUPP; 444 return 0;
445 return mtd->block_isbad(mtd, ofs); 445 return mtd->block_isbad(mtd, ofs);
446} 446}
447 447
@@ -489,7 +489,7 @@ static inline int mtd_has_oob(const struct mtd_info *mtd)
489 489
490static inline int mtd_can_have_bb(const struct mtd_info *mtd) 490static inline int mtd_can_have_bb(const struct mtd_info *mtd)
491{ 491{
492 return !!mtd->block_isbad; 492 return 0;
493} 493}
494 494
495 /* Kernel-side ioctl definitions */ 495 /* Kernel-side ioctl definitions */
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 {
230struct super_block; 230struct 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
236extern void mark_info_dirty(struct super_block *sb, int type); 240extern 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
114int __must_check res_counter_charge_locked(struct res_counter *counter, 118int __must_check res_counter_charge_locked(struct res_counter *counter,
115 unsigned long val); 119 unsigned long val);
116int __must_check res_counter_charge(struct res_counter *counter, 120int __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);
122int __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..2234985a5e65 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2088,9 +2088,9 @@ extern int sched_setscheduler_nocheck(struct task_struct *, int,
2088extern struct task_struct *idle_task(int cpu); 2088extern 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 */
2093static inline bool is_idle_task(struct task_struct *p) 2093static inline bool is_idle_task(const struct task_struct *p)
2094{ 2094{
2095 return p->pid == 0; 2095 return p->pid == 0;
2096} 2096}
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);
49extern int shmem_zero_setup(struct vm_area_struct *); 49extern int shmem_zero_setup(struct vm_area_struct *);
50extern int shmem_lock(struct file *file, int lock, struct user_struct *user); 50extern int shmem_lock(struct file *file, int lock, struct user_struct *user);
51extern void shmem_unlock_mapping(struct address_space *mapping);
51extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, 52extern 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);
53extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end); 54extern 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
358static inline void lock_system_sleep(void) 358static 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
364static inline void unlock_system_sleep(void) 364static 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
275extern int page_evictable(struct page *page, struct vm_area_struct *vma); 275extern int page_evictable(struct page *page, struct vm_area_struct *vma);
276extern void scan_mapping_unevictable_pages(struct address_space *); 276extern void check_move_unevictable_pages(struct page **, int nr_pages);
277 277
278extern unsigned long scan_unevictable_pages; 278extern unsigned long scan_unevictable_pages;
279extern int scan_unevictable_handler(struct ctl_table *, int, 279extern 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
28struct sys_device;
29struct sysdev_class_attribute;
30
31struct sysdev_class {
32 const char *name;
33 struct list_head drivers;
34 struct sysdev_class_attribute **attrs;
35 struct kset kset;
36};
37
38struct 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
58extern int sysdev_class_register(struct sysdev_class *);
59extern void sysdev_class_unregister(struct sysdev_class *);
60
61extern int sysdev_class_create_file(struct sysdev_class *,
62 struct sysdev_class_attribute *);
63extern void sysdev_class_remove_file(struct sysdev_class *,
64 struct sysdev_class_attribute *);
65/**
66 * Auxiliary system device drivers.
67 */
68
69struct sysdev_driver {
70 struct list_head entry;
71 int (*add)(struct sys_device *);
72 int (*remove)(struct sys_device *);
73};
74
75
76extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *);
77extern 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
85struct sys_device {
86 u32 id;
87 struct sysdev_class * cls;
88 struct kobject kobj;
89};
90
91extern int sysdev_register(struct sys_device *);
92extern void sysdev_unregister(struct sys_device *);
93
94
95struct 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
114extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *);
115extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);
116
117/* Create/remove NULL terminated attribute list */
118static inline int
119sysdev_create_files(struct sys_device *d, struct sysdev_attribute **a)
120{
121 return sysfs_create_files(&d->kobj, (const struct attribute **)a);
122}
123
124static inline void
125sysdev_remove_files(struct sys_device *d, struct sysdev_attribute **a)
126{
127 return sysfs_remove_files(&d->kobj, (const struct attribute **)a);
128}
129
130struct 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
142extern ssize_t sysdev_show_ulong(struct sys_device *, struct sysdev_attribute *,
143 char *);
144extern ssize_t sysdev_store_ulong(struct sys_device *,
145 struct sysdev_attribute *, const char *, size_t);
146extern ssize_t sysdev_show_int(struct sys_device *, struct sysdev_attribute *,
147 char *);
148extern 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 *,
152void thermal_cooling_device_unregister(struct thermal_cooling_device *); 152void thermal_cooling_device_unregister(struct thermal_cooling_device *);
153 153
154#ifdef CONFIG_NET 154#ifdef CONFIG_NET
155extern int generate_netlink_event(u32 orig, enum events event); 155extern int thermal_generate_netlink_event(u32 orig, enum events event);
156#else 156#else
157static inline int generate_netlink_event(u32 orig, enum events event) 157static 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/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
86enum 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
106struct 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
114struct 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
133static inline
134struct 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
1391extern int enable_hs; 1391extern 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/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..7b2d43139c8e 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>
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)
925extern struct jump_label_key memcg_socket_limit_enabled; 927extern struct jump_label_key memcg_socket_limit_enabled;
926static inline struct cg_proto *parent_cg_proto(struct proto *proto, 928static 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
1055static inline void 1056static inline void
1056sk_memory_allocated_sub(struct sock *sk, int amt, int parent_status) 1057sk_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..d49db0113a06 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -311,6 +311,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) 311#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) 312#define TCP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val)
313 313
314extern void tcp_init_mem(struct net *net);
315
314extern void tcp_v4_err(struct sk_buff *skb, u32); 316extern void tcp_v4_err(struct sk_buff *skb, u32);
315 317
316extern void tcp_shutdown (struct sock *sk, int how); 318extern void tcp_shutdown (struct sock *sk, int how);