--- zzzz-none-000/linux-2.6.19.2/arch/um/drivers/mconsole_kern.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/arch/um/drivers/mconsole_kern.c 2007-01-11 07:38:19.000000000 +0000 @@ -79,7 +79,7 @@ /* long to avoid size mismatch warnings from gcc */ long fd; struct mconsole_entry *new; - static struct mc_request req; /* that's OK */ + struct mc_request req; fd = (long) dev_id; while (mconsole_get_request(fd, &req)){ @@ -91,7 +91,6 @@ mconsole_reply(&req, "Out of memory", 1, 0); else { new->request = req; - new->request.regs = get_irq_regs()->regs; list_add(&new->list, &mc_requests); } } @@ -315,21 +314,9 @@ { deactivate_fd(req->originating_fd, MCONSOLE_IRQ); os_set_fd_block(req->originating_fd, 1); - mconsole_reply(req, "stopped", 0, 0); - while (mconsole_get_request(req->originating_fd, req)) { - if (req->cmd->handler == mconsole_go) - break; - if (req->cmd->handler == mconsole_stop) { - mconsole_reply(req, "Already stopped", 1, 0); - continue; - } - if (req->cmd->handler == mconsole_sysrq) { - struct pt_regs *old_regs; - old_regs = set_irq_regs((struct pt_regs *)&req->regs); - mconsole_sysrq(req); - set_irq_regs(old_regs); - continue; - } + mconsole_reply(req, "", 0, 0); + while(mconsole_get_request(req->originating_fd, req)){ + if(req->cmd->handler == mconsole_go) break; (*req->cmd->handler)(req); } os_set_fd_block(req->originating_fd, 0); @@ -686,7 +673,9 @@ static void sysrq_proc(void *arg) { char *op = arg; + struct pt_regs *old_regs = set_irq_regs(¤t->thread.regs); handle_sysrq(*op, NULL); + set_irq_regs(old_regs); } void mconsole_sysrq(struct mc_request *req)