Commit 7bea96fd authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] uml pt_regs fixes

Real fix for UML pt_regs stuff.  Note set_irq_regs() logics in there...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e24bb60e
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#define LINE_BUFSIZE 4096 #define LINE_BUFSIZE 4096
static irqreturn_t line_interrupt(int irq, void *data, struct pt_regs *unused) static irqreturn_t line_interrupt(int irq, void *data)
{ {
struct chan *chan = data; struct chan *chan = data;
struct line *line = chan->line; struct line *line = chan->line;
...@@ -364,8 +364,7 @@ void line_unthrottle(struct tty_struct *tty) ...@@ -364,8 +364,7 @@ void line_unthrottle(struct tty_struct *tty)
reactivate_chan(&line->chan_list, line->driver->read_irq); reactivate_chan(&line->chan_list, line->driver->read_irq);
} }
static irqreturn_t line_write_interrupt(int irq, void *data, static irqreturn_t line_write_interrupt(int irq, void *data)
struct pt_regs *unused)
{ {
struct chan *chan = data; struct chan *chan = data;
struct line *line = chan->line; struct line *line = chan->line;
...@@ -712,7 +711,7 @@ struct winch { ...@@ -712,7 +711,7 @@ struct winch {
struct tty_struct *tty; struct tty_struct *tty;
}; };
static irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused) static irqreturn_t winch_interrupt(int irq, void *data)
{ {
struct winch *winch = data; struct winch *winch = data;
struct tty_struct *tty; struct tty_struct *tty;
......
...@@ -74,8 +74,7 @@ static void mc_work_proc(void *unused) ...@@ -74,8 +74,7 @@ static void mc_work_proc(void *unused)
static DECLARE_WORK(mconsole_work, mc_work_proc, NULL); static DECLARE_WORK(mconsole_work, mc_work_proc, NULL);
static irqreturn_t mconsole_interrupt(int irq, void *dev_id, static irqreturn_t mconsole_interrupt(int irq, void *dev_id)
struct pt_regs *regs)
{ {
/* long to avoid size mismatch warnings from gcc */ /* long to avoid size mismatch warnings from gcc */
long fd; long fd;
...@@ -674,8 +673,9 @@ static void with_console(struct mc_request *req, void (*proc)(void *), ...@@ -674,8 +673,9 @@ static void with_console(struct mc_request *req, void (*proc)(void *),
static void sysrq_proc(void *arg) static void sysrq_proc(void *arg)
{ {
char *op = arg; char *op = arg;
struct pt_regs *old_regs = set_irq_regs(&current->thread.regs);
handle_sysrq(*op, &current->thread.regs, NULL); handle_sysrq(*op, NULL);
set_irq_regs(old_regs);
} }
void mconsole_sysrq(struct mc_request *req) void mconsole_sysrq(struct mc_request *req)
......
...@@ -77,7 +77,7 @@ static void uml_dev_close(void* dev) ...@@ -77,7 +77,7 @@ static void uml_dev_close(void* dev)
dev_close( (struct net_device *) dev); dev_close( (struct net_device *) dev);
} }
irqreturn_t uml_net_interrupt(int irq, void *dev_id, struct pt_regs *regs) irqreturn_t uml_net_interrupt(int irq, void *dev_id)
{ {
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
struct uml_net_private *lp = dev->priv; struct uml_net_private *lp = dev->priv;
......
...@@ -47,7 +47,7 @@ struct connection { ...@@ -47,7 +47,7 @@ struct connection {
struct port_list *port; struct port_list *port;
}; };
static irqreturn_t pipe_interrupt(int irq, void *data, struct pt_regs *regs) static irqreturn_t pipe_interrupt(int irq, void *data)
{ {
struct connection *conn = data; struct connection *conn = data;
int fd; int fd;
...@@ -152,7 +152,7 @@ void port_work_proc(void *unused) ...@@ -152,7 +152,7 @@ void port_work_proc(void *unused)
DECLARE_WORK(port_work, port_work_proc, NULL); DECLARE_WORK(port_work, port_work_proc, NULL);
static irqreturn_t port_interrupt(int irq, void *data, struct pt_regs *regs) static irqreturn_t port_interrupt(int irq, void *data)
{ {
struct port_list *port = data; struct port_list *port = data;
......
...@@ -524,7 +524,7 @@ static void ubd_handler(void) ...@@ -524,7 +524,7 @@ static void ubd_handler(void)
do_ubd_request(ubd_queue); do_ubd_request(ubd_queue);
} }
static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused) static irqreturn_t ubd_intr(int irq, void *dev)
{ {
ubd_handler(); ubd_handler();
return(IRQ_HANDLED); return(IRQ_HANDLED);
......
...@@ -21,7 +21,7 @@ struct xterm_wait { ...@@ -21,7 +21,7 @@ struct xterm_wait {
int new_fd; int new_fd;
}; };
static irqreturn_t xterm_interrupt(int irq, void *data, struct pt_regs *regs) static irqreturn_t xterm_interrupt(int irq, void *data)
{ {
struct xterm_wait *xterm = data; struct xterm_wait *xterm = data;
int fd; int fd;
......
...@@ -10,12 +10,11 @@ ...@@ -10,12 +10,11 @@
#include "asm/ptrace.h" #include "asm/ptrace.h"
extern int um_request_irq(unsigned int irq, int fd, int type, extern int um_request_irq(unsigned int irq, int fd, int type,
irqreturn_t (*handler)(int, void *, irqreturn_t (*handler)(int, void *),
struct pt_regs *),
unsigned long irqflags, const char * devname, unsigned long irqflags, const char * devname,
void *dev_id); void *dev_id);
extern int init_aio_irq(int irq, char *name, extern int init_aio_irq(int irq, char *name,
irqreturn_t (*handler)(int, void *, struct pt_regs *)); irqreturn_t (*handler)(int, void *));
#endif #endif
......
...@@ -355,14 +355,16 @@ void forward_interrupts(int pid) ...@@ -355,14 +355,16 @@ void forward_interrupts(int pid)
*/ */
unsigned int do_IRQ(int irq, union uml_pt_regs *regs) unsigned int do_IRQ(int irq, union uml_pt_regs *regs)
{ {
struct pt_regs *old_regs = set_irq_regs((struct pt_regs *)regs);
irq_enter(); irq_enter();
__do_IRQ(irq); __do_IRQ(irq);
irq_exit(); irq_exit();
set_irq_regs(old_regs);
return 1; return 1;
} }
int um_request_irq(unsigned int irq, int fd, int type, int um_request_irq(unsigned int irq, int fd, int type,
irqreturn_t (*handler)(int, void *, struct pt_regs *), irqreturn_t (*handler)(int, void *),
unsigned long irqflags, const char * devname, unsigned long irqflags, const char * devname,
void *dev_id) void *dev_id)
{ {
...@@ -423,8 +425,7 @@ void __init init_IRQ(void) ...@@ -423,8 +425,7 @@ void __init init_IRQ(void)
} }
} }
int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *, int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *))
struct pt_regs *))
{ {
int fds[2], err; int fds[2], err;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
/* Protected by sigio_lock() called from write_sigio_workaround */ /* Protected by sigio_lock() called from write_sigio_workaround */
static int sigio_irq_fd = -1; static int sigio_irq_fd = -1;
static irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused) static irqreturn_t sigio_interrupt(int irq, void *data)
{ {
char c; char c;
......
...@@ -86,7 +86,7 @@ static inline unsigned long long get_time(void) ...@@ -86,7 +86,7 @@ static inline unsigned long long get_time(void)
return nsecs; return nsecs;
} }
irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs) irqreturn_t um_timer(int irq, void *dev)
{ {
unsigned long long nsecs; unsigned long long nsecs;
unsigned long flags; unsigned long flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment