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

From: Sonny Rao <[email-masked]>
Date: Thu, 20 Nov 2008 13:20:57 -0600

On Thu, Nov 20, 2008 at 09:54:21AM +1100, Paul Mackerras wrote:
> Sonny Rao writes:
> 
> > On Wed, Nov 19, 2008 at 03:07:04PM +1100, Paul Mackerras wrote:
> > > I think we should be checking that dev->bsr_len == 4096 here.
> > > 
> > > Paul.
> > 
> > Well, dev->bsr_len could be 4096 or 8192
> 
> Isn't the dev->bsr_len == 8192 case the one where we'll only map 4096
> bytes and therefore not do what the user expected?  Sounds to me like
> we want to return an error for that case.

Well, the problem is that we can't tell if the user asked for 4k or
8k (since we only know the size of the VMA).  

If we fail whenever dev->bsr_len is 8k then the user could never
map that device on a 64k page kernel. Is that what we want?

-- 
Sonny Rao, LTC OzLabs, BML team