aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authormerge <null@invalid>2009-02-06 00:22:54 +0000
committerAndy Green <agreen@octopus.localdomain>2009-02-06 00:22:54 +0000
commitd1dcdf5718977c93805f9300b6c79f039db84c8b (patch)
tree58a161db6cf8953e33c1c9294a9c720a1aa0ad76 /include/linux
parent9029dff1f370018665a6e2999632a34fd0518f4d (diff)
MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011-1233879414-1233879505
pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011-1233879414-1233879505 / 1c405b6ccee468298e7ccbfd9a3a3f4d123207b0 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011-1233879414 stable-tracking-hist top was MERGE-via-mokopatches-tracking-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011-1233879414 / 71be0a45396066b1f8f27f8f4f87937247a129e1 ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011 mokopatches-tracking-hist top was MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011 / 1be1b01373f572a02c6f1f99863c8c11ed2f9f5b ... parent commitmessage: From: merge <null@invalid> MERGE-via-master-MERGE-via-master-hist-1232625318 master top was MERGE-via-master-hist-1232625318 / dd4b117123ae66451695810017eb72fbdfc05df5 ... parent commitmessage: From: merge <null@invalid> MERGE-master-patchset-edits
Diffstat (limited to 'include/linux')
-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/klist.h2
-rw-r--r--include/linux/libata.h2
-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/quotaops.h2
-rw-r--r--include/linux/sched.h32
-rw-r--r--include/linux/suspend.h2
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/usb/usbnet.h4
-rw-r--r--include/linux/workqueue.h12
18 files changed, 94 insertions, 86 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 23936b16426..af0e01d4c66 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,
return ERR_PTR(-ENODEV);
}
+static inline struct dentry *debugfs_create_size_t(const char *name, mode_t mode,
+ struct dentry *parent,
+ size_t *value)
+{
+ return ERR_PTR(-ENODEV);
+}
+
static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode,
struct dentry *parent,
u32 *value)
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index c73f1e2b59b..3e0f64c335c 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)
tx->flags |= DMA_CTRL_ACK;
}
+static inline void async_tx_clear_ack(struct dma_async_tx_descriptor *tx)
+{
+ tx->flags &= ~DMA_CTRL_ACK;
+}
+
static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx)
{
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,
enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
#ifdef CONFIG_DMA_ENGINE
enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
+void dma_issue_pending_all(void);
#else
static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
{
return DMA_SUCCESS;
}
+static inline void dma_issue_pending_all(void)
+{
+ do { } while (0);
+}
#endif
/* --- DMA device --- */
@@ -413,7 +423,6 @@ int dma_async_device_register(struct dma_device *device);
void dma_async_device_unregister(struct dma_device *device);
void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
-void dma_issue_pending_all(void);
#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
void dma_release_channel(struct dma_chan *chan);
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index 34161907b2f..d741b9ceb0e 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -38,6 +38,7 @@ struct dmi_device {
#ifdef CONFIG_DMI
extern int dmi_check_system(const struct dmi_system_id *list);
+const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
extern const char * dmi_get_system_info(int field);
extern const struct dmi_device * dmi_find_device(int type, const char *name,
const struct dmi_device *from);
@@ -64,6 +65,8 @@ static inline int dmi_walk(void (*decode)(const struct dmi_header *))
{ return -1; }
static inline bool dmi_match(enum dmi_field f, const char *str)
{ return false; }
+static inline const struct dmi_system_id *
+ dmi_first_match(const struct dmi_system_id *list) { return NULL; }
#endif
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 6fabbe2b804..04947d51094 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -40,9 +40,7 @@
#define I2C_DRIVERID_SAA7185B 13 /* video encoder */
#define I2C_DRIVERID_SAA7110 22 /* video decoder */
#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */
-#define I2C_DRIVERID_PCF8583 25 /* real time clock */
#define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */
-#define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */
#define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */
#define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */
#define I2C_DRIVERID_BT819 40 /* video decoder */
@@ -54,7 +52,6 @@
#define I2C_DRIVERID_SAA7191 57 /* video decoder */
#define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */
#define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */
-#define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */
#define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */
#define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */
#define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */
@@ -62,23 +59,16 @@
#define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */
#define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */
#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */
-#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */
#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */
#define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */
#define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */
#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */
#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */
-#define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */
#define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */
#define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */
#define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */
-#define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */
-#define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */
-#define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */
-#define I2C_DRIVERID_LM4857 92 /* LM4857 Audio Amplifier */
#define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */
-#define I2C_DRIVERID_CS4270 94 /* Cirrus Logic 4270 audio codec */
#define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */
#define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */
@@ -92,74 +82,23 @@
*/
/* --- Bit algorithm adapters */
-#define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */
#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */
-#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */
-#define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */
-#define I2C_HW_B_I810 0x01000a /* Intel I810 */
-#define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */
-#define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */
#define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */
-#define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */
-#define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */
#define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */
-#define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */
#define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */
-#define I2C_HW_B_NVIDIA 0x01001c /* nvidia framebuffer driver */
-#define I2C_HW_B_SAVAGE 0x01001d /* savage framebuffer driver */
-#define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */
#define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */
#define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */
-#define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */
#define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */
#define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */
-/* --- PCF 8584 based algorithms */
-#define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */
-
-/* --- PCA 9564 based algorithms */
-#define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */
-
-/* --- PowerPC on-chip adapters */
-#define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */
-
-/* --- Broadcom SiByte adapters */
-#define I2C_HW_SIBYTE 0x150000
-
/* --- SGI adapters */
#define I2C_HW_SGI_VINO 0x160000
-/* --- XSCALE on-chip adapters */
-#define I2C_HW_IOP3XX 0x140000
-
-/* --- Au1550 PSC adapters adapters */
-#define I2C_HW_AU1550_PSC 0x1b0000
-
/* --- SMBus only adapters */
-#define I2C_HW_SMBUS_PIIX4 0x040000
-#define I2C_HW_SMBUS_ALI15X3 0x040001
-#define I2C_HW_SMBUS_VIA2 0x040002
-#define I2C_HW_SMBUS_I801 0x040004
-#define I2C_HW_SMBUS_AMD756 0x040005
-#define I2C_HW_SMBUS_SIS5595 0x040006
-#define I2C_HW_SMBUS_ALI1535 0x040007
-#define I2C_HW_SMBUS_SIS630 0x040008
-#define I2C_HW_SMBUS_SIS96X 0x040009
-#define I2C_HW_SMBUS_AMD8111 0x04000a
-#define I2C_HW_SMBUS_SCX200 0x04000b
-#define I2C_HW_SMBUS_NFORCE2 0x04000c
#define I2C_HW_SMBUS_W9968CF 0x04000d
#define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */
#define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */
#define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */
-#define I2C_HW_SMBUS_ALI1563 0x040013
-
-/* --- MCP107 adapter */
-#define I2C_HW_MPC107 0x0d0000
-
-/* --- Embedded adapters */
-#define I2C_HW_MV64XXX 0x190000
-#define I2C_HW_BLACKFIN 0x190001 /* ADI Blackfin I2C TWI driver */
/* --- Miscellaneous adapters */
#define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 20873d40246..fcfbfea3af7 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -151,7 +151,7 @@ struct i2c_driver {
* has been dynamically allocated by the driver in the function above,
* it must be freed here. (LEGACY I2C DRIVERS ONLY)
*/
- int (*detach_client)(struct i2c_client *);
+ int (*detach_client)(struct i2c_client *) __deprecated;
/* Standard driver model interfaces, for "new style" i2c drivers.
* 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)
return i2c_register_driver(THIS_MODULE, driver);
}
-extern int i2c_attach_client(struct i2c_client *);
-extern int i2c_detach_client(struct i2c_client *);
+/* These are deprecated, your driver should use the standard .probe()
+ * and .remove() methods instead. */
+extern int __deprecated i2c_attach_client(struct i2c_client *);
+extern int __deprecated i2c_detach_client(struct i2c_client *);
extern struct i2c_client *i2c_use_client(struct i2c_client *client);
extern void i2c_release_client(struct i2c_client *client);
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h
index 5c34240de74..60e16a551dd 100644
--- a/include/linux/if_frad.h
+++ b/include/linux/if_frad.h
@@ -26,8 +26,6 @@
#include <linux/if.h>
-#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
-
/* Structures and constants associated with the DLCI device driver */
struct dlci_add
@@ -127,6 +125,8 @@ struct frad_conf
#ifdef __KERNEL__
+#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
+
/* these are the fields of an RFC 1490 header */
struct frhdr
{
@@ -190,12 +190,10 @@ struct frad_local
int buffer; /* current buffer for S508 firmware */
};
-#endif /* __KERNEL__ */
-
#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
-#ifdef __KERNEL__
extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
-#endif
+
+#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 2f3c2d4ef73..ea0ea1a4c36 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -48,6 +48,12 @@ extern struct fs_struct init_fs;
.posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
.cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
.rlim = INIT_RLIMITS, \
+ .cputime = { .totals = { \
+ .utime = cputime_zero, \
+ .stime = cputime_zero, \
+ .sum_exec_runtime = 0, \
+ .lock = __SPIN_LOCK_UNLOCKED(sig.cputime.totals.lock), \
+ }, }, \
}
extern struct nsproxy init_nsproxy;
diff --git a/include/linux/klist.h b/include/linux/klist.h
index d5a27af9dba..e91a4e59b77 100644
--- a/include/linux/klist.h
+++ b/include/linux/klist.h
@@ -22,7 +22,7 @@ struct klist {
struct list_head k_list;
void (*get)(struct klist_node *);
void (*put)(struct klist_node *);
-};
+} __attribute__ ((aligned (4)));
#define KLIST_INIT(_name, _get, _put) \
{ .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2c6bd66209f..bca3ba25f52 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -187,6 +187,8 @@ enum {
ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD
* doesn't handle PIO interrupts */
ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */
+ ATA_FLAG_NO_POWEROFF_SPINDOWN = (1 << 11), /* don't spindown before poweroff */
+ ATA_FLAG_NO_HIBERNATE_SPINDOWN = (1 << 12), /* don't spindown before hibernation */
ATA_FLAG_DEBUGMSG = (1 << 13),
ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */
ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 97b91d1abb4..fde86671f48 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -443,6 +443,13 @@ struct dmi_system_id {
struct dmi_strmatch matches[4];
void *driver_data;
};
+/*
+ * struct dmi_device_id appears during expansion of
+ * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
+ * but this is enough for gcc 3.4.6 to error out:
+ * error: storage size of '__mod_dmi_device_table' isn't known
+ */
+#define dmi_device_id dmi_system_id
#endif
#define DMI_MATCH(a, b) { a, b }
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 80f8b8b65fd..48890cf3f96 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -117,6 +117,10 @@ typedef int __bitwise pci_power_t;
#define PCI_UNKNOWN ((pci_power_t __force) 5)
#define PCI_POWER_ERROR ((pci_power_t __force) -1)
+#define PCI_PM_D2_DELAY 200
+#define PCI_PM_D3_WAIT 10
+#define PCI_PM_BUS_WAIT 50
+
/** The pci_channel state describes connectivity between the CPU and
* the pci device. If some PCI bus between here and the pci device
* has crashed or locked up, this info is reflected here.
@@ -252,6 +256,7 @@ struct pci_dev {
unsigned int ari_enabled:1; /* ARI forwarding */
unsigned int is_managed:1;
unsigned int is_pcie:1;
+ unsigned int state_saved:1;
pci_dev_flags_t dev_flags;
atomic_t enable_cnt; /* pci_enable_device has been called */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d56ad9c21c0..febc10ed385 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1357,6 +1357,7 @@
#define PCI_DEVICE_ID_VIA_8783_0 0x3208
#define PCI_DEVICE_ID_VIA_8237 0x3227
#define PCI_DEVICE_ID_VIA_8251 0x3287
+#define PCI_DEVICE_ID_VIA_8261 0x3402
#define PCI_DEVICE_ID_VIA_8237A 0x3337
#define PCI_DEVICE_ID_VIA_8237S 0x3372
#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324
@@ -1366,10 +1367,13 @@
#define PCI_DEVICE_ID_VIA_CX700 0x8324
#define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581
#define PCI_DEVICE_ID_VIA_VX800 0x8353
+#define PCI_DEVICE_ID_VIA_VX855 0x8409
#define PCI_DEVICE_ID_VIA_8371_1 0x8391
#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
#define PCI_DEVICE_ID_VIA_838X_1 0xB188
#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198
+#define PCI_DEVICE_ID_VIA_C409_IDE 0XC409
+#define PCI_DEVICE_ID_VIA_ANON 0xFFFF
#define PCI_VENDOR_ID_SIEMENS 0x110A
#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 21b781a3350..0b35b3a1be0 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -24,10 +24,8 @@ void sync_dquots(struct super_block *sb, int type);
int dquot_initialize(struct inode *inode, int type);
int dquot_drop(struct inode *inode);
-int dquot_drop_locked(struct inode *inode);
struct dquot *dqget(struct super_block *sb, unsigned int id, int type);
void dqput(struct dquot *dquot);
-int dquot_is_cached(struct super_block *sb, unsigned int id, int type);
int dquot_scan_active(struct super_block *sb,
int (*fn)(struct dquot *dquot, unsigned long priv),
unsigned long priv);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4cae9b81a1f..02e16d20730 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -293,6 +293,9 @@ extern void sched_show_task(struct task_struct *p);
extern void softlockup_tick(void);
extern void touch_softlockup_watchdog(void);
extern void touch_all_softlockup_watchdogs(void);
+extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
+ struct file *filp, void __user *buffer,
+ size_t *lenp, loff_t *ppos);
extern unsigned int softlockup_panic;
extern unsigned long sysctl_hung_task_check_count;
extern unsigned long sysctl_hung_task_timeout_secs;
@@ -450,6 +453,7 @@ struct task_cputime {
cputime_t utime;
cputime_t stime;
unsigned long long sum_exec_runtime;
+ spinlock_t lock;
};
/* Alternate field names when used to cache expirations. */
#define prof_exp stime
@@ -465,7 +469,7 @@ struct task_cputime {
* used for thread group CPU clock calculations.
*/
struct thread_group_cputime {
- struct task_cputime *totals;
+ struct task_cputime totals;
};
/*
@@ -2180,24 +2184,30 @@ static inline int spin_needbreak(spinlock_t *lock)
* Thread group CPU time accounting.
*/
-extern int thread_group_cputime_alloc(struct task_struct *);
-extern void thread_group_cputime(struct task_struct *, struct task_cputime *);
-
-static inline void thread_group_cputime_init(struct signal_struct *sig)
+static inline
+void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times)
{
- sig->cputime.totals = NULL;
+ struct task_cputime *totals = &tsk->signal->cputime.totals;
+ unsigned long flags;
+
+ spin_lock_irqsave(&totals->lock, flags);
+ *times = *totals;
+ spin_unlock_irqrestore(&totals->lock, flags);
}
-static inline int thread_group_cputime_clone_thread(struct task_struct *curr)
+static inline void thread_group_cputime_init(struct signal_struct *sig)
{
- if (curr->signal->cputime.totals)
- return 0;
- return thread_group_cputime_alloc(curr);
+ sig->cputime.totals = (struct task_cputime){
+ .utime = cputime_zero,
+ .stime = cputime_zero,
+ .sum_exec_runtime = 0,
+ };
+
+ spin_lock_init(&sig->cputime.totals.lock);
}
static inline void thread_group_cputime_free(struct signal_struct *sig)
{
- free_percpu(sig->cputime.totals);
}
/*
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 19ecd9b8eba..cf4a2bf5a11 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -243,6 +243,7 @@ extern int hibernate_nvs_alloc(void);
extern void hibernate_nvs_free(void);
extern void hibernate_nvs_save(void);
extern void hibernate_nvs_restore(void);
+extern bool system_entering_hibernation(void);
#else /* CONFIG_HIBERNATION */
static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
static inline void swsusp_set_page_free(struct page *p) {}
@@ -258,6 +259,7 @@ static inline int hibernate_nvs_alloc(void) { return 0; }
static inline void hibernate_nvs_free(void) {}
static inline void hibernate_nvs_save(void) {}
static inline void hibernate_nvs_restore(void) {}
+static inline bool system_entering_hibernation(void) { return false; }
#endif /* CONFIG_HIBERNATION */
#ifdef CONFIG_PM_SLEEP
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 85ee9be9361..88079fd6023 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -418,6 +418,8 @@ struct usb_tt;
* @autosuspend_disabled: autosuspend disabled by the user
* @autoresume_disabled: autoresume disabled by the user
* @skip_sys_resume: skip the next system resume
+ * @wusb_dev: if this is a Wireless USB device, link to the WUSB
+ * specific data for the device.
*
* Notes:
* 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 ba09fe88add..7d382224307 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);
#define devdbg(usbnet, fmt, arg...) \
printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
#else
-#define devdbg(usbnet, fmt, arg...) do {} while(0)
+#define devdbg(usbnet, fmt, arg...) \
+ ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
+ ## arg); 0; })
#endif
#define deverr(usbnet, fmt, arg...) \
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b36291130f2..3cd51e579ab 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -118,12 +118,24 @@ struct execute_work {
init_timer(&(_work)->timer); \
} while (0)
+#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
+ do { \
+ INIT_WORK(&(_work)->work, (_func)); \
+ init_timer_on_stack(&(_work)->timer); \
+ } while (0)
+
#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
do { \
INIT_WORK(&(_work)->work, (_func)); \
init_timer_deferrable(&(_work)->timer); \
} while (0)
+#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
+ do { \
+ INIT_WORK(&(_work)->work, (_func)); \
+ init_timer_on_stack(&(_work)->timer); \
+ } while (0)
+
/**
* work_pending - Find out whether a work item is currently pending
* @work: The work item in question