2 * Copyright (c) 2015, Christoph Hellwig.
3 * Copyright (c) 2015, Intel Corporation.
5 #include <linux/platform_device.h>
6 #include <linux/module.h>
7 #include <linux/ioport.h>
9 static int found(u64 start
, u64 end
, void *data
)
14 static __init
int register_e820_pmem(void)
16 struct platform_device
*pdev
;
19 rc
= walk_iomem_res_desc(IORES_DESC_PERSISTENT_MEMORY_LEGACY
,
20 IORESOURCE_MEM
, 0, -1, NULL
, found
);
25 * See drivers/nvdimm/e820.c for the implementation, this is
26 * simply here to trigger the module to load on demand.
28 pdev
= platform_device_alloc("e820_pmem", -1);
29 return platform_device_add(pdev
);
31 device_initcall(register_e820_pmem
);