aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cgroup.h1
-rw-r--r--include/linux/debugfs.h7
-rw-r--r--include/linux/dmaengine.h11
-rw-r--r--include/linux/dmi.h3
-rw-r--r--include/linux/i2c-id.h61
-rw-r--r--include/linux/i2c.h8
-rw-r--r--include/linux/if_frad.h10
-rw-r--r--include/linux/init_task.h6
-rw-r--r--include/linux/interrupt.h1
-rw-r--r--include/linux/irq.h86
-rw-r--r--include/linux/irqnr.h1
-rw-r--r--include/linux/klist.h2
-rw-r--r--include/linux/kprobes.h47
-rw-r--r--include/linux/libata.h2
-rw-r--r--include/linux/magic.h1
-rw-r--r--include/linux/mod_devicetable.h7
-rw-r--r--include/linux/pci.h5
-rw-r--r--include/linux/pci_ids.h4
-rw-r--r--include/linux/percpu.h41
-rw-r--r--include/linux/quotaops.h2
-rw-r--r--include/linux/sched.h49
-rw-r--r--include/linux/stackprotector.h16
-rw-r--r--include/linux/suspend.h2
-rw-r--r--include/linux/syscalls.h5
-rw-r--r--include/linux/topology.h6
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/usb/usbnet.h4
-rw-r--r--include/linux/workqueue.h12
28 files changed, 271 insertions, 131 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index e267e62827bb..e4e8e117d27d 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -99,6 +99,7 @@ static inline bool css_tryget(struct cgroup_subsys_state *css)
99 while (!atomic_inc_not_zero(&css->refcnt)) { 99 while (!atomic_inc_not_zero(&css->refcnt)) {
100 if (test_bit(CSS_REMOVED, &css->flags)) 100 if (test_bit(CSS_REMOVED, &css->flags))
101 return false; 101 return false;
102 cpu_relax();
102 } 103 }
103 return true; 104 return true;
104} 105}
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 23936b16426b..af0e01d4c663 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -162,6 +162,13 @@ static inline struct dentry *debugfs_create_x32(const char *name, mode_t mode,
162 return ERR_PTR(-ENODEV); 162 return ERR_PTR(-ENODEV);
163} 163}
164 164
165static inline struct dentry *debugfs_create_size_t(const char *name, mode_t mode,
166 struct dentry *parent,
167 size_t *value)
168{
169 return ERR_PTR(-ENODEV);
170}
171
165static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, 172static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode,
166 struct dentry *parent, 173 struct dentry *parent,
167 u32 *value) 174 u32 *value)
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index c73f1e2b59b7..3e0f64c335c8 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -297,6 +297,11 @@ static inline void async_tx_ack(struct dma_async_tx_descriptor *tx)
297 tx->flags |= DMA_CTRL_ACK; 297 tx->flags |= DMA_CTRL_ACK;
298} 298}
299 299
300static inline void async_tx_clear_ack(struct dma_async_tx_descriptor *tx)
301{
302 tx->flags &= ~DMA_CTRL_ACK;
303}
304
300static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx) 305static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx)
301{ 306{
302 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK; 307 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK;
@@ -400,11 +405,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
400enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); 405enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
401#ifdef CONFIG_DMA_ENGINE 406#ifdef CONFIG_DMA_ENGINE
402enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); 407enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
408void dma_issue_pending_all(void);
403#else 409#else
404static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) 410static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
405{ 411{
406 return DMA_SUCCESS; 412 return DMA_SUCCESS;
407} 413}
414static inline void dma_issue_pending_all(void)
415{
416 do { } while (0);
417}
408#endif 418#endif
409 419
410/* --- DMA device --- */ 420/* --- DMA device --- */
@@ -413,7 +423,6 @@ int dma_async_device_register(struct dma_device *device);
413void dma_async_device_unregister(struct dma_device *device); 423void dma_async_device_unregister(struct dma_device *device);
414void dma_run_dependencies(struct dma_async_tx_descriptor *tx); 424void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
415struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); 425struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
416void dma_issue_pending_all(void);
417#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) 426#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
418struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); 427struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
419void dma_release_channel(struct dma_chan *chan); 428void dma_release_channel(struct dma_chan *chan);
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index 34161907b2f8..d741b9ceb0e0 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -38,6 +38,7 @@ struct dmi_device {
38#ifdef CONFIG_DMI 38#ifdef CONFIG_DMI
39 39
40extern int dmi_check_system(const struct dmi_system_id *list); 40extern int dmi_check_system(const struct dmi_system_id *list);
41const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
41extern const char * dmi_get_system_info(int field); 42extern const char * dmi_get_system_info(int field);
42extern const struct dmi_device * dmi_find_device(int type, const char *name, 43extern const struct dmi_device * dmi_find_device(int type, const char *name,
43 const struct dmi_device *from); 44 const struct dmi_device *from);
@@ -64,6 +65,8 @@ static inline int dmi_walk(void (*decode)(const struct dmi_header *))
64 { return -1; } 65 { return -1; }
65static inline bool dmi_match(enum dmi_field f, const char *str) 66static inline bool dmi_match(enum dmi_field f, const char *str)
66 { return false; } 67 { return false; }
68static inline const struct dmi_system_id *
69 dmi_first_match(const struct dmi_system_id *list) { return NULL; }
67 70
68#endif 71#endif
69 72
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 01d67ba9e985..1ffc23bc5d1e 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -40,9 +40,7 @@
40#define I2C_DRIVERID_SAA7185B 13 /* video encoder */ 40#define I2C_DRIVERID_SAA7185B 13 /* video encoder */
41#define I2C_DRIVERID_SAA7110 22 /* video decoder */ 41#define I2C_DRIVERID_SAA7110 22 /* video decoder */
42#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ 42#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */
43#define I2C_DRIVERID_PCF8583 25 /* real time clock */
44#define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ 43#define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */
45#define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */
46#define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ 44#define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */
47#define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ 45#define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */
48#define I2C_DRIVERID_BT819 40 /* video decoder */ 46#define I2C_DRIVERID_BT819 40 /* video decoder */
@@ -54,7 +52,6 @@
54#define I2C_DRIVERID_SAA7191 57 /* video decoder */ 52#define I2C_DRIVERID_SAA7191 57 /* video decoder */
55#define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ 53#define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */
56#define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ 54#define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */
57#define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */
58#define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ 55#define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */
59#define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ 56#define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */
60#define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ 57#define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */
@@ -62,23 +59,16 @@
62#define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ 59#define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */
63#define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */ 60#define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */
64#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ 61#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */
65#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
66#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ 62#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */
67#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */ 63#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */
68#define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */ 64#define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */
69#define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */ 65#define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */
70#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */ 66#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */
71#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */ 67#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */
72#define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */
73#define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ 68#define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */
74#define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ 69#define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */
75#define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ 70#define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */
76#define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */
77#define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */
78#define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */
79#define I2C_DRIVERID_LM4857 92 /* LM4857 Audio Amplifier */
80#define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */ 71#define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */
81#define I2C_DRIVERID_CS4270 94 /* Cirrus Logic 4270 audio codec */
82#define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */ 72#define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */
83#define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ 73#define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */
84 74
@@ -89,74 +79,23 @@
89 */ 79 */
90 80
91/* --- Bit algorithm adapters */ 81/* --- Bit algorithm adapters */
92#define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */
93#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ 82#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */
94#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */
95#define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */
96#define I2C_HW_B_I810 0x01000a /* Intel I810 */
97#define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */
98#define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */
99#define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ 83#define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */
100#define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */
101#define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */
102#define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ 84#define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */
103#define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */
104#define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ 85#define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */
105#define I2C_HW_B_NVIDIA 0x01001c /* nvidia framebuffer driver */
106#define I2C_HW_B_SAVAGE 0x01001d /* savage framebuffer driver */
107#define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */
108#define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ 86#define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */
109#define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ 87#define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */
110#define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */
111#define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ 88#define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */
112#define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ 89#define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */
113 90
114/* --- PCF 8584 based algorithms */
115#define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */
116
117/* --- PCA 9564 based algorithms */
118#define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */
119
120/* --- PowerPC on-chip adapters */
121#define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */
122
123/* --- Broadcom SiByte adapters */
124#define I2C_HW_SIBYTE 0x150000
125
126/* --- SGI adapters */ 91/* --- SGI adapters */
127#define I2C_HW_SGI_VINO 0x160000 92#define I2C_HW_SGI_VINO 0x160000
128 93
129/* --- XSCALE on-chip adapters */
130#define I2C_HW_IOP3XX 0x140000
131
132/* --- Au1550 PSC adapters adapters */
133#define I2C_HW_AU1550_PSC 0x1b0000
134
135/* --- SMBus only adapters */ 94/* --- SMBus only adapters */
136#define I2C_HW_SMBUS_PIIX4 0x040000
137#define I2C_HW_SMBUS_ALI15X3 0x040001
138#define I2C_HW_SMBUS_VIA2 0x040002
139#define I2C_HW_SMBUS_I801 0x040004
140#define I2C_HW_SMBUS_AMD756 0x040005
141#define I2C_HW_SMBUS_SIS5595 0x040006
142#define I2C_HW_SMBUS_ALI1535 0x040007
143#define I2C_HW_SMBUS_SIS630 0x040008
144#define I2C_HW_SMBUS_SIS96X 0x040009
145#define I2C_HW_SMBUS_AMD8111 0x04000a
146#define I2C_HW_SMBUS_SCX200 0x04000b
147#define I2C_HW_SMBUS_NFORCE2 0x04000c
148#define I2C_HW_SMBUS_W9968CF 0x04000d 95#define I2C_HW_SMBUS_W9968CF 0x04000d
149#define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ 96#define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */
150#define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ 97#define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */
151#define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ 98#define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */
152#define I2C_HW_SMBUS_ALI1563 0x040013
153
154/* --- MCP107 adapter */
155#define I2C_HW_MPC107 0x0d0000
156
157/* --- Embedded adapters */
158#define I2C_HW_MV64XXX 0x190000
159#define I2C_HW_BLACKFIN 0x190001 /* ADI Blackfin I2C TWI driver */
160 99
161/* --- Miscellaneous adapters */ 100/* --- Miscellaneous adapters */
162#define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ 101#define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 20873d402467..fcfbfea3af72 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -151,7 +151,7 @@ struct i2c_driver {
151 * has been dynamically allocated by the driver in the function above, 151 * has been dynamically allocated by the driver in the function above,
152 * it must be freed here. (LEGACY I2C DRIVERS ONLY) 152 * it must be freed here. (LEGACY I2C DRIVERS ONLY)
153 */ 153 */
154 int (*detach_client)(struct i2c_client *); 154 int (*detach_client)(struct i2c_client *) __deprecated;
155 155
156 /* Standard driver model interfaces, for "new style" i2c drivers. 156 /* Standard driver model interfaces, for "new style" i2c drivers.
157 * With the driver model, device enumeration is NEVER done by drivers; 157 * With the driver model, device enumeration is NEVER done by drivers;
@@ -429,8 +429,10 @@ static inline int i2c_add_driver(struct i2c_driver *driver)
429 return i2c_register_driver(THIS_MODULE, driver); 429 return i2c_register_driver(THIS_MODULE, driver);
430} 430}
431 431
432extern int i2c_attach_client(struct i2c_client *); 432/* These are deprecated, your driver should use the standard .probe()
433extern int i2c_detach_client(struct i2c_client *); 433 * and .remove() methods instead. */
434extern int __deprecated i2c_attach_client(struct i2c_client *);
435extern int __deprecated i2c_detach_client(struct i2c_client *);
434 436
435extern struct i2c_client *i2c_use_client(struct i2c_client *client); 437extern struct i2c_client *i2c_use_client(struct i2c_client *client);
436extern void i2c_release_client(struct i2c_client *client); 438extern void i2c_release_client(struct i2c_client *client);
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h
index 5c34240de746..60e16a551dd6 100644
--- a/include/linux/if_frad.h
+++ b/include/linux/if_frad.h
@@ -26,8 +26,6 @@
26 26
27#include <linux/if.h> 27#include <linux/if.h>
28 28
29#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
30
31/* Structures and constants associated with the DLCI device driver */ 29/* Structures and constants associated with the DLCI device driver */
32 30
33struct dlci_add 31struct dlci_add
@@ -127,6 +125,8 @@ struct frad_conf
127 125
128#ifdef __KERNEL__ 126#ifdef __KERNEL__
129 127
128#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
129
130/* these are the fields of an RFC 1490 header */ 130/* these are the fields of an RFC 1490 header */
131struct frhdr 131struct frhdr
132{ 132{
@@ -190,12 +190,10 @@ struct frad_local
190 int buffer; /* current buffer for S508 firmware */ 190 int buffer; /* current buffer for S508 firmware */
191}; 191};
192 192
193#endif /* __KERNEL__ */
194
195#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */ 193#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
196 194
197#ifdef __KERNEL__
198extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)); 195extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
199#endif 196
197#endif /* __KERNEL__ */
200 198
201#endif 199#endif
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 2f3c2d4ef73b..ea0ea1a4c36f 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -48,6 +48,12 @@ extern struct fs_struct init_fs;
48 .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ 48 .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
49 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ 49 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
50 .rlim = INIT_RLIMITS, \ 50 .rlim = INIT_RLIMITS, \
51 .cputime = { .totals = { \
52 .utime = cputime_zero, \
53 .stime = cputime_zero, \
54 .sum_exec_runtime = 0, \
55 .lock = __SPIN_LOCK_UNLOCKED(sig.cputime.totals.lock), \
56 }, }, \
51} 57}
52 58
53extern struct nsproxy init_nsproxy; 59extern struct nsproxy init_nsproxy;
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 9127f6b51a39..472f11765f60 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -467,6 +467,7 @@ int show_interrupts(struct seq_file *p, void *v);
467struct irq_desc; 467struct irq_desc;
468 468
469extern int early_irq_init(void); 469extern int early_irq_init(void);
470extern int arch_probe_nr_irqs(void);
470extern int arch_early_irq_init(void); 471extern int arch_early_irq_init(void);
471extern int arch_init_chip_data(struct irq_desc *desc, int cpu); 472extern int arch_init_chip_data(struct irq_desc *desc, int cpu);
472 473
diff --git a/include/linux/irq.h b/include/linux/irq.h
index f899b502f186..27a67536511e 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -182,11 +182,11 @@ struct irq_desc {
182 unsigned int irqs_unhandled; 182 unsigned int irqs_unhandled;
183 spinlock_t lock; 183 spinlock_t lock;
184#ifdef CONFIG_SMP 184#ifdef CONFIG_SMP
185 cpumask_t affinity; 185 cpumask_var_t affinity;
186 unsigned int cpu; 186 unsigned int cpu;
187#endif
188#ifdef CONFIG_GENERIC_PENDING_IRQ 187#ifdef CONFIG_GENERIC_PENDING_IRQ
189 cpumask_t pending_mask; 188 cpumask_var_t pending_mask;
189#endif
190#endif 190#endif
191#ifdef CONFIG_PROC_FS 191#ifdef CONFIG_PROC_FS
192 struct proc_dir_entry *dir; 192 struct proc_dir_entry *dir;
@@ -422,4 +422,84 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
422 422
423#endif /* !CONFIG_S390 */ 423#endif /* !CONFIG_S390 */
424 424
425#ifdef CONFIG_SMP
426/**
427 * init_alloc_desc_masks - allocate cpumasks for irq_desc
428 * @desc: pointer to irq_desc struct
429 * @cpu: cpu which will be handling the cpumasks
430 * @boot: true if need bootmem
431 *
432 * Allocates affinity and pending_mask cpumask if required.
433 * Returns true if successful (or not required).
434 * Side effect: affinity has all bits set, pending_mask has all bits clear.
435 */
436static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
437 bool boot)
438{
439 int node;
440
441 if (boot) {
442 alloc_bootmem_cpumask_var(&desc->affinity);
443 cpumask_setall(desc->affinity);
444
445#ifdef CONFIG_GENERIC_PENDING_IRQ
446 alloc_bootmem_cpumask_var(&desc->pending_mask);
447 cpumask_clear(desc->pending_mask);
448#endif
449 return true;
450 }
451
452 node = cpu_to_node(cpu);
453
454 if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node))
455 return false;
456 cpumask_setall(desc->affinity);
457
458#ifdef CONFIG_GENERIC_PENDING_IRQ
459 if (!alloc_cpumask_var_node(&desc->pending_mask, GFP_ATOMIC, node)) {
460 free_cpumask_var(desc->affinity);
461 return false;
462 }
463 cpumask_clear(desc->pending_mask);
464#endif
465 return true;
466}
467
468/**
469 * init_copy_desc_masks - copy cpumasks for irq_desc
470 * @old_desc: pointer to old irq_desc struct
471 * @new_desc: pointer to new irq_desc struct
472 *
473 * Insures affinity and pending_masks are copied to new irq_desc.
474 * If !CONFIG_CPUMASKS_OFFSTACK the cpumasks are embedded in the
475 * irq_desc struct so the copy is redundant.
476 */
477
478static inline void init_copy_desc_masks(struct irq_desc *old_desc,
479 struct irq_desc *new_desc)
480{
481#ifdef CONFIG_CPUMASKS_OFFSTACK
482 cpumask_copy(new_desc->affinity, old_desc->affinity);
483
484#ifdef CONFIG_GENERIC_PENDING_IRQ
485 cpumask_copy(new_desc->pending_mask, old_desc->pending_mask);
486#endif
487#endif
488}
489
490#else /* !CONFIG_SMP */
491
492static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
493 bool boot)
494{
495 return true;
496}
497
498static inline void init_copy_desc_masks(struct irq_desc *old_desc,
499 struct irq_desc *new_desc)
500{
501}
502
503#endif /* CONFIG_SMP */
504
425#endif /* _LINUX_IRQ_H */ 505#endif /* _LINUX_IRQ_H */
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index 86af92e9e84c..887477bc2ab0 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -20,6 +20,7 @@
20 20
21# define for_each_irq_desc_reverse(irq, desc) \ 21# define for_each_irq_desc_reverse(irq, desc) \
22 for (irq = nr_irqs - 1; irq >= 0; irq--) 22 for (irq = nr_irqs - 1; irq >= 0; irq--)
23
23#else /* CONFIG_GENERIC_HARDIRQS */ 24#else /* CONFIG_GENERIC_HARDIRQS */
24 25
25extern int nr_irqs; 26extern int nr_irqs;
diff --git a/include/linux/klist.h b/include/linux/klist.h
index d5a27af9dba5..e91a4e59b771 100644
--- a/include/linux/klist.h
+++ b/include/linux/klist.h
@@ -22,7 +22,7 @@ struct klist {
22 struct list_head k_list; 22 struct list_head k_list;
23 void (*get)(struct klist_node *); 23 void (*get)(struct klist_node *);
24 void (*put)(struct klist_node *); 24 void (*put)(struct klist_node *);
25}; 25} __attribute__ ((aligned (4)));
26 26
27#define KLIST_INIT(_name, _get, _put) \ 27#define KLIST_INIT(_name, _get, _put) \
28 { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ 28 { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index d6ea19e314bb..32851eef48f0 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -49,6 +49,13 @@
49 49
50/* Attach to insert probes on any functions which should be ignored*/ 50/* Attach to insert probes on any functions which should be ignored*/
51#define __kprobes __attribute__((__section__(".kprobes.text"))) notrace 51#define __kprobes __attribute__((__section__(".kprobes.text"))) notrace
52#else /* CONFIG_KPROBES */
53typedef int kprobe_opcode_t;
54struct arch_specific_insn {
55 int dummy;
56};
57#define __kprobes notrace
58#endif /* CONFIG_KPROBES */
52 59
53struct kprobe; 60struct kprobe;
54struct pt_regs; 61struct pt_regs;
@@ -131,23 +138,6 @@ struct jprobe {
131/* For backward compatibility with old code using JPROBE_ENTRY() */ 138/* For backward compatibility with old code using JPROBE_ENTRY() */
132#define JPROBE_ENTRY(handler) (handler) 139#define JPROBE_ENTRY(handler) (handler)
133 140
134DECLARE_PER_CPU(struct kprobe *, current_kprobe);
135DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
136
137#ifdef CONFIG_KRETPROBES
138extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
139 struct pt_regs *regs);
140extern int arch_trampoline_kprobe(struct kprobe *p);
141#else /* CONFIG_KRETPROBES */
142static inline void arch_prepare_kretprobe(struct kretprobe *rp,
143 struct pt_regs *regs)
144{
145}
146static inline int arch_trampoline_kprobe(struct kprobe *p)
147{
148 return 0;
149}
150#endif /* CONFIG_KRETPROBES */
151/* 141/*
152 * Function-return probe - 142 * Function-return probe -
153 * Note: 143 * Note:
@@ -188,6 +178,25 @@ struct kprobe_blackpoint {
188 unsigned long range; 178 unsigned long range;
189}; 179};
190 180
181#ifdef CONFIG_KPROBES
182DECLARE_PER_CPU(struct kprobe *, current_kprobe);
183DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
184
185#ifdef CONFIG_KRETPROBES
186extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
187 struct pt_regs *regs);
188extern int arch_trampoline_kprobe(struct kprobe *p);
189#else /* CONFIG_KRETPROBES */
190static inline void arch_prepare_kretprobe(struct kretprobe *rp,
191 struct pt_regs *regs)
192{
193}
194static inline int arch_trampoline_kprobe(struct kprobe *p)
195{
196 return 0;
197}
198#endif /* CONFIG_KRETPROBES */
199
191extern struct kretprobe_blackpoint kretprobe_blacklist[]; 200extern struct kretprobe_blackpoint kretprobe_blacklist[];
192 201
193static inline void kretprobe_assert(struct kretprobe_instance *ri, 202static inline void kretprobe_assert(struct kretprobe_instance *ri,
@@ -264,10 +273,6 @@ void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
264 273
265#else /* CONFIG_KPROBES */ 274#else /* CONFIG_KPROBES */
266 275
267#define __kprobes notrace
268struct jprobe;
269struct kretprobe;
270
271static inline struct kprobe *get_kprobe(void *addr) 276static inline struct kprobe *get_kprobe(void *addr)
272{ 277{
273 return NULL; 278 return NULL;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2c6bd66209ff..bca3ba25f52a 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -187,6 +187,8 @@ enum {
187 ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD 187 ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD
188 * doesn't handle PIO interrupts */ 188 * doesn't handle PIO interrupts */
189 ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ 189 ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */
190 ATA_FLAG_NO_POWEROFF_SPINDOWN = (1 << 11), /* don't spindown before poweroff */
191 ATA_FLAG_NO_HIBERNATE_SPINDOWN = (1 << 12), /* don't spindown before hibernation */
190 ATA_FLAG_DEBUGMSG = (1 << 13), 192 ATA_FLAG_DEBUGMSG = (1 << 13),
191 ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ 193 ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */
192 ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ 194 ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */
diff --git a/include/linux/magic.h b/include/linux/magic.h
index 0b4df7eba852..5b4e28bcb788 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
@@ -49,4 +49,5 @@
49#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA 49#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
50#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA 50#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
51 51
52#define STACK_END_MAGIC 0x57AC6E9D
52#endif /* __LINUX_MAGIC_H__ */ 53#endif /* __LINUX_MAGIC_H__ */
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 97b91d1abb43..fde86671f48f 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -443,6 +443,13 @@ struct dmi_system_id {
443 struct dmi_strmatch matches[4]; 443 struct dmi_strmatch matches[4];
444 void *driver_data; 444 void *driver_data;
445}; 445};
446/*
447 * struct dmi_device_id appears during expansion of
448 * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
449 * but this is enough for gcc 3.4.6 to error out:
450 * error: storage size of '__mod_dmi_device_table' isn't known
451 */
452#define dmi_device_id dmi_system_id
446#endif 453#endif
447 454
448#define DMI_MATCH(a, b) { a, b } 455#define DMI_MATCH(a, b) { a, b }
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 80f8b8b65fde..48890cf3f96e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -117,6 +117,10 @@ typedef int __bitwise pci_power_t;
117#define PCI_UNKNOWN ((pci_power_t __force) 5) 117#define PCI_UNKNOWN ((pci_power_t __force) 5)
118#define PCI_POWER_ERROR ((pci_power_t __force) -1) 118#define PCI_POWER_ERROR ((pci_power_t __force) -1)
119 119
120#define PCI_PM_D2_DELAY 200
121#define PCI_PM_D3_WAIT 10
122#define PCI_PM_BUS_WAIT 50
123
120/** The pci_channel state describes connectivity between the CPU and 124/** The pci_channel state describes connectivity between the CPU and
121 * the pci device. If some PCI bus between here and the pci device 125 * the pci device. If some PCI bus between here and the pci device
122 * has crashed or locked up, this info is reflected here. 126 * has crashed or locked up, this info is reflected here.
@@ -252,6 +256,7 @@ struct pci_dev {
252 unsigned int ari_enabled:1; /* ARI forwarding */ 256 unsigned int ari_enabled:1; /* ARI forwarding */
253 unsigned int is_managed:1; 257 unsigned int is_managed:1;
254 unsigned int is_pcie:1; 258 unsigned int is_pcie:1;
259 unsigned int state_saved:1;
255 pci_dev_flags_t dev_flags; 260 pci_dev_flags_t dev_flags;
256 atomic_t enable_cnt; /* pci_enable_device has been called */ 261 atomic_t enable_cnt; /* pci_enable_device has been called */
257 262
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d56ad9c21c09..febc10ed3858 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1357,6 +1357,7 @@
1357#define PCI_DEVICE_ID_VIA_8783_0 0x3208 1357#define PCI_DEVICE_ID_VIA_8783_0 0x3208
1358#define PCI_DEVICE_ID_VIA_8237 0x3227 1358#define PCI_DEVICE_ID_VIA_8237 0x3227
1359#define PCI_DEVICE_ID_VIA_8251 0x3287 1359#define PCI_DEVICE_ID_VIA_8251 0x3287
1360#define PCI_DEVICE_ID_VIA_8261 0x3402
1360#define PCI_DEVICE_ID_VIA_8237A 0x3337 1361#define PCI_DEVICE_ID_VIA_8237A 0x3337
1361#define PCI_DEVICE_ID_VIA_8237S 0x3372 1362#define PCI_DEVICE_ID_VIA_8237S 0x3372
1362#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324 1363#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324
@@ -1366,10 +1367,13 @@
1366#define PCI_DEVICE_ID_VIA_CX700 0x8324 1367#define PCI_DEVICE_ID_VIA_CX700 0x8324
1367#define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581 1368#define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581
1368#define PCI_DEVICE_ID_VIA_VX800 0x8353 1369#define PCI_DEVICE_ID_VIA_VX800 0x8353
1370#define PCI_DEVICE_ID_VIA_VX855 0x8409
1369#define PCI_DEVICE_ID_VIA_8371_1 0x8391 1371#define PCI_DEVICE_ID_VIA_8371_1 0x8391
1370#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 1372#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
1371#define PCI_DEVICE_ID_VIA_838X_1 0xB188 1373#define PCI_DEVICE_ID_VIA_838X_1 0xB188
1372#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198 1374#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198
1375#define PCI_DEVICE_ID_VIA_C409_IDE 0XC409
1376#define PCI_DEVICE_ID_VIA_ANON 0xFFFF
1373 1377
1374#define PCI_VENDOR_ID_SIEMENS 0x110A 1378#define PCI_VENDOR_ID_SIEMENS 0x110A
1375#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 1379#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 9f2a3751873a..0e24202b5a4e 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -9,34 +9,39 @@
9#include <asm/percpu.h> 9#include <asm/percpu.h>
10 10
11#ifdef CONFIG_SMP 11#ifdef CONFIG_SMP
12#define DEFINE_PER_CPU(type, name) \ 12#define PER_CPU_BASE_SECTION ".data.percpu"
13 __attribute__((__section__(".data.percpu"))) \
14 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
15 13
16#ifdef MODULE 14#ifdef MODULE
17#define SHARED_ALIGNED_SECTION ".data.percpu" 15#define PER_CPU_SHARED_ALIGNED_SECTION ""
18#else 16#else
19#define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned" 17#define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned"
20#endif 18#endif
19#define PER_CPU_FIRST_SECTION ".first"
21 20
22#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ 21#else
23 __attribute__((__section__(SHARED_ALIGNED_SECTION))) \ 22
24 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ 23#define PER_CPU_BASE_SECTION ".data"
25 ____cacheline_aligned_in_smp 24#define PER_CPU_SHARED_ALIGNED_SECTION ""
25#define PER_CPU_FIRST_SECTION ""
26
27#endif
26 28
27#define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ 29#define DEFINE_PER_CPU_SECTION(type, name, section) \
28 __attribute__((__section__(".data.percpu.page_aligned"))) \ 30 __attribute__((__section__(PER_CPU_BASE_SECTION section))) \
29 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name 31 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
30#else 32
31#define DEFINE_PER_CPU(type, name) \ 33#define DEFINE_PER_CPU(type, name) \
32 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name 34 DEFINE_PER_CPU_SECTION(type, name, "")
33 35
34#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ 36#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
35 DEFINE_PER_CPU(type, name) 37 DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \
38 ____cacheline_aligned_in_smp
36 39
37#define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ 40#define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \
38 DEFINE_PER_CPU(type, name) 41 DEFINE_PER_CPU_SECTION(type, name, ".page_aligned")
39#endif 42
43#define DEFINE_PER_CPU_FIRST(type, name) \
44 DEFINE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION)
40 45
41#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) 46#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
42#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) 47#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 21b781a3350f..0b35b3a1be05 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -24,10 +24,8 @@ void sync_dquots(struct super_block *sb, int type);
24 24
25int dquot_initialize(struct inode *inode, int type); 25int dquot_initialize(struct inode *inode, int type);
26int dquot_drop(struct inode *inode); 26int dquot_drop(struct inode *inode);
27int dquot_drop_locked(struct inode *inode);
28struct dquot *dqget(struct super_block *sb, unsigned int id, int type); 27struct dquot *dqget(struct super_block *sb, unsigned int id, int type);
29void dqput(struct dquot *dquot); 28void dqput(struct dquot *dquot);
30int dquot_is_cached(struct super_block *sb, unsigned int id, int type);
31int dquot_scan_active(struct super_block *sb, 29int dquot_scan_active(struct super_block *sb,
32 int (*fn)(struct dquot *dquot, unsigned long priv), 30 int (*fn)(struct dquot *dquot, unsigned long priv),
33 unsigned long priv); 31 unsigned long priv);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4cae9b81a1f8..2225c207801c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -293,6 +293,9 @@ extern void sched_show_task(struct task_struct *p);
293extern void softlockup_tick(void); 293extern void softlockup_tick(void);
294extern void touch_softlockup_watchdog(void); 294extern void touch_softlockup_watchdog(void);
295extern void touch_all_softlockup_watchdogs(void); 295extern void touch_all_softlockup_watchdogs(void);
296extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
297 struct file *filp, void __user *buffer,
298 size_t *lenp, loff_t *ppos);
296extern unsigned int softlockup_panic; 299extern unsigned int softlockup_panic;
297extern unsigned long sysctl_hung_task_check_count; 300extern unsigned long sysctl_hung_task_check_count;
298extern unsigned long sysctl_hung_task_timeout_secs; 301extern unsigned long sysctl_hung_task_timeout_secs;
@@ -450,6 +453,7 @@ struct task_cputime {
450 cputime_t utime; 453 cputime_t utime;
451 cputime_t stime; 454 cputime_t stime;
452 unsigned long long sum_exec_runtime; 455 unsigned long long sum_exec_runtime;
456 spinlock_t lock;
453}; 457};
454/* Alternate field names when used to cache expirations. */ 458/* Alternate field names when used to cache expirations. */
455#define prof_exp stime 459#define prof_exp stime
@@ -465,7 +469,7 @@ struct task_cputime {
465 * used for thread group CPU clock calculations. 469 * used for thread group CPU clock calculations.
466 */ 470 */
467struct thread_group_cputime { 471struct thread_group_cputime {
468 struct task_cputime *totals; 472 struct task_cputime totals;
469}; 473};
470 474
471/* 475/*
@@ -626,7 +630,6 @@ struct user_struct {
626 atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ 630 atomic_t inotify_devs; /* How many inotify devs does this user have opened? */
627#endif 631#endif
628#ifdef CONFIG_EPOLL 632#ifdef CONFIG_EPOLL
629 atomic_t epoll_devs; /* The number of epoll descriptors currently open */
630 atomic_t epoll_watches; /* The number of file descriptors currently watched */ 633 atomic_t epoll_watches; /* The number of file descriptors currently watched */
631#endif 634#endif
632#ifdef CONFIG_POSIX_MQUEUE 635#ifdef CONFIG_POSIX_MQUEUE
@@ -1157,10 +1160,9 @@ struct task_struct {
1157 pid_t pid; 1160 pid_t pid;
1158 pid_t tgid; 1161 pid_t tgid;
1159 1162
1160#ifdef CONFIG_CC_STACKPROTECTOR
1161 /* Canary value for the -fstack-protector gcc feature */ 1163 /* Canary value for the -fstack-protector gcc feature */
1162 unsigned long stack_canary; 1164 unsigned long stack_canary;
1163#endif 1165
1164 /* 1166 /*
1165 * pointers to (original) parent process, youngest child, younger sibling, 1167 * pointers to (original) parent process, youngest child, younger sibling,
1166 * older sibling, respectively. (p->father can be replaced with 1168 * older sibling, respectively. (p->father can be replaced with
@@ -2066,6 +2068,19 @@ static inline int object_is_on_stack(void *obj)
2066 2068
2067extern void thread_info_cache_init(void); 2069extern void thread_info_cache_init(void);
2068 2070
2071#ifdef CONFIG_DEBUG_STACK_USAGE
2072static inline unsigned long stack_not_used(struct task_struct *p)
2073{
2074 unsigned long *n = end_of_stack(p);
2075
2076 do { /* Skip over canary */
2077 n++;
2078 } while (!*n);
2079
2080 return (unsigned long)n - (unsigned long)end_of_stack(p);
2081}
2082#endif
2083
2069/* set thread flags in other task's structures 2084/* set thread flags in other task's structures
2070 * - see asm/thread_info.h for TIF_xxxx flags available 2085 * - see asm/thread_info.h for TIF_xxxx flags available
2071 */ 2086 */
@@ -2180,24 +2195,30 @@ static inline int spin_needbreak(spinlock_t *lock)
2180 * Thread group CPU time accounting. 2195 * Thread group CPU time accounting.
2181 */ 2196 */
2182 2197
2183extern int thread_group_cputime_alloc(struct task_struct *); 2198static inline
2184extern void thread_group_cputime(struct task_struct *, struct task_cputime *); 2199void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times)
2185
2186static inline void thread_group_cputime_init(struct signal_struct *sig)
2187{ 2200{
2188 sig->cputime.totals = NULL; 2201 struct task_cputime *totals = &tsk->signal->cputime.totals;
2202 unsigned long flags;
2203
2204 spin_lock_irqsave(&totals->lock, flags);
2205 *times = *totals;
2206 spin_unlock_irqrestore(&totals->lock, flags);
2189} 2207}
2190 2208
2191static inline int thread_group_cputime_clone_thread(struct task_struct *curr) 2209static inline void thread_group_cputime_init(struct signal_struct *sig)
2192{ 2210{
2193 if (curr->signal->cputime.totals) 2211 sig->cputime.totals = (struct task_cputime){
2194 return 0; 2212 .utime = cputime_zero,
2195 return thread_group_cputime_alloc(curr); 2213 .stime = cputime_zero,
2214 .sum_exec_runtime = 0,
2215 };
2216
2217 spin_lock_init(&sig->cputime.totals.lock);
2196} 2218}
2197 2219
2198static inline void thread_group_cputime_free(struct signal_struct *sig) 2220static inline void thread_group_cputime_free(struct signal_struct *sig)
2199{ 2221{
2200 free_percpu(sig->cputime.totals);
2201} 2222}
2202 2223
2203/* 2224/*
diff --git a/include/linux/stackprotector.h b/include/linux/stackprotector.h
new file mode 100644
index 000000000000..6f3e54c704c0
--- /dev/null
+++ b/include/linux/stackprotector.h
@@ -0,0 +1,16 @@
1#ifndef _LINUX_STACKPROTECTOR_H
2#define _LINUX_STACKPROTECTOR_H 1
3
4#include <linux/compiler.h>
5#include <linux/sched.h>
6#include <linux/random.h>
7
8#ifdef CONFIG_CC_STACKPROTECTOR
9# include <asm/stackprotector.h>
10#else
11static inline void boot_init_stack_canary(void)
12{
13}
14#endif
15
16#endif
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 2b409c44db83..c7d9bb1832ba 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -237,6 +237,7 @@ extern int hibernate_nvs_alloc(void);
237extern void hibernate_nvs_free(void); 237extern void hibernate_nvs_free(void);
238extern void hibernate_nvs_save(void); 238extern void hibernate_nvs_save(void);
239extern void hibernate_nvs_restore(void); 239extern void hibernate_nvs_restore(void);
240extern bool system_entering_hibernation(void);
240#else /* CONFIG_HIBERNATION */ 241#else /* CONFIG_HIBERNATION */
241static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } 242static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
242static inline void swsusp_set_page_free(struct page *p) {} 243static inline void swsusp_set_page_free(struct page *p) {}
@@ -252,6 +253,7 @@ static inline int hibernate_nvs_alloc(void) { return 0; }
252static inline void hibernate_nvs_free(void) {} 253static inline void hibernate_nvs_free(void) {}
253static inline void hibernate_nvs_save(void) {} 254static inline void hibernate_nvs_save(void) {}
254static inline void hibernate_nvs_restore(void) {} 255static inline void hibernate_nvs_restore(void) {}
256static inline bool system_entering_hibernation(void) { return false; }
255#endif /* CONFIG_HIBERNATION */ 257#endif /* CONFIG_HIBERNATION */
256 258
257#ifdef CONFIG_PM_SLEEP 259#ifdef CONFIG_PM_SLEEP
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 16875f89e6a7..0eda02ff2414 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -108,9 +108,14 @@ struct old_linux_dirent;
108 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ 108 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \
109 "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) 109 "\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
110#else 110#else
111#ifdef CONFIG_ALPHA
112#define SYSCALL_ALIAS(alias, name) \
113 asm ( #alias " = " #name "\n\t.globl " #alias)
114#else
111#define SYSCALL_ALIAS(alias, name) \ 115#define SYSCALL_ALIAS(alias, name) \
112 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name) 116 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name)
113#endif 117#endif
118#endif
114 119
115#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS 120#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
116 121
diff --git a/include/linux/topology.h b/include/linux/topology.h
index e632d29f0544..a16b9e06f2e5 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -193,5 +193,11 @@ int arch_update_cpu_topology(void);
193#ifndef topology_core_siblings 193#ifndef topology_core_siblings
194#define topology_core_siblings(cpu) cpumask_of_cpu(cpu) 194#define topology_core_siblings(cpu) cpumask_of_cpu(cpu)
195#endif 195#endif
196#ifndef topology_thread_cpumask
197#define topology_thread_cpumask(cpu) cpumask_of(cpu)
198#endif
199#ifndef topology_core_cpumask
200#define topology_core_cpumask(cpu) cpumask_of(cpu)
201#endif
196 202
197#endif /* _LINUX_TOPOLOGY_H */ 203#endif /* _LINUX_TOPOLOGY_H */
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 85ee9be9361e..88079fd60235 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -418,6 +418,8 @@ struct usb_tt;
418 * @autosuspend_disabled: autosuspend disabled by the user 418 * @autosuspend_disabled: autosuspend disabled by the user
419 * @autoresume_disabled: autoresume disabled by the user 419 * @autoresume_disabled: autoresume disabled by the user
420 * @skip_sys_resume: skip the next system resume 420 * @skip_sys_resume: skip the next system resume
421 * @wusb_dev: if this is a Wireless USB device, link to the WUSB
422 * specific data for the device.
421 * 423 *
422 * Notes: 424 * Notes:
423 * Usbcore drivers should not set usbdev->state directly. Instead use 425 * Usbcore drivers should not set usbdev->state directly. Instead use
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index ba09fe88adda..7d3822243074 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -197,7 +197,9 @@ extern int usbnet_nway_reset(struct net_device *net);
197#define devdbg(usbnet, fmt, arg...) \ 197#define devdbg(usbnet, fmt, arg...) \
198 printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg) 198 printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
199#else 199#else
200#define devdbg(usbnet, fmt, arg...) do {} while(0) 200#define devdbg(usbnet, fmt, arg...) \
201 ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
202 ## arg); 0; })
201#endif 203#endif
202 204
203#define deverr(usbnet, fmt, arg...) \ 205#define deverr(usbnet, fmt, arg...) \
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b36291130f22..3cd51e579ab1 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -118,12 +118,24 @@ struct execute_work {
118 init_timer(&(_work)->timer); \ 118 init_timer(&(_work)->timer); \
119 } while (0) 119 } while (0)
120 120
121#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
122 do { \
123 INIT_WORK(&(_work)->work, (_func)); \
124 init_timer_on_stack(&(_work)->timer); \
125 } while (0)
126
121#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ 127#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
122 do { \ 128 do { \
123 INIT_WORK(&(_work)->work, (_func)); \ 129 INIT_WORK(&(_work)->work, (_func)); \
124 init_timer_deferrable(&(_work)->timer); \ 130 init_timer_deferrable(&(_work)->timer); \
125 } while (0) 131 } while (0)
126 132
133#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
134 do { \
135 INIT_WORK(&(_work)->work, (_func)); \
136 init_timer_on_stack(&(_work)->timer); \
137 } while (0)
138
127/** 139/**
128 * work_pending - Find out whether a work item is currently pending 140 * work_pending - Find out whether a work item is currently pending
129 * @work: The work item in question 141 * @work: The work item in question