login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
29
Re: [PATCH 26/34] AMD IOMMU: add mapping functions for scatter gather lists
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: FUJITA Tomonori
Subject:
Re: [PATCH 26/34] AMD IOMMU: add mapping functions for scatter gather lists
Date: Sunday, June 29, 2008 - 8:07 am
On Thu, 26 Jun 2008 21:28:02 +0200 Joerg Roedel <joerg.roedel@amd.com> wrote:
quoted text
> This patch adds the dma_ops functions for mapping and unmapping scatter gather > lists. > > Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> > --- > arch/x86/kernel/amd_iommu.c | 98 +++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 98 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c > index b4079f6..f4747fe 100644 > --- a/arch/x86/kernel/amd_iommu.c > +++ b/arch/x86/kernel/amd_iommu.c > @@ -700,3 +700,101 @@ static void unmap_single(struct device *dev, dma_addr_t dma_addr, > spin_unlock_irqrestore(&domain->lock, flags); > } > > +static int map_sg_no_iommu(struct device *dev, struct scatterlist *sglist, > + int nelems, int dir) > +{ > + struct scatterlist *s; > + int i; > + > + for_each_sg(sglist, s, nelems, i) { > + s->dma_address = (dma_addr_t)sg_phys(s); > + s->dma_length = s->length; > + } > + > + return nelems; > +} > + > +static int map_sg(struct device *dev, struct scatterlist *sglist, > + int nelems, int dir) > +{ > + unsigned long flags; > + struct amd_iommu *iommu; > + struct protection_domain *domain; > + u16 devid; > + int i; > + struct scatterlist *s; > + phys_addr_t paddr; > + int mapped_elems = 0; > + > + get_device_resources(dev, &iommu, &domain, &devid); > + > + if (!iommu || !domain) > + return map_sg_no_iommu(dev, sglist, nelems, dir);
VT-d put a pointer in struct dev_archdata to store IOMMU info per device. Is is useful for you too? --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 00/34] AMD IOMMU driver
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 02/34] AMD IOMMU: add header file for driver data s ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 03/34] AMD IOMMU: add defines and structures for AC ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 04/34] AMD IOMMU: add data structures to manage the ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 05/34] AMD IOMMU: add functions to find last possib ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 06/34] AMD IOMMU: add amd_iommu_init.c to Makefile
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 07/34] AMD IOMMU: add functions for mapping/unmappi ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 08/34] AMD IOMMU: add functions for programming IOM ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 09/34] AMD IOMMU: add command buffer (de-)allocation
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 10/34] AMD IOMMU: add device table initialization f ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 11/34] AMD IOMMU: add functions for IOMMU hardware ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 12/34] AMD IOMMU: add detect code for AMD IOMMU har ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 13/34] AMD IOMMU: add functions to parse IOMMU memo ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 14/34] AMD IOMMU: clue initialization code together
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 15/34] AMD IOMMU: add early detection code
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 16/34] AMD IOMMU: add kernel command line parameter ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 17/34] AMD IOMMU: add generic defines and structure ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 18/34] AMD IOMMU: add amd_iommu.c to Makefile
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 19/34] AMD IOMMU: add functions to send IOMMU commands
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 20/34] AMD IOMMU: add functions to initialize unity ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 21/34] AMD IOMMU: add address allocation and deallo ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 22/34] AMD IOMMU: add domain allocation and dealloc ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 23/34] AMD IOMMU: add functions to find IOMMU devic ...
, Joerg Roedel
, (Thu Jun 26, 12:27 pm)
[PATCH 24/34] AMD IOMMU: add generic dma_ops mapping functions
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 25/34] AMD IOMMU: add dma_ops mapping functions for ...
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 26/34] AMD IOMMU: add mapping functions for scatter ...
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 27/34] AMD IOMMU: add mapping functions for coheren ...
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 28/34] AMD IOMMU: add pre-allocation of protection ...
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 29/34] AMD IOMMU: add dma_ops initialization function
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 30/34] AMD IOMMU: add amd_iommu.h to export functio ...
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 31/34] AMD IOMMU: initialize dma_ops from IOMMU ini ...
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 32/34] AMD_IOMMU: call detect and initialization fu ...
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 33/34] AMD IOMMU: add MAINTAINERS entry
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
[PATCH 34/34] AMD IOMMU: add documentation for kernel para ...
, Joerg Roedel
, (Thu Jun 26, 12:28 pm)
Re: [PATCH 00/34] AMD IOMMU driver
, Rafael J. Wysocki
, (Thu Jun 26, 1:37 pm)
Re: [PATCH 00/34] AMD IOMMU driver
, Joerg Roedel
, (Thu Jun 26, 1:37 pm)
Re: [PATCH 00/34] AMD IOMMU driver
, Rafael J. Wysocki
, (Thu Jun 26, 2:02 pm)
Re: [PATCH 00/34] AMD IOMMU driver
, Ingo Molnar
, (Fri Jun 27, 1:18 am)
Re: [PATCH 00/34] AMD IOMMU driver
, Ingo Molnar
, (Fri Jun 27, 3:07 am)
Re: [PATCH 00/34] AMD IOMMU driver
, Joerg Roedel
, (Fri Jun 27, 3:15 am)
Re: [PATCH 00/34] AMD IOMMU driver
, Joerg Roedel
, (Fri Jun 27, 3:59 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Adrian Bunk
, (Fri Jun 27, 7:25 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Andi Kleen
, (Fri Jun 27, 7:47 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Muli Ben-Yehuda
, (Fri Jun 27, 9:39 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Fri Jun 27, 9:40 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Fri Jun 27, 9:54 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Muli Ben-Yehuda
, (Fri Jun 27, 9:59 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Fri Jun 27, 10:05 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Muli Ben-Yehuda
, (Fri Jun 27, 10:12 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Fri Jun 27, 10:20 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Muli Ben-Yehuda
, (Fri Jun 27, 10:31 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Fri Jun 27, 10:40 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Muli Ben-Yehuda
, (Fri Jun 27, 10:44 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Fri Jun 27, 10:52 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Andi Kleen
, (Fri Jun 27, 11:54 am)
RE: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Duran, Leo
, (Fri Jun 27, 1:39 pm)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Muli Ben-Yehuda
, (Fri Jun 27, 3:29 pm)
RE: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Duran, Leo
, (Fri Jun 27, 3:47 pm)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Sat Jun 28, 3:52 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Sat Jun 28, 4:04 am)
RE: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Duran, Leo
, (Sat Jun 28, 7:40 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Joerg Roedel
, (Sat Jun 28, 9:27 am)
Re: [PATCH 21/34] AMD IOMMU: add address allocation and de ...
, FUJITA Tomonori
, (Sun Jun 29, 8:07 am)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, FUJITA Tomonori
, (Sun Jun 29, 8:07 am)
Re: [PATCH 26/34] AMD IOMMU: add mapping functions for sca ...
, FUJITA Tomonori
, (Sun Jun 29, 8:07 am)
Re: [PATCH 34/34] AMD IOMMU: add documentation for kernel ...
, FUJITA Tomonori
, (Sun Jun 29, 8:07 am)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, Joerg Roedel
, (Sun Jun 29, 8:14 am)
Re: [PATCH 21/34] AMD IOMMU: add address allocation and de ...
, Joerg Roedel
, (Sun Jun 29, 8:17 am)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, FUJITA Tomonori
, (Sun Jun 29, 4:11 pm)
Re: [PATCH 21/34] AMD IOMMU: add address allocation and de ...
, FUJITA Tomonori
, (Sun Jun 29, 4:11 pm)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, Ingo Molnar
, (Mon Jun 30, 5:22 am)
Re: [PATCH 34/34] AMD IOMMU: add documentation for kernel ...
, Ingo Molnar
, (Mon Jun 30, 5:25 am)
Re: [PATCH 26/34] AMD IOMMU: add mapping functions for sca ...
, Joerg Roedel
, (Mon Jun 30, 6:25 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Amit Shah
, (Tue Jul 1, 10:45 pm)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Alan Cox
, (Wed Jul 2, 1:12 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Pavel Machek
, (Tue Jul 8, 5:45 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Ingo Molnar
, (Wed Jul 9, 1:48 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, FUJITA Tomonori
, (Wed Jul 9, 5:50 pm)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, Andrew Morton
, (Wed Jul 9, 6:38 pm)
Re: [PATCH 03/34] AMD IOMMU: add defines and structures fo ...
, Andrew Morton
, (Wed Jul 9, 6:41 pm)
Re: [PATCH 04/34] AMD IOMMU: add data structures to manage ...
, Andrew Morton
, (Wed Jul 9, 6:43 pm)
Re: [PATCH 09/34] AMD IOMMU: add command buffer (de-)alloc ...
, Andrew Morton
, (Wed Jul 9, 6:47 pm)
Re: [PATCH 11/34] AMD IOMMU: add functions for IOMMU hardw ...
, Andrew Morton
, (Wed Jul 9, 6:49 pm)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, Arjan van de Ven
, (Wed Jul 9, 6:50 pm)
Re: [PATCH 12/34] AMD IOMMU: add detect code for AMD IOMMU ...
, Andrew Morton
, (Wed Jul 9, 6:51 pm)
Re: [PATCH 13/34] AMD IOMMU: add functions to parse IOMMU ...
, Andrew Morton
, (Wed Jul 9, 6:51 pm)
Re: [PATCH 14/34] AMD IOMMU: clue initialization code together
, Andrew Morton
, (Wed Jul 9, 6:55 pm)
Re: [PATCH 16/34] AMD IOMMU: add kernel command line param ...
, Andrew Morton
, (Wed Jul 9, 6:56 pm)
Re: [PATCH 17/34] AMD IOMMU: add generic defines and struc ...
, Andrew Morton
, (Wed Jul 9, 7:01 pm)
Re: [PATCH 19/34] AMD IOMMU: add functions to send IOMMU c ...
, Andrew Morton
, (Wed Jul 9, 7:04 pm)
Re: [PATCH 22/34] AMD IOMMU: add domain allocation and dea ...
, Andrew Morton
, (Wed Jul 9, 7:14 pm)
Re: [PATCH 23/34] AMD IOMMU: add functions to find IOMMU d ...
, Andrew Morton
, (Wed Jul 9, 7:18 pm)
Re: [PATCH 25/34] AMD IOMMU: add dma_ops mapping functions ...
, Andrew Morton
, (Wed Jul 9, 7:26 pm)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, Andrew Morton
, (Wed Jul 9, 7:36 pm)
Re: [PATCH 17/34] AMD IOMMU: add generic defines and struc ...
, Andrew Morton
, (Wed Jul 9, 7:38 pm)
Re: [PATCH 16/34] AMD IOMMU: add kernel command line param ...
, FUJITA Tomonori
, (Wed Jul 9, 9:25 pm)
Re: [PATCH 17/34] AMD IOMMU: add generic defines and struc ...
, FUJITA Tomonori
, (Wed Jul 9, 9:25 pm)
Re: [PATCH 16/34] AMD IOMMU: add kernel command line param ...
, Andrew Morton
, (Wed Jul 9, 9:39 pm)
Re: [PATCH 16/34] AMD IOMMU: add kernel command line param ...
, Ingo Molnar
, (Wed Jul 9, 11:26 pm)
Re: [PATCH 16/34] AMD IOMMU: add kernel command line param ...
, Yinghai Lu
, (Thu Jul 10, 12:04 am)
Re: [PATCH 01/34] AMD IOMMU: add Kconfig entry
, Ingo Molnar
, (Thu Jul 10, 1:44 am)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, Joerg Roedel
, (Thu Jul 10, 5:12 am)
Re: [PATCH 03/34] AMD IOMMU: add defines and structures fo ...
, Joerg Roedel
, (Thu Jul 10, 5:17 am)
Re: [PATCH 04/34] AMD IOMMU: add data structures to manage ...
, Joerg Roedel
, (Thu Jul 10, 5:25 am)
Re: [PATCH 14/34] AMD IOMMU: clue initialization code together
, Joerg Roedel
, (Thu Jul 10, 5:37 am)
Re: [PATCH 16/34] AMD IOMMU: add kernel command line param ...
, Joerg Roedel
, (Thu Jul 10, 5:41 am)
Re: [PATCH 17/34] AMD IOMMU: add generic defines and struc ...
, Joerg Roedel
, (Thu Jul 10, 5:44 am)
Re: [PATCH 19/34] AMD IOMMU: add functions to send IOMMU c ...
, Joerg Roedel
, (Thu Jul 10, 5:53 am)
Re: [PATCH 22/34] AMD IOMMU: add domain allocation and dea ...
, Joerg Roedel
, (Thu Jul 10, 5:54 am)
Re: [PATCH 02/34] AMD IOMMU: add header file for driver da ...
, Andrew Morton
, (Thu Jul 10, 5:59 am)
Re: [PATCH 14/34] AMD IOMMU: clue initialization code together
, Andrew Morton
, (Thu Jul 10, 6:03 am)
Re: [PATCH 25/34] AMD IOMMU: add dma_ops mapping functions ...
, Joerg Roedel
, (Thu Jul 10, 6:20 am)
Re: [PATCH 14/34] AMD IOMMU: clue initialization code together
, Joerg Roedel
, (Thu Jul 10, 6:31 am)
Re: [PATCH 23/34] AMD IOMMU: add functions to find IOMMU d ...
, Joerg Roedel
, (Thu Jul 10, 9:46 am)
Re: [PATCH 14/34] AMD IOMMU: clue initialization code together
, Joerg Roedel
, (Thu Jul 10, 11:37 am)
Re: [PATCH 16/34] AMD IOMMU: add kernel command line param ...
, Randy Dunlap
, (Thu Jul 10, 1:42 pm)
Re: [PATCH 23/34] AMD IOMMU: add functions to find IOMMU d ...
, Andrew Morton
, (Thu Jul 10, 4:59 pm)
Re: [PATCH 00/34] AMD IOMMU driver
, Eric W. Biederman
, (Fri Jul 11, 3:22 am)
Re: [PATCH 00/34] AMD IOMMU driver
, Joerg Roedel
, (Fri Jul 11, 7:11 am)
RE: [PATCH 00/34] AMD IOMMU driver
, Duran, Leo
, (Fri Jul 11, 9:23 am)
Re: [PATCH 00/34] AMD IOMMU driver
, Eric W. Biederman
, (Fri Jul 11, 10:20 am)
Re: [PATCH 16/34] AMD IOMMU: add kernel command line param ...
, FUJITA Tomonori
, (Mon Jul 14, 4:56 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate