diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-11 00:14:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-11 00:14:23 -0500 |
commit | c5a37883f42be712a989e54d5d6c0159b0e56599 (patch) | |
tree | e66d224e2e1b8ce0f9022fde55f8a3a5c939233d | |
parent | 5dfe5b2c714a5bea0908c1e00da0e8e00535f55c (diff) | |
parent | 247e75dba60140395cd7e808d32f76f208bedf76 (diff) |
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
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 7 | ||||
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx25821/cx25821-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-alsa.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-mpeg.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-video.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/tw68/tw68-core.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/pcnet32.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/efx.c | 8 | ||||
-rw-r--r-- | drivers/net/usb/kaweth.c | 6 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 6 | ||||
-rw-r--r-- | drivers/parisc/ccio-dma.c | 2 | ||||
-rw-r--r-- | include/asm-generic/pci-dma-compat.h | 6 | ||||
-rw-r--r-- | lib/string.c | 2 | ||||
-rw-r--r-- | mm/hugetlb.c | 4 | ||||
-rw-r--r-- | tools/testing/selftests/vm/mlock2-tests.c | 5 |
19 files changed, 24 insertions, 42 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 3f713c1b5dc1..d2e7d209f651 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c | |||
@@ -353,8 +353,7 @@ nouveau_ttm_init(struct nouveau_drm *drm) | |||
353 | 353 | ||
354 | bits = nvxx_mmu(&drm->device)->dma_bits; | 354 | bits = nvxx_mmu(&drm->device)->dma_bits; |
355 | if (nvxx_device(&drm->device)->func->pci) { | 355 | if (nvxx_device(&drm->device)->func->pci) { |
356 | if (drm->agp.bridge || | 356 | if (drm->agp.bridge) |
357 | !dma_supported(dev->dev, DMA_BIT_MASK(bits))) | ||
358 | bits = 32; | 357 | bits = 32; |
359 | } else if (device->func->tegra) { | 358 | } else if (device->func->tegra) { |
360 | struct nvkm_device_tegra *tegra = device->func->tegra(device); | 359 | struct nvkm_device_tegra *tegra = device->func->tegra(device); |
@@ -369,6 +368,10 @@ nouveau_ttm_init(struct nouveau_drm *drm) | |||
369 | } | 368 | } |
370 | 369 | ||
371 | ret = dma_set_mask(dev->dev, DMA_BIT_MASK(bits)); | 370 | ret = dma_set_mask(dev->dev, DMA_BIT_MASK(bits)); |
371 | if (ret && bits != 32) { | ||
372 | bits = 32; | ||
373 | ret = dma_set_mask(dev->dev, DMA_BIT_MASK(bits)); | ||
374 | } | ||
372 | if (ret) | 375 | if (ret) |
373 | return ret; | 376 | return ret; |
374 | 377 | ||
diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index bc1c9602f435..35759a91d47d 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c | |||
@@ -1992,7 +1992,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev, | |||
1992 | (unsigned long long)pci_resource_start(pci_dev, 0)); | 1992 | (unsigned long long)pci_resource_start(pci_dev, 0)); |
1993 | 1993 | ||
1994 | pci_set_master(pci_dev); | 1994 | pci_set_master(pci_dev); |
1995 | if (!pci_dma_supported(pci_dev, 0xffffffff)) { | 1995 | if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { |
1996 | printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); | 1996 | printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); |
1997 | err = -EIO; | 1997 | err = -EIO; |
1998 | goto fail_context; | 1998 | goto fail_context; |
diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c index 559f8293c53a..dbc695f32760 100644 --- a/drivers/media/pci/cx25821/cx25821-core.c +++ b/drivers/media/pci/cx25821/cx25821-core.c | |||
@@ -1319,7 +1319,7 @@ static int cx25821_initdev(struct pci_dev *pci_dev, | |||
1319 | dev->pci_lat, (unsigned long long)dev->base_io_addr); | 1319 | dev->pci_lat, (unsigned long long)dev->base_io_addr); |
1320 | 1320 | ||
1321 | pci_set_master(pci_dev); | 1321 | pci_set_master(pci_dev); |
1322 | if (!pci_dma_supported(pci_dev, 0xffffffff)) { | 1322 | if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { |
1323 | pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); | 1323 | pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); |
1324 | err = -EIO; | 1324 | err = -EIO; |
1325 | goto fail_irq; | 1325 | goto fail_irq; |
diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c index 57ddf8a34178..0ed1b6530374 100644 --- a/drivers/media/pci/cx88/cx88-alsa.c +++ b/drivers/media/pci/cx88/cx88-alsa.c | |||
@@ -890,7 +890,7 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci, | |||
890 | return err; | 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 | dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name); | 894 | dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name); |
895 | err = -EIO; | 895 | err = -EIO; |
896 | cx88_core_put(core, pci); | 896 | cx88_core_put(core, pci); |
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index 9961b2232b97..9db7767d1fe0 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c | |||
@@ -393,7 +393,7 @@ static int cx8802_init_common(struct cx8802_dev *dev) | |||
393 | if (pci_enable_device(dev->pci)) | 393 | if (pci_enable_device(dev->pci)) |
394 | return -EIO; | 394 | return -EIO; |
395 | pci_set_master(dev->pci); | 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 | printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name); | 397 | printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name); |
398 | return -EIO; | 398 | return -EIO; |
399 | } | 399 | } |
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index f3b12dbbe9a1..0de1ad5a977d 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c | |||
@@ -1314,7 +1314,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev, | |||
1314 | dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); | 1314 | dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); |
1315 | 1315 | ||
1316 | pci_set_master(pci_dev); | 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 | printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name); | 1318 | printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name); |
1319 | err = -EIO; | 1319 | err = -EIO; |
1320 | goto fail_core; | 1320 | goto fail_core; |
diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c index 83c90d3462e9..60b2d462f98d 100644 --- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c +++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c | |||
@@ -810,7 +810,7 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev, | |||
810 | "%s(): board vendor 0x%x, revision 0x%x\n", | 810 | "%s(): board vendor 0x%x, revision 0x%x\n", |
811 | __func__, board_vendor, board_revision); | 811 | __func__, board_vendor, board_revision); |
812 | pci_set_master(pci_dev); | 812 | pci_set_master(pci_dev); |
813 | if (!pci_dma_supported(pci_dev, 0xffffffff)) { | 813 | if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { |
814 | dev_err(&pci_dev->dev, | 814 | dev_err(&pci_dev->dev, |
815 | "%s(): 32bit PCI DMA is not supported\n", __func__); | 815 | "%s(): 32bit PCI DMA is not supported\n", __func__); |
816 | goto pci_detect_err; | 816 | goto pci_detect_err; |
diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c index 87f39f97a79f..e79d63eb774e 100644 --- a/drivers/media/pci/saa7134/saa7134-core.c +++ b/drivers/media/pci/saa7134/saa7134-core.c | |||
@@ -951,7 +951,7 @@ static int saa7134_initdev(struct pci_dev *pci_dev, | |||
951 | pci_name(pci_dev), dev->pci_rev, pci_dev->irq, | 951 | pci_name(pci_dev), dev->pci_rev, pci_dev->irq, |
952 | dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); | 952 | dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); |
953 | pci_set_master(pci_dev); | 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 | pr_warn("%s: Oops: no 32bit PCI DMA ???\n", dev->name); | 955 | pr_warn("%s: Oops: no 32bit PCI DMA ???\n", dev->name); |
956 | err = -EIO; | 956 | err = -EIO; |
957 | goto fail1; | 957 | goto fail1; |
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 3206a826b80d..8f36b48ef733 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c | |||
@@ -1264,7 +1264,7 @@ static int saa7164_initdev(struct pci_dev *pci_dev, | |||
1264 | 1264 | ||
1265 | pci_set_master(pci_dev); | 1265 | pci_set_master(pci_dev); |
1266 | /* TODO */ | 1266 | /* TODO */ |
1267 | if (!pci_dma_supported(pci_dev, 0xffffffff)) { | 1267 | if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { |
1268 | printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); | 1268 | printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); |
1269 | err = -EIO; | 1269 | err = -EIO; |
1270 | goto fail_irq; | 1270 | goto fail_irq; |
diff --git a/drivers/media/pci/tw68/tw68-core.c b/drivers/media/pci/tw68/tw68-core.c index 04706cc9b818..8c5655d351d3 100644 --- a/drivers/media/pci/tw68/tw68-core.c +++ b/drivers/media/pci/tw68/tw68-core.c | |||
@@ -257,7 +257,7 @@ static int tw68_initdev(struct pci_dev *pci_dev, | |||
257 | dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq, | 257 | dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq, |
258 | dev->pci_lat, (u64)pci_resource_start(pci_dev, 0)); | 258 | dev->pci_lat, (u64)pci_resource_start(pci_dev, 0)); |
259 | pci_set_master(pci_dev); | 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 | pr_info("%s: Oops: no 32bit PCI DMA ???\n", dev->name); | 261 | pr_info("%s: Oops: no 32bit PCI DMA ???\n", dev->name); |
262 | err = -EIO; | 262 | err = -EIO; |
263 | goto fail1; | 263 | goto fail1; |
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c index bc8b04f42882..e2afabf3a465 100644 --- a/drivers/net/ethernet/amd/pcnet32.c +++ b/drivers/net/ethernet/amd/pcnet32.c | |||
@@ -1500,7 +1500,7 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1500 | return -ENODEV; | 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 | if (pcnet32_debug & NETIF_MSG_PROBE) | 1504 | if (pcnet32_debug & NETIF_MSG_PROBE) |
1505 | pr_err("architecture does not support 32bit PCI busmaster DMA\n"); | 1505 | pr_err("architecture does not support 32bit PCI busmaster DMA\n"); |
1506 | return -ENODEV; | 1506 | return -ENODEV; |
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 6e11ee6173ce..d288f1c928de 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c | |||
@@ -1247,11 +1247,9 @@ static int efx_init_io(struct efx_nic *efx) | |||
1247 | * masks event though they reject 46 bit masks. | 1247 | * masks event though they reject 46 bit masks. |
1248 | */ | 1248 | */ |
1249 | while (dma_mask > 0x7fffffffUL) { | 1249 | while (dma_mask > 0x7fffffffUL) { |
1250 | if (dma_supported(&pci_dev->dev, dma_mask)) { | 1250 | rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask); |
1251 | rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask); | 1251 | if (rc == 0) |
1252 | if (rc == 0) | 1252 | break; |
1253 | break; | ||
1254 | } | ||
1255 | dma_mask >>= 1; | 1253 | dma_mask >>= 1; |
1256 | } | 1254 | } |
1257 | if (rc) { | 1255 | if (rc) { |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 1e9cdca37014..f64b25c221e8 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -1177,12 +1177,6 @@ err_fw: | |||
1177 | INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl); | 1177 | INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl); |
1178 | usb_set_intfdata(intf, kaweth); | 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 | SET_NETDEV_DEV(netdev, dev); | 1180 | SET_NETDEV_DEV(netdev, dev); |
1187 | if (register_netdev(netdev) != 0) { | 1181 | if (register_netdev(netdev) != 0) { |
1188 | dev_err(dev, "Error registering netdev.\n"); | 1182 | dev_err(dev, "Error registering netdev.\n"); |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 060918f49fea..0744bf2ef2d6 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1662,12 +1662,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1662 | * bind() should set rx_urb_size in that case. | 1662 | * bind() should set rx_urb_size in that case. |
1663 | */ | 1663 | */ |
1664 | dev->hard_mtu = net->mtu + net->hard_header_len; | 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 | net->netdev_ops = &usbnet_netdev_ops; | 1666 | net->netdev_ops = &usbnet_netdev_ops; |
1673 | net->watchdog_timeo = TX_TIMEOUT_JIFFIES; | 1667 | net->watchdog_timeo = TX_TIMEOUT_JIFFIES; |
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 957b42198328..8e11fb2831cd 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -704,8 +704,6 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) | |||
704 | * ccio_dma_supported - Verify the IOMMU supports the DMA address range. | 704 | * ccio_dma_supported - Verify the IOMMU supports the DMA address range. |
705 | * @dev: The PCI device. | 705 | * @dev: The PCI device. |
706 | * @mask: A bit mask describing the DMA address range of the device. | 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 | static int | 708 | static int |
711 | ccio_dma_supported(struct device *dev, u64 mask) | 709 | ccio_dma_supported(struct device *dev, u64 mask) |
diff --git a/include/asm-generic/pci-dma-compat.h b/include/asm-generic/pci-dma-compat.h index c110843fc53b..eafce7b6f052 100644 --- a/include/asm-generic/pci-dma-compat.h +++ b/include/asm-generic/pci-dma-compat.h | |||
@@ -6,12 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/dma-mapping.h> | 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 | static inline void * | 9 | static inline void * |
16 | pci_alloc_consistent(struct pci_dev *hwdev, size_t size, | 10 | pci_alloc_consistent(struct pci_dev *hwdev, size_t size, |
17 | dma_addr_t *dma_handle) | 11 | dma_addr_t *dma_handle) |
diff --git a/lib/string.c b/lib/string.c index 84775ba873b9..0323c0d5629a 100644 --- a/lib/string.c +++ b/lib/string.c | |||
@@ -904,7 +904,7 @@ void *memchr_inv(const void *start, int c, size_t bytes) | |||
904 | 904 | ||
905 | value64 = value; | 905 | value64 = value; |
906 | #if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64 | 906 | #if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64 |
907 | value64 *= 0x0101010101010101; | 907 | value64 *= 0x0101010101010101ULL; |
908 | #elif defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) | 908 | #elif defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) |
909 | value64 *= 0x01010101; | 909 | value64 *= 0x01010101; |
910 | value64 |= value64 << 32; | 910 | value64 |= value64 << 32; |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7ce07d681265..827bb02a43a4 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2138,7 +2138,7 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count, | |||
2138 | * First take pages out of surplus state. Then make up the | 2138 | * First take pages out of surplus state. Then make up the |
2139 | * remaining difference by allocating fresh huge pages. | 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 | * to convert a surplus huge page to a normal huge page. That is | 2142 | * to convert a surplus huge page to a normal huge page. That is |
2143 | * not critical, though, it just means the overall size of the | 2143 | * not critical, though, it just means the overall size of the |
2144 | * pool might be one hugepage larger than it needs to be, but | 2144 | * pool might be one hugepage larger than it needs to be, but |
@@ -2180,7 +2180,7 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count, | |||
2180 | * By placing pages into the surplus state independent of the | 2180 | * By placing pages into the surplus state independent of the |
2181 | * overcommit value, we are allowing the surplus pool size to | 2181 | * overcommit value, we are allowing the surplus pool size to |
2182 | * exceed overcommit. There are few sane options here. Since | 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 | * though, we'll note that we're not allowed to exceed surplus | 2184 | * though, we'll note that we're not allowed to exceed surplus |
2185 | * and won't grow the pool anywhere else. Not until one of the | 2185 | * and won't grow the pool anywhere else. Not until one of the |
2186 | * sysctls are changed, or the surplus pages go out of use. | 2186 | * sysctls are changed, or the surplus pages go out of use. |
diff --git a/tools/testing/selftests/vm/mlock2-tests.c b/tools/testing/selftests/vm/mlock2-tests.c index 4431994aade2..02ca5e0177c5 100644 --- a/tools/testing/selftests/vm/mlock2-tests.c +++ b/tools/testing/selftests/vm/mlock2-tests.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #define _GNU_SOURCE | ||
1 | #include <sys/mman.h> | 2 | #include <sys/mman.h> |
2 | #include <stdint.h> | 3 | #include <stdint.h> |
3 | #include <stdio.h> | 4 | #include <stdio.h> |
@@ -276,8 +277,8 @@ out: | |||
276 | return ret; | 277 | return ret; |
277 | } | 278 | } |
278 | 279 | ||
279 | #define PRESENT_BIT 0x8000000000000000 | 280 | #define PRESENT_BIT 0x8000000000000000ULL |
280 | #define PFN_MASK 0x007FFFFFFFFFFFFF | 281 | #define PFN_MASK 0x007FFFFFFFFFFFFFULL |
281 | #define UNEVICTABLE_BIT (1UL << 18) | 282 | #define UNEVICTABLE_BIT (1UL << 18) |
282 | 283 | ||
283 | static int lock_check(char *map) | 284 | static int lock_check(char *map) |