From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 24 Sep 2020 08:32:16 -0400 Subject: [PATCH] powerpc: reduce number of WATCHDOG_RESET calls from flush_cache In-Reply-To: <3933429.1600865298@gemini.denx.de> References: <20200604093039.26781-1-rasmus.villemoes@prevas.dk> <47d06069-e8d6-5351-cd90-4ba53c458719@denx.de> <3933429.1600865298@gemini.denx.de> Message-ID: <20200924123216.GD14816@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Sep 23, 2020 at 02:48:18PM +0200, Wolfgang Denk wrote: > Dear Rasmus, > > In message 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. We should add a comment somewhere here to match the commit message, but since we're flushing on 64K chunks, SZ_64K makes sense. If we make it build-time configurable then it's not a concern. I assume we don't want to make this run time configurable. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: