Thread (23 messages) flat view 23 messages, 7 authors, 2015-07-01

Memory size unaligned to section boundary

From: Hans de Goede <hidden>
Date: 2015-05-09 14:06:34

Hi,

On 09-05-15 15:54, Russell King - ARM Linux wrote:
On Sat, May 09, 2015 at 03:54:00PM +0200, Hans de Goede wrote:
quoted
Hi,

On 09-05-15 15:48, Russell King - ARM Linux wrote:
quoted
On Sat, May 09, 2015 at 03:38:16PM +0200, Hans de Goede wrote:
quoted
Ok, so does that mean that Mark's original patch:

---->8----
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 4e6ef89..2ea13f0 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1125,9 +1125,9 @@ void __init sanity_check_meminfo(void)
                          * occurs before any free memory is mapped.
                          */
                         if (!memblock_limit) {
-                               if (!IS_ALIGNED(block_start, SECTION_SIZE))
+                               if (!IS_ALIGNED(block_start, PMD_SIZE))
                                         memblock_limit = block_start;
-                               else if (!IS_ALIGNED(block_end, SECTION_SIZE))
+                               else if (!IS_ALIGNED(block_end, PMD_SIZE))
                                         memblock_limit = arm_lowmem_limit;
                         }
@@ -1142,7 +1142,7 @@ void __init sanity_check_meminfo(void)
          * last full section, which should be mapped.
          */
         if (memblock_limit)
-               memblock_limit = round_down(memblock_limit, SECTION_SIZE);
+               memblock_limit = round_down(memblock_limit, PMD_SIZE);
         if (!memblock_limit)
                 memblock_limit = arm_lowmem_limit;

Is good, or do we only need to have the last chunk of this patch ?
That should do it, thanks.
"that should do it" means the entire patch or only the last chunk?
Entire patch.
Ok, I'll try to give this a test run on an affected system soonish.

Regards,

Hans
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help