Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262810AbVCPVZ3 (ORCPT ); Wed, 16 Mar 2005 16:25:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262816AbVCPVZ3 (ORCPT ); Wed, 16 Mar 2005 16:25:29 -0500 Received: from ozlabs.org ([203.10.76.45]:4046 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S262810AbVCPVXV (ORCPT ); Wed, 16 Mar 2005 16:23:21 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16952.41973.751326.592933@cargo.ozlabs.ibm.com> Date: Thu, 17 Mar 2005 08:24:05 +1100 From: Paul Mackerras To: Keir Fraser Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, riel@redhat.com, kurt@garloff.de, Ian.Pratt@cl.cam.ac.uk, Christian.Limpach@cl.cam.ac.uk Subject: Re: [PATCH] Xen/i386 cleanups - AGP bus/phys cleanups In-Reply-To: References: X-Mailer: VM 7.19 under Emacs 21.3.1 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1337 Lines: 29 Keir Fraser writes: > This patch cleans up AGP driver treatment of bus/device memory. Every > use of virt_to_phys/phys_to_virt should properly be converting between > virtual and bus addresses: this distinction really matters for the Xen > hypervisor. I think you are misunderstanding the distinction between physical addresses and bus addresses. Specifically, it seems wrong to me to be putting bus addresses into the GATT rather than physical addresses. For example, on my G5, physical addresses are 36 bits (in the hardware) but bus addresses are only 32 bits. Using bus addresses in the GATT would mean that I couldn't put any memory above the 4GB point into the GATT. The distinction is that physical addresses are what are used to access physical memory, whereas bus addresses are what appears on some external bus (usually PCI). The GATT sits between an external (AGP) bus and memory, so while the GATT is indexed using bus addresses, its entries contain physical addresses. So in fact virt_to_phys is the correct thing to use to calculate values to put in GATT entries. Paul. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/