Re: [PATCH v2 2/3] RISC-V: Use Linux logical cpu number instead of hartid

2018-09-05 Thread Christoph Hellwig
On Tue, Sep 04, 2018 at 02:43:13PM -0700, Atish Patra wrote: > On 9/4/18 2:36 PM, Christoph Hellwig wrote: > > On Tue, Sep 04, 2018 at 01:35:10PM -0700, Atish Patra wrote: > > > sure. How about this ? > > > > That would work, but why not just keep calling sbi_remove_sfence_vma > > directly from fl

Re: [PATCH v2 2/3] RISC-V: Use Linux logical cpu number instead of hartid

2018-09-04 Thread Atish Patra
On 9/4/18 2:36 PM, Christoph Hellwig wrote: On Tue, Sep 04, 2018 at 01:35:10PM -0700, Atish Patra wrote: sure. How about this ? That would work, but why not just keep calling sbi_remove_sfence_vma directly from flush_tlb_all? I guess that's fine too. I just wanted to keep all flush_tlb_* same

Re: [PATCH v2 2/3] RISC-V: Use Linux logical cpu number instead of hartid

2018-09-04 Thread Christoph Hellwig
On Tue, Sep 04, 2018 at 01:35:10PM -0700, Atish Patra wrote: > sure. How about this ? That would work, but why not just keep calling sbi_remove_sfence_vma directly from flush_tlb_all?

Re: [PATCH v2 2/3] RISC-V: Use Linux logical cpu number instead of hartid

2018-09-04 Thread Atish Patra
On 8/30/18 11:11 PM, Christoph Hellwig wrote: -#define flush_tlb_all() sbi_remote_sfence_vma(NULL, 0, -1) +static inline void remote_sfence_vma(struct cpumask *cmask, unsigned long start, +unsigned long size) +{ + struct cpumask hmask; + + riscv_cp

Re: [PATCH v2 2/3] RISC-V: Use Linux logical cpu number instead of hartid

2018-08-30 Thread Christoph Hellwig
> -#define flush_tlb_all() sbi_remote_sfence_vma(NULL, 0, -1) > +static inline void remote_sfence_vma(struct cpumask *cmask, unsigned long > start, > + unsigned long size) > +{ > + struct cpumask hmask; > + > + riscv_cpuid_to_hartid_mask(cmask, &hmask); > +

[PATCH v2 2/3] RISC-V: Use Linux logical cpu number instead of hartid

2018-08-28 Thread Atish Patra
Setup the cpu_logical_map during boot. Moreover, every SBI call and PLIC context are based on the physical hartid. Use the logical cpu to hartid mapping to pass correct hartid to respective functions. Signed-off-by: Atish Patra --- arch/riscv/include/asm/tlbflush.h | 17 + arch/r