ANBZ: #21081
The previous patch modified the `add_memory_resource` and
`add_memory_driver_managed` interfaces, causing some drivers to fail to
compile on ANCK.
This patch re-implements the relevant functions, and no longer modifies
the relevant interfaces while maintaining the original logic.
Fixes: 6276951a54 ("anolis: virtio-mem: restrict offline memmap on
movable in x86_64")
Signed-off-by: hr567 <hr567@linux.alibaba.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/5301