Skip to content

Commit 4533d3a

Browse files
roygerjgross1
authored andcommitted
memremap: rename MEMORY_DEVICE_DEVDAX to MEMORY_DEVICE_GENERIC
This is in preparation for the logic behind MEMORY_DEVICE_DEVDAX also being used by non DAX devices. No functional change intended. Signed-off-by: Roger Pau Monné <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Acked-by: Andrew Morton <[email protected]> Reviewed-by: Pankaj Gupta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent aecb201 commit 4533d3a

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

drivers/dax/device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ int dev_dax_probe(struct device *dev)
429429
return -EBUSY;
430430
}
431431

432-
dev_dax->pgmap.type = MEMORY_DEVICE_DEVDAX;
432+
dev_dax->pgmap.type = MEMORY_DEVICE_GENERIC;
433433
addr = devm_memremap_pages(dev, &dev_dax->pgmap);
434434
if (IS_ERR(addr))
435435
return PTR_ERR(addr);

include/linux/memremap.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ struct vmem_altmap {
4646
* wakeup is used to coordinate physical address space management (ex:
4747
* fs truncate/hole punch) vs pinned pages (ex: device dma).
4848
*
49-
* MEMORY_DEVICE_DEVDAX:
49+
* MEMORY_DEVICE_GENERIC:
5050
* Host memory that has similar access semantics as System RAM i.e. DMA
51-
* coherent and supports page pinning. In contrast to
52-
* MEMORY_DEVICE_FS_DAX, this memory is access via a device-dax
53-
* character device.
51+
* coherent and supports page pinning. This is for example used by DAX devices
52+
* that expose memory using a character device.
5453
*
5554
* MEMORY_DEVICE_PCI_P2PDMA:
5655
* Device memory residing in a PCI BAR intended for use with Peer-to-Peer
@@ -60,7 +59,7 @@ enum memory_type {
6059
/* 0 is reserved to catch uninitialized type fields */
6160
MEMORY_DEVICE_PRIVATE = 1,
6261
MEMORY_DEVICE_FS_DAX,
63-
MEMORY_DEVICE_DEVDAX,
62+
MEMORY_DEVICE_GENERIC,
6463
MEMORY_DEVICE_PCI_P2PDMA,
6564
};
6665

mm/memremap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void *memremap_pages(struct dev_pagemap *pgmap, int nid)
216216
return ERR_PTR(-EINVAL);
217217
}
218218
break;
219-
case MEMORY_DEVICE_DEVDAX:
219+
case MEMORY_DEVICE_GENERIC:
220220
need_devmap_managed = false;
221221
break;
222222
case MEMORY_DEVICE_PCI_P2PDMA:

0 commit comments

Comments
 (0)