public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: graff yang <graff.yang@gmail.com>
Cc: dhowells@redhat.com, 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 09:24:27 +0100	[thread overview]
Message-ID: <11260.1253867067@redhat.com> (raw)
In-Reply-To: <7d86d44a0909242139v32a0ef6bh68386cbda31d0682@mail.gmail.com>

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

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 14:13 [PATCH] NOMMU: Fix MAP_PRIVATE mmap() of objects where the data can be mapped directly 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 [this message]
2009-09-25 11:05     ` graff yang

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=11260.1253867067@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=gerg@snapgear.com \
    --cc=graff.yang@gmail.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