From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Peter Osterlund <petero2@telia.com>,
linux-kernel@vger.kernel.org, axboe@suse.de
Subject: Re: [PATCH] Fix incorrect kunmap_atomic in pktcdvd
Date: Sun, 24 Oct 2004 06:21:28 -0700 [thread overview]
Message-ID: <20041024132128.GQ17038@holomorphy.com> (raw)
In-Reply-To: <20041024041827.664845da.akpm@osdl.org>
Peter Osterlund <petero2@telia.com> wrote:
>> Why was the interface made different from kmap()/kunmap() in the first
>> place? Wouldn't it have made more sense to let kunmap_atomic() take a
>> page pointer as the first parameter?
On Sun, Oct 24, 2004 at 04:18:27AM -0700, Andrew Morton wrote:
> No, kmap-atomic() maps a single page into the CPU's address space by making
> a pte point at the page. To unmap that page we need to get at the pte, not
> at the page. If kmap_atomic() were to take a pageframe address we'd need
> to search the whole fixmap space for the corresponding page - a reverse
> lookup.
I don't recall anything truly ancient, but fixmap indices should be
enough to recover the virtual address and pte. I think the virtual
address is primarily for checking purposes. The same kind of check
could be done by checking the pfn derived from the page structure
against the contents of the pte at the fixmap index, but I suspect
more damage would ensue from changing the calling convention than
aligning it with common expectations.
-- wli
prev parent reply other threads:[~2004-10-24 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-23 17:31 [PATCH] Fix incorrect kunmap_atomic in pktcdvd Peter Osterlund
2004-10-24 10:25 ` Andrew Morton
2004-10-24 11:14 ` Peter Osterlund
2004-10-24 11:18 ` Andrew Morton
2004-10-24 13:21 ` William Lee Irwin III [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=20041024132128.GQ17038@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=petero2@telia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.