All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH] powerpc: reduce number of WATCHDOG_RESET calls from flush_cache
Date: Wed, 23 Sep 2020 14:48:18 +0200	[thread overview]
Message-ID: <3933429.1600865298@gemini.denx.de> (raw)
In-Reply-To: <afea5640-9d95-bf92-316a-0d674a5129ce@prevas.dk>

Dear Rasmus,

In message <afea5640-9d95-bf92-316a-0d674a5129ce@prevas.dk> you wrote:
> On 04/06/2020 12.31, Stefan Roese wrote:
> > On 04.06.20 11:30, Rasmus Villemoes wrote:
> >> Calling WATCHDOG_RESET for each and every cache line is overkill.
> >>
> >> In our case, the kernel image is a little over 7MB, and the almost
> >> 500000 calls of WATCHDOG_RESET() adds about one second to the
> >> boottime.
> >>
> >> I very highly doubt there's any real hardware where flushing 64K
> >> from cache to memory takes more than a few milliseconds, so this
> >> should be completely safe. Since it reduces the number of

Maybe it is, maybe it is not.  I remember boards where the watchdog
trigger had to happen in pretty tight intervals, something like min
20, max 60 milliseconds.

> >> +??????? if ((addr & (SZ_64K - 1)) == 0)

In any case, please write readable code.  The use of SZ_ here is not
a good idea.  Also, you might want to make the actual parameter
configurable, so boards with specific timing requirements can adjust
this as needed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Perfection is reached, not when there is no longer anything  to  add,
but when there is no longer anything to take away.
                                           - Antoine de Saint-Exupery

  parent reply	other threads:[~2020-09-23 12:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  9:30 [PATCH] powerpc: reduce number of WATCHDOG_RESET calls from flush_cache Rasmus Villemoes
2020-06-04 10:31 ` Stefan Roese
2020-09-18  8:20   ` Rasmus Villemoes
2020-09-18 14:50     ` Tom Rini
2020-09-23 12:48     ` Wolfgang Denk [this message]
2020-09-24 12:32       ` Tom Rini
2020-09-23 13:28     ` Priyanka Jain
2020-09-24 10:57       ` Wolfgang Denk
2020-09-24 12:32         ` Tom Rini

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=3933429.1600865298@gemini.denx.de \
    --to=wd@denx.de \
    --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.