Message ID | 1370657863-8725-1-git-send-email-wenyou.yang@atmel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 08/06/2013 04:17, Wenyou Yang : > Because MT_DEVICE is not executable in armv7, we change > the internal SRAM memory type to MT_MEMORY_NONCACHED. > As it seems that caching this internal SRAM memory is not necessary, > we chose the this memory type. > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> But Russell, can we have your advice on this as you made us re-think about that during previous patch discussion? Bye, > --- > arch/arm/mach-at91/setup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c > index a33d4b5..98d55ef 100644 > --- a/arch/arm/mach-at91/setup.c > +++ b/arch/arm/mach-at91/setup.c > @@ -84,7 +84,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length) > > desc->pfn = __phys_to_pfn(base); > desc->length = length; > - desc->type = MT_DEVICE; > + desc->type = MT_MEMORY_NONCACHED; > > pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n", > base, length, desc->virtual); >
On Thu, Jun 13, 2013 at 03:19:58PM +0200, Nicolas Ferre wrote: > On 08/06/2013 04:17, Wenyou Yang : >> Because MT_DEVICE is not executable in armv7, we change >> the internal SRAM memory type to MT_MEMORY_NONCACHED. >> As it seems that caching this internal SRAM memory is not necessary, >> we chose the this memory type. >> >> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> > > Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> > > But Russell, can we have your advice on this as you made us re-think > about that during previous patch discussion? I think this is fine - using MT_MEMORY_NONCACHED gets you a memory-like mapping instead of a strongly ordered or device mapping, but without caching issues, which is what you want here.
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index a33d4b5..98d55ef 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -84,7 +84,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length) desc->pfn = __phys_to_pfn(base); desc->length = length; - desc->type = MT_DEVICE; + desc->type = MT_MEMORY_NONCACHED; pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n", base, length, desc->virtual);
Because MT_DEVICE is not executable in armv7, we change the internal SRAM memory type to MT_MEMORY_NONCACHED. As it seems that caching this internal SRAM memory is not necessary, we chose the this memory type. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> --- arch/arm/mach-at91/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)