[PATCH] um: setup irq regs in do_IRQ

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

 



From: Pekka Enberg <[email protected]>

We need to setup and restore IRQ registers in __do_IRQ so that get_irq_regs
works correctly.  Fixes Alt-Sysrq-p for UML.

Cc: Jeff Dike <[email protected]>
Cc: Paolo "Blaisorblade" Giarrusso <[email protected]>
Signed-Off-By: David Howells <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
---

 arch/um/kernel/irq.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Index: 2.6/arch/um/kernel/irq.c
===================================================================
--- 2.6.orig/arch/um/kernel/irq.c
+++ 2.6/arch/um/kernel/irq.c
@@ -355,10 +355,14 @@ void forward_interrupts(int pid)
  */
 unsigned int do_IRQ(int irq, union uml_pt_regs *regs)
 {
-       irq_enter();
-       __do_IRQ(irq);
-       irq_exit();
-       return 1;
+	struct pt_regs *old_regs;
+
+	old_regs = set_irq_regs((struct pt_regs *) regs);
+	irq_enter();
+	__do_IRQ(irq);
+	irq_exit();
+	set_irq_regs(old_regs);
+	return 1;
 }
 
 int um_request_irq(unsigned int irq, int fd, int type,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux