aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_fixed.h14
-rw-r--r--include/linux/mlx5/device.h20
-rw-r--r--include/linux/mlx5/driver.h4
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/tick.h6
-rw-r--r--include/linux/vmpressure.h3
6 files changed, 33 insertions, 15 deletions
diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h
index f5e1168c7647..d639049a613d 100644
--- a/include/drm/drm_fixed.h
+++ b/include/drm/drm_fixed.h
@@ -84,12 +84,12 @@ static inline int drm_fixp2int(int64_t a)
84 return ((s64)a) >> DRM_FIXED_POINT; 84 return ((s64)a) >> DRM_FIXED_POINT;
85} 85}
86 86
87static inline s64 drm_fixp_msbset(int64_t a) 87static inline unsigned drm_fixp_msbset(int64_t a)
88{ 88{
89 unsigned shift, sign = (a >> 63) & 1; 89 unsigned shift, sign = (a >> 63) & 1;
90 90
91 for (shift = 62; shift > 0; --shift) 91 for (shift = 62; shift > 0; --shift)
92 if ((a >> shift) != sign) 92 if (((a >> shift) & 1) != sign)
93 return shift; 93 return shift;
94 94
95 return 0; 95 return 0;
@@ -100,9 +100,9 @@ static inline s64 drm_fixp_mul(s64 a, s64 b)
100 unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b); 100 unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b);
101 s64 result; 101 s64 result;
102 102
103 if (shift > 63) { 103 if (shift > 61) {
104 shift = shift - 63; 104 shift = shift - 61;
105 a >>= shift >> 1; 105 a >>= (shift >> 1) + (shift & 1);
106 b >>= shift >> 1; 106 b >>= shift >> 1;
107 } else 107 } else
108 shift = 0; 108 shift = 0;
@@ -120,7 +120,7 @@ static inline s64 drm_fixp_mul(s64 a, s64 b)
120 120
121static inline s64 drm_fixp_div(s64 a, s64 b) 121static inline s64 drm_fixp_div(s64 a, s64 b)
122{ 122{
123 unsigned shift = 63 - drm_fixp_msbset(a); 123 unsigned shift = 62 - drm_fixp_msbset(a);
124 s64 result; 124 s64 result;
125 125
126 a <<= shift; 126 a <<= shift;
@@ -154,7 +154,7 @@ static inline s64 drm_fixp_exp(s64 x)
154 } 154 }
155 155
156 if (x < 0) 156 if (x < 0)
157 sum = drm_fixp_div(1, sum); 157 sum = drm_fixp_div(DRM_FIXED_ONE, sum);
158 158
159 return sum; 159 return sum;
160} 160}
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index 8de8d8f22384..737685e9e852 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -690,6 +690,26 @@ struct mlx5_query_cq_mbox_out {
690 __be64 pas[0]; 690 __be64 pas[0];
691}; 691};
692 692
693struct mlx5_enable_hca_mbox_in {
694 struct mlx5_inbox_hdr hdr;
695 u8 rsvd[8];
696};
697
698struct mlx5_enable_hca_mbox_out {
699 struct mlx5_outbox_hdr hdr;
700 u8 rsvd[8];
701};
702
703struct mlx5_disable_hca_mbox_in {
704 struct mlx5_inbox_hdr hdr;
705 u8 rsvd[8];
706};
707
708struct mlx5_disable_hca_mbox_out {
709 struct mlx5_outbox_hdr hdr;
710 u8 rsvd[8];
711};
712
693struct mlx5_eq_context { 713struct mlx5_eq_context {
694 u8 status; 714 u8 status;
695 u8 ec_oi; 715 u8 ec_oi;
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index f22e4419839b..2aa258b0ced1 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -101,6 +101,8 @@ enum {
101 MLX5_CMD_OP_QUERY_ADAPTER = 0x101, 101 MLX5_CMD_OP_QUERY_ADAPTER = 0x101,
102 MLX5_CMD_OP_INIT_HCA = 0x102, 102 MLX5_CMD_OP_INIT_HCA = 0x102,
103 MLX5_CMD_OP_TEARDOWN_HCA = 0x103, 103 MLX5_CMD_OP_TEARDOWN_HCA = 0x103,
104 MLX5_CMD_OP_ENABLE_HCA = 0x104,
105 MLX5_CMD_OP_DISABLE_HCA = 0x105,
104 MLX5_CMD_OP_QUERY_PAGES = 0x107, 106 MLX5_CMD_OP_QUERY_PAGES = 0x107,
105 MLX5_CMD_OP_MANAGE_PAGES = 0x108, 107 MLX5_CMD_OP_MANAGE_PAGES = 0x108,
106 MLX5_CMD_OP_SET_HCA_CAP = 0x109, 108 MLX5_CMD_OP_SET_HCA_CAP = 0x109,
@@ -690,7 +692,7 @@ int mlx5_pagealloc_start(struct mlx5_core_dev *dev);
690void mlx5_pagealloc_stop(struct mlx5_core_dev *dev); 692void mlx5_pagealloc_stop(struct mlx5_core_dev *dev);
691void mlx5_core_req_pages_handler(struct mlx5_core_dev *dev, u16 func_id, 693void mlx5_core_req_pages_handler(struct mlx5_core_dev *dev, u16 func_id,
692 s16 npages); 694 s16 npages);
693int mlx5_satisfy_startup_pages(struct mlx5_core_dev *dev); 695int mlx5_satisfy_startup_pages(struct mlx5_core_dev *dev, int boot);
694int mlx5_reclaim_startup_pages(struct mlx5_core_dev *dev); 696int mlx5_reclaim_startup_pages(struct mlx5_core_dev *dev);
695void mlx5_register_debugfs(void); 697void mlx5_register_debugfs(void);
696void mlx5_unregister_debugfs(void); 698void mlx5_unregister_debugfs(void);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 50d04b92ceda..d722490da030 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1628,6 +1628,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut,
1628#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ 1628#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */
1629#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ 1629#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
1630#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */ 1630#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */
1631#define PF_SUSPEND_TASK 0x80000000 /* this thread called freeze_processes and should not be frozen */
1631 1632
1632/* 1633/*
1633 * Only the _current_ task can read/write to tsk->flags, but other 1634 * Only the _current_ task can read/write to tsk->flags, but other
diff --git a/include/linux/tick.h b/include/linux/tick.h
index 9180f4b85e6d..62bd8b72873c 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -174,10 +174,4 @@ static inline void tick_nohz_task_switch(struct task_struct *tsk) { }
174#endif 174#endif
175 175
176 176
177# ifdef CONFIG_CPU_IDLE_GOV_MENU
178extern void menu_hrtimer_cancel(void);
179# else
180static inline void menu_hrtimer_cancel(void) {}
181# endif /* CONFIG_CPU_IDLE_GOV_MENU */
182
183#endif 177#endif
diff --git a/include/linux/vmpressure.h b/include/linux/vmpressure.h
index 76be077340ea..7dc17e2456de 100644
--- a/include/linux/vmpressure.h
+++ b/include/linux/vmpressure.h
@@ -12,7 +12,7 @@ struct vmpressure {
12 unsigned long scanned; 12 unsigned long scanned;
13 unsigned long reclaimed; 13 unsigned long reclaimed;
14 /* The lock is used to keep the scanned/reclaimed above in sync. */ 14 /* The lock is used to keep the scanned/reclaimed above in sync. */
15 struct mutex sr_lock; 15 struct spinlock sr_lock;
16 16
17 /* The list of vmpressure_event structs. */ 17 /* The list of vmpressure_event structs. */
18 struct list_head events; 18 struct list_head events;
@@ -30,6 +30,7 @@ extern void vmpressure(gfp_t gfp, struct mem_cgroup *memcg,
30extern void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio); 30extern void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio);
31 31
32extern void vmpressure_init(struct vmpressure *vmpr); 32extern void vmpressure_init(struct vmpressure *vmpr);
33extern void vmpressure_cleanup(struct vmpressure *vmpr);
33extern struct vmpressure *memcg_to_vmpressure(struct mem_cgroup *memcg); 34extern struct vmpressure *memcg_to_vmpressure(struct mem_cgroup *memcg);
34extern struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr); 35extern struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr);
35extern struct vmpressure *css_to_vmpressure(struct cgroup_subsys_state *css); 36extern struct vmpressure *css_to_vmpressure(struct cgroup_subsys_state *css);