diff options
Diffstat (limited to 'arch/sparc64/kernel/pci_iommu.c')
-rw-r--r-- | arch/sparc64/kernel/pci_iommu.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c index 1807876f8c36..2803bc7c2c79 100644 --- a/arch/sparc64/kernel/pci_iommu.c +++ b/arch/sparc64/kernel/pci_iommu.c | |||
@@ -422,14 +422,12 @@ static void pci_strbuf_flush(struct pci_strbuf *strbuf, struct pci_iommu *iommu, | |||
422 | flushreg = strbuf->strbuf_ctxflush; | 422 | flushreg = strbuf->strbuf_ctxflush; |
423 | matchreg = PCI_STC_CTXMATCH_ADDR(strbuf, ctx); | 423 | matchreg = PCI_STC_CTXMATCH_ADDR(strbuf, ctx); |
424 | 424 | ||
425 | if (pci_iommu_read(matchreg) == 0) | ||
426 | goto do_flush_sync; | ||
427 | |||
428 | pci_iommu_write(flushreg, ctx); | 425 | pci_iommu_write(flushreg, ctx); |
429 | if ((val = pci_iommu_read(matchreg)) == 0) | 426 | val = pci_iommu_read(matchreg); |
427 | val &= 0xffff; | ||
428 | if (!val) | ||
430 | goto do_flush_sync; | 429 | goto do_flush_sync; |
431 | 430 | ||
432 | val &= 0xffff; | ||
433 | while (val) { | 431 | while (val) { |
434 | if (val & 0x1) | 432 | if (val & 0x1) |
435 | pci_iommu_write(flushreg, ctx); | 433 | pci_iommu_write(flushreg, ctx); |