All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mtd: nand: mxs: fix cache alignment for cache lines >32
Date: Wed, 3 Aug 2016 12:35:28 -0600	[thread overview]
Message-ID: <CAPnjgZ2CvuMrDvdDt+8pt1wwOGu7zEqruzyf6mYa2e0=bVVX4A@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5CQ1sco-tag=NUqgxKo8Y1LtF=Dt-hmpEQfeNYQUmAdKg@mail.gmail.com>

Hi,

On 3 August 2016 at 12:29, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Tom,
>
> On Wed, Aug 3, 2016 at 3:09 PM, Tom Rini <trini@konsulko.com> wrote:
>
>> I feel like we must have done something wrong of late, can you bisect
>> when these came in?  Thanks!
>
> This cache warnings start to appear since commit:
>
> commit bcc53bf095893fbdae531a9a7b5d4ef4a125a7fc
> Author: Simon Glass <sjg@chromium.org>
> Date:   Sun Jun 19 19:43:05 2016 -0600
>
>     arm: Show cache warnings in U-Boot proper only
>
>     Avoid bloating the SPL image size.
>
>     Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Prior to this commit the cache warnings would be printed only with
> DEBUG enabled. Now they are always enabled when we build a non-spl
> target.
>
> We could restore the original behavior and also keep Simon's intention
> of not bloating the SPL image size with the following change:
>
> --- a/arch/arm/lib/cache.c
> +++ b/arch/arm/lib/cache.c
> @@ -60,10 +60,11 @@ int check_cache_range(unsigned long start, unsigned long sto
>         if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
>                 ok = 0;
>
> -       if (!ok) {
> -               warn_non_spl("CACHE: Misaligned operation at range [%08lx, %08lx
> -                            start, stop);
> -       }
> +#ifndef CONFIG_SPL_BUILD
> +       if (!ok)
> +               debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
> +                     start, stop);
> +#endif
>
>         return ok;
>  }
>
> If this looks OK, I can submit a formal patch.

Actually I think these are bugs and should be fixed. In this case,
from what I can tell netboot_common() should cache-align the size in
the call to:

/* flush cache */
flush_cache(load_addr, size);

Regards,
Simon

  reply	other threads:[~2016-08-03 18:35 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
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 [this message]
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='CAPnjgZ2CvuMrDvdDt+8pt1wwOGu7zEqruzyf6mYa2e0=bVVX4A@mail.gmail.com' \
    --to=sjg@chromium.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.