#include <linux/a.out.h>
#include <linux/interrupt.h>
#include <linux/config.h>
-#include <linux/utsname.h>
+#include <linux/version.h>
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/init.h>
int hlt_counter;
-unsigned long boot_option_idle_override = 0;
-EXPORT_SYMBOL(boot_option_idle_override);
-
/*
* Return saved PC of a blocked thread.
*/
safe_halt();
else
local_irq_enable();
- } else {
- cpu_relax();
}
}
pm_idle = default_idle;
}
- boot_option_idle_override = 1;
return 1;
}
__setup("idle=", idle_setup);
+void stack_overflow(void)
+{
+ unsigned long esp = current_stack_pointer();
+ int panicing = ((esp&(THREAD_SIZE-1)) <= STACK_PANIC);
+
+ oops_in_progress = 1;
+ printk( "esp: 0x%lx masked: 0x%lx STACK_PANIC:0x%lx %d %d\n",
+ esp, (esp&(THREAD_SIZE-1)), STACK_PANIC,
+ (((esp&(THREAD_SIZE-1)) <= STACK_PANIC)), panicing);
+ show_trace(current,(void*)esp);
+
+ if (panicing)
+ panic("stack overflow\n");
+
+ oops_in_progress = 0;
+
+ /* Just let it happen once per task, as otherwise it goes nuts
+ * in printing stack traces. This means that I need to dump
+ * the stack_overflowed boolean into the task or thread_info
+ * structure. For now just turn it off all together.
+ */
+
+ /* stack_overflowed = 0; */
+}
+
void show_regs(struct pt_regs * regs)
{
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
if (regs->xcs & 3)
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
- printk(" EFLAGS: %08lx %s (%s)\n",
- regs->eflags, print_tainted(), system_utsname.release);
+ printk(" EFLAGS: %08lx %s (%s)\n",regs->eflags, print_tainted(),UTS_RELEASE);
printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
regs->eax,regs->ebx,regs->ecx,regs->edx);
printk("ESI: %08lx EDI: %08lx EBP: %08lx",
show_trace(NULL, ®s->esp);
}
-EXPORT_SYMBOL_GPL(show_regs);
-
/*
* This gets run with %ebx containing the
* function to call, and %edx containing
}
}
- release_vm86_irqs(dead_task);
+ release_x86_irqs(dead_task);
}
/*
*childregs = *regs;
childregs->eax = 0;
childregs->esp = esp;
+ p->set_child_tid = p->clear_child_tid = NULL;
p->thread.esp = (unsigned long) childregs;
p->thread.esp0 = (unsigned long) (childregs+1);
(char __user * __user *) regs.edx,
®s);
if (error == 0) {
- task_lock(current);
current->ptrace &= ~PT_DTRACE;
- task_unlock(current);
/* Make sure we don't return using sysenter.. */
set_thread_flag(TIF_IRET);
}