From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGifw-0005YC-2A for qemu-devel@nongnu.org; Tue, 16 Jun 2009 20:06:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGifq-0005Xx-UG for qemu-devel@nongnu.org; Tue, 16 Jun 2009 20:06:47 -0400 Received: from [199.232.76.173] (port=38387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGifq-0005Xu-O7 for qemu-devel@nongnu.org; Tue, 16 Jun 2009 20:06:42 -0400 Received: from mx20.gnu.org ([199.232.41.8]:63319) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MGifq-0007Mg-3o for qemu-devel@nongnu.org; Tue, 16 Jun 2009 20:06:42 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGifp-0006R3-CL for qemu-devel@nongnu.org; Tue, 16 Jun 2009 20:06:41 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH] sparc64: use pci_mem_base Date: Wed, 17 Jun 2009 01:06:38 +0100 References: <200906170013.38327.paul@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906170106.39575.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wednesday 17 June 2009, Igor Kovalenko wrote: > On Wed, Jun 17, 2009 at 3:13 AM, Paul Brook wrote: > >> Fortunately there exists global pci_mem_base variable which > >> is used by pci_to_cpu_addr() but it seems to be only called > >> while clearing pci memory mapping. > > > > I think this is the wrong way to fix this. Better would be for the map > > functions to go away altogether. > > Like pci bus would handle that memory address mapping between > devices and cpu? Yes. In fact individual devices generally shouldn't need to know about the mappings at all. They should just provide a handler for accesses via a particular BAR. Paul