Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'akpm' (patches from Andrew)

Merge final patch-bomb from Andrew Morton:
"Various leftovers, mainly Christoph's pci_dma_supported() removals"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
pci: remove pci_dma_supported
usbnet: remove ifdefed out call to dma_supported
kaweth: remove ifdefed out call to dma_supported
sfc: don't call dma_supported
nouveau: don't call pci_dma_supported
netup_unidvb: use pci_set_dma_mask insted of pci_dma_supported
cx23885: use pci_set_dma_mask insted of pci_dma_supported
cx25821: use pci_set_dma_mask insted of pci_dma_supported
cx88: use pci_set_dma_mask insted of pci_dma_supported
saa7134: use pci_set_dma_mask insted of pci_dma_supported
saa7164: use pci_set_dma_mask insted of pci_dma_supported
tw68-core: use pci_set_dma_mask insted of pci_dma_supported
pcnet32: use pci_set_dma_mask insted of pci_dma_supported
lib/string.c: add ULL suffix to the constant definition
hugetlb: trivial comment fix
selftests/mlock2: add ULL suffix to 64-bit constants
selftests/mlock2: add missing #define _GNU_SOURCE

+24 -42
+5 -2
drivers/gpu/drm/nouveau/nouveau_ttm.c
··· 353 353 354 354 bits = nvxx_mmu(&drm->device)->dma_bits; 355 355 if (nvxx_device(&drm->device)->func->pci) { 356 - if (drm->agp.bridge || 357 - !dma_supported(dev->dev, DMA_BIT_MASK(bits))) 356 + if (drm->agp.bridge) 358 357 bits = 32; 359 358 } else if (device->func->tegra) { 360 359 struct nvkm_device_tegra *tegra = device->func->tegra(device); ··· 368 369 } 369 370 370 371 ret = dma_set_mask(dev->dev, DMA_BIT_MASK(bits)); 372 + if (ret && bits != 32) { 373 + bits = 32; 374 + ret = dma_set_mask(dev->dev, DMA_BIT_MASK(bits)); 375 + } 371 376 if (ret) 372 377 return ret; 373 378
+1 -1
drivers/media/pci/cx23885/cx23885-core.c
··· 1992 1992 (unsigned long long)pci_resource_start(pci_dev, 0)); 1993 1993 1994 1994 pci_set_master(pci_dev); 1995 - if (!pci_dma_supported(pci_dev, 0xffffffff)) { 1995 + if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { 1996 1996 printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); 1997 1997 err = -EIO; 1998 1998 goto fail_context;
+1 -1
drivers/media/pci/cx25821/cx25821-core.c
··· 1319 1319 dev->pci_lat, (unsigned long long)dev->base_io_addr); 1320 1320 1321 1321 pci_set_master(pci_dev); 1322 - if (!pci_dma_supported(pci_dev, 0xffffffff)) { 1322 + if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { 1323 1323 pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); 1324 1324 err = -EIO; 1325 1325 goto fail_irq;
+1 -1
drivers/media/pci/cx88/cx88-alsa.c
··· 890 890 return err; 891 891 } 892 892 893 - if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) { 893 + if (!pci_set_dma_mask(pci,DMA_BIT_MASK(32))) { 894 894 dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name); 895 895 err = -EIO; 896 896 cx88_core_put(core, pci);
+1 -1
drivers/media/pci/cx88/cx88-mpeg.c
··· 393 393 if (pci_enable_device(dev->pci)) 394 394 return -EIO; 395 395 pci_set_master(dev->pci); 396 - if (!pci_dma_supported(dev->pci,DMA_BIT_MASK(32))) { 396 + if (!pci_set_dma_mask(dev->pci,DMA_BIT_MASK(32))) { 397 397 printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name); 398 398 return -EIO; 399 399 }
+1 -1
drivers/media/pci/cx88/cx88-video.c
··· 1314 1314 dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); 1315 1315 1316 1316 pci_set_master(pci_dev); 1317 - if (!pci_dma_supported(pci_dev,DMA_BIT_MASK(32))) { 1317 + if (!pci_set_dma_mask(pci_dev,DMA_BIT_MASK(32))) { 1318 1318 printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name); 1319 1319 err = -EIO; 1320 1320 goto fail_core;
+1 -1
drivers/media/pci/netup_unidvb/netup_unidvb_core.c
··· 810 810 "%s(): board vendor 0x%x, revision 0x%x\n", 811 811 __func__, board_vendor, board_revision); 812 812 pci_set_master(pci_dev); 813 - if (!pci_dma_supported(pci_dev, 0xffffffff)) { 813 + if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { 814 814 dev_err(&pci_dev->dev, 815 815 "%s(): 32bit PCI DMA is not supported\n", __func__); 816 816 goto pci_detect_err;
+1 -1
drivers/media/pci/saa7134/saa7134-core.c
··· 951 951 pci_name(pci_dev), dev->pci_rev, pci_dev->irq, 952 952 dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); 953 953 pci_set_master(pci_dev); 954 - if (!pci_dma_supported(pci_dev, DMA_BIT_MASK(32))) { 954 + if (!pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32))) { 955 955 pr_warn("%s: Oops: no 32bit PCI DMA ???\n", dev->name); 956 956 err = -EIO; 957 957 goto fail1;
+1 -1
drivers/media/pci/saa7164/saa7164-core.c
··· 1264 1264 1265 1265 pci_set_master(pci_dev); 1266 1266 /* TODO */ 1267 - if (!pci_dma_supported(pci_dev, 0xffffffff)) { 1267 + if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { 1268 1268 printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); 1269 1269 err = -EIO; 1270 1270 goto fail_irq;
+1 -1
drivers/media/pci/tw68/tw68-core.c
··· 257 257 dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq, 258 258 dev->pci_lat, (u64)pci_resource_start(pci_dev, 0)); 259 259 pci_set_master(pci_dev); 260 - if (!pci_dma_supported(pci_dev, DMA_BIT_MASK(32))) { 260 + if (!pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32))) { 261 261 pr_info("%s: Oops: no 32bit PCI DMA ???\n", dev->name); 262 262 err = -EIO; 263 263 goto fail1;
+1 -1
drivers/net/ethernet/amd/pcnet32.c
··· 1500 1500 return -ENODEV; 1501 1501 } 1502 1502 1503 - if (!pci_dma_supported(pdev, PCNET32_DMA_MASK)) { 1503 + if (!pci_set_dma_mask(pdev, PCNET32_DMA_MASK)) { 1504 1504 if (pcnet32_debug & NETIF_MSG_PROBE) 1505 1505 pr_err("architecture does not support 32bit PCI busmaster DMA\n"); 1506 1506 return -ENODEV;
+3 -5
drivers/net/ethernet/sfc/efx.c
··· 1247 1247 * masks event though they reject 46 bit masks. 1248 1248 */ 1249 1249 while (dma_mask > 0x7fffffffUL) { 1250 - if (dma_supported(&pci_dev->dev, dma_mask)) { 1251 - rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask); 1252 - if (rc == 0) 1253 - break; 1254 - } 1250 + rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask); 1251 + if (rc == 0) 1252 + break; 1255 1253 dma_mask >>= 1; 1256 1254 } 1257 1255 if (rc) {
-6
drivers/net/usb/kaweth.c
··· 1177 1177 INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl); 1178 1178 usb_set_intfdata(intf, kaweth); 1179 1179 1180 - #if 0 1181 - // dma_supported() is deeply broken on almost all architectures 1182 - if (dma_supported (dev, 0xffffffffffffffffULL)) 1183 - kaweth->net->features |= NETIF_F_HIGHDMA; 1184 - #endif 1185 - 1186 1180 SET_NETDEV_DEV(netdev, dev); 1187 1181 if (register_netdev(netdev) != 0) { 1188 1182 dev_err(dev, "Error registering netdev.\n");
-6
drivers/net/usb/usbnet.c
··· 1662 1662 * bind() should set rx_urb_size in that case. 1663 1663 */ 1664 1664 dev->hard_mtu = net->mtu + net->hard_header_len; 1665 - #if 0 1666 - // dma_supported() is deeply broken on almost all architectures 1667 - // possible with some EHCI controllers 1668 - if (dma_supported (&udev->dev, DMA_BIT_MASK(64))) 1669 - net->features |= NETIF_F_HIGHDMA; 1670 - #endif 1671 1665 1672 1666 net->netdev_ops = &usbnet_netdev_ops; 1673 1667 net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
-2
drivers/parisc/ccio-dma.c
··· 704 704 * ccio_dma_supported - Verify the IOMMU supports the DMA address range. 705 705 * @dev: The PCI device. 706 706 * @mask: A bit mask describing the DMA address range of the device. 707 - * 708 - * This function implements the pci_dma_supported function. 709 707 */ 710 708 static int 711 709 ccio_dma_supported(struct device *dev, u64 mask)
-6
include/asm-generic/pci-dma-compat.h
··· 6 6 7 7 #include <linux/dma-mapping.h> 8 8 9 - static inline int 10 - pci_dma_supported(struct pci_dev *hwdev, u64 mask) 11 - { 12 - return dma_supported(hwdev == NULL ? NULL : &hwdev->dev, mask); 13 - } 14 - 15 9 static inline void * 16 10 pci_alloc_consistent(struct pci_dev *hwdev, size_t size, 17 11 dma_addr_t *dma_handle)
+1 -1
lib/string.c
··· 904 904 905 905 value64 = value; 906 906 #if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64 907 - value64 *= 0x0101010101010101; 907 + value64 *= 0x0101010101010101ULL; 908 908 #elif defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) 909 909 value64 *= 0x01010101; 910 910 value64 |= value64 << 32;
+2 -2
mm/hugetlb.c
··· 2138 2138 * First take pages out of surplus state. Then make up the 2139 2139 * remaining difference by allocating fresh huge pages. 2140 2140 * 2141 - * We might race with alloc_buddy_huge_page() here and be unable 2141 + * We might race with __alloc_buddy_huge_page() here and be unable 2142 2142 * to convert a surplus huge page to a normal huge page. That is 2143 2143 * not critical, though, it just means the overall size of the 2144 2144 * pool might be one hugepage larger than it needs to be, but ··· 2180 2180 * By placing pages into the surplus state independent of the 2181 2181 * overcommit value, we are allowing the surplus pool size to 2182 2182 * exceed overcommit. There are few sane options here. Since 2183 - * alloc_buddy_huge_page() is checking the global counter, 2183 + * __alloc_buddy_huge_page() is checking the global counter, 2184 2184 * though, we'll note that we're not allowed to exceed surplus 2185 2185 * and won't grow the pool anywhere else. Not until one of the 2186 2186 * sysctls are changed, or the surplus pages go out of use.
+3 -2
tools/testing/selftests/vm/mlock2-tests.c
··· 1 + #define _GNU_SOURCE 1 2 #include <sys/mman.h> 2 3 #include <stdint.h> 3 4 #include <stdio.h> ··· 277 276 return ret; 278 277 } 279 278 280 - #define PRESENT_BIT 0x8000000000000000 281 - #define PFN_MASK 0x007FFFFFFFFFFFFF 279 + #define PRESENT_BIT 0x8000000000000000ULL 280 + #define PFN_MASK 0x007FFFFFFFFFFFFFULL 282 281 #define UNEVICTABLE_BIT (1UL << 18) 283 282 284 283 static int lock_check(char *map)