aboutsummaryrefslogtreecommitdiff
path: root/arch/openrisc/kernel/smp.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org> 2021-11-08 09:31:25 -0800
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2021-11-08 09:31:25 -0800
commita2b03e48e961be442560796105211fc71bed02ae (patch)
tree625bc3982c5515e105649dc995f33562f5ec265b /arch/openrisc/kernel/smp.c
parentMerge tag 'perf-tools-for-v5.16-2021-11-07-without-bpftool-fix' of git://git.... (diff)
parentopenrisc: fix SMP tlb flush NULL pointer dereference (diff)
downloadlinux-a2b03e48e961be442560796105211fc71bed02ae.tar.gz
linux-a2b03e48e961be442560796105211fc71bed02ae.tar.bz2
linux-a2b03e48e961be442560796105211fc71bed02ae.zip
Merge tag 'for-linus' of git://github.com/openrisc/linux
Pull OpenRISC updates from Stafford Horne: "This includes two minor cleanups, plus a bug fix for OpenRISC TLB flush code that allows the the SMP kernel to boot again" * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: fix SMP tlb flush NULL pointer dereference openrisc: signal: remove unused DEBUG_SIG macro openrisc: time: don't mark comment as kernel-doc
Diffstat (limited to 'arch/openrisc/kernel/smp.c')
-rw-r--r--arch/openrisc/kernel/smp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/openrisc/kernel/smp.c b/arch/openrisc/kernel/smp.c
index da21e22bf4da..27041db2c8b0 100644
--- a/arch/openrisc/kernel/smp.c
+++ b/arch/openrisc/kernel/smp.c
@@ -268,7 +268,7 @@ static inline void ipi_flush_tlb_range(void *info)
local_flush_tlb_range(NULL, fd->addr1, fd->addr2);
}
-static void smp_flush_tlb_range(struct cpumask *cmask, unsigned long start,
+static void smp_flush_tlb_range(const struct cpumask *cmask, unsigned long start,
unsigned long end)
{
unsigned int cpuid;
@@ -316,7 +316,9 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
void flush_tlb_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end)
{
- smp_flush_tlb_range(mm_cpumask(vma->vm_mm), start, end);
+ const struct cpumask *cmask = vma ? mm_cpumask(vma->vm_mm)
+ : cpu_online_mask;
+ smp_flush_tlb_range(cmask, start, end);
}
/* Instruction cache invalidate - performed on each cpu */