Re: [PATCH v3 1/1] sgi-gru: Remove *pte_lookup functions

2019-07-30 Thread Bharath Vedartham
On Mon, Jul 29, 2019 at 08:48:42AM +0200, Christoph Hellwig wrote: > On Sat, Jul 27, 2019 at 01:12:00AM +0530, Bharath Vedartham wrote: > > + ret = get_user_pages_fast(vaddr, 1, write, &page); > > I think you want to pass "write ? FOLL_WRITE : 0" here, as > get_user_pages_fast takes a gu

Re: [PATCH v3 1/1] sgi-gru: Remove *pte_lookup functions

2019-07-28 Thread Christoph Hellwig
On Sat, Jul 27, 2019 at 01:12:00AM +0530, Bharath Vedartham wrote: > + ret = get_user_pages_fast(vaddr, 1, write, &page); I think you want to pass "write ? FOLL_WRITE : 0" here, as get_user_pages_fast takes a gup_flags argument, not a boolean write flag.

Re: [PATCH v3 1/1] sgi-gru: Remove *pte_lookup functions

2019-07-28 Thread Bharath Vedartham
On Sat, Jul 27, 2019 at 05:22:28PM +0800, Hillf Danton wrote: > > On Fri, 26 Jul 2019 12:42:26 -0700 (PDT) Bharath Vedartham wrote: > > > > static int gru_vtop(struct gru_thread_state *gts, unsigned long vaddr, > > int write, int atomic, unsigned long *gpa, int *pageshift) > > {