diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/rtc.h | 12 | ||||
-rw-r--r-- | include/asm-mips/unistd.h | 30 | ||||
-rw-r--r-- | include/asm-x86/kvm_host.h | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 18 | ||||
-rw-r--r-- | include/linux/dcache.h | 2 | ||||
-rw-r--r-- | include/linux/genhd.h | 10 | ||||
-rw-r--r-- | include/linux/i2c.h | 12 | ||||
-rw-r--r-- | include/linux/kvm.h | 4 | ||||
-rw-r--r-- | include/linux/net.h | 14 | ||||
-rw-r--r-- | include/linux/stop_machine.h | 19 | ||||
-rw-r--r-- | include/net/sch_generic.h | 12 |
11 files changed, 75 insertions, 60 deletions
diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h index be4af0029ac0..71ef3f0b9685 100644 --- a/include/asm-generic/rtc.h +++ b/include/asm-generic/rtc.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mc146818rtc.h> | 15 | #include <linux/mc146818rtc.h> |
16 | #include <linux/rtc.h> | 16 | #include <linux/rtc.h> |
17 | #include <linux/bcd.h> | 17 | #include <linux/bcd.h> |
18 | #include <linux/delay.h> | ||
18 | 19 | ||
19 | #define RTC_PIE 0x40 /* periodic interrupt enable */ | 20 | #define RTC_PIE 0x40 /* periodic interrupt enable */ |
20 | #define RTC_AIE 0x20 /* alarm interrupt enable */ | 21 | #define RTC_AIE 0x20 /* alarm interrupt enable */ |
@@ -43,7 +44,6 @@ static inline unsigned char rtc_is_updating(void) | |||
43 | 44 | ||
44 | static inline unsigned int get_rtc_time(struct rtc_time *time) | 45 | static inline unsigned int get_rtc_time(struct rtc_time *time) |
45 | { | 46 | { |
46 | unsigned long uip_watchdog = jiffies; | ||
47 | unsigned char ctrl; | 47 | unsigned char ctrl; |
48 | unsigned long flags; | 48 | unsigned long flags; |
49 | 49 | ||
@@ -53,19 +53,15 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) | |||
53 | 53 | ||
54 | /* | 54 | /* |
55 | * read RTC once any update in progress is done. The update | 55 | * read RTC once any update in progress is done. The update |
56 | * can take just over 2ms. We wait 10 to 20ms. There is no need to | 56 | * can take just over 2ms. We wait 20ms. There is no need to |
57 | * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP. | 57 | * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP. |
58 | * If you need to know *exactly* when a second has started, enable | 58 | * If you need to know *exactly* when a second has started, enable |
59 | * periodic update complete interrupts, (via ioctl) and then | 59 | * periodic update complete interrupts, (via ioctl) and then |
60 | * immediately read /dev/rtc which will block until you get the IRQ. | 60 | * immediately read /dev/rtc which will block until you get the IRQ. |
61 | * Once the read clears, read the RTC time (again via ioctl). Easy. | 61 | * Once the read clears, read the RTC time (again via ioctl). Easy. |
62 | */ | 62 | */ |
63 | 63 | if (rtc_is_updating()) | |
64 | if (rtc_is_updating() != 0) | 64 | mdelay(20); |
65 | while (jiffies - uip_watchdog < 2*HZ/100) { | ||
66 | barrier(); | ||
67 | cpu_relax(); | ||
68 | } | ||
69 | 65 | ||
70 | /* | 66 | /* |
71 | * Only the values that we read from the RTC are set. We leave | 67 | * Only the values that we read from the RTC are set. We leave |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 4964c82f85f9..a73e1531e151 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -344,16 +344,22 @@ | |||
344 | #define __NR_timerfd_create (__NR_Linux + 321) | 344 | #define __NR_timerfd_create (__NR_Linux + 321) |
345 | #define __NR_timerfd_gettime (__NR_Linux + 322) | 345 | #define __NR_timerfd_gettime (__NR_Linux + 322) |
346 | #define __NR_timerfd_settime (__NR_Linux + 323) | 346 | #define __NR_timerfd_settime (__NR_Linux + 323) |
347 | #define __NR_signalfd4 (__NR_Linux + 324) | ||
348 | #define __NR_eventfd2 (__NR_Linux + 325) | ||
349 | #define __NR_epoll_create1 (__NR_Linux + 326) | ||
350 | #define __NR_dup3 (__NR_Linux + 327) | ||
351 | #define __NR_pipe2 (__NR_Linux + 328) | ||
352 | #define __NR_inotify_init1 (__NR_Linux + 329) | ||
347 | 353 | ||
348 | /* | 354 | /* |
349 | * Offset of the last Linux o32 flavoured syscall | 355 | * Offset of the last Linux o32 flavoured syscall |
350 | */ | 356 | */ |
351 | #define __NR_Linux_syscalls 323 | 357 | #define __NR_Linux_syscalls 329 |
352 | 358 | ||
353 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 359 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
354 | 360 | ||
355 | #define __NR_O32_Linux 4000 | 361 | #define __NR_O32_Linux 4000 |
356 | #define __NR_O32_Linux_syscalls 323 | 362 | #define __NR_O32_Linux_syscalls 329 |
357 | 363 | ||
358 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 364 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
359 | 365 | ||
@@ -644,16 +650,22 @@ | |||
644 | #define __NR_timerfd_create (__NR_Linux + 280) | 650 | #define __NR_timerfd_create (__NR_Linux + 280) |
645 | #define __NR_timerfd_gettime (__NR_Linux + 281) | 651 | #define __NR_timerfd_gettime (__NR_Linux + 281) |
646 | #define __NR_timerfd_settime (__NR_Linux + 282) | 652 | #define __NR_timerfd_settime (__NR_Linux + 282) |
653 | #define __NR_signalfd4 (__NR_Linux + 283) | ||
654 | #define __NR_eventfd2 (__NR_Linux + 284) | ||
655 | #define __NR_epoll_create1 (__NR_Linux + 285) | ||
656 | #define __NR_dup3 (__NR_Linux + 286) | ||
657 | #define __NR_pipe2 (__NR_Linux + 287) | ||
658 | #define __NR_inotify_init1 (__NR_Linux + 288) | ||
647 | 659 | ||
648 | /* | 660 | /* |
649 | * Offset of the last Linux 64-bit flavoured syscall | 661 | * Offset of the last Linux 64-bit flavoured syscall |
650 | */ | 662 | */ |
651 | #define __NR_Linux_syscalls 282 | 663 | #define __NR_Linux_syscalls 288 |
652 | 664 | ||
653 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 665 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
654 | 666 | ||
655 | #define __NR_64_Linux 5000 | 667 | #define __NR_64_Linux 5000 |
656 | #define __NR_64_Linux_syscalls 282 | 668 | #define __NR_64_Linux_syscalls 288 |
657 | 669 | ||
658 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 670 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
659 | 671 | ||
@@ -948,16 +960,22 @@ | |||
948 | #define __NR_timerfd_create (__NR_Linux + 284) | 960 | #define __NR_timerfd_create (__NR_Linux + 284) |
949 | #define __NR_timerfd_gettime (__NR_Linux + 285) | 961 | #define __NR_timerfd_gettime (__NR_Linux + 285) |
950 | #define __NR_timerfd_settime (__NR_Linux + 286) | 962 | #define __NR_timerfd_settime (__NR_Linux + 286) |
963 | #define __NR_signalfd4 (__NR_Linux + 287) | ||
964 | #define __NR_eventfd2 (__NR_Linux + 288) | ||
965 | #define __NR_epoll_create1 (__NR_Linux + 289) | ||
966 | #define __NR_dup3 (__NR_Linux + 290) | ||
967 | #define __NR_pipe2 (__NR_Linux + 291) | ||
968 | #define __NR_inotify_init1 (__NR_Linux + 292) | ||
951 | 969 | ||
952 | /* | 970 | /* |
953 | * Offset of the last N32 flavoured syscall | 971 | * Offset of the last N32 flavoured syscall |
954 | */ | 972 | */ |
955 | #define __NR_Linux_syscalls 286 | 973 | #define __NR_Linux_syscalls 292 |
956 | 974 | ||
957 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 975 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
958 | 976 | ||
959 | #define __NR_N32_Linux 6000 | 977 | #define __NR_N32_Linux 6000 |
960 | #define __NR_N32_Linux_syscalls 286 | 978 | #define __NR_N32_Linux_syscalls 292 |
961 | 979 | ||
962 | #ifdef __KERNEL__ | 980 | #ifdef __KERNEL__ |
963 | 981 | ||
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 0f3c53114614..c2e34c275900 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -722,7 +722,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void); | |||
722 | 722 | ||
723 | #define __kvm_handle_fault_on_reboot(insn) \ | 723 | #define __kvm_handle_fault_on_reboot(insn) \ |
724 | "666: " insn "\n\t" \ | 724 | "666: " insn "\n\t" \ |
725 | ".pushsection .text.fixup, \"ax\" \n" \ | 725 | ".pushsection .fixup, \"ax\" \n" \ |
726 | "667: \n\t" \ | 726 | "667: \n\t" \ |
727 | KVM_EX_PUSH " $666b \n\t" \ | 727 | KVM_EX_PUSH " $666b \n\t" \ |
728 | "jmp kvm_handle_fault_on_reboot \n\t" \ | 728 | "jmp kvm_handle_fault_on_reboot \n\t" \ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e61f22be4d0e..44710d7e7bff 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -280,6 +280,15 @@ struct blk_queue_tag { | |||
280 | atomic_t refcnt; /* map can be shared */ | 280 | atomic_t refcnt; /* map can be shared */ |
281 | }; | 281 | }; |
282 | 282 | ||
283 | #define BLK_SCSI_MAX_CMDS (256) | ||
284 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) | ||
285 | |||
286 | struct blk_cmd_filter { | ||
287 | unsigned long read_ok[BLK_SCSI_CMD_PER_LONG]; | ||
288 | unsigned long write_ok[BLK_SCSI_CMD_PER_LONG]; | ||
289 | struct kobject kobj; | ||
290 | }; | ||
291 | |||
283 | struct request_queue | 292 | struct request_queue |
284 | { | 293 | { |
285 | /* | 294 | /* |
@@ -398,6 +407,7 @@ struct request_queue | |||
398 | #if defined(CONFIG_BLK_DEV_BSG) | 407 | #if defined(CONFIG_BLK_DEV_BSG) |
399 | struct bsg_class_device bsg_dev; | 408 | struct bsg_class_device bsg_dev; |
400 | #endif | 409 | #endif |
410 | struct blk_cmd_filter cmd_filter; | ||
401 | }; | 411 | }; |
402 | 412 | ||
403 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 413 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
@@ -807,8 +817,6 @@ extern void blk_put_queue(struct request_queue *); | |||
807 | /* | 817 | /* |
808 | * tag stuff | 818 | * tag stuff |
809 | */ | 819 | */ |
810 | #define blk_queue_tag_depth(q) ((q)->queue_tags->busy) | ||
811 | #define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth) | ||
812 | #define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED) | 820 | #define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED) |
813 | extern int blk_queue_start_tag(struct request_queue *, struct request *); | 821 | extern int blk_queue_start_tag(struct request_queue *, struct request *); |
814 | extern struct request *blk_queue_find_tag(struct request_queue *, int); | 822 | extern struct request *blk_queue_find_tag(struct request_queue *, int); |
@@ -833,11 +841,11 @@ extern int blkdev_issue_flush(struct block_device *, sector_t *); | |||
833 | /* | 841 | /* |
834 | * command filter functions | 842 | * command filter functions |
835 | */ | 843 | */ |
836 | extern int blk_verify_command(struct file *file, unsigned char *cmd); | 844 | extern int blk_verify_command(struct blk_cmd_filter *filter, |
837 | extern int blk_cmd_filter_verify_command(struct blk_scsi_cmd_filter *filter, | 845 | unsigned char *cmd, int has_write_perm); |
838 | unsigned char *cmd, mode_t *f_mode); | ||
839 | extern int blk_register_filter(struct gendisk *disk); | 846 | extern int blk_register_filter(struct gendisk *disk); |
840 | extern void blk_unregister_filter(struct gendisk *disk); | 847 | extern void blk_unregister_filter(struct gendisk *disk); |
848 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | ||
841 | 849 | ||
842 | #define MAX_PHYS_SEGMENTS 128 | 850 | #define MAX_PHYS_SEGMENTS 128 |
843 | #define MAX_HW_SEGMENTS 128 | 851 | #define MAX_HW_SEGMENTS 128 |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 07aa198f19ed..efba1de629ac 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -230,7 +230,7 @@ extern void d_delete(struct dentry *); | |||
230 | extern struct dentry * d_alloc(struct dentry *, const struct qstr *); | 230 | extern struct dentry * d_alloc(struct dentry *, const struct qstr *); |
231 | extern struct dentry * d_alloc_anon(struct inode *); | 231 | extern struct dentry * d_alloc_anon(struct inode *); |
232 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); | 232 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); |
233 | extern struct dentry * d_add_ci(struct inode *, struct dentry *, struct qstr *); | 233 | extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); |
234 | extern void shrink_dcache_sb(struct super_block *); | 234 | extern void shrink_dcache_sb(struct super_block *); |
235 | extern void shrink_dcache_parent(struct dentry *); | 235 | extern void shrink_dcache_parent(struct dentry *); |
236 | extern void shrink_dcache_for_umount(struct super_block *); | 236 | extern void shrink_dcache_for_umount(struct super_block *); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 118216f1bd3c..be4f5e5bfe06 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -110,15 +110,6 @@ struct hd_struct { | |||
110 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 110 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
111 | #define GENHD_FL_FAIL 64 | 111 | #define GENHD_FL_FAIL 64 |
112 | 112 | ||
113 | #define BLK_SCSI_MAX_CMDS (256) | ||
114 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) | ||
115 | |||
116 | struct blk_scsi_cmd_filter { | ||
117 | unsigned long read_ok[BLK_SCSI_CMD_PER_LONG]; | ||
118 | unsigned long write_ok[BLK_SCSI_CMD_PER_LONG]; | ||
119 | struct kobject kobj; | ||
120 | }; | ||
121 | |||
122 | struct gendisk { | 113 | struct gendisk { |
123 | int major; /* major number of driver */ | 114 | int major; /* major number of driver */ |
124 | int first_minor; | 115 | int first_minor; |
@@ -128,7 +119,6 @@ struct gendisk { | |||
128 | struct hd_struct **part; /* [indexed by minor] */ | 119 | struct hd_struct **part; /* [indexed by minor] */ |
129 | struct block_device_operations *fops; | 120 | struct block_device_operations *fops; |
130 | struct request_queue *queue; | 121 | struct request_queue *queue; |
131 | struct blk_scsi_cmd_filter cmd_filter; | ||
132 | void *private_data; | 122 | void *private_data; |
133 | sector_t capacity; | 123 | sector_t capacity; |
134 | 124 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 08be0d21864c..06115128047f 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -97,7 +97,19 @@ extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, | |||
97 | 97 | ||
98 | /** | 98 | /** |
99 | * struct i2c_driver - represent an I2C device driver | 99 | * struct i2c_driver - represent an I2C device driver |
100 | * @id: Unique driver ID (optional) | ||
100 | * @class: What kind of i2c device we instantiate (for detect) | 101 | * @class: What kind of i2c device we instantiate (for detect) |
102 | * @attach_adapter: Callback for bus addition (for legacy drivers) | ||
103 | * @detach_adapter: Callback for bus removal (for legacy drivers) | ||
104 | * @detach_client: Callback for device removal (for legacy drivers) | ||
105 | * @probe: Callback for device binding (new-style drivers) | ||
106 | * @remove: Callback for device unbinding (new-style drivers) | ||
107 | * @shutdown: Callback for device shutdown | ||
108 | * @suspend: Callback for device suspend | ||
109 | * @resume: Callback for device resume | ||
110 | * @command: Callback for bus-wide signaling (optional) | ||
111 | * @driver: Device driver model driver | ||
112 | * @id_table: List of I2C devices supported by this driver | ||
101 | * @detect: Callback for device detection | 113 | * @detect: Callback for device detection |
102 | * @address_data: The I2C addresses to probe, ignore or force (for detect) | 114 | * @address_data: The I2C addresses to probe, ignore or force (for detect) |
103 | * @clients: List of detected clients we created (for i2c-core use only) | 115 | * @clients: List of detected clients we created (for i2c-core use only) |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 69511f74f912..70a30651cd12 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -320,12 +320,12 @@ struct kvm_trace_rec { | |||
320 | struct { | 320 | struct { |
321 | __u64 cycle_u64; | 321 | __u64 cycle_u64; |
322 | __u32 extra_u32[KVM_TRC_EXTRA_MAX]; | 322 | __u32 extra_u32[KVM_TRC_EXTRA_MAX]; |
323 | } cycle; | 323 | } __attribute__((packed)) cycle; |
324 | struct { | 324 | struct { |
325 | __u32 extra_u32[KVM_TRC_EXTRA_MAX]; | 325 | __u32 extra_u32[KVM_TRC_EXTRA_MAX]; |
326 | } nocycle; | 326 | } nocycle; |
327 | } u; | 327 | } u; |
328 | } __attribute__((packed)); | 328 | }; |
329 | 329 | ||
330 | #define KVMIO 0xAE | 330 | #define KVMIO 0xAE |
331 | 331 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index 4a9a30f2d68f..6dc14a240042 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -18,16 +18,9 @@ | |||
18 | #ifndef _LINUX_NET_H | 18 | #ifndef _LINUX_NET_H |
19 | #define _LINUX_NET_H | 19 | #define _LINUX_NET_H |
20 | 20 | ||
21 | #include <linux/wait.h> | ||
22 | #include <linux/socket.h> | 21 | #include <linux/socket.h> |
23 | #include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */ | ||
24 | #include <asm/socket.h> | 22 | #include <asm/socket.h> |
25 | 23 | ||
26 | struct poll_table_struct; | ||
27 | struct pipe_inode_info; | ||
28 | struct inode; | ||
29 | struct net; | ||
30 | |||
31 | #define NPROTO AF_MAX | 24 | #define NPROTO AF_MAX |
32 | 25 | ||
33 | #define SYS_SOCKET 1 /* sys_socket(2) */ | 26 | #define SYS_SOCKET 1 /* sys_socket(2) */ |
@@ -62,6 +55,13 @@ typedef enum { | |||
62 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
63 | #include <linux/stringify.h> | 56 | #include <linux/stringify.h> |
64 | #include <linux/random.h> | 57 | #include <linux/random.h> |
58 | #include <linux/wait.h> | ||
59 | #include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */ | ||
60 | |||
61 | struct poll_table_struct; | ||
62 | struct pipe_inode_info; | ||
63 | struct inode; | ||
64 | struct net; | ||
65 | 65 | ||
66 | #define SOCK_ASYNC_NOSPACE 0 | 66 | #define SOCK_ASYNC_NOSPACE 0 |
67 | #define SOCK_ASYNC_WAITDATA 1 | 67 | #define SOCK_ASYNC_WAITDATA 1 |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index f1cb0ba6d715..faf1519b5adc 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
@@ -3,16 +3,13 @@ | |||
3 | /* "Bogolock": stop the entire machine, disable interrupts. This is a | 3 | /* "Bogolock": stop the entire machine, disable interrupts. This is a |
4 | very heavy lock, which is equivalent to grabbing every spinlock | 4 | very heavy lock, which is equivalent to grabbing every spinlock |
5 | (and more). So the "read" side to such a lock is anything which | 5 | (and more). So the "read" side to such a lock is anything which |
6 | diables preeempt. */ | 6 | disables preeempt. */ |
7 | #include <linux/cpu.h> | 7 | #include <linux/cpu.h> |
8 | #include <linux/cpumask.h> | 8 | #include <linux/cpumask.h> |
9 | #include <asm/system.h> | 9 | #include <asm/system.h> |
10 | 10 | ||
11 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) | 11 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) |
12 | 12 | ||
13 | /* Deprecated, but useful for transition. */ | ||
14 | #define ALL_CPUS ~0U | ||
15 | |||
16 | /** | 13 | /** |
17 | * stop_machine: freeze the machine on all CPUs and run this function | 14 | * stop_machine: freeze the machine on all CPUs and run this function |
18 | * @fn: the function to run | 15 | * @fn: the function to run |
@@ -50,18 +47,4 @@ static inline int stop_machine(int (*fn)(void *), void *data, | |||
50 | return ret; | 47 | return ret; |
51 | } | 48 | } |
52 | #endif /* CONFIG_SMP */ | 49 | #endif /* CONFIG_SMP */ |
53 | |||
54 | static inline int __deprecated stop_machine_run(int (*fn)(void *), void *data, | ||
55 | unsigned int cpu) | ||
56 | { | ||
57 | /* If they don't care which cpu fn runs on, just pick one. */ | ||
58 | if (cpu == NR_CPUS) | ||
59 | return stop_machine(fn, data, NULL); | ||
60 | else if (cpu == ~0U) | ||
61 | return stop_machine(fn, data, &cpu_possible_map); | ||
62 | else { | ||
63 | cpumask_t cpus = cpumask_of_cpu(cpu); | ||
64 | return stop_machine(fn, data, &cpus); | ||
65 | } | ||
66 | } | ||
67 | #endif /* _LINUX_STOP_MACHINE */ | 50 | #endif /* _LINUX_STOP_MACHINE */ |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index b1d2cfea89c5..e5569625d2a5 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -217,6 +217,14 @@ static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc) | |||
217 | return qdisc_lock(root); | 217 | return qdisc_lock(root); |
218 | } | 218 | } |
219 | 219 | ||
220 | static inline spinlock_t *qdisc_root_sleeping_lock(struct Qdisc *qdisc) | ||
221 | { | ||
222 | struct Qdisc *root = qdisc_root_sleeping(qdisc); | ||
223 | |||
224 | ASSERT_RTNL(); | ||
225 | return qdisc_lock(root); | ||
226 | } | ||
227 | |||
220 | static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) | 228 | static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) |
221 | { | 229 | { |
222 | return qdisc->dev_queue->dev; | 230 | return qdisc->dev_queue->dev; |
@@ -224,12 +232,12 @@ static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) | |||
224 | 232 | ||
225 | static inline void sch_tree_lock(struct Qdisc *q) | 233 | static inline void sch_tree_lock(struct Qdisc *q) |
226 | { | 234 | { |
227 | spin_lock_bh(qdisc_root_lock(q)); | 235 | spin_lock_bh(qdisc_root_sleeping_lock(q)); |
228 | } | 236 | } |
229 | 237 | ||
230 | static inline void sch_tree_unlock(struct Qdisc *q) | 238 | static inline void sch_tree_unlock(struct Qdisc *q) |
231 | { | 239 | { |
232 | spin_unlock_bh(qdisc_root_lock(q)); | 240 | spin_unlock_bh(qdisc_root_sleeping_lock(q)); |
233 | } | 241 | } |
234 | 242 | ||
235 | #define tcf_tree_lock(tp) sch_tree_lock((tp)->q) | 243 | #define tcf_tree_lock(tp) sch_tree_lock((tp)->q) |