From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752752AbbC2SYL (ORCPT ); Sun, 29 Mar 2015 14:24:11 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:58810 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752600AbbC2SYH (ORCPT ); Sun, 29 Mar 2015 14:24:07 -0400 Date: Sun, 29 Mar 2015 11:32:50 -0700 (PDT) Message-Id: <20150329.113250.2136683943336875789.davem@davemloft.net> To: bjorn@helgaas.com, bjorn.helgaas@gmail.com Cc: sparclinux@vger.kernel.org, linux-pci@vger.kernel.org, yinghai@kernel.org, david.ahern@oracle.com, bhelgaas@google.com, linux-kernel@vger.kernel.org Subject: Re: d63e2e1f3df breaks sparc/T5-8 From: David Miller In-Reply-To: References: <20150327.145016.86183910134380870.davem@davemloft.net> X-Mailer: Mew version 6.4 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 29 Mar 2015 11:24:07 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas Date: Sun, 29 Mar 2015 08:30:40 -0500 > Help me understand the sparc64 situation: are you saying that BAR > addresses, i.e., MMIO transactions from a CPU or a peer-to-peer DMA can be > 64 bits, but a DMA to main memory can only be 32 bits? > > I assume this would work if we made dma_addr_t 64 bits on sparc64. What > would be the cost of doing that? The cost is 4 extra bytes in every datastructure, kernel wide, that stores DMA addresses. This choice was very intentional, and well thought out. Don't use DMA addresses for PCI addresses. They are absolutely not the same, especially when an IOMMU is always present because in that case all DMA addresses are virtual and exist in a different realm and set of constraints/restrictions.