aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_iommu.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:22:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:22:48 -0400
commitef93127e4c7b4b8d46421045641048397eaac43d (patch)
treefbddc8f52e10d8d6eb45e08e02fecbc2ba023eea /arch/sparc64/kernel/pci_iommu.c
parent972d45fb43f0f0793fa275c4a22998106760cd61 (diff)
parent90a660a4546d6ba5ca5f3a23d5cc599db2b41e08 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SERIAL] sunsu: Fix section mismatch warnings. [SPARC64]: pgtable_cache_init() should be __init. [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/prom.c [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/pci.c [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/console.c [MM]: sparse_init() should be __init. [SPARC64]: Update defconfig. [VIDEO]: Add Sun XVR-2500 framebuffer driver. [VIDEO]: Add Sun XVR-500 framebuffer driver. [SPARC64]: SUN4U PCI-E controller support. [SPARC]: Fix comment typo in smp4m_blackbox_current(). [SCSI] SUNESP: sun_esp.c needs linux/delay.h Fix up conflict in arch/sparc64/mm/init.c manually due to removal of pgtable_cache_init() through the -mm patches (even though that patch was also by David ;) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc64/kernel/pci_iommu.c')
-rw-r--r--arch/sparc64/kernel/pci_iommu.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c
index 66712772f494..9e405cbbcb0d 100644
--- a/arch/sparc64/kernel/pci_iommu.c
+++ b/arch/sparc64/kernel/pci_iommu.c
@@ -37,17 +37,21 @@
37/* Must be invoked under the IOMMU lock. */ 37/* Must be invoked under the IOMMU lock. */
38static void __iommu_flushall(struct iommu *iommu) 38static void __iommu_flushall(struct iommu *iommu)
39{ 39{
40 unsigned long tag; 40 if (iommu->iommu_flushinv) {
41 int entry; 41 pci_iommu_write(iommu->iommu_flushinv, ~(u64)0);
42 } else {
43 unsigned long tag;
44 int entry;
42 45
43 tag = iommu->iommu_flush + (0xa580UL - 0x0210UL); 46 tag = iommu->iommu_flush + (0xa580UL - 0x0210UL);
44 for (entry = 0; entry < 16; entry++) { 47 for (entry = 0; entry < 16; entry++) {
45 pci_iommu_write(tag, 0); 48 pci_iommu_write(tag, 0);
46 tag += 8; 49 tag += 8;
47 } 50 }
48 51
49 /* Ensure completion of previous PIO writes. */ 52 /* Ensure completion of previous PIO writes. */
50 (void) pci_iommu_read(iommu->write_complete_reg); 53 (void) pci_iommu_read(iommu->write_complete_reg);
54 }
51} 55}
52 56
53#define IOPTE_CONSISTENT(CTX) \ 57#define IOPTE_CONSISTENT(CTX) \