Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753397Ab3EXLXb (ORCPT ); Fri, 24 May 2013 07:23:31 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:56780 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933Ab3EXLXa (ORCPT ); Fri, 24 May 2013 07:23:30 -0400 Date: Fri, 24 May 2013 12:20:29 +0100 From: Russell King - ARM Linux To: "Yang, Wenyou" Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "plagnioj@jcrosoft.com" , "Ferre, Nicolas" , "linux@maxim.org.za" Subject: Re: [PATCH] ARM: at91: Fix: Change internal SRAM memory type to "MT_MEMORY_SO" Message-ID: <20130524112029.GW18614@n2100.arm.linux.org.uk> References: <1369011911-21282-1-git-send-email-wenyou.yang@atmel.com> <1369011979-21354-1-git-send-email-wenyou.yang@atmel.com> <20130522001457.GA18614@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 740 Lines: 16 On Fri, May 24, 2013 at 07:11:04AM +0000, Yang, Wenyou wrote: > The story is: for sama5d3x with Cortex-A5 core, if not so, when copying > code snippet to the internal SRAM, then jump to run this code, but fail > to run. And that is where your mistake is - you forgot that you're working with a CPU with harvard caches which will require some cache maintanence between copying the code and executing it. You want to look at flush_icache_range() rather than making this memory strongly ordered. -- 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/