linux-mips
[Top] [All Lists]

Re: [PATCH] swiotlb: add "dma_attrs" argument to alloc and free, to matc

To: Alessandro Rubini <rubini@gnudd.com>
Subject: Re: [PATCH] swiotlb: add "dma_attrs" argument to alloc and free, to match dma_map_ops
From: David Daney <ddaney.cavm@gmail.com>
Date: Thu, 24 May 2012 08:15:17 -0700
Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-ia64@vger.kernel.org, linux-mips@linux-mips.org, Giancarlo Asnaghi <giancarlo.asnaghi@st.com>, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, Ralf Baechle <ralf@linux-mips.org>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Thomas Gleixner <tglx@linutronix.de>, Kyungmin Park <kyungmin.park@samsung.com>, FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=r19tiiCVT9ZOr090sa54p1G313HDJ2LiTJvs//sZ8YM=; b=M1bapl4z/heQhFRICl3Qoi4pHnrF8q3z24rHEWI6sOVnnrK4JhzLOvX80gDUem/5HX bcmrOA9TMyh95eXgRbi9plqnmpnxXKuzWH7r2otw2D4lAORMEwjFNuZDK8m6EkOQm7AE vUOsVfN/BAb9If/sJsb/xW8pPXMN01CDmKniZPfi9AQ1QORlrCJMl4riK1RNlKCocYM8 jUuPxc/55k5xfUht0o5LNPL+0/p9RwjauSNhYHjqcunnhx4GeTUNEFXQ+G5afHJ1CQ8V IcRkcSkereycXLjJ4ZOQNuKLprqv++QuK167Z7ZdAhHlfZjqtW2OJP75HKJRutkLPAm/ YIOw==
In-reply-to: <20120524114422.GA25950@mail.gnudd.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <20120524114422.GA25950@mail.gnudd.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 05/24/2012 04:44 AM, Alessandro Rubini wrote:
The alloc and free pointers within "struct dma_map_ops" receive a
pointer to dma_attrs that was not present in the generic swiotlb
functions.  For this reason, a few files had a local wrapper for the
free function that just removes the attrs argument before calling the
generic function.

This patch adds the extra argument to generic functions and removes
such wrappers when they are no more needed.  This also fixes a
compiler warning for sta2x11-fixup.c, that would have required yet
another wrapper.

Signed-off-by: Alessandro Rubini<rubini@gnudd.com>
Acked-by: Giancarlo Asnaghi<giancarlo.asnaghi@st.com>
Cc: Tony Luck<tony.luck@intel.com>
Cc: Fenghua Yu<fenghua.yu@intel.com>
Cc: Ralf Baechle<ralf@linux-mips.org>
Cc: Guan Xuetao<gxt@mprc.pku.edu.cn>
Cc: Thomas Gleixner<tglx@linutronix.de>
Cc: Kyungmin Park<kyungmin.park@samsung.com>
Cc: FUJITA Tomonori<fujita.tomonori@lab.ntt.co.jp>
Cc: Konrad Rzeszutek Wilk<konrad.wilk@oracle.com>
---
  arch/ia64/kernel/pci-swiotlb.c       |   11 ++---------
  arch/mips/cavium-octeon/dma-octeon.c |    4 ++--
  arch/unicore32/mm/dma-swiotlb.c      |   22 ++--------------------
  arch/x86/kernel/pci-swiotlb.c        |   11 ++---------
  arch/x86/pci/sta2x11-fixup.c         |    3 ++-
  include/linux/swiotlb.h              |    7 ++++---
  lib/swiotlb.c                        |    5 +++--
  7 files changed, 17 insertions(+), 46 deletions(-)


This looks sane (although I haven't tested it).  For the OCTEON bits:

Acked-by: David Daney <david.daney@cavium.com>



<Prev in Thread] Current Thread [Next in Thread>