Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-20 Thread Palmer Dabbelt
On Tue, 14 Aug 2018 06:39:23 PDT (-0700), Christoph Hellwig wrote: SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end, uintptr_t, flags) { +#ifdef CONFIG_SMP struct mm_struct *mm = current->mm; bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0;

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-20 Thread Palmer Dabbelt
On Tue, 14 Aug 2018 06:39:23 PDT (-0700), Christoph Hellwig wrote: SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end, uintptr_t, flags) { +#ifdef CONFIG_SMP struct mm_struct *mm = current->mm; bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0;

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-14 Thread Christoph Hellwig
> SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end, > uintptr_t, flags) > { > +#ifdef CONFIG_SMP > struct mm_struct *mm = current->mm; > bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0; > +#endif > > /* Check the reserved flags. */ >

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-14 Thread Christoph Hellwig
> SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end, > uintptr_t, flags) > { > +#ifdef CONFIG_SMP > struct mm_struct *mm = current->mm; > bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0; > +#endif > > /* Check the reserved flags. */ >

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-14 Thread Christoph Hellwig
On Fri, Aug 10, 2018 at 11:27:37AM -0700, Palmer Dabbelt wrote: > I'm not sure. We can implement the syscall fine in !SMP, it's just that the > vDSO is expected to always eat these calls because in non-SMP mode you can > do a global fence.i by just doing a local fence.i (there's only one hart). >

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-14 Thread Christoph Hellwig
On Fri, Aug 10, 2018 at 11:27:37AM -0700, Palmer Dabbelt wrote: > I'm not sure. We can implement the syscall fine in !SMP, it's just that the > vDSO is expected to always eat these calls because in non-SMP mode you can > do a global fence.i by just doing a local fence.i (there's only one hart). >

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Palmer Dabbelt
On Fri, 10 Aug 2018 11:47:15 PDT (-0700), li...@roeck-us.net wrote: On Fri, Aug 10, 2018 at 11:27:37AM -0700, Palmer Dabbelt wrote: On Fri, 10 Aug 2018 01:38:04 PDT (-0700), Christoph Hellwig wrote: >On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: >>This would be necessary to

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Palmer Dabbelt
On Fri, 10 Aug 2018 11:47:15 PDT (-0700), li...@roeck-us.net wrote: On Fri, Aug 10, 2018 at 11:27:37AM -0700, Palmer Dabbelt wrote: On Fri, 10 Aug 2018 01:38:04 PDT (-0700), Christoph Hellwig wrote: >On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: >>This would be necessary to

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Guenter Roeck
On Fri, Aug 10, 2018 at 11:27:37AM -0700, Palmer Dabbelt wrote: > On Fri, 10 Aug 2018 01:38:04 PDT (-0700), Christoph Hellwig wrote: > >On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: > >>This would be necessary to make non-SMP builds work, but there is > >>another error in the

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Guenter Roeck
On Fri, Aug 10, 2018 at 11:27:37AM -0700, Palmer Dabbelt wrote: > On Fri, 10 Aug 2018 01:38:04 PDT (-0700), Christoph Hellwig wrote: > >On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: > >>This would be necessary to make non-SMP builds work, but there is > >>another error in the

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Palmer Dabbelt
On Fri, 10 Aug 2018 01:38:04 PDT (-0700), Christoph Hellwig wrote: On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: This would be necessary to make non-SMP builds work, but there is another error in the implementation of our syscall linkage that actually just causes

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Palmer Dabbelt
On Fri, 10 Aug 2018 01:38:04 PDT (-0700), Christoph Hellwig wrote: On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: This would be necessary to make non-SMP builds work, but there is another error in the implementation of our syscall linkage that actually just causes

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Guenter Roeck
On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: > This would be necessary to make non-SMP builds work, but there is > another error in the implementation of our syscall linkage that actually > just causes sys_riscv_flush_icache to never build. I've build tested > this on

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Guenter Roeck
On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: > This would be necessary to make non-SMP builds work, but there is > another error in the implementation of our syscall linkage that actually > just causes sys_riscv_flush_icache to never build. I've build tested > this on

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Christoph Hellwig
On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: > This would be necessary to make non-SMP builds work, but there is > another error in the implementation of our syscall linkage that actually > just causes sys_riscv_flush_icache to never build. I've build tested > this on

Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-10 Thread Christoph Hellwig
On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: > This would be necessary to make non-SMP builds work, but there is > another error in the implementation of our syscall linkage that actually > just causes sys_riscv_flush_icache to never build. I've build tested > this on

[PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-09 Thread Palmer Dabbelt
This would be necessary to make non-SMP builds work, but there is another error in the implementation of our syscall linkage that actually just causes sys_riscv_flush_icache to never build. I've build tested this on allnoconfig and allnoconfig+SMP=y, as well as defconfig like normal. CC:

[PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n

2018-08-09 Thread Palmer Dabbelt
This would be necessary to make non-SMP builds work, but there is another error in the implementation of our syscall linkage that actually just causes sys_riscv_flush_icache to never build. I've build tested this on allnoconfig and allnoconfig+SMP=y, as well as defconfig like normal. CC: