Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1216882
| From | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/5 v2] microblaze/mm: Use memblock_first_region_size() helper |
| Date | 2015-09-01 16:30 +0200 |
| Message-ID | <q3UJs-Hp-25@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The 0a11142e commit (mm/memblock: Introduce memblock_first_region_size()
helper) introduced memblock_first_region_size() helper for the getting
size of the first memblock region. Let's use it instead of directly access
to structure.
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
arch/microblaze/mm/init.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 77bc7c7..7c846a4 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -332,19 +332,19 @@ asmlinkage void __init mmu_init(void)
machine_restart(NULL);
}
- if ((u32) memblock.memory.regions[0].size < 0x400000) {
+ if ((u32) memblock_first_region_size() < 0x400000) {
pr_emerg("Memory must be greater than 4MB\n");
machine_restart(NULL);
}
- if ((u32) memblock.memory.regions[0].size < kernel_tlb) {
+ if ((u32) memblock_first_region_size() < kernel_tlb) {
pr_emerg("Kernel size is greater than memory node\n");
machine_restart(NULL);
}
/* Find main memory where the kernel is */
memory_start = (u32) memblock.memory.regions[0].base;
- lowmem_size = memory_size = (u32) memblock.memory.regions[0].size;
+ lowmem_size = memory_size = (u32)memblock_first_region_size();
if (lowmem_size > CONFIG_LOWMEM_SIZE) {
lowmem_size = CONFIG_LOWMEM_SIZE;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3/5 v2] microblaze/mm: Use memblock_first_region_size() helper Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-09-01 16:30 +0200
csiph-web