linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2005-11-18 16:05 Andi Kleen
  2005-11-21 10:06 ` (no subject) Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2005-11-18 16:05 UTC (permalink / raw)
  To: virtualization, linux-kernel, bunk

Sender: ak@brahms.suse.de
To: Adrian Bunk <bunk@stusta.de>
Cc: linux-kernel@vger.kernel.org, virtualization@lists.osdl.org
Subject: Re: [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
References: <20051118014055.GK11494@stusta.de>
From: Andi Kleen <ak@suse.de>
Date: 18 Nov 2005 17:05:07 +0100
In-Reply-To: <20051118014055.GK11494@stusta.de>
Message-ID: <p73lkzmhrgs.fsf@brahms.suse.de>
Lines: 17
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Adrian Bunk <bunk@stusta.de> writes:

> virt_to_bus/bus_to_virt are long deprecated, mark them as __deprecated 
> on i386.

I don't think you can do that. We still need these functions in low 
level architecture code at least.

Using __pa/__va doesn't cut it because it won't work on Xen guests
which have different views on bus vs physical addresses. The Xen
code is (hopefully) in the process of being merged, so intentionally
breaking them isn't a good idea.

So if anything there would need to be replacement functions for it
first that do the same thing. But why not just keep the old ones?

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (no subject)
  2005-11-18 16:05 Andi Kleen
@ 2005-11-21 10:06 ` Keir Fraser
  2005-11-21 10:11   ` Russell King
  2005-11-21 17:27   ` Andi Kleen
  0 siblings, 2 replies; 4+ messages in thread
From: Keir Fraser @ 2005-11-21 10:06 UTC (permalink / raw)
  To: Andi Kleen; +Cc: virtualization, bunk, linux-kernel


On 18 Nov 2005, at 16:05, Andi Kleen wrote:

> I don't think you can do that. We still need these functions in low
> level architecture code at least.
>
> Using __pa/__va doesn't cut it because it won't work on Xen guests
> which have different views on bus vs physical addresses. The Xen
> code is (hopefully) in the process of being merged, so intentionally
> breaking them isn't a good idea.
>
> So if anything there would need to be replacement functions for it
> first that do the same thing. But why not just keep the old ones?

We could make use of virt_to_machine/machine_to_virt instead, which 
arguably better describe the intent of those functions. Currently we 
only use virt_to_bus/bus_to_virt in our swiotlb implementation, and our 
modified dma_map code. In those files I think the existing function 
names make some sense, but we can easily change if that's preferred.

  -- Keir


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (no subject)
  2005-11-21 10:06 ` (no subject) Keir Fraser
@ 2005-11-21 10:11   ` Russell King
  2005-11-21 17:27   ` Andi Kleen
  1 sibling, 0 replies; 4+ messages in thread
From: Russell King @ 2005-11-21 10:11 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Andi Kleen, virtualization, bunk, linux-kernel

On Mon, Nov 21, 2005 at 10:06:03AM +0000, Keir Fraser wrote:
> On 18 Nov 2005, at 16:05, Andi Kleen wrote:
> >I don't think you can do that. We still need these functions in low
> >level architecture code at least.
> >
> >Using __pa/__va doesn't cut it because it won't work on Xen guests
> >which have different views on bus vs physical addresses. The Xen
> >code is (hopefully) in the process of being merged, so intentionally
> >breaking them isn't a good idea.
> >
> >So if anything there would need to be replacement functions for it
> >first that do the same thing. But why not just keep the old ones?
> 
> We could make use of virt_to_machine/machine_to_virt instead, which 
> arguably better describe the intent of those functions. Currently we 
> only use virt_to_bus/bus_to_virt in our swiotlb implementation, and our 
> modified dma_map code. In those files I think the existing function 
> names make some sense, but we can easily change if that's preferred.

If you're thinking of replacing bus_to_virt/virt_to_bus, you might want
to think about virt_to_dma(dev, virt) and dma_to_virt(dev, dma) as a
replacement, where "dev" is the device actually performing the DMA
(which obviously may not be the device asking for the mapping to be set
up.)  ARM already has these for use in the architecture code.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (no subject)
  2005-11-21 10:06 ` (no subject) Keir Fraser
  2005-11-21 10:11   ` Russell King
@ 2005-11-21 17:27   ` Andi Kleen
  1 sibling, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2005-11-21 17:27 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Andi Kleen, virtualization, bunk, linux-kernel

> We could make use of virt_to_machine/machine_to_virt instead, which 

I don't like it because "machine" is quite meaningless outside
Xen. 

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-21 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-18 16:05 Andi Kleen
2005-11-21 10:06 ` (no subject) Keir Fraser
2005-11-21 10:11   ` Russell King
2005-11-21 17:27   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).