From: Christoph Hellwig <hch@infradead.org>
To: Nick Holloway <Nick.Holloway@pyrites.org.uk>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: [PATCH 2.6.15-rc4 1/1] cpia: use vm_insert_page() instead of remap_pfn_range()
Date: Tue, 6 Dec 2005 19:10:12 +0000 [thread overview]
Message-ID: <20051206191012.GA27116@infradead.org> (raw)
In-Reply-To: <20051205152758.GA29108@pyrites.org.uk>
> pos = (unsigned long)(cam->frame_buf);
> while (size > 0) {
> - page = vmalloc_to_pfn((void *)pos);
> - if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
> + page = vmalloc_to_page((void *)pos);
> + if (vm_insert_page(vma, start, page)) {
it would be nicer to do the arithmetis on pos as pointers rather than unsigned
long. Also you might want to use alloc_pages + vmap instead of vmalloc so that
you already have a page array. Or we should provide a helper that walks over
a vmalloc'ed region and calls vmalloc_to_page + vm_insert_page. Either way
this type of code is duplicated far too much and we'd really need some better
interface for it.
next prev parent reply other threads:[~2005-12-06 19:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 15:27 Nick Holloway
2005-12-06 18:31 ` Hugh Dickins
2005-12-06 20:35 ` Nick Holloway
2005-12-07 23:03 ` Mauro Carvalho Chehab
2005-12-06 19:10 ` Christoph Hellwig [this message]
2005-12-06 21:04 ` Nick Holloway
2005-12-06 22:20 ` Nick Piggin
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=20051206191012.GA27116@infradead.org \
--to=hch@infradead.org \
--cc=Nick.Holloway@pyrites.org.uk \
--cc=linux-kernel@vger.kernel.org \
--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
Powered by JetHome