diff options
| author | Jens Axboe <axboe@kernel.dk> | 2013-04-02 04:04:39 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2013-04-02 04:04:39 -0400 |
| commit | 64f8de4da7d3962632f152d3d702d68bb8accc29 (patch) | |
| tree | c90a872a6d91c824635d59572e1e578980f4bc98 /include | |
| parent | f1fb3449efd5c49b48e35746bc7283eb9c73e3a0 (diff) | |
| parent | b5c872ddb7083c7909fb76a170c3807e04564bb3 (diff) | |
Merge branch 'writeback-workqueue' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq into for-3.10/core
Tejun writes:
-----
This is the pull request for the earlier patchset[1] with the same
name. It's only three patches (the first one was committed to
workqueue tree) but the merge strategy is a bit involved due to the
dependencies.
* Because the conversion needs features from wq/for-3.10,
block/for-3.10/core is based on rc3, and wq/for-3.10 has conflicts
with rc3, I pulled mainline (rc5) into wq/for-3.10 to prevent those
workqueue conflicts from flaring up in block tree.
* Resolving the issue that Jan and Dave raised about debugging
requires arch-wide changes. The patchset is being worked on[2] but
it'll have to go through -mm after these changes show up in -next,
and not included in this pull request.
The three commits are located in the following git branch.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git writeback-workqueue
Pulling it into block/for-3.10/core produces a conflict in
drivers/md/raid5.c between the following two commits.
e3620a3ad5 ("MD RAID5: Avoid accessing gendisk or queue structs when not available")
2f6db2a707 ("raid5: use bio_reset()")
The conflict is trivial - one removes an "if ()" conditional while the
other removes "rbi->bi_next = NULL" right above it. We just need to
remove both. The merged branch is available at
git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git block-test-merge
so that you can use it for verification. The test merge commit has
proper merge description.
While these changes are a bit of pain to route, they make code simpler
and even have, while minute, measureable performance gain[3] even on a
workload which isn't particularly favorable to showing the benefits of
this conversion.
----
Fixed up the conflict.
Conflicts:
drivers/md/raid5.c
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
42 files changed, 352 insertions, 84 deletions
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index a386b0b654cc..918e8fe2f5e9 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -581,7 +581,11 @@ | |||
| 581 | {0x1002, 0x9908, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 581 | {0x1002, 0x9908, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 582 | {0x1002, 0x9909, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 582 | {0x1002, 0x9909, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 583 | {0x1002, 0x990A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 583 | {0x1002, 0x990A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 584 | {0x1002, 0x990F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 584 | {0x1002, 0x990B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 585 | {0x1002, 0x990C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 586 | {0x1002, 0x990D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 587 | {0x1002, 0x990E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 588 | {0x1002, 0x990F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 585 | {0x1002, 0x9910, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 589 | {0x1002, 0x9910, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 586 | {0x1002, 0x9913, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 590 | {0x1002, 0x9913, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 587 | {0x1002, 0x9917, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 591 | {0x1002, 0x9917, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| @@ -592,6 +596,13 @@ | |||
| 592 | {0x1002, 0x9992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 596 | {0x1002, 0x9992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 593 | {0x1002, 0x9993, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 597 | {0x1002, 0x9993, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 594 | {0x1002, 0x9994, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 598 | {0x1002, 0x9994, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 599 | {0x1002, 0x9995, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 600 | {0x1002, 0x9996, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 601 | {0x1002, 0x9997, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 602 | {0x1002, 0x9998, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 603 | {0x1002, 0x9999, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 604 | {0x1002, 0x999A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 605 | {0x1002, 0x999B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 595 | {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 606 | {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 596 | {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 607 | {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 597 | {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 608 | {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 350459910fe1..c3881553f7d1 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/writeback.h> | 18 | #include <linux/writeback.h> |
| 19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | #include <linux/sysctl.h> | 20 | #include <linux/sysctl.h> |
| 21 | #include <linux/workqueue.h> | ||
| 21 | 22 | ||
| 22 | struct page; | 23 | struct page; |
| 23 | struct device; | 24 | struct device; |
| @@ -27,7 +28,6 @@ struct dentry; | |||
| 27 | * Bits in backing_dev_info.state | 28 | * Bits in backing_dev_info.state |
| 28 | */ | 29 | */ |
| 29 | enum bdi_state { | 30 | enum bdi_state { |
| 30 | BDI_pending, /* On its way to being activated */ | ||
| 31 | BDI_wb_alloc, /* Default embedded wb allocated */ | 31 | BDI_wb_alloc, /* Default embedded wb allocated */ |
| 32 | BDI_async_congested, /* The async (write) queue is getting full */ | 32 | BDI_async_congested, /* The async (write) queue is getting full */ |
| 33 | BDI_sync_congested, /* The sync queue is getting full */ | 33 | BDI_sync_congested, /* The sync queue is getting full */ |
| @@ -53,10 +53,8 @@ struct bdi_writeback { | |||
| 53 | unsigned int nr; | 53 | unsigned int nr; |
| 54 | 54 | ||
| 55 | unsigned long last_old_flush; /* last old data flush */ | 55 | unsigned long last_old_flush; /* last old data flush */ |
| 56 | unsigned long last_active; /* last time bdi thread was active */ | ||
| 57 | 56 | ||
| 58 | struct task_struct *task; /* writeback thread */ | 57 | struct delayed_work dwork; /* work item used for writeback */ |
| 59 | struct timer_list wakeup_timer; /* used for delayed bdi thread wakeup */ | ||
| 60 | struct list_head b_dirty; /* dirty inodes */ | 58 | struct list_head b_dirty; /* dirty inodes */ |
| 61 | struct list_head b_io; /* parked for writeback */ | 59 | struct list_head b_io; /* parked for writeback */ |
| 62 | struct list_head b_more_io; /* parked for more writeback */ | 60 | struct list_head b_more_io; /* parked for more writeback */ |
| @@ -123,14 +121,15 @@ int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | |||
| 123 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, | 121 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, |
| 124 | enum wb_reason reason); | 122 | enum wb_reason reason); |
| 125 | void bdi_start_background_writeback(struct backing_dev_info *bdi); | 123 | void bdi_start_background_writeback(struct backing_dev_info *bdi); |
| 126 | int bdi_writeback_thread(void *data); | 124 | void bdi_writeback_workfn(struct work_struct *work); |
| 127 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 125 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
| 128 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | 126 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); |
| 129 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); | 127 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); |
| 130 | 128 | ||
| 131 | extern spinlock_t bdi_lock; | 129 | extern spinlock_t bdi_lock; |
| 132 | extern struct list_head bdi_list; | 130 | extern struct list_head bdi_list; |
| 133 | extern struct list_head bdi_pending_list; | 131 | |
| 132 | extern struct workqueue_struct *bdi_wq; | ||
| 134 | 133 | ||
| 135 | static inline int wb_has_dirty_io(struct bdi_writeback *wb) | 134 | static inline int wb_has_dirty_io(struct bdi_writeback *wb) |
| 136 | { | 135 | { |
| @@ -336,11 +335,6 @@ static inline bool bdi_cap_swap_backed(struct backing_dev_info *bdi) | |||
| 336 | return bdi->capabilities & BDI_CAP_SWAP_BACKED; | 335 | return bdi->capabilities & BDI_CAP_SWAP_BACKED; |
| 337 | } | 336 | } |
| 338 | 337 | ||
| 339 | static inline bool bdi_cap_flush_forker(struct backing_dev_info *bdi) | ||
| 340 | { | ||
| 341 | return bdi == &default_backing_dev_info; | ||
| 342 | } | ||
| 343 | |||
| 344 | static inline bool mapping_cap_writeback_dirty(struct address_space *mapping) | 338 | static inline bool mapping_cap_writeback_dirty(struct address_space *mapping) |
| 345 | { | 339 | { |
| 346 | return bdi_cap_writeback_dirty(mapping->backing_dev_info); | 340 | return bdi_cap_writeback_dirty(mapping->backing_dev_info); |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 032560295fcb..d08e4d2a9b92 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -591,6 +591,21 @@ static inline int cpulist_scnprintf(char *buf, int len, | |||
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | /** | 593 | /** |
| 594 | * cpumask_parse - extract a cpumask from from a string | ||
| 595 | * @buf: the buffer to extract from | ||
| 596 | * @dstp: the cpumask to set. | ||
| 597 | * | ||
| 598 | * Returns -errno, or 0 for success. | ||
| 599 | */ | ||
| 600 | static inline int cpumask_parse(const char *buf, struct cpumask *dstp) | ||
| 601 | { | ||
| 602 | char *nl = strchr(buf, '\n'); | ||
| 603 | int len = nl ? nl - buf : strlen(buf); | ||
| 604 | |||
| 605 | return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpumask_bits); | ||
| 606 | } | ||
| 607 | |||
| 608 | /** | ||
| 594 | * cpulist_parse - extract a cpumask from a user string of ranges | 609 | * cpulist_parse - extract a cpumask from a user string of ranges |
| 595 | * @buf: the buffer to extract from | 610 | * @buf: the buffer to extract from |
| 596 | * @dstp: the cpumask to set. | 611 | * @dstp: the cpumask to set. |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index a975de1ff59f..3bd46f766751 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
| @@ -51,7 +51,7 @@ struct task_struct; | |||
| 51 | extern void debug_show_all_locks(void); | 51 | extern void debug_show_all_locks(void); |
| 52 | extern void debug_show_held_locks(struct task_struct *task); | 52 | extern void debug_show_held_locks(struct task_struct *task); |
| 53 | extern void debug_check_no_locks_freed(const void *from, unsigned long len); | 53 | extern void debug_check_no_locks_freed(const void *from, unsigned long len); |
| 54 | extern void debug_check_no_locks_held(void); | 54 | extern void debug_check_no_locks_held(struct task_struct *task); |
| 55 | #else | 55 | #else |
| 56 | static inline void debug_show_all_locks(void) | 56 | static inline void debug_show_all_locks(void) |
| 57 | { | 57 | { |
| @@ -67,7 +67,7 @@ debug_check_no_locks_freed(const void *from, unsigned long len) | |||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | static inline void | 69 | static inline void |
| 70 | debug_check_no_locks_held(void) | 70 | debug_check_no_locks_held(struct task_struct *task) |
| 71 | { | 71 | { |
| 72 | } | 72 | } |
| 73 | #endif | 73 | #endif |
diff --git a/include/linux/device.h b/include/linux/device.h index 9d6464ea99c6..ee10d4e7be1a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -302,6 +302,8 @@ void subsys_interface_unregister(struct subsys_interface *sif); | |||
| 302 | 302 | ||
| 303 | int subsys_system_register(struct bus_type *subsys, | 303 | int subsys_system_register(struct bus_type *subsys, |
| 304 | const struct attribute_group **groups); | 304 | const struct attribute_group **groups); |
| 305 | int subsys_virtual_register(struct bus_type *subsys, | ||
| 306 | const struct attribute_group **groups); | ||
| 305 | 307 | ||
| 306 | /** | 308 | /** |
| 307 | * struct class - device classes | 309 | * struct class - device classes |
diff --git a/include/linux/edac.h b/include/linux/edac.h index 4fd4999ccb5b..0b763276f619 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
| @@ -561,7 +561,6 @@ struct csrow_info { | |||
| 561 | 561 | ||
| 562 | u32 ue_count; /* Uncorrectable Errors for this csrow */ | 562 | u32 ue_count; /* Uncorrectable Errors for this csrow */ |
| 563 | u32 ce_count; /* Correctable Errors for this csrow */ | 563 | u32 ce_count; /* Correctable Errors for this csrow */ |
| 564 | u32 nr_pages; /* combined pages count of all channels */ | ||
| 565 | 564 | ||
| 566 | struct mem_ctl_info *mci; /* the parent */ | 565 | struct mem_ctl_info *mci; /* the parent */ |
| 567 | 566 | ||
| @@ -676,11 +675,11 @@ struct mem_ctl_info { | |||
| 676 | * sees memory sticks ("dimms"), and the ones that sees memory ranks. | 675 | * sees memory sticks ("dimms"), and the ones that sees memory ranks. |
| 677 | * All old memory controllers enumerate memories per rank, but most | 676 | * All old memory controllers enumerate memories per rank, but most |
| 678 | * of the recent drivers enumerate memories per DIMM, instead. | 677 | * of the recent drivers enumerate memories per DIMM, instead. |
| 679 | * When the memory controller is per rank, mem_is_per_rank is true. | 678 | * When the memory controller is per rank, csbased is true. |
| 680 | */ | 679 | */ |
| 681 | unsigned n_layers; | 680 | unsigned n_layers; |
| 682 | struct edac_mc_layer *layers; | 681 | struct edac_mc_layer *layers; |
| 683 | bool mem_is_per_rank; | 682 | bool csbased; |
| 684 | 683 | ||
| 685 | /* | 684 | /* |
| 686 | * DIMM info. Will eventually remove the entire csrows_info some day | 685 | * DIMM info. Will eventually remove the entire csrows_info some day |
| @@ -741,8 +740,6 @@ struct mem_ctl_info { | |||
| 741 | u32 fake_inject_ue; | 740 | u32 fake_inject_ue; |
| 742 | u16 fake_inject_count; | 741 | u16 fake_inject_count; |
| 743 | #endif | 742 | #endif |
| 744 | __u8 csbased : 1, /* csrow-based memory controller */ | ||
| 745 | __resv : 7; | ||
| 746 | }; | 743 | }; |
| 747 | 744 | ||
| 748 | #endif | 745 | #endif |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 043a5cf8b5ba..e70df40d84f6 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | #ifndef FREEZER_H_INCLUDED | 3 | #ifndef FREEZER_H_INCLUDED |
| 4 | #define FREEZER_H_INCLUDED | 4 | #define FREEZER_H_INCLUDED |
| 5 | 5 | ||
| 6 | #include <linux/debug_locks.h> | ||
| 7 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
| 8 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
| 9 | #include <linux/atomic.h> | 8 | #include <linux/atomic.h> |
| @@ -49,8 +48,6 @@ extern void thaw_kernel_threads(void); | |||
| 49 | 48 | ||
| 50 | static inline bool try_to_freeze(void) | 49 | static inline bool try_to_freeze(void) |
| 51 | { | 50 | { |
| 52 | if (!(current->flags & PF_NOFREEZE)) | ||
| 53 | debug_check_no_locks_held(); | ||
| 54 | might_sleep(); | 51 | might_sleep(); |
| 55 | if (likely(!freezing(current))) | 52 | if (likely(!freezing(current))) |
| 56 | return false; | 53 | return false; |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 729eded4b24f..2b93a9a5a1e6 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
| @@ -50,4 +50,6 @@ static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, | |||
| 50 | spin_unlock(&fs->lock); | 50 | spin_unlock(&fs->lock); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | extern bool current_chrooted(void); | ||
| 54 | |||
| 53 | #endif /* _LINUX_FS_STRUCT_H */ | 55 | #endif /* _LINUX_FS_STRUCT_H */ |
diff --git a/include/linux/hash.h b/include/linux/hash.h index 61c97ae22e01..f09a0ae4d858 100644 --- a/include/linux/hash.h +++ b/include/linux/hash.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
| 18 | #include <linux/compiler.h> | ||
| 18 | 19 | ||
| 19 | /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ | 20 | /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ |
| 20 | #define GOLDEN_RATIO_PRIME_32 0x9e370001UL | 21 | #define GOLDEN_RATIO_PRIME_32 0x9e370001UL |
| @@ -31,7 +32,7 @@ | |||
| 31 | #error Wordsize not 32 or 64 | 32 | #error Wordsize not 32 or 64 |
| 32 | #endif | 33 | #endif |
| 33 | 34 | ||
| 34 | static inline u64 hash_64(u64 val, unsigned int bits) | 35 | static __always_inline u64 hash_64(u64 val, unsigned int bits) |
| 35 | { | 36 | { |
| 36 | u64 hash = val; | 37 | u64 hash = val; |
| 37 | 38 | ||
diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h index f5dbce50466e..66017028dcb3 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h | |||
| @@ -37,7 +37,7 @@ void irq_work_sync(struct irq_work *work); | |||
| 37 | #ifdef CONFIG_IRQ_WORK | 37 | #ifdef CONFIG_IRQ_WORK |
| 38 | bool irq_work_needs_cpu(void); | 38 | bool irq_work_needs_cpu(void); |
| 39 | #else | 39 | #else |
| 40 | static bool irq_work_needs_cpu(void) { return false; } | 40 | static inline bool irq_work_needs_cpu(void) { return false; } |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | #endif /* _LINUX_IRQ_WORK_H */ | 43 | #endif /* _LINUX_IRQ_WORK_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 80d36874689b..79fdd80a42d4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -390,7 +390,6 @@ extern struct pid *session_of_pgrp(struct pid *pgrp); | |||
| 390 | unsigned long int_sqrt(unsigned long); | 390 | unsigned long int_sqrt(unsigned long); |
| 391 | 391 | ||
| 392 | extern void bust_spinlocks(int yes); | 392 | extern void bust_spinlocks(int yes); |
| 393 | extern void wake_up_klogd(void); | ||
| 394 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 393 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
| 395 | extern int panic_timeout; | 394 | extern int panic_timeout; |
| 396 | extern int panic_on_oops; | 395 | extern int panic_on_oops; |
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 5b18ecde69b5..1aa4f13cdfa6 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h | |||
| @@ -106,6 +106,29 @@ enum max77693_muic_reg { | |||
| 106 | MAX77693_MUIC_REG_END, | 106 | MAX77693_MUIC_REG_END, |
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | /* MAX77693 INTMASK1~2 Register */ | ||
| 110 | #define INTMASK1_ADC1K_SHIFT 3 | ||
| 111 | #define INTMASK1_ADCERR_SHIFT 2 | ||
| 112 | #define INTMASK1_ADCLOW_SHIFT 1 | ||
| 113 | #define INTMASK1_ADC_SHIFT 0 | ||
| 114 | #define INTMASK1_ADC1K_MASK (1 << INTMASK1_ADC1K_SHIFT) | ||
| 115 | #define INTMASK1_ADCERR_MASK (1 << INTMASK1_ADCERR_SHIFT) | ||
| 116 | #define INTMASK1_ADCLOW_MASK (1 << INTMASK1_ADCLOW_SHIFT) | ||
| 117 | #define INTMASK1_ADC_MASK (1 << INTMASK1_ADC_SHIFT) | ||
| 118 | |||
| 119 | #define INTMASK2_VIDRM_SHIFT 5 | ||
| 120 | #define INTMASK2_VBVOLT_SHIFT 4 | ||
| 121 | #define INTMASK2_DXOVP_SHIFT 3 | ||
| 122 | #define INTMASK2_DCDTMR_SHIFT 2 | ||
| 123 | #define INTMASK2_CHGDETRUN_SHIFT 1 | ||
| 124 | #define INTMASK2_CHGTYP_SHIFT 0 | ||
| 125 | #define INTMASK2_VIDRM_MASK (1 << INTMASK2_VIDRM_SHIFT) | ||
| 126 | #define INTMASK2_VBVOLT_MASK (1 << INTMASK2_VBVOLT_SHIFT) | ||
| 127 | #define INTMASK2_DXOVP_MASK (1 << INTMASK2_DXOVP_SHIFT) | ||
| 128 | #define INTMASK2_DCDTMR_MASK (1 << INTMASK2_DCDTMR_SHIFT) | ||
| 129 | #define INTMASK2_CHGDETRUN_MASK (1 << INTMASK2_CHGDETRUN_SHIFT) | ||
| 130 | #define INTMASK2_CHGTYP_MASK (1 << INTMASK2_CHGTYP_SHIFT) | ||
| 131 | |||
| 109 | /* MAX77693 MUIC - STATUS1~3 Register */ | 132 | /* MAX77693 MUIC - STATUS1~3 Register */ |
| 110 | #define STATUS1_ADC_SHIFT (0) | 133 | #define STATUS1_ADC_SHIFT (0) |
| 111 | #define STATUS1_ADCLOW_SHIFT (5) | 134 | #define STATUS1_ADCLOW_SHIFT (5) |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7acc9dc73c9f..e19ff30ad0a2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -87,7 +87,6 @@ extern unsigned int kobjsize(const void *objp); | |||
| 87 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ | 87 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ |
| 88 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 88 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
| 89 | 89 | ||
| 90 | #define VM_POPULATE 0x00001000 | ||
| 91 | #define VM_LOCKED 0x00002000 | 90 | #define VM_LOCKED 0x00002000 |
| 92 | #define VM_IO 0x00004000 /* Memory mapped I/O or similar */ | 91 | #define VM_IO 0x00004000 /* Memory mapped I/O or similar */ |
| 93 | 92 | ||
diff --git a/include/linux/mman.h b/include/linux/mman.h index 61c7a87e5d2b..9aa863da287f 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
| @@ -79,8 +79,6 @@ calc_vm_flag_bits(unsigned long flags) | |||
| 79 | { | 79 | { |
| 80 | return _calc_vm_trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN ) | | 80 | return _calc_vm_trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN ) | |
| 81 | _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | | 81 | _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | |
| 82 | ((flags & MAP_LOCKED) ? (VM_LOCKED | VM_POPULATE) : 0) | | 82 | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); |
| 83 | (((flags & (MAP_POPULATE | MAP_NONBLOCK)) == MAP_POPULATE) ? | ||
| 84 | VM_POPULATE : 0); | ||
| 85 | } | 83 | } |
| 86 | #endif /* _LINUX_MMAN_H */ | 84 | #endif /* _LINUX_MMAN_H */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index ede274957e05..c74092eebf5c 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -527,7 +527,7 @@ static inline int zone_is_oom_locked(const struct zone *zone) | |||
| 527 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); | 527 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | static inline unsigned zone_end_pfn(const struct zone *zone) | 530 | static inline unsigned long zone_end_pfn(const struct zone *zone) |
| 531 | { | 531 | { |
| 532 | return zone->zone_start_pfn + zone->spanned_pages; | 532 | return zone->zone_start_pfn + zone->spanned_pages; |
| 533 | } | 533 | } |
diff --git a/include/linux/mount.h b/include/linux/mount.h index d7029f4a191a..73005f9957ea 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -47,6 +47,8 @@ struct mnt_namespace; | |||
| 47 | 47 | ||
| 48 | #define MNT_INTERNAL 0x4000 | 48 | #define MNT_INTERNAL 0x4000 |
| 49 | 49 | ||
| 50 | #define MNT_LOCK_READONLY 0x400000 | ||
| 51 | |||
| 50 | struct vfsmount { | 52 | struct vfsmount { |
| 51 | struct dentry *mnt_root; /* root of the mounted tree */ | 53 | struct dentry *mnt_root; /* root of the mounted tree */ |
| 52 | struct super_block *mnt_sb; /* pointer to superblock */ | 54 | struct super_block *mnt_sb; /* pointer to superblock */ |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 7ccb3c59ed60..ef52d9c91459 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -187,6 +187,13 @@ typedef enum { | |||
| 187 | * This happens with the Renesas AG-AND chips, possibly others. | 187 | * This happens with the Renesas AG-AND chips, possibly others. |
| 188 | */ | 188 | */ |
| 189 | #define BBT_AUTO_REFRESH 0x00000080 | 189 | #define BBT_AUTO_REFRESH 0x00000080 |
| 190 | /* | ||
| 191 | * Chip requires ready check on read (for auto-incremented sequential read). | ||
| 192 | * True only for small page devices; large page devices do not support | ||
| 193 | * autoincrement. | ||
| 194 | */ | ||
| 195 | #define NAND_NEED_READRDY 0x00000100 | ||
| 196 | |||
| 190 | /* Chip does not allow subpage writes */ | 197 | /* Chip does not allow subpage writes */ |
| 191 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 | 198 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 |
| 192 | 199 | ||
diff --git a/include/linux/mxsfb.h b/include/linux/mxsfb.h index f14943d55315..f80af8674342 100644 --- a/include/linux/mxsfb.h +++ b/include/linux/mxsfb.h | |||
| @@ -24,8 +24,8 @@ | |||
| 24 | #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */ | 24 | #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */ |
| 25 | #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */ | 25 | #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */ |
| 26 | 26 | ||
| 27 | #define FB_SYNC_DATA_ENABLE_HIGH_ACT (1 << 6) | 27 | #define MXSFB_SYNC_DATA_ENABLE_HIGH_ACT (1 << 6) |
| 28 | #define FB_SYNC_DOTCLK_FAILING_ACT (1 << 7) /* failing/negtive edge sampling */ | 28 | #define MXSFB_SYNC_DOTCLK_FAILING_ACT (1 << 7) /* failing/negtive edge sampling */ |
| 29 | 29 | ||
| 30 | struct mxsfb_platform_data { | 30 | struct mxsfb_platform_data { |
| 31 | struct fb_videomode *mode_list; | 31 | struct fb_videomode *mode_list; |
| @@ -44,6 +44,9 @@ struct mxsfb_platform_data { | |||
| 44 | * allocated. If specified,fb_size must also be specified. | 44 | * allocated. If specified,fb_size must also be specified. |
| 45 | * fb_phys must be unused by Linux. | 45 | * fb_phys must be unused by Linux. |
| 46 | */ | 46 | */ |
| 47 | u32 sync; /* sync mask, contains MXSFB specifics not | ||
| 48 | * carried in fb_info->var.sync | ||
| 49 | */ | ||
| 47 | }; | 50 | }; |
| 48 | 51 | ||
| 49 | #endif /* __LINUX_MXSFB_H */ | 52 | #endif /* __LINUX_MXSFB_H */ |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index c25cccaa555a..4fa3b0b9b071 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -137,6 +137,34 @@ enum { | |||
| 137 | NVME_LBAF_RP_DEGRADED = 3, | 137 | NVME_LBAF_RP_DEGRADED = 3, |
| 138 | }; | 138 | }; |
| 139 | 139 | ||
| 140 | struct nvme_smart_log { | ||
| 141 | __u8 critical_warning; | ||
| 142 | __u8 temperature[2]; | ||
| 143 | __u8 avail_spare; | ||
| 144 | __u8 spare_thresh; | ||
| 145 | __u8 percent_used; | ||
| 146 | __u8 rsvd6[26]; | ||
| 147 | __u8 data_units_read[16]; | ||
| 148 | __u8 data_units_written[16]; | ||
| 149 | __u8 host_reads[16]; | ||
| 150 | __u8 host_writes[16]; | ||
| 151 | __u8 ctrl_busy_time[16]; | ||
| 152 | __u8 power_cycles[16]; | ||
| 153 | __u8 power_on_hours[16]; | ||
| 154 | __u8 unsafe_shutdowns[16]; | ||
| 155 | __u8 media_errors[16]; | ||
| 156 | __u8 num_err_log_entries[16]; | ||
| 157 | __u8 rsvd192[320]; | ||
| 158 | }; | ||
| 159 | |||
| 160 | enum { | ||
| 161 | NVME_SMART_CRIT_SPARE = 1 << 0, | ||
| 162 | NVME_SMART_CRIT_TEMPERATURE = 1 << 1, | ||
| 163 | NVME_SMART_CRIT_RELIABILITY = 1 << 2, | ||
| 164 | NVME_SMART_CRIT_MEDIA = 1 << 3, | ||
| 165 | NVME_SMART_CRIT_VOLATILE_MEMORY = 1 << 4, | ||
| 166 | }; | ||
| 167 | |||
| 140 | struct nvme_lba_range_type { | 168 | struct nvme_lba_range_type { |
| 141 | __u8 type; | 169 | __u8 type; |
| 142 | __u8 attributes; | 170 | __u8 attributes; |
diff --git a/include/linux/printk.h b/include/linux/printk.h index 1249a54d17e0..822171fcb1c8 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -134,6 +134,8 @@ extern int printk_delay_msec; | |||
| 134 | extern int dmesg_restrict; | 134 | extern int dmesg_restrict; |
| 135 | extern int kptr_restrict; | 135 | extern int kptr_restrict; |
| 136 | 136 | ||
| 137 | extern void wake_up_klogd(void); | ||
| 138 | |||
| 137 | void log_buf_kexec_setup(void); | 139 | void log_buf_kexec_setup(void); |
| 138 | void __init setup_log_buf(int early); | 140 | void __init setup_log_buf(int early); |
| 139 | #else | 141 | #else |
| @@ -162,6 +164,10 @@ static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, | |||
| 162 | return false; | 164 | return false; |
| 163 | } | 165 | } |
| 164 | 166 | ||
| 167 | static inline void wake_up_klogd(void) | ||
| 168 | { | ||
| 169 | } | ||
| 170 | |||
| 165 | static inline void log_buf_kexec_setup(void) | 171 | static inline void log_buf_kexec_setup(void) |
| 166 | { | 172 | { |
| 167 | } | 173 | } |
diff --git a/include/linux/sched.h b/include/linux/sched.h index d35d2b6ddbfb..e5c64f7b8c1d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1793,7 +1793,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, | |||
| 1793 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ | 1793 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ |
| 1794 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 1794 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
| 1795 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 1795 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
| 1796 | #define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */ | 1796 | #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */ |
| 1797 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ | 1797 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ |
| 1798 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 1798 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
| 1799 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1799 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 821c7f45d2a7..441f5bfdab8e 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -500,7 +500,7 @@ struct sk_buff { | |||
| 500 | union { | 500 | union { |
| 501 | __u32 mark; | 501 | __u32 mark; |
| 502 | __u32 dropcount; | 502 | __u32 dropcount; |
| 503 | __u32 avail_size; | 503 | __u32 reserved_tailroom; |
| 504 | }; | 504 | }; |
| 505 | 505 | ||
| 506 | sk_buff_data_t inner_transport_header; | 506 | sk_buff_data_t inner_transport_header; |
| @@ -1288,11 +1288,13 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, | |||
| 1288 | * do not lose pfmemalloc information as the pages would not be | 1288 | * do not lose pfmemalloc information as the pages would not be |
| 1289 | * allocated using __GFP_MEMALLOC. | 1289 | * allocated using __GFP_MEMALLOC. |
| 1290 | */ | 1290 | */ |
| 1291 | if (page->pfmemalloc && !page->mapping) | ||
| 1292 | skb->pfmemalloc = true; | ||
| 1293 | frag->page.p = page; | 1291 | frag->page.p = page; |
| 1294 | frag->page_offset = off; | 1292 | frag->page_offset = off; |
| 1295 | skb_frag_size_set(frag, size); | 1293 | skb_frag_size_set(frag, size); |
| 1294 | |||
| 1295 | page = compound_head(page); | ||
| 1296 | if (page->pfmemalloc && !page->mapping) | ||
| 1297 | skb->pfmemalloc = true; | ||
| 1296 | } | 1298 | } |
| 1297 | 1299 | ||
| 1298 | /** | 1300 | /** |
| @@ -1447,7 +1449,10 @@ static inline int skb_tailroom(const struct sk_buff *skb) | |||
| 1447 | */ | 1449 | */ |
| 1448 | static inline int skb_availroom(const struct sk_buff *skb) | 1450 | static inline int skb_availroom(const struct sk_buff *skb) |
| 1449 | { | 1451 | { |
| 1450 | return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len; | 1452 | if (skb_is_nonlinear(skb)) |
| 1453 | return 0; | ||
| 1454 | |||
| 1455 | return skb->end - skb->tail - skb->reserved_tailroom; | ||
| 1451 | } | 1456 | } |
| 1452 | 1457 | ||
| 1453 | /** | 1458 | /** |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index f0bd7f90a90d..e3c0ae9bb1fa 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | /* Adding event notification support elements */ | 44 | /* Adding event notification support elements */ |
| 45 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" | 45 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" |
| 46 | #define THERMAL_GENL_VERSION 0x01 | 46 | #define THERMAL_GENL_VERSION 0x01 |
| 47 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_group" | 47 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_grp" |
| 48 | 48 | ||
| 49 | /* Default Thermal Governor */ | 49 | /* Default Thermal Governor */ |
| 50 | #if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) | 50 | #if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 9d81de123c90..42278bbf7a88 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
| @@ -68,6 +68,7 @@ struct udp_sock { | |||
| 68 | * For encapsulation sockets. | 68 | * For encapsulation sockets. |
| 69 | */ | 69 | */ |
| 70 | int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); | 70 | int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); |
| 71 | void (*encap_destroy)(struct sock *sk); | ||
| 71 | }; | 72 | }; |
| 72 | 73 | ||
| 73 | static inline struct udp_sock *udp_sk(const struct sock *sk) | 74 | static inline struct udp_sock *udp_sk(const struct sock *sk) |
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index 3b8f9d4fc3fe..cc25b70af33c 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
| @@ -127,6 +127,7 @@ struct cdc_ncm_ctx { | |||
| 127 | u16 connected; | 127 | u16 connected; |
| 128 | }; | 128 | }; |
| 129 | 129 | ||
| 130 | extern u8 cdc_ncm_select_altsetting(struct usbnet *dev, struct usb_interface *intf); | ||
| 130 | extern int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting); | 131 | extern int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting); |
| 131 | extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf); | 132 | extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf); |
| 132 | extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign); | 133 | extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign); |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 0a78df5f6cfd..59694b5e5e90 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
| @@ -357,6 +357,7 @@ struct hc_driver { | |||
| 357 | */ | 357 | */ |
| 358 | int (*disable_usb3_lpm_timeout)(struct usb_hcd *, | 358 | int (*disable_usb3_lpm_timeout)(struct usb_hcd *, |
| 359 | struct usb_device *, enum usb3_link_state state); | 359 | struct usb_device *, enum usb3_link_state state); |
| 360 | int (*find_raw_port_number)(struct usb_hcd *, int); | ||
| 360 | }; | 361 | }; |
| 361 | 362 | ||
| 362 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); | 363 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
| @@ -396,6 +397,7 @@ extern int usb_hcd_is_primary_hcd(struct usb_hcd *hcd); | |||
| 396 | extern int usb_add_hcd(struct usb_hcd *hcd, | 397 | extern int usb_add_hcd(struct usb_hcd *hcd, |
| 397 | unsigned int irqnum, unsigned long irqflags); | 398 | unsigned int irqnum, unsigned long irqflags); |
| 398 | extern void usb_remove_hcd(struct usb_hcd *hcd); | 399 | extern void usb_remove_hcd(struct usb_hcd *hcd); |
| 400 | extern int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1); | ||
| 399 | 401 | ||
| 400 | struct platform_device; | 402 | struct platform_device; |
| 401 | extern void usb_hcd_platform_shutdown(struct platform_device *dev); | 403 | extern void usb_hcd_platform_shutdown(struct platform_device *dev); |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index ef9be7e1e190..1819b59aab2a 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -66,6 +66,7 @@ | |||
| 66 | * port. | 66 | * port. |
| 67 | * @flags: usb serial port flags | 67 | * @flags: usb serial port flags |
| 68 | * @write_wait: a wait_queue_head_t used by the port. | 68 | * @write_wait: a wait_queue_head_t used by the port. |
| 69 | * @delta_msr_wait: modem-status-change wait queue | ||
| 69 | * @work: work queue entry for the line discipline waking up. | 70 | * @work: work queue entry for the line discipline waking up. |
| 70 | * @throttled: nonzero if the read urb is inactive to throttle the device | 71 | * @throttled: nonzero if the read urb is inactive to throttle the device |
| 71 | * @throttle_req: nonzero if the tty wants to throttle us | 72 | * @throttle_req: nonzero if the tty wants to throttle us |
| @@ -112,6 +113,7 @@ struct usb_serial_port { | |||
| 112 | 113 | ||
| 113 | unsigned long flags; | 114 | unsigned long flags; |
| 114 | wait_queue_head_t write_wait; | 115 | wait_queue_head_t write_wait; |
| 116 | wait_queue_head_t delta_msr_wait; | ||
| 115 | struct work_struct work; | 117 | struct work_struct work; |
| 116 | char throttled; | 118 | char throttled; |
| 117 | char throttle_req; | 119 | char throttle_req; |
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h index 6f033a415ecb..5c295c26ad37 100644 --- a/include/linux/usb/ulpi.h +++ b/include/linux/usb/ulpi.h | |||
| @@ -181,8 +181,16 @@ | |||
| 181 | 181 | ||
| 182 | /*-------------------------------------------------------------------------*/ | 182 | /*-------------------------------------------------------------------------*/ |
| 183 | 183 | ||
| 184 | #if IS_ENABLED(CONFIG_USB_ULPI) | ||
| 184 | struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, | 185 | struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, |
| 185 | unsigned int flags); | 186 | unsigned int flags); |
| 187 | #else | ||
| 188 | static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, | ||
| 189 | unsigned int flags) | ||
| 190 | { | ||
| 191 | return NULL; | ||
| 192 | } | ||
| 193 | #endif | ||
| 186 | 194 | ||
| 187 | #ifdef CONFIG_USB_ULPI_VIEWPORT | 195 | #ifdef CONFIG_USB_ULPI_VIEWPORT |
| 188 | /* access ops for controllers with a viewport register */ | 196 | /* access ops for controllers with a viewport register */ |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 4ce009324933..b6b215f13b45 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
| @@ -26,6 +26,8 @@ struct user_namespace { | |||
| 26 | kuid_t owner; | 26 | kuid_t owner; |
| 27 | kgid_t group; | 27 | kgid_t group; |
| 28 | unsigned int proc_inum; | 28 | unsigned int proc_inum; |
| 29 | bool may_mount_sysfs; | ||
| 30 | bool may_mount_proc; | ||
| 29 | }; | 31 | }; |
| 30 | 32 | ||
| 31 | extern struct user_namespace init_user_ns; | 33 | extern struct user_namespace init_user_ns; |
| @@ -82,4 +84,6 @@ static inline void put_user_ns(struct user_namespace *ns) | |||
| 82 | 84 | ||
| 83 | #endif | 85 | #endif |
| 84 | 86 | ||
| 87 | void update_mnt_policy(struct user_namespace *userns); | ||
| 88 | |||
| 85 | #endif /* _LINUX_USER_H */ | 89 | #endif /* _LINUX_USER_H */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 8afab27cdbc2..717975639378 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/lockdep.h> | 11 | #include <linux/lockdep.h> |
| 12 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
| 13 | #include <linux/atomic.h> | 13 | #include <linux/atomic.h> |
| 14 | #include <linux/cpumask.h> | ||
| 14 | 15 | ||
| 15 | struct workqueue_struct; | 16 | struct workqueue_struct; |
| 16 | 17 | ||
| @@ -68,7 +69,7 @@ enum { | |||
| 68 | WORK_STRUCT_COLOR_BITS, | 69 | WORK_STRUCT_COLOR_BITS, |
| 69 | 70 | ||
| 70 | /* data contains off-queue information when !WORK_STRUCT_PWQ */ | 71 | /* data contains off-queue information when !WORK_STRUCT_PWQ */ |
| 71 | WORK_OFFQ_FLAG_BASE = WORK_STRUCT_FLAG_BITS, | 72 | WORK_OFFQ_FLAG_BASE = WORK_STRUCT_COLOR_SHIFT, |
| 72 | 73 | ||
| 73 | WORK_OFFQ_CANCELING = (1 << WORK_OFFQ_FLAG_BASE), | 74 | WORK_OFFQ_CANCELING = (1 << WORK_OFFQ_FLAG_BASE), |
| 74 | 75 | ||
| @@ -115,6 +116,20 @@ struct delayed_work { | |||
| 115 | int cpu; | 116 | int cpu; |
| 116 | }; | 117 | }; |
| 117 | 118 | ||
| 119 | /* | ||
| 120 | * A struct for workqueue attributes. This can be used to change | ||
| 121 | * attributes of an unbound workqueue. | ||
| 122 | * | ||
| 123 | * Unlike other fields, ->no_numa isn't a property of a worker_pool. It | ||
| 124 | * only modifies how apply_workqueue_attrs() select pools and thus doesn't | ||
| 125 | * participate in pool hash calculations or equality comparisons. | ||
| 126 | */ | ||
| 127 | struct workqueue_attrs { | ||
| 128 | int nice; /* nice level */ | ||
| 129 | cpumask_var_t cpumask; /* allowed CPUs */ | ||
| 130 | bool no_numa; /* disable NUMA affinity */ | ||
| 131 | }; | ||
| 132 | |||
| 118 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) | 133 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) |
| 119 | { | 134 | { |
| 120 | return container_of(work, struct delayed_work, work); | 135 | return container_of(work, struct delayed_work, work); |
| @@ -283,9 +298,10 @@ enum { | |||
| 283 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ | 298 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ |
| 284 | WQ_HIGHPRI = 1 << 4, /* high priority */ | 299 | WQ_HIGHPRI = 1 << 4, /* high priority */ |
| 285 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ | 300 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ |
| 301 | WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */ | ||
| 286 | 302 | ||
| 287 | WQ_DRAINING = 1 << 6, /* internal: workqueue is draining */ | 303 | __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */ |
| 288 | WQ_RESCUER = 1 << 7, /* internal: workqueue has rescuer */ | 304 | __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */ |
| 289 | 305 | ||
| 290 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ | 306 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ |
| 291 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ | 307 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ |
| @@ -388,7 +404,7 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | |||
| 388 | * Pointer to the allocated workqueue on success, %NULL on failure. | 404 | * Pointer to the allocated workqueue on success, %NULL on failure. |
| 389 | */ | 405 | */ |
| 390 | #define alloc_ordered_workqueue(fmt, flags, args...) \ | 406 | #define alloc_ordered_workqueue(fmt, flags, args...) \ |
| 391 | alloc_workqueue(fmt, WQ_UNBOUND | (flags), 1, ##args) | 407 | alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args) |
| 392 | 408 | ||
| 393 | #define create_workqueue(name) \ | 409 | #define create_workqueue(name) \ |
| 394 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) | 410 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) |
| @@ -399,30 +415,23 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | |||
| 399 | 415 | ||
| 400 | extern void destroy_workqueue(struct workqueue_struct *wq); | 416 | extern void destroy_workqueue(struct workqueue_struct *wq); |
| 401 | 417 | ||
| 418 | struct workqueue_attrs *alloc_workqueue_attrs(gfp_t gfp_mask); | ||
| 419 | void free_workqueue_attrs(struct workqueue_attrs *attrs); | ||
| 420 | int apply_workqueue_attrs(struct workqueue_struct *wq, | ||
| 421 | const struct workqueue_attrs *attrs); | ||
| 422 | |||
| 402 | extern bool queue_work_on(int cpu, struct workqueue_struct *wq, | 423 | extern bool queue_work_on(int cpu, struct workqueue_struct *wq, |
| 403 | struct work_struct *work); | 424 | struct work_struct *work); |
| 404 | extern bool queue_work(struct workqueue_struct *wq, struct work_struct *work); | ||
| 405 | extern bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 425 | extern bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
| 406 | struct delayed_work *work, unsigned long delay); | 426 | struct delayed_work *work, unsigned long delay); |
| 407 | extern bool queue_delayed_work(struct workqueue_struct *wq, | ||
| 408 | struct delayed_work *work, unsigned long delay); | ||
| 409 | extern bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq, | 427 | extern bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq, |
| 410 | struct delayed_work *dwork, unsigned long delay); | 428 | struct delayed_work *dwork, unsigned long delay); |
| 411 | extern bool mod_delayed_work(struct workqueue_struct *wq, | ||
| 412 | struct delayed_work *dwork, unsigned long delay); | ||
| 413 | 429 | ||
| 414 | extern void flush_workqueue(struct workqueue_struct *wq); | 430 | extern void flush_workqueue(struct workqueue_struct *wq); |
| 415 | extern void drain_workqueue(struct workqueue_struct *wq); | 431 | extern void drain_workqueue(struct workqueue_struct *wq); |
| 416 | extern void flush_scheduled_work(void); | 432 | extern void flush_scheduled_work(void); |
| 417 | 433 | ||
| 418 | extern bool schedule_work_on(int cpu, struct work_struct *work); | ||
| 419 | extern bool schedule_work(struct work_struct *work); | ||
| 420 | extern bool schedule_delayed_work_on(int cpu, struct delayed_work *work, | ||
| 421 | unsigned long delay); | ||
| 422 | extern bool schedule_delayed_work(struct delayed_work *work, | ||
| 423 | unsigned long delay); | ||
| 424 | extern int schedule_on_each_cpu(work_func_t func); | 434 | extern int schedule_on_each_cpu(work_func_t func); |
| 425 | extern int keventd_up(void); | ||
| 426 | 435 | ||
| 427 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 436 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
| 428 | 437 | ||
| @@ -435,9 +444,121 @@ extern bool cancel_delayed_work_sync(struct delayed_work *dwork); | |||
| 435 | 444 | ||
| 436 | extern void workqueue_set_max_active(struct workqueue_struct *wq, | 445 | extern void workqueue_set_max_active(struct workqueue_struct *wq, |
| 437 | int max_active); | 446 | int max_active); |
| 438 | extern bool workqueue_congested(unsigned int cpu, struct workqueue_struct *wq); | 447 | extern bool current_is_workqueue_rescuer(void); |
| 448 | extern bool workqueue_congested(int cpu, struct workqueue_struct *wq); | ||
| 439 | extern unsigned int work_busy(struct work_struct *work); | 449 | extern unsigned int work_busy(struct work_struct *work); |
| 440 | 450 | ||
| 451 | /** | ||
| 452 | * queue_work - queue work on a workqueue | ||
| 453 | * @wq: workqueue to use | ||
| 454 | * @work: work to queue | ||
| 455 | * | ||
| 456 | * Returns %false if @work was already on a queue, %true otherwise. | ||
| 457 | * | ||
| 458 | * We queue the work to the CPU on which it was submitted, but if the CPU dies | ||
| 459 | * it can be processed by another CPU. | ||
| 460 | */ | ||
| 461 | static inline bool queue_work(struct workqueue_struct *wq, | ||
| 462 | struct work_struct *work) | ||
| 463 | { | ||
| 464 | return queue_work_on(WORK_CPU_UNBOUND, wq, work); | ||
| 465 | } | ||
| 466 | |||
| 467 | /** | ||
| 468 | * queue_delayed_work - queue work on a workqueue after delay | ||
| 469 | * @wq: workqueue to use | ||
| 470 | * @dwork: delayable work to queue | ||
| 471 | * @delay: number of jiffies to wait before queueing | ||
| 472 | * | ||
| 473 | * Equivalent to queue_delayed_work_on() but tries to use the local CPU. | ||
| 474 | */ | ||
| 475 | static inline bool queue_delayed_work(struct workqueue_struct *wq, | ||
| 476 | struct delayed_work *dwork, | ||
| 477 | unsigned long delay) | ||
| 478 | { | ||
| 479 | return queue_delayed_work_on(WORK_CPU_UNBOUND, wq, dwork, delay); | ||
| 480 | } | ||
| 481 | |||
| 482 | /** | ||
| 483 | * mod_delayed_work - modify delay of or queue a delayed work | ||
| 484 | * @wq: workqueue to use | ||
| 485 | * @dwork: work to queue | ||
| 486 | * @delay: number of jiffies to wait before queueing | ||
| 487 | * | ||
| 488 | * mod_delayed_work_on() on local CPU. | ||
| 489 | */ | ||
| 490 | static inline bool mod_delayed_work(struct workqueue_struct *wq, | ||
| 491 | struct delayed_work *dwork, | ||
| 492 | unsigned long delay) | ||
| 493 | { | ||
| 494 | return mod_delayed_work_on(WORK_CPU_UNBOUND, wq, dwork, delay); | ||
| 495 | } | ||
| 496 | |||
| 497 | /** | ||
| 498 | * schedule_work_on - put work task on a specific cpu | ||
| 499 | * @cpu: cpu to put the work task on | ||
| 500 | * @work: job to be done | ||
| 501 | * | ||
| 502 | * This puts a job on a specific cpu | ||
| 503 | */ | ||
| 504 | static inline bool schedule_work_on(int cpu, struct work_struct *work) | ||
| 505 | { | ||
| 506 | return queue_work_on(cpu, system_wq, work); | ||
| 507 | } | ||
| 508 | |||
| 509 | /** | ||
| 510 | * schedule_work - put work task in global workqueue | ||
| 511 | * @work: job to be done | ||
| 512 | * | ||
| 513 | * Returns %false if @work was already on the kernel-global workqueue and | ||
| 514 | * %true otherwise. | ||
| 515 | * | ||
| 516 | * This puts a job in the kernel-global workqueue if it was not already | ||
| 517 | * queued and leaves it in the same position on the kernel-global | ||
| 518 | * workqueue otherwise. | ||
| 519 | */ | ||
| 520 | static inline bool schedule_work(struct work_struct *work) | ||
| 521 | { | ||
| 522 | return queue_work(system_wq, work); | ||
| 523 | } | ||
| 524 | |||
| 525 | /** | ||
| 526 | * schedule_delayed_work_on - queue work in global workqueue on CPU after delay | ||
| 527 | * @cpu: cpu to use | ||
| 528 | * @dwork: job to be done | ||
| 529 | * @delay: number of jiffies to wait | ||
| 530 | * | ||
| 531 | * After waiting for a given time this puts a job in the kernel-global | ||
| 532 | * workqueue on the specified CPU. | ||
| 533 | */ | ||
| 534 | static inline bool schedule_delayed_work_on(int cpu, struct delayed_work *dwork, | ||
| 535 | unsigned long delay) | ||
| 536 | { | ||
| 537 | return queue_delayed_work_on(cpu, system_wq, dwork, delay); | ||
| 538 | } | ||
| 539 | |||
| 540 | /** | ||
| 541 | * schedule_delayed_work - put work task in global workqueue after delay | ||
| 542 | * @dwork: job to be done | ||
| 543 | * @delay: number of jiffies to wait or 0 for immediate execution | ||
| 544 | * | ||
| 545 | * After waiting for a given time this puts a job in the kernel-global | ||
| 546 | * workqueue. | ||
| 547 | */ | ||
| 548 | static inline bool schedule_delayed_work(struct delayed_work *dwork, | ||
| 549 | unsigned long delay) | ||
| 550 | { | ||
| 551 | return queue_delayed_work(system_wq, dwork, delay); | ||
| 552 | } | ||
| 553 | |||
| 554 | /** | ||
| 555 | * keventd_up - is workqueue initialized yet? | ||
| 556 | */ | ||
| 557 | static inline bool keventd_up(void) | ||
| 558 | { | ||
| 559 | return system_wq != NULL; | ||
| 560 | } | ||
| 561 | |||
| 441 | /* | 562 | /* |
| 442 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, | 563 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, |
| 443 | * if it returns 0 the timer function may be running and the queueing is in | 564 | * if it returns 0 the timer function may be running and the queueing is in |
| @@ -466,12 +587,12 @@ static inline bool __deprecated flush_delayed_work_sync(struct delayed_work *dwo | |||
| 466 | } | 587 | } |
| 467 | 588 | ||
| 468 | #ifndef CONFIG_SMP | 589 | #ifndef CONFIG_SMP |
| 469 | static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg) | 590 | static inline long work_on_cpu(int cpu, long (*fn)(void *), void *arg) |
| 470 | { | 591 | { |
| 471 | return fn(arg); | 592 | return fn(arg); |
| 472 | } | 593 | } |
| 473 | #else | 594 | #else |
| 474 | long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg); | 595 | long work_on_cpu(int cpu, long (*fn)(void *), void *arg); |
| 475 | #endif /* CONFIG_SMP */ | 596 | #endif /* CONFIG_SMP */ |
| 476 | 597 | ||
| 477 | #ifdef CONFIG_FREEZER | 598 | #ifdef CONFIG_FREEZER |
| @@ -480,4 +601,11 @@ extern bool freeze_workqueues_busy(void); | |||
| 480 | extern void thaw_workqueues(void); | 601 | extern void thaw_workqueues(void); |
| 481 | #endif /* CONFIG_FREEZER */ | 602 | #endif /* CONFIG_FREEZER */ |
| 482 | 603 | ||
| 604 | #ifdef CONFIG_SYSFS | ||
| 605 | int workqueue_sysfs_register(struct workqueue_struct *wq); | ||
| 606 | #else /* CONFIG_SYSFS */ | ||
| 607 | static inline int workqueue_sysfs_register(struct workqueue_struct *wq) | ||
| 608 | { return 0; } | ||
| 609 | #endif /* CONFIG_SYSFS */ | ||
| 610 | |||
| 483 | #endif | 611 | #endif |
diff --git a/include/net/dst.h b/include/net/dst.h index 853cda11e518..1f8fd109e225 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
| @@ -413,13 +413,15 @@ static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, | |||
| 413 | 413 | ||
| 414 | static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) | 414 | static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) |
| 415 | { | 415 | { |
| 416 | return dst->ops->neigh_lookup(dst, NULL, daddr); | 416 | struct neighbour *n = dst->ops->neigh_lookup(dst, NULL, daddr); |
| 417 | return IS_ERR(n) ? NULL : n; | ||
| 417 | } | 418 | } |
| 418 | 419 | ||
| 419 | static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst, | 420 | static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst, |
| 420 | struct sk_buff *skb) | 421 | struct sk_buff *skb) |
| 421 | { | 422 | { |
| 422 | return dst->ops->neigh_lookup(dst, skb, NULL); | 423 | struct neighbour *n = dst->ops->neigh_lookup(dst, skb, NULL); |
| 424 | return IS_ERR(n) ? NULL : n; | ||
| 423 | } | 425 | } |
| 424 | 426 | ||
| 425 | static inline void dst_link_failure(struct sk_buff *skb) | 427 | static inline void dst_link_failure(struct sk_buff *skb) |
diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h index 80461c1ae9ef..bb8271d487b7 100644 --- a/include/net/flow_keys.h +++ b/include/net/flow_keys.h | |||
| @@ -9,6 +9,7 @@ struct flow_keys { | |||
| 9 | __be32 ports; | 9 | __be32 ports; |
| 10 | __be16 port16[2]; | 10 | __be16 port16[2]; |
| 11 | }; | 11 | }; |
| 12 | u16 thoff; | ||
| 12 | u8 ip_proto; | 13 | u8 ip_proto; |
| 13 | }; | 14 | }; |
| 14 | 15 | ||
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 76c3fe5ecc2e..0a1dcc2fa2f5 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h | |||
| @@ -43,6 +43,13 @@ struct inet_frag_queue { | |||
| 43 | 43 | ||
| 44 | #define INETFRAGS_HASHSZ 64 | 44 | #define INETFRAGS_HASHSZ 64 |
| 45 | 45 | ||
| 46 | /* averaged: | ||
| 47 | * max_depth = default ipfrag_high_thresh / INETFRAGS_HASHSZ / | ||
| 48 | * rounded up (SKB_TRUELEN(0) + sizeof(struct ipq or | ||
| 49 | * struct frag_queue)) | ||
| 50 | */ | ||
| 51 | #define INETFRAGS_MAXDEPTH 128 | ||
| 52 | |||
| 46 | struct inet_frags { | 53 | struct inet_frags { |
| 47 | struct hlist_head hash[INETFRAGS_HASHSZ]; | 54 | struct hlist_head hash[INETFRAGS_HASHSZ]; |
| 48 | /* This rwlock is a global lock (seperate per IPv4, IPv6 and | 55 | /* This rwlock is a global lock (seperate per IPv4, IPv6 and |
| @@ -76,6 +83,8 @@ int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f, bool force); | |||
| 76 | struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, | 83 | struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, |
| 77 | struct inet_frags *f, void *key, unsigned int hash) | 84 | struct inet_frags *f, void *key, unsigned int hash) |
| 78 | __releases(&f->lock); | 85 | __releases(&f->lock); |
| 86 | void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q, | ||
| 87 | const char *prefix); | ||
| 79 | 88 | ||
| 80 | static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f) | 89 | static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f) |
| 81 | { | 90 | { |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 9497be1ad4c0..e49db91593a9 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
| @@ -152,18 +152,16 @@ struct fib_result_nl { | |||
| 152 | }; | 152 | }; |
| 153 | 153 | ||
| 154 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 154 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
| 155 | |||
| 156 | #define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel]) | 155 | #define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel]) |
| 157 | |||
| 158 | #define FIB_TABLE_HASHSZ 2 | ||
| 159 | |||
| 160 | #else /* CONFIG_IP_ROUTE_MULTIPATH */ | 156 | #else /* CONFIG_IP_ROUTE_MULTIPATH */ |
| 161 | |||
| 162 | #define FIB_RES_NH(res) ((res).fi->fib_nh[0]) | 157 | #define FIB_RES_NH(res) ((res).fi->fib_nh[0]) |
| 158 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ | ||
| 163 | 159 | ||
| 160 | #ifdef CONFIG_IP_MULTIPLE_TABLES | ||
| 164 | #define FIB_TABLE_HASHSZ 256 | 161 | #define FIB_TABLE_HASHSZ 256 |
| 165 | 162 | #else | |
| 166 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ | 163 | #define FIB_TABLE_HASHSZ 2 |
| 164 | #endif | ||
| 167 | 165 | ||
| 168 | extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); | 166 | extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); |
| 169 | 167 | ||
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 68c69d54d392..fce8e6b66d55 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -976,6 +976,7 @@ struct netns_ipvs { | |||
| 976 | int sysctl_sync_retries; | 976 | int sysctl_sync_retries; |
| 977 | int sysctl_nat_icmp_send; | 977 | int sysctl_nat_icmp_send; |
| 978 | int sysctl_pmtu_disc; | 978 | int sysctl_pmtu_disc; |
| 979 | int sysctl_backup_only; | ||
| 979 | 980 | ||
| 980 | /* ip_vs_lblc */ | 981 | /* ip_vs_lblc */ |
| 981 | int sysctl_lblc_expiration; | 982 | int sysctl_lblc_expiration; |
| @@ -1067,6 +1068,12 @@ static inline int sysctl_pmtu_disc(struct netns_ipvs *ipvs) | |||
| 1067 | return ipvs->sysctl_pmtu_disc; | 1068 | return ipvs->sysctl_pmtu_disc; |
| 1068 | } | 1069 | } |
| 1069 | 1070 | ||
| 1071 | static inline int sysctl_backup_only(struct netns_ipvs *ipvs) | ||
| 1072 | { | ||
| 1073 | return ipvs->sync_state & IP_VS_STATE_BACKUP && | ||
| 1074 | ipvs->sysctl_backup_only; | ||
| 1075 | } | ||
| 1076 | |||
| 1070 | #else | 1077 | #else |
| 1071 | 1078 | ||
| 1072 | static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs) | 1079 | static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs) |
| @@ -1114,6 +1121,11 @@ static inline int sysctl_pmtu_disc(struct netns_ipvs *ipvs) | |||
| 1114 | return 1; | 1121 | return 1; |
| 1115 | } | 1122 | } |
| 1116 | 1123 | ||
| 1124 | static inline int sysctl_backup_only(struct netns_ipvs *ipvs) | ||
| 1125 | { | ||
| 1126 | return 0; | ||
| 1127 | } | ||
| 1128 | |||
| 1117 | #endif | 1129 | #endif |
| 1118 | 1130 | ||
| 1119 | /* | 1131 | /* |
diff --git a/include/net/ipip.h b/include/net/ipip.h index fd19625ff99d..982141c15200 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
| @@ -77,15 +77,11 @@ static inline void tunnel_ip_select_ident(struct sk_buff *skb, | |||
| 77 | { | 77 | { |
| 78 | struct iphdr *iph = ip_hdr(skb); | 78 | struct iphdr *iph = ip_hdr(skb); |
| 79 | 79 | ||
| 80 | if (iph->frag_off & htons(IP_DF)) | 80 | /* Use inner packet iph-id if possible. */ |
| 81 | iph->id = 0; | 81 | if (skb->protocol == htons(ETH_P_IP) && old_iph->id) |
| 82 | else { | 82 | iph->id = old_iph->id; |
| 83 | /* Use inner packet iph-id if possible. */ | 83 | else |
| 84 | if (skb->protocol == htons(ETH_P_IP) && old_iph->id) | 84 | __ip_select_ident(iph, dst, |
| 85 | iph->id = old_iph->id; | 85 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); |
| 86 | else | ||
| 87 | __ip_select_ident(iph, dst, | ||
| 88 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); | ||
| 89 | } | ||
| 90 | } | 86 | } |
| 91 | #endif | 87 | #endif |
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index 6a16fd2e70ed..464ea82e10db 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
| @@ -183,7 +183,6 @@ DECLARE_EVENT_CLASS(writeback_work_class, | |||
| 183 | DEFINE_EVENT(writeback_work_class, name, \ | 183 | DEFINE_EVENT(writeback_work_class, name, \ |
| 184 | TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \ | 184 | TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \ |
| 185 | TP_ARGS(bdi, work)) | 185 | TP_ARGS(bdi, work)) |
| 186 | DEFINE_WRITEBACK_WORK_EVENT(writeback_nothread); | ||
| 187 | DEFINE_WRITEBACK_WORK_EVENT(writeback_queue); | 186 | DEFINE_WRITEBACK_WORK_EVENT(writeback_queue); |
| 188 | DEFINE_WRITEBACK_WORK_EVENT(writeback_exec); | 187 | DEFINE_WRITEBACK_WORK_EVENT(writeback_exec); |
| 189 | DEFINE_WRITEBACK_WORK_EVENT(writeback_start); | 188 | DEFINE_WRITEBACK_WORK_EVENT(writeback_start); |
| @@ -222,12 +221,8 @@ DEFINE_EVENT(writeback_class, name, \ | |||
| 222 | 221 | ||
| 223 | DEFINE_WRITEBACK_EVENT(writeback_nowork); | 222 | DEFINE_WRITEBACK_EVENT(writeback_nowork); |
| 224 | DEFINE_WRITEBACK_EVENT(writeback_wake_background); | 223 | DEFINE_WRITEBACK_EVENT(writeback_wake_background); |
| 225 | DEFINE_WRITEBACK_EVENT(writeback_wake_thread); | ||
| 226 | DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread); | ||
| 227 | DEFINE_WRITEBACK_EVENT(writeback_bdi_register); | 224 | DEFINE_WRITEBACK_EVENT(writeback_bdi_register); |
| 228 | DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister); | 225 | DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister); |
| 229 | DEFINE_WRITEBACK_EVENT(writeback_thread_start); | ||
| 230 | DEFINE_WRITEBACK_EVENT(writeback_thread_stop); | ||
| 231 | 226 | ||
| 232 | DECLARE_EVENT_CLASS(wbc_class, | 227 | DECLARE_EVENT_CLASS(wbc_class, |
| 233 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), | 228 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), |
diff --git a/include/uapi/linux/packet_diag.h b/include/uapi/linux/packet_diag.h index 93f5fa94a431..afafd703ad92 100644 --- a/include/uapi/linux/packet_diag.h +++ b/include/uapi/linux/packet_diag.h | |||
| @@ -33,9 +33,11 @@ enum { | |||
| 33 | PACKET_DIAG_TX_RING, | 33 | PACKET_DIAG_TX_RING, |
| 34 | PACKET_DIAG_FANOUT, | 34 | PACKET_DIAG_FANOUT, |
| 35 | 35 | ||
| 36 | PACKET_DIAG_MAX, | 36 | __PACKET_DIAG_MAX, |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | #define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1) | ||
| 40 | |||
| 39 | struct packet_diag_info { | 41 | struct packet_diag_info { |
| 40 | __u32 pdi_index; | 42 | __u32 pdi_index; |
| 41 | __u32 pdi_version; | 43 | __u32 pdi_version; |
diff --git a/include/uapi/linux/unix_diag.h b/include/uapi/linux/unix_diag.h index b8a24941db21..b9e2a6a7446f 100644 --- a/include/uapi/linux/unix_diag.h +++ b/include/uapi/linux/unix_diag.h | |||
| @@ -39,9 +39,11 @@ enum { | |||
| 39 | UNIX_DIAG_MEMINFO, | 39 | UNIX_DIAG_MEMINFO, |
| 40 | UNIX_DIAG_SHUTDOWN, | 40 | UNIX_DIAG_SHUTDOWN, |
| 41 | 41 | ||
| 42 | UNIX_DIAG_MAX, | 42 | __UNIX_DIAG_MAX, |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | #define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1) | ||
| 46 | |||
| 45 | struct unix_diag_vfs { | 47 | struct unix_diag_vfs { |
| 46 | __u32 udiag_vfs_ino; | 48 | __u32 udiag_vfs_ino; |
| 47 | __u32 udiag_vfs_dev; | 49 | __u32 udiag_vfs_dev; |
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 28447f1594fa..8deb22672ada 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
| @@ -30,7 +30,6 @@ | |||
| 30 | */ | 30 | */ |
| 31 | #define ATMEL_LCDC_WIRING_BGR 0 | 31 | #define ATMEL_LCDC_WIRING_BGR 0 |
| 32 | #define ATMEL_LCDC_WIRING_RGB 1 | 32 | #define ATMEL_LCDC_WIRING_RGB 1 |
| 33 | #define ATMEL_LCDC_WIRING_RGB555 2 | ||
| 34 | 33 | ||
| 35 | 34 | ||
| 36 | /* LCD Controller info data structure, stored in device platform_data */ | 35 | /* LCD Controller info data structure, stored in device platform_data */ |
| @@ -62,6 +61,7 @@ struct atmel_lcdfb_info { | |||
| 62 | void (*atmel_lcdfb_power_control)(int on); | 61 | void (*atmel_lcdfb_power_control)(int on); |
| 63 | struct fb_monspecs *default_monspecs; | 62 | struct fb_monspecs *default_monspecs; |
| 64 | u32 pseudo_palette[16]; | 63 | u32 pseudo_palette[16]; |
| 64 | bool have_intensity_bit; | ||
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | #define ATMEL_LCDC_DMABADDR1 0x00 | 67 | #define ATMEL_LCDC_DMABADDR1 0x00 |
diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h index 01c3d62436ef..ffd4652de91c 100644 --- a/include/xen/interface/io/blkif.h +++ b/include/xen/interface/io/blkif.h | |||
| @@ -138,11 +138,21 @@ struct blkif_request_discard { | |||
| 138 | uint8_t _pad3; | 138 | uint8_t _pad3; |
| 139 | } __attribute__((__packed__)); | 139 | } __attribute__((__packed__)); |
| 140 | 140 | ||
| 141 | struct blkif_request_other { | ||
| 142 | uint8_t _pad1; | ||
| 143 | blkif_vdev_t _pad2; /* only for read/write requests */ | ||
| 144 | #ifdef CONFIG_X86_64 | ||
| 145 | uint32_t _pad3; /* offsetof(blkif_req..,u.other.id)==8*/ | ||
| 146 | #endif | ||
| 147 | uint64_t id; /* private guest value, echoed in resp */ | ||
| 148 | } __attribute__((__packed__)); | ||
| 149 | |||
| 141 | struct blkif_request { | 150 | struct blkif_request { |
| 142 | uint8_t operation; /* BLKIF_OP_??? */ | 151 | uint8_t operation; /* BLKIF_OP_??? */ |
| 143 | union { | 152 | union { |
| 144 | struct blkif_request_rw rw; | 153 | struct blkif_request_rw rw; |
| 145 | struct blkif_request_discard discard; | 154 | struct blkif_request_discard discard; |
| 155 | struct blkif_request_other other; | ||
| 146 | } u; | 156 | } u; |
| 147 | } __attribute__((__packed__)); | 157 | } __attribute__((__packed__)); |
| 148 | 158 | ||
diff --git a/include/xen/interface/physdev.h b/include/xen/interface/physdev.h index 1844d31f4552..7000bb1f6e96 100644 --- a/include/xen/interface/physdev.h +++ b/include/xen/interface/physdev.h | |||
| @@ -251,6 +251,12 @@ struct physdev_pci_device_add { | |||
| 251 | 251 | ||
| 252 | #define PHYSDEVOP_pci_device_remove 26 | 252 | #define PHYSDEVOP_pci_device_remove 26 |
| 253 | #define PHYSDEVOP_restore_msi_ext 27 | 253 | #define PHYSDEVOP_restore_msi_ext 27 |
| 254 | /* | ||
| 255 | * Dom0 should use these two to announce MMIO resources assigned to | ||
| 256 | * MSI-X capable devices won't (prepare) or may (release) change. | ||
| 257 | */ | ||
| 258 | #define PHYSDEVOP_prepare_msix 30 | ||
| 259 | #define PHYSDEVOP_release_msix 31 | ||
| 254 | struct physdev_pci_device { | 260 | struct physdev_pci_device { |
| 255 | /* IN */ | 261 | /* IN */ |
| 256 | uint16_t seg; | 262 | uint16_t seg; |
