Commit 42d9358
mm/memory_hotplug: export mhp_supports_memmap_on_memory()
In preparation for adding sysfs ABI to toggle memmap_on_memory semantics
for drivers adding memory, export the mhp_supports_memmap_on_memory()
helper. This allows drivers to check if memmap_on_memory support is
available before trying to request it, and display an appropriate
message if it isn't available. As part of this, remove the size argument
to this - with recent updates to allow memmap_on_memory for larger
ranges, and the internal splitting of altmaps into respective memory
blocks, the size argument is meaningless.
[akpm@linux-foundation.org: fix build]
Link: https://lkml.kernel.org/r/20240124-vv-dax_abi-v7-4-20d16cb8d23d@intel.com
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Acked-by: David Hildenbrand <david@redhat.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Li Zhijian <lizhijian@fujitsu.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 51e7849 commit 42d9358
2 files changed
+12
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
281 | 287 | | |
282 | 288 | | |
283 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1337 | 1337 | | |
1338 | 1338 | | |
1339 | 1339 | | |
1340 | | - | |
| 1340 | + | |
1341 | 1341 | | |
1342 | 1342 | | |
1343 | 1343 | | |
| |||
1346 | 1346 | | |
1347 | 1347 | | |
1348 | 1348 | | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
| 1349 | + | |
1356 | 1350 | | |
1357 | 1351 | | |
1358 | 1352 | | |
1359 | | - | |
| 1353 | + | |
1360 | 1354 | | |
1361 | 1355 | | |
1362 | 1356 | | |
| |||
1368 | 1362 | | |
1369 | 1363 | | |
1370 | 1364 | | |
1371 | | - | |
| 1365 | + | |
1372 | 1366 | | |
1373 | 1367 | | |
1374 | 1368 | | |
| |||
1391 | 1385 | | |
1392 | 1386 | | |
1393 | 1387 | | |
| 1388 | + | |
1394 | 1389 | | |
1395 | 1390 | | |
1396 | 1391 | | |
| |||
1526 | 1521 | | |
1527 | 1522 | | |
1528 | 1523 | | |
1529 | | - | |
| 1524 | + | |
1530 | 1525 | | |
1531 | 1526 | | |
1532 | 1527 | | |
| |||
0 commit comments