提交 88ecee4b 编写于 作者: Z Zhuling 提交者: Zheng Zengkai

x86: pmem: move persistent memory(legacy) code into nvdimm

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4O31I

-------------------------

Move x86's pmem.c into nvdimm, and rename X86_PMEM_LEGACY_DEVICE to
PMEM_LEGACY_DEVICE, also add PMEM_LEGACY to control the built of
nd_e820.o, then the code could be reused by other architectures.

Note,this patch fixs the nd_e820.c build introduced by commit 2499317e
("arm64: Revert feature: Add memmap parameter and register pmem").
Signed-off-by: NZhuling <zhuling8@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 5b138fd7
...@@ -1667,14 +1667,12 @@ config ILLEGAL_POINTER_VALUE ...@@ -1667,14 +1667,12 @@ config ILLEGAL_POINTER_VALUE
default 0 if X86_32 default 0 if X86_32
default 0xdead000000000000 if X86_64 default 0xdead000000000000 if X86_64
config X86_PMEM_LEGACY_DEVICE
bool
config X86_PMEM_LEGACY config X86_PMEM_LEGACY
tristate "Support non-standard NVDIMMs and ADR protected memory" tristate "Support non-standard NVDIMMs and ADR protected memory"
depends on PHYS_ADDR_T_64BIT depends on PHYS_ADDR_T_64BIT
depends on BLK_DEV depends on BLK_DEV
select X86_PMEM_LEGACY_DEVICE select PMEM_LEGACY
select PMEM_LEGACY_DEVICE
select NUMA_KEEP_MEMINFO if NUMA select NUMA_KEEP_MEMINFO if NUMA
select LIBNVDIMM select LIBNVDIMM
help help
......
...@@ -130,7 +130,6 @@ obj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o ...@@ -130,7 +130,6 @@ obj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o
obj-$(CONFIG_PARAVIRT) += paravirt.o paravirt_patch.o obj-$(CONFIG_PARAVIRT) += paravirt.o paravirt_patch.o
obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o
obj-$(CONFIG_PARAVIRT_CLOCK) += pvclock.o obj-$(CONFIG_PARAVIRT_CLOCK) += pvclock.o
obj-$(CONFIG_X86_PMEM_LEGACY_DEVICE) += pmem.o
obj-$(CONFIG_JAILHOUSE_GUEST) += jailhouse.o obj-$(CONFIG_JAILHOUSE_GUEST) += jailhouse.o
......
...@@ -19,6 +19,12 @@ menuconfig LIBNVDIMM ...@@ -19,6 +19,12 @@ menuconfig LIBNVDIMM
if LIBNVDIMM if LIBNVDIMM
config PMEM_LEGACY
tristate
config PMEM_LEGACY_DEVICE
bool
config BLK_DEV_PMEM config BLK_DEV_PMEM
tristate "PMEM: Persistent memory block device support" tristate "PMEM: Persistent memory block device support"
default LIBNVDIMM default LIBNVDIMM
......
...@@ -3,6 +3,8 @@ obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o ...@@ -3,6 +3,8 @@ obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
obj-$(CONFIG_ND_BTT) += nd_btt.o obj-$(CONFIG_ND_BTT) += nd_btt.o
obj-$(CONFIG_ND_BLK) += nd_blk.o obj-$(CONFIG_ND_BLK) += nd_blk.o
obj-$(CONFIG_PMEM_LEGACY_DEVICE) += pmem_legacy_device.o
obj-$(CONFIG_PMEM_LEGACY) += nd_e820.o
obj-$(CONFIG_OF_PMEM) += of_pmem.o obj-$(CONFIG_OF_PMEM) += of_pmem.o
obj-$(CONFIG_VIRTIO_PMEM) += virtio_pmem.o nd_virtio.o obj-$(CONFIG_VIRTIO_PMEM) += virtio_pmem.o nd_virtio.o
......
...@@ -28,7 +28,7 @@ obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o ...@@ -28,7 +28,7 @@ obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
obj-$(CONFIG_ND_BTT) += nd_btt.o obj-$(CONFIG_ND_BTT) += nd_btt.o
obj-$(CONFIG_ND_BLK) += nd_blk.o obj-$(CONFIG_ND_BLK) += nd_blk.o
obj-$(CONFIG_X86_PMEM_LEGACY) += nd_e820.o obj-$(CONFIG_PMEM_LEGACY) += nd_e820.o
obj-$(CONFIG_ACPI_NFIT) += nfit.o obj-$(CONFIG_ACPI_NFIT) += nfit.o
ifeq ($(CONFIG_DAX),m) ifeq ($(CONFIG_DAX),m)
obj-$(CONFIG_DAX) += dax.o obj-$(CONFIG_DAX) += dax.o
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册