Daniel Axtens <d...@axtens.net> writes: > Michael Ellerman <m...@ellerman.id.au> writes: >> Daniel Axtens <d...@axtens.net> writes: >>> Haren Myneni <ha...@linux.ibm.com> writes: >>>> diff --git a/arch/powerpc/platforms/powernv/vas-api.c >>>> b/arch/powerpc/platforms/powernv/vas-api.c >>>> new file mode 100644 >>>> index 0000000..7d049af >>>> --- /dev/null >>>> +++ b/arch/powerpc/platforms/powernv/vas-api.c >>>> @@ -0,0 +1,257 @@ >> ... >>>> + >>>> +static int coproc_mmap(struct file *fp, struct vm_area_struct *vma) >>>> +{ >>>> + struct vas_window *txwin = fp->private_data; >>>> + unsigned long pfn; >>>> + u64 paste_addr; >>>> + pgprot_t prot; >>>> + int rc; >>>> + >>>> + if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) { >>> >>> I think you said this should be 4096 rather than 64k, regardless of what >>> PAGE_SIZE you are compiled with? >> >> You can't mmap less than a page, a page is PAGE_SIZE bytes. >> >> So if that checked for 4K explicitly it would prevent mmap on 64K >> kernels always, which seems like not what you want? > > Ah. My bad. Carry on then :)
Well you were just quoting something from Haren, so I think it's over to him. cheers