From: "Miguel Ojeda" <maxextreme@gmail.com>
To: Franck <vagabon.xyz@gmail.com>
Cc: "Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.19-rc1 update4] drivers: add LCD support
Date: Mon, 30 Oct 2006 14:53:15 +0100 [thread overview]
Message-ID: <653402b90610300553t405c67e6u69dee3c83c22dae5@mail.gmail.com> (raw)
In-Reply-To: <4545C756.30403@innova-card.com>
On 10/30/06, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> Andrew,
>
> Andrew Morton wrote:
> > On Thu, 26 Oct 2006 17:48:58 +0000
> > Miguel Ojeda Sandonis <maxextreme@gmail.com> wrote:
> >
> [snip]
> >
> >> +struct page *cfag12864bfb_vma_nopage(struct vm_area_struct *vma,
> >> + unsigned long address, int *type)
> >
> > This function can have static scope.
> >
> >> +{
> >> + struct page *page;
> >> + down(&cfag12864bfb_sem);
> >> +
> >> + page = virt_to_page(cfag12864b_buffer);
> >> + get_page(page);
> >> +
> >> + if(type)
> >> + *type = VM_FAULT_MINOR;
> >> +
> >> + up(&cfag12864bfb_sem);
> >> + return page;
> >> +}
> >
>
> Any idea why LDD3 states:
>
> An interesting limitation of remap_pfn_range is that it gives
> access only to reserved pages and physical addresses above the
> top of physical memory.
>
> Is that true we can't do:
>
> buf = (char *)__get_free_page(...);
> pfn = PFN_DOWN(virt_to_phys(buf));
> remap_pfn_range(vma, vma->vm_start, pfn, PAGE_SIZE, vma->vm_page_prot);
>
> Thanks
> Franck
>
Again: Please read LDD3. It explains it well. Read all the "Remapping
RAM" chapter and you will understand what I've done, or just try to
remap RAM yourself with remap_pfn_range. (I really tried it using
different ways and I couldn't map it with remap_pfn_range, it returns
you a place full with zeros, as LDD3 states).
next prev parent reply other threads:[~2006-10-30 13:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 17:48 Miguel Ojeda Sandonis
2006-10-27 5:07 ` Andrew Morton
2006-10-27 12:42 ` Miguel Ojeda
2006-10-30 9:35 ` Franck Bui-Huu
2006-10-30 13:53 ` Miguel Ojeda [this message]
2006-10-31 8:47 ` Franck Bui-Huu
2006-10-31 13:58 ` Miguel Ojeda
2006-10-30 14:24 ` Hugh Dickins
2006-10-27 15:34 Miguel Ojeda Sandonis
2006-10-31 8:13 ` Franck Bui-Huu
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=653402b90610300553t405c67e6u69dee3c83c22dae5@mail.gmail.com \
--to=maxextreme@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vagabon.xyz@gmail.com \
/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®