|
|
@@ -1175,6 +1175,22 @@ void __init adjust_lowmem_bounds(void)
|
|
|
*/
|
|
|
vmalloc_limit = (u64)(uintptr_t)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;
|
|
|
|
|
|
+ /*
|
|
|
+ * The first usable region must be PMD aligned. Mark its start
|
|
|
+ * as MEMBLOCK_NOMAP if it isn't
|
|
|
+ */
|
|
|
+ for_each_memblock(memory, reg) {
|
|
|
+ if (!memblock_is_nomap(reg)) {
|
|
|
+ if (!IS_ALIGNED(reg->base, PMD_SIZE)) {
|
|
|
+ phys_addr_t len;
|
|
|
+
|
|
|
+ len = round_up(reg->base, PMD_SIZE) - reg->base;
|
|
|
+ memblock_mark_nomap(reg->base, len);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
for_each_memblock(memory, reg) {
|
|
|
phys_addr_t block_start = reg->base;
|
|
|
phys_addr_t block_end = reg->base + reg->size;
|