[SPARC64]: Handle zero-length map requests in pci_sun4v.c
By simply changing the do-while loop into a plain while loop. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
abf3b7bd89
commit
d82965c167
|
@ -57,7 +57,7 @@ static long pci_iommu_batch_flush(struct pci_iommu_batch *p)
|
||||||
u64 *pglist = p->pglist;
|
u64 *pglist = p->pglist;
|
||||||
unsigned long npages = p->npages;
|
unsigned long npages = p->npages;
|
||||||
|
|
||||||
do {
|
while (npages != 0) {
|
||||||
long num;
|
long num;
|
||||||
|
|
||||||
num = pci_sun4v_iommu_map(devhandle, HV_PCI_TSBID(0, entry),
|
num = pci_sun4v_iommu_map(devhandle, HV_PCI_TSBID(0, entry),
|
||||||
|
@ -75,7 +75,7 @@ static long pci_iommu_batch_flush(struct pci_iommu_batch *p)
|
||||||
entry += num;
|
entry += num;
|
||||||
npages -= num;
|
npages -= num;
|
||||||
pglist += num;
|
pglist += num;
|
||||||
} while (npages != 0);
|
}
|
||||||
|
|
||||||
p->entry = entry;
|
p->entry = entry;
|
||||||
p->npages = 0;
|
p->npages = 0;
|
||||||
|
|
Loading…
Reference in New Issue