[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: init 6 ?, RE: watchdog



> > That doesn't seem to work for me. I removed the RTC support, but the
> > watchdog still doesn't restart the system.
> > 
> > I've included my kernelconfig.latest.
> > 
> 
> I used your kernelconfig and, as you said, the watchdog 
> didn't reset the board. I turned on the RTC again and then it 
> worked. Hmm, it must be something else then.
> 

Hi,
I found the bug. A function address was used as a variable value in os/linux/arch/cris/kernel/time.c. Change the file like this:

--------------------------------------------------------------------

@@ -231,14 +231,12 @@
 
 #define WATCHDOG_MIN_FREE_PAGES 8
 
-extern int nr_free_pages;
-
 static inline void
 reset_watchdog(void)
 {
 #if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM)
        /* only keep watchdog happy as long as we have memory left! */
-       if(nr_free_pages > WATCHDOG_MIN_FREE_PAGES) {
+       if(nr_free_pages() > WATCHDOG_MIN_FREE_PAGES) {
                /* reset the watchdog with the inverse of the old key */
                watchdog_key ^= 0x7; /* invert key, which is 3 bits */
                *R_WATCHDOG = IO_FIELD(R_WATCHDOG, key, watchdog_key) |

--------------------------------------------------------------------------

and recompile the kernel. Then the watchdog will work. This will of course be fixed in the next release.

Best regard
/Jonas