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

Paul Mackerras paulus at samba.org
Wed Nov 19 15:07:04 EST 2008


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.



More information about the Linuxppc-dev mailing list