mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: graff yang <graff.yang@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Paul Mundt <lethal@linux-sh.org>, Mel Gorman <mel@csn.ul.ie>,
	Greg Ungerer <gerg@snapgear.com>
Subject: Re: [PATCH] NOMMU: Fix MAP_PRIVATE mmap() of objects where the data  can be mapped directly
Date: Fri, 25 Sep 2009 19:05:28 +0800	[thread overview]
Message-ID: <7d86d44a0909250405j60a0f27dncef8443a2d74b747@mail.gmail.com> (raw)
In-Reply-To: <11260.1253867067@redhat.com>

On Fri, Sep 25, 2009 at 4:24 PM, David Howells <dhowells@redhat.com> wrote:
> graff yang <graff.yang@gmail.com> wrote:
>
>> > +       if (capabilities & BDI_CAP_MAP_DIRECT) {
>>
>> This will breaks many drivers, e.g. some frame-buffer drivers, on NOMMU
>> system.  Because they don't have get_unmapped_area().  These drivers depend
>> on it's mmap() to return the frame-buffer base address.
>
> Then they won't work on NOMMU.  Read Documentation/nommu-mmap.txt:
>
>        ============================================
>        PROVIDING SHAREABLE CHARACTER DEVICE SUPPORT
>        ============================================
>
>        To provide shareable character device support, a driver must provide a
>        file->f_op->get_unmapped_area() operation. The mmap() routines will
>        call this to get a proposed address for the mapping. This may return an
>        error if it doesn't wish to honour the mapping because it's too long,
>        at a weird offset, under some unsupported combination of flags or
>        whatever.
>
> The chardev driver doesn't provide the virtual address through its mmap() fop
> in MMU-mode either - that's provided by do_mmap_pgoff().
>
> David
>
OK, I think do_mmap_pgoff() now looks nice with your patch.   Merely,
at least the alsa/fb driver
will crash due to the vm_region changes.
The alsa guys are fixing this issue:
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-March/015802.html

Is there any other things be affected?

-- 
-Graff

      reply	other threads:[~2009-09-25 11:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 14:13 David Howells
2009-09-24 19:59 ` Pekka Enberg
2009-09-24 22:09 ` Andrew Morton
2009-09-25  0:39 ` David Howells
2009-09-25  1:01   ` Andrew Morton
2009-09-25  1:17   ` David Howells
2009-09-25  0:43 ` Paul Mundt
2009-09-25  4:39 ` graff yang
2009-09-25  8:24 ` David Howells
2009-09-25 11:05   ` graff yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d86d44a0909250405j60a0f27dncef8443a2d74b747@mail.gmail.com \
    --to=graff.yang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=gerg@snapgear.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=penberg@cs.helsinki.fi \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®