]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: NUMA: HMAT: fix a section mismatch
authorQian Cai <cai@lca.pw>
Mon, 11 Nov 2019 21:34:26 +0000 (16:34 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 12 Nov 2019 09:01:03 +0000 (10:01 +0100)
commite27c34ccf1bf3a40a5a0379871f60647af67614d
treead19656a58d9d9f121e717f6832a3f57931e2e6d
parent3b5e6b747e282a8d302488a0f7f872647e6686bf
ACPI: NUMA: HMAT: fix a section mismatch

Commit cf68f8418090 ("ACPI: NUMA: HMAT: Register "soft reserved"
memory as an "hmem" device") introduced a linker warning,

WARNING: vmlinux.o(.text+0x64ec3c): Section mismatch in reference from
the function hmat_register_target() to the function
.init.text:hmat_register_target_devices()

The function hmat_register_target() references the function __init
hmat_register_target_devices().

Since hmat_register_target() is also called from hmat_callback(), and
then register_hotmemory_notifier(), where it should not be freed when
hmat_init() is done, it indicates that the __init annotation of
hmat_register_target_devices() is incorrect.

Fixes: cf68f8418090 ("ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device")
Signed-off-by: Qian Cai <cai@lca.pw>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/numa/hmat.c