[PATCH] Fix BSR to allow mmap of small BSR on 64k kernel

Sonny Rao sonnyrao at us.ibm.com
Thu Nov 20 04:04:38 EST 2008


On Wed, Nov 19, 2008 at 03:07:04PM +1100, Paul Mackerras wrote:
> Sonny Rao writes:
> 
> > -	if (io_remap_pfn_range(vma, vma->vm_start, dev->bsr_addr >> PAGE_SHIFT,
> > -			       size, vma->vm_page_prot))
> > +	/* check for the case of a small BSR device and map one 4k page for it*/
> > +	if (dev->bsr_len < PAGE_SIZE && size == PAGE_SIZE)
> > +		ret = remap_4k_pfn(vma, vma->vm_start, dev->bsr_addr >> 12,
> > +				   vma->vm_page_prot);
> 
> I think we should be checking that dev->bsr_len == 4096 here.
> 
> Paul.

Well, dev->bsr_len could be 4096 or 8192

-- 
Sonny Rao, LTC OzLabs, BML team



More information about the Linuxppc-dev mailing list