
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