--- zzzz-none-000/linux-2.6.19.2/kernel/panic.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/kernel/panic.c 2008-04-10 12:21:44.000000000 +0000 @@ -19,6 +19,9 @@ #include #include #include +#ifdef CONFIG_TFFS_PANIC_LOG +#include +#endif /*--- #ifdef CONFIG_TFFS_PANIC_LOG ---*/ int panic_on_oops; int tainted; @@ -26,7 +29,7 @@ static int pause_on_oops_flag; static DEFINE_SPINLOCK(pause_on_oops_lock); -int panic_timeout; +int panic_timeout = 5; ATOMIC_NOTIFIER_HEAD(panic_notifier_list); @@ -66,6 +69,9 @@ unsigned long caller = (unsigned long) __builtin_return_address(0); #endif + restore_printk(); /*--- standard-printk ---*/ + dump_stack(); + /* * It's possible to come here directly from a panic-assertion and not * have preempt disabled. Some functions called from here want @@ -95,6 +101,23 @@ */ smp_send_stop(); #endif +#ifdef CONFIG_TFFS_PANIC_LOG + { + unsigned long printk_get_buffer(char **p_log_buf, unsigned long *p_log_end, unsigned long *p_anzahl); + char *buf; + unsigned long end; + unsigned long anzahl; + unsigned long len = printk_get_buffer(&buf, &end, &anzahl); + tffs_panic_log_open(); + if(anzahl < len) { /*--- alles im Buffer ---*/ + tffs_panic_log_write(buf, anzahl); + } else { + tffs_panic_log_write(buf + end, len - end); + tffs_panic_log_write(buf, end); + } + tffs_panic_log_close(); + } +#endif /*--- #ifdef CONFIG_TFFS_PANIC_LOG ---*/ atomic_notifier_call_chain(&panic_notifier_list, 0, buf);