From: R Sricharan <hidden> Date: 2012-08-06 07:41:25
With LPAE, When either the start address or end address
or physical address to be mapped is unaligned,
alloc_init_section creates page granularity mappings.
alloc_init_section calls alloc_init_pte which populates
one pmd entry and sets up the ptes. But if the size is
greater than what can be mapped by one pmd entry,
then the rest remains unmapped.
The issue becomes visible when LPAE is enabled, where we have
the 3 levels with seperate pgd and pmd's.
When a static mapping for 3MB is requested, only 2MB is mapped
and the remaining 1MB is unmapped. Fixing this here, by looping
in to map the entire unaligned address range.
Boot tested on OMAP5 evm with both LPAE enabled/disabled
and verified that static mappings with unaligned addresses
are properly mapped.
Signed-off-by: R Sricharan <redacted>
Reviewed-by: Santosh Shilimkar <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
[V2] Moved the loop to alloc_init_pte as per Russell's
feedback and changed the subject accordingly.
Using PMD_XXX instead of SECTION_XXX to avoid
different loop increments with/without LPAE.
arch/arm/mm/mmu.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
With LPAE, When either the start address or end address
or physical address to be mapped is unaligned,
alloc_init_section creates page granularity mappings.
alloc_init_section calls alloc_init_pte which populates
one pmd entry and sets up the ptes. But if the size is
greater than what can be mapped by one pmd entry,
then the rest remains unmapped.
The issue becomes visible when LPAE is enabled, where we have
the 3 levels with seperate pgd and pmd's.
When a static mapping for 3MB is requested, only 2MB is mapped
and the remaining 1MB is unmapped. Fixing this here, by looping
in to map the entire unaligned address range.
Boot tested on OMAP5 evm with both LPAE enabled/disabled
and verified that static mappings with unaligned addresses
are properly mapped.
Signed-off-by: R Sricharan <redacted>
Reviewed-by: Santosh Shilimkar <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
[V2] Moved the loop to alloc_init_pte as per Russell's
feedback and changed the subject accordingly.
Using PMD_XXX instead of SECTION_XXX to avoid
different loop increments with/without LPAE.
arch/arm/mm/mmu.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Hi,
On Fri, Aug 17, 2012 at 4:32 PM, R, Sricharan [off-list ref] wrote:
Hi,
quoted
With LPAE, When either the start address or end address
or physical address to be mapped is unaligned,
alloc_init_section creates page granularity mappings.
alloc_init_section calls alloc_init_pte which populates
one pmd entry and sets up the ptes. But if the size is
greater than what can be mapped by one pmd entry,
then the rest remains unmapped.
The issue becomes visible when LPAE is enabled, where we have
the 3 levels with seperate pgd and pmd's.
When a static mapping for 3MB is requested, only 2MB is mapped
and the remaining 1MB is unmapped. Fixing this here, by looping
in to map the entire unaligned address range.
Boot tested on OMAP5 evm with both LPAE enabled/disabled
and verified that static mappings with unaligned addresses
are properly mapped.
Signed-off-by: R Sricharan <redacted>
Reviewed-by: Santosh Shilimkar <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
[V2] Moved the loop to alloc_init_pte as per Russell's
feedback and changed the subject accordingly.
Using PMD_XXX instead of SECTION_XXX to avoid
different loop increments with/without LPAE.
arch/arm/mm/mmu.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Ping again.
The issue is reproducible in mainline with CMA + LPAE enabled.
CMA tries to reserve/map 16 MB with 2 level table entries and
crashes in alloc_init_pte.
This patch fixes that. Just posted a V3 of the same patch.
https://patchwork.kernel.org/patch/1472031/
Thanks,
Sricharan
(sorry for if you got this message twice, gmail's new reply method
decided to send html)
On 18 September 2012 12:52, R, Sricharan [off-list ref] wrote:
Hi,
On Fri, Aug 17, 2012 at 4:32 PM, R, Sricharan [off-list ref] wrote:
quoted
Hi,
quoted
With LPAE, When either the start address or end address
or physical address to be mapped is unaligned,
alloc_init_section creates page granularity mappings.
alloc_init_section calls alloc_init_pte which populates
one pmd entry and sets up the ptes. But if the size is
greater than what can be mapped by one pmd entry,
then the rest remains unmapped.
The issue becomes visible when LPAE is enabled, where we have
the 3 levels with seperate pgd and pmd's.
When a static mapping for 3MB is requested, only 2MB is mapped
and the remaining 1MB is unmapped. Fixing this here, by looping
in to map the entire unaligned address range.
Boot tested on OMAP5 evm with both LPAE enabled/disabled
and verified that static mappings with unaligned addresses
are properly mapped.
Signed-off-by: R Sricharan <redacted>
Reviewed-by: Santosh Shilimkar <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
[V2] Moved the loop to alloc_init_pte as per Russell's
feedback and changed the subject accordingly.
Using PMD_XXX instead of SECTION_XXX to avoid
different loop increments with/without LPAE.
arch/arm/mm/mmu.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Ping again.
The issue is reproducible in mainline with CMA + LPAE enabled.
CMA tries to reserve/map 16 MB with 2 level table entries and
crashes in alloc_init_pte.
This patch fixes that. Just posted a V3 of the same patch.
https://patchwork.kernel.org/patch/1472031/
I thought there was another patch where the looping was in an
alloc_init_pmd() function, or there are just two different threads. I
acked the other but not this one as I don't think looping over pmd
inside the alloc_init_pte() function is the right thing.
--
Catalin
From: Laura Abbott <hidden> Date: 2013-03-14 20:19:17
On 3/13/2013 10:14 PM, Catalin Marinas wrote:
(sorry for if you got this message twice, gmail's new reply method
decided to send html)
On 18 September 2012 12:52, R, Sricharan [off-list ref] wrote:
quoted
Hi,
On Fri, Aug 17, 2012 at 4:32 PM, R, Sricharan [off-list ref] wrote:
quoted
Hi,
quoted
With LPAE, When either the start address or end address
or physical address to be mapped is unaligned,
alloc_init_section creates page granularity mappings.
alloc_init_section calls alloc_init_pte which populates
one pmd entry and sets up the ptes. But if the size is
greater than what can be mapped by one pmd entry,
then the rest remains unmapped.
The issue becomes visible when LPAE is enabled, where we have
the 3 levels with seperate pgd and pmd's.
When a static mapping for 3MB is requested, only 2MB is mapped
and the remaining 1MB is unmapped. Fixing this here, by looping
in to map the entire unaligned address range.
Boot tested on OMAP5 evm with both LPAE enabled/disabled
and verified that static mappings with unaligned addresses
are properly mapped.
Signed-off-by: R Sricharan <redacted>
Reviewed-by: Santosh Shilimkar <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
[V2] Moved the loop to alloc_init_pte as per Russell's
feedback and changed the subject accordingly.
Using PMD_XXX instead of SECTION_XXX to avoid
different loop increments with/without LPAE.
arch/arm/mm/mmu.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Ping again.
The issue is reproducible in mainline with CMA + LPAE enabled.
CMA tries to reserve/map 16 MB with 2 level table entries and
crashes in alloc_init_pte.
This patch fixes that. Just posted a V3 of the same patch.
https://patchwork.kernel.org/patch/1472031/
I thought there was another patch where the looping was in an
alloc_init_pmd() function, or there are just two different threads. I
acked the other but not this one as I don't think looping over pmd
inside the alloc_init_pte() function is the right thing.
I submitted a patch last week for what I think is the same issue ("arm:
mm: Populate initial page tables across sections") but I don't think I
ever saw any feedback on the patch. Do we have three patches floating
around fixing the same issue?
Laura
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
From: Sricharan R <hidden> Date: 2013-03-15 06:58:51
Hi,
On Friday 15 March 2013 01:49 AM, Laura Abbott wrote:
On 3/13/2013 10:14 PM, Catalin Marinas wrote:
quoted
(sorry for if you got this message twice, gmail's new reply method
decided to send html)
On 18 September 2012 12:52, R, Sricharan [off-list ref] wrote:
quoted
Hi,
On Fri, Aug 17, 2012 at 4:32 PM, R, Sricharan [off-list ref] wrote:
quoted
Hi,
quoted
With LPAE, When either the start address or end address
or physical address to be mapped is unaligned,
alloc_init_section creates page granularity mappings.
alloc_init_section calls alloc_init_pte which populates
one pmd entry and sets up the ptes. But if the size is
greater than what can be mapped by one pmd entry,
then the rest remains unmapped.
The issue becomes visible when LPAE is enabled, where we have
the 3 levels with seperate pgd and pmd's.
When a static mapping for 3MB is requested, only 2MB is mapped
and the remaining 1MB is unmapped. Fixing this here, by looping
in to map the entire unaligned address range.
Boot tested on OMAP5 evm with both LPAE enabled/disabled
and verified that static mappings with unaligned addresses
are properly mapped.
Signed-off-by: R Sricharan <redacted>
Reviewed-by: Santosh Shilimkar <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
[V2] Moved the loop to alloc_init_pte as per Russell's
feedback and changed the subject accordingly.
Using PMD_XXX instead of SECTION_XXX to avoid
different loop increments with/without LPAE.
arch/arm/mm/mmu.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Ping again.
The issue is reproducible in mainline with CMA + LPAE enabled.
CMA tries to reserve/map 16 MB with 2 level table entries and
crashes in alloc_init_pte.
This patch fixes that. Just posted a V3 of the same patch.
https://patchwork.kernel.org/patch/1472031/
I thought there was another patch where the looping was in an
alloc_init_pmd() function, or there are just two different threads. I
acked the other but not this one as I don't think looping over pmd
inside the alloc_init_pte() function is the right thing.
I submitted a patch last week for what I think is the same issue ("arm: mm: Populate initial page tables across sections") but I don't think I ever saw any feedback on the patch. Do we have three patches floating around fixing the same issue?
Laura
your patch is looking like the intial version that i posted. So after some reviews,
finally ended up with the below patch [1]. Can you please check if your issue gets
fixed with this.
[1] http://permalink.gmane.org/gmane.linux.ports.arm.kernel/216880
Regards,
Sricharan
From: Laura Abbott <hidden> Date: 2013-03-15 14:50:27
On 3/14/2013 11:58 PM, Sricharan R wrote:
Hi,
On Friday 15 March 2013 01:49 AM, Laura Abbott wrote:
quoted
On 3/13/2013 10:14 PM, Catalin Marinas wrote:
quoted
(sorry for if you got this message twice, gmail's new reply method
decided to send html)
On 18 September 2012 12:52, R, Sricharan [off-list ref] wrote:
quoted
Hi,
On Fri, Aug 17, 2012 at 4:32 PM, R, Sricharan [off-list ref] wrote:
quoted
Hi,
quoted
With LPAE, When either the start address or end address
or physical address to be mapped is unaligned,
alloc_init_section creates page granularity mappings.
alloc_init_section calls alloc_init_pte which populates
one pmd entry and sets up the ptes. But if the size is
greater than what can be mapped by one pmd entry,
then the rest remains unmapped.
The issue becomes visible when LPAE is enabled, where we have
the 3 levels with seperate pgd and pmd's.
When a static mapping for 3MB is requested, only 2MB is mapped
and the remaining 1MB is unmapped. Fixing this here, by looping
in to map the entire unaligned address range.
Boot tested on OMAP5 evm with both LPAE enabled/disabled
and verified that static mappings with unaligned addresses
are properly mapped.
Signed-off-by: R Sricharan <redacted>
Reviewed-by: Santosh Shilimkar <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
[V2] Moved the loop to alloc_init_pte as per Russell's
feedback and changed the subject accordingly.
Using PMD_XXX instead of SECTION_XXX to avoid
different loop increments with/without LPAE.
arch/arm/mm/mmu.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Ping again.
The issue is reproducible in mainline with CMA + LPAE enabled.
CMA tries to reserve/map 16 MB with 2 level table entries and
crashes in alloc_init_pte.
This patch fixes that. Just posted a V3 of the same patch.
https://patchwork.kernel.org/patch/1472031/
I thought there was another patch where the looping was in an
alloc_init_pmd() function, or there are just two different threads. I
acked the other but not this one as I don't think looping over pmd
inside the alloc_init_pte() function is the right thing.
I submitted a patch last week for what I think is the same issue ("arm: mm: Populate initial page tables across sections") but I don't think I ever saw any feedback on the patch. Do we have three patches floating around fixing the same issue?
Laura
your patch is looking like the intial version that i posted. So after some reviews,
finally ended up with the below patch [1]. Can you please check if your issue gets
fixed with this.
[1] http://permalink.gmane.org/gmane.linux.ports.arm.kernel/216880
The patch does fix the problem for me as well. You are welcome to add
Tested-by Laura Abbott [off-list ref]
Laura
From: Sricharan R <hidden> Date: 2013-03-15 15:00:52
On Friday 15 March 2013 08:20 PM, Laura Abbott wrote:
On 3/14/2013 11:58 PM, Sricharan R wrote:
quoted
Hi,
On Friday 15 March 2013 01:49 AM, Laura Abbott wrote:
quoted
On 3/13/2013 10:14 PM, Catalin Marinas wrote:
quoted
(sorry for if you got this message twice, gmail's new reply method
decided to send html)
On 18 September 2012 12:52, R, Sricharan [off-list ref] wrote:
quoted
Hi,
On Fri, Aug 17, 2012 at 4:32 PM, R, Sricharan [off-list ref] wrote:
quoted
Hi,
quoted
With LPAE, When either the start address or end address
or physical address to be mapped is unaligned,
alloc_init_section creates page granularity mappings.
alloc_init_section calls alloc_init_pte which populates
one pmd entry and sets up the ptes. But if the size is
greater than what can be mapped by one pmd entry,
then the rest remains unmapped.
The issue becomes visible when LPAE is enabled, where we have
the 3 levels with seperate pgd and pmd's.
When a static mapping for 3MB is requested, only 2MB is mapped
and the remaining 1MB is unmapped. Fixing this here, by looping
in to map the entire unaligned address range.
Boot tested on OMAP5 evm with both LPAE enabled/disabled
and verified that static mappings with unaligned addresses
are properly mapped.
Signed-off-by: R Sricharan <redacted>
Reviewed-by: Santosh Shilimkar <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
[V2] Moved the loop to alloc_init_pte as per Russell's
feedback and changed the subject accordingly.
Using PMD_XXX instead of SECTION_XXX to avoid
different loop increments with/without LPAE.
arch/arm/mm/mmu.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Ping again.
The issue is reproducible in mainline with CMA + LPAE enabled.
CMA tries to reserve/map 16 MB with 2 level table entries and
crashes in alloc_init_pte.
This patch fixes that. Just posted a V3 of the same patch.
https://patchwork.kernel.org/patch/1472031/
I thought there was another patch where the looping was in an
alloc_init_pmd() function, or there are just two different threads. I
acked the other but not this one as I don't think looping over pmd
inside the alloc_init_pte() function is the right thing.
I submitted a patch last week for what I think is the same issue ("arm: mm: Populate initial page tables across sections") but I don't think I ever saw any feedback on the patch. Do we have three patches floating around fixing the same issue?
Laura
your patch is looking like the intial version that i posted. So after some reviews,
finally ended up with the below patch [1]. Can you please check if your issue gets
fixed with this.
[1] http://permalink.gmane.org/gmane.linux.ports.arm.kernel/216880
The patch does fix the problem for me as well. You are welcome to add
Tested-by Laura Abbott [off-list ref]
Thanks for testing and will add .
Regards,
Sricharan