Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945969Ab2JLPxx (ORCPT ); Fri, 12 Oct 2012 11:53:53 -0400 Received: from mga11.intel.com ([192.55.52.93]:64900 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1945918Ab2JLPxv (ORCPT ); Fri, 12 Oct 2012 11:53:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,576,1344236400"; d="scan'208";a="234134115" Message-ID: <50783D16.5020309@intel.com> Date: Fri, 12 Oct 2012 08:53:58 -0700 From: Alexander Duyck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Andi Kleen CC: Konrad Rzeszutek Wilk , tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 0/8] Improve performance of VM translation on x86_64 References: <20121011204324.12787.30514.stgit@gitlad.jf.intel.com> <20121012151517.GC16230@one.firstfloor.org> In-Reply-To: <20121012151517.GC16230@one.firstfloor.org> X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 972 Lines: 24 On 10/12/2012 08:15 AM, Andi Kleen wrote: >> Could you also add a blurb in the Documentation/< appropriate file >> for device driver writes> mentioning the usage of __pa_symbol is >> preferred? > Device driver writer's shouldn't use any of this anyways, they should always > use the PCI DMA APIs and never DMA to the stack or to static variables. > > -Andi __pa_symbol is very architecture specific. From what I can tell it only exists for the x86 and mips architectures. If a device driver is expected to function on things such as PowerPC you cannot use it. Everything I have read indicates that for virtual to physical translation in drivers it is preferred to use virt_to_phys, not __pa or __pa_symbol. Thanks, Alex -- 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/