From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mtd: nand: mxs: fix cache alignment for cache lines >32
Date: Wed, 03 Aug 2016 09:13:48 -0700 [thread overview]
Message-ID: <25dc4a8aeadcdc3698ce4f59b619dc01@agner.ch> (raw)
In-Reply-To: <CAOMZO5C8eSkDsT9eiU8eW4Lthsk+g+1evWh7EVWJw4x1gwuERw@mail.gmail.com>
On 2016-08-03 06:51, Fabio Estevam wrote:
> On Tue, Aug 2, 2016 at 3:55 AM, Stefan Agner <stefan@agner.ch> wrote:
>> From: Stefan Agner <stefan.agner@toradex.com>
>>
>> Currently the command buffer gets allocated with a size of 32 bytes.
>> This causes warning messages on systems with cache lines bigger than
>> 32 bytes:
>> CACHE: Misaligned operation at range [9df17a00, 9df17a20]
>>
>> Define command buffer to be at least 32 bytes, but more if cache
>> line is bigger.
>>
>> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
>> ---
>> This appeared after Simon enable the message in check_cache_range
>> by default...
>
> On mx6ul pico I also get similar warnings even though NAND is not used
> on this board:
>
> U-Boot 2016.09-rc1-00245-gad6a303 (Aug 03 2016 - 10:31:52 -0300)
>
> CPU: Freescale i.MX6UL rev1.0 at 396 MHz
> Reset cause: WDOG
> Board: PICO-IMX6UL-EMMC
> I2C: ready
> DRAM: 256 MiB
> CACHE: Misaligned operation at range [8fff0000, 8fff0004]
> CACHE: Misaligned operation at range [8fff0024, 8fff0028]
> PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
> MMC: FSL_SDHC: 0
> *** Warning - bad CRC, using default environment
>
> In: serial
> Out: serial
> Err: serial
> Net: FEC
> Hit any key to stop autoboot: 0
>
> Looks like we need a more generic fix?
As you noted, this particular case is due to cache flush of the page
table and should be fixed with:
arm: cache: always flush cache line size for page table
Afaik, there is no such thing as a generic fix for cache line alignment
issues... Every call site need to make sure to keep data cache line
aligned, especially in case a external device (DMA) are modifying the
same data...
--
Stefan
next prev parent reply other threads:[~2016-08-03 16:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 6:55 [U-Boot] [PATCH] mtd: nand: mxs: fix cache alignment for cache lines >32 Stefan Agner
2016-08-02 8:17 ` Stefano Babic
2016-08-03 7:57 ` Stefano Babic
2016-08-03 13:51 ` Fabio Estevam
2016-08-03 16:13 ` Stefan Agner [this message]
2016-08-03 17:39 ` Fabio Estevam
2016-08-03 18:09 ` Tom Rini
2016-08-03 18:29 ` Fabio Estevam
2016-08-03 18:35 ` Simon Glass
2016-08-03 18:44 ` Fabio Estevam
2016-08-03 19:08 ` Simon Glass
2016-08-03 19:43 ` Stefan Agner
2016-08-03 19:18 ` Stefan Agner
2016-08-03 20:05 ` Hannes Schmelzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25dc4a8aeadcdc3698ce4f59b619dc01@agner.ch \
--to=stefan@agner.ch \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox