[RFC 0/2] dma-mapping: Introduce new IOVA API with address specified

2012-05-18 Thread Hiroshi DOYU
Hello, The following patchset is our enhancement for the upstream DMA mapping API(v9), where new IOVA API is introduced with the version of IOVA address specified. The current upstream DMA mapping API cannot specify any specific IOVA address at allocation. We need to specify IOVA address. This is

[RFC 1/2] dma-mapping: Export arm_iommu_{alloc, free}_iova() functions

2012-05-18 Thread Hiroshi DOYU
Export __{alloc,free}_iova() as arm_iommu_{alloc,free}_iova(). There are some cases that IOVA allocation and mapping have to be done seperately, especially for perf optimization reasons. This patch allows client modules to {alloc,free} IOVA space by themselves without backing up actual pages for

[RFC 2/2] dma-mapping: Enable IOVA mapping with specific address

2012-05-18 Thread Hiroshi DOYU
Enable IOVA (un)mapping at a specific IOVA address, independent of allocating/freeing IOVA area, introducing the following dma_(un)map_page_*at*() functions: dma_map_page_at() dma_unmap_page_at() The above create a mapping between pre-allocated iova and a page, and remov just a

[PATCH 1/1] iommu/tegra: smmu: Fix uninitialized var warning

2012-05-18 Thread Hiroshi DOYU
For the compiler warning, uninitialized var when getting value by a pointer. Signed-off-by: Hiroshi DOYU hd...@nvidia.com --- Depends: [v2 1/2] iommu/tegra: smmu: Simplify allocation at once http://marc.info/?l=linux-tegram=133706973614667w=2 --- drivers/iommu/tegra-smmu.c |4

Re: [PATCH 1/1] iommu/tegra: smmu: Add DMA window parser

2012-05-18 Thread Stephen Warren
On 05/18/2012 12:43 AM, Hiroshi DOYU wrote: This code was based on: arch/microblaze/kernel/prom_parse.c arch/powerpc/kernel/prom_parse.c Can be promoted as a global function for general use. Signed-off-by: Hiroshi DOYU hd...@nvidia.com Hiroshi, Once this is accepted, it might be

Re: [PATCH 1/1] iommu/tegra: smmu: Add DMA window parser

2012-05-18 Thread Hiroshi Doyu
Hi Stephen, Joerg, Stephen Warren swar...@wwwdotorg.org wrote @ Fri, 18 May 2012 17:15:34 +0200: On 05/18/2012 12:43 AM, Hiroshi DOYU wrote: This code was based on: arch/microblaze/kernel/prom_parse.c arch/powerpc/kernel/prom_parse.c Can be promoted as a global function for

Re: RESEND3: Re: [PATCH 05/13] pci: New pci_acs_enabled()

2012-05-18 Thread Don Dutile
On 05/18/2012 06:02 PM, Alex Williamson wrote: On Wed, 2012-05-16 at 09:29 -0400, Don Dutile wrote: On 05/15/2012 05:09 PM, Alex Williamson wrote: On Tue, 2012-05-15 at 13:56 -0600, Bjorn Helgaas wrote: On Mon, May 14, 2012 at 4:49 PM, Alex Williamson alex.william...@redhat.com wrote: On

[PATCH 0/2] iommu: request CSR space

2012-05-18 Thread Bjorn Helgaas
This adds a request_mem_region() for the DRHD registers. The AMD code has similar code in iommu_map_mmio_space(). This helps avoid address conflicts when assigning PCI BARs. --- Bjorn Helgaas (2): resources: set type of new resource returned by __request_region() iommu: Request

[PATCH 2/2] iommu: Request IOMMU CSR space

2012-05-18 Thread Bjorn Helgaas
Request the IOMMU CSR MMIO region to keep anybody else from claiming it while we're using it. The bug referenced below is a crash that happened when we assigned an address in the IOMMU CSR area to a PCI BAR. This patch just changes the IOMMU driver, which only helps when the driver is present,

Re: [PATCH 05/13] pci: New pci_acs_enabled()

2012-05-18 Thread Alex Williamson
On Fri, 2012-05-18 at 19:00 -0400, Don Dutile wrote: On 05/18/2012 06:02 PM, Alex Williamson wrote: On Wed, 2012-05-16 at 09:29 -0400, Don Dutile wrote: On 05/15/2012 05:09 PM, Alex Williamson wrote: On Tue, 2012-05-15 at 13:56 -0600, Bjorn Helgaas wrote: On Mon, May 14, 2012 at 4:49 PM,