[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mvmh86cl1o3.fsf@linux-m68k.org>
Date: Tue, 20 Aug 2019 09:46:20 +0200
From: Andreas Schwab <schwab@...ux-m68k.org>
To: Atish Patra <atish.patra@....com>
Cc: linux-kernel@...r.kernel.org, Albert Ou <aou@...s.berkeley.edu>,
Allison Randal <allison@...utok.net>,
Anup Patel <anup@...infault.org>,
linux-riscv@...ts.infradead.org,
Palmer Dabbelt <palmer@...ive.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
"hch\@infradead.org" <hch@...radead.org>
Subject: Re: [v2 PATCH] RISC-V: Optimize tlb flush path.
On Aug 19 2019, Atish Patra <atish.patra@....com> wrote:
> @@ -42,20 +43,44 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
>
> #include <asm/sbi.h>
>
> -static inline void remote_sfence_vma(struct cpumask *cmask, unsigned long start,
> - unsigned long size)
> +static void __riscv_flush_tlb(struct cpumask *cmask, unsigned long start,
> + unsigned long size)
cmask can be const.
> {
> struct cpumask hmask;
> + unsigned int hartid;
> + unsigned int cpuid;
>
> cpumask_clear(&hmask);
> +
> + if (!cmask) {
> + riscv_cpuid_to_hartid_mask(cpu_online_mask, &hmask);
> + goto issue_sfence;
> + }
Wouldn't it make sense to fall through to doing a local flush here?
if (!cmask)
cmask = cpu_online_mask;
Andreas.
--
Andreas Schwab, schwab@...ux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Powered by blists - more mailing lists