X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fia64%2Fhp%2Fcommon%2Fsba_iommu.c;h=272291d6073c018248c833f4328f2f669cfb1da7;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=e50c446e0f4f7766fcc0c5a3a43a99df7c329958;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index e50c446e0..272291d60 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -33,13 +33,14 @@ #include #include #include +#include +#include /* hweight64() */ #include /* ia64_get_itc() */ #include #include /* PAGE_OFFSET */ #include #include /* wmb() */ -#include /* hweight64() */ #include @@ -478,7 +479,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted) * purges IOTLB entries in power-of-two sizes, so we also * allocate IOVA space in power-of-two sizes. */ - bits_wanted = 1UL << get_iovp_order(bits_wanted << PAGE_SHIFT); + bits_wanted = 1UL << get_iovp_order(bits_wanted << iovp_shift); if (likely(bits_wanted == 1)) { unsigned int bitshiftcnt; @@ -687,7 +688,7 @@ sba_free_range(struct ioc *ioc, dma_addr_t iova, size_t size) unsigned long m; /* Round up to power-of-two size: see AR2305 note above */ - bits_not_wanted = 1UL << get_iovp_order(bits_not_wanted << PAGE_SHIFT); + bits_not_wanted = 1UL << get_iovp_order(bits_not_wanted << iovp_shift); for (; bits_not_wanted > 0 ; res_ptr++) { if (unlikely(bits_not_wanted > BITS_PER_LONG)) { @@ -1556,7 +1557,7 @@ ioc_iova_init(struct ioc *ioc) ** We program the next pdir index after we stop w/ a key for ** the GART code to handshake on. */ - while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) + for_each_pci_dev(device) agp_found |= pci_find_capability(device, PCI_CAP_ID_AGP); if (agp_found && reserve_sba_gart) {