Skip to content

Commit dc0b124

Browse files
kosakicmetcalf-tilera
authored andcommitted
tile: replace mm->cpu_vm_mask with mm_cpumask()
We plan to change mm->cpu_vm_mask definition later. Thus, this patch convert it into proper macro. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
1 parent ef0aaf8 commit dc0b124

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎arch/tile/include/asm/mmu_context.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
100100
__get_cpu_var(current_asid) = asid;
101101

102102
/* Clear cpu from the old mm, and set it in the new one. */
103-
cpumask_clear_cpu(cpu, &prev->cpu_vm_mask);
104-
cpumask_set_cpu(cpu, &next->cpu_vm_mask);
103+
cpumask_clear_cpu(cpu, mm_cpumask(prev));
104+
cpumask_set_cpu(cpu, mm_cpumask(next));
105105

106106
/* Re-load page tables */
107107
install_page_table(next->pgd, asid);

‎arch/tile/kernel/tlb.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ void flush_tlb_mm(struct mm_struct *mm)
3434
{
3535
HV_Remote_ASID asids[NR_CPUS];
3636
int i = 0, cpu;
37-
for_each_cpu(cpu, &mm->cpu_vm_mask) {
37+
for_each_cpu(cpu, mm_cpumask(mm)) {
3838
HV_Remote_ASID *asid = &asids[i++];
3939
asid->y = cpu / smp_topology.width;
4040
asid->x = cpu % smp_topology.width;
4141
asid->asid = per_cpu(current_asid, cpu);
4242
}
43-
flush_remote(0, HV_FLUSH_EVICT_L1I, &mm->cpu_vm_mask,
43+
flush_remote(0, HV_FLUSH_EVICT_L1I, mm_cpumask(mm),
4444
0, 0, 0, NULL, asids, i);
4545
}
4646

@@ -54,8 +54,8 @@ void flush_tlb_page_mm(const struct vm_area_struct *vma, struct mm_struct *mm,
5454
{
5555
unsigned long size = hv_page_size(vma);
5656
int cache = (vma->vm_flags & VM_EXEC) ? HV_FLUSH_EVICT_L1I : 0;
57-
flush_remote(0, cache, &mm->cpu_vm_mask,
58-
va, size, size, &mm->cpu_vm_mask, NULL, 0);
57+
flush_remote(0, cache, mm_cpumask(mm),
58+
va, size, size, mm_cpumask(mm), NULL, 0);
5959
}
6060

6161
void flush_tlb_page(const struct vm_area_struct *vma, unsigned long va)
@@ -70,8 +70,8 @@ void flush_tlb_range(const struct vm_area_struct *vma,
7070
unsigned long size = hv_page_size(vma);
7171
struct mm_struct *mm = vma->vm_mm;
7272
int cache = (vma->vm_flags & VM_EXEC) ? HV_FLUSH_EVICT_L1I : 0;
73-
flush_remote(0, cache, &mm->cpu_vm_mask, start, end - start, size,
74-
&mm->cpu_vm_mask, NULL, 0);
73+
flush_remote(0, cache, mm_cpumask(mm), start, end - start, size,
74+
mm_cpumask(mm), NULL, 0);
7575
}
7676

7777
void flush_tlb_all(void)

0 commit comments

Comments
 (0)