aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/backing-dev.h11
-rw-r--r--include/linux/blkdev.h50
-rw-r--r--include/linux/ceph/ceph_features.h1
-rw-r--r--include/linux/ceph/messenger.h4
-rw-r--r--include/linux/cgroup-defs.h27
-rw-r--r--include/linux/clk-provider.h47
-rw-r--r--include/linux/clk/at91_pmc.h22
-rw-r--r--include/linux/clockchips.h29
-rw-r--r--include/linux/cpufreq.h5
-rw-r--r--include/linux/devfreq.h24
-rw-r--r--include/linux/init_task.h8
-rw-r--r--include/linux/irq.h81
-rw-r--r--include/linux/irqdesc.h41
-rw-r--r--include/linux/irqhandler.h2
-rw-r--r--include/linux/jump_label.h10
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--include/linux/phy.h6
-rw-r--r--include/linux/sched.h12
-rw-r--r--include/linux/security.h2
-rw-r--r--include/linux/skbuff.h9
-rw-r--r--include/linux/spi/spi.h2
-rw-r--r--include/linux/sunrpc/xprtsock.h3
-rw-r--r--include/linux/thermal.h8
-rw-r--r--include/linux/tick.h9
-rw-r--r--include/linux/wait.h5
25 files changed, 275 insertions, 144 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 5a5d79ee256f..d5eb4ad1c534 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -13,6 +13,7 @@
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/blkdev.h> 14#include <linux/blkdev.h>
15#include <linux/writeback.h> 15#include <linux/writeback.h>
16#include <linux/memcontrol.h>
16#include <linux/blk-cgroup.h> 17#include <linux/blk-cgroup.h>
17#include <linux/backing-dev-defs.h> 18#include <linux/backing-dev-defs.h>
18#include <linux/slab.h> 19#include <linux/slab.h>
@@ -252,13 +253,19 @@ int inode_congested(struct inode *inode, int cong_bits);
252 * @inode: inode of interest 253 * @inode: inode of interest
253 * 254 *
254 * cgroup writeback requires support from both the bdi and filesystem. 255 * cgroup writeback requires support from both the bdi and filesystem.
255 * Test whether @inode has both. 256 * Also, both memcg and iocg have to be on the default hierarchy. Test
257 * whether all conditions are met.
258 *
259 * Note that the test result may change dynamically on the same inode
260 * depending on how memcg and iocg are configured.
256 */ 261 */
257static inline bool inode_cgwb_enabled(struct inode *inode) 262static inline bool inode_cgwb_enabled(struct inode *inode)
258{ 263{
259 struct backing_dev_info *bdi = inode_to_bdi(inode); 264 struct backing_dev_info *bdi = inode_to_bdi(inode);
260 265
261 return bdi_cap_account_dirty(bdi) && 266 return cgroup_on_dfl(mem_cgroup_root_css->cgroup) &&
267 cgroup_on_dfl(blkcg_root_css->cgroup) &&
268 bdi_cap_account_dirty(bdi) &&
262 (bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) && 269 (bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) &&
263 (inode->i_sb->s_iflags & SB_I_CGROUPWB); 270 (inode->i_sb->s_iflags & SB_I_CGROUPWB);
264} 271}
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 38a5ff772a37..99da9ebc7377 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1368,6 +1368,26 @@ static inline bool bvec_gap_to_prev(struct request_queue *q,
1368 ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q)); 1368 ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q));
1369} 1369}
1370 1370
1371static inline bool bio_will_gap(struct request_queue *q, struct bio *prev,
1372 struct bio *next)
1373{
1374 if (!bio_has_data(prev))
1375 return false;
1376
1377 return bvec_gap_to_prev(q, &prev->bi_io_vec[prev->bi_vcnt - 1],
1378 next->bi_io_vec[0].bv_offset);
1379}
1380
1381static inline bool req_gap_back_merge(struct request *req, struct bio *bio)
1382{
1383 return bio_will_gap(req->q, req->biotail, bio);
1384}
1385
1386static inline bool req_gap_front_merge(struct request *req, struct bio *bio)
1387{
1388 return bio_will_gap(req->q, bio, req->bio);
1389}
1390
1371struct work_struct; 1391struct work_struct;
1372int kblockd_schedule_work(struct work_struct *work); 1392int kblockd_schedule_work(struct work_struct *work);
1373int kblockd_schedule_delayed_work(struct delayed_work *dwork, unsigned long delay); 1393int kblockd_schedule_delayed_work(struct delayed_work *dwork, unsigned long delay);
@@ -1494,6 +1514,26 @@ queue_max_integrity_segments(struct request_queue *q)
1494 return q->limits.max_integrity_segments; 1514 return q->limits.max_integrity_segments;
1495} 1515}
1496 1516
1517static inline bool integrity_req_gap_back_merge(struct request *req,
1518 struct bio *next)
1519{
1520 struct bio_integrity_payload *bip = bio_integrity(req->bio);
1521 struct bio_integrity_payload *bip_next = bio_integrity(next);
1522
1523 return bvec_gap_to_prev(req->q, &bip->bip_vec[bip->bip_vcnt - 1],
1524 bip_next->bip_vec[0].bv_offset);
1525}
1526
1527static inline bool integrity_req_gap_front_merge(struct request *req,
1528 struct bio *bio)
1529{
1530 struct bio_integrity_payload *bip = bio_integrity(bio);
1531 struct bio_integrity_payload *bip_next = bio_integrity(req->bio);
1532
1533 return bvec_gap_to_prev(req->q, &bip->bip_vec[bip->bip_vcnt - 1],
1534 bip_next->bip_vec[0].bv_offset);
1535}
1536
1497#else /* CONFIG_BLK_DEV_INTEGRITY */ 1537#else /* CONFIG_BLK_DEV_INTEGRITY */
1498 1538
1499struct bio; 1539struct bio;
@@ -1560,6 +1600,16 @@ static inline bool blk_integrity_is_initialized(struct gendisk *g)
1560{ 1600{
1561 return 0; 1601 return 0;
1562} 1602}
1603static inline bool integrity_req_gap_back_merge(struct request *req,
1604 struct bio *next)
1605{
1606 return false;
1607}
1608static inline bool integrity_req_gap_front_merge(struct request *req,
1609 struct bio *bio)
1610{
1611 return false;
1612}
1563 1613
1564#endif /* CONFIG_BLK_DEV_INTEGRITY */ 1614#endif /* CONFIG_BLK_DEV_INTEGRITY */
1565 1615
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index 4763ad64e832..f89b31d45cc8 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -107,6 +107,7 @@ static inline u64 ceph_sanitize_features(u64 features)
107 CEPH_FEATURE_OSDMAP_ENC | \ 107 CEPH_FEATURE_OSDMAP_ENC | \
108 CEPH_FEATURE_CRUSH_TUNABLES3 | \ 108 CEPH_FEATURE_CRUSH_TUNABLES3 | \
109 CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \ 109 CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \
110 CEPH_FEATURE_MSGR_KEEPALIVE2 | \
110 CEPH_FEATURE_CRUSH_V4) 111 CEPH_FEATURE_CRUSH_V4)
111 112
112#define CEPH_FEATURES_REQUIRED_DEFAULT \ 113#define CEPH_FEATURES_REQUIRED_DEFAULT \
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index 7e1252e97a30..b2371d9b51fa 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -238,6 +238,8 @@ struct ceph_connection {
238 bool out_kvec_is_msg; /* kvec refers to out_msg */ 238 bool out_kvec_is_msg; /* kvec refers to out_msg */
239 int out_more; /* there is more data after the kvecs */ 239 int out_more; /* there is more data after the kvecs */
240 __le64 out_temp_ack; /* for writing an ack */ 240 __le64 out_temp_ack; /* for writing an ack */
241 struct ceph_timespec out_temp_keepalive2; /* for writing keepalive2
242 stamp */
241 243
242 /* message in temps */ 244 /* message in temps */
243 struct ceph_msg_header in_hdr; 245 struct ceph_msg_header in_hdr;
@@ -248,7 +250,7 @@ struct ceph_connection {
248 int in_base_pos; /* bytes read */ 250 int in_base_pos; /* bytes read */
249 __le64 in_temp_ack; /* for reading an ack */ 251 __le64 in_temp_ack; /* for reading an ack */
250 252
251 struct timespec last_keepalive_ack; 253 struct timespec last_keepalive_ack; /* keepalive2 ack stamp */
252 254
253 struct delayed_work work; /* send|recv work */ 255 struct delayed_work work; /* send|recv work */
254 unsigned long delay; /* current delay interval */ 256 unsigned long delay; /* current delay interval */
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
index 4d8fcf2187dc..8492721b39be 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -473,31 +473,8 @@ struct cgroup_subsys {
473 unsigned int depends_on; 473 unsigned int depends_on;
474}; 474};
475 475
476extern struct percpu_rw_semaphore cgroup_threadgroup_rwsem; 476void cgroup_threadgroup_change_begin(struct task_struct *tsk);
477 477void cgroup_threadgroup_change_end(struct task_struct *tsk);
478/**
479 * cgroup_threadgroup_change_begin - threadgroup exclusion for cgroups
480 * @tsk: target task
481 *
482 * Called from threadgroup_change_begin() and allows cgroup operations to
483 * synchronize against threadgroup changes using a percpu_rw_semaphore.
484 */
485static inline void cgroup_threadgroup_change_begin(struct task_struct *tsk)
486{
487 percpu_down_read(&cgroup_threadgroup_rwsem);
488}
489
490/**
491 * cgroup_threadgroup_change_end - threadgroup exclusion for cgroups
492 * @tsk: target task
493 *
494 * Called from threadgroup_change_end(). Counterpart of
495 * cgroup_threadcgroup_change_begin().
496 */
497static inline void cgroup_threadgroup_change_end(struct task_struct *tsk)
498{
499 percpu_up_read(&cgroup_threadgroup_rwsem);
500}
501 478
502#else /* CONFIG_CGROUPS */ 479#else /* CONFIG_CGROUPS */
503 480
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 3ecc07d0da77..e9a4d1ea556e 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -500,13 +500,14 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
500 * 500 *
501 * Clock with adjustable fractional divider affecting its output frequency. 501 * Clock with adjustable fractional divider affecting its output frequency.
502 */ 502 */
503
504struct clk_fractional_divider { 503struct clk_fractional_divider {
505 struct clk_hw hw; 504 struct clk_hw hw;
506 void __iomem *reg; 505 void __iomem *reg;
507 u8 mshift; 506 u8 mshift;
507 u8 mwidth;
508 u32 mmask; 508 u32 mmask;
509 u8 nshift; 509 u8 nshift;
510 u8 nwidth;
510 u32 nmask; 511 u32 nmask;
511 u8 flags; 512 u8 flags;
512 spinlock_t *lock; 513 spinlock_t *lock;
@@ -518,6 +519,48 @@ struct clk *clk_register_fractional_divider(struct device *dev,
518 void __iomem *reg, u8 mshift, u8 mwidth, u8 nshift, u8 nwidth, 519 void __iomem *reg, u8 mshift, u8 mwidth, u8 nshift, u8 nwidth,
519 u8 clk_divider_flags, spinlock_t *lock); 520 u8 clk_divider_flags, spinlock_t *lock);
520 521
522/**
523 * struct clk_multiplier - adjustable multiplier clock
524 *
525 * @hw: handle between common and hardware-specific interfaces
526 * @reg: register containing the multiplier
527 * @shift: shift to the multiplier bit field
528 * @width: width of the multiplier bit field
529 * @lock: register lock
530 *
531 * Clock with an adjustable multiplier affecting its output frequency.
532 * Implements .recalc_rate, .set_rate and .round_rate
533 *
534 * Flags:
535 * CLK_MULTIPLIER_ZERO_BYPASS - By default, the multiplier is the value read
536 * from the register, with 0 being a valid value effectively
537 * zeroing the output clock rate. If CLK_MULTIPLIER_ZERO_BYPASS is
538 * set, then a null multiplier will be considered as a bypass,
539 * leaving the parent rate unmodified.
540 * CLK_MULTIPLIER_ROUND_CLOSEST - Makes the best calculated divider to be
541 * rounded to the closest integer instead of the down one.
542 */
543struct clk_multiplier {
544 struct clk_hw hw;
545 void __iomem *reg;
546 u8 shift;
547 u8 width;
548 u8 flags;
549 spinlock_t *lock;
550};
551
552#define CLK_MULTIPLIER_ZERO_BYPASS BIT(0)
553#define CLK_MULTIPLIER_ROUND_CLOSEST BIT(1)
554
555extern const struct clk_ops clk_multiplier_ops;
556
557struct clk *clk_register_multiplier(struct device *dev, const char *name,
558 const char *parent_name,
559 unsigned long flags,
560 void __iomem *reg, u8 shift, u8 width,
561 u8 clk_mult_flags, spinlock_t *lock);
562void clk_unregister_multiplier(struct clk *clk);
563
521/*** 564/***
522 * struct clk_composite - aggregate clock of mux, divider and gate clocks 565 * struct clk_composite - aggregate clock of mux, divider and gate clocks
523 * 566 *
@@ -606,7 +649,7 @@ void clk_unregister(struct clk *clk);
606void devm_clk_unregister(struct device *dev, struct clk *clk); 649void devm_clk_unregister(struct device *dev, struct clk *clk);
607 650
608/* helper functions */ 651/* helper functions */
609const char *__clk_get_name(struct clk *clk); 652const char *__clk_get_name(const struct clk *clk);
610const char *clk_hw_get_name(const struct clk_hw *hw); 653const char *clk_hw_get_name(const struct clk_hw *hw);
611struct clk_hw *__clk_get_hw(struct clk *clk); 654struct clk_hw *__clk_get_hw(struct clk *clk);
612unsigned int clk_hw_get_num_parents(const struct clk_hw *hw); 655unsigned int clk_hw_get_num_parents(const struct clk_hw *hw);
diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h
index 7669f7618f39..1e6932222e11 100644
--- a/include/linux/clk/at91_pmc.h
+++ b/include/linux/clk/at91_pmc.h
@@ -164,6 +164,7 @@ extern void __iomem *at91_pmc_base;
164#define AT91_PMC_MOSCSELS (1 << 16) /* Main Oscillator Selection [some SAM9] */ 164#define AT91_PMC_MOSCSELS (1 << 16) /* Main Oscillator Selection [some SAM9] */
165#define AT91_PMC_MOSCRCS (1 << 17) /* Main On-Chip RC [some SAM9] */ 165#define AT91_PMC_MOSCRCS (1 << 17) /* Main On-Chip RC [some SAM9] */
166#define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */ 166#define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */
167#define AT91_PMC_GCKRDY (1 << 24) /* Generated Clocks */
167#define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */ 168#define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */
168 169
169#define AT91_PMC_PLLICPR 0x80 /* PLL Charge Pump Current Register */ 170#define AT91_PMC_PLLICPR 0x80 /* PLL Charge Pump Current Register */
@@ -182,13 +183,18 @@ extern void __iomem *at91_pmc_base;
182#define AT91_PMC_PCSR1 0x108 /* Peripheral Clock Enable Register 1 */ 183#define AT91_PMC_PCSR1 0x108 /* Peripheral Clock Enable Register 1 */
183 184
184#define AT91_PMC_PCR 0x10c /* Peripheral Control Register [some SAM9 and SAMA5] */ 185#define AT91_PMC_PCR 0x10c /* Peripheral Control Register [some SAM9 and SAMA5] */
185#define AT91_PMC_PCR_PID (0x3f << 0) /* Peripheral ID */ 186#define AT91_PMC_PCR_PID_MASK 0x3f
186#define AT91_PMC_PCR_CMD (0x1 << 12) /* Command (read=0, write=1) */ 187#define AT91_PMC_PCR_GCKCSS_OFFSET 8
187#define AT91_PMC_PCR_DIV(n) ((n) << 16) /* Divisor Value */ 188#define AT91_PMC_PCR_GCKCSS_MASK (0x7 << AT91_PMC_PCR_GCKCSS_OFFSET)
188#define AT91_PMC_PCR_DIV0 0x0 /* Peripheral clock is MCK */ 189#define AT91_PMC_PCR_GCKCSS(n) ((n) << AT91_PMC_PCR_GCKCSS_OFFSET) /* GCK Clock Source Selection */
189#define AT91_PMC_PCR_DIV2 0x1 /* Peripheral clock is MCK/2 */ 190#define AT91_PMC_PCR_CMD (0x1 << 12) /* Command (read=0, write=1) */
190#define AT91_PMC_PCR_DIV4 0x2 /* Peripheral clock is MCK/4 */ 191#define AT91_PMC_PCR_DIV_OFFSET 16
191#define AT91_PMC_PCR_DIV8 0x3 /* Peripheral clock is MCK/8 */ 192#define AT91_PMC_PCR_DIV_MASK (0x3 << AT91_PMC_PCR_DIV_OFFSET)
192#define AT91_PMC_PCR_EN (0x1 << 28) /* Enable */ 193#define AT91_PMC_PCR_DIV(n) ((n) << AT91_PMC_PCR_DIV_OFFSET) /* Divisor Value */
194#define AT91_PMC_PCR_GCKDIV_OFFSET 20
195#define AT91_PMC_PCR_GCKDIV_MASK (0xff << AT91_PMC_PCR_GCKDIV_OFFSET)
196#define AT91_PMC_PCR_GCKDIV(n) ((n) << AT91_PMC_PCR_GCKDIV_OFFSET) /* Generated Clock Divisor Value */
197#define AT91_PMC_PCR_EN (0x1 << 28) /* Enable */
198#define AT91_PMC_PCR_GCKEN (0x1 << 29) /* GCK Enable */
193 199
194#endif 200#endif
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 31ce435981fe..bdcf358dfce2 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -18,15 +18,6 @@
18struct clock_event_device; 18struct clock_event_device;
19struct module; 19struct module;
20 20
21/* Clock event mode commands for legacy ->set_mode(): OBSOLETE */
22enum clock_event_mode {
23 CLOCK_EVT_MODE_UNUSED,
24 CLOCK_EVT_MODE_SHUTDOWN,
25 CLOCK_EVT_MODE_PERIODIC,
26 CLOCK_EVT_MODE_ONESHOT,
27 CLOCK_EVT_MODE_RESUME,
28};
29
30/* 21/*
31 * Possible states of a clock event device. 22 * Possible states of a clock event device.
32 * 23 *
@@ -86,16 +77,14 @@ enum clock_event_state {
86 * @min_delta_ns: minimum delta value in ns 77 * @min_delta_ns: minimum delta value in ns
87 * @mult: nanosecond to cycles multiplier 78 * @mult: nanosecond to cycles multiplier
88 * @shift: nanoseconds to cycles divisor (power of two) 79 * @shift: nanoseconds to cycles divisor (power of two)
89 * @mode: operating mode, relevant only to ->set_mode(), OBSOLETE
90 * @state_use_accessors:current state of the device, assigned by the core code 80 * @state_use_accessors:current state of the device, assigned by the core code
91 * @features: features 81 * @features: features
92 * @retries: number of forced programming retries 82 * @retries: number of forced programming retries
93 * @set_mode: legacy set mode function, only for modes <= CLOCK_EVT_MODE_RESUME. 83 * @set_state_periodic: switch state to periodic
94 * @set_state_periodic: switch state to periodic, if !set_mode 84 * @set_state_oneshot: switch state to oneshot
95 * @set_state_oneshot: switch state to oneshot, if !set_mode 85 * @set_state_oneshot_stopped: switch state to oneshot_stopped
96 * @set_state_oneshot_stopped: switch state to oneshot_stopped, if !set_mode 86 * @set_state_shutdown: switch state to shutdown
97 * @set_state_shutdown: switch state to shutdown, if !set_mode 87 * @tick_resume: resume clkevt device
98 * @tick_resume: resume clkevt device, if !set_mode
99 * @broadcast: function to broadcast events 88 * @broadcast: function to broadcast events
100 * @min_delta_ticks: minimum delta value in ticks stored for reconfiguration 89 * @min_delta_ticks: minimum delta value in ticks stored for reconfiguration
101 * @max_delta_ticks: maximum delta value in ticks stored for reconfiguration 90 * @max_delta_ticks: maximum delta value in ticks stored for reconfiguration
@@ -116,18 +105,10 @@ struct clock_event_device {
116 u64 min_delta_ns; 105 u64 min_delta_ns;
117 u32 mult; 106 u32 mult;
118 u32 shift; 107 u32 shift;
119 enum clock_event_mode mode;
120 enum clock_event_state state_use_accessors; 108 enum clock_event_state state_use_accessors;
121 unsigned int features; 109 unsigned int features;
122 unsigned long retries; 110 unsigned long retries;
123 111
124 /*
125 * State transition callback(s): Only one of the two groups should be
126 * defined:
127 * - set_mode(), only for modes <= CLOCK_EVT_MODE_RESUME.
128 * - set_state_{shutdown|periodic|oneshot|oneshot_stopped}(), tick_resume().
129 */
130 void (*set_mode)(enum clock_event_mode mode, struct clock_event_device *);
131 int (*set_state_periodic)(struct clock_event_device *); 112 int (*set_state_periodic)(struct clock_event_device *);
132 int (*set_state_oneshot)(struct clock_event_device *); 113 int (*set_state_oneshot)(struct clock_event_device *);
133 int (*set_state_oneshot_stopped)(struct clock_event_device *); 114 int (*set_state_oneshot_stopped)(struct clock_event_device *);
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 430efcbea48e..dca22de98d94 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -127,9 +127,14 @@ struct cpufreq_policy {
127#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/ 127#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/
128 128
129#ifdef CONFIG_CPU_FREQ 129#ifdef CONFIG_CPU_FREQ
130struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu);
130struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); 131struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
131void cpufreq_cpu_put(struct cpufreq_policy *policy); 132void cpufreq_cpu_put(struct cpufreq_policy *policy);
132#else 133#else
134static inline struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu)
135{
136 return NULL;
137}
133static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) 138static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
134{ 139{
135 return NULL; 140 return NULL;
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index ce447f0f1bad..68030e22af35 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -65,7 +65,10 @@ struct devfreq_dev_status {
65 * The "flags" parameter's possible values are 65 * The "flags" parameter's possible values are
66 * explained above with "DEVFREQ_FLAG_*" macros. 66 * explained above with "DEVFREQ_FLAG_*" macros.
67 * @get_dev_status: The device should provide the current performance 67 * @get_dev_status: The device should provide the current performance
68 * status to devfreq, which is used by governors. 68 * status to devfreq. Governors are recommended not to
69 * use this directly. Instead, governors are recommended
70 * to use devfreq_update_stats() along with
71 * devfreq.last_status.
69 * @get_cur_freq: The device should provide the current frequency 72 * @get_cur_freq: The device should provide the current frequency
70 * at which it is operating. 73 * at which it is operating.
71 * @exit: An optional callback that is called when devfreq 74 * @exit: An optional callback that is called when devfreq
@@ -161,6 +164,7 @@ struct devfreq {
161 struct delayed_work work; 164 struct delayed_work work;
162 165
163 unsigned long previous_freq; 166 unsigned long previous_freq;
167 struct devfreq_dev_status last_status;
164 168
165 void *data; /* private data for governors */ 169 void *data; /* private data for governors */
166 170
@@ -204,6 +208,19 @@ extern int devm_devfreq_register_opp_notifier(struct device *dev,
204extern void devm_devfreq_unregister_opp_notifier(struct device *dev, 208extern void devm_devfreq_unregister_opp_notifier(struct device *dev,
205 struct devfreq *devfreq); 209 struct devfreq *devfreq);
206 210
211/**
212 * devfreq_update_stats() - update the last_status pointer in struct devfreq
213 * @df: the devfreq instance whose status needs updating
214 *
215 * Governors are recommended to use this function along with last_status,
216 * which allows other entities to reuse the last_status without affecting
217 * the values fetched later by governors.
218 */
219static inline int devfreq_update_stats(struct devfreq *df)
220{
221 return df->profile->get_dev_status(df->dev.parent, &df->last_status);
222}
223
207#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND) 224#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
208/** 225/**
209 * struct devfreq_simple_ondemand_data - void *data fed to struct devfreq 226 * struct devfreq_simple_ondemand_data - void *data fed to struct devfreq
@@ -289,6 +306,11 @@ static inline void devm_devfreq_unregister_opp_notifier(struct device *dev,
289 struct devfreq *devfreq) 306 struct devfreq *devfreq)
290{ 307{
291} 308}
309
310static inline int devfreq_update_stats(struct devfreq *df)
311{
312 return -EINVAL;
313}
292#endif /* CONFIG_PM_DEVFREQ */ 314#endif /* CONFIG_PM_DEVFREQ */
293 315
294#endif /* __LINUX_DEVFREQ_H__ */ 316#endif /* __LINUX_DEVFREQ_H__ */
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index d0b380ee7d67..e38681f4912d 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -25,6 +25,13 @@
25extern struct files_struct init_files; 25extern struct files_struct init_files;
26extern struct fs_struct init_fs; 26extern struct fs_struct init_fs;
27 27
28#ifdef CONFIG_CGROUPS
29#define INIT_GROUP_RWSEM(sig) \
30 .group_rwsem = __RWSEM_INITIALIZER(sig.group_rwsem),
31#else
32#define INIT_GROUP_RWSEM(sig)
33#endif
34
28#ifdef CONFIG_CPUSETS 35#ifdef CONFIG_CPUSETS
29#define INIT_CPUSET_SEQ(tsk) \ 36#define INIT_CPUSET_SEQ(tsk) \
30 .mems_allowed_seq = SEQCNT_ZERO(tsk.mems_allowed_seq), 37 .mems_allowed_seq = SEQCNT_ZERO(tsk.mems_allowed_seq),
@@ -57,6 +64,7 @@ extern struct fs_struct init_fs;
57 INIT_PREV_CPUTIME(sig) \ 64 INIT_PREV_CPUTIME(sig) \
58 .cred_guard_mutex = \ 65 .cred_guard_mutex = \
59 __MUTEX_INITIALIZER(sig.cred_guard_mutex), \ 66 __MUTEX_INITIALIZER(sig.cred_guard_mutex), \
67 INIT_GROUP_RWSEM(sig) \
60} 68}
61 69
62extern struct nsproxy init_nsproxy; 70extern struct nsproxy init_nsproxy;
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 6f8b34066442..11bf09288ddb 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -110,8 +110,8 @@ enum {
110/* 110/*
111 * Return value for chip->irq_set_affinity() 111 * Return value for chip->irq_set_affinity()
112 * 112 *
113 * IRQ_SET_MASK_OK - OK, core updates irq_data.affinity 113 * IRQ_SET_MASK_OK - OK, core updates irq_common_data.affinity
114 * IRQ_SET_MASK_NOCPY - OK, chip did update irq_data.affinity 114 * IRQ_SET_MASK_NOCPY - OK, chip did update irq_common_data.affinity
115 * IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to 115 * IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to
116 * support stacked irqchips, which indicates skipping 116 * support stacked irqchips, which indicates skipping
117 * all descendent irqchips. 117 * all descendent irqchips.
@@ -129,9 +129,19 @@ struct irq_domain;
129 * struct irq_common_data - per irq data shared by all irqchips 129 * struct irq_common_data - per irq data shared by all irqchips
130 * @state_use_accessors: status information for irq chip functions. 130 * @state_use_accessors: status information for irq chip functions.
131 * Use accessor functions to deal with it 131 * Use accessor functions to deal with it
132 * @node: node index useful for balancing
133 * @handler_data: per-IRQ data for the irq_chip methods
134 * @affinity: IRQ affinity on SMP
135 * @msi_desc: MSI descriptor
132 */ 136 */
133struct irq_common_data { 137struct irq_common_data {
134 unsigned int state_use_accessors; 138 unsigned int state_use_accessors;
139#ifdef CONFIG_NUMA
140 unsigned int node;
141#endif
142 void *handler_data;
143 struct msi_desc *msi_desc;
144 cpumask_var_t affinity;
135}; 145};
136 146
137/** 147/**
@@ -139,38 +149,26 @@ struct irq_common_data {
139 * @mask: precomputed bitmask for accessing the chip registers 149 * @mask: precomputed bitmask for accessing the chip registers
140 * @irq: interrupt number 150 * @irq: interrupt number
141 * @hwirq: hardware interrupt number, local to the interrupt domain 151 * @hwirq: hardware interrupt number, local to the interrupt domain
142 * @node: node index useful for balancing
143 * @common: point to data shared by all irqchips 152 * @common: point to data shared by all irqchips
144 * @chip: low level interrupt hardware access 153 * @chip: low level interrupt hardware access
145 * @domain: Interrupt translation domain; responsible for mapping 154 * @domain: Interrupt translation domain; responsible for mapping
146 * between hwirq number and linux irq number. 155 * between hwirq number and linux irq number.
147 * @parent_data: pointer to parent struct irq_data to support hierarchy 156 * @parent_data: pointer to parent struct irq_data to support hierarchy
148 * irq_domain 157 * irq_domain
149 * @handler_data: per-IRQ data for the irq_chip methods
150 * @chip_data: platform-specific per-chip private data for the chip 158 * @chip_data: platform-specific per-chip private data for the chip
151 * methods, to allow shared chip implementations 159 * methods, to allow shared chip implementations
152 * @msi_desc: MSI descriptor
153 * @affinity: IRQ affinity on SMP
154 *
155 * The fields here need to overlay the ones in irq_desc until we
156 * cleaned up the direct references and switched everything over to
157 * irq_data.
158 */ 160 */
159struct irq_data { 161struct irq_data {
160 u32 mask; 162 u32 mask;
161 unsigned int irq; 163 unsigned int irq;
162 unsigned long hwirq; 164 unsigned long hwirq;
163 unsigned int node;
164 struct irq_common_data *common; 165 struct irq_common_data *common;
165 struct irq_chip *chip; 166 struct irq_chip *chip;
166 struct irq_domain *domain; 167 struct irq_domain *domain;
167#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 168#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
168 struct irq_data *parent_data; 169 struct irq_data *parent_data;
169#endif 170#endif
170 void *handler_data;
171 void *chip_data; 171 void *chip_data;
172 struct msi_desc *msi_desc;
173 cpumask_var_t affinity;
174}; 172};
175 173
176/* 174/*
@@ -190,6 +188,7 @@ struct irq_data {
190 * IRQD_IRQ_MASKED - Masked state of the interrupt 188 * IRQD_IRQ_MASKED - Masked state of the interrupt
191 * IRQD_IRQ_INPROGRESS - In progress state of the interrupt 189 * IRQD_IRQ_INPROGRESS - In progress state of the interrupt
192 * IRQD_WAKEUP_ARMED - Wakeup mode armed 190 * IRQD_WAKEUP_ARMED - Wakeup mode armed
191 * IRQD_FORWARDED_TO_VCPU - The interrupt is forwarded to a VCPU
193 */ 192 */
194enum { 193enum {
195 IRQD_TRIGGER_MASK = 0xf, 194 IRQD_TRIGGER_MASK = 0xf,
@@ -204,6 +203,7 @@ enum {
204 IRQD_IRQ_MASKED = (1 << 17), 203 IRQD_IRQ_MASKED = (1 << 17),
205 IRQD_IRQ_INPROGRESS = (1 << 18), 204 IRQD_IRQ_INPROGRESS = (1 << 18),
206 IRQD_WAKEUP_ARMED = (1 << 19), 205 IRQD_WAKEUP_ARMED = (1 << 19),
206 IRQD_FORWARDED_TO_VCPU = (1 << 20),
207}; 207};
208 208
209#define __irqd_to_state(d) ((d)->common->state_use_accessors) 209#define __irqd_to_state(d) ((d)->common->state_use_accessors)
@@ -282,6 +282,20 @@ static inline bool irqd_is_wakeup_armed(struct irq_data *d)
282 return __irqd_to_state(d) & IRQD_WAKEUP_ARMED; 282 return __irqd_to_state(d) & IRQD_WAKEUP_ARMED;
283} 283}
284 284
285static inline bool irqd_is_forwarded_to_vcpu(struct irq_data *d)
286{
287 return __irqd_to_state(d) & IRQD_FORWARDED_TO_VCPU;
288}
289
290static inline void irqd_set_forwarded_to_vcpu(struct irq_data *d)
291{
292 __irqd_to_state(d) |= IRQD_FORWARDED_TO_VCPU;
293}
294
295static inline void irqd_clr_forwarded_to_vcpu(struct irq_data *d)
296{
297 __irqd_to_state(d) &= ~IRQD_FORWARDED_TO_VCPU;
298}
285 299
286/* 300/*
287 * Functions for chained handlers which can be enabled/disabled by the 301 * Functions for chained handlers which can be enabled/disabled by the
@@ -461,14 +475,14 @@ static inline int irq_set_parent(int irq, int parent_irq)
461 * Built-in IRQ handlers for various IRQ types, 475 * Built-in IRQ handlers for various IRQ types,
462 * callable via desc->handle_irq() 476 * callable via desc->handle_irq()
463 */ 477 */
464extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); 478extern void handle_level_irq(struct irq_desc *desc);
465extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); 479extern void handle_fasteoi_irq(struct irq_desc *desc);
466extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); 480extern void handle_edge_irq(struct irq_desc *desc);
467extern void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc); 481extern void handle_edge_eoi_irq(struct irq_desc *desc);
468extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); 482extern void handle_simple_irq(struct irq_desc *desc);
469extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); 483extern void handle_percpu_irq(struct irq_desc *desc);
470extern void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc); 484extern void handle_percpu_devid_irq(struct irq_desc *desc);
471extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); 485extern void handle_bad_irq(struct irq_desc *desc);
472extern void handle_nested_irq(unsigned int irq); 486extern void handle_nested_irq(unsigned int irq);
473 487
474extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg); 488extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg);
@@ -627,23 +641,23 @@ static inline void *irq_data_get_irq_chip_data(struct irq_data *d)
627static inline void *irq_get_handler_data(unsigned int irq) 641static inline void *irq_get_handler_data(unsigned int irq)
628{ 642{
629 struct irq_data *d = irq_get_irq_data(irq); 643 struct irq_data *d = irq_get_irq_data(irq);
630 return d ? d->handler_data : NULL; 644 return d ? d->common->handler_data : NULL;
631} 645}
632 646
633static inline void *irq_data_get_irq_handler_data(struct irq_data *d) 647static inline void *irq_data_get_irq_handler_data(struct irq_data *d)
634{ 648{
635 return d->handler_data; 649 return d->common->handler_data;
636} 650}
637 651
638static inline struct msi_desc *irq_get_msi_desc(unsigned int irq) 652static inline struct msi_desc *irq_get_msi_desc(unsigned int irq)
639{ 653{
640 struct irq_data *d = irq_get_irq_data(irq); 654 struct irq_data *d = irq_get_irq_data(irq);
641 return d ? d->msi_desc : NULL; 655 return d ? d->common->msi_desc : NULL;
642} 656}
643 657
644static inline struct msi_desc *irq_data_get_msi_desc(struct irq_data *d) 658static inline struct msi_desc *irq_data_get_msi_desc(struct irq_data *d)
645{ 659{
646 return d->msi_desc; 660 return d->common->msi_desc;
647} 661}
648 662
649static inline u32 irq_get_trigger_type(unsigned int irq) 663static inline u32 irq_get_trigger_type(unsigned int irq)
@@ -652,21 +666,30 @@ static inline u32 irq_get_trigger_type(unsigned int irq)
652 return d ? irqd_get_trigger_type(d) : 0; 666 return d ? irqd_get_trigger_type(d) : 0;
653} 667}
654 668
655static inline int irq_data_get_node(struct irq_data *d) 669static inline int irq_common_data_get_node(struct irq_common_data *d)
656{ 670{
671#ifdef CONFIG_NUMA
657 return d->node; 672 return d->node;
673#else
674 return 0;
675#endif
676}
677
678static inline int irq_data_get_node(struct irq_data *d)
679{
680 return irq_common_data_get_node(d->common);
658} 681}
659 682
660static inline struct cpumask *irq_get_affinity_mask(int irq) 683static inline struct cpumask *irq_get_affinity_mask(int irq)
661{ 684{
662 struct irq_data *d = irq_get_irq_data(irq); 685 struct irq_data *d = irq_get_irq_data(irq);
663 686
664 return d ? d->affinity : NULL; 687 return d ? d->common->affinity : NULL;
665} 688}
666 689
667static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d) 690static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
668{ 691{
669 return d->affinity; 692 return d->common->affinity;
670} 693}
671 694
672unsigned int arch_dynirq_lower_bound(unsigned int from); 695unsigned int arch_dynirq_lower_bound(unsigned int from);
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 5acfa26602e1..a587a33363c7 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -98,11 +98,7 @@ extern struct irq_desc irq_desc[NR_IRQS];
98 98
99static inline struct irq_desc *irq_data_to_desc(struct irq_data *data) 99static inline struct irq_desc *irq_data_to_desc(struct irq_data *data)
100{ 100{
101#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 101 return container_of(data->common, struct irq_desc, irq_common_data);
102 return irq_to_desc(data->irq);
103#else
104 return container_of(data, struct irq_desc, irq_data);
105#endif
106} 102}
107 103
108static inline unsigned int irq_desc_get_irq(struct irq_desc *desc) 104static inline unsigned int irq_desc_get_irq(struct irq_desc *desc)
@@ -127,23 +123,21 @@ static inline void *irq_desc_get_chip_data(struct irq_desc *desc)
127 123
128static inline void *irq_desc_get_handler_data(struct irq_desc *desc) 124static inline void *irq_desc_get_handler_data(struct irq_desc *desc)
129{ 125{
130 return desc->irq_data.handler_data; 126 return desc->irq_common_data.handler_data;
131} 127}
132 128
133static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) 129static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc)
134{ 130{
135 return desc->irq_data.msi_desc; 131 return desc->irq_common_data.msi_desc;
136} 132}
137 133
138/* 134/*
139 * Architectures call this to let the generic IRQ layer 135 * Architectures call this to let the generic IRQ layer
140 * handle an interrupt. If the descriptor is attached to an 136 * handle an interrupt.
141 * irqchip-style controller then we call the ->handle_irq() handler,
142 * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
143 */ 137 */
144static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc) 138static inline void generic_handle_irq_desc(struct irq_desc *desc)
145{ 139{
146 desc->handle_irq(irq, desc); 140 desc->handle_irq(desc);
147} 141}
148 142
149int generic_handle_irq(unsigned int irq); 143int generic_handle_irq(unsigned int irq);
@@ -176,29 +170,6 @@ static inline int irq_has_action(unsigned int irq)
176 return irq_desc_has_action(irq_to_desc(irq)); 170 return irq_desc_has_action(irq_to_desc(irq));
177} 171}
178 172
179/* caller has locked the irq_desc and both params are valid */
180static inline void __irq_set_handler_locked(unsigned int irq,
181 irq_flow_handler_t handler)
182{
183 struct irq_desc *desc;
184
185 desc = irq_to_desc(irq);
186 desc->handle_irq = handler;
187}
188
189/* caller has locked the irq_desc and both params are valid */
190static inline void
191__irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip,
192 irq_flow_handler_t handler, const char *name)
193{
194 struct irq_desc *desc;
195
196 desc = irq_to_desc(irq);
197 irq_desc_get_irq_data(desc)->chip = chip;
198 desc->handle_irq = handler;
199 desc->name = name;
200}
201
202/** 173/**
203 * irq_set_handler_locked - Set irq handler from a locked region 174 * irq_set_handler_locked - Set irq handler from a locked region
204 * @data: Pointer to the irq_data structure which identifies the irq 175 * @data: Pointer to the irq_data structure which identifies the irq
diff --git a/include/linux/irqhandler.h b/include/linux/irqhandler.h
index 62d543004197..661bed0ed1f3 100644
--- a/include/linux/irqhandler.h
+++ b/include/linux/irqhandler.h
@@ -8,7 +8,7 @@
8 8
9struct irq_desc; 9struct irq_desc;
10struct irq_data; 10struct irq_data;
11typedef void (*irq_flow_handler_t)(unsigned int irq, struct irq_desc *desc); 11typedef void (*irq_flow_handler_t)(struct irq_desc *desc);
12typedef void (*irq_preflow_handler_t)(struct irq_data *data); 12typedef void (*irq_preflow_handler_t)(struct irq_data *data);
13 13
14#endif 14#endif
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 7f653e8f6690..f1094238ab2a 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -21,8 +21,8 @@
21 * 21 *
22 * DEFINE_STATIC_KEY_TRUE(key); 22 * DEFINE_STATIC_KEY_TRUE(key);
23 * DEFINE_STATIC_KEY_FALSE(key); 23 * DEFINE_STATIC_KEY_FALSE(key);
24 * static_key_likely() 24 * static_branch_likely()
25 * statick_key_unlikely() 25 * static_branch_unlikely()
26 * 26 *
27 * Jump labels provide an interface to generate dynamic branches using 27 * Jump labels provide an interface to generate dynamic branches using
28 * self-modifying code. Assuming toolchain and architecture support, if we 28 * self-modifying code. Assuming toolchain and architecture support, if we
@@ -45,12 +45,10 @@
45 * statement, setting the key to true requires us to patch in a jump 45 * statement, setting the key to true requires us to patch in a jump
46 * to the out-of-line of true branch. 46 * to the out-of-line of true branch.
47 * 47 *
48 * In addtion to static_branch_{enable,disable}, we can also reference count 48 * In addition to static_branch_{enable,disable}, we can also reference count
49 * the key or branch direction via static_branch_{inc,dec}. Thus, 49 * the key or branch direction via static_branch_{inc,dec}. Thus,
50 * static_branch_inc() can be thought of as a 'make more true' and 50 * static_branch_inc() can be thought of as a 'make more true' and
51 * static_branch_dec() as a 'make more false'. The inc()/dec() 51 * static_branch_dec() as a 'make more false'.
52 * interface is meant to be used exclusively from the inc()/dec() for a given
53 * key.
54 * 52 *
55 * Since this relies on modifying code, the branch modifying functions 53 * Since this relies on modifying code, the branch modifying functions
56 * must be considered absolute slow paths (machine wide synchronization etc.). 54 * must be considered absolute slow paths (machine wide synchronization etc.).
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 88a00694eda5..2d15e3831440 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -507,6 +507,7 @@ static inline void napi_enable(struct napi_struct *n)
507 BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)); 507 BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state));
508 smp_mb__before_atomic(); 508 smp_mb__before_atomic();
509 clear_bit(NAPI_STATE_SCHED, &n->state); 509 clear_bit(NAPI_STATE_SCHED, &n->state);
510 clear_bit(NAPI_STATE_NPSVC, &n->state);
510} 511}
511 512
512#ifdef CONFIG_SMP 513#ifdef CONFIG_SMP
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 962387a192f1..4a4e3a092337 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -19,6 +19,7 @@
19#include <linux/spinlock.h> 19#include <linux/spinlock.h>
20#include <linux/ethtool.h> 20#include <linux/ethtool.h>
21#include <linux/mii.h> 21#include <linux/mii.h>
22#include <linux/module.h>
22#include <linux/timer.h> 23#include <linux/timer.h>
23#include <linux/workqueue.h> 24#include <linux/workqueue.h>
24#include <linux/mod_devicetable.h> 25#include <linux/mod_devicetable.h>
@@ -153,6 +154,7 @@ struct sk_buff;
153 * PHYs should register using this structure 154 * PHYs should register using this structure
154 */ 155 */
155struct mii_bus { 156struct mii_bus {
157 struct module *owner;
156 const char *name; 158 const char *name;
157 char id[MII_BUS_ID_SIZE]; 159 char id[MII_BUS_ID_SIZE];
158 void *priv; 160 void *priv;
@@ -198,7 +200,8 @@ static inline struct mii_bus *mdiobus_alloc(void)
198 return mdiobus_alloc_size(0); 200 return mdiobus_alloc_size(0);
199} 201}
200 202
201int mdiobus_register(struct mii_bus *bus); 203int __mdiobus_register(struct mii_bus *bus, struct module *owner);
204#define mdiobus_register(bus) __mdiobus_register(bus, THIS_MODULE)
202void mdiobus_unregister(struct mii_bus *bus); 205void mdiobus_unregister(struct mii_bus *bus);
203void mdiobus_free(struct mii_bus *bus); 206void mdiobus_free(struct mii_bus *bus);
204struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv); 207struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv);
@@ -742,6 +745,7 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
742 struct phy_c45_device_ids *c45_ids); 745 struct phy_c45_device_ids *c45_ids);
743struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); 746struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
744int phy_device_register(struct phy_device *phy); 747int phy_device_register(struct phy_device *phy);
748void phy_device_remove(struct phy_device *phydev);
745int phy_init_hw(struct phy_device *phydev); 749int phy_init_hw(struct phy_device *phydev);
746int phy_suspend(struct phy_device *phydev); 750int phy_suspend(struct phy_device *phydev);
747int phy_resume(struct phy_device *phydev); 751int phy_resume(struct phy_device *phydev);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index a4ab9daa387c..b7b9501b41af 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -762,6 +762,18 @@ struct signal_struct {
762 unsigned audit_tty_log_passwd; 762 unsigned audit_tty_log_passwd;
763 struct tty_audit_buf *tty_audit_buf; 763 struct tty_audit_buf *tty_audit_buf;
764#endif 764#endif
765#ifdef CONFIG_CGROUPS
766 /*
767 * group_rwsem prevents new tasks from entering the threadgroup and
768 * member tasks from exiting,a more specifically, setting of
769 * PF_EXITING. fork and exit paths are protected with this rwsem
770 * using threadgroup_change_begin/end(). Users which require
771 * threadgroup to remain stable should use threadgroup_[un]lock()
772 * which also takes care of exec path. Currently, cgroup is the
773 * only user.
774 */
775 struct rw_semaphore group_rwsem;
776#endif
765 777
766 oom_flags_t oom_flags; 778 oom_flags_t oom_flags;
767 short oom_score_adj; /* OOM kill score adjustment */ 779 short oom_score_adj; /* OOM kill score adjustment */
diff --git a/include/linux/security.h b/include/linux/security.h
index 79d85ddf8093..2f4c1f7aa7db 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -946,7 +946,7 @@ static inline int security_task_prctl(int option, unsigned long arg2,
946 unsigned long arg4, 946 unsigned long arg4,
947 unsigned long arg5) 947 unsigned long arg5)
948{ 948{
949 return cap_task_prctl(option, arg2, arg3, arg3, arg5); 949 return cap_task_prctl(option, arg2, arg3, arg4, arg5);
950} 950}
951 951
952static inline void security_task_to_inode(struct task_struct *p, struct inode *inode) 952static inline void security_task_to_inode(struct task_struct *p, struct inode *inode)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2738d355cdf9..2b0a30a6e31c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -179,6 +179,9 @@ struct nf_bridge_info {
179 u8 bridged_dnat:1; 179 u8 bridged_dnat:1;
180 __u16 frag_max_size; 180 __u16 frag_max_size;
181 struct net_device *physindev; 181 struct net_device *physindev;
182
183 /* always valid & non-NULL from FORWARD on, for physdev match */
184 struct net_device *physoutdev;
182 union { 185 union {
183 /* prerouting: detect dnat in orig/reply direction */ 186 /* prerouting: detect dnat in orig/reply direction */
184 __be32 ipv4_daddr; 187 __be32 ipv4_daddr;
@@ -189,9 +192,6 @@ struct nf_bridge_info {
189 * skb is out in neigh layer. 192 * skb is out in neigh layer.
190 */ 193 */
191 char neigh_header[8]; 194 char neigh_header[8];
192
193 /* always valid & non-NULL from FORWARD on, for physdev match */
194 struct net_device *physoutdev;
195 }; 195 };
196}; 196};
197#endif 197#endif
@@ -2707,6 +2707,9 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb,
2707{ 2707{
2708 if (skb->ip_summed == CHECKSUM_COMPLETE) 2708 if (skb->ip_summed == CHECKSUM_COMPLETE)
2709 skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0)); 2709 skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
2710 else if (skb->ip_summed == CHECKSUM_PARTIAL &&
2711 skb_checksum_start_offset(skb) <= len)
2712 skb->ip_summed = CHECKSUM_NONE;
2710} 2713}
2711 2714
2712unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); 2715unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 269e8afd3e2a..6b00f18f5e6b 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -34,7 +34,7 @@ extern struct bus_type spi_bus_type;
34 34
35/** 35/**
36 * struct spi_statistics - statistics for spi transfers 36 * struct spi_statistics - statistics for spi transfers
37 * @clock: lock protecting this structure 37 * @lock: lock protecting this structure
38 * 38 *
39 * @messages: number of spi-messages handled 39 * @messages: number of spi-messages handled
40 * @transfers: number of spi_transfers handled 40 * @transfers: number of spi_transfers handled
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h
index 7591788e9fbf..357e44c1a46b 100644
--- a/include/linux/sunrpc/xprtsock.h
+++ b/include/linux/sunrpc/xprtsock.h
@@ -42,6 +42,7 @@ struct sock_xprt {
42 /* 42 /*
43 * Connection of transports 43 * Connection of transports
44 */ 44 */
45 unsigned long sock_state;
45 struct delayed_work connect_worker; 46 struct delayed_work connect_worker;
46 struct sockaddr_storage srcaddr; 47 struct sockaddr_storage srcaddr;
47 unsigned short srcport; 48 unsigned short srcport;
@@ -76,6 +77,8 @@ struct sock_xprt {
76 */ 77 */
77#define TCP_RPC_REPLY (1UL << 6) 78#define TCP_RPC_REPLY (1UL << 6)
78 79
80#define XPRT_SOCK_CONNECTING 1U
81
79#endif /* __KERNEL__ */ 82#endif /* __KERNEL__ */
80 83
81#endif /* _LINUX_SUNRPC_XPRTSOCK_H */ 84#endif /* _LINUX_SUNRPC_XPRTSOCK_H */
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 17292fee8686..157d366e761b 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -360,7 +360,7 @@ static inline struct thermal_zone_device *
360thermal_zone_of_sensor_register(struct device *dev, int id, void *data, 360thermal_zone_of_sensor_register(struct device *dev, int id, void *data,
361 const struct thermal_zone_of_device_ops *ops) 361 const struct thermal_zone_of_device_ops *ops)
362{ 362{
363 return NULL; 363 return ERR_PTR(-ENODEV);
364} 364}
365 365
366static inline 366static inline
@@ -380,6 +380,8 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)
380 380
381int power_actor_get_max_power(struct thermal_cooling_device *, 381int power_actor_get_max_power(struct thermal_cooling_device *,
382 struct thermal_zone_device *tz, u32 *max_power); 382 struct thermal_zone_device *tz, u32 *max_power);
383int power_actor_get_min_power(struct thermal_cooling_device *,
384 struct thermal_zone_device *tz, u32 *min_power);
383int power_actor_set_power(struct thermal_cooling_device *, 385int power_actor_set_power(struct thermal_cooling_device *,
384 struct thermal_instance *, u32); 386 struct thermal_instance *, u32);
385struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, 387struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,
@@ -415,6 +417,10 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)
415static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev, 417static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev,
416 struct thermal_zone_device *tz, u32 *max_power) 418 struct thermal_zone_device *tz, u32 *max_power)
417{ return 0; } 419{ return 0; }
420static inline int power_actor_get_min_power(struct thermal_cooling_device *cdev,
421 struct thermal_zone_device *tz,
422 u32 *min_power)
423{ return -ENODEV; }
418static inline int power_actor_set_power(struct thermal_cooling_device *cdev, 424static inline int power_actor_set_power(struct thermal_cooling_device *cdev,
419 struct thermal_instance *tz, u32 power) 425 struct thermal_instance *tz, u32 power)
420{ return 0; } 426{ return 0; }
diff --git a/include/linux/tick.h b/include/linux/tick.h
index 48d901f83f92..e312219ff823 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -147,11 +147,20 @@ static inline void tick_nohz_full_add_cpus_to(struct cpumask *mask)
147 cpumask_or(mask, mask, tick_nohz_full_mask); 147 cpumask_or(mask, mask, tick_nohz_full_mask);
148} 148}
149 149
150static inline int housekeeping_any_cpu(void)
151{
152 return cpumask_any_and(housekeeping_mask, cpu_online_mask);
153}
154
150extern void tick_nohz_full_kick(void); 155extern void tick_nohz_full_kick(void);
151extern void tick_nohz_full_kick_cpu(int cpu); 156extern void tick_nohz_full_kick_cpu(int cpu);
152extern void tick_nohz_full_kick_all(void); 157extern void tick_nohz_full_kick_all(void);
153extern void __tick_nohz_task_switch(void); 158extern void __tick_nohz_task_switch(void);
154#else 159#else
160static inline int housekeeping_any_cpu(void)
161{
162 return smp_processor_id();
163}
155static inline bool tick_nohz_full_enabled(void) { return false; } 164static inline bool tick_nohz_full_enabled(void) { return false; }
156static inline bool tick_nohz_full_cpu(int cpu) { return false; } 165static inline bool tick_nohz_full_cpu(int cpu) { return false; }
157static inline void tick_nohz_full_add_cpus_to(struct cpumask *mask) { } 166static inline void tick_nohz_full_add_cpus_to(struct cpumask *mask) { }
diff --git a/include/linux/wait.h b/include/linux/wait.h
index d3d077228d4c..1e1bf9f963a9 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -147,8 +147,7 @@ __remove_wait_queue(wait_queue_head_t *head, wait_queue_t *old)
147 147
148typedef int wait_bit_action_f(struct wait_bit_key *); 148typedef int wait_bit_action_f(struct wait_bit_key *);
149void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); 149void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
150void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, int nr, 150void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key);
151 void *key);
152void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, void *key); 151void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
153void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr); 152void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr);
154void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); 153void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
@@ -180,7 +179,7 @@ wait_queue_head_t *bit_waitqueue(void *, int);
180#define wake_up_poll(x, m) \ 179#define wake_up_poll(x, m) \
181 __wake_up(x, TASK_NORMAL, 1, (void *) (m)) 180 __wake_up(x, TASK_NORMAL, 1, (void *) (m))
182#define wake_up_locked_poll(x, m) \ 181#define wake_up_locked_poll(x, m) \
183 __wake_up_locked_key((x), TASK_NORMAL, 1, (void *) (m)) 182 __wake_up_locked_key((x), TASK_NORMAL, (void *) (m))
184#define wake_up_interruptible_poll(x, m) \ 183#define wake_up_interruptible_poll(x, m) \
185 __wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m)) 184 __wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m))
186#define wake_up_interruptible_sync_poll(x, m) \ 185#define wake_up_interruptible_sync_poll(x, m) \