@@ -32,9 +32,6 @@ struct hv_flush_pcpu_ex {
32
32
/* Each gva in gva_list encodes up to 4096 pages to flush */
33
33
#define HV_TLB_FLUSH_UNIT (4096 * PAGE_SIZE)
34
34
35
- static struct hv_flush_pcpu __percpu * * pcpu_flush ;
36
-
37
- static struct hv_flush_pcpu_ex __percpu * * pcpu_flush_ex ;
38
35
39
36
/*
40
37
* Fills in gva_list starting from offset. Returns the number of items added.
@@ -77,18 +74,16 @@ static void hyperv_flush_tlb_others(const struct cpumask *cpus,
77
74
78
75
trace_hyperv_mmu_flush_tlb_others (cpus , info );
79
76
80
- if (!pcpu_flush || ! hv_hypercall_pg )
77
+ if (!hv_hypercall_pg )
81
78
goto do_native ;
82
79
83
80
if (cpumask_empty (cpus ))
84
81
return ;
85
82
86
83
local_irq_save (flags );
87
84
88
- flush_pcpu = this_cpu_ptr (pcpu_flush );
89
-
90
- if (unlikely (!* flush_pcpu ))
91
- * flush_pcpu = page_address (alloc_page (GFP_ATOMIC ));
85
+ flush_pcpu = (struct hv_flush_pcpu * * )
86
+ this_cpu_ptr (hyperv_pcpu_input_arg );
92
87
93
88
flush = * flush_pcpu ;
94
89
@@ -164,18 +159,16 @@ static void hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
164
159
165
160
trace_hyperv_mmu_flush_tlb_others (cpus , info );
166
161
167
- if (!pcpu_flush_ex || ! hv_hypercall_pg )
162
+ if (!hv_hypercall_pg )
168
163
goto do_native ;
169
164
170
165
if (cpumask_empty (cpus ))
171
166
return ;
172
167
173
168
local_irq_save (flags );
174
169
175
- flush_pcpu = this_cpu_ptr (pcpu_flush_ex );
176
-
177
- if (unlikely (!* flush_pcpu ))
178
- * flush_pcpu = page_address (alloc_page (GFP_ATOMIC ));
170
+ flush_pcpu = (struct hv_flush_pcpu_ex * * )
171
+ this_cpu_ptr (hyperv_pcpu_input_arg );
179
172
180
173
flush = * flush_pcpu ;
181
174
@@ -257,14 +250,3 @@ void hyperv_setup_mmu_ops(void)
257
250
pv_mmu_ops .flush_tlb_others = hyperv_flush_tlb_others_ex ;
258
251
}
259
252
}
260
-
261
- void hyper_alloc_mmu (void )
262
- {
263
- if (!(ms_hyperv .hints & HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED ))
264
- return ;
265
-
266
- if (!(ms_hyperv .hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED ))
267
- pcpu_flush = alloc_percpu (struct hv_flush_pcpu * );
268
- else
269
- pcpu_flush_ex = alloc_percpu (struct hv_flush_pcpu_ex * );
270
- }
0 commit comments