patch-2.3.46 linux/arch/sparc64/kernel/pci_iommu.c
Next file: linux/arch/sparc64/kernel/pci_sabre.c
Previous file: linux/arch/sparc/mm/sun4c.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Mon Feb 14 15:34:21 2000
- Orig file:
v2.3.45/linux/arch/sparc64/kernel/pci_iommu.c
- Orig date:
Tue Feb 1 01:35:43 2000
diff -u --recursive --new-file v2.3.45/linux/arch/sparc64/kernel/pci_iommu.c linux/arch/sparc64/kernel/pci_iommu.c
@@ -123,11 +123,8 @@
int npages;
size = PAGE_ALIGN(size);
- for (order = 0; order < 10; order++) {
- if ((PAGE_SIZE << order) >= size)
- break;
- }
- if (order == 10)
+ order = get_order(size);
+ if (order >= 10)
return NULL;
/* We still don't support devices which don't recognize at least 30 bits
@@ -210,10 +207,7 @@
spin_unlock_irqrestore(&iommu->lock, flags);
- for (order = 0; order < 10; order++) {
- if ((PAGE_SIZE << order) >= size)
- break;
- }
+ order = get_order(size);
if (order < 10)
free_pages((unsigned long)cpu, order);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)