|
@@ -976,13 +976,16 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_HAVE_MEMBLOCK
|
|
|
+#ifndef MIN_MEMBLOCK_ADDR
|
|
|
+#define MIN_MEMBLOCK_ADDR __pa(PAGE_OFFSET)
|
|
|
+#endif
|
|
|
#ifndef MAX_MEMBLOCK_ADDR
|
|
|
#define MAX_MEMBLOCK_ADDR ((phys_addr_t)~0)
|
|
|
#endif
|
|
|
|
|
|
void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
|
|
|
{
|
|
|
- const u64 phys_offset = __pa(PAGE_OFFSET);
|
|
|
+ const u64 phys_offset = MIN_MEMBLOCK_ADDR;
|
|
|
|
|
|
if (!PAGE_ALIGNED(base)) {
|
|
|
if (size < PAGE_SIZE - (base & ~PAGE_MASK)) {
|