On Thu, 2007-05-17 at 10:49 +0100, Christoph Hellwig wrote:
> On Thu, May 17, 2007 at 05:33:48AM +0800, Antonino A. Daplas wrote:
> > -#if defined(__sparc__) && !defined(__sparc_v9__)
> > - /* Should never get here, all fb drivers should have their own
> > - mmap routines */
> > - return -EINVAL;
> > -#else
> > - /* !sparc32... */
> > + if (fb_mmap_required())
> > + return -EINVAL;
> > +
>
> I don't like this bit.
Me too, actually. I did it this way because I don't want to deviate from
the old code too much. Since all sparc32 drivers are either linked to
sbuslib.c or has their own fb_mmap method, the above test is redundant.
I'll leave the decision to remove the above test to David Miller.
> It's just that all sparc frame buffers happen
> to have a mmap method but there's nothing fundamentally arch specific
> here. You should be able to plug a pci video card into any linux
> supported machine provided the fb driver does the full setup (which
> only very few do in practice, but..)
>
> So I'd just require drivers to have a fb_mmap method and make fb_mmap
> the default one.
This one is a tad bit more complicated, so I'll leave the present setup
for now. Once the arch-specific parts are properly separated, maybe I'll
take that step.
> The page protection cleanup is still nice of course,
> but it might make sense to give it a more generic name as it's not
> really fb specific.
Any suggestion for a name? io_pgprotect() perhaps?
Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]