diff options
| author | David Vrabel <david.vrabel@citrix.com> | 2014-04-07 08:52:12 -0400 |
|---|---|---|
| committer | David Vrabel <david.vrabel@citrix.com> | 2014-04-07 08:52:12 -0400 |
| commit | 2c5cb2770392fb9c5d8518688c8bc61986d70dc6 (patch) | |
| tree | b19210e709de6ee0d22b67ef605a569500cf1a18 /include/linux | |
| parent | cd979883b9ede90643e019f33cb317933eb867b4 (diff) | |
| parent | 683b6c6f82a60fabf47012581c2cfbf1b037ab95 (diff) | |
Merge commit '683b6c6f82a60fabf47012581c2cfbf1b037ab95' into stable/for-linus-3.15
This merge of the irq-core-for-linus branch broke the ARM build when
Xen is enabled.
Conflicts:
drivers/xen/events/events_base.c
Diffstat (limited to 'include/linux')
59 files changed, 826 insertions, 306 deletions
diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h index 73a25005d88a..1f16d502600c 100644 --- a/include/linux/ahci_platform.h +++ b/include/linux/ahci_platform.h | |||
| @@ -19,15 +19,37 @@ | |||
| 19 | 19 | ||
| 20 | struct device; | 20 | struct device; |
| 21 | struct ata_port_info; | 21 | struct ata_port_info; |
| 22 | struct ahci_host_priv; | ||
| 23 | struct platform_device; | ||
| 22 | 24 | ||
| 25 | /* | ||
| 26 | * Note ahci_platform_data is deprecated, it is only kept around for use | ||
| 27 | * by the old da850 and spear13xx ahci code. | ||
| 28 | * New drivers should instead declare their own platform_driver struct, and | ||
| 29 | * use ahci_platform* functions in their own probe, suspend and resume methods. | ||
| 30 | */ | ||
| 23 | struct ahci_platform_data { | 31 | struct ahci_platform_data { |
| 24 | int (*init)(struct device *dev, void __iomem *addr); | 32 | int (*init)(struct device *dev, void __iomem *addr); |
| 25 | void (*exit)(struct device *dev); | 33 | void (*exit)(struct device *dev); |
| 26 | int (*suspend)(struct device *dev); | 34 | int (*suspend)(struct device *dev); |
| 27 | int (*resume)(struct device *dev); | 35 | int (*resume)(struct device *dev); |
| 28 | const struct ata_port_info *ata_port_info; | ||
| 29 | unsigned int force_port_map; | ||
| 30 | unsigned int mask_port_map; | ||
| 31 | }; | 36 | }; |
| 32 | 37 | ||
| 38 | int ahci_platform_enable_clks(struct ahci_host_priv *hpriv); | ||
| 39 | void ahci_platform_disable_clks(struct ahci_host_priv *hpriv); | ||
| 40 | int ahci_platform_enable_resources(struct ahci_host_priv *hpriv); | ||
| 41 | void ahci_platform_disable_resources(struct ahci_host_priv *hpriv); | ||
| 42 | struct ahci_host_priv *ahci_platform_get_resources( | ||
| 43 | struct platform_device *pdev); | ||
| 44 | int ahci_platform_init_host(struct platform_device *pdev, | ||
| 45 | struct ahci_host_priv *hpriv, | ||
| 46 | const struct ata_port_info *pi_template, | ||
| 47 | unsigned int force_port_map, | ||
| 48 | unsigned int mask_port_map); | ||
| 49 | |||
| 50 | int ahci_platform_suspend_host(struct device *dev); | ||
| 51 | int ahci_platform_resume_host(struct device *dev); | ||
| 52 | int ahci_platform_suspend(struct device *dev); | ||
| 53 | int ahci_platform_resume(struct device *dev); | ||
| 54 | |||
| 33 | #endif /* _AHCI_PLATFORM_H */ | 55 | #endif /* _AHCI_PLATFORM_H */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index aa865a9a4c4f..ec1464df4c60 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -43,6 +43,7 @@ struct mq_attr; | |||
| 43 | struct mqstat; | 43 | struct mqstat; |
| 44 | struct audit_watch; | 44 | struct audit_watch; |
| 45 | struct audit_tree; | 45 | struct audit_tree; |
| 46 | struct sk_buff; | ||
| 46 | 47 | ||
| 47 | struct audit_krule { | 48 | struct audit_krule { |
| 48 | int vers_ops; | 49 | int vers_ops; |
| @@ -463,7 +464,7 @@ extern int audit_filter_user(int type); | |||
| 463 | extern int audit_filter_type(int type); | 464 | extern int audit_filter_type(int type); |
| 464 | extern int audit_rule_change(int type, __u32 portid, int seq, | 465 | extern int audit_rule_change(int type, __u32 portid, int seq, |
| 465 | void *data, size_t datasz); | 466 | void *data, size_t datasz); |
| 466 | extern int audit_list_rules_send(__u32 portid, int seq); | 467 | extern int audit_list_rules_send(struct sk_buff *request_skb, int seq); |
| 467 | 468 | ||
| 468 | extern u32 audit_enabled; | 469 | extern u32 audit_enabled; |
| 469 | #else /* CONFIG_AUDIT */ | 470 | #else /* CONFIG_AUDIT */ |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index abc9ca778456..be5fd38bd5a0 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -196,6 +196,21 @@ static inline unsigned long __ffs64(u64 word) | |||
| 196 | 196 | ||
| 197 | #ifdef __KERNEL__ | 197 | #ifdef __KERNEL__ |
| 198 | 198 | ||
| 199 | #ifndef set_mask_bits | ||
| 200 | #define set_mask_bits(ptr, _mask, _bits) \ | ||
| 201 | ({ \ | ||
| 202 | const typeof(*ptr) mask = (_mask), bits = (_bits); \ | ||
| 203 | typeof(*ptr) old, new; \ | ||
| 204 | \ | ||
| 205 | do { \ | ||
| 206 | old = ACCESS_ONCE(*ptr); \ | ||
| 207 | new = (old & ~mask) | bits; \ | ||
| 208 | } while (cmpxchg(ptr, old, new) != old); \ | ||
| 209 | \ | ||
| 210 | new; \ | ||
| 211 | }) | ||
| 212 | #endif | ||
| 213 | |||
| 199 | #ifndef find_last_bit | 214 | #ifndef find_last_bit |
| 200 | /** | 215 | /** |
| 201 | * find_last_bit - find the last set bit in a memory region | 216 | * find_last_bit - find the last set bit in a memory region |
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 18ba8a627f46..2ff2e8d982be 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
| @@ -121,8 +121,7 @@ void blk_mq_init_commands(struct request_queue *, void (*init)(void *data, struc | |||
| 121 | 121 | ||
| 122 | void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule); | 122 | void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule); |
| 123 | 123 | ||
| 124 | void blk_mq_insert_request(struct request_queue *, struct request *, | 124 | void blk_mq_insert_request(struct request *, bool, bool, bool); |
| 125 | bool, bool); | ||
| 126 | void blk_mq_run_queues(struct request_queue *q, bool async); | 125 | void blk_mq_run_queues(struct request_queue *q, bool async); |
| 127 | void blk_mq_free_request(struct request *rq); | 126 | void blk_mq_free_request(struct request *rq); |
| 128 | bool blk_mq_can_queue(struct blk_mq_hw_ctx *); | 127 | bool blk_mq_can_queue(struct blk_mq_hw_ctx *); |
| @@ -134,7 +133,13 @@ struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_ind | |||
| 134 | struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_reg *, unsigned int); | 133 | struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_reg *, unsigned int); |
| 135 | void blk_mq_free_single_hw_queue(struct blk_mq_hw_ctx *, unsigned int); | 134 | void blk_mq_free_single_hw_queue(struct blk_mq_hw_ctx *, unsigned int); |
| 136 | 135 | ||
| 137 | void blk_mq_end_io(struct request *rq, int error); | 136 | bool blk_mq_end_io_partial(struct request *rq, int error, |
| 137 | unsigned int nr_bytes); | ||
| 138 | static inline void blk_mq_end_io(struct request *rq, int error) | ||
| 139 | { | ||
| 140 | bool done = !blk_mq_end_io_partial(rq, error, blk_rq_bytes(rq)); | ||
| 141 | BUG_ON(!done); | ||
| 142 | } | ||
| 138 | 143 | ||
| 139 | void blk_mq_complete_request(struct request *rq); | 144 | void blk_mq_complete_request(struct request *rq); |
| 140 | 145 | ||
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index 092b64168d7f..4a21a872dbbd 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h | |||
| @@ -245,6 +245,10 @@ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate, | |||
| 245 | void omap2_init_clk_clkdm(struct clk_hw *clk); | 245 | void omap2_init_clk_clkdm(struct clk_hw *clk); |
| 246 | unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw, | 246 | unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw, |
| 247 | unsigned long parent_rate); | 247 | unsigned long parent_rate); |
| 248 | int omap3_clkoutx2_set_rate(struct clk_hw *hw, unsigned long rate, | ||
| 249 | unsigned long parent_rate); | ||
| 250 | long omap3_clkoutx2_round_rate(struct clk_hw *hw, unsigned long rate, | ||
| 251 | unsigned long *prate); | ||
| 248 | int omap2_clkops_enable_clkdm(struct clk_hw *hw); | 252 | int omap2_clkops_enable_clkdm(struct clk_hw *hw); |
| 249 | void omap2_clkops_disable_clkdm(struct clk_hw *hw); | 253 | void omap2_clkops_disable_clkdm(struct clk_hw *hw); |
| 250 | int omap2_clk_disable_autoidle_all(void); | 254 | int omap2_clk_disable_autoidle_all(void); |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 493aa021c7a9..2e4cb67f6e56 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
| @@ -62,6 +62,11 @@ enum clock_event_mode { | |||
| 62 | #define CLOCK_EVT_FEAT_DYNIRQ 0x000020 | 62 | #define CLOCK_EVT_FEAT_DYNIRQ 0x000020 |
| 63 | #define CLOCK_EVT_FEAT_PERCPU 0x000040 | 63 | #define CLOCK_EVT_FEAT_PERCPU 0x000040 |
| 64 | 64 | ||
| 65 | /* | ||
| 66 | * Clockevent device is based on a hrtimer for broadcast | ||
| 67 | */ | ||
| 68 | #define CLOCK_EVT_FEAT_HRTIMER 0x000080 | ||
| 69 | |||
| 65 | /** | 70 | /** |
| 66 | * struct clock_event_device - clock event device descriptor | 71 | * struct clock_event_device - clock event device descriptor |
| 67 | * @event_handler: Assigned by the framework to be called by the low | 72 | * @event_handler: Assigned by the framework to be called by the low |
| @@ -83,6 +88,7 @@ enum clock_event_mode { | |||
| 83 | * @name: ptr to clock event name | 88 | * @name: ptr to clock event name |
| 84 | * @rating: variable to rate clock event devices | 89 | * @rating: variable to rate clock event devices |
| 85 | * @irq: IRQ number (only for non CPU local devices) | 90 | * @irq: IRQ number (only for non CPU local devices) |
| 91 | * @bound_on: Bound on CPU | ||
| 86 | * @cpumask: cpumask to indicate for which CPUs this device works | 92 | * @cpumask: cpumask to indicate for which CPUs this device works |
| 87 | * @list: list head for the management code | 93 | * @list: list head for the management code |
| 88 | * @owner: module reference | 94 | * @owner: module reference |
| @@ -113,6 +119,7 @@ struct clock_event_device { | |||
| 113 | const char *name; | 119 | const char *name; |
| 114 | int rating; | 120 | int rating; |
| 115 | int irq; | 121 | int irq; |
| 122 | int bound_on; | ||
| 116 | const struct cpumask *cpumask; | 123 | const struct cpumask *cpumask; |
| 117 | struct list_head list; | 124 | struct list_head list; |
| 118 | struct module *owner; | 125 | struct module *owner; |
| @@ -180,15 +187,17 @@ extern int tick_receive_broadcast(void); | |||
| 180 | #endif | 187 | #endif |
| 181 | 188 | ||
| 182 | #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT) | 189 | #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT) |
| 190 | extern void tick_setup_hrtimer_broadcast(void); | ||
| 183 | extern int tick_check_broadcast_expired(void); | 191 | extern int tick_check_broadcast_expired(void); |
| 184 | #else | 192 | #else |
| 185 | static inline int tick_check_broadcast_expired(void) { return 0; } | 193 | static inline int tick_check_broadcast_expired(void) { return 0; } |
| 194 | static inline void tick_setup_hrtimer_broadcast(void) {}; | ||
| 186 | #endif | 195 | #endif |
| 187 | 196 | ||
| 188 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 197 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
| 189 | extern void clockevents_notify(unsigned long reason, void *arg); | 198 | extern int clockevents_notify(unsigned long reason, void *arg); |
| 190 | #else | 199 | #else |
| 191 | static inline void clockevents_notify(unsigned long reason, void *arg) {} | 200 | static inline int clockevents_notify(unsigned long reason, void *arg) { return 0; } |
| 192 | #endif | 201 | #endif |
| 193 | 202 | ||
| 194 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ | 203 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ |
| @@ -196,8 +205,9 @@ static inline void clockevents_notify(unsigned long reason, void *arg) {} | |||
| 196 | static inline void clockevents_suspend(void) {} | 205 | static inline void clockevents_suspend(void) {} |
| 197 | static inline void clockevents_resume(void) {} | 206 | static inline void clockevents_resume(void) {} |
| 198 | 207 | ||
| 199 | static inline void clockevents_notify(unsigned long reason, void *arg) {} | 208 | static inline int clockevents_notify(unsigned long reason, void *arg) { return 0; } |
| 200 | static inline int tick_check_broadcast_expired(void) { return 0; } | 209 | static inline int tick_check_broadcast_expired(void) { return 0; } |
| 210 | static inline void tick_setup_hrtimer_broadcast(void) {}; | ||
| 201 | 211 | ||
| 202 | #endif | 212 | #endif |
| 203 | 213 | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index 3f448c65511b..01c0aa57ccec 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/if.h> | 14 | #include <linux/if.h> |
| 15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
| 16 | #include <linux/aio_abi.h> /* for aio_context_t */ | 16 | #include <linux/aio_abi.h> /* for aio_context_t */ |
| 17 | #include <linux/unistd.h> | ||
| 17 | 18 | ||
| 18 | #include <asm/compat.h> | 19 | #include <asm/compat.h> |
| 19 | #include <asm/siginfo.h> | 20 | #include <asm/siginfo.h> |
| @@ -27,6 +28,9 @@ | |||
| 27 | #define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) | 28 | #define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) |
| 28 | #endif | 29 | #endif |
| 29 | 30 | ||
| 31 | #define COMPAT_SYSCALL_DEFINE0(name) \ | ||
| 32 | asmlinkage long compat_sys_##name(void) | ||
| 33 | |||
| 30 | #define COMPAT_SYSCALL_DEFINE1(name, ...) \ | 34 | #define COMPAT_SYSCALL_DEFINE1(name, ...) \ |
| 31 | COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) | 35 | COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) |
| 32 | #define COMPAT_SYSCALL_DEFINE2(name, ...) \ | 36 | #define COMPAT_SYSCALL_DEFINE2(name, ...) \ |
| @@ -68,6 +72,8 @@ typedef struct compat_sigaltstack { | |||
| 68 | typedef __compat_uid32_t compat_uid_t; | 72 | typedef __compat_uid32_t compat_uid_t; |
| 69 | typedef __compat_gid32_t compat_gid_t; | 73 | typedef __compat_gid32_t compat_gid_t; |
| 70 | 74 | ||
| 75 | typedef compat_ulong_t compat_aio_context_t; | ||
| 76 | |||
| 71 | struct compat_sel_arg_struct; | 77 | struct compat_sel_arg_struct; |
| 72 | struct rusage; | 78 | struct rusage; |
| 73 | 79 | ||
| @@ -318,7 +324,7 @@ asmlinkage long compat_sys_semctl(int semid, int semnum, int cmd, int arg); | |||
| 318 | asmlinkage long compat_sys_msgsnd(int msqid, compat_uptr_t msgp, | 324 | asmlinkage long compat_sys_msgsnd(int msqid, compat_uptr_t msgp, |
| 319 | compat_ssize_t msgsz, int msgflg); | 325 | compat_ssize_t msgsz, int msgflg); |
| 320 | asmlinkage long compat_sys_msgrcv(int msqid, compat_uptr_t msgp, | 326 | asmlinkage long compat_sys_msgrcv(int msqid, compat_uptr_t msgp, |
| 321 | compat_ssize_t msgsz, long msgtyp, int msgflg); | 327 | compat_ssize_t msgsz, compat_long_t msgtyp, int msgflg); |
| 322 | long compat_sys_msgctl(int first, int second, void __user *uptr); | 328 | long compat_sys_msgctl(int first, int second, void __user *uptr); |
| 323 | long compat_sys_shmctl(int first, int second, void __user *uptr); | 329 | long compat_sys_shmctl(int first, int second, void __user *uptr); |
| 324 | long compat_sys_semtimedop(int semid, struct sembuf __user *tsems, | 330 | long compat_sys_semtimedop(int semid, struct sembuf __user *tsems, |
| @@ -337,6 +343,19 @@ asmlinkage ssize_t compat_sys_preadv(compat_ulong_t fd, | |||
| 337 | asmlinkage ssize_t compat_sys_pwritev(compat_ulong_t fd, | 343 | asmlinkage ssize_t compat_sys_pwritev(compat_ulong_t fd, |
| 338 | const struct compat_iovec __user *vec, | 344 | const struct compat_iovec __user *vec, |
| 339 | compat_ulong_t vlen, u32 pos_low, u32 pos_high); | 345 | compat_ulong_t vlen, u32 pos_low, u32 pos_high); |
| 346 | |||
| 347 | #ifdef __ARCH_WANT_COMPAT_SYS_PREADV64 | ||
| 348 | asmlinkage long compat_sys_preadv64(unsigned long fd, | ||
| 349 | const struct compat_iovec __user *vec, | ||
| 350 | unsigned long vlen, loff_t pos); | ||
| 351 | #endif | ||
| 352 | |||
| 353 | #ifdef __ARCH_WANT_COMPAT_SYS_PWRITEV64 | ||
| 354 | asmlinkage long compat_sys_pwritev64(unsigned long fd, | ||
| 355 | const struct compat_iovec __user *vec, | ||
| 356 | unsigned long vlen, loff_t pos); | ||
| 357 | #endif | ||
| 358 | |||
| 340 | asmlinkage long compat_sys_lseek(unsigned int, compat_off_t, unsigned int); | 359 | asmlinkage long compat_sys_lseek(unsigned int, compat_off_t, unsigned int); |
| 341 | 360 | ||
| 342 | asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, | 361 | asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, |
| @@ -451,7 +470,7 @@ asmlinkage long compat_sys_timerfd_settime(int ufd, int flags, | |||
| 451 | asmlinkage long compat_sys_timerfd_gettime(int ufd, | 470 | asmlinkage long compat_sys_timerfd_gettime(int ufd, |
| 452 | struct compat_itimerspec __user *otmr); | 471 | struct compat_itimerspec __user *otmr); |
| 453 | 472 | ||
| 454 | asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page, | 473 | asmlinkage long compat_sys_move_pages(pid_t pid, compat_ulong_t nr_pages, |
| 455 | __u32 __user *pages, | 474 | __u32 __user *pages, |
| 456 | const int __user *nodes, | 475 | const int __user *nodes, |
| 457 | int __user *status, | 476 | int __user *status, |
| @@ -481,20 +500,20 @@ asmlinkage long compat_sys_statfs64(const char __user *pathname, | |||
| 481 | asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, | 500 | asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, |
| 482 | struct compat_statfs64 __user *buf); | 501 | struct compat_statfs64 __user *buf); |
| 483 | asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd, | 502 | asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd, |
| 484 | unsigned long arg); | 503 | compat_ulong_t arg); |
| 485 | asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd, | 504 | asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd, |
| 486 | unsigned long arg); | 505 | compat_ulong_t arg); |
| 487 | asmlinkage long compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p); | 506 | asmlinkage long compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p); |
| 488 | asmlinkage long compat_sys_io_getevents(aio_context_t ctx_id, | 507 | asmlinkage long compat_sys_io_getevents(compat_aio_context_t ctx_id, |
| 489 | unsigned long min_nr, | 508 | compat_long_t min_nr, |
| 490 | unsigned long nr, | 509 | compat_long_t nr, |
| 491 | struct io_event __user *events, | 510 | struct io_event __user *events, |
| 492 | struct compat_timespec __user *timeout); | 511 | struct compat_timespec __user *timeout); |
| 493 | asmlinkage long compat_sys_io_submit(aio_context_t ctx_id, int nr, | 512 | asmlinkage long compat_sys_io_submit(compat_aio_context_t ctx_id, int nr, |
| 494 | u32 __user *iocb); | 513 | u32 __user *iocb); |
| 495 | asmlinkage long compat_sys_mount(const char __user *dev_name, | 514 | asmlinkage long compat_sys_mount(const char __user *dev_name, |
| 496 | const char __user *dir_name, | 515 | const char __user *dir_name, |
| 497 | const char __user *type, unsigned long flags, | 516 | const char __user *type, compat_ulong_t flags, |
| 498 | const void __user *data); | 517 | const void __user *data); |
| 499 | asmlinkage long compat_sys_old_readdir(unsigned int fd, | 518 | asmlinkage long compat_sys_old_readdir(unsigned int fd, |
| 500 | struct compat_old_linux_dirent __user *, | 519 | struct compat_old_linux_dirent __user *, |
| @@ -502,9 +521,11 @@ asmlinkage long compat_sys_old_readdir(unsigned int fd, | |||
| 502 | asmlinkage long compat_sys_getdents(unsigned int fd, | 521 | asmlinkage long compat_sys_getdents(unsigned int fd, |
| 503 | struct compat_linux_dirent __user *dirent, | 522 | struct compat_linux_dirent __user *dirent, |
| 504 | unsigned int count); | 523 | unsigned int count); |
| 524 | #ifdef __ARCH_WANT_COMPAT_SYS_GETDENTS64 | ||
| 505 | asmlinkage long compat_sys_getdents64(unsigned int fd, | 525 | asmlinkage long compat_sys_getdents64(unsigned int fd, |
| 506 | struct linux_dirent64 __user *dirent, | 526 | struct linux_dirent64 __user *dirent, |
| 507 | unsigned int count); | 527 | unsigned int count); |
| 528 | #endif | ||
| 508 | asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, | 529 | asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, |
| 509 | unsigned int nr_segs, unsigned int flags); | 530 | unsigned int nr_segs, unsigned int flags); |
| 510 | asmlinkage long compat_sys_open(const char __user *filename, int flags, | 531 | asmlinkage long compat_sys_open(const char __user *filename, int flags, |
| @@ -549,9 +570,9 @@ asmlinkage long compat_sys_sendmmsg(int fd, struct compat_mmsghdr __user *mmsg, | |||
| 549 | unsigned vlen, unsigned int flags); | 570 | unsigned vlen, unsigned int flags); |
| 550 | asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg, | 571 | asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg, |
| 551 | unsigned int flags); | 572 | unsigned int flags); |
| 552 | asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len, | 573 | asmlinkage long compat_sys_recv(int fd, void __user *buf, compat_size_t len, |
| 553 | unsigned flags); | 574 | unsigned flags); |
| 554 | asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len, | 575 | asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, compat_size_t len, |
| 555 | unsigned flags, struct sockaddr __user *addr, | 576 | unsigned flags, struct sockaddr __user *addr, |
| 556 | int __user *addrlen); | 577 | int __user *addrlen); |
| 557 | asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, | 578 | asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, |
| @@ -615,16 +636,16 @@ asmlinkage long compat_sys_rt_sigqueueinfo(compat_pid_t pid, int sig, | |||
| 615 | struct compat_siginfo __user *uinfo); | 636 | struct compat_siginfo __user *uinfo); |
| 616 | asmlinkage long compat_sys_sysinfo(struct compat_sysinfo __user *info); | 637 | asmlinkage long compat_sys_sysinfo(struct compat_sysinfo __user *info); |
| 617 | asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, | 638 | asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, |
| 618 | unsigned long arg); | 639 | compat_ulong_t arg); |
| 619 | asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val, | 640 | asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val, |
| 620 | struct compat_timespec __user *utime, u32 __user *uaddr2, | 641 | struct compat_timespec __user *utime, u32 __user *uaddr2, |
| 621 | u32 val3); | 642 | u32 val3); |
| 622 | asmlinkage long compat_sys_getsockopt(int fd, int level, int optname, | 643 | asmlinkage long compat_sys_getsockopt(int fd, int level, int optname, |
| 623 | char __user *optval, int __user *optlen); | 644 | char __user *optval, int __user *optlen); |
| 624 | asmlinkage long compat_sys_kexec_load(unsigned long entry, | 645 | asmlinkage long compat_sys_kexec_load(compat_ulong_t entry, |
| 625 | unsigned long nr_segments, | 646 | compat_ulong_t nr_segments, |
| 626 | struct compat_kexec_segment __user *, | 647 | struct compat_kexec_segment __user *, |
| 627 | unsigned long flags); | 648 | compat_ulong_t flags); |
| 628 | asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes, | 649 | asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes, |
| 629 | const struct compat_mq_attr __user *u_mqstat, | 650 | const struct compat_mq_attr __user *u_mqstat, |
| 630 | struct compat_mq_attr __user *u_omqstat); | 651 | struct compat_mq_attr __user *u_omqstat); |
| @@ -635,11 +656,11 @@ asmlinkage long compat_sys_mq_open(const char __user *u_name, | |||
| 635 | struct compat_mq_attr __user *u_attr); | 656 | struct compat_mq_attr __user *u_attr); |
| 636 | asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes, | 657 | asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes, |
| 637 | const char __user *u_msg_ptr, | 658 | const char __user *u_msg_ptr, |
| 638 | size_t msg_len, unsigned int msg_prio, | 659 | compat_size_t msg_len, unsigned int msg_prio, |
| 639 | const struct compat_timespec __user *u_abs_timeout); | 660 | const struct compat_timespec __user *u_abs_timeout); |
| 640 | asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes, | 661 | asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes, |
| 641 | char __user *u_msg_ptr, | 662 | char __user *u_msg_ptr, |
| 642 | size_t msg_len, unsigned int __user *u_msg_prio, | 663 | compat_size_t msg_len, unsigned int __user *u_msg_prio, |
| 643 | const struct compat_timespec __user *u_abs_timeout); | 664 | const struct compat_timespec __user *u_abs_timeout); |
| 644 | asmlinkage long compat_sys_socketcall(int call, u32 __user *args); | 665 | asmlinkage long compat_sys_socketcall(int call, u32 __user *args); |
| 645 | asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args); | 666 | asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args); |
| @@ -654,12 +675,12 @@ extern void __user *compat_alloc_user_space(unsigned long len); | |||
| 654 | 675 | ||
| 655 | asmlinkage ssize_t compat_sys_process_vm_readv(compat_pid_t pid, | 676 | asmlinkage ssize_t compat_sys_process_vm_readv(compat_pid_t pid, |
| 656 | const struct compat_iovec __user *lvec, | 677 | const struct compat_iovec __user *lvec, |
| 657 | unsigned long liovcnt, const struct compat_iovec __user *rvec, | 678 | compat_ulong_t liovcnt, const struct compat_iovec __user *rvec, |
| 658 | unsigned long riovcnt, unsigned long flags); | 679 | compat_ulong_t riovcnt, compat_ulong_t flags); |
| 659 | asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid, | 680 | asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid, |
| 660 | const struct compat_iovec __user *lvec, | 681 | const struct compat_iovec __user *lvec, |
| 661 | unsigned long liovcnt, const struct compat_iovec __user *rvec, | 682 | compat_ulong_t liovcnt, const struct compat_iovec __user *rvec, |
| 662 | unsigned long riovcnt, unsigned long flags); | 683 | compat_ulong_t riovcnt, compat_ulong_t flags); |
| 663 | 684 | ||
| 664 | asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, | 685 | asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, |
| 665 | compat_off_t __user *offset, compat_size_t count); | 686 | compat_off_t __user *offset, compat_size_t count); |
diff --git a/include/linux/cputime.h b/include/linux/cputime.h new file mode 100644 index 000000000000..f2eb2ee535ca --- /dev/null +++ b/include/linux/cputime.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef __LINUX_CPUTIME_H | ||
| 2 | #define __LINUX_CPUTIME_H | ||
| 3 | |||
| 4 | #include <asm/cputime.h> | ||
| 5 | |||
| 6 | #ifndef cputime_to_nsecs | ||
| 7 | # define cputime_to_nsecs(__ct) \ | ||
| 8 | (cputime_to_usecs(__ct) * NSEC_PER_USEC) | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #ifndef nsecs_to_cputime | ||
| 12 | # define nsecs_to_cputime(__nsecs) \ | ||
| 13 | usecs_to_cputime((__nsecs) / NSEC_PER_USEC) | ||
| 14 | #endif | ||
| 15 | |||
| 16 | #endif /* __LINUX_CPUTIME_H */ | ||
diff --git a/include/linux/efi.h b/include/linux/efi.h index 0a819e7a60c9..6c100ff0cae4 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -153,6 +153,102 @@ typedef struct { | |||
| 153 | u8 sets_to_zero; | 153 | u8 sets_to_zero; |
| 154 | } efi_time_cap_t; | 154 | } efi_time_cap_t; |
| 155 | 155 | ||
| 156 | typedef struct { | ||
| 157 | efi_table_hdr_t hdr; | ||
| 158 | u32 raise_tpl; | ||
| 159 | u32 restore_tpl; | ||
| 160 | u32 allocate_pages; | ||
| 161 | u32 free_pages; | ||
| 162 | u32 get_memory_map; | ||
| 163 | u32 allocate_pool; | ||
| 164 | u32 free_pool; | ||
| 165 | u32 create_event; | ||
| 166 | u32 set_timer; | ||
| 167 | u32 wait_for_event; | ||
| 168 | u32 signal_event; | ||
| 169 | u32 close_event; | ||
| 170 | u32 check_event; | ||
| 171 | u32 install_protocol_interface; | ||
| 172 | u32 reinstall_protocol_interface; | ||
| 173 | u32 uninstall_protocol_interface; | ||
| 174 | u32 handle_protocol; | ||
| 175 | u32 __reserved; | ||
| 176 | u32 register_protocol_notify; | ||
| 177 | u32 locate_handle; | ||
| 178 | u32 locate_device_path; | ||
| 179 | u32 install_configuration_table; | ||
| 180 | u32 load_image; | ||
| 181 | u32 start_image; | ||
| 182 | u32 exit; | ||
| 183 | u32 unload_image; | ||
| 184 | u32 exit_boot_services; | ||
| 185 | u32 get_next_monotonic_count; | ||
| 186 | u32 stall; | ||
| 187 | u32 set_watchdog_timer; | ||
| 188 | u32 connect_controller; | ||
| 189 | u32 disconnect_controller; | ||
| 190 | u32 open_protocol; | ||
| 191 | u32 close_protocol; | ||
| 192 | u32 open_protocol_information; | ||
| 193 | u32 protocols_per_handle; | ||
| 194 | u32 locate_handle_buffer; | ||
| 195 | u32 locate_protocol; | ||
| 196 | u32 install_multiple_protocol_interfaces; | ||
| 197 | u32 uninstall_multiple_protocol_interfaces; | ||
| 198 | u32 calculate_crc32; | ||
| 199 | u32 copy_mem; | ||
| 200 | u32 set_mem; | ||
| 201 | u32 create_event_ex; | ||
| 202 | } __packed efi_boot_services_32_t; | ||
| 203 | |||
| 204 | typedef struct { | ||
| 205 | efi_table_hdr_t hdr; | ||
| 206 | u64 raise_tpl; | ||
| 207 | u64 restore_tpl; | ||
| 208 | u64 allocate_pages; | ||
| 209 | u64 free_pages; | ||
| 210 | u64 get_memory_map; | ||
| 211 | u64 allocate_pool; | ||
| 212 | u64 free_pool; | ||
| 213 | u64 create_event; | ||
| 214 | u64 set_timer; | ||
| 215 | u64 wait_for_event; | ||
| 216 | u64 signal_event; | ||
| 217 | u64 close_event; | ||
| 218 | u64 check_event; | ||
| 219 | u64 install_protocol_interface; | ||
| 220 | u64 reinstall_protocol_interface; | ||
| 221 | u64 uninstall_protocol_interface; | ||
| 222 | u64 handle_protocol; | ||
| 223 | u64 __reserved; | ||
| 224 | u64 register_protocol_notify; | ||
| 225 | u64 locate_handle; | ||
| 226 | u64 locate_device_path; | ||
| 227 | u64 install_configuration_table; | ||
| 228 | u64 load_image; | ||
| 229 | u64 start_image; | ||
| 230 | u64 exit; | ||
| 231 | u64 unload_image; | ||
| 232 | u64 exit_boot_services; | ||
| 233 | u64 get_next_monotonic_count; | ||
| 234 | u64 stall; | ||
| 235 | u64 set_watchdog_timer; | ||
| 236 | u64 connect_controller; | ||
| 237 | u64 disconnect_controller; | ||
| 238 | u64 open_protocol; | ||
| 239 | u64 close_protocol; | ||
| 240 | u64 open_protocol_information; | ||
| 241 | u64 protocols_per_handle; | ||
| 242 | u64 locate_handle_buffer; | ||
| 243 | u64 locate_protocol; | ||
| 244 | u64 install_multiple_protocol_interfaces; | ||
| 245 | u64 uninstall_multiple_protocol_interfaces; | ||
| 246 | u64 calculate_crc32; | ||
| 247 | u64 copy_mem; | ||
| 248 | u64 set_mem; | ||
| 249 | u64 create_event_ex; | ||
| 250 | } __packed efi_boot_services_64_t; | ||
| 251 | |||
| 156 | /* | 252 | /* |
| 157 | * EFI Boot Services table | 253 | * EFI Boot Services table |
| 158 | */ | 254 | */ |
| @@ -231,6 +327,15 @@ typedef enum { | |||
| 231 | EfiPciIoAttributeOperationMaximum | 327 | EfiPciIoAttributeOperationMaximum |
| 232 | } EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION; | 328 | } EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION; |
| 233 | 329 | ||
| 330 | typedef struct { | ||
| 331 | u32 read; | ||
| 332 | u32 write; | ||
| 333 | } efi_pci_io_protocol_access_32_t; | ||
| 334 | |||
| 335 | typedef struct { | ||
| 336 | u64 read; | ||
| 337 | u64 write; | ||
| 338 | } efi_pci_io_protocol_access_64_t; | ||
| 234 | 339 | ||
| 235 | typedef struct { | 340 | typedef struct { |
| 236 | void *read; | 341 | void *read; |
| @@ -238,6 +343,46 @@ typedef struct { | |||
| 238 | } efi_pci_io_protocol_access_t; | 343 | } efi_pci_io_protocol_access_t; |
| 239 | 344 | ||
| 240 | typedef struct { | 345 | typedef struct { |
| 346 | u32 poll_mem; | ||
| 347 | u32 poll_io; | ||
| 348 | efi_pci_io_protocol_access_32_t mem; | ||
| 349 | efi_pci_io_protocol_access_32_t io; | ||
| 350 | efi_pci_io_protocol_access_32_t pci; | ||
| 351 | u32 copy_mem; | ||
| 352 | u32 map; | ||
| 353 | u32 unmap; | ||
| 354 | u32 allocate_buffer; | ||
| 355 | u32 free_buffer; | ||
| 356 | u32 flush; | ||
| 357 | u32 get_location; | ||
| 358 | u32 attributes; | ||
| 359 | u32 get_bar_attributes; | ||
| 360 | u32 set_bar_attributes; | ||
| 361 | uint64_t romsize; | ||
| 362 | void *romimage; | ||
| 363 | } efi_pci_io_protocol_32; | ||
| 364 | |||
| 365 | typedef struct { | ||
| 366 | u64 poll_mem; | ||
| 367 | u64 poll_io; | ||
| 368 | efi_pci_io_protocol_access_64_t mem; | ||
| 369 | efi_pci_io_protocol_access_64_t io; | ||
| 370 | efi_pci_io_protocol_access_64_t pci; | ||
| 371 | u64 copy_mem; | ||
| 372 | u64 map; | ||
| 373 | u64 unmap; | ||
| 374 | u64 allocate_buffer; | ||
| 375 | u64 free_buffer; | ||
| 376 | u64 flush; | ||
| 377 | u64 get_location; | ||
| 378 | u64 attributes; | ||
| 379 | u64 get_bar_attributes; | ||
| 380 | u64 set_bar_attributes; | ||
| 381 | uint64_t romsize; | ||
| 382 | void *romimage; | ||
| 383 | } efi_pci_io_protocol_64; | ||
| 384 | |||
| 385 | typedef struct { | ||
| 241 | void *poll_mem; | 386 | void *poll_mem; |
| 242 | void *poll_io; | 387 | void *poll_io; |
| 243 | efi_pci_io_protocol_access_t mem; | 388 | efi_pci_io_protocol_access_t mem; |
| @@ -292,6 +437,42 @@ typedef struct { | |||
| 292 | 437 | ||
| 293 | typedef struct { | 438 | typedef struct { |
| 294 | efi_table_hdr_t hdr; | 439 | efi_table_hdr_t hdr; |
| 440 | u32 get_time; | ||
| 441 | u32 set_time; | ||
| 442 | u32 get_wakeup_time; | ||
| 443 | u32 set_wakeup_time; | ||
| 444 | u32 set_virtual_address_map; | ||
| 445 | u32 convert_pointer; | ||
| 446 | u32 get_variable; | ||
| 447 | u32 get_next_variable; | ||
| 448 | u32 set_variable; | ||
| 449 | u32 get_next_high_mono_count; | ||
| 450 | u32 reset_system; | ||
| 451 | u32 update_capsule; | ||
| 452 | u32 query_capsule_caps; | ||
| 453 | u32 query_variable_info; | ||
| 454 | } efi_runtime_services_32_t; | ||
| 455 | |||
| 456 | typedef struct { | ||
| 457 | efi_table_hdr_t hdr; | ||
| 458 | u64 get_time; | ||
| 459 | u64 set_time; | ||
| 460 | u64 get_wakeup_time; | ||
| 461 | u64 set_wakeup_time; | ||
| 462 | u64 set_virtual_address_map; | ||
| 463 | u64 convert_pointer; | ||
| 464 | u64 get_variable; | ||
| 465 | u64 get_next_variable; | ||
| 466 | u64 set_variable; | ||
| 467 | u64 get_next_high_mono_count; | ||
| 468 | u64 reset_system; | ||
| 469 | u64 update_capsule; | ||
| 470 | u64 query_capsule_caps; | ||
| 471 | u64 query_variable_info; | ||
| 472 | } efi_runtime_services_64_t; | ||
| 473 | |||
| 474 | typedef struct { | ||
| 475 | efi_table_hdr_t hdr; | ||
| 295 | void *get_time; | 476 | void *get_time; |
| 296 | void *set_time; | 477 | void *set_time; |
| 297 | void *get_wakeup_time; | 478 | void *get_wakeup_time; |
| @@ -485,6 +666,38 @@ struct efi_memory_map { | |||
| 485 | 666 | ||
| 486 | typedef struct { | 667 | typedef struct { |
| 487 | u32 revision; | 668 | u32 revision; |
| 669 | u32 parent_handle; | ||
| 670 | u32 system_table; | ||
| 671 | u32 device_handle; | ||
| 672 | u32 file_path; | ||
| 673 | u32 reserved; | ||
| 674 | u32 load_options_size; | ||
| 675 | u32 load_options; | ||
| 676 | u32 image_base; | ||
| 677 | __aligned_u64 image_size; | ||
| 678 | unsigned int image_code_type; | ||
| 679 | unsigned int image_data_type; | ||
| 680 | unsigned long unload; | ||
| 681 | } efi_loaded_image_32_t; | ||
| 682 | |||
| 683 | typedef struct { | ||
| 684 | u32 revision; | ||
| 685 | u64 parent_handle; | ||
| 686 | u64 system_table; | ||
| 687 | u64 device_handle; | ||
| 688 | u64 file_path; | ||
| 689 | u64 reserved; | ||
| 690 | u32 load_options_size; | ||
| 691 | u64 load_options; | ||
| 692 | u64 image_base; | ||
| 693 | __aligned_u64 image_size; | ||
| 694 | unsigned int image_code_type; | ||
| 695 | unsigned int image_data_type; | ||
| 696 | unsigned long unload; | ||
| 697 | } efi_loaded_image_64_t; | ||
| 698 | |||
| 699 | typedef struct { | ||
| 700 | u32 revision; | ||
| 488 | void *parent_handle; | 701 | void *parent_handle; |
| 489 | efi_system_table_t *system_table; | 702 | efi_system_table_t *system_table; |
| 490 | void *device_handle; | 703 | void *device_handle; |
| @@ -511,6 +724,34 @@ typedef struct { | |||
| 511 | efi_char16_t filename[1]; | 724 | efi_char16_t filename[1]; |
| 512 | } efi_file_info_t; | 725 | } efi_file_info_t; |
| 513 | 726 | ||
| 727 | typedef struct { | ||
| 728 | u64 revision; | ||
| 729 | u32 open; | ||
| 730 | u32 close; | ||
| 731 | u32 delete; | ||
| 732 | u32 read; | ||
| 733 | u32 write; | ||
| 734 | u32 get_position; | ||
| 735 | u32 set_position; | ||
| 736 | u32 get_info; | ||
| 737 | u32 set_info; | ||
| 738 | u32 flush; | ||
| 739 | } efi_file_handle_32_t; | ||
| 740 | |||
| 741 | typedef struct { | ||
| 742 | u64 revision; | ||
| 743 | u64 open; | ||
| 744 | u64 close; | ||
| 745 | u64 delete; | ||
| 746 | u64 read; | ||
| 747 | u64 write; | ||
| 748 | u64 get_position; | ||
| 749 | u64 set_position; | ||
| 750 | u64 get_info; | ||
| 751 | u64 set_info; | ||
| 752 | u64 flush; | ||
| 753 | } efi_file_handle_64_t; | ||
| 754 | |||
| 514 | typedef struct _efi_file_handle { | 755 | typedef struct _efi_file_handle { |
| 515 | u64 revision; | 756 | u64 revision; |
| 516 | efi_status_t (*open)(struct _efi_file_handle *, | 757 | efi_status_t (*open)(struct _efi_file_handle *, |
| @@ -573,6 +814,7 @@ extern struct efi { | |||
| 573 | efi_reset_system_t *reset_system; | 814 | efi_reset_system_t *reset_system; |
| 574 | efi_set_virtual_address_map_t *set_virtual_address_map; | 815 | efi_set_virtual_address_map_t *set_virtual_address_map; |
| 575 | struct efi_memory_map *memmap; | 816 | struct efi_memory_map *memmap; |
| 817 | unsigned long flags; | ||
| 576 | } efi; | 818 | } efi; |
| 577 | 819 | ||
| 578 | static inline int | 820 | static inline int |
| @@ -659,18 +901,17 @@ extern int __init efi_setup_pcdp_console(char *); | |||
| 659 | #define EFI_ARCH_1 6 /* First arch-specific bit */ | 901 | #define EFI_ARCH_1 6 /* First arch-specific bit */ |
| 660 | 902 | ||
| 661 | #ifdef CONFIG_EFI | 903 | #ifdef CONFIG_EFI |
| 662 | # ifdef CONFIG_X86 | 904 | /* |
| 663 | extern int efi_enabled(int facility); | 905 | * Test whether the above EFI_* bits are enabled. |
| 664 | # else | 906 | */ |
| 665 | static inline int efi_enabled(int facility) | 907 | static inline bool efi_enabled(int feature) |
| 666 | { | 908 | { |
| 667 | return 1; | 909 | return test_bit(feature, &efi.flags) != 0; |
| 668 | } | 910 | } |
| 669 | # endif | ||
| 670 | #else | 911 | #else |
| 671 | static inline int efi_enabled(int facility) | 912 | static inline bool efi_enabled(int feature) |
| 672 | { | 913 | { |
| 673 | return 0; | 914 | return false; |
| 674 | } | 915 | } |
| 675 | #endif | 916 | #endif |
| 676 | 917 | ||
| @@ -809,6 +1050,17 @@ struct efivar_entry { | |||
| 809 | bool deleting; | 1050 | bool deleting; |
| 810 | }; | 1051 | }; |
| 811 | 1052 | ||
| 1053 | struct efi_simple_text_output_protocol_32 { | ||
| 1054 | u32 reset; | ||
| 1055 | u32 output_string; | ||
| 1056 | u32 test_string; | ||
| 1057 | }; | ||
| 1058 | |||
| 1059 | struct efi_simple_text_output_protocol_64 { | ||
| 1060 | u64 reset; | ||
| 1061 | u64 output_string; | ||
| 1062 | u64 test_string; | ||
| 1063 | }; | ||
| 812 | 1064 | ||
| 813 | struct efi_simple_text_output_protocol { | 1065 | struct efi_simple_text_output_protocol { |
| 814 | void *reset; | 1066 | void *reset; |
diff --git a/include/linux/file.h b/include/linux/file.h index cbacf4faf447..4d69123377a2 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
| @@ -28,33 +28,36 @@ static inline void fput_light(struct file *file, int fput_needed) | |||
| 28 | 28 | ||
| 29 | struct fd { | 29 | struct fd { |
| 30 | struct file *file; | 30 | struct file *file; |
| 31 | int need_put; | 31 | unsigned int flags; |
| 32 | }; | 32 | }; |
| 33 | #define FDPUT_FPUT 1 | ||
| 34 | #define FDPUT_POS_UNLOCK 2 | ||
| 33 | 35 | ||
| 34 | static inline void fdput(struct fd fd) | 36 | static inline void fdput(struct fd fd) |
| 35 | { | 37 | { |
| 36 | if (fd.need_put) | 38 | if (fd.flags & FDPUT_FPUT) |
| 37 | fput(fd.file); | 39 | fput(fd.file); |
| 38 | } | 40 | } |
| 39 | 41 | ||
| 40 | extern struct file *fget(unsigned int fd); | 42 | extern struct file *fget(unsigned int fd); |
| 41 | extern struct file *fget_light(unsigned int fd, int *fput_needed); | 43 | extern struct file *fget_raw(unsigned int fd); |
| 44 | extern unsigned long __fdget(unsigned int fd); | ||
| 45 | extern unsigned long __fdget_raw(unsigned int fd); | ||
| 46 | extern unsigned long __fdget_pos(unsigned int fd); | ||
| 42 | 47 | ||
| 43 | static inline struct fd fdget(unsigned int fd) | 48 | static inline struct fd __to_fd(unsigned long v) |
| 44 | { | 49 | { |
| 45 | int b; | 50 | return (struct fd){(struct file *)(v & ~3),v & 3}; |
| 46 | struct file *f = fget_light(fd, &b); | ||
| 47 | return (struct fd){f,b}; | ||
| 48 | } | 51 | } |
| 49 | 52 | ||
| 50 | extern struct file *fget_raw(unsigned int fd); | 53 | static inline struct fd fdget(unsigned int fd) |
| 51 | extern struct file *fget_raw_light(unsigned int fd, int *fput_needed); | 54 | { |
| 55 | return __to_fd(__fdget(fd)); | ||
| 56 | } | ||
| 52 | 57 | ||
| 53 | static inline struct fd fdget_raw(unsigned int fd) | 58 | static inline struct fd fdget_raw(unsigned int fd) |
| 54 | { | 59 | { |
| 55 | int b; | 60 | return __to_fd(__fdget_raw(fd)); |
| 56 | struct file *f = fget_raw_light(fd, &b); | ||
| 57 | return (struct fd){f,b}; | ||
| 58 | } | 61 | } |
| 59 | 62 | ||
| 60 | extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); | 63 | extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 5d7782e42b8f..c3683bdf28fe 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -200,6 +200,7 @@ struct fw_device { | |||
| 200 | unsigned irmc:1; | 200 | unsigned irmc:1; |
| 201 | unsigned bc_implemented:2; | 201 | unsigned bc_implemented:2; |
| 202 | 202 | ||
| 203 | work_func_t workfn; | ||
| 203 | struct delayed_work work; | 204 | struct delayed_work work; |
| 204 | struct fw_attribute_group attribute_group; | 205 | struct fw_attribute_group attribute_group; |
| 205 | }; | 206 | }; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 60829565e552..23b2a35d712e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -123,6 +123,9 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | |||
| 123 | /* File is opened with O_PATH; almost nothing can be done with it */ | 123 | /* File is opened with O_PATH; almost nothing can be done with it */ |
| 124 | #define FMODE_PATH ((__force fmode_t)0x4000) | 124 | #define FMODE_PATH ((__force fmode_t)0x4000) |
| 125 | 125 | ||
| 126 | /* File needs atomic accesses to f_pos */ | ||
| 127 | #define FMODE_ATOMIC_POS ((__force fmode_t)0x8000) | ||
| 128 | |||
| 126 | /* File was opened by fanotify and shouldn't generate fanotify events */ | 129 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
| 127 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | 130 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) |
| 128 | 131 | ||
| @@ -780,13 +783,14 @@ struct file { | |||
| 780 | const struct file_operations *f_op; | 783 | const struct file_operations *f_op; |
| 781 | 784 | ||
| 782 | /* | 785 | /* |
| 783 | * Protects f_ep_links, f_flags, f_pos vs i_size in lseek SEEK_CUR. | 786 | * Protects f_ep_links, f_flags. |
| 784 | * Must not be taken from IRQ context. | 787 | * Must not be taken from IRQ context. |
| 785 | */ | 788 | */ |
| 786 | spinlock_t f_lock; | 789 | spinlock_t f_lock; |
| 787 | atomic_long_t f_count; | 790 | atomic_long_t f_count; |
| 788 | unsigned int f_flags; | 791 | unsigned int f_flags; |
| 789 | fmode_t f_mode; | 792 | fmode_t f_mode; |
| 793 | struct mutex f_pos_lock; | ||
| 790 | loff_t f_pos; | 794 | loff_t f_pos; |
| 791 | struct fown_struct f_owner; | 795 | struct fown_struct f_owner; |
| 792 | const struct cred *f_cred; | 796 | const struct cred *f_cred; |
| @@ -808,7 +812,7 @@ struct file { | |||
| 808 | #ifdef CONFIG_DEBUG_WRITECOUNT | 812 | #ifdef CONFIG_DEBUG_WRITECOUNT |
| 809 | unsigned long f_mnt_write_state; | 813 | unsigned long f_mnt_write_state; |
| 810 | #endif | 814 | #endif |
| 811 | }; | 815 | } __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ |
| 812 | 816 | ||
| 813 | struct file_handle { | 817 | struct file_handle { |
| 814 | __u32 handle_bytes; | 818 | __u32 handle_bytes; |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 3d286ff49ab0..64cf3ef50696 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -99,7 +99,7 @@ struct fsnotify_ops { | |||
| 99 | struct fsnotify_mark *inode_mark, | 99 | struct fsnotify_mark *inode_mark, |
| 100 | struct fsnotify_mark *vfsmount_mark, | 100 | struct fsnotify_mark *vfsmount_mark, |
| 101 | u32 mask, void *data, int data_type, | 101 | u32 mask, void *data, int data_type, |
| 102 | const unsigned char *file_name); | 102 | const unsigned char *file_name, u32 cookie); |
| 103 | void (*free_group_priv)(struct fsnotify_group *group); | 103 | void (*free_group_priv)(struct fsnotify_group *group); |
| 104 | void (*freeing_mark)(struct fsnotify_mark *mark, struct fsnotify_group *group); | 104 | void (*freeing_mark)(struct fsnotify_mark *mark, struct fsnotify_group *group); |
| 105 | void (*free_event)(struct fsnotify_event *event); | 105 | void (*free_event)(struct fsnotify_event *event); |
| @@ -160,7 +160,7 @@ struct fsnotify_group { | |||
| 160 | 160 | ||
| 161 | struct fasync_struct *fsn_fa; /* async notification */ | 161 | struct fasync_struct *fsn_fa; /* async notification */ |
| 162 | 162 | ||
| 163 | struct fsnotify_event overflow_event; /* Event we queue when the | 163 | struct fsnotify_event *overflow_event; /* Event we queue when the |
| 164 | * notification list is too | 164 | * notification list is too |
| 165 | * full */ | 165 | * full */ |
| 166 | 166 | ||
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 4e4cc28623ad..4cdb3a17bcb5 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -495,10 +495,6 @@ enum { | |||
| 495 | FILTER_TRACE_FN, | 495 | FILTER_TRACE_FN, |
| 496 | }; | 496 | }; |
| 497 | 497 | ||
| 498 | #define EVENT_STORAGE_SIZE 128 | ||
| 499 | extern struct mutex event_storage_mutex; | ||
| 500 | extern char event_storage[EVENT_STORAGE_SIZE]; | ||
| 501 | |||
| 502 | extern int trace_event_raw_init(struct ftrace_event_call *call); | 498 | extern int trace_event_raw_init(struct ftrace_event_call *call); |
| 503 | extern int trace_define_field(struct ftrace_event_call *call, const char *type, | 499 | extern int trace_define_field(struct ftrace_event_call *call, const char *type, |
| 504 | const char *name, int offset, int size, | 500 | const char *name, int offset, int size, |
diff --git a/include/linux/futex.h b/include/linux/futex.h index b0d95cac826e..6435f46d6e13 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
| @@ -55,7 +55,11 @@ union futex_key { | |||
| 55 | #ifdef CONFIG_FUTEX | 55 | #ifdef CONFIG_FUTEX |
| 56 | extern void exit_robust_list(struct task_struct *curr); | 56 | extern void exit_robust_list(struct task_struct *curr); |
| 57 | extern void exit_pi_state_list(struct task_struct *curr); | 57 | extern void exit_pi_state_list(struct task_struct *curr); |
| 58 | #ifdef CONFIG_HAVE_FUTEX_CMPXCHG | ||
| 59 | #define futex_cmpxchg_enabled 1 | ||
| 60 | #else | ||
| 58 | extern int futex_cmpxchg_enabled; | 61 | extern int futex_cmpxchg_enabled; |
| 62 | #endif | ||
| 59 | #else | 63 | #else |
| 60 | static inline void exit_robust_list(struct task_struct *curr) | 64 | static inline void exit_robust_list(struct task_struct *curr) |
| 61 | { | 65 | { |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 0437439bc047..39b81dc7d01a 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -123,6 +123,10 @@ struct vm_area_struct; | |||
| 123 | __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \ | 123 | __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \ |
| 124 | __GFP_NO_KSWAPD) | 124 | __GFP_NO_KSWAPD) |
| 125 | 125 | ||
| 126 | /* | ||
| 127 | * GFP_THISNODE does not perform any reclaim, you most likely want to | ||
| 128 | * use __GFP_THISNODE to allocate from a given node without fallback! | ||
| 129 | */ | ||
| 126 | #ifdef CONFIG_NUMA | 130 | #ifdef CONFIG_NUMA |
| 127 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 131 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
| 128 | #else | 132 | #else |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 12d5f972f23f..cba442ec3c66 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | extern void synchronize_irq(unsigned int irq); | 11 | extern void synchronize_irq(unsigned int irq); |
| 12 | extern void synchronize_hardirq(unsigned int irq); | ||
| 12 | 13 | ||
| 13 | #if defined(CONFIG_TINY_RCU) | 14 | #if defined(CONFIG_TINY_RCU) |
| 14 | 15 | ||
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index d19a5c2d2270..e7a8d3fa91d5 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -96,12 +96,12 @@ enum hrtimer_restart { | |||
| 96 | * @function: timer expiry callback function | 96 | * @function: timer expiry callback function |
| 97 | * @base: pointer to the timer base (per cpu and per clock) | 97 | * @base: pointer to the timer base (per cpu and per clock) |
| 98 | * @state: state information (See bit values above) | 98 | * @state: state information (See bit values above) |
| 99 | * @start_pid: timer statistics field to store the pid of the task which | ||
| 100 | * started the timer | ||
| 99 | * @start_site: timer statistics field to store the site where the timer | 101 | * @start_site: timer statistics field to store the site where the timer |
| 100 | * was started | 102 | * was started |
| 101 | * @start_comm: timer statistics field to store the name of the process which | 103 | * @start_comm: timer statistics field to store the name of the process which |
| 102 | * started the timer | 104 | * started the timer |
| 103 | * @start_pid: timer statistics field to store the pid of the task which | ||
| 104 | * started the timer | ||
| 105 | * | 105 | * |
| 106 | * The hrtimer structure must be initialized by hrtimer_init() | 106 | * The hrtimer structure must be initialized by hrtimer_init() |
| 107 | */ | 107 | */ |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index db512014e061..b826239bdce0 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
| @@ -157,46 +157,6 @@ static inline int hpage_nr_pages(struct page *page) | |||
| 157 | return HPAGE_PMD_NR; | 157 | return HPAGE_PMD_NR; |
| 158 | return 1; | 158 | return 1; |
| 159 | } | 159 | } |
| 160 | /* | ||
| 161 | * compound_trans_head() should be used instead of compound_head(), | ||
| 162 | * whenever the "page" passed as parameter could be the tail of a | ||
| 163 | * transparent hugepage that could be undergoing a | ||
| 164 | * __split_huge_page_refcount(). The page structure layout often | ||
| 165 | * changes across releases and it makes extensive use of unions. So if | ||
| 166 | * the page structure layout will change in a way that | ||
| 167 | * page->first_page gets clobbered by __split_huge_page_refcount, the | ||
| 168 | * implementation making use of smp_rmb() will be required. | ||
| 169 | * | ||
| 170 | * Currently we define compound_trans_head as compound_head, because | ||
| 171 | * page->private is in the same union with page->first_page, and | ||
| 172 | * page->private isn't clobbered. However this also means we're | ||
| 173 | * currently leaving dirt into the page->private field of anonymous | ||
| 174 | * pages resulting from a THP split, instead of setting page->private | ||
| 175 | * to zero like for every other page that has PG_private not set. But | ||
| 176 | * anonymous pages don't use page->private so this is not a problem. | ||
| 177 | */ | ||
| 178 | #if 0 | ||
| 179 | /* This will be needed if page->private will be clobbered in split_huge_page */ | ||
| 180 | static inline struct page *compound_trans_head(struct page *page) | ||
| 181 | { | ||
| 182 | if (PageTail(page)) { | ||
| 183 | struct page *head; | ||
| 184 | head = page->first_page; | ||
| 185 | smp_rmb(); | ||
| 186 | /* | ||
| 187 | * head may be a dangling pointer. | ||
| 188 | * __split_huge_page_refcount clears PageTail before | ||
| 189 | * overwriting first_page, so if PageTail is still | ||
| 190 | * there it means the head pointer isn't dangling. | ||
| 191 | */ | ||
| 192 | if (PageTail(page)) | ||
| 193 | return head; | ||
| 194 | } | ||
| 195 | return page; | ||
| 196 | } | ||
| 197 | #else | ||
| 198 | #define compound_trans_head(page) compound_head(page) | ||
| 199 | #endif | ||
| 200 | 160 | ||
| 201 | extern int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, | 161 | extern int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, |
| 202 | unsigned long addr, pmd_t pmd, pmd_t *pmdp); | 162 | unsigned long addr, pmd_t pmd, pmd_t *pmdp); |
| @@ -226,7 +186,6 @@ static inline int split_huge_page(struct page *page) | |||
| 226 | do { } while (0) | 186 | do { } while (0) |
| 227 | #define split_huge_page_pmd_mm(__mm, __address, __pmd) \ | 187 | #define split_huge_page_pmd_mm(__mm, __address, __pmd) \ |
| 228 | do { } while (0) | 188 | do { } while (0) |
| 229 | #define compound_trans_head(page) compound_head(page) | ||
| 230 | static inline int hugepage_madvise(struct vm_area_struct *vma, | 189 | static inline int hugepage_madvise(struct vm_area_struct *vma, |
| 231 | unsigned long *vm_flags, int advice) | 190 | unsigned long *vm_flags, int advice) |
| 232 | { | 191 | { |
diff --git a/include/linux/init.h b/include/linux/init.h index e1688802964f..a3ba27076342 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -163,6 +163,23 @@ extern bool initcall_debug; | |||
| 163 | 163 | ||
| 164 | #ifndef __ASSEMBLY__ | 164 | #ifndef __ASSEMBLY__ |
| 165 | 165 | ||
| 166 | #ifdef CONFIG_LTO | ||
| 167 | /* Work around a LTO gcc problem: when there is no reference to a variable | ||
| 168 | * in a module it will be moved to the end of the program. This causes | ||
| 169 | * reordering of initcalls which the kernel does not like. | ||
| 170 | * Add a dummy reference function to avoid this. The function is | ||
| 171 | * deleted by the linker. | ||
| 172 | */ | ||
| 173 | #define LTO_REFERENCE_INITCALL(x) \ | ||
| 174 | ; /* yes this is needed */ \ | ||
| 175 | static __used __exit void *reference_##x(void) \ | ||
| 176 | { \ | ||
| 177 | return &x; \ | ||
| 178 | } | ||
| 179 | #else | ||
| 180 | #define LTO_REFERENCE_INITCALL(x) | ||
| 181 | #endif | ||
| 182 | |||
| 166 | /* initcalls are now grouped by functionality into separate | 183 | /* initcalls are now grouped by functionality into separate |
| 167 | * subsections. Ordering inside the subsections is determined | 184 | * subsections. Ordering inside the subsections is determined |
| 168 | * by link order. | 185 | * by link order. |
| @@ -175,7 +192,8 @@ extern bool initcall_debug; | |||
| 175 | 192 | ||
| 176 | #define __define_initcall(fn, id) \ | 193 | #define __define_initcall(fn, id) \ |
| 177 | static initcall_t __initcall_##fn##id __used \ | 194 | static initcall_t __initcall_##fn##id __used \ |
| 178 | __attribute__((__section__(".initcall" #id ".init"))) = fn | 195 | __attribute__((__section__(".initcall" #id ".init"))) = fn; \ |
| 196 | LTO_REFERENCE_INITCALL(__initcall_##fn##id) | ||
| 179 | 197 | ||
| 180 | /* | 198 | /* |
| 181 | * Early initcalls run before initializing SMP. | 199 | * Early initcalls run before initializing SMP. |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index a2678d35b5a2..c7bfac1c4a7b 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -188,6 +188,7 @@ extern void disable_irq(unsigned int irq); | |||
| 188 | extern void disable_percpu_irq(unsigned int irq); | 188 | extern void disable_percpu_irq(unsigned int irq); |
| 189 | extern void enable_irq(unsigned int irq); | 189 | extern void enable_irq(unsigned int irq); |
| 190 | extern void enable_percpu_irq(unsigned int irq, unsigned int type); | 190 | extern void enable_percpu_irq(unsigned int irq, unsigned int type); |
| 191 | extern void irq_wake_thread(unsigned int irq, void *dev_id); | ||
| 191 | 192 | ||
| 192 | /* The following three functions are for the core kernel use only. */ | 193 | /* The following three functions are for the core kernel use only. */ |
| 193 | extern void suspend_device_irqs(void); | 194 | extern void suspend_device_irqs(void); |
diff --git a/include/linux/io.h b/include/linux/io.h index f4f42faec686..8a18e75600cc 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | struct device; | 25 | struct device; |
| 26 | 26 | ||
| 27 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); | 27 | __visible void __iowrite32_copy(void __iomem *to, const void *from, size_t count); |
| 28 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); | 28 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); |
| 29 | 29 | ||
| 30 | #ifdef CONFIG_MMU | 30 | #ifdef CONFIG_MMU |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index e7831d203737..35e7eca4e33b 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
| @@ -118,9 +118,7 @@ extern int mq_init_ns(struct ipc_namespace *ns); | |||
| 118 | * the new maximum will handle anyone else. I may have to revisit this | 118 | * the new maximum will handle anyone else. I may have to revisit this |
| 119 | * in the future. | 119 | * in the future. |
| 120 | */ | 120 | */ |
| 121 | #define MIN_QUEUESMAX 1 | ||
| 122 | #define DFLT_QUEUESMAX 256 | 121 | #define DFLT_QUEUESMAX 256 |
| 123 | #define HARD_QUEUESMAX 1024 | ||
| 124 | #define MIN_MSGMAX 1 | 122 | #define MIN_MSGMAX 1 |
| 125 | #define DFLT_MSG 10U | 123 | #define DFLT_MSG 10U |
| 126 | #define DFLT_MSGMAX 10 | 124 | #define DFLT_MSGMAX 10 |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 7dc10036eff5..d278838908cb 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -303,6 +303,10 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) | |||
| 303 | * @irq_pm_shutdown: function called from core code on shutdown once per chip | 303 | * @irq_pm_shutdown: function called from core code on shutdown once per chip |
| 304 | * @irq_calc_mask: Optional function to set irq_data.mask for special cases | 304 | * @irq_calc_mask: Optional function to set irq_data.mask for special cases |
| 305 | * @irq_print_chip: optional to print special chip info in show_interrupts | 305 | * @irq_print_chip: optional to print special chip info in show_interrupts |
| 306 | * @irq_request_resources: optional to request resources before calling | ||
| 307 | * any other callback related to this irq | ||
| 308 | * @irq_release_resources: optional to release resources acquired with | ||
| 309 | * irq_request_resources | ||
| 306 | * @flags: chip specific flags | 310 | * @flags: chip specific flags |
| 307 | */ | 311 | */ |
| 308 | struct irq_chip { | 312 | struct irq_chip { |
| @@ -336,6 +340,8 @@ struct irq_chip { | |||
| 336 | void (*irq_calc_mask)(struct irq_data *data); | 340 | void (*irq_calc_mask)(struct irq_data *data); |
| 337 | 341 | ||
| 338 | void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); | 342 | void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); |
| 343 | int (*irq_request_resources)(struct irq_data *data); | ||
| 344 | void (*irq_release_resources)(struct irq_data *data); | ||
| 339 | 345 | ||
| 340 | unsigned long flags; | 346 | unsigned long flags; |
| 341 | }; | 347 | }; |
| @@ -349,6 +355,8 @@ struct irq_chip { | |||
| 349 | * IRQCHIP_ONOFFLINE_ENABLED: Only call irq_on/off_line callbacks | 355 | * IRQCHIP_ONOFFLINE_ENABLED: Only call irq_on/off_line callbacks |
| 350 | * when irq enabled | 356 | * when irq enabled |
| 351 | * IRQCHIP_SKIP_SET_WAKE: Skip chip.irq_set_wake(), for this irq chip | 357 | * IRQCHIP_SKIP_SET_WAKE: Skip chip.irq_set_wake(), for this irq chip |
| 358 | * IRQCHIP_ONESHOT_SAFE: One shot does not require mask/unmask | ||
| 359 | * IRQCHIP_EOI_THREADED: Chip requires eoi() on unmask in threaded mode | ||
| 352 | */ | 360 | */ |
| 353 | enum { | 361 | enum { |
| 354 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | 362 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), |
| @@ -357,6 +365,7 @@ enum { | |||
| 357 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), | 365 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), |
| 358 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), | 366 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), |
| 359 | IRQCHIP_ONESHOT_SAFE = (1 << 5), | 367 | IRQCHIP_ONESHOT_SAFE = (1 << 5), |
| 368 | IRQCHIP_EOI_THREADED = (1 << 6), | ||
| 360 | }; | 369 | }; |
| 361 | 370 | ||
| 362 | /* This include will go away once we isolated irq_desc usage to core code */ | 371 | /* This include will go away once we isolated irq_desc usage to core code */ |
diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h index 66017028dcb3..19ae05d4b8ec 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h | |||
| @@ -30,7 +30,9 @@ void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) | |||
| 30 | work->func = func; | 30 | work->func = func; |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | void irq_work_queue(struct irq_work *work); | 33 | #define DEFINE_IRQ_WORK(name, _f) struct irq_work name = { .func = (_f), } |
| 34 | |||
| 35 | bool irq_work_queue(struct irq_work *work); | ||
| 34 | void irq_work_run(void); | 36 | void irq_work_run(void); |
| 35 | void irq_work_sync(struct irq_work *work); | 37 | void irq_work_sync(struct irq_work *work); |
| 36 | 38 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 196d1ea86df0..08fb02477641 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -458,7 +458,7 @@ extern enum system_states { | |||
| 458 | 458 | ||
| 459 | #define TAINT_PROPRIETARY_MODULE 0 | 459 | #define TAINT_PROPRIETARY_MODULE 0 |
| 460 | #define TAINT_FORCED_MODULE 1 | 460 | #define TAINT_FORCED_MODULE 1 |
| 461 | #define TAINT_UNSAFE_SMP 2 | 461 | #define TAINT_CPU_OUT_OF_SPEC 2 |
| 462 | #define TAINT_FORCED_RMMOD 3 | 462 | #define TAINT_FORCED_RMMOD 3 |
| 463 | #define TAINT_MACHINE_CHECK 4 | 463 | #define TAINT_MACHINE_CHECK 4 |
| 464 | #define TAINT_BAD_PAGE 5 | 464 | #define TAINT_BAD_PAGE 5 |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 51c72be4a7c3..ecbc52f9ff77 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
| 10 | #include <linux/vtime.h> | 10 | #include <linux/vtime.h> |
| 11 | #include <asm/irq.h> | 11 | #include <asm/irq.h> |
| 12 | #include <asm/cputime.h> | 12 | #include <linux/cputime.h> |
| 13 | 13 | ||
| 14 | /* | 14 | /* |
| 15 | * 'kernel_stat.h' contains the definitions needed for doing | 15 | * 'kernel_stat.h' contains the definitions needed for doing |
| @@ -51,14 +51,8 @@ DECLARE_PER_CPU(struct kernel_cpustat, kernel_cpustat); | |||
| 51 | 51 | ||
| 52 | extern unsigned long long nr_context_switches(void); | 52 | extern unsigned long long nr_context_switches(void); |
| 53 | 53 | ||
| 54 | #include <linux/irq.h> | ||
| 55 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | 54 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); |
| 56 | 55 | extern void kstat_incr_irq_this_cpu(unsigned int irq); | |
| 57 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ | ||
| 58 | do { \ | ||
| 59 | __this_cpu_inc(*(DESC)->kstat_irqs); \ | ||
| 60 | __this_cpu_inc(kstat.irqs_sum); \ | ||
| 61 | } while (0) | ||
| 62 | 56 | ||
| 63 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) | 57 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) |
| 64 | { | 58 | { |
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index 5be9f0228a3b..d267623c28cf 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
| @@ -249,7 +249,8 @@ void kernfs_notify(struct kernfs_node *kn); | |||
| 249 | 249 | ||
| 250 | const void *kernfs_super_ns(struct super_block *sb); | 250 | const void *kernfs_super_ns(struct super_block *sb); |
| 251 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, | 251 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, |
| 252 | struct kernfs_root *root, const void *ns); | 252 | struct kernfs_root *root, bool *new_sb_created, |
| 253 | const void *ns); | ||
| 253 | void kernfs_kill_sb(struct super_block *sb); | 254 | void kernfs_kill_sb(struct super_block *sb); |
| 254 | 255 | ||
| 255 | void kernfs_init(void); | 256 | void kernfs_init(void); |
| @@ -317,7 +318,7 @@ static inline const void *kernfs_super_ns(struct super_block *sb) | |||
| 317 | 318 | ||
| 318 | static inline struct dentry * | 319 | static inline struct dentry * |
| 319 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, | 320 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, |
| 320 | struct kernfs_root *root, const void *ns) | 321 | struct kernfs_root *root, bool *new_sb_created, const void *ns) |
| 321 | { return ERR_PTR(-ENOSYS); } | 322 | { return ERR_PTR(-ENOSYS); } |
| 322 | 323 | ||
| 323 | static inline void kernfs_kill_sb(struct super_block *sb) { } | 324 | static inline void kernfs_kill_sb(struct super_block *sb) { } |
| @@ -368,9 +369,9 @@ static inline int kernfs_remove_by_name(struct kernfs_node *parent, | |||
| 368 | 369 | ||
| 369 | static inline struct dentry * | 370 | static inline struct dentry * |
| 370 | kernfs_mount(struct file_system_type *fs_type, int flags, | 371 | kernfs_mount(struct file_system_type *fs_type, int flags, |
| 371 | struct kernfs_root *root) | 372 | struct kernfs_root *root, bool *new_sb_created) |
| 372 | { | 373 | { |
| 373 | return kernfs_mount_ns(fs_type, flags, root, NULL); | 374 | return kernfs_mount_ns(fs_type, flags, root, new_sb_created, NULL); |
| 374 | } | 375 | } |
| 375 | 376 | ||
| 376 | #endif /* __LINUX_KERNFS_H */ | 377 | #endif /* __LINUX_KERNFS_H */ |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 6d4066cdb5b5..a75641930049 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -127,12 +127,6 @@ extern asmlinkage long sys_kexec_load(unsigned long entry, | |||
| 127 | struct kexec_segment __user *segments, | 127 | struct kexec_segment __user *segments, |
| 128 | unsigned long flags); | 128 | unsigned long flags); |
| 129 | extern int kernel_kexec(void); | 129 | extern int kernel_kexec(void); |
| 130 | #ifdef CONFIG_COMPAT | ||
| 131 | extern asmlinkage long compat_sys_kexec_load(unsigned long entry, | ||
| 132 | unsigned long nr_segments, | ||
| 133 | struct compat_kexec_segment __user *segments, | ||
| 134 | unsigned long flags); | ||
| 135 | #endif | ||
| 136 | extern struct page *kimage_alloc_control_pages(struct kimage *image, | 130 | extern struct page *kimage_alloc_control_pages(struct kimage *image, |
| 137 | unsigned int order); | 131 | unsigned int order); |
| 138 | extern void crash_kexec(struct pt_regs *); | 132 | extern void crash_kexec(struct pt_regs *); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index bec6dbe939a0..1de36be64df4 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -848,7 +848,6 @@ struct ata_port { | |||
| 848 | struct completion park_req_pending; | 848 | struct completion park_req_pending; |
| 849 | 849 | ||
| 850 | pm_message_t pm_mesg; | 850 | pm_message_t pm_mesg; |
| 851 | int *pm_result; | ||
| 852 | enum ata_lpm_policy target_lpm_policy; | 851 | enum ata_lpm_policy target_lpm_policy; |
| 853 | 852 | ||
| 854 | struct timer_list fastdrain_timer; | 853 | struct timer_list fastdrain_timer; |
| @@ -1140,16 +1139,14 @@ extern bool ata_link_offline(struct ata_link *link); | |||
| 1140 | #ifdef CONFIG_PM | 1139 | #ifdef CONFIG_PM |
| 1141 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); | 1140 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); |
| 1142 | extern void ata_host_resume(struct ata_host *host); | 1141 | extern void ata_host_resume(struct ata_host *host); |
| 1143 | extern int ata_sas_port_async_suspend(struct ata_port *ap, int *async); | 1142 | extern void ata_sas_port_suspend(struct ata_port *ap); |
| 1144 | extern int ata_sas_port_async_resume(struct ata_port *ap, int *async); | 1143 | extern void ata_sas_port_resume(struct ata_port *ap); |
| 1145 | #else | 1144 | #else |
| 1146 | static inline int ata_sas_port_async_suspend(struct ata_port *ap, int *async) | 1145 | static inline void ata_sas_port_suspend(struct ata_port *ap) |
| 1147 | { | 1146 | { |
| 1148 | return 0; | ||
| 1149 | } | 1147 | } |
| 1150 | static inline int ata_sas_port_async_resume(struct ata_port *ap, int *async) | 1148 | static inline void ata_sas_port_resume(struct ata_port *ap) |
| 1151 | { | 1149 | { |
| 1152 | return 0; | ||
| 1153 | } | 1150 | } |
| 1154 | #endif | 1151 | #endif |
| 1155 | extern int ata_ratelimit(void); | 1152 | extern int ata_ratelimit(void); |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index a6a42dd02466..34a513a2727b 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
| @@ -12,9 +12,9 @@ | |||
| 12 | #endif | 12 | #endif |
| 13 | 13 | ||
| 14 | #ifdef __cplusplus | 14 | #ifdef __cplusplus |
| 15 | #define CPP_ASMLINKAGE extern "C" | 15 | #define CPP_ASMLINKAGE extern "C" __visible |
| 16 | #else | 16 | #else |
| 17 | #define CPP_ASMLINKAGE | 17 | #define CPP_ASMLINKAGE __visible |
| 18 | #endif | 18 | #endif |
| 19 | 19 | ||
| 20 | #ifndef asmlinkage | 20 | #ifndef asmlinkage |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 92b1bfc5da60..008388f920d7 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -252,9 +252,9 @@ struct held_lock { | |||
| 252 | unsigned int trylock:1; /* 16 bits */ | 252 | unsigned int trylock:1; /* 16 bits */ |
| 253 | 253 | ||
| 254 | unsigned int read:2; /* see lock_acquire() comment */ | 254 | unsigned int read:2; /* see lock_acquire() comment */ |
| 255 | unsigned int check:2; /* see lock_acquire() comment */ | 255 | unsigned int check:1; /* see lock_acquire() comment */ |
| 256 | unsigned int hardirqs_off:1; | 256 | unsigned int hardirqs_off:1; |
| 257 | unsigned int references:11; /* 32 bits */ | 257 | unsigned int references:12; /* 32 bits */ |
| 258 | }; | 258 | }; |
| 259 | 259 | ||
| 260 | /* | 260 | /* |
| @@ -265,7 +265,7 @@ extern void lockdep_info(void); | |||
| 265 | extern void lockdep_reset(void); | 265 | extern void lockdep_reset(void); |
| 266 | extern void lockdep_reset_lock(struct lockdep_map *lock); | 266 | extern void lockdep_reset_lock(struct lockdep_map *lock); |
| 267 | extern void lockdep_free_key_range(void *start, unsigned long size); | 267 | extern void lockdep_free_key_range(void *start, unsigned long size); |
| 268 | extern void lockdep_sys_exit(void); | 268 | extern asmlinkage void lockdep_sys_exit(void); |
| 269 | 269 | ||
| 270 | extern void lockdep_off(void); | 270 | extern void lockdep_off(void); |
| 271 | extern void lockdep_on(void); | 271 | extern void lockdep_on(void); |
| @@ -303,7 +303,7 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name, | |||
| 303 | (lock)->dep_map.key, sub) | 303 | (lock)->dep_map.key, sub) |
| 304 | 304 | ||
| 305 | #define lockdep_set_novalidate_class(lock) \ | 305 | #define lockdep_set_novalidate_class(lock) \ |
| 306 | lockdep_set_class(lock, &__lockdep_no_validate__) | 306 | lockdep_set_class_and_name(lock, &__lockdep_no_validate__, #lock) |
| 307 | /* | 307 | /* |
| 308 | * Compare locking classes | 308 | * Compare locking classes |
| 309 | */ | 309 | */ |
| @@ -326,9 +326,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock, | |||
| 326 | * | 326 | * |
| 327 | * Values for check: | 327 | * Values for check: |
| 328 | * | 328 | * |
| 329 | * 0: disabled | 329 | * 0: simple checks (freeing, held-at-exit-time, etc.) |
| 330 | * 1: simple checks (freeing, held-at-exit-time, etc.) | 330 | * 1: full validation |
| 331 | * 2: full validation | ||
| 332 | */ | 331 | */ |
| 333 | extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, | 332 | extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, |
| 334 | int trylock, int read, int check, | 333 | int trylock, int read, int check, |
| @@ -479,15 +478,9 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
| 479 | * on the per lock-class debug mode: | 478 | * on the per lock-class debug mode: |
| 480 | */ | 479 | */ |
| 481 | 480 | ||
| 482 | #ifdef CONFIG_PROVE_LOCKING | 481 | #define lock_acquire_exclusive(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i) |
| 483 | #define lock_acquire_exclusive(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i) | 482 | #define lock_acquire_shared(l, s, t, n, i) lock_acquire(l, s, t, 1, 1, n, i) |
| 484 | #define lock_acquire_shared(l, s, t, n, i) lock_acquire(l, s, t, 1, 2, n, i) | 483 | #define lock_acquire_shared_recursive(l, s, t, n, i) lock_acquire(l, s, t, 2, 1, n, i) |
| 485 | #define lock_acquire_shared_recursive(l, s, t, n, i) lock_acquire(l, s, t, 2, 2, n, i) | ||
| 486 | #else | ||
| 487 | #define lock_acquire_exclusive(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i) | ||
| 488 | #define lock_acquire_shared(l, s, t, n, i) lock_acquire(l, s, t, 1, 1, n, i) | ||
| 489 | #define lock_acquire_shared_recursive(l, s, t, n, i) lock_acquire(l, s, t, 2, 1, n, i) | ||
| 490 | #endif | ||
| 491 | 484 | ||
| 492 | #define spin_acquire(l, s, t, i) lock_acquire_exclusive(l, s, t, NULL, i) | 485 | #define spin_acquire(l, s, t, i) lock_acquire_exclusive(l, s, t, NULL, i) |
| 493 | #define spin_acquire_nest(l, s, t, n, i) lock_acquire_exclusive(l, s, t, n, i) | 486 | #define spin_acquire_nest(l, s, t, n, i) lock_acquire_exclusive(l, s, t, n, i) |
| @@ -518,13 +511,13 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
| 518 | # define might_lock(lock) \ | 511 | # define might_lock(lock) \ |
| 519 | do { \ | 512 | do { \ |
| 520 | typecheck(struct lockdep_map *, &(lock)->dep_map); \ | 513 | typecheck(struct lockdep_map *, &(lock)->dep_map); \ |
| 521 | lock_acquire(&(lock)->dep_map, 0, 0, 0, 2, NULL, _THIS_IP_); \ | 514 | lock_acquire(&(lock)->dep_map, 0, 0, 0, 1, NULL, _THIS_IP_); \ |
| 522 | lock_release(&(lock)->dep_map, 0, _THIS_IP_); \ | 515 | lock_release(&(lock)->dep_map, 0, _THIS_IP_); \ |
| 523 | } while (0) | 516 | } while (0) |
| 524 | # define might_lock_read(lock) \ | 517 | # define might_lock_read(lock) \ |
| 525 | do { \ | 518 | do { \ |
| 526 | typecheck(struct lockdep_map *, &(lock)->dep_map); \ | 519 | typecheck(struct lockdep_map *, &(lock)->dep_map); \ |
| 527 | lock_acquire(&(lock)->dep_map, 0, 0, 1, 2, NULL, _THIS_IP_); \ | 520 | lock_acquire(&(lock)->dep_map, 0, 0, 1, 1, NULL, _THIS_IP_); \ |
| 528 | lock_release(&(lock)->dep_map, 0, _THIS_IP_); \ | 521 | lock_release(&(lock)->dep_map, 0, _THIS_IP_); \ |
| 529 | } while (0) | 522 | } while (0) |
| 530 | #else | 523 | #else |
diff --git a/include/linux/mm.h b/include/linux/mm.h index f28f46eade6a..a0df4295e171 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -175,7 +175,7 @@ extern unsigned int kobjsize(const void *objp); | |||
| 175 | * Special vmas that are non-mergable, non-mlock()able. | 175 | * Special vmas that are non-mergable, non-mlock()able. |
| 176 | * Note: mm/huge_memory.c VM_NO_THP depends on this definition. | 176 | * Note: mm/huge_memory.c VM_NO_THP depends on this definition. |
| 177 | */ | 177 | */ |
| 178 | #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_PFNMAP) | 178 | #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_PFNMAP | VM_MIXEDMAP) |
| 179 | 179 | ||
| 180 | /* | 180 | /* |
| 181 | * mapping from the currently active vm_flags protection bits (the | 181 | * mapping from the currently active vm_flags protection bits (the |
| @@ -399,8 +399,18 @@ static inline void compound_unlock_irqrestore(struct page *page, | |||
| 399 | 399 | ||
| 400 | static inline struct page *compound_head(struct page *page) | 400 | static inline struct page *compound_head(struct page *page) |
| 401 | { | 401 | { |
| 402 | if (unlikely(PageTail(page))) | 402 | if (unlikely(PageTail(page))) { |
| 403 | return page->first_page; | 403 | struct page *head = page->first_page; |
| 404 | |||
| 405 | /* | ||
| 406 | * page->first_page may be a dangling pointer to an old | ||
| 407 | * compound page, so recheck that it is still a tail | ||
| 408 | * page before returning. | ||
| 409 | */ | ||
| 410 | smp_rmb(); | ||
| 411 | if (likely(PageTail(page))) | ||
| 412 | return head; | ||
| 413 | } | ||
| 404 | return page; | 414 | return page; |
| 405 | } | 415 | } |
| 406 | 416 | ||
| @@ -757,7 +767,7 @@ static inline bool __cpupid_match_pid(pid_t task_pid, int cpupid) | |||
| 757 | #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS | 767 | #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS |
| 758 | static inline int page_cpupid_xchg_last(struct page *page, int cpupid) | 768 | static inline int page_cpupid_xchg_last(struct page *page, int cpupid) |
| 759 | { | 769 | { |
| 760 | return xchg(&page->_last_cpupid, cpupid); | 770 | return xchg(&page->_last_cpupid, cpupid & LAST_CPUPID_MASK); |
| 761 | } | 771 | } |
| 762 | 772 | ||
| 763 | static inline int page_cpupid_last(struct page *page) | 773 | static inline int page_cpupid_last(struct page *page) |
| @@ -766,7 +776,7 @@ static inline int page_cpupid_last(struct page *page) | |||
| 766 | } | 776 | } |
| 767 | static inline void page_cpupid_reset_last(struct page *page) | 777 | static inline void page_cpupid_reset_last(struct page *page) |
| 768 | { | 778 | { |
| 769 | page->_last_cpupid = -1; | 779 | page->_last_cpupid = -1 & LAST_CPUPID_MASK; |
| 770 | } | 780 | } |
| 771 | #else | 781 | #else |
| 772 | static inline int page_cpupid_last(struct page *page) | 782 | static inline int page_cpupid_last(struct page *page) |
| @@ -1477,9 +1487,15 @@ static inline void pgtable_page_dtor(struct page *page) | |||
| 1477 | 1487 | ||
| 1478 | #if USE_SPLIT_PMD_PTLOCKS | 1488 | #if USE_SPLIT_PMD_PTLOCKS |
| 1479 | 1489 | ||
| 1490 | static struct page *pmd_to_page(pmd_t *pmd) | ||
| 1491 | { | ||
| 1492 | unsigned long mask = ~(PTRS_PER_PMD * sizeof(pmd_t) - 1); | ||
| 1493 | return virt_to_page((void *)((unsigned long) pmd & mask)); | ||
| 1494 | } | ||
| 1495 | |||
| 1480 | static inline spinlock_t *pmd_lockptr(struct mm_struct *mm, pmd_t *pmd) | 1496 | static inline spinlock_t *pmd_lockptr(struct mm_struct *mm, pmd_t *pmd) |
| 1481 | { | 1497 | { |
| 1482 | return ptlock_ptr(virt_to_page(pmd)); | 1498 | return ptlock_ptr(pmd_to_page(pmd)); |
| 1483 | } | 1499 | } |
| 1484 | 1500 | ||
| 1485 | static inline bool pgtable_pmd_page_ctor(struct page *page) | 1501 | static inline bool pgtable_pmd_page_ctor(struct page *page) |
| @@ -1498,7 +1514,7 @@ static inline void pgtable_pmd_page_dtor(struct page *page) | |||
| 1498 | ptlock_free(page); | 1514 | ptlock_free(page); |
| 1499 | } | 1515 | } |
| 1500 | 1516 | ||
| 1501 | #define pmd_huge_pte(mm, pmd) (virt_to_page(pmd)->pmd_huge_pte) | 1517 | #define pmd_huge_pte(mm, pmd) (pmd_to_page(pmd)->pmd_huge_pte) |
| 1502 | 1518 | ||
| 1503 | #else | 1519 | #else |
| 1504 | 1520 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 5f2052c83154..9b61b9bf81ac 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -590,10 +590,10 @@ static inline bool zone_is_empty(struct zone *zone) | |||
| 590 | 590 | ||
| 591 | /* | 591 | /* |
| 592 | * The NUMA zonelists are doubled because we need zonelists that restrict the | 592 | * The NUMA zonelists are doubled because we need zonelists that restrict the |
| 593 | * allocations to a single node for GFP_THISNODE. | 593 | * allocations to a single node for __GFP_THISNODE. |
| 594 | * | 594 | * |
| 595 | * [0] : Zonelist with fallback | 595 | * [0] : Zonelist with fallback |
| 596 | * [1] : No fallback (GFP_THISNODE) | 596 | * [1] : No fallback (__GFP_THISNODE) |
| 597 | */ | 597 | */ |
| 598 | #define MAX_ZONELISTS 2 | 598 | #define MAX_ZONELISTS 2 |
| 599 | 599 | ||
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index d3181936c138..11692dea18aa 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | * - detects multi-task circular deadlocks and prints out all affected | 46 | * - detects multi-task circular deadlocks and prints out all affected |
| 47 | * locks and tasks (and only those tasks) | 47 | * locks and tasks (and only those tasks) |
| 48 | */ | 48 | */ |
| 49 | struct optimistic_spin_queue; | ||
| 49 | struct mutex { | 50 | struct mutex { |
| 50 | /* 1: unlocked, 0: locked, negative: locked, possible waiters */ | 51 | /* 1: unlocked, 0: locked, negative: locked, possible waiters */ |
| 51 | atomic_t count; | 52 | atomic_t count; |
| @@ -55,7 +56,7 @@ struct mutex { | |||
| 55 | struct task_struct *owner; | 56 | struct task_struct *owner; |
| 56 | #endif | 57 | #endif |
| 57 | #ifdef CONFIG_MUTEX_SPIN_ON_OWNER | 58 | #ifdef CONFIG_MUTEX_SPIN_ON_OWNER |
| 58 | void *spin_mlock; /* Spinner MCS lock */ | 59 | struct optimistic_spin_queue *osq; /* Spinner MCS lock */ |
| 59 | #endif | 60 | #endif |
| 60 | #ifdef CONFIG_DEBUG_MUTEXES | 61 | #ifdef CONFIG_DEBUG_MUTEXES |
| 61 | const char *name; | 62 | const char *name; |
| @@ -179,4 +180,4 @@ extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | |||
| 179 | # define arch_mutex_cpu_relax() cpu_relax() | 180 | # define arch_mutex_cpu_relax() cpu_relax() |
| 180 | #endif | 181 | #endif |
| 181 | 182 | ||
| 182 | #endif | 183 | #endif /* __LINUX_MUTEX_H */ |
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index 1005ebf17575..5a09a48f2658 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h | |||
| @@ -163,4 +163,11 @@ enum { | |||
| 163 | /* changeable features with no special hardware requirements */ | 163 | /* changeable features with no special hardware requirements */ |
| 164 | #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) | 164 | #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) |
| 165 | 165 | ||
| 166 | #define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \ | ||
| 167 | NETIF_F_HW_VLAN_CTAG_RX | \ | ||
| 168 | NETIF_F_HW_VLAN_CTAG_TX | \ | ||
| 169 | NETIF_F_HW_VLAN_STAG_FILTER | \ | ||
| 170 | NETIF_F_HW_VLAN_STAG_RX | \ | ||
| 171 | NETIF_F_HW_VLAN_STAG_TX) | ||
| 172 | |||
| 166 | #endif /* _LINUX_NETDEV_FEATURES_H */ | 173 | #endif /* _LINUX_NETDEV_FEATURES_H */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e8eeebd49a98..daafd9561cbc 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -3014,7 +3014,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) | |||
| 3014 | { | 3014 | { |
| 3015 | return __skb_gso_segment(skb, features, true); | 3015 | return __skb_gso_segment(skb, features, true); |
| 3016 | } | 3016 | } |
| 3017 | __be16 skb_network_protocol(struct sk_buff *skb); | 3017 | __be16 skb_network_protocol(struct sk_buff *skb, int *depth); |
| 3018 | 3018 | ||
| 3019 | static inline bool can_checksum_protocol(netdev_features_t features, | 3019 | static inline bool can_checksum_protocol(netdev_features_t features, |
| 3020 | __be16 protocol) | 3020 | __be16 protocol) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index b2fb167b2e6d..5624e4e2763c 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -467,9 +467,14 @@ struct nfs_lockt_res { | |||
| 467 | }; | 467 | }; |
| 468 | 468 | ||
| 469 | struct nfs_release_lockowner_args { | 469 | struct nfs_release_lockowner_args { |
| 470 | struct nfs4_sequence_args seq_args; | ||
| 470 | struct nfs_lowner lock_owner; | 471 | struct nfs_lowner lock_owner; |
| 471 | }; | 472 | }; |
| 472 | 473 | ||
| 474 | struct nfs_release_lockowner_res { | ||
| 475 | struct nfs4_sequence_res seq_res; | ||
| 476 | }; | ||
| 477 | |||
| 473 | struct nfs4_delegreturnargs { | 478 | struct nfs4_delegreturnargs { |
| 474 | struct nfs4_sequence_args seq_args; | 479 | struct nfs4_sequence_args seq_args; |
| 475 | const struct nfs_fh *fhandle; | 480 | const struct nfs_fh *fhandle; |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 69ae03f6eb15..6b9aafed225f 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -87,6 +87,7 @@ struct nvme_dev { | |||
| 87 | struct list_head namespaces; | 87 | struct list_head namespaces; |
| 88 | struct kref kref; | 88 | struct kref kref; |
| 89 | struct miscdevice miscdev; | 89 | struct miscdevice miscdev; |
| 90 | work_func_t reset_workfn; | ||
| 90 | struct work_struct reset_work; | 91 | struct work_struct reset_work; |
| 91 | char name[12]; | 92 | char name[12]; |
| 92 | char serial[20]; | 93 | char serial[20]; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 97fbecdd7a40..7399e6a3e9a0 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2531,6 +2531,9 @@ | |||
| 2531 | 2531 | ||
| 2532 | #define PCI_VENDOR_ID_INTEL 0x8086 | 2532 | #define PCI_VENDOR_ID_INTEL 0x8086 |
| 2533 | #define PCI_DEVICE_ID_INTEL_EESSC 0x0008 | 2533 | #define PCI_DEVICE_ID_INTEL_EESSC 0x0008 |
| 2534 | #define PCI_DEVICE_ID_INTEL_SNB_IMC 0x0100 | ||
| 2535 | #define PCI_DEVICE_ID_INTEL_IVB_IMC 0x0154 | ||
| 2536 | #define PCI_DEVICE_ID_INTEL_HSW_IMC 0x0c00 | ||
| 2534 | #define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320 | 2537 | #define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320 |
| 2535 | #define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321 | 2538 | #define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321 |
| 2536 | #define PCI_DEVICE_ID_INTEL_PXH_0 0x0329 | 2539 | #define PCI_DEVICE_ID_INTEL_PXH_0 0x0329 |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index dbaf99084112..8183b46fbaa2 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -247,9 +247,10 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
| 247 | * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock(). | 247 | * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock(). |
| 248 | */ | 248 | */ |
| 249 | #define list_entry_rcu(ptr, type, member) \ | 249 | #define list_entry_rcu(ptr, type, member) \ |
| 250 | ({typeof (*ptr) __rcu *__ptr = (typeof (*ptr) __rcu __force *)ptr; \ | 250 | ({ \ |
| 251 | container_of((typeof(ptr))rcu_dereference_raw(__ptr), type, member); \ | 251 | typeof(*ptr) __rcu *__ptr = (typeof(*ptr) __rcu __force *)ptr; \ |
| 252 | }) | 252 | container_of((typeof(ptr))rcu_dereference_raw(__ptr), type, member); \ |
| 253 | }) | ||
| 253 | 254 | ||
| 254 | /** | 255 | /** |
| 255 | * Where are list_empty_rcu() and list_first_entry_rcu()? | 256 | * Where are list_empty_rcu() and list_first_entry_rcu()? |
| @@ -285,11 +286,11 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
| 285 | * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock(). | 286 | * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock(). |
| 286 | */ | 287 | */ |
| 287 | #define list_first_or_null_rcu(ptr, type, member) \ | 288 | #define list_first_or_null_rcu(ptr, type, member) \ |
| 288 | ({struct list_head *__ptr = (ptr); \ | 289 | ({ \ |
| 289 | struct list_head *__next = ACCESS_ONCE(__ptr->next); \ | 290 | struct list_head *__ptr = (ptr); \ |
| 290 | likely(__ptr != __next) ? \ | 291 | struct list_head *__next = ACCESS_ONCE(__ptr->next); \ |
| 291 | list_entry_rcu(__next, type, member) : NULL; \ | 292 | likely(__ptr != __next) ? list_entry_rcu(__next, type, member) : NULL; \ |
| 292 | }) | 293 | }) |
| 293 | 294 | ||
| 294 | /** | 295 | /** |
| 295 | * list_for_each_entry_rcu - iterate over rcu list of given type | 296 | * list_for_each_entry_rcu - iterate over rcu list of given type |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 72bf3a01a4ee..00a7fd61b3c6 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -12,8 +12,8 @@ | |||
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | 13 | * |
| 14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, you can access it online at |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * http://www.gnu.org/licenses/gpl-2.0.html. |
| 17 | * | 17 | * |
| 18 | * Copyright IBM Corporation, 2001 | 18 | * Copyright IBM Corporation, 2001 |
| 19 | * | 19 | * |
| @@ -44,7 +44,9 @@ | |||
| 44 | #include <linux/debugobjects.h> | 44 | #include <linux/debugobjects.h> |
| 45 | #include <linux/bug.h> | 45 | #include <linux/bug.h> |
| 46 | #include <linux/compiler.h> | 46 | #include <linux/compiler.h> |
| 47 | #include <asm/barrier.h> | ||
| 47 | 48 | ||
| 49 | extern int rcu_expedited; /* for sysctl */ | ||
| 48 | #ifdef CONFIG_RCU_TORTURE_TEST | 50 | #ifdef CONFIG_RCU_TORTURE_TEST |
| 49 | extern int rcutorture_runnable; /* for sysctl */ | 51 | extern int rcutorture_runnable; /* for sysctl */ |
| 50 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 52 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
| @@ -314,7 +316,7 @@ static inline bool rcu_lockdep_current_cpu_online(void) | |||
| 314 | 316 | ||
| 315 | static inline void rcu_lock_acquire(struct lockdep_map *map) | 317 | static inline void rcu_lock_acquire(struct lockdep_map *map) |
| 316 | { | 318 | { |
| 317 | lock_acquire(map, 0, 0, 2, 1, NULL, _THIS_IP_); | 319 | lock_acquire(map, 0, 0, 2, 0, NULL, _THIS_IP_); |
| 318 | } | 320 | } |
| 319 | 321 | ||
| 320 | static inline void rcu_lock_release(struct lockdep_map *map) | 322 | static inline void rcu_lock_release(struct lockdep_map *map) |
| @@ -479,11 +481,9 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 479 | do { \ | 481 | do { \ |
| 480 | rcu_preempt_sleep_check(); \ | 482 | rcu_preempt_sleep_check(); \ |
| 481 | rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map), \ | 483 | rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map), \ |
| 482 | "Illegal context switch in RCU-bh" \ | 484 | "Illegal context switch in RCU-bh read-side critical section"); \ |
| 483 | " read-side critical section"); \ | ||
| 484 | rcu_lockdep_assert(!lock_is_held(&rcu_sched_lock_map), \ | 485 | rcu_lockdep_assert(!lock_is_held(&rcu_sched_lock_map), \ |
| 485 | "Illegal context switch in RCU-sched"\ | 486 | "Illegal context switch in RCU-sched read-side critical section"); \ |
| 486 | " read-side critical section"); \ | ||
| 487 | } while (0) | 487 | } while (0) |
| 488 | 488 | ||
| 489 | #else /* #ifdef CONFIG_PROVE_RCU */ | 489 | #else /* #ifdef CONFIG_PROVE_RCU */ |
| @@ -510,43 +510,40 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 510 | #endif /* #else #ifdef __CHECKER__ */ | 510 | #endif /* #else #ifdef __CHECKER__ */ |
| 511 | 511 | ||
| 512 | #define __rcu_access_pointer(p, space) \ | 512 | #define __rcu_access_pointer(p, space) \ |
| 513 | ({ \ | 513 | ({ \ |
| 514 | typeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \ | 514 | typeof(*p) *_________p1 = (typeof(*p) *__force)ACCESS_ONCE(p); \ |
| 515 | rcu_dereference_sparse(p, space); \ | 515 | rcu_dereference_sparse(p, space); \ |
| 516 | ((typeof(*p) __force __kernel *)(_________p1)); \ | 516 | ((typeof(*p) __force __kernel *)(_________p1)); \ |
| 517 | }) | 517 | }) |
| 518 | #define __rcu_dereference_check(p, c, space) \ | 518 | #define __rcu_dereference_check(p, c, space) \ |
| 519 | ({ \ | 519 | ({ \ |
| 520 | typeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \ | 520 | typeof(*p) *_________p1 = (typeof(*p) *__force)ACCESS_ONCE(p); \ |
| 521 | rcu_lockdep_assert(c, "suspicious rcu_dereference_check()" \ | 521 | rcu_lockdep_assert(c, "suspicious rcu_dereference_check() usage"); \ |
| 522 | " usage"); \ | 522 | rcu_dereference_sparse(p, space); \ |
| 523 | rcu_dereference_sparse(p, space); \ | 523 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ |
| 524 | smp_read_barrier_depends(); \ | 524 | ((typeof(*p) __force __kernel *)(_________p1)); \ |
| 525 | ((typeof(*p) __force __kernel *)(_________p1)); \ | 525 | }) |
| 526 | }) | ||
| 527 | #define __rcu_dereference_protected(p, c, space) \ | 526 | #define __rcu_dereference_protected(p, c, space) \ |
| 528 | ({ \ | 527 | ({ \ |
| 529 | rcu_lockdep_assert(c, "suspicious rcu_dereference_protected()" \ | 528 | rcu_lockdep_assert(c, "suspicious rcu_dereference_protected() usage"); \ |
| 530 | " usage"); \ | 529 | rcu_dereference_sparse(p, space); \ |
| 531 | rcu_dereference_sparse(p, space); \ | 530 | ((typeof(*p) __force __kernel *)(p)); \ |
| 532 | ((typeof(*p) __force __kernel *)(p)); \ | 531 | }) |
| 533 | }) | ||
| 534 | 532 | ||
| 535 | #define __rcu_access_index(p, space) \ | 533 | #define __rcu_access_index(p, space) \ |
| 536 | ({ \ | 534 | ({ \ |
| 537 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | 535 | typeof(p) _________p1 = ACCESS_ONCE(p); \ |
| 538 | rcu_dereference_sparse(p, space); \ | 536 | rcu_dereference_sparse(p, space); \ |
| 539 | (_________p1); \ | 537 | (_________p1); \ |
| 540 | }) | 538 | }) |
| 541 | #define __rcu_dereference_index_check(p, c) \ | 539 | #define __rcu_dereference_index_check(p, c) \ |
| 542 | ({ \ | 540 | ({ \ |
| 543 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | 541 | typeof(p) _________p1 = ACCESS_ONCE(p); \ |
| 544 | rcu_lockdep_assert(c, \ | 542 | rcu_lockdep_assert(c, \ |
| 545 | "suspicious rcu_dereference_index_check()" \ | 543 | "suspicious rcu_dereference_index_check() usage"); \ |
| 546 | " usage"); \ | 544 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ |
| 547 | smp_read_barrier_depends(); \ | 545 | (_________p1); \ |
| 548 | (_________p1); \ | 546 | }) |
| 549 | }) | ||
| 550 | 547 | ||
| 551 | /** | 548 | /** |
| 552 | * RCU_INITIALIZER() - statically initialize an RCU-protected global variable | 549 | * RCU_INITIALIZER() - statically initialize an RCU-protected global variable |
| @@ -585,12 +582,7 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 585 | * please be careful when making changes to rcu_assign_pointer() and the | 582 | * please be careful when making changes to rcu_assign_pointer() and the |
| 586 | * other macros that it invokes. | 583 | * other macros that it invokes. |
| 587 | */ | 584 | */ |
| 588 | #define rcu_assign_pointer(p, v) \ | 585 | #define rcu_assign_pointer(p, v) smp_store_release(&p, RCU_INITIALIZER(v)) |
| 589 | do { \ | ||
| 590 | smp_wmb(); \ | ||
| 591 | ACCESS_ONCE(p) = RCU_INITIALIZER(v); \ | ||
| 592 | } while (0) | ||
| 593 | |||
| 594 | 586 | ||
| 595 | /** | 587 | /** |
| 596 | * rcu_access_pointer() - fetch RCU pointer with no dereferencing | 588 | * rcu_access_pointer() - fetch RCU pointer with no dereferencing |
| @@ -1015,11 +1007,21 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 1015 | #define kfree_rcu(ptr, rcu_head) \ | 1007 | #define kfree_rcu(ptr, rcu_head) \ |
| 1016 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) | 1008 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) |
| 1017 | 1009 | ||
| 1018 | #ifdef CONFIG_RCU_NOCB_CPU | 1010 | #if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL) |
| 1011 | static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies) | ||
| 1012 | { | ||
| 1013 | *delta_jiffies = ULONG_MAX; | ||
| 1014 | return 0; | ||
| 1015 | } | ||
| 1016 | #endif /* #if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL) */ | ||
| 1017 | |||
| 1018 | #if defined(CONFIG_RCU_NOCB_CPU_ALL) | ||
| 1019 | static inline bool rcu_is_nocb_cpu(int cpu) { return true; } | ||
| 1020 | #elif defined(CONFIG_RCU_NOCB_CPU) | ||
| 1019 | bool rcu_is_nocb_cpu(int cpu); | 1021 | bool rcu_is_nocb_cpu(int cpu); |
| 1020 | #else | 1022 | #else |
| 1021 | static inline bool rcu_is_nocb_cpu(int cpu) { return false; } | 1023 | static inline bool rcu_is_nocb_cpu(int cpu) { return false; } |
| 1022 | #endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */ | 1024 | #endif |
| 1023 | 1025 | ||
| 1024 | 1026 | ||
| 1025 | /* Only for use by adaptive-ticks code. */ | 1027 | /* Only for use by adaptive-ticks code. */ |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 6f01771b571c..425c659d54e5 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -12,8 +12,8 @@ | |||
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | 13 | * |
| 14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, you can access it online at |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * http://www.gnu.org/licenses/gpl-2.0.html. |
| 17 | * | 17 | * |
| 18 | * Copyright IBM Corporation, 2008 | 18 | * Copyright IBM Corporation, 2008 |
| 19 | * | 19 | * |
| @@ -27,6 +27,16 @@ | |||
| 27 | 27 | ||
| 28 | #include <linux/cache.h> | 28 | #include <linux/cache.h> |
| 29 | 29 | ||
| 30 | static inline unsigned long get_state_synchronize_rcu(void) | ||
| 31 | { | ||
| 32 | return 0; | ||
| 33 | } | ||
| 34 | |||
| 35 | static inline void cond_synchronize_rcu(unsigned long oldstate) | ||
| 36 | { | ||
| 37 | might_sleep(); | ||
| 38 | } | ||
| 39 | |||
| 30 | static inline void rcu_barrier_bh(void) | 40 | static inline void rcu_barrier_bh(void) |
| 31 | { | 41 | { |
| 32 | wait_rcu_gp(call_rcu_bh); | 42 | wait_rcu_gp(call_rcu_bh); |
| @@ -68,12 +78,6 @@ static inline void kfree_call_rcu(struct rcu_head *head, | |||
| 68 | call_rcu(head, func); | 78 | call_rcu(head, func); |
| 69 | } | 79 | } |
| 70 | 80 | ||
| 71 | static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies) | ||
| 72 | { | ||
| 73 | *delta_jiffies = ULONG_MAX; | ||
| 74 | return 0; | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline void rcu_note_context_switch(int cpu) | 81 | static inline void rcu_note_context_switch(int cpu) |
| 78 | { | 82 | { |
| 79 | rcu_sched_qs(cpu); | 83 | rcu_sched_qs(cpu); |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 72137ee8c603..a59ca05fd4e3 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -12,8 +12,8 @@ | |||
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | 13 | * |
| 14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, you can access it online at |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * http://www.gnu.org/licenses/gpl-2.0.html. |
| 17 | * | 17 | * |
| 18 | * Copyright IBM Corporation, 2008 | 18 | * Copyright IBM Corporation, 2008 |
| 19 | * | 19 | * |
| @@ -31,7 +31,9 @@ | |||
| 31 | #define __LINUX_RCUTREE_H | 31 | #define __LINUX_RCUTREE_H |
| 32 | 32 | ||
| 33 | void rcu_note_context_switch(int cpu); | 33 | void rcu_note_context_switch(int cpu); |
| 34 | #ifndef CONFIG_RCU_NOCB_CPU_ALL | ||
| 34 | int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies); | 35 | int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies); |
| 36 | #endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */ | ||
| 35 | void rcu_cpu_stall_reset(void); | 37 | void rcu_cpu_stall_reset(void); |
| 36 | 38 | ||
| 37 | /* | 39 | /* |
| @@ -74,6 +76,8 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
| 74 | void rcu_barrier(void); | 76 | void rcu_barrier(void); |
| 75 | void rcu_barrier_bh(void); | 77 | void rcu_barrier_bh(void); |
| 76 | void rcu_barrier_sched(void); | 78 | void rcu_barrier_sched(void); |
| 79 | unsigned long get_state_synchronize_rcu(void); | ||
| 80 | void cond_synchronize_rcu(unsigned long oldstate); | ||
| 77 | 81 | ||
| 78 | extern unsigned long rcutorture_testseq; | 82 | extern unsigned long rcutorture_testseq; |
| 79 | extern unsigned long rcutorture_vernum; | 83 | extern unsigned long rcutorture_vernum; |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 1da693d51255..b66c2110cb1f 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
| @@ -250,8 +250,7 @@ struct rmap_walk_control { | |||
| 250 | int (*rmap_one)(struct page *page, struct vm_area_struct *vma, | 250 | int (*rmap_one)(struct page *page, struct vm_area_struct *vma, |
| 251 | unsigned long addr, void *arg); | 251 | unsigned long addr, void *arg); |
| 252 | int (*done)(struct page *page); | 252 | int (*done)(struct page *page); |
| 253 | int (*file_nonlinear)(struct page *, struct address_space *, | 253 | int (*file_nonlinear)(struct page *, struct address_space *, void *arg); |
| 254 | struct vm_area_struct *vma); | ||
| 255 | struct anon_vma *(*anon_lock)(struct page *page); | 254 | struct anon_vma *(*anon_lock)(struct page *page); |
| 256 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); | 255 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); |
| 257 | }; | 256 | }; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index a781dec1cd0b..7cb07fd26680 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | #include <uapi/linux/sched.h> | 4 | #include <uapi/linux/sched.h> |
| 5 | 5 | ||
| 6 | #include <linux/sched/prio.h> | ||
| 7 | |||
| 6 | 8 | ||
| 7 | struct sched_param { | 9 | struct sched_param { |
| 8 | int sched_priority; | 10 | int sched_priority; |
| @@ -27,7 +29,7 @@ struct sched_param { | |||
| 27 | 29 | ||
| 28 | #include <asm/page.h> | 30 | #include <asm/page.h> |
| 29 | #include <asm/ptrace.h> | 31 | #include <asm/ptrace.h> |
| 30 | #include <asm/cputime.h> | 32 | #include <linux/cputime.h> |
| 31 | 33 | ||
| 32 | #include <linux/smp.h> | 34 | #include <linux/smp.h> |
| 33 | #include <linux/sem.h> | 35 | #include <linux/sem.h> |
| @@ -292,10 +294,14 @@ extern int runqueue_is_locked(int cpu); | |||
| 292 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) | 294 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) |
| 293 | extern void nohz_balance_enter_idle(int cpu); | 295 | extern void nohz_balance_enter_idle(int cpu); |
| 294 | extern void set_cpu_sd_state_idle(void); | 296 | extern void set_cpu_sd_state_idle(void); |
| 295 | extern int get_nohz_timer_target(void); | 297 | extern int get_nohz_timer_target(int pinned); |
| 296 | #else | 298 | #else |
| 297 | static inline void nohz_balance_enter_idle(int cpu) { } | 299 | static inline void nohz_balance_enter_idle(int cpu) { } |
| 298 | static inline void set_cpu_sd_state_idle(void) { } | 300 | static inline void set_cpu_sd_state_idle(void) { } |
| 301 | static inline int get_nohz_timer_target(int pinned) | ||
| 302 | { | ||
| 303 | return smp_processor_id(); | ||
| 304 | } | ||
| 299 | #endif | 305 | #endif |
| 300 | 306 | ||
| 301 | /* | 307 | /* |
| @@ -1077,6 +1083,7 @@ struct sched_entity { | |||
| 1077 | #endif | 1083 | #endif |
| 1078 | 1084 | ||
| 1079 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1085 | #ifdef CONFIG_FAIR_GROUP_SCHED |
| 1086 | int depth; | ||
| 1080 | struct sched_entity *parent; | 1087 | struct sched_entity *parent; |
| 1081 | /* rq on which this entity is (to be) queued: */ | 1088 | /* rq on which this entity is (to be) queued: */ |
| 1082 | struct cfs_rq *cfs_rq; | 1089 | struct cfs_rq *cfs_rq; |
| @@ -1460,6 +1467,9 @@ struct task_struct { | |||
| 1460 | struct mutex perf_event_mutex; | 1467 | struct mutex perf_event_mutex; |
| 1461 | struct list_head perf_event_list; | 1468 | struct list_head perf_event_list; |
| 1462 | #endif | 1469 | #endif |
| 1470 | #ifdef CONFIG_DEBUG_PREEMPT | ||
| 1471 | unsigned long preempt_disable_ip; | ||
| 1472 | #endif | ||
| 1463 | #ifdef CONFIG_NUMA | 1473 | #ifdef CONFIG_NUMA |
| 1464 | struct mempolicy *mempolicy; /* Protected by alloc_lock */ | 1474 | struct mempolicy *mempolicy; /* Protected by alloc_lock */ |
| 1465 | short il_next; | 1475 | short il_next; |
| @@ -1470,9 +1480,10 @@ struct task_struct { | |||
| 1470 | unsigned int numa_scan_period; | 1480 | unsigned int numa_scan_period; |
| 1471 | unsigned int numa_scan_period_max; | 1481 | unsigned int numa_scan_period_max; |
| 1472 | int numa_preferred_nid; | 1482 | int numa_preferred_nid; |
| 1473 | int numa_migrate_deferred; | ||
| 1474 | unsigned long numa_migrate_retry; | 1483 | unsigned long numa_migrate_retry; |
| 1475 | u64 node_stamp; /* migration stamp */ | 1484 | u64 node_stamp; /* migration stamp */ |
| 1485 | u64 last_task_numa_placement; | ||
| 1486 | u64 last_sum_exec_runtime; | ||
| 1476 | struct callback_head numa_work; | 1487 | struct callback_head numa_work; |
| 1477 | 1488 | ||
| 1478 | struct list_head numa_entry; | 1489 | struct list_head numa_entry; |
| @@ -1483,15 +1494,22 @@ struct task_struct { | |||
| 1483 | * Scheduling placement decisions are made based on the these counts. | 1494 | * Scheduling placement decisions are made based on the these counts. |
| 1484 | * The values remain static for the duration of a PTE scan | 1495 | * The values remain static for the duration of a PTE scan |
| 1485 | */ | 1496 | */ |
| 1486 | unsigned long *numa_faults; | 1497 | unsigned long *numa_faults_memory; |
| 1487 | unsigned long total_numa_faults; | 1498 | unsigned long total_numa_faults; |
| 1488 | 1499 | ||
| 1489 | /* | 1500 | /* |
| 1490 | * numa_faults_buffer records faults per node during the current | 1501 | * numa_faults_buffer records faults per node during the current |
| 1491 | * scan window. When the scan completes, the counts in numa_faults | 1502 | * scan window. When the scan completes, the counts in |
| 1492 | * decay and these values are copied. | 1503 | * numa_faults_memory decay and these values are copied. |
| 1493 | */ | 1504 | */ |
| 1494 | unsigned long *numa_faults_buffer; | 1505 | unsigned long *numa_faults_buffer_memory; |
| 1506 | |||
| 1507 | /* | ||
| 1508 | * Track the nodes the process was running on when a NUMA hinting | ||
| 1509 | * fault was incurred. | ||
| 1510 | */ | ||
| 1511 | unsigned long *numa_faults_cpu; | ||
| 1512 | unsigned long *numa_faults_buffer_cpu; | ||
| 1495 | 1513 | ||
| 1496 | /* | 1514 | /* |
| 1497 | * numa_faults_locality tracks if faults recorded during the last | 1515 | * numa_faults_locality tracks if faults recorded during the last |
| @@ -1596,8 +1614,8 @@ extern void task_numa_fault(int last_node, int node, int pages, int flags); | |||
| 1596 | extern pid_t task_numa_group_id(struct task_struct *p); | 1614 | extern pid_t task_numa_group_id(struct task_struct *p); |
| 1597 | extern void set_numabalancing_state(bool enabled); | 1615 | extern void set_numabalancing_state(bool enabled); |
| 1598 | extern void task_numa_free(struct task_struct *p); | 1616 | extern void task_numa_free(struct task_struct *p); |
| 1599 | 1617 | extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page, | |
| 1600 | extern unsigned int sysctl_numa_balancing_migrate_deferred; | 1618 | int src_nid, int dst_cpu); |
| 1601 | #else | 1619 | #else |
| 1602 | static inline void task_numa_fault(int last_node, int node, int pages, | 1620 | static inline void task_numa_fault(int last_node, int node, int pages, |
| 1603 | int flags) | 1621 | int flags) |
| @@ -1613,6 +1631,11 @@ static inline void set_numabalancing_state(bool enabled) | |||
| 1613 | static inline void task_numa_free(struct task_struct *p) | 1631 | static inline void task_numa_free(struct task_struct *p) |
| 1614 | { | 1632 | { |
| 1615 | } | 1633 | } |
| 1634 | static inline bool should_numa_migrate_memory(struct task_struct *p, | ||
| 1635 | struct page *page, int src_nid, int dst_cpu) | ||
| 1636 | { | ||
| 1637 | return true; | ||
| 1638 | } | ||
| 1616 | #endif | 1639 | #endif |
| 1617 | 1640 | ||
| 1618 | static inline struct pid *task_pid(struct task_struct *task) | 1641 | static inline struct pid *task_pid(struct task_struct *task) |
| @@ -2080,7 +2103,16 @@ static inline void sched_autogroup_exit(struct signal_struct *sig) { } | |||
| 2080 | extern bool yield_to(struct task_struct *p, bool preempt); | 2103 | extern bool yield_to(struct task_struct *p, bool preempt); |
| 2081 | extern void set_user_nice(struct task_struct *p, long nice); | 2104 | extern void set_user_nice(struct task_struct *p, long nice); |
| 2082 | extern int task_prio(const struct task_struct *p); | 2105 | extern int task_prio(const struct task_struct *p); |
| 2083 | extern int task_nice(const struct task_struct *p); | 2106 | /** |
| 2107 | * task_nice - return the nice value of a given task. | ||
| 2108 | * @p: the task in question. | ||
| 2109 | * | ||
| 2110 | * Return: The nice value [ -20 ... 0 ... 19 ]. | ||
| 2111 | */ | ||
| 2112 | static inline int task_nice(const struct task_struct *p) | ||
| 2113 | { | ||
| 2114 | return PRIO_TO_NICE((p)->static_prio); | ||
| 2115 | } | ||
| 2084 | extern int can_nice(const struct task_struct *p, const int nice); | 2116 | extern int can_nice(const struct task_struct *p, const int nice); |
| 2085 | extern int task_curr(const struct task_struct *p); | 2117 | extern int task_curr(const struct task_struct *p); |
| 2086 | extern int idle_cpu(int cpu); | 2118 | extern int idle_cpu(int cpu); |
diff --git a/include/linux/sched/prio.h b/include/linux/sched/prio.h new file mode 100644 index 000000000000..ac322583c820 --- /dev/null +++ b/include/linux/sched/prio.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #ifndef _SCHED_PRIO_H | ||
| 2 | #define _SCHED_PRIO_H | ||
| 3 | |||
| 4 | #define MAX_NICE 19 | ||
| 5 | #define MIN_NICE -20 | ||
| 6 | #define NICE_WIDTH (MAX_NICE - MIN_NICE + 1) | ||
| 7 | |||
| 8 | /* | ||
| 9 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
| 10 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
| 11 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
| 12 | * values are inverted: lower p->prio value means higher priority. | ||
| 13 | * | ||
| 14 | * The MAX_USER_RT_PRIO value allows the actual maximum | ||
| 15 | * RT priority to be separate from the value exported to | ||
| 16 | * user-space. This allows kernel threads to set their | ||
| 17 | * priority to a value higher than any user task. Note: | ||
| 18 | * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #define MAX_USER_RT_PRIO 100 | ||
| 22 | #define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
| 23 | |||
| 24 | #define MAX_PRIO (MAX_RT_PRIO + NICE_WIDTH) | ||
| 25 | #define DEFAULT_PRIO (MAX_RT_PRIO + NICE_WIDTH / 2) | ||
| 26 | |||
| 27 | /* | ||
| 28 | * Convert user-nice values [ -20 ... 0 ... 19 ] | ||
| 29 | * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], | ||
| 30 | * and back. | ||
| 31 | */ | ||
| 32 | #define NICE_TO_PRIO(nice) ((nice) + DEFAULT_PRIO) | ||
| 33 | #define PRIO_TO_NICE(prio) ((prio) - DEFAULT_PRIO) | ||
| 34 | |||
| 35 | /* | ||
| 36 | * 'User priority' is the nice value converted to something we | ||
| 37 | * can work with better when scaling various scheduler parameters, | ||
| 38 | * it's a [ 0 ... 39 ] range. | ||
| 39 | */ | ||
| 40 | #define USER_PRIO(p) ((p)-MAX_RT_PRIO) | ||
| 41 | #define TASK_USER_PRIO(p) USER_PRIO((p)->static_prio) | ||
| 42 | #define MAX_USER_PRIO (USER_PRIO(MAX_PRIO)) | ||
| 43 | |||
| 44 | #endif /* _SCHED_PRIO_H */ | ||
diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h index 34e4ebea8fce..6341f5be6e24 100644 --- a/include/linux/sched/rt.h +++ b/include/linux/sched/rt.h | |||
| @@ -1,24 +1,7 @@ | |||
| 1 | #ifndef _SCHED_RT_H | 1 | #ifndef _SCHED_RT_H |
| 2 | #define _SCHED_RT_H | 2 | #define _SCHED_RT_H |
| 3 | 3 | ||
| 4 | /* | 4 | #include <linux/sched/prio.h> |
| 5 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
| 6 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
| 7 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
| 8 | * values are inverted: lower p->prio value means higher priority. | ||
| 9 | * | ||
| 10 | * The MAX_USER_RT_PRIO value allows the actual maximum | ||
| 11 | * RT priority to be separate from the value exported to | ||
| 12 | * user-space. This allows kernel threads to set their | ||
| 13 | * priority to a value higher than any user task. Note: | ||
| 14 | * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #define MAX_USER_RT_PRIO 100 | ||
| 18 | #define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
| 19 | |||
| 20 | #define MAX_PRIO (MAX_RT_PRIO + 40) | ||
| 21 | #define DEFAULT_PRIO (MAX_RT_PRIO + 20) | ||
| 22 | 5 | ||
| 23 | static inline int rt_prio(int prio) | 6 | static inline int rt_prio(int prio) |
| 24 | { | 7 | { |
| @@ -35,6 +18,7 @@ static inline int rt_task(struct task_struct *p) | |||
| 35 | #ifdef CONFIG_RT_MUTEXES | 18 | #ifdef CONFIG_RT_MUTEXES |
| 36 | extern int rt_mutex_getprio(struct task_struct *p); | 19 | extern int rt_mutex_getprio(struct task_struct *p); |
| 37 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 20 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
| 21 | extern int rt_mutex_check_prio(struct task_struct *task, int newprio); | ||
| 38 | extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task); | 22 | extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task); |
| 39 | extern void rt_mutex_adjust_pi(struct task_struct *p); | 23 | extern void rt_mutex_adjust_pi(struct task_struct *p); |
| 40 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | 24 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) |
| @@ -46,6 +30,12 @@ static inline int rt_mutex_getprio(struct task_struct *p) | |||
| 46 | { | 30 | { |
| 47 | return p->normal_prio; | 31 | return p->normal_prio; |
| 48 | } | 32 | } |
| 33 | |||
| 34 | static inline int rt_mutex_check_prio(struct task_struct *task, int newprio) | ||
| 35 | { | ||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 49 | static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task) | 39 | static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task) |
| 50 | { | 40 | { |
| 51 | return NULL; | 41 | return NULL; |
diff --git a/include/linux/security.h b/include/linux/security.h index 5623a7f965b7..2fc42d191f79 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1040,6 +1040,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1040 | * Allocate a security structure to the xp->security field; the security | 1040 | * Allocate a security structure to the xp->security field; the security |
| 1041 | * field is initialized to NULL when the xfrm_policy is allocated. | 1041 | * field is initialized to NULL when the xfrm_policy is allocated. |
| 1042 | * Return 0 if operation was successful (memory to allocate, legal context) | 1042 | * Return 0 if operation was successful (memory to allocate, legal context) |
| 1043 | * @gfp is to specify the context for the allocation | ||
| 1043 | * @xfrm_policy_clone_security: | 1044 | * @xfrm_policy_clone_security: |
| 1044 | * @old_ctx contains an existing xfrm_sec_ctx. | 1045 | * @old_ctx contains an existing xfrm_sec_ctx. |
| 1045 | * @new_ctxp contains a new xfrm_sec_ctx being cloned from old. | 1046 | * @new_ctxp contains a new xfrm_sec_ctx being cloned from old. |
| @@ -1683,7 +1684,7 @@ struct security_operations { | |||
| 1683 | 1684 | ||
| 1684 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 1685 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
| 1685 | int (*xfrm_policy_alloc_security) (struct xfrm_sec_ctx **ctxp, | 1686 | int (*xfrm_policy_alloc_security) (struct xfrm_sec_ctx **ctxp, |
| 1686 | struct xfrm_user_sec_ctx *sec_ctx); | 1687 | struct xfrm_user_sec_ctx *sec_ctx, gfp_t gfp); |
| 1687 | int (*xfrm_policy_clone_security) (struct xfrm_sec_ctx *old_ctx, struct xfrm_sec_ctx **new_ctx); | 1688 | int (*xfrm_policy_clone_security) (struct xfrm_sec_ctx *old_ctx, struct xfrm_sec_ctx **new_ctx); |
| 1688 | void (*xfrm_policy_free_security) (struct xfrm_sec_ctx *ctx); | 1689 | void (*xfrm_policy_free_security) (struct xfrm_sec_ctx *ctx); |
| 1689 | int (*xfrm_policy_delete_security) (struct xfrm_sec_ctx *ctx); | 1690 | int (*xfrm_policy_delete_security) (struct xfrm_sec_ctx *ctx); |
| @@ -2859,7 +2860,8 @@ static inline void security_skb_owned_by(struct sk_buff *skb, struct sock *sk) | |||
| 2859 | 2860 | ||
| 2860 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 2861 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
| 2861 | 2862 | ||
| 2862 | int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx); | 2863 | int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, |
| 2864 | struct xfrm_user_sec_ctx *sec_ctx, gfp_t gfp); | ||
| 2863 | int security_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx, struct xfrm_sec_ctx **new_ctxp); | 2865 | int security_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx, struct xfrm_sec_ctx **new_ctxp); |
| 2864 | void security_xfrm_policy_free(struct xfrm_sec_ctx *ctx); | 2866 | void security_xfrm_policy_free(struct xfrm_sec_ctx *ctx); |
| 2865 | int security_xfrm_policy_delete(struct xfrm_sec_ctx *ctx); | 2867 | int security_xfrm_policy_delete(struct xfrm_sec_ctx *ctx); |
| @@ -2877,7 +2879,9 @@ void security_skb_classify_flow(struct sk_buff *skb, struct flowi *fl); | |||
| 2877 | 2879 | ||
| 2878 | #else /* CONFIG_SECURITY_NETWORK_XFRM */ | 2880 | #else /* CONFIG_SECURITY_NETWORK_XFRM */ |
| 2879 | 2881 | ||
| 2880 | static inline int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx) | 2882 | static inline int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, |
| 2883 | struct xfrm_user_sec_ctx *sec_ctx, | ||
| 2884 | gfp_t gfp) | ||
| 2881 | { | 2885 | { |
| 2882 | return 0; | 2886 | return 0; |
| 2883 | } | 2887 | } |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 3ebbbe7b6d05..15ede6a823a6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -2451,8 +2451,8 @@ int skb_splice_bits(struct sk_buff *skb, unsigned int offset, | |||
| 2451 | unsigned int flags); | 2451 | unsigned int flags); |
| 2452 | void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); | 2452 | void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); |
| 2453 | unsigned int skb_zerocopy_headlen(const struct sk_buff *from); | 2453 | unsigned int skb_zerocopy_headlen(const struct sk_buff *from); |
| 2454 | void skb_zerocopy(struct sk_buff *to, const struct sk_buff *from, | 2454 | int skb_zerocopy(struct sk_buff *to, struct sk_buff *from, |
| 2455 | int len, int hlen); | 2455 | int len, int hlen); |
| 2456 | void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); | 2456 | void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); |
| 2457 | int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); | 2457 | int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); |
| 2458 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); | 2458 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); |
| @@ -2725,7 +2725,7 @@ static inline void nf_reset(struct sk_buff *skb) | |||
| 2725 | 2725 | ||
| 2726 | static inline void nf_reset_trace(struct sk_buff *skb) | 2726 | static inline void nf_reset_trace(struct sk_buff *skb) |
| 2727 | { | 2727 | { |
| 2728 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) | 2728 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES) |
| 2729 | skb->nf_trace = 0; | 2729 | skb->nf_trace = 0; |
| 2730 | #endif | 2730 | #endif |
| 2731 | } | 2731 | } |
| @@ -2742,6 +2742,9 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) | |||
| 2742 | dst->nf_bridge = src->nf_bridge; | 2742 | dst->nf_bridge = src->nf_bridge; |
| 2743 | nf_bridge_get(src->nf_bridge); | 2743 | nf_bridge_get(src->nf_bridge); |
| 2744 | #endif | 2744 | #endif |
| 2745 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES) | ||
| 2746 | dst->nf_trace = src->nf_trace; | ||
| 2747 | #endif | ||
| 2745 | } | 2748 | } |
| 2746 | 2749 | ||
| 2747 | static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) | 2750 | static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 9260abdd67df..b5b2df60299e 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -410,7 +410,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | |||
| 410 | * | 410 | * |
| 411 | * %GFP_NOWAIT - Allocation will not sleep. | 411 | * %GFP_NOWAIT - Allocation will not sleep. |
| 412 | * | 412 | * |
| 413 | * %GFP_THISNODE - Allocate node-local memory only. | 413 | * %__GFP_THISNODE - Allocate node-local memory only. |
| 414 | * | 414 | * |
| 415 | * %GFP_DMA - Allocation suitable for DMA. | 415 | * %GFP_DMA - Allocation suitable for DMA. |
| 416 | * Should only be used for kmalloc() caches. Otherwise, use a | 416 | * Should only be used for kmalloc() caches. Otherwise, use a |
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 9b058eecd403..a2783cb5d275 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
| @@ -12,8 +12,8 @@ | |||
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | 13 | * |
| 14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, you can access it online at |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * http://www.gnu.org/licenses/gpl-2.0.html. |
| 17 | * | 17 | * |
| 18 | * Copyright (C) IBM Corporation, 2006 | 18 | * Copyright (C) IBM Corporation, 2006 |
| 19 | * Copyright (C) Fujitsu, 2012 | 19 | * Copyright (C) Fujitsu, 2012 |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a747a77ea584..1e67b7a5968c 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -98,6 +98,8 @@ struct sigaltstack; | |||
| 98 | #define __MAP(n,...) __MAP##n(__VA_ARGS__) | 98 | #define __MAP(n,...) __MAP##n(__VA_ARGS__) |
| 99 | 99 | ||
| 100 | #define __SC_DECL(t, a) t a | 100 | #define __SC_DECL(t, a) t a |
| 101 | #define __TYPE_IS_L(t) (__same_type((t)0, 0L)) | ||
| 102 | #define __TYPE_IS_UL(t) (__same_type((t)0, 0UL)) | ||
| 101 | #define __TYPE_IS_LL(t) (__same_type((t)0, 0LL) || __same_type((t)0, 0ULL)) | 103 | #define __TYPE_IS_LL(t) (__same_type((t)0, 0LL) || __same_type((t)0, 0ULL)) |
| 102 | #define __SC_LONG(t, a) __typeof(__builtin_choose_expr(__TYPE_IS_LL(t), 0LL, 0L)) a | 104 | #define __SC_LONG(t, a) __typeof(__builtin_choose_expr(__TYPE_IS_LL(t), 0LL, 0L)) a |
| 103 | #define __SC_CAST(t, a) (t) a | 105 | #define __SC_CAST(t, a) (t) a |
diff --git a/include/linux/torture.h b/include/linux/torture.h new file mode 100644 index 000000000000..b2e2b468e511 --- /dev/null +++ b/include/linux/torture.h | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | /* | ||
| 2 | * Common functions for in-kernel torture tests. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, you can access it online at | ||
| 16 | * http://www.gnu.org/licenses/gpl-2.0.html. | ||
| 17 | * | ||
| 18 | * Copyright IBM Corporation, 2014 | ||
| 19 | * | ||
| 20 | * Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __LINUX_TORTURE_H | ||
| 24 | #define __LINUX_TORTURE_H | ||
| 25 | |||
| 26 | #include <linux/types.h> | ||
| 27 | #include <linux/cache.h> | ||
| 28 | #include <linux/spinlock.h> | ||
| 29 | #include <linux/threads.h> | ||
| 30 | #include <linux/cpumask.h> | ||
| 31 | #include <linux/seqlock.h> | ||
| 32 | #include <linux/lockdep.h> | ||
| 33 | #include <linux/completion.h> | ||
| 34 | #include <linux/debugobjects.h> | ||
| 35 | #include <linux/bug.h> | ||
| 36 | #include <linux/compiler.h> | ||
| 37 | |||
| 38 | /* Definitions for a non-string torture-test module parameter. */ | ||
| 39 | #define torture_param(type, name, init, msg) \ | ||
| 40 | static type name = init; \ | ||
| 41 | module_param(name, type, 0444); \ | ||
| 42 | MODULE_PARM_DESC(name, msg); | ||
| 43 | |||
| 44 | #define TORTURE_FLAG "-torture:" | ||
| 45 | #define TOROUT_STRING(s) \ | ||
| 46 | pr_alert("%s" TORTURE_FLAG s "\n", torture_type) | ||
| 47 | #define VERBOSE_TOROUT_STRING(s) \ | ||
| 48 | do { if (verbose) pr_alert("%s" TORTURE_FLAG " %s\n", torture_type, s); } while (0) | ||
| 49 | #define VERBOSE_TOROUT_ERRSTRING(s) \ | ||
| 50 | do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! %s\n", torture_type, s); } while (0) | ||
| 51 | |||
| 52 | /* Definitions for a non-string torture-test module parameter. */ | ||
| 53 | #define torture_parm(type, name, init, msg) \ | ||
| 54 | static type name = init; \ | ||
| 55 | module_param(name, type, 0444); \ | ||
| 56 | MODULE_PARM_DESC(name, msg); | ||
| 57 | |||
| 58 | /* Definitions for online/offline exerciser. */ | ||
| 59 | int torture_onoff_init(long ooholdoff, long oointerval); | ||
| 60 | char *torture_onoff_stats(char *page); | ||
| 61 | bool torture_onoff_failures(void); | ||
| 62 | |||
| 63 | /* Low-rider random number generator. */ | ||
| 64 | struct torture_random_state { | ||
| 65 | unsigned long trs_state; | ||
| 66 | long trs_count; | ||
| 67 | }; | ||
| 68 | #define DEFINE_TORTURE_RANDOM(name) struct torture_random_state name = { 0, 0 } | ||
| 69 | unsigned long torture_random(struct torture_random_state *trsp); | ||
| 70 | |||
| 71 | /* Task shuffler, which causes CPUs to occasionally go idle. */ | ||
| 72 | void torture_shuffle_task_register(struct task_struct *tp); | ||
| 73 | int torture_shuffle_init(long shuffint); | ||
| 74 | |||
| 75 | /* Test auto-shutdown handling. */ | ||
| 76 | void torture_shutdown_absorb(const char *title); | ||
| 77 | int torture_shutdown_init(int ssecs, void (*cleanup)(void)); | ||
| 78 | |||
| 79 | /* Task stuttering, which forces load/no-load transitions. */ | ||
| 80 | void stutter_wait(const char *title); | ||
| 81 | int torture_stutter_init(int s); | ||
| 82 | |||
| 83 | /* Initialization and cleanup. */ | ||
| 84 | void torture_init_begin(char *ttype, bool v, int *runnable); | ||
| 85 | void torture_init_end(void); | ||
| 86 | bool torture_cleanup(void); | ||
| 87 | bool torture_must_stop(void); | ||
| 88 | bool torture_must_stop_irq(void); | ||
| 89 | void torture_kthread_stopping(char *title); | ||
| 90 | int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m, | ||
| 91 | char *f, struct task_struct **tp); | ||
| 92 | void _torture_stop_kthread(char *m, struct task_struct **tp); | ||
| 93 | |||
| 94 | #define torture_create_kthread(n, arg, tp) \ | ||
| 95 | _torture_create_kthread(n, (arg), #n, "Creating " #n " task", \ | ||
| 96 | "Failed to create " #n, &(tp)) | ||
| 97 | #define torture_stop_kthread(n, tp) \ | ||
| 98 | _torture_stop_kthread("Stopping " #n " task", &(tp)) | ||
| 99 | |||
| 100 | #endif /* __LINUX_TORTURE_H */ | ||
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index accc497f8d72..7159a0a933df 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -60,6 +60,12 @@ struct tp_module { | |||
| 60 | unsigned int num_tracepoints; | 60 | unsigned int num_tracepoints; |
| 61 | struct tracepoint * const *tracepoints_ptrs; | 61 | struct tracepoint * const *tracepoints_ptrs; |
| 62 | }; | 62 | }; |
| 63 | bool trace_module_has_bad_taint(struct module *mod); | ||
| 64 | #else | ||
| 65 | static inline bool trace_module_has_bad_taint(struct module *mod) | ||
| 66 | { | ||
| 67 | return false; | ||
| 68 | } | ||
| 63 | #endif /* CONFIG_MODULES */ | 69 | #endif /* CONFIG_MODULES */ |
| 64 | 70 | ||
| 65 | struct tracepoint_iter { | 71 | struct tracepoint_iter { |
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index c3fa80745996..2c14d9cdd57a 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
| @@ -88,6 +88,7 @@ | |||
| 88 | #define cdc_ncm_data_intf_is_mbim(x) ((x)->desc.bInterfaceProtocol == USB_CDC_MBIM_PROTO_NTB) | 88 | #define cdc_ncm_data_intf_is_mbim(x) ((x)->desc.bInterfaceProtocol == USB_CDC_MBIM_PROTO_NTB) |
| 89 | 89 | ||
| 90 | struct cdc_ncm_ctx { | 90 | struct cdc_ncm_ctx { |
| 91 | struct usb_cdc_ncm_ntb_parameters ncm_parm; | ||
| 91 | struct hrtimer tx_timer; | 92 | struct hrtimer tx_timer; |
| 92 | struct tasklet_struct bh; | 93 | struct tasklet_struct bh; |
| 93 | 94 | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index e303eef94dd5..0662e98fef72 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -30,7 +30,7 @@ struct usbnet { | |||
| 30 | struct driver_info *driver_info; | 30 | struct driver_info *driver_info; |
| 31 | const char *driver_name; | 31 | const char *driver_name; |
| 32 | void *driver_priv; | 32 | void *driver_priv; |
| 33 | wait_queue_head_t *wait; | 33 | wait_queue_head_t wait; |
| 34 | struct mutex phy_mutex; | 34 | struct mutex phy_mutex; |
| 35 | unsigned char suspend_count; | 35 | unsigned char suspend_count; |
| 36 | unsigned char pkt_cnt, pkt_err; | 36 | unsigned char pkt_cnt, pkt_err; |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 704f4f652d0a..1b22c42e9c2d 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -177,20 +177,10 @@ struct execute_work { | |||
| 177 | #define DECLARE_DEFERRABLE_WORK(n, f) \ | 177 | #define DECLARE_DEFERRABLE_WORK(n, f) \ |
| 178 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f, TIMER_DEFERRABLE) | 178 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f, TIMER_DEFERRABLE) |
| 179 | 179 | ||
| 180 | /* | ||
| 181 | * initialize a work item's function pointer | ||
| 182 | */ | ||
| 183 | #define PREPARE_WORK(_work, _func) \ | ||
| 184 | do { \ | ||
| 185 | (_work)->func = (_func); \ | ||
| 186 | } while (0) | ||
| 187 | |||
| 188 | #define PREPARE_DELAYED_WORK(_work, _func) \ | ||
| 189 | PREPARE_WORK(&(_work)->work, (_func)) | ||
| 190 | |||
| 191 | #ifdef CONFIG_DEBUG_OBJECTS_WORK | 180 | #ifdef CONFIG_DEBUG_OBJECTS_WORK |
| 192 | extern void __init_work(struct work_struct *work, int onstack); | 181 | extern void __init_work(struct work_struct *work, int onstack); |
| 193 | extern void destroy_work_on_stack(struct work_struct *work); | 182 | extern void destroy_work_on_stack(struct work_struct *work); |
| 183 | extern void destroy_delayed_work_on_stack(struct delayed_work *work); | ||
| 194 | static inline unsigned int work_static(struct work_struct *work) | 184 | static inline unsigned int work_static(struct work_struct *work) |
| 195 | { | 185 | { |
| 196 | return *work_data_bits(work) & WORK_STRUCT_STATIC; | 186 | return *work_data_bits(work) & WORK_STRUCT_STATIC; |
| @@ -198,6 +188,7 @@ static inline unsigned int work_static(struct work_struct *work) | |||
| 198 | #else | 188 | #else |
| 199 | static inline void __init_work(struct work_struct *work, int onstack) { } | 189 | static inline void __init_work(struct work_struct *work, int onstack) { } |
| 200 | static inline void destroy_work_on_stack(struct work_struct *work) { } | 190 | static inline void destroy_work_on_stack(struct work_struct *work) { } |
| 191 | static inline void destroy_delayed_work_on_stack(struct delayed_work *work) { } | ||
| 201 | static inline unsigned int work_static(struct work_struct *work) { return 0; } | 192 | static inline unsigned int work_static(struct work_struct *work) { return 0; } |
| 202 | #endif | 193 | #endif |
| 203 | 194 | ||
| @@ -217,7 +208,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
| 217 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ | 208 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ |
| 218 | lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0); \ | 209 | lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0); \ |
| 219 | INIT_LIST_HEAD(&(_work)->entry); \ | 210 | INIT_LIST_HEAD(&(_work)->entry); \ |
| 220 | PREPARE_WORK((_work), (_func)); \ | 211 | (_work)->func = (_func); \ |
| 221 | } while (0) | 212 | } while (0) |
| 222 | #else | 213 | #else |
| 223 | #define __INIT_WORK(_work, _func, _onstack) \ | 214 | #define __INIT_WORK(_work, _func, _onstack) \ |
| @@ -225,7 +216,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
| 225 | __init_work((_work), _onstack); \ | 216 | __init_work((_work), _onstack); \ |
| 226 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ | 217 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ |
| 227 | INIT_LIST_HEAD(&(_work)->entry); \ | 218 | INIT_LIST_HEAD(&(_work)->entry); \ |
| 228 | PREPARE_WORK((_work), (_func)); \ | 219 | (_work)->func = (_func); \ |
| 229 | } while (0) | 220 | } while (0) |
| 230 | #endif | 221 | #endif |
| 231 | 222 | ||
| @@ -295,17 +286,11 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
| 295 | * Documentation/workqueue.txt. | 286 | * Documentation/workqueue.txt. |
| 296 | */ | 287 | */ |
| 297 | enum { | 288 | enum { |
| 298 | /* | ||
| 299 | * All wqs are now non-reentrant making the following flag | ||
| 300 | * meaningless. Will be removed. | ||
| 301 | */ | ||
| 302 | WQ_NON_REENTRANT = 1 << 0, /* DEPRECATED */ | ||
| 303 | |||
| 304 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ | 289 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ |
| 305 | WQ_FREEZABLE = 1 << 2, /* freeze during suspend */ | 290 | WQ_FREEZABLE = 1 << 2, /* freeze during suspend */ |
| 306 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ | 291 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ |
| 307 | WQ_HIGHPRI = 1 << 4, /* high priority */ | 292 | WQ_HIGHPRI = 1 << 4, /* high priority */ |
| 308 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ | 293 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu intensive workqueue */ |
| 309 | WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */ | 294 | WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */ |
| 310 | 295 | ||
| 311 | /* | 296 | /* |
| @@ -602,21 +587,6 @@ static inline bool keventd_up(void) | |||
| 602 | return system_wq != NULL; | 587 | return system_wq != NULL; |
| 603 | } | 588 | } |
| 604 | 589 | ||
| 605 | /* | ||
| 606 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, | ||
| 607 | * if it returns 0 the timer function may be running and the queueing is in | ||
| 608 | * progress. | ||
| 609 | */ | ||
| 610 | static inline bool __deprecated __cancel_delayed_work(struct delayed_work *work) | ||
| 611 | { | ||
| 612 | bool ret; | ||
| 613 | |||
| 614 | ret = del_timer(&work->timer); | ||
| 615 | if (ret) | ||
| 616 | work_clear_pending(&work->work); | ||
| 617 | return ret; | ||
| 618 | } | ||
| 619 | |||
| 620 | /* used to be different but now identical to flush_work(), deprecated */ | 590 | /* used to be different but now identical to flush_work(), deprecated */ |
| 621 | static inline bool __deprecated flush_work_sync(struct work_struct *work) | 591 | static inline bool __deprecated flush_work_sync(struct work_struct *work) |
| 622 | { | 592 | { |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index fc0e4320aa6d..021b8a319b9e 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -97,7 +97,7 @@ void writeback_inodes_sb_nr(struct super_block *, unsigned long nr, | |||
| 97 | int try_to_writeback_inodes_sb(struct super_block *, enum wb_reason reason); | 97 | int try_to_writeback_inodes_sb(struct super_block *, enum wb_reason reason); |
| 98 | int try_to_writeback_inodes_sb_nr(struct super_block *, unsigned long nr, | 98 | int try_to_writeback_inodes_sb_nr(struct super_block *, unsigned long nr, |
| 99 | enum wb_reason reason); | 99 | enum wb_reason reason); |
| 100 | void sync_inodes_sb(struct super_block *sb, unsigned long older_than_this); | 100 | void sync_inodes_sb(struct super_block *); |
| 101 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); | 101 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); |
| 102 | void inode_wait_for_writeback(struct inode *inode); | 102 | void inode_wait_for_writeback(struct inode *inode); |
| 103 | 103 | ||
