aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/atm.h7
-rw-r--r--include/linux/atm_tcp.h12
-rw-r--r--include/linux/bitmap.h1
-rw-r--r--include/linux/compiler.h12
-rw-r--r--include/linux/cpumask.h7
-rw-r--r--include/linux/device.h1
-rw-r--r--include/linux/exportfs.h21
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/fuse.h1
-rw-r--r--include/linux/genhd.h39
-rw-r--r--include/linux/hardirq.h18
-rw-r--r--include/linux/i2c.h2
-rw-r--r--include/linux/ide.h9
-rw-r--r--include/linux/io.h1
-rw-r--r--include/linux/ioprio.h14
-rw-r--r--include/linux/kernel.h12
-rw-r--r--include/linux/kgdb.h4
-rw-r--r--include/linux/libata.h13
-rw-r--r--include/linux/mm_types.h13
-rw-r--r--include/linux/mv643xx_eth.h16
-rw-r--r--include/linux/netdevice.h35
-rw-r--r--include/linux/netfilter/nf_conntrack_sip.h1
-rw-r--r--include/linux/of_i2c.h4
-rw-r--r--include/linux/parser.h2
-rw-r--r--include/linux/pci.h5
-rw-r--r--include/linux/percpu.h8
-rw-r--r--include/linux/phy.h5
-rw-r--r--include/linux/rcupdate.h12
-rw-r--r--include/linux/sched.h44
-rw-r--r--include/linux/usb/association.h150
-rw-r--r--include/linux/vermagic.h8
31 files changed, 385 insertions, 98 deletions
diff --git a/include/linux/atm.h b/include/linux/atm.h
index 60136684e0af..c791ddd96939 100644
--- a/include/linux/atm.h
+++ b/include/linux/atm.h
@@ -16,14 +16,11 @@
16 * documentation. Do not change them. 16 * documentation. Do not change them.
17 */ 17 */
18 18
19#ifdef __KERNEL__
20#include <linux/socket.h>
21#include <linux/types.h>
22#endif
23#include <linux/compiler.h> 19#include <linux/compiler.h>
24#include <linux/atmapi.h> 20#include <linux/atmapi.h>
25#include <linux/atmsap.h> 21#include <linux/atmsap.h>
26#include <linux/atmioc.h> 22#include <linux/atmioc.h>
23#include <linux/types.h>
27 24
28 25
29/* general ATM constants */ 26/* general ATM constants */
@@ -212,7 +209,7 @@ struct sockaddr_atmsvc {
212 char pub[ATM_E164_LEN+1]; /* public address (E.164) */ 209 char pub[ATM_E164_LEN+1]; /* public address (E.164) */
213 /* unused addresses must be bzero'ed */ 210 /* unused addresses must be bzero'ed */
214 char lij_type; /* role in LIJ call; one of ATM_LIJ* */ 211 char lij_type; /* role in LIJ call; one of ATM_LIJ* */
215 uint32_t lij_id; /* LIJ call identifier */ 212 __u32 lij_id; /* LIJ call identifier */
216 } sas_addr __ATM_API_ALIGN; /* SVC address */ 213 } sas_addr __ATM_API_ALIGN; /* SVC address */
217}; 214};
218 215
diff --git a/include/linux/atm_tcp.h b/include/linux/atm_tcp.h
index 18787f9b2f19..375638f8554b 100644
--- a/include/linux/atm_tcp.h
+++ b/include/linux/atm_tcp.h
@@ -8,11 +8,9 @@
8#define LINUX_ATM_TCP_H 8#define LINUX_ATM_TCP_H
9 9
10#include <linux/atmapi.h> 10#include <linux/atmapi.h>
11 11#include <linux/atm.h>
12#ifdef __KERNEL__
13#include <linux/types.h>
14#endif
15#include <linux/atmioc.h> 12#include <linux/atmioc.h>
13#include <linux/types.h>
16 14
17 15
18/* 16/*
@@ -20,9 +18,9 @@
20 */ 18 */
21 19
22struct atmtcp_hdr { 20struct atmtcp_hdr {
23 uint16_t vpi; 21 __u16 vpi;
24 uint16_t vci; 22 __u16 vci;
25 uint32_t length; /* ... of data part */ 23 __u32 length; /* ... of data part */
26}; 24};
27 25
28/* 26/*
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 43b406def35f..1abfe664c444 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -110,7 +110,6 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits);
110 110
111extern int bitmap_scnprintf(char *buf, unsigned int len, 111extern int bitmap_scnprintf(char *buf, unsigned int len,
112 const unsigned long *src, int nbits); 112 const unsigned long *src, int nbits);
113extern int bitmap_scnprintf_len(unsigned int len);
114extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, 113extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
115 unsigned long *dst, int nbits); 114 unsigned long *dst, int nbits);
116extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, 115extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen,
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index dcae0c8d97e6..c8bd2daf95ec 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -182,4 +182,16 @@ extern void __chk_io_ptr(const volatile void __iomem *);
182# define __section(S) __attribute__ ((__section__(#S))) 182# define __section(S) __attribute__ ((__section__(#S)))
183#endif 183#endif
184 184
185/*
186 * Prevent the compiler from merging or refetching accesses. The compiler
187 * is also forbidden from reordering successive instances of ACCESS_ONCE(),
188 * but only when the compiler is aware of some particular ordering. One way
189 * to make the compiler aware of ordering is to put the two invocations of
190 * ACCESS_ONCE() in different C statements.
191 *
192 * This macro does absolutely -nothing- to prevent the CPU from reordering,
193 * merging, or refetching absolutely anything at any time.
194 */
195#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
196
185#endif /* __LINUX_COMPILER_H */ 197#endif /* __LINUX_COMPILER_H */
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 9650806fe2ea..5df3db58fcc6 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -289,13 +289,6 @@ static inline int __cpumask_scnprintf(char *buf, int len,
289 return bitmap_scnprintf(buf, len, srcp->bits, nbits); 289 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
290} 290}
291 291
292#define cpumask_scnprintf_len(len) \
293 __cpumask_scnprintf_len((len))
294static inline int __cpumask_scnprintf_len(int len)
295{
296 return bitmap_scnprintf_len(len);
297}
298
299#define cpumask_parse_user(ubuf, ulen, dst) \ 292#define cpumask_parse_user(ubuf, ulen, dst) \
300 __cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS) 293 __cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS)
301static inline int __cpumask_parse_user(const char __user *buf, int len, 294static inline int __cpumask_parse_user(const char __user *buf, int len,
diff --git a/include/linux/device.h b/include/linux/device.h
index 8c23e3dfe3ac..15e9fa3ad3af 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -183,7 +183,6 @@ struct class {
183 struct module *owner; 183 struct module *owner;
184 184
185 struct kset subsys; 185 struct kset subsys;
186 struct list_head children;
187 struct list_head devices; 186 struct list_head devices;
188 struct list_head interfaces; 187 struct list_head interfaces;
189 struct kset class_dirs; 188 struct kset class_dirs;
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index de8387b7ceb6..f5abd1306638 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -33,6 +33,19 @@ enum fid_type {
33 * 32 bit parent directory inode number. 33 * 32 bit parent directory inode number.
34 */ 34 */
35 FILEID_INO32_GEN_PARENT = 2, 35 FILEID_INO32_GEN_PARENT = 2,
36
37 /*
38 * 32 bit block number, 16 bit partition reference,
39 * 16 bit unused, 32 bit generation number.
40 */
41 FILEID_UDF_WITHOUT_PARENT = 0x51,
42
43 /*
44 * 32 bit block number, 16 bit partition reference,
45 * 16 bit unused, 32 bit generation number,
46 * 32 bit parent block number, 32 bit parent generation number
47 */
48 FILEID_UDF_WITH_PARENT = 0x52,
36}; 49};
37 50
38struct fid { 51struct fid {
@@ -43,6 +56,14 @@ struct fid {
43 u32 parent_ino; 56 u32 parent_ino;
44 u32 parent_gen; 57 u32 parent_gen;
45 } i32; 58 } i32;
59 struct {
60 u32 block;
61 u16 partref;
62 u16 parent_partref;
63 u32 generation;
64 u32 parent_block;
65 u32 parent_generation;
66 } udf;
46 __u32 raw[0]; 67 __u32 raw[0];
47 }; 68 };
48}; 69};
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a1ba005d08e7..f413085f748e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1289,17 +1289,12 @@ extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
1289extern ssize_t vfs_writev(struct file *, const struct iovec __user *, 1289extern ssize_t vfs_writev(struct file *, const struct iovec __user *,
1290 unsigned long, loff_t *); 1290 unsigned long, loff_t *);
1291 1291
1292/*
1293 * NOTE: write_inode, delete_inode, clear_inode, put_inode can be called
1294 * without the big kernel lock held in all filesystems.
1295 */
1296struct super_operations { 1292struct super_operations {
1297 struct inode *(*alloc_inode)(struct super_block *sb); 1293 struct inode *(*alloc_inode)(struct super_block *sb);
1298 void (*destroy_inode)(struct inode *); 1294 void (*destroy_inode)(struct inode *);
1299 1295
1300 void (*dirty_inode) (struct inode *); 1296 void (*dirty_inode) (struct inode *);
1301 int (*write_inode) (struct inode *, int); 1297 int (*write_inode) (struct inode *, int);
1302 void (*put_inode) (struct inode *);
1303 void (*drop_inode) (struct inode *); 1298 void (*drop_inode) (struct inode *);
1304 void (*delete_inode) (struct inode *); 1299 void (*delete_inode) (struct inode *);
1305 void (*put_super) (struct super_block *); 1300 void (*put_super) (struct super_block *);
@@ -1821,7 +1816,6 @@ extern void iget_failed(struct inode *);
1821extern void clear_inode(struct inode *); 1816extern void clear_inode(struct inode *);
1822extern void destroy_inode(struct inode *); 1817extern void destroy_inode(struct inode *);
1823extern struct inode *new_inode(struct super_block *); 1818extern struct inode *new_inode(struct super_block *);
1824extern int __remove_suid(struct dentry *, int);
1825extern int should_remove_suid(struct dentry *); 1819extern int should_remove_suid(struct dentry *);
1826extern int remove_suid(struct dentry *); 1820extern int remove_suid(struct dentry *);
1827 1821
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 5c86f1196c3a..d48282197696 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -109,6 +109,7 @@ struct fuse_file_lock {
109#define FUSE_POSIX_LOCKS (1 << 1) 109#define FUSE_POSIX_LOCKS (1 << 1)
110#define FUSE_FILE_OPS (1 << 2) 110#define FUSE_FILE_OPS (1 << 2)
111#define FUSE_ATOMIC_O_TRUNC (1 << 3) 111#define FUSE_ATOMIC_O_TRUNC (1 << 3)
112#define FUSE_BIG_WRITES (1 << 5)
112 113
113/** 114/**
114 * Release flags 115 * Release flags
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index ecd2bf63fc84..ae7aec3cabee 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -178,17 +178,17 @@ static inline struct hd_struct *get_part(struct gendisk *gendiskp,
178 178
179static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { 179static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) {
180 int i; 180 int i;
181
181 for_each_possible_cpu(i) 182 for_each_possible_cpu(i)
182 memset(per_cpu_ptr(gendiskp->dkstats, i), value, 183 memset(per_cpu_ptr(gendiskp->dkstats, i), value,
183 sizeof (struct disk_stats)); 184 sizeof(struct disk_stats));
184} 185}
185 186
186#define __part_stat_add(part, field, addnd) \ 187#define __part_stat_add(part, field, addnd) \
187 (per_cpu_ptr(part->dkstats, smp_processor_id())->field += addnd) 188 (per_cpu_ptr(part->dkstats, smp_processor_id())->field += addnd)
188 189
189#define __all_stat_add(gendiskp, field, addnd, sector) \ 190#define __all_stat_add(gendiskp, part, field, addnd, sector) \
190({ \ 191({ \
191 struct hd_struct *part = get_part(gendiskp, sector); \
192 if (part) \ 192 if (part) \
193 __part_stat_add(part, field, addnd); \ 193 __part_stat_add(part, field, addnd); \
194 __disk_stat_add(gendiskp, field, addnd); \ 194 __disk_stat_add(gendiskp, field, addnd); \
@@ -203,11 +203,13 @@ static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) {
203 res; \ 203 res; \
204}) 204})
205 205
206static inline void part_stat_set_all(struct hd_struct *part, int value) { 206static inline void part_stat_set_all(struct hd_struct *part, int value)
207{
207 int i; 208 int i;
209
208 for_each_possible_cpu(i) 210 for_each_possible_cpu(i)
209 memset(per_cpu_ptr(part->dkstats, i), value, 211 memset(per_cpu_ptr(part->dkstats, i), value,
210 sizeof(struct disk_stats)); 212 sizeof(struct disk_stats));
211} 213}
212 214
213#else /* !CONFIG_SMP */ 215#else /* !CONFIG_SMP */
@@ -223,9 +225,8 @@ static inline void disk_stat_set_all(struct gendisk *gendiskp, int value)
223#define __part_stat_add(part, field, addnd) \ 225#define __part_stat_add(part, field, addnd) \
224 (part->dkstats.field += addnd) 226 (part->dkstats.field += addnd)
225 227
226#define __all_stat_add(gendiskp, field, addnd, sector) \ 228#define __all_stat_add(gendiskp, part, field, addnd, sector) \
227({ \ 229({ \
228 struct hd_struct *part = get_part(gendiskp, sector); \
229 if (part) \ 230 if (part) \
230 part->dkstats.field += addnd; \ 231 part->dkstats.field += addnd; \
231 __disk_stat_add(gendiskp, field, addnd); \ 232 __disk_stat_add(gendiskp, field, addnd); \
@@ -276,10 +277,10 @@ static inline void part_stat_set_all(struct hd_struct *part, int value)
276#define part_stat_sub(gendiskp, field, subnd) \ 277#define part_stat_sub(gendiskp, field, subnd) \
277 part_stat_add(gendiskp, field, -subnd) 278 part_stat_add(gendiskp, field, -subnd)
278 279
279#define all_stat_add(gendiskp, field, addnd, sector) \ 280#define all_stat_add(gendiskp, part, field, addnd, sector) \
280 do { \ 281 do { \
281 preempt_disable(); \ 282 preempt_disable(); \
282 __all_stat_add(gendiskp, field, addnd, sector); \ 283 __all_stat_add(gendiskp, part, field, addnd, sector); \
283 preempt_enable(); \ 284 preempt_enable(); \
284 } while (0) 285 } while (0)
285 286
@@ -288,15 +289,15 @@ static inline void part_stat_set_all(struct hd_struct *part, int value)
288#define all_stat_dec(gendiskp, field, sector) \ 289#define all_stat_dec(gendiskp, field, sector) \
289 all_stat_add(gendiskp, field, -1, sector) 290 all_stat_add(gendiskp, field, -1, sector)
290 291
291#define __all_stat_inc(gendiskp, field, sector) \ 292#define __all_stat_inc(gendiskp, part, field, sector) \
292 __all_stat_add(gendiskp, field, 1, sector) 293 __all_stat_add(gendiskp, part, field, 1, sector)
293#define all_stat_inc(gendiskp, field, sector) \ 294#define all_stat_inc(gendiskp, part, field, sector) \
294 all_stat_add(gendiskp, field, 1, sector) 295 all_stat_add(gendiskp, part, field, 1, sector)
295 296
296#define __all_stat_sub(gendiskp, field, subnd, sector) \ 297#define __all_stat_sub(gendiskp, part, field, subnd, sector) \
297 __all_stat_add(gendiskp, field, -subnd, sector) 298 __all_stat_add(gendiskp, part, field, -subnd, sector)
298#define all_stat_sub(gendiskp, field, subnd, sector) \ 299#define all_stat_sub(gendiskp, part, field, subnd, sector) \
299 all_stat_add(gendiskp, field, -subnd, sector) 300 all_stat_add(gendiskp, part, field, -subnd, sector)
300 301
301/* Inlines to alloc and free disk stats in struct gendisk */ 302/* Inlines to alloc and free disk stats in struct gendisk */
302#ifdef CONFIG_SMP 303#ifdef CONFIG_SMP
@@ -524,7 +525,7 @@ struct unixware_disklabel {
524#define ADDPART_FLAG_RAID 1 525#define ADDPART_FLAG_RAID 1
525#define ADDPART_FLAG_WHOLEDISK 2 526#define ADDPART_FLAG_WHOLEDISK 2
526 527
527extern dev_t blk_lookup_devt(const char *name); 528extern dev_t blk_lookup_devt(const char *name, int part);
528extern char *disk_name (struct gendisk *hd, int part, char *buf); 529extern char *disk_name (struct gendisk *hd, int part, char *buf);
529 530
530extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); 531extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
@@ -552,7 +553,7 @@ static inline struct block_device *bdget_disk(struct gendisk *disk, int index)
552 553
553static inline void printk_all_partitions(void) { } 554static inline void printk_all_partitions(void) { }
554 555
555static inline dev_t blk_lookup_devt(const char *name) 556static inline dev_t blk_lookup_devt(const char *name, int part)
556{ 557{
557 dev_t devt = MKDEV(0, 0); 558 dev_t devt = MKDEV(0, 0);
558 return devt; 559 return devt;
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 897f723bd222..181006cc94a0 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -72,6 +72,14 @@
72#define in_softirq() (softirq_count()) 72#define in_softirq() (softirq_count())
73#define in_interrupt() (irq_count()) 73#define in_interrupt() (irq_count())
74 74
75#if defined(CONFIG_PREEMPT)
76# define PREEMPT_INATOMIC_BASE kernel_locked()
77# define PREEMPT_CHECK_OFFSET 1
78#else
79# define PREEMPT_INATOMIC_BASE 0
80# define PREEMPT_CHECK_OFFSET 0
81#endif
82
75/* 83/*
76 * Are we running in atomic context? WARNING: this macro cannot 84 * Are we running in atomic context? WARNING: this macro cannot
77 * always detect atomic context; in particular, it cannot know about 85 * always detect atomic context; in particular, it cannot know about
@@ -79,17 +87,11 @@
79 * used in the general case to determine whether sleeping is possible. 87 * used in the general case to determine whether sleeping is possible.
80 * Do not use in_atomic() in driver code. 88 * Do not use in_atomic() in driver code.
81 */ 89 */
82#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) 90#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_INATOMIC_BASE)
83
84#ifdef CONFIG_PREEMPT
85# define PREEMPT_CHECK_OFFSET 1
86#else
87# define PREEMPT_CHECK_OFFSET 0
88#endif
89 91
90/* 92/*
91 * Check whether we were atomic before we did preempt_disable(): 93 * Check whether we were atomic before we did preempt_disable():
92 * (used by the scheduler) 94 * (used by the scheduler, *after* releasing the kernel lock)
93 */ 95 */
94#define in_atomic_preempt_off() \ 96#define in_atomic_preempt_off() \
95 ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_CHECK_OFFSET) 97 ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_CHECK_OFFSET)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index cb63da5c2139..6716ec808c5e 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -262,7 +262,7 @@ i2c_new_probed_device(struct i2c_adapter *adap,
262 * client handles for the extra addresses. 262 * client handles for the extra addresses.
263 */ 263 */
264extern struct i2c_client * 264extern struct i2c_client *
265i2c_new_dummy(struct i2c_adapter *adap, u16 address, const char *type); 265i2c_new_dummy(struct i2c_adapter *adap, u16 address);
266 266
267extern void i2c_unregister_device(struct i2c_client *); 267extern void i2c_unregister_device(struct i2c_client *);
268 268
diff --git a/include/linux/ide.h b/include/linux/ide.h
index b0135b0c3a04..f8f195c20da2 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -965,7 +965,6 @@ typedef struct ide_task_s {
965void ide_tf_dump(const char *, struct ide_taskfile *); 965void ide_tf_dump(const char *, struct ide_taskfile *);
966 966
967extern void SELECT_DRIVE(ide_drive_t *); 967extern void SELECT_DRIVE(ide_drive_t *);
968extern void SELECT_MASK(ide_drive_t *, int);
969 968
970extern int drive_is_ready(ide_drive_t *); 969extern int drive_is_ready(ide_drive_t *);
971 970
@@ -1058,8 +1057,8 @@ enum {
1058 IDE_HFLAG_NO_SET_MODE = (1 << 9), 1057 IDE_HFLAG_NO_SET_MODE = (1 << 9),
1059 /* trust BIOS for programming chipset/device for DMA */ 1058 /* trust BIOS for programming chipset/device for DMA */
1060 IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10), 1059 IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10),
1061 /* host uses VDMA (tied with IDE_HFLAG_CS5520 for now) */ 1060 /* host is CS5510/CS5520 */
1062 IDE_HFLAG_VDMA = (1 << 11), 1061 IDE_HFLAG_CS5520 = (1 << 11),
1063 /* ATAPI DMA is unsupported */ 1062 /* ATAPI DMA is unsupported */
1064 IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), 1063 IDE_HFLAG_NO_ATAPI_DMA = (1 << 12),
1065 /* set if host is a "non-bootable" controller */ 1064 /* set if host is a "non-bootable" controller */
@@ -1070,8 +1069,6 @@ enum {
1070 IDE_HFLAG_NO_AUTODMA = (1 << 15), 1069 IDE_HFLAG_NO_AUTODMA = (1 << 15),
1071 /* host uses MMIO */ 1070 /* host uses MMIO */
1072 IDE_HFLAG_MMIO = (1 << 16), 1071 IDE_HFLAG_MMIO = (1 << 16),
1073 /* host is CS5510/CS5520 */
1074 IDE_HFLAG_CS5520 = IDE_HFLAG_VDMA,
1075 /* no LBA48 */ 1072 /* no LBA48 */
1076 IDE_HFLAG_NO_LBA48 = (1 << 17), 1073 IDE_HFLAG_NO_LBA48 = (1 << 17),
1077 /* no LBA48 DMA */ 1074 /* no LBA48 DMA */
@@ -1101,6 +1098,8 @@ enum {
1101 IDE_HFLAG_NO_IO_32BIT = (1 << 30), 1098 IDE_HFLAG_NO_IO_32BIT = (1 << 30),
1102 /* never unmask IRQs */ 1099 /* never unmask IRQs */
1103 IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31), 1100 IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31),
1101 /* host uses VDMA (disabled for now) */
1102 IDE_HFLAG_VDMA = 0,
1104}; 1103};
1105 1104
1106#ifdef CONFIG_BLK_DEV_OFFBOARD 1105#ifdef CONFIG_BLK_DEV_OFFBOARD
diff --git a/include/linux/io.h b/include/linux/io.h
index 3a03a3604cce..6c7f0ba0d5fa 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -65,5 +65,6 @@ void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
65void devm_iounmap(struct device *dev, void __iomem *addr); 65void devm_iounmap(struct device *dev, void __iomem *addr);
66int check_signature(const volatile void __iomem *io_addr, 66int check_signature(const volatile void __iomem *io_addr,
67 const unsigned char *signature, int length); 67 const unsigned char *signature, int length);
68void devm_ioremap_release(struct device *dev, void *res);
68 69
69#endif /* _LINUX_IO_H */ 70#endif /* _LINUX_IO_H */
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index 2a3bb1bb7433..f98a656b17e5 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -68,6 +68,20 @@ static inline int task_nice_ioprio(struct task_struct *task)
68} 68}
69 69
70/* 70/*
71 * This is for the case where the task hasn't asked for a specific IO class.
72 * Check for idle and rt task process, and return appropriate IO class.
73 */
74static inline int task_nice_ioclass(struct task_struct *task)
75{
76 if (task->policy == SCHED_IDLE)
77 return IOPRIO_CLASS_IDLE;
78 else if (task->policy == SCHED_FIFO || task->policy == SCHED_RR)
79 return IOPRIO_CLASS_RT;
80 else
81 return IOPRIO_CLASS_BE;
82}
83
84/*
71 * For inheritance, return the highest of the two given priorities 85 * For inheritance, return the highest of the two given priorities
72 */ 86 */
73extern int ioprio_best(unsigned short aprio, unsigned short bprio); 87extern int ioprio_best(unsigned short aprio, unsigned short bprio);
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 4d46e299afb5..792bf0aa779b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -276,7 +276,17 @@ extern void print_hex_dump(const char *level, const char *prefix_str,
276 const void *buf, size_t len, bool ascii); 276 const void *buf, size_t len, bool ascii);
277extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, 277extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
278 const void *buf, size_t len); 278 const void *buf, size_t len);
279#define hex_asc(x) "0123456789abcdef"[x] 279
280extern const char hex_asc[];
281#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
282#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
283
284static inline char *pack_hex_byte(char *buf, u8 byte)
285{
286 *buf++ = hex_asc_hi(byte);
287 *buf++ = hex_asc_lo(byte);
288 return buf;
289}
280 290
281#define pr_emerg(fmt, arg...) \ 291#define pr_emerg(fmt, arg...) \
282 printk(KERN_EMERG fmt, ##arg) 292 printk(KERN_EMERG fmt, ##arg)
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 9757b1a6d9dc..6adcc297e354 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -261,10 +261,12 @@ struct kgdb_io {
261 261
262extern struct kgdb_arch arch_kgdb_ops; 262extern struct kgdb_arch arch_kgdb_ops;
263 263
264extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs);
265
264extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); 266extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
265extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); 267extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops);
266 268
267extern int kgdb_hex2long(char **ptr, long *long_val); 269extern int kgdb_hex2long(char **ptr, unsigned long *long_val);
268extern int kgdb_mem2hex(char *mem, char *buf, int count); 270extern int kgdb_mem2hex(char *mem, char *buf, int count);
269extern int kgdb_hex2mem(char *buf, char *mem, int count); 271extern int kgdb_hex2mem(char *buf, char *mem, int count);
270 272
diff --git a/include/linux/libata.h b/include/linux/libata.h
index d1dfe872ee30..0f17643e0a6e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1039,6 +1039,7 @@ extern void ata_eh_thaw_port(struct ata_port *ap);
1039 1039
1040extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); 1040extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
1041extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); 1041extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
1042extern void ata_eh_analyze_ncq_error(struct ata_link *link);
1042 1043
1043extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, 1044extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
1044 ata_reset_fn_t softreset, ata_reset_fn_t hardreset, 1045 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
@@ -1381,6 +1382,18 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
1381 return *(struct ata_port **)&host->hostdata[0]; 1382 return *(struct ata_port **)&host->hostdata[0];
1382} 1383}
1383 1384
1385static inline int ata_check_ready(u8 status)
1386{
1387 if (!(status & ATA_BUSY))
1388 return 1;
1389
1390 /* 0xff indicates either no device or device not ready */
1391 if (status == 0xff)
1392 return -ENODEV;
1393
1394 return 0;
1395}
1396
1384 1397
1385/************************************************************************** 1398/**************************************************************************
1386 * PMP - drivers/ata/libata-pmp.c 1399 * PMP - drivers/ata/libata-pmp.c
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index eb7c16cc9559..02a27ae78539 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -226,8 +226,17 @@ struct mm_struct {
226 rwlock_t ioctx_list_lock; /* aio lock */ 226 rwlock_t ioctx_list_lock; /* aio lock */
227 struct kioctx *ioctx_list; 227 struct kioctx *ioctx_list;
228#ifdef CONFIG_MM_OWNER 228#ifdef CONFIG_MM_OWNER
229 struct task_struct *owner; /* The thread group leader that */ 229 /*
230 /* owns the mm_struct. */ 230 * "owner" points to a task that is regarded as the canonical
231 * user/owner of this mm. All of the following must be true in
232 * order for it to be changed:
233 *
234 * current == mm->owner
235 * current->mm != mm
236 * new_owner->mm == mm
237 * new_owner->alloc_lock is held
238 */
239 struct task_struct *owner;
231#endif 240#endif
232 241
233#ifdef CONFIG_PROC_FS 242#ifdef CONFIG_PROC_FS
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h
index 30e11aa3c1c9..a15cdd4a8e58 100644
--- a/include/linux/mv643xx_eth.h
+++ b/include/linux/mv643xx_eth.h
@@ -1,19 +1,31 @@
1/* 1/*
2 * MV-643XX ethernet platform device data definition file. 2 * MV-643XX ethernet platform device data definition file.
3 */ 3 */
4
4#ifndef __LINUX_MV643XX_ETH_H 5#ifndef __LINUX_MV643XX_ETH_H
5#define __LINUX_MV643XX_ETH_H 6#define __LINUX_MV643XX_ETH_H
6 7
7#define MV643XX_ETH_SHARED_NAME "mv643xx_eth_shared" 8#include <linux/mbus.h>
8#define MV643XX_ETH_NAME "mv643xx_eth" 9
10#define MV643XX_ETH_SHARED_NAME "mv643xx_eth"
11#define MV643XX_ETH_NAME "mv643xx_eth_port"
9#define MV643XX_ETH_SHARED_REGS 0x2000 12#define MV643XX_ETH_SHARED_REGS 0x2000
10#define MV643XX_ETH_SHARED_REGS_SIZE 0x2000 13#define MV643XX_ETH_SHARED_REGS_SIZE 0x2000
11#define MV643XX_ETH_BAR_4 0x2220 14#define MV643XX_ETH_BAR_4 0x2220
12#define MV643XX_ETH_SIZE_REG_4 0x2224 15#define MV643XX_ETH_SIZE_REG_4 0x2224
13#define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 16#define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290
14 17
18struct mv643xx_eth_shared_platform_data {
19 struct mbus_dram_target_info *dram;
20 unsigned int t_clk;
21};
22
15struct mv643xx_eth_platform_data { 23struct mv643xx_eth_platform_data {
24 struct platform_device *shared;
16 int port_number; 25 int port_number;
26
27 struct platform_device *shared_smi;
28
17 u16 force_phy_addr; /* force override if phy_addr == 0 */ 29 u16 force_phy_addr; /* force override if phy_addr == 0 */
18 u16 phy_addr; 30 u16 phy_addr;
19 31
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7c1d4466583b..b11e6e19e96c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -93,14 +93,16 @@ struct wireless_dev;
93 * used. 93 * used.
94 */ 94 */
95 95
96#if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR) 96#if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
97#define LL_MAX_HEADER 32 97# if defined(CONFIG_MAC80211_MESH)
98# define LL_MAX_HEADER 128
99# else
100# define LL_MAX_HEADER 96
101# endif
102#elif defined(CONFIG_TR)
103# define LL_MAX_HEADER 48
98#else 104#else
99#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) 105# define LL_MAX_HEADER 32
100#define LL_MAX_HEADER 96
101#else
102#define LL_MAX_HEADER 48
103#endif
104#endif 106#endif
105 107
106#if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ 108#if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \
@@ -244,11 +246,16 @@ struct hh_cache
244 * 246 *
245 * We could use other alignment values, but we must maintain the 247 * We could use other alignment values, but we must maintain the
246 * relationship HH alignment <= LL alignment. 248 * relationship HH alignment <= LL alignment.
249 *
250 * LL_ALLOCATED_SPACE also takes into account the tailroom the device
251 * may need.
247 */ 252 */
248#define LL_RESERVED_SPACE(dev) \ 253#define LL_RESERVED_SPACE(dev) \
249 (((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) 254 ((((dev)->hard_header_len+(dev)->needed_headroom)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
250#define LL_RESERVED_SPACE_EXTRA(dev,extra) \ 255#define LL_RESERVED_SPACE_EXTRA(dev,extra) \
251 ((((dev)->hard_header_len+extra)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) 256 ((((dev)->hard_header_len+(dev)->needed_headroom+(extra))&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
257#define LL_ALLOCATED_SPACE(dev) \
258 ((((dev)->hard_header_len+(dev)->needed_headroom+(dev)->needed_tailroom)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
252 259
253struct header_ops { 260struct header_ops {
254 int (*create) (struct sk_buff *skb, struct net_device *dev, 261 int (*create) (struct sk_buff *skb, struct net_device *dev,
@@ -567,6 +574,13 @@ struct net_device
567 unsigned short type; /* interface hardware type */ 574 unsigned short type; /* interface hardware type */
568 unsigned short hard_header_len; /* hardware hdr length */ 575 unsigned short hard_header_len; /* hardware hdr length */
569 576
577 /* extra head- and tailroom the hardware may need, but not in all cases
578 * can this be guaranteed, especially tailroom. Some cases also use
579 * LL_MAX_HEADER instead to allocate the skb.
580 */
581 unsigned short needed_headroom;
582 unsigned short needed_tailroom;
583
570 struct net_device *master; /* Pointer to master device of a group, 584 struct net_device *master; /* Pointer to master device of a group,
571 * which this device is member of. 585 * which this device is member of.
572 */ 586 */
@@ -715,6 +729,9 @@ struct net_device
715 struct net *nd_net; 729 struct net *nd_net;
716#endif 730#endif
717 731
732 /* mid-layer private */
733 void *ml_priv;
734
718 /* bridge stuff */ 735 /* bridge stuff */
719 struct net_bridge_port *br_port; 736 struct net_bridge_port *br_port;
720 /* macvlan */ 737 /* macvlan */
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h
index 5da04e586a3f..23aa2ec6b7b7 100644
--- a/include/linux/netfilter/nf_conntrack_sip.h
+++ b/include/linux/netfilter/nf_conntrack_sip.h
@@ -7,6 +7,7 @@
7 7
8struct nf_ct_sip_master { 8struct nf_ct_sip_master {
9 unsigned int register_cseq; 9 unsigned int register_cseq;
10 unsigned int invite_cseq;
10}; 11};
11 12
12enum sip_expectation_classes { 13enum sip_expectation_classes {
diff --git a/include/linux/of_i2c.h b/include/linux/of_i2c.h
index 2e5a96732042..bd2a870ec296 100644
--- a/include/linux/of_i2c.h
+++ b/include/linux/of_i2c.h
@@ -14,11 +14,7 @@
14 14
15#include <linux/i2c.h> 15#include <linux/i2c.h>
16 16
17#ifdef CONFIG_OF_I2C
18
19void of_register_i2c_devices(struct i2c_adapter *adap, 17void of_register_i2c_devices(struct i2c_adapter *adap,
20 struct device_node *adap_node); 18 struct device_node *adap_node);
21 19
22#endif /* CONFIG_OF_I2C */
23
24#endif /* __LINUX_OF_I2C_H */ 20#endif /* __LINUX_OF_I2C_H */
diff --git a/include/linux/parser.h b/include/linux/parser.h
index 26b2bdfcaf06..7dcd05075756 100644
--- a/include/linux/parser.h
+++ b/include/linux/parser.h
@@ -29,5 +29,5 @@ int match_token(char *, match_table_t table, substring_t args[]);
29int match_int(substring_t *, int *result); 29int match_int(substring_t *, int *result);
30int match_octal(substring_t *, int *result); 30int match_octal(substring_t *, int *result);
31int match_hex(substring_t *, int *result); 31int match_hex(substring_t *, int *result);
32void match_strcpy(char *, const substring_t *); 32size_t match_strlcpy(char *, const substring_t *, size_t);
33char *match_strdup(const substring_t *); 33char *match_strdup(const substring_t *);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 96acd0dae241..509159bcd4e7 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -44,6 +44,7 @@
44#include <linux/mod_devicetable.h> 44#include <linux/mod_devicetable.h>
45 45
46#include <linux/types.h> 46#include <linux/types.h>
47#include <linux/init.h>
47#include <linux/ioport.h> 48#include <linux/ioport.h>
48#include <linux/list.h> 49#include <linux/list.h>
49#include <linux/compiler.h> 50#include <linux/compiler.h>
@@ -474,7 +475,7 @@ extern struct pci_bus *pci_find_bus(int domain, int busnr);
474void pci_bus_add_devices(struct pci_bus *bus); 475void pci_bus_add_devices(struct pci_bus *bus);
475struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, 476struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus,
476 struct pci_ops *ops, void *sysdata); 477 struct pci_ops *ops, void *sysdata);
477static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, 478static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops,
478 void *sysdata) 479 void *sysdata)
479{ 480{
480 struct pci_bus *root_bus; 481 struct pci_bus *root_bus;
@@ -666,7 +667,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
666 667
667void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), 668void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *),
668 void *userdata); 669 void *userdata);
669int pci_cfg_space_size_ext(struct pci_dev *dev, unsigned check_exp_pcix); 670int pci_cfg_space_size_ext(struct pci_dev *dev);
670int pci_cfg_space_size(struct pci_dev *dev); 671int pci_cfg_space_size(struct pci_dev *dev);
671unsigned char pci_bus_max_busnr(struct pci_bus *bus); 672unsigned char pci_bus_max_busnr(struct pci_bus *bus);
672 673
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index d746a2abb322..4cdd393e71e1 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -13,8 +13,14 @@
13 __attribute__((__section__(".data.percpu"))) \ 13 __attribute__((__section__(".data.percpu"))) \
14 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name 14 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
15 15
16#ifdef MODULE
17#define SHARED_ALIGNED_SECTION ".data.percpu"
18#else
19#define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned"
20#endif
21
16#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ 22#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
17 __attribute__((__section__(".data.percpu.shared_aligned"))) \ 23 __attribute__((__section__(SHARED_ALIGNED_SECTION))) \
18 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ 24 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \
19 ____cacheline_aligned_in_smp 25 ____cacheline_aligned_in_smp
20#else 26#else
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 02df20f085fe..7224c4099a28 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -412,6 +412,8 @@ int mdiobus_register(struct mii_bus *bus);
412void mdiobus_unregister(struct mii_bus *bus); 412void mdiobus_unregister(struct mii_bus *bus);
413void phy_sanitize_settings(struct phy_device *phydev); 413void phy_sanitize_settings(struct phy_device *phydev);
414int phy_stop_interrupts(struct phy_device *phydev); 414int phy_stop_interrupts(struct phy_device *phydev);
415int phy_enable_interrupts(struct phy_device *phydev);
416int phy_disable_interrupts(struct phy_device *phydev);
415 417
416static inline int phy_read_status(struct phy_device *phydev) { 418static inline int phy_read_status(struct phy_device *phydev) {
417 return phydev->drv->read_status(phydev); 419 return phydev->drv->read_status(phydev);
@@ -447,5 +449,8 @@ int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask,
447 int (*run)(struct phy_device *)); 449 int (*run)(struct phy_device *));
448int phy_scan_fixups(struct phy_device *phydev); 450int phy_scan_fixups(struct phy_device *phydev);
449 451
452int __init mdio_bus_init(void);
453void mdio_bus_exit(void);
454
450extern struct bus_type mdio_bus_type; 455extern struct bus_type mdio_bus_type;
451#endif /* __PHY_H */ 456#endif /* __PHY_H */
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 8082d6587a0f..d42dbec06083 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -131,18 +131,6 @@ struct rcu_head {
131 */ 131 */
132#define rcu_read_unlock_bh() __rcu_read_unlock_bh() 132#define rcu_read_unlock_bh() __rcu_read_unlock_bh()
133 133
134/*
135 * Prevent the compiler from merging or refetching accesses. The compiler
136 * is also forbidden from reordering successive instances of ACCESS_ONCE(),
137 * but only when the compiler is aware of some particular ordering. One way
138 * to make the compiler aware of ordering is to put the two invocations of
139 * ACCESS_ONCE() in different C statements.
140 *
141 * This macro does absolutely -nothing- to prevent the CPU from reordering,
142 * merging, or refetching absolutely anything at any time.
143 */
144#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
145
146/** 134/**
147 * rcu_dereference - fetch an RCU-protected pointer in an 135 * rcu_dereference - fetch an RCU-protected pointer in an
148 * RCU read-side critical section. This pointer may later 136 * RCU read-side critical section. This pointer may later
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 03c238088aee..5395a6176f4b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -158,6 +158,8 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
158} 158}
159#endif 159#endif
160 160
161extern unsigned long long time_sync_thresh;
162
161/* 163/*
162 * Task state bitmask. NOTE! These bits are also 164 * Task state bitmask. NOTE! These bits are also
163 * encoded in fs/proc/array.c: get_task_state(). 165 * encoded in fs/proc/array.c: get_task_state().
@@ -1551,6 +1553,35 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
1551 1553
1552extern unsigned long long sched_clock(void); 1554extern unsigned long long sched_clock(void);
1553 1555
1556#ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
1557static inline void sched_clock_init(void)
1558{
1559}
1560
1561static inline u64 sched_clock_cpu(int cpu)
1562{
1563 return sched_clock();
1564}
1565
1566static inline void sched_clock_tick(void)
1567{
1568}
1569
1570static inline void sched_clock_idle_sleep_event(void)
1571{
1572}
1573
1574static inline void sched_clock_idle_wakeup_event(u64 delta_ns)
1575{
1576}
1577#else
1578extern void sched_clock_init(void);
1579extern u64 sched_clock_cpu(int cpu);
1580extern void sched_clock_tick(void);
1581extern void sched_clock_idle_sleep_event(void);
1582extern void sched_clock_idle_wakeup_event(u64 delta_ns);
1583#endif
1584
1554/* 1585/*
1555 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu 1586 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu
1556 * clock constructed from sched_clock(): 1587 * clock constructed from sched_clock():
@@ -1977,6 +2008,11 @@ static inline void clear_tsk_need_resched(struct task_struct *tsk)
1977 clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); 2008 clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
1978} 2009}
1979 2010
2011static inline int test_tsk_need_resched(struct task_struct *tsk)
2012{
2013 return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED));
2014}
2015
1980static inline int signal_pending(struct task_struct *p) 2016static inline int signal_pending(struct task_struct *p)
1981{ 2017{
1982 return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); 2018 return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING));
@@ -2001,13 +2037,13 @@ static inline int need_resched(void)
2001 * cond_resched_lock() will drop the spinlock before scheduling, 2037 * cond_resched_lock() will drop the spinlock before scheduling,
2002 * cond_resched_softirq() will enable bhs before scheduling. 2038 * cond_resched_softirq() will enable bhs before scheduling.
2003 */ 2039 */
2004#ifdef CONFIG_PREEMPT 2040extern int _cond_resched(void);
2041#ifdef CONFIG_PREEMPT_BKL
2005static inline int cond_resched(void) 2042static inline int cond_resched(void)
2006{ 2043{
2007 return 0; 2044 return 0;
2008} 2045}
2009#else 2046#else
2010extern int _cond_resched(void);
2011static inline int cond_resched(void) 2047static inline int cond_resched(void)
2012{ 2048{
2013 return _cond_resched(); 2049 return _cond_resched();
@@ -2015,6 +2051,10 @@ static inline int cond_resched(void)
2015#endif 2051#endif
2016extern int cond_resched_lock(spinlock_t * lock); 2052extern int cond_resched_lock(spinlock_t * lock);
2017extern int cond_resched_softirq(void); 2053extern int cond_resched_softirq(void);
2054static inline int cond_resched_bkl(void)
2055{
2056 return _cond_resched();
2057}
2018 2058
2019/* 2059/*
2020 * Does a critical section need to be broken due to another 2060 * Does a critical section need to be broken due to another
diff --git a/include/linux/usb/association.h b/include/linux/usb/association.h
new file mode 100644
index 000000000000..07c5e3cf5898
--- /dev/null
+++ b/include/linux/usb/association.h
@@ -0,0 +1,150 @@
1/*
2 * Wireless USB - Cable Based Association
3 *
4 * Copyright (C) 2006 Intel Corporation
5 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version
9 * 2 as published by the Free Software Foundation.
10 *
11 */
12#ifndef __LINUX_USB_ASSOCIATION_H
13#define __LINUX_USB_ASSOCIATION_H
14
15
16/*
17 * Association attributes
18 *
19 * Association Models Supplement to WUSB 1.0 T[3-1]
20 *
21 * Each field in the structures has it's ID, it's length and then the
22 * value. This is the actual definition of the field's ID and its
23 * length.
24 */
25struct wusb_am_attr {
26 __u8 id;
27 __u8 len;
28};
29
30/* Different fields defined by the spec */
31#define WUSB_AR_AssociationTypeId { .id = 0x0000, .len = 2 }
32#define WUSB_AR_AssociationSubTypeId { .id = 0x0001, .len = 2 }
33#define WUSB_AR_Length { .id = 0x0002, .len = 4 }
34#define WUSB_AR_AssociationStatus { .id = 0x0004, .len = 4 }
35#define WUSB_AR_LangID { .id = 0x0008, .len = 2 }
36#define WUSB_AR_DeviceFriendlyName { .id = 0x000b, .len = 64 } /* max */
37#define WUSB_AR_HostFriendlyName { .id = 0x000c, .len = 64 } /* max */
38#define WUSB_AR_CHID { .id = 0x1000, .len = 16 }
39#define WUSB_AR_CDID { .id = 0x1001, .len = 16 }
40#define WUSB_AR_ConnectionContext { .id = 0x1002, .len = 48 }
41#define WUSB_AR_BandGroups { .id = 0x1004, .len = 2 }
42
43/* CBAF Control Requests (AMS1.0[T4-1] */
44enum {
45 CBAF_REQ_GET_ASSOCIATION_INFORMATION = 0x01,
46 CBAF_REQ_GET_ASSOCIATION_REQUEST,
47 CBAF_REQ_SET_ASSOCIATION_RESPONSE
48};
49
50/*
51 * CBAF USB-interface defitions
52 *
53 * No altsettings, one optional interrupt endpoint.
54 */
55enum {
56 CBAF_IFACECLASS = 0xef,
57 CBAF_IFACESUBCLASS = 0x03,
58 CBAF_IFACEPROTOCOL = 0x01,
59};
60
61/* Association Information (AMS1.0[T4-3]) */
62struct wusb_cbaf_assoc_info {
63 __le16 Length;
64 __u8 NumAssociationRequests;
65 __le16 Flags;
66 __u8 AssociationRequestsArray[];
67} __attribute__((packed));
68
69/* Association Request (AMS1.0[T4-4]) */
70struct wusb_cbaf_assoc_request {
71 __u8 AssociationDataIndex;
72 __u8 Reserved;
73 __le16 AssociationTypeId;
74 __le16 AssociationSubTypeId;
75 __le32 AssociationTypeInfoSize;
76} __attribute__((packed));
77
78enum {
79 AR_TYPE_WUSB = 0x0001,
80 AR_TYPE_WUSB_RETRIEVE_HOST_INFO = 0x0000,
81 AR_TYPE_WUSB_ASSOCIATE = 0x0001,
82};
83
84/* Association Attribute header (AMS1.0[3.8]) */
85struct wusb_cbaf_attr_hdr {
86 __le16 id;
87 __le16 len;
88} __attribute__((packed));
89
90/* Host Info (AMS1.0[T4-7]) (yeah, more headers and fields...) */
91struct wusb_cbaf_host_info {
92 struct wusb_cbaf_attr_hdr AssociationTypeId_hdr;
93 __le16 AssociationTypeId;
94 struct wusb_cbaf_attr_hdr AssociationSubTypeId_hdr;
95 __le16 AssociationSubTypeId;
96 struct wusb_cbaf_attr_hdr CHID_hdr;
97 struct wusb_ckhdid CHID;
98 struct wusb_cbaf_attr_hdr LangID_hdr;
99 __le16 LangID;
100 struct wusb_cbaf_attr_hdr HostFriendlyName_hdr;
101 __u8 HostFriendlyName[];
102} __attribute__((packed));
103
104/* Device Info (AMS1.0[T4-8])
105 *
106 * I still don't get this tag'n'header stuff for each goddamn
107 * field...
108 */
109struct wusb_cbaf_device_info {
110 struct wusb_cbaf_attr_hdr Length_hdr;
111 __le32 Length;
112 struct wusb_cbaf_attr_hdr CDID_hdr;
113 struct wusb_ckhdid CDID;
114 struct wusb_cbaf_attr_hdr BandGroups_hdr;
115 __le16 BandGroups;
116 struct wusb_cbaf_attr_hdr LangID_hdr;
117 __le16 LangID;
118 struct wusb_cbaf_attr_hdr DeviceFriendlyName_hdr;
119 __u8 DeviceFriendlyName[];
120} __attribute__((packed));
121
122/* Connection Context; CC_DATA - Success case (AMS1.0[T4-9]) */
123struct wusb_cbaf_cc_data {
124 struct wusb_cbaf_attr_hdr AssociationTypeId_hdr;
125 __le16 AssociationTypeId;
126 struct wusb_cbaf_attr_hdr AssociationSubTypeId_hdr;
127 __le16 AssociationSubTypeId;
128 struct wusb_cbaf_attr_hdr Length_hdr;
129 __le32 Length;
130 struct wusb_cbaf_attr_hdr ConnectionContext_hdr;
131 struct wusb_ckhdid CHID;
132 struct wusb_ckhdid CDID;
133 struct wusb_ckhdid CK;
134 struct wusb_cbaf_attr_hdr BandGroups_hdr;
135 __le16 BandGroups;
136} __attribute__((packed));
137
138/* CC_DATA - Failure case (AMS1.0[T4-10]) */
139struct wusb_cbaf_cc_data_fail {
140 struct wusb_cbaf_attr_hdr AssociationTypeId_hdr;
141 __le16 AssociationTypeId;
142 struct wusb_cbaf_attr_hdr AssociationSubTypeId_hdr;
143 __le16 AssociationSubTypeId;
144 struct wusb_cbaf_attr_hdr Length_hdr;
145 __le16 Length;
146 struct wusb_cbaf_attr_hdr AssociationStatus_hdr;
147 __u32 AssociationStatus;
148} __attribute__((packed));
149
150#endif /* __LINUX_USB_ASSOCIATION_H */
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
index 4d0909e53595..79b9837d9ca0 100644
--- a/include/linux/vermagic.h
+++ b/include/linux/vermagic.h
@@ -17,6 +17,11 @@
17#else 17#else
18#define MODULE_VERMAGIC_MODULE_UNLOAD "" 18#define MODULE_VERMAGIC_MODULE_UNLOAD ""
19#endif 19#endif
20#ifdef CONFIG_MODVERSIONS
21#define MODULE_VERMAGIC_MODVERSIONS "modversions "
22#else
23#define MODULE_VERMAGIC_MODVERSIONS ""
24#endif
20#ifndef MODULE_ARCH_VERMAGIC 25#ifndef MODULE_ARCH_VERMAGIC
21#define MODULE_ARCH_VERMAGIC "" 26#define MODULE_ARCH_VERMAGIC ""
22#endif 27#endif
@@ -24,5 +29,6 @@
24#define VERMAGIC_STRING \ 29#define VERMAGIC_STRING \
25 UTS_RELEASE " " \ 30 UTS_RELEASE " " \
26 MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ 31 MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
27 MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC 32 MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
33 MODULE_ARCH_VERMAGIC
28 34