diff options
| author | Paul Mackerras <paulus@samba.org> | 2008-04-14 07:11:02 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2008-04-14 07:11:02 -0400 |
| commit | ac7c5353b189e10cf5dd27399f64f7b013abffc6 (patch) | |
| tree | 8222d92b774c256d6ec4399c716d76b3f05ddc4b /include/linux | |
| parent | a8f75ea70c58546205fb7673be41455b9da5d9a7 (diff) | |
| parent | 120dd64cacd4fb796bca0acba3665553f1d9ecaa (diff) | |
Merge branch 'linux-2.6'
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/Kbuild | 4 | ||||
| -rw-r--r-- | include/linux/bitops.h | 40 | ||||
| -rw-r--r-- | include/linux/cgroup.h | 1 | ||||
| -rw-r--r-- | include/linux/compat.h | 4 | ||||
| -rw-r--r-- | include/linux/cpuidle.h | 4 | ||||
| -rw-r--r-- | include/linux/dmaengine.h | 2 | ||||
| -rw-r--r-- | include/linux/hardirq.h | 7 | ||||
| -rw-r--r-- | include/linux/hpet.h | 2 | ||||
| -rw-r--r-- | include/linux/ide.h | 2 | ||||
| -rw-r--r-- | include/linux/input.h | 5 | ||||
| -rw-r--r-- | include/linux/iocontext.h | 3 | ||||
| -rw-r--r-- | include/linux/lguest_launcher.h | 6 | ||||
| -rw-r--r-- | include/linux/libata.h | 27 | ||||
| -rw-r--r-- | include/linux/linkage.h | 20 | ||||
| -rw-r--r-- | include/linux/mount.h | 2 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 12 | ||||
| -rw-r--r-- | include/linux/pnp.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 6 | ||||
| -rw-r--r-- | include/linux/spinlock.h | 3 | ||||
| -rw-r--r-- | include/linux/virtio.h | 5 |
20 files changed, 112 insertions, 45 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 4108b38ebb16..9cdd12a9e843 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -195,7 +195,6 @@ unifdef-y += ethtool.h | |||
| 195 | unifdef-y += eventpoll.h | 195 | unifdef-y += eventpoll.h |
| 196 | unifdef-y += signalfd.h | 196 | unifdef-y += signalfd.h |
| 197 | unifdef-y += ext2_fs.h | 197 | unifdef-y += ext2_fs.h |
| 198 | unifdef-y += ext3_fs.h | ||
| 199 | unifdef-y += fb.h | 198 | unifdef-y += fb.h |
| 200 | unifdef-y += fcntl.h | 199 | unifdef-y += fcntl.h |
| 201 | unifdef-y += filter.h | 200 | unifdef-y += filter.h |
| @@ -248,14 +247,13 @@ unifdef-y += isdn.h | |||
| 248 | unifdef-y += isdnif.h | 247 | unifdef-y += isdnif.h |
| 249 | unifdef-y += isdn_divertif.h | 248 | unifdef-y += isdn_divertif.h |
| 250 | unifdef-y += isdn_ppp.h | 249 | unifdef-y += isdn_ppp.h |
| 251 | unifdef-y += jbd.h | ||
| 252 | unifdef-y += joystick.h | 250 | unifdef-y += joystick.h |
| 253 | unifdef-y += kdev_t.h | 251 | unifdef-y += kdev_t.h |
| 254 | unifdef-y += kd.h | 252 | unifdef-y += kd.h |
| 255 | unifdef-y += kernelcapi.h | 253 | unifdef-y += kernelcapi.h |
| 256 | unifdef-y += kernel.h | 254 | unifdef-y += kernel.h |
| 257 | unifdef-y += keyboard.h | 255 | unifdef-y += keyboard.h |
| 258 | unifdef-$(CONFIG_HAVE_KVM) += kvm.h | 256 | unifdef-y += kvm.h |
| 259 | unifdef-y += llc.h | 257 | unifdef-y += llc.h |
| 260 | unifdef-y += loop.h | 258 | unifdef-y += loop.h |
| 261 | unifdef-y += lp.h | 259 | unifdef-y += lp.h |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 69c1edb9fe54..40d54731de7e 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -65,6 +65,46 @@ static inline __u32 ror32(__u32 word, unsigned int shift) | |||
| 65 | return (word >> shift) | (word << (32 - shift)); | 65 | return (word >> shift) | (word << (32 - shift)); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | /** | ||
| 69 | * rol16 - rotate a 16-bit value left | ||
| 70 | * @word: value to rotate | ||
| 71 | * @shift: bits to roll | ||
| 72 | */ | ||
| 73 | static inline __u16 rol16(__u16 word, unsigned int shift) | ||
| 74 | { | ||
| 75 | return (word << shift) | (word >> (16 - shift)); | ||
| 76 | } | ||
| 77 | |||
| 78 | /** | ||
| 79 | * ror16 - rotate a 16-bit value right | ||
| 80 | * @word: value to rotate | ||
| 81 | * @shift: bits to roll | ||
| 82 | */ | ||
| 83 | static inline __u16 ror16(__u16 word, unsigned int shift) | ||
| 84 | { | ||
| 85 | return (word >> shift) | (word << (16 - shift)); | ||
| 86 | } | ||
| 87 | |||
| 88 | /** | ||
| 89 | * rol8 - rotate an 8-bit value left | ||
| 90 | * @word: value to rotate | ||
| 91 | * @shift: bits to roll | ||
| 92 | */ | ||
| 93 | static inline __u8 rol8(__u8 word, unsigned int shift) | ||
| 94 | { | ||
| 95 | return (word << shift) | (word >> (8 - shift)); | ||
| 96 | } | ||
| 97 | |||
| 98 | /** | ||
| 99 | * ror8 - rotate an 8-bit value right | ||
| 100 | * @word: value to rotate | ||
| 101 | * @shift: bits to roll | ||
| 102 | */ | ||
| 103 | static inline __u8 ror8(__u8 word, unsigned int shift) | ||
| 104 | { | ||
| 105 | return (word >> shift) | (word << (8 - shift)); | ||
| 106 | } | ||
| 107 | |||
| 68 | static inline unsigned fls_long(unsigned long l) | 108 | static inline unsigned fls_long(unsigned long l) |
| 69 | { | 109 | { |
| 70 | if (sizeof(l) == 4) | 110 | if (sizeof(l) == 4) |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 028ba3b523b1..a6a6035a4e1e 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -256,6 +256,7 @@ struct cgroup_subsys { | |||
| 256 | void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); | 256 | void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); |
| 257 | int subsys_id; | 257 | int subsys_id; |
| 258 | int active; | 258 | int active; |
| 259 | int disabled; | ||
| 259 | int early_init; | 260 | int early_init; |
| 260 | #define MAX_CGROUP_TYPE_NAMELEN 32 | 261 | #define MAX_CGROUP_TYPE_NAMELEN 32 |
| 261 | const char *name; | 262 | const char *name; |
diff --git a/include/linux/compat.h b/include/linux/compat.h index a671dbff7a1f..8fa7857e153b 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -192,8 +192,8 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | |||
| 192 | struct compat_timeval __user *tvp); | 192 | struct compat_timeval __user *tvp); |
| 193 | 193 | ||
| 194 | asmlinkage long compat_sys_wait4(compat_pid_t pid, | 194 | asmlinkage long compat_sys_wait4(compat_pid_t pid, |
| 195 | compat_uint_t *stat_addr, int options, | 195 | compat_uint_t __user *stat_addr, int options, |
| 196 | struct compat_rusage *ru); | 196 | struct compat_rusage __user *ru); |
| 197 | 197 | ||
| 198 | #define BITS_PER_COMPAT_LONG (8*sizeof(compat_long_t)) | 198 | #define BITS_PER_COMPAT_LONG (8*sizeof(compat_long_t)) |
| 199 | 199 | ||
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 6b72a4584086..51e6b1e520e6 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -38,8 +38,8 @@ struct cpuidle_state { | |||
| 38 | unsigned int power_usage; /* in mW */ | 38 | unsigned int power_usage; /* in mW */ |
| 39 | unsigned int target_residency; /* in US */ | 39 | unsigned int target_residency; /* in US */ |
| 40 | 40 | ||
| 41 | unsigned int usage; | 41 | unsigned long long usage; |
| 42 | unsigned int time; /* in US */ | 42 | unsigned long long time; /* in US */ |
| 43 | 43 | ||
| 44 | int (*enter) (struct cpuidle_device *dev, | 44 | int (*enter) (struct cpuidle_device *dev, |
| 45 | struct cpuidle_state *state); | 45 | struct cpuidle_state *state); |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 261e43a4c873..34d440698293 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -423,7 +423,7 @@ void dma_async_device_unregister(struct dma_device *device); | |||
| 423 | /* --- Helper iov-locking functions --- */ | 423 | /* --- Helper iov-locking functions --- */ |
| 424 | 424 | ||
| 425 | struct dma_page_list { | 425 | struct dma_page_list { |
| 426 | char *base_address; | 426 | char __user *base_address; |
| 427 | int nr_pages; | 427 | int nr_pages; |
| 428 | struct page **pages; | 428 | struct page **pages; |
| 429 | }; | 429 | }; |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 49829988bfa0..897f723bd222 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -72,6 +72,13 @@ | |||
| 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 | /* | ||
| 76 | * Are we running in atomic context? WARNING: this macro cannot | ||
| 77 | * always detect atomic context; in particular, it cannot know about | ||
| 78 | * held spinlocks in non-preemptible kernels. Thus it should not be | ||
| 79 | * used in the general case to determine whether sleeping is possible. | ||
| 80 | * Do not use in_atomic() in driver code. | ||
| 81 | */ | ||
| 75 | #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) | 82 | #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) |
| 76 | 83 | ||
| 77 | #ifdef CONFIG_PREEMPT | 84 | #ifdef CONFIG_PREEMPT |
diff --git a/include/linux/hpet.h b/include/linux/hpet.h index 9cd94bfd07e5..2dc29ce6c8e4 100644 --- a/include/linux/hpet.h +++ b/include/linux/hpet.h | |||
| @@ -64,7 +64,7 @@ struct hpet { | |||
| 64 | */ | 64 | */ |
| 65 | 65 | ||
| 66 | #define Tn_INT_ROUTE_CAP_MASK (0xffffffff00000000ULL) | 66 | #define Tn_INT_ROUTE_CAP_MASK (0xffffffff00000000ULL) |
| 67 | #define Tn_INT_ROUTE_CAP_SHIFT (32UL) | 67 | #define Tn_INI_ROUTE_CAP_SHIFT (32UL) |
| 68 | #define Tn_FSB_INT_DELCAP_MASK (0x8000UL) | 68 | #define Tn_FSB_INT_DELCAP_MASK (0x8000UL) |
| 69 | #define Tn_FSB_INT_DELCAP_SHIFT (15) | 69 | #define Tn_FSB_INT_DELCAP_SHIFT (15) |
| 70 | #define Tn_FSB_EN_CNF_MASK (0x4000UL) | 70 | #define Tn_FSB_EN_CNF_MASK (0x4000UL) |
diff --git a/include/linux/ide.h b/include/linux/ide.h index a3b69c10d667..bc26b2f27359 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include <asm/semaphore.h> | 26 | #include <asm/semaphore.h> |
| 27 | #include <asm/mutex.h> | 27 | #include <asm/mutex.h> |
| 28 | 28 | ||
| 29 | #if defined(CRIS) || defined(FRV) | 29 | #if defined(CONFIG_CRIS) || defined(CONFIG_FRV) |
| 30 | # define SUPPORT_VLB_SYNC 0 | 30 | # define SUPPORT_VLB_SYNC 0 |
| 31 | #else | 31 | #else |
| 32 | # define SUPPORT_VLB_SYNC 1 | 32 | # define SUPPORT_VLB_SYNC 1 |
diff --git a/include/linux/input.h b/include/linux/input.h index 1bdc39a8c76c..cae2c35d1206 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -1227,12 +1227,13 @@ void input_free_device(struct input_dev *dev); | |||
| 1227 | 1227 | ||
| 1228 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 1228 | static inline struct input_dev *input_get_device(struct input_dev *dev) |
| 1229 | { | 1229 | { |
| 1230 | return to_input_dev(get_device(&dev->dev)); | 1230 | return dev ? to_input_dev(get_device(&dev->dev)) : NULL; |
| 1231 | } | 1231 | } |
| 1232 | 1232 | ||
| 1233 | static inline void input_put_device(struct input_dev *dev) | 1233 | static inline void input_put_device(struct input_dev *dev) |
| 1234 | { | 1234 | { |
| 1235 | put_device(&dev->dev); | 1235 | if (dev) |
| 1236 | put_device(&dev->dev); | ||
| 1236 | } | 1237 | } |
| 1237 | 1238 | ||
| 1238 | static inline void *input_get_drvdata(struct input_dev *dev) | 1239 | static inline void *input_get_drvdata(struct input_dev *dev) |
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 1b4ccf25b4d2..cac4b364cd40 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define IOCONTEXT_H | 2 | #define IOCONTEXT_H |
| 3 | 3 | ||
| 4 | #include <linux/radix-tree.h> | 4 | #include <linux/radix-tree.h> |
| 5 | #include <linux/rcupdate.h> | ||
| 5 | 6 | ||
| 6 | /* | 7 | /* |
| 7 | * This is the per-process anticipatory I/O scheduler state. | 8 | * This is the per-process anticipatory I/O scheduler state. |
| @@ -54,6 +55,8 @@ struct cfq_io_context { | |||
| 54 | 55 | ||
| 55 | void (*dtor)(struct io_context *); /* destructor */ | 56 | void (*dtor)(struct io_context *); /* destructor */ |
| 56 | void (*exit)(struct io_context *); /* called on task exit */ | 57 | void (*exit)(struct io_context *); /* called on task exit */ |
| 58 | |||
| 59 | struct rcu_head rcu_head; | ||
| 57 | }; | 60 | }; |
| 58 | 61 | ||
| 59 | /* | 62 | /* |
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h index 589be3e1f3ac..e7217dc58f39 100644 --- a/include/linux/lguest_launcher.h +++ b/include/linux/lguest_launcher.h | |||
| @@ -16,6 +16,10 @@ | |||
| 16 | * a new device, we simply need to write a new virtio driver and create support | 16 | * a new device, we simply need to write a new virtio driver and create support |
| 17 | * for it in the Launcher: this code won't need to change. | 17 | * for it in the Launcher: this code won't need to change. |
| 18 | * | 18 | * |
| 19 | * Virtio devices are also used by kvm, so we can simply reuse their optimized | ||
| 20 | * device drivers. And one day when everyone uses virtio, my plan will be | ||
| 21 | * complete. Bwahahahah! | ||
| 22 | * | ||
| 19 | * Devices are described by a simplified ID, a status byte, and some "config" | 23 | * Devices are described by a simplified ID, a status byte, and some "config" |
| 20 | * bytes which describe this device's configuration. This is placed by the | 24 | * bytes which describe this device's configuration. This is placed by the |
| 21 | * Launcher just above the top of physical memory: | 25 | * Launcher just above the top of physical memory: |
| @@ -26,7 +30,7 @@ struct lguest_device_desc { | |||
| 26 | /* The number of virtqueues (first in config array) */ | 30 | /* The number of virtqueues (first in config array) */ |
| 27 | __u8 num_vq; | 31 | __u8 num_vq; |
| 28 | /* The number of bytes of feature bits. Multiply by 2: one for host | 32 | /* The number of bytes of feature bits. Multiply by 2: one for host |
| 29 | * features and one for guest acknowledgements. */ | 33 | * features and one for Guest acknowledgements. */ |
| 30 | __u8 feature_len; | 34 | __u8 feature_len; |
| 31 | /* The number of bytes of the config array after virtqueues. */ | 35 | /* The number of bytes of the config array after virtqueues. */ |
| 32 | __u8 config_len; | 36 | __u8 config_len; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 269cdba09578..37ee881c42ac 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -295,6 +295,7 @@ enum { | |||
| 295 | ATA_EH_SOFTRESET = (1 << 1), | 295 | ATA_EH_SOFTRESET = (1 << 1), |
| 296 | ATA_EH_HARDRESET = (1 << 2), | 296 | ATA_EH_HARDRESET = (1 << 2), |
| 297 | ATA_EH_ENABLE_LINK = (1 << 3), | 297 | ATA_EH_ENABLE_LINK = (1 << 3), |
| 298 | ATA_EH_LPM = (1 << 4), /* link power management action */ | ||
| 298 | 299 | ||
| 299 | ATA_EH_RESET_MASK = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, | 300 | ATA_EH_RESET_MASK = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, |
| 300 | ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE, | 301 | ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE, |
| @@ -304,7 +305,6 @@ enum { | |||
| 304 | ATA_EHI_RESUME_LINK = (1 << 1), /* resume link (reset modifier) */ | 305 | ATA_EHI_RESUME_LINK = (1 << 1), /* resume link (reset modifier) */ |
| 305 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ | 306 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ |
| 306 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ | 307 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ |
| 307 | ATA_EHI_LPM = (1 << 4), /* link power management action */ | ||
| 308 | 308 | ||
| 309 | ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ | 309 | ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ |
| 310 | ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ | 310 | ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ |
| @@ -350,7 +350,8 @@ enum { | |||
| 350 | ATAPI_READ = 0, /* READs */ | 350 | ATAPI_READ = 0, /* READs */ |
| 351 | ATAPI_WRITE = 1, /* WRITEs */ | 351 | ATAPI_WRITE = 1, /* WRITEs */ |
| 352 | ATAPI_READ_CD = 2, /* READ CD [MSF] */ | 352 | ATAPI_READ_CD = 2, /* READ CD [MSF] */ |
| 353 | ATAPI_MISC = 3, /* the rest */ | 353 | ATAPI_PASS_THRU = 3, /* SAT pass-thru */ |
| 354 | ATAPI_MISC = 4, /* the rest */ | ||
| 354 | }; | 355 | }; |
| 355 | 356 | ||
| 356 | enum ata_xfer_mask { | 357 | enum ata_xfer_mask { |
| @@ -849,6 +850,7 @@ extern unsigned int ata_dev_try_classify(struct ata_device *dev, int present, | |||
| 849 | */ | 850 | */ |
| 850 | extern void ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf); | 851 | extern void ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf); |
| 851 | extern void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf); | 852 | extern void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf); |
| 853 | extern int atapi_cmd_type(u8 opcode); | ||
| 852 | extern void ata_tf_to_fis(const struct ata_taskfile *tf, | 854 | extern void ata_tf_to_fis(const struct ata_taskfile *tf, |
| 853 | u8 pmp, int is_cmd, u8 *fis); | 855 | u8 pmp, int is_cmd, u8 *fis); |
| 854 | extern void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf); | 856 | extern void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf); |
| @@ -1379,27 +1381,6 @@ static inline int ata_try_flush_cache(const struct ata_device *dev) | |||
| 1379 | ata_id_has_flush_ext(dev->id); | 1381 | ata_id_has_flush_ext(dev->id); |
| 1380 | } | 1382 | } |
| 1381 | 1383 | ||
| 1382 | static inline int atapi_cmd_type(u8 opcode) | ||
| 1383 | { | ||
| 1384 | switch (opcode) { | ||
| 1385 | case GPCMD_READ_10: | ||
| 1386 | case GPCMD_READ_12: | ||
| 1387 | return ATAPI_READ; | ||
| 1388 | |||
| 1389 | case GPCMD_WRITE_10: | ||
| 1390 | case GPCMD_WRITE_12: | ||
| 1391 | case GPCMD_WRITE_AND_VERIFY_10: | ||
| 1392 | return ATAPI_WRITE; | ||
| 1393 | |||
| 1394 | case GPCMD_READ_CD: | ||
| 1395 | case GPCMD_READ_CD_MSF: | ||
| 1396 | return ATAPI_READ_CD; | ||
| 1397 | |||
| 1398 | default: | ||
| 1399 | return ATAPI_MISC; | ||
| 1400 | } | ||
| 1401 | } | ||
| 1402 | |||
| 1403 | static inline unsigned int ac_err_mask(u8 status) | 1384 | static inline unsigned int ac_err_mask(u8 status) |
| 1404 | { | 1385 | { |
| 1405 | if (status & (ATA_BUSY | ATA_DRQ)) | 1386 | if (status & (ATA_BUSY | ATA_DRQ)) |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 0592936344c4..2119610b24f8 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
| @@ -17,8 +17,24 @@ | |||
| 17 | # define asmregparm | 17 | # define asmregparm |
| 18 | #endif | 18 | #endif |
| 19 | 19 | ||
| 20 | #ifndef prevent_tail_call | 20 | /* |
| 21 | # define prevent_tail_call(ret) do { } while (0) | 21 | * This is used by architectures to keep arguments on the stack |
| 22 | * untouched by the compiler by keeping them live until the end. | ||
| 23 | * The argument stack may be owned by the assembly-language | ||
| 24 | * caller, not the callee, and gcc doesn't always understand | ||
| 25 | * that. | ||
| 26 | * | ||
| 27 | * We have the return value, and a maximum of six arguments. | ||
| 28 | * | ||
| 29 | * This should always be followed by a "return ret" for the | ||
| 30 | * protection to work (ie no more work that the compiler might | ||
| 31 | * end up needing stack temporaries for). | ||
| 32 | */ | ||
| 33 | /* Assembly files may be compiled with -traditional .. */ | ||
| 34 | #ifndef __ASSEMBLY__ | ||
| 35 | #ifndef asmlinkage_protect | ||
| 36 | # define asmlinkage_protect(n, ret, args...) do { } while (0) | ||
| 37 | #endif | ||
| 22 | #endif | 38 | #endif |
| 23 | 39 | ||
| 24 | #ifndef __ALIGN | 40 | #ifndef __ALIGN |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 6d3047d8c91c..5ee2df217cdf 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -61,6 +61,7 @@ struct vfsmount { | |||
| 61 | atomic_t mnt_count; | 61 | atomic_t mnt_count; |
| 62 | int mnt_expiry_mark; /* true if marked for expiry */ | 62 | int mnt_expiry_mark; /* true if marked for expiry */ |
| 63 | int mnt_pinned; | 63 | int mnt_pinned; |
| 64 | int mnt_ghosts; | ||
| 64 | }; | 65 | }; |
| 65 | 66 | ||
| 66 | static inline struct vfsmount *mntget(struct vfsmount *mnt) | 67 | static inline struct vfsmount *mntget(struct vfsmount *mnt) |
| @@ -98,7 +99,6 @@ extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd, | |||
| 98 | int mnt_flags, struct list_head *fslist); | 99 | int mnt_flags, struct list_head *fslist); |
| 99 | 100 | ||
| 100 | extern void mark_mounts_for_expiry(struct list_head *mounts); | 101 | extern void mark_mounts_for_expiry(struct list_head *mounts); |
| 101 | extern void shrink_submounts(struct vfsmount *mountpoint, struct list_head *mounts); | ||
| 102 | 102 | ||
| 103 | extern spinlock_t vfsmount_lock; | 103 | extern spinlock_t vfsmount_lock; |
| 104 | extern dev_t name_to_dev_t(char *name); | 104 | extern dev_t name_to_dev_t(char *name); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a2f003239c85..ee81906b5164 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -383,9 +383,11 @@ static inline void __napi_complete(struct napi_struct *n) | |||
| 383 | 383 | ||
| 384 | static inline void napi_complete(struct napi_struct *n) | 384 | static inline void napi_complete(struct napi_struct *n) |
| 385 | { | 385 | { |
| 386 | local_irq_disable(); | 386 | unsigned long flags; |
| 387 | |||
| 388 | local_irq_save(flags); | ||
| 387 | __napi_complete(n); | 389 | __napi_complete(n); |
| 388 | local_irq_enable(); | 390 | local_irq_restore(flags); |
| 389 | } | 391 | } |
| 390 | 392 | ||
| 391 | /** | 393 | /** |
| @@ -1072,12 +1074,14 @@ static inline int netif_is_multiqueue(const struct net_device *dev) | |||
| 1072 | } | 1074 | } |
| 1073 | 1075 | ||
| 1074 | /* Use this variant when it is known for sure that it | 1076 | /* Use this variant when it is known for sure that it |
| 1075 | * is executing from interrupt context. | 1077 | * is executing from hardware interrupt context or with hardware interrupts |
| 1078 | * disabled. | ||
| 1076 | */ | 1079 | */ |
| 1077 | extern void dev_kfree_skb_irq(struct sk_buff *skb); | 1080 | extern void dev_kfree_skb_irq(struct sk_buff *skb); |
| 1078 | 1081 | ||
| 1079 | /* Use this variant in places where it could be invoked | 1082 | /* Use this variant in places where it could be invoked |
| 1080 | * either from interrupt or non-interrupt context. | 1083 | * from either hardware interrupt or other context, with hardware interrupts |
| 1084 | * either disabled or enabled. | ||
| 1081 | */ | 1085 | */ |
| 1082 | extern void dev_kfree_skb_any(struct sk_buff *skb); | 1086 | extern void dev_kfree_skb_any(struct sk_buff *skb); |
| 1083 | 1087 | ||
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 29dd55838e84..b2f05c230f4b 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
| @@ -175,7 +175,7 @@ static inline void pnp_set_card_drvdata(struct pnp_card_link *pcard, void *data) | |||
| 175 | struct pnp_dev { | 175 | struct pnp_dev { |
| 176 | struct device dev; /* Driver Model device interface */ | 176 | struct device dev; /* Driver Model device interface */ |
| 177 | u64 dma_mask; | 177 | u64 dma_mask; |
| 178 | unsigned char number; /* used as an index, must be unique */ | 178 | unsigned int number; /* used as an index, must be unique */ |
| 179 | int status; | 179 | int status; |
| 180 | 180 | ||
| 181 | struct list_head global_list; /* node in global list of devices */ | 181 | struct list_head global_list; /* node in global list of devices */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index fed07d03364e..6a1e7afb099b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1541,6 +1541,12 @@ static inline void idle_task_exit(void) {} | |||
| 1541 | 1541 | ||
| 1542 | extern void sched_idle_next(void); | 1542 | extern void sched_idle_next(void); |
| 1543 | 1543 | ||
| 1544 | #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) | ||
| 1545 | extern void wake_up_idle_cpu(int cpu); | ||
| 1546 | #else | ||
| 1547 | static inline void wake_up_idle_cpu(int cpu) { } | ||
| 1548 | #endif | ||
| 1549 | |||
| 1544 | #ifdef CONFIG_SCHED_DEBUG | 1550 | #ifdef CONFIG_SCHED_DEBUG |
| 1545 | extern unsigned int sysctl_sched_latency; | 1551 | extern unsigned int sysctl_sched_latency; |
| 1546 | extern unsigned int sysctl_sched_min_granularity; | 1552 | extern unsigned int sysctl_sched_min_granularity; |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 576a5f77d3bd..1129ee0a7180 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -341,6 +341,9 @@ static inline void double_spin_unlock(spinlock_t *l1, spinlock_t *l2, | |||
| 341 | * atomic_dec_and_lock - lock on reaching reference count zero | 341 | * atomic_dec_and_lock - lock on reaching reference count zero |
| 342 | * @atomic: the atomic counter | 342 | * @atomic: the atomic counter |
| 343 | * @lock: the spinlock in question | 343 | * @lock: the spinlock in question |
| 344 | * | ||
| 345 | * Decrements @atomic by 1. If the result is 0, returns true and locks | ||
| 346 | * @lock. Returns false for all other cases. | ||
| 344 | */ | 347 | */ |
| 345 | extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); | 348 | extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); |
| 346 | #define atomic_dec_and_lock(atomic, lock) \ | 349 | #define atomic_dec_and_lock(atomic, lock) \ |
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 12c18ac1b973..e7d10845b3c1 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
| @@ -41,6 +41,8 @@ struct virtqueue | |||
| 41 | * Returns NULL or the "data" token handed to add_buf. | 41 | * Returns NULL or the "data" token handed to add_buf. |
| 42 | * @disable_cb: disable callbacks | 42 | * @disable_cb: disable callbacks |
| 43 | * vq: the struct virtqueue we're talking about. | 43 | * vq: the struct virtqueue we're talking about. |
| 44 | * Note that this is not necessarily synchronous, hence unreliable and only | ||
| 45 | * useful as an optimization. | ||
| 44 | * @enable_cb: restart callbacks after disable_cb. | 46 | * @enable_cb: restart callbacks after disable_cb. |
| 45 | * vq: the struct virtqueue we're talking about. | 47 | * vq: the struct virtqueue we're talking about. |
| 46 | * This re-enables callbacks; it returns "false" if there are pending | 48 | * This re-enables callbacks; it returns "false" if there are pending |
| @@ -48,7 +50,8 @@ struct virtqueue | |||
| 48 | * checking for more work, and enabling callbacks. | 50 | * checking for more work, and enabling callbacks. |
| 49 | * | 51 | * |
| 50 | * Locking rules are straightforward: the driver is responsible for | 52 | * Locking rules are straightforward: the driver is responsible for |
| 51 | * locking. No two operations may be invoked simultaneously. | 53 | * locking. No two operations may be invoked simultaneously, with the exception |
| 54 | * of @disable_cb. | ||
| 52 | * | 55 | * |
| 53 | * All operations can be called in any context. | 56 | * All operations can be called in any context. |
| 54 | */ | 57 | */ |
