Skip to content

Commit df2798b

Browse files
committed
dax/hmem: Move HMAT and Soft reservation probe initcall level
In preparation for moving more filtering of "hmem" ranges into the dax_hmem.ko module, update the initcall levels. HMAT range registration moves to subsys_initcall() to be done before Soft Reservation probing, and Soft Reservation probing is moved to device_initcall() to be done before dax_hmem.ko initialization if it is built-in. Tested-by: Fan Ni <[email protected]> Reviewed-by: Vishal Verma <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/167602001107.1924368.11562316181038595611.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams <[email protected]>
1 parent 3d8f7cc commit df2798b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

drivers/acpi/numa/hmat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,4 +869,4 @@ static __init int hmat_init(void)
869869
acpi_put_table(tbl);
870870
return 0;
871871
}
872-
device_initcall(hmat_init);
872+
subsys_initcall(hmat_init);

drivers/dax/hmem/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
obj-$(CONFIG_DEV_DAX_HMEM) += dax_hmem.o
2+
# device_hmem.o deliberately precedes dax_hmem.o for initcall ordering
33
obj-$(CONFIG_DEV_DAX_HMEM_DEVICES) += device_hmem.o
4+
obj-$(CONFIG_DEV_DAX_HMEM) += dax_hmem.o
45

56
device_hmem-y := device.o
67
dax_hmem-y := hmem.o

drivers/dax/hmem/device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ static __init int hmem_init(void)
104104
* As this is a fallback for address ranges unclaimed by the ACPI HMAT
105105
* parsing it must be at an initcall level greater than hmat_init().
106106
*/
107-
late_initcall(hmem_init);
107+
device_initcall(hmem_init);

0 commit comments

Comments
 (0)