[Top] [All Lists]

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

To: Alessandro Rubini <>
Subject: Re: [PATCH] swiotlb: add "dma_attrs" argument to alloc and free, to match dma_map_ops
From: David Daney <>
Date: Thu, 24 May 2012 08:15:17 -0700
Cc:,,,, Giancarlo Asnaghi <>, Tony Luck <>, Fenghua Yu <>, Ralf Baechle <>, Guan Xuetao <>, Thomas Gleixner <>, Kyungmin Park <>, FUJITA Tomonori <>, Konrad Rzeszutek Wilk <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
References: <>
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: 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<>
Acked-by: Giancarlo Asnaghi<>
Cc: Tony Luck<>
Cc: Fenghua Yu<>
Cc: Ralf Baechle<>
Cc: Guan Xuetao<>
Cc: Thomas Gleixner<>
Cc: Kyungmin Park<>
Cc: FUJITA Tomonori<>
Cc: Konrad Rzeszutek Wilk<>
  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 <>

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