aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/iommu.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-12-04sparc,sparc64: unify kernel/Sam Ravnborg1-866/+0
o Move all files from sparc64/kernel/ to sparc/kernel - rename as appropriate o Update sparc/Makefile to the changes o Update sparc/kernel/Makefile to include the sparc64 files NOTE: This commit changes link order on sparc64! Link order had to change for either of sparc32 and sparc64. And assuming sparc64 see more testing than sparc32 change link order on sparc64 where issues will be caught faster. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-16sparc64: use iommu_num_pages function in IOMMU codeJoerg Roedel1-3/+4
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16sparc64: rename iommu_num_pages function to iommu_nr_pagesJoerg Roedel1-3/+3
This is a preparation patch for introducing a generic iommu_num_pages function. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-23[SPARC64]: NUMA device infrastructure.David S. Miller1-12/+21
Record and propagate NUMA information for devices. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-28sparc64: add the segment boundary checking to IOMMUs while merging SG entriesFUJITA Tomonori1-2/+10
Some IOMMUs allocate memory areas spanning LLD's segment boundary limit. It forces low level drivers to have a workaround to adjust scatter lists that the IOMMU builds. We are in the process of making all the IOMMUs respect the segment boundary limits to remove such work around in LLDs. SPARC64 IOMMUs were rewritten to use the IOMMU helper functions and the commit 89c94f2f70d093f59b55d3ea8042d13889169346 made the IOMMUs not allocate memory areas spanning the segment boundary limit. However, SPARC64 IOMMUs allocate memory areas first then try to merge them (while some IOMMUs walk through all the sg entries to see how they can be merged first and allocate memory areas). So SPARC64 IOMMUs also need the boundary limit checking when they try to merge sg entries. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/iommu.cDavid S. Miller1-4/+4
Fix local variable shadowing in dma_4u_map_sg(). Mark sun4u_dma_ops static. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20[SPARC64]: make IOMMU code respect the segment boundary limitsFUJITA Tomonori1-1/+2
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-12[SPARC64]: Use shorter "get_zeroed_page" call.Robert P. J. Day1-2/+1
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09[SPARC64]: Add SG merging support back into IOMMU code.David S. Miller1-73/+158
Mimicks almost perfectly the powerpc IOMMU code, except that it doesn't have the IOMMU_PAGE_SIZE != PAGE_SIZE handling, and it also lacks the device dma mask support bits. I'll add that later as time permits, but this gets us at least back to where we were beforehand. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09[SPARC64]: IOMMU allocations using iommu-helper layer.David S. Miller1-44/+81
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-06[SPARC64]: Temporarily remove IOMMU merging code.David S. Miller1-116/+26
Changeset fde6a3c82d67f592eb587be4d12222b0ae6d4321 ("iommu sg merging: sparc64: make iommu respect the segment size limits") broke sparc64 because whilst it added the segment limiting code to the first pass of SG mapping (in prepare_sg()) it did not add matching code to the second pass handling (in fill_sg()) As a result the two passes disagree where the segment boundaries should be, resulting in OOPSes, DMA corruption, and corrupted superblocks. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-05iommu sg merging: sparc64: make iommu respect the segment size limitsFUJITA Tomonori1-1/+1
This patch makes iommu respect segment size limits when merging sg lists. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Jeff Garzik <jeff@garzik.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-22Update arch/ to use sg helpersJens Axboe1-5/+2
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-17Fix loop terminating conditions in fill_sg().David S. Miller1-5/+7
Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-17SPARC64: fix iommu sg chainingFUJITA Tomonori1-1/+0
Commit 2c941a204070ab32d92d40318a3196a7fb994c00 looks incomplete. The helper functions like prepare_sg() need to support sg chaining too. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-16SPARC64: sg chaining supportJens Axboe1-15/+24
This updates the sparc64 iommu/pci dma mappers to sg chaining. Acked-by: David S. Miller <davem@davemloft.net> Later updated to newer kernel with unified sparc64 iommu sg handling. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-07-30[SPARC64]: Fix conflicts in SBUS/PCI/EBUS/ISA DMA handling.David S. Miller1-0/+809
Fully unify all of the DMA ops so that subordinate bus types to the DMA operation providers (such as ebus, isa, of_device) can work transparently. Basically, we just make sure that for every system device we create, the dev->archdata 'iommu' and 'stc' fields are filled in. Then we have two platform variants of the DMA ops, one for SUN4U which actually programs the real hardware, and one for SUN4V which makes hypervisor calls. This also fixes the crashes in parport_pc on sparc64, reported by Meelis Roos. Signed-off-by: David S. Miller <davem@davemloft.net>