[Top] [All Lists]

Re: [PATCH 0/2] FLATMEM: allow memory to start at pfn != 0 [take #2]

Subject: Re: [PATCH 0/2] FLATMEM: allow memory to start at pfn != 0 [take #2]
From: "Franck Bui-Huu" <>
Date: Tue, 13 Mar 2007 09:37:06 +0100
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed;; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NBn8OEUXtwy+e3LV3chd0biZbmGue1ocO25HyXmAwZ6rxjM5dTz4Gp6saJFxwfeaTcPYdsWqd+kRBOzVXl48rUWDllWOAekCM8IwMyhzskgztMKQUhv4ZGvdHDoeyKuFcOoa+jFEvpa/9gIs2eFkJXEf4cUVxrl6qrXJ+wrV9Qk=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fKsIvb0vhZeETdVPDSBX2sU+7EHmYZTAyJHjPPCzL/33I1IjRLnf1uOazc2ktBJbiXchSpU8OWbdUrPFxtT0bvA4zlWnb//4vKG5mpCtxmeGnTFXOsHDPuEPsA7hm75k22remxRCFHAC0YUgpMelkIHSQ6aGMksyMhxLXscimgY=
In-reply-to: <Pine.LNX.4.58.0703122016430.438@Indigo2.Peter>
Original-recipient: rfc822;
References: <> <Pine.LNX.4.58.0703101034500.19007@Indigo2.Peter> <> <Pine.LNX.4.58.0703121329450.440@Indigo2.Peter> <> <Pine.LNX.4.58.0703122016430.438@Indigo2.Peter>
On 3/12/07, peter fuerst <> wrote:
On Mon, 12 Mar 2007, Franck Bui-Huu wrote:
> Can you explain why the current use of pa() failed to handle all
> kernel address with a real example ?

Simply, when you convert between cached (kseg0, ckseg0, several xkphys-
regions) and uncached (kseg1, ckseg1, several xkphys-regions) addresses
and the other way round, you need the physical address as an intermediate
value and __pa() or virt_to_phys() can support only one direction.

I was asking for _real_ uses. Can you point out some code where these
convertion are needed ?

I'm asking that because your uses of __pa()/virt_to_phys() to convert
cached address into uncached address and vice versa is weird. You
talked about drivers but I would think that drivers have physical
addresses of the device they control. And they get a virtual address
by using ioremap() and Co. And using __pa() on such addresses is
simply buggy whatever the implementation of __pa().

<Prev in Thread] Current Thread [Next in Thread>