hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/h8300/kernel/setup.c
....@@ -13,12 +13,12 @@
1313 #include <linux/sched.h>
1414 #include <linux/delay.h>
1515 #include <linux/interrupt.h>
16
+#include <linux/io.h>
1617 #include <linux/mm.h>
1718 #include <linux/fs.h>
1819 #include <linux/console.h>
1920 #include <linux/errno.h>
2021 #include <linux/string.h>
21
-#include <linux/bootmem.h>
2222 #include <linux/seq_file.h>
2323 #include <linux/init.h>
2424 #include <linux/of.h>
....@@ -31,7 +31,6 @@
3131
3232 #include <asm/setup.h>
3333 #include <asm/irq.h>
34
-#include <asm/pgtable.h>
3534 #include <asm/sections.h>
3635 #include <asm/page.h>
3736
....@@ -75,17 +74,15 @@
7574 memory_end = memory_start = 0;
7675
7776 /* Find main memory where is the kernel */
78
- for_each_memblock(memory, region) {
79
- memory_start = region->base;
80
- memory_end = region->base + region->size;
81
- }
77
+ memory_start = memblock_start_of_DRAM();
78
+ memory_end = memblock_end_of_DRAM();
8279
8380 if (!memory_end)
8481 panic("No memory!");
8582
8683 /* setup bootmem globals (we use no_bootmem, but mm still depends on this) */
8784 min_low_pfn = PFN_UP(memory_start);
88
- max_low_pfn = PFN_DOWN(memblock_end_of_DRAM());
85
+ max_low_pfn = PFN_DOWN(memory_end);
8986 max_pfn = max_low_pfn;
9087
9188 memblock_reserve(__pa(_stext), _end - _stext);