aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-09-03 18:57:45 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:06:23 -0400
commit75e5584c89d213d6089f64f22cd899fb172e4c95 (patch)
tree22bb81b9c699e06b3c8163933654fe3f84ae469d /arch/um/kernel
parent30f7dabb083f8ff4ce541b5ac4e5d70cc173051a (diff)
[PATCH] uml: use host AIO support
This patch makes UML use host AIO support when it (and /usr/include/linux/aio_abi.h) are present. This is only the support, with no consumers - a consumer is coming in the next patch. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/irq.c41
1 files changed, 30 insertions, 11 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 9f18061ef4c9..dcd814971995 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -31,7 +31,7 @@
31#include "kern_util.h" 31#include "kern_util.h"
32#include "irq_user.h" 32#include "irq_user.h"
33#include "irq_kern.h" 33#include "irq_kern.h"
34 34#include "os.h"
35 35
36/* 36/*
37 * Generic, controller-independent functions: 37 * Generic, controller-independent functions:
@@ -168,13 +168,32 @@ void __init init_IRQ(void)
168 } 168 }
169} 169}
170 170
171/* 171int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *,
172 * Overrides for Emacs so that we follow Linus's tabbing style. 172 struct pt_regs *))
173 * Emacs will notice this stuff at the end of the file and automatically 173{
174 * adjust the settings for this buffer only. This must remain at the end 174 int fds[2], err;
175 * of the file. 175
176 * --------------------------------------------------------------------------- 176 err = os_pipe(fds, 1, 1);
177 * Local variables: 177 if(err){
178 * c-file-style: "linux" 178 printk("init_aio_irq - os_pipe failed, err = %d\n", -err);
179 * End: 179 goto out;
180 */ 180 }
181
182 err = um_request_irq(irq, fds[0], IRQ_READ, handler,
183 SA_INTERRUPT | SA_SAMPLE_RANDOM, name,
184 (void *) (long) fds[0]);
185 if(err){
186 printk("init_aio_irq - : um_request_irq failed, err = %d\n",
187 err);
188 goto out_close;
189 }
190
191 err = fds[1];
192 goto out;
193
194 out_close:
195 os_close_file(fds[0]);
196 os_close_file(fds[1]);
197 out:
198 return(err);
199}