Commit 64f47c3
committed
mm/memory_hotplug: export mhp_supports_memmap_on_memory()
JIRA: https://issues.redhat.com/browse/RHEL-23824
Conflicts: Contextual difference due to missing commit c5f1e2d
("mm/memory_hotplug: introduce MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE
notifiers").
commit 42d9358
Author: Vishal Verma <vishal.l.verma@intel.com>
Date: Wed Jan 24 12:03:49 2024 -0800
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>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>1 parent 3668a22 commit 64f47c3
2 files changed
+12
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
265 | 271 | | |
266 | 272 | | |
267 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1361 | 1361 | | |
1362 | 1362 | | |
1363 | 1363 | | |
1364 | | - | |
| 1364 | + | |
1365 | 1365 | | |
1366 | 1366 | | |
1367 | 1367 | | |
| |||
1370 | 1370 | | |
1371 | 1371 | | |
1372 | 1372 | | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
| 1373 | + | |
1380 | 1374 | | |
1381 | 1375 | | |
1382 | 1376 | | |
1383 | | - | |
| 1377 | + | |
1384 | 1378 | | |
1385 | 1379 | | |
1386 | 1380 | | |
| |||
1392 | 1386 | | |
1393 | 1387 | | |
1394 | 1388 | | |
1395 | | - | |
| 1389 | + | |
1396 | 1390 | | |
1397 | 1391 | | |
1398 | 1392 | | |
| |||
1415 | 1409 | | |
1416 | 1410 | | |
1417 | 1411 | | |
| 1412 | + | |
1418 | 1413 | | |
1419 | 1414 | | |
1420 | 1415 | | |
| |||
1548 | 1543 | | |
1549 | 1544 | | |
1550 | 1545 | | |
1551 | | - | |
| 1546 | + | |
1552 | 1547 | | |
1553 | 1548 | | |
1554 | 1549 | | |
| |||
0 commit comments