|
@@ -215,7 +215,9 @@ static inline void vivt_flush_cache_mm(struct mm_struct *mm)
|
|
|
static inline void
|
|
|
vivt_flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
|
|
|
{
|
|
|
- if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)))
|
|
|
+ struct mm_struct *mm = vma->vm_mm;
|
|
|
+
|
|
|
+ if (!mm || cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm)))
|
|
|
__cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
|
|
|
vma->vm_flags);
|
|
|
}
|
|
@@ -223,7 +225,9 @@ vivt_flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned
|
|
|
static inline void
|
|
|
vivt_flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
|
|
|
{
|
|
|
- if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
|
|
|
+ struct mm_struct *mm = vma->vm_mm;
|
|
|
+
|
|
|
+ if (!mm || cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm))) {
|
|
|
unsigned long addr = user_addr & PAGE_MASK;
|
|
|
__cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
|
|
|
}
|