* [PATCH] ARM: LPAE: fix access flag setup in mem_type_table
@ 2012-05-14 17:54 Vitaly Andrianov
2012-05-15 12:22 ` Russell King - ARM Linux
0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Andrianov @ 2012-05-14 17:54 UTC (permalink / raw)
To: linux-arm-kernel
A zero value for prot_sect in the memory types table implies that
section mappings should never be created for the memory type in question.
This is checked for in alloc_init_section().
With LPAE, we set a bit to mask access flag faults for kernel mappings.
This breaks the aforementioned (!prot_sect) check in alloc_init_section().
This patch fixes this bug by first checking for a non-zero
prot_sect before setting the PMD_SECT_AF flag.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
---
arch/arm/mm/mmu.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index b9fbec2..1e16b20 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -494,7 +494,8 @@ static void __init build_mem_type_table(void)
*/
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
mem_types[i].prot_pte |= PTE_EXT_AF;
- mem_types[i].prot_sect |= PMD_SECT_AF;
+ if (mem_types[i].prot_sect)
+ mem_types[i].prot_sect |= PMD_SECT_AF;
}
kern_pgprot |= PTE_EXT_AF;
vecs_pgprot |= PTE_EXT_AF;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] ARM: LPAE: fix access flag setup in mem_type_table
2012-05-14 17:54 [PATCH] ARM: LPAE: fix access flag setup in mem_type_table Vitaly Andrianov
@ 2012-05-15 12:22 ` Russell King - ARM Linux
2012-05-15 20:51 ` [Linaro-mm-sig] " Marek Szyprowski
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2012-05-15 12:22 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 14, 2012 at 01:54:57PM -0400, Vitaly Andrianov wrote:
> A zero value for prot_sect in the memory types table implies that
> section mappings should never be created for the memory type in question.
> This is checked for in alloc_init_section().
>
> With LPAE, we set a bit to mask access flag faults for kernel mappings.
> This breaks the aforementioned (!prot_sect) check in alloc_init_section().
>
> This patch fixes this bug by first checking for a non-zero
> prot_sect before setting the PMD_SECT_AF flag.
>
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Please put this in the patch system. No blank line is needed between
s-off-by and acked-by.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Linaro-mm-sig] [PATCH] ARM: LPAE: fix access flag setup in mem_type_table
2012-05-15 12:22 ` Russell King - ARM Linux
@ 2012-05-15 20:51 ` Marek Szyprowski
0 siblings, 0 replies; 3+ messages in thread
From: Marek Szyprowski @ 2012-05-15 20:51 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On 5/15/2012 2:22 PM, Russell King - ARM Linux wrote:
> On Mon, May 14, 2012 at 01:54:57PM -0400, Vitaly Andrianov wrote:
>> A zero value for prot_sect in the memory types table implies that
>> section mappings should never be created for the memory type in question.
>> This is checked for in alloc_init_section().
>>
>> With LPAE, we set a bit to mask access flag faults for kernel mappings.
>> This breaks the aforementioned (!prot_sect) check in alloc_init_section().
>>
>> This patch fixes this bug by first checking for a non-zero
>> prot_sect before setting the PMD_SECT_AF flag.
>>
>> Signed-off-by: Vitaly Andrianov<vitalya@ti.com>
>>
>> Acked-by: Catalin Marinas<catalin.marinas@arm.com>
>
> Please put this in the patch system. No blank line is needed between
> s-off-by and acked-by.
This patch fixes the issue introduced by adding CMA to ARM architecture
which I've pushed for testing to linux-next. I've added it to my
for-next-cma branch:
http://git.linaro.org/gitweb?p=people/mszyprowski/linux-dma-mapping.git;a=shortlog;h=refs/heads/for-next-cma
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-15 20:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 17:54 [PATCH] ARM: LPAE: fix access flag setup in mem_type_table Vitaly Andrianov
2012-05-15 12:22 ` Russell King - ARM Linux
2012-05-15 20:51 ` [Linaro-mm-sig] " Marek Szyprowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).