Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1216879 > unrolled thread
| Started by | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| First post | 2015-09-01 16:30 +0200 |
| Last post | 2015-09-01 16:40 +0200 |
| Articles | 4 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/5 v2] mm/memblock: Introduce memblock_first_region_size() helper Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-09-01 16:30 +0200
[PATCH 1/5 v2] mm/memblock: Introduce memblock_first_region_size() helper Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-09-01 16:30 +0200
[PATCH 2/5 v2] s390/setup: use memblock_first_region_size helper Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-09-01 16:30 +0200
[PATCH 5/5 v2] arm/mmu: Use memblock_first_region_size() helper Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-09-01 16:40 +0200
| From | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| Date | 2015-09-01 16:30 +0200 |
| Subject | [PATCH 0/5 v2] mm/memblock: Introduce memblock_first_region_size() helper |
| Message-ID | <q3UJs-Hp-9@gated-at.bofh.it> |
Some architectures (like s390, microblaze and etc...) require size of the first memory region. This patch set provides new memblock_first_region_size() helper for this case and change usage of memblock.memory.regions[0].size on memblock_first_region_size() for the following architectures: * s390 * microblaze * arm * unicore32 Changelog: v2: Added changes in the architectures to the patchset. Alexander Kuleshov (5): mm/memblock: Introduce memblock_first_region_size() helper s390/setup: use memblock_first_region_size helper microblaze/mm: Use memblock_first_region_size() helper unicore32/mmu: use memblock_first_region_size() helper arm/mmu: Use memblock_first_region_size() helper arch/arm/mm/mmu.c | 2 +- arch/microblaze/mm/init.c | 6 +++--- arch/s390/kernel/setup.c | 2 +- arch/unicore32/mm/mmu.c | 2 +- include/linux/memblock.h | 1 + mm/memblock.c | 5 +++++ 6 files changed, 12 insertions(+), 6 deletions(-) -- 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/
[toc] | [next] | [standalone]
| From | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| Date | 2015-09-01 16:30 +0200 |
| Subject | [PATCH 1/5 v2] mm/memblock: Introduce memblock_first_region_size() helper |
| Message-ID | <q3UJs-Hp-15@gated-at.bofh.it> |
| In reply to | #1216879 |
Some architectures (like s390, microblaze and etc...) require size
of the first memory region. This patch provides new memblock_first_region_size()
helper for this case.
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
include/linux/memblock.h | 1 +
mm/memblock.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index cc4b019..8a481e5 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -319,6 +319,7 @@ phys_addr_t memblock_phys_mem_size(void);
phys_addr_t memblock_mem_size(unsigned long limit_pfn);
phys_addr_t memblock_start_of_DRAM(void);
phys_addr_t memblock_end_of_DRAM(void);
+phys_addr_t memblock_first_region_size(void);
void memblock_enforce_memory_limit(phys_addr_t memory_limit);
int memblock_is_memory(phys_addr_t addr);
int memblock_is_region_memory(phys_addr_t base, phys_addr_t size);
diff --git a/mm/memblock.c b/mm/memblock.c
index 87108e7..fb4b7ca 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1463,6 +1463,11 @@ phys_addr_t __init_memblock memblock_end_of_DRAM(void)
return (memblock.memory.regions[idx].base + memblock.memory.regions[idx].size);
}
+phys_addr_t __init_memblock memblock_first_region_size(void)
+{
+ return memblock.memory.regions[0].size;
+}
+
void __init memblock_enforce_memory_limit(phys_addr_t limit)
{
phys_addr_t max_addr = (phys_addr_t)ULLONG_MAX;
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| Date | 2015-09-01 16:30 +0200 |
| Subject | [PATCH 2/5 v2] s390/setup: use memblock_first_region_size helper |
| Message-ID | <q3UJs-Hp-27@gated-at.bofh.it> |
| In reply to | #1216879 |
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/s390/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index ca070d2..69c3859 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -563,7 +563,7 @@ static void __init reserve_crashkernel(void)
if (rc || crash_size == 0)
return;
- if (memblock.memory.regions[0].size < crash_size) {
+ if (memblock_first_region_size() < crash_size) {
pr_info("crashkernel reservation failed: %s\n",
"first memory chunk must be at least crashkernel size");
return;
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| Date | 2015-09-01 16:40 +0200 |
| Subject | [PATCH 5/5 v2] arm/mmu: Use memblock_first_region_size() helper |
| Message-ID | <q3UT8-SA-17@gated-at.bofh.it> |
| In reply to | #1216879 |
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/arm/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 870838a..fc60882 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1176,7 +1176,7 @@ static inline void prepare_page_table(void) /* * Find the end of the first block of lowmem. */ - end = memblock.memory.regions[0].base + memblock.memory.regions[0].size; + end = memblock.memory.regions[0].base + memblock_first_region_size(); if (end >= arm_lowmem_limit) end = arm_lowmem_limit; -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web