summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-05-25 01:08:12 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-05-25 01:08:12 -0700
commitd69b7c27f2d90cfcdb1a654b27fbf6cc1085ee4e (patch)
tree64786a9aedbc962f5eb5a57b4415272a62535f98
parent2b748116a7c9d390fd8482fe9fe6d371262f4f28 (diff)
[PATCH] ppc64: Fix some PPC64 compile warnings
Fix some warnings in the ppc64 build. Also declare a couple of AIO functions in aio.h rather than aio.c They are needed for 32-bit emulation support.
-rw-r--r--arch/ppc64/kernel/sys_ppc32.c5
-rw-r--r--include/linux/aio.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c
index 64cc96968e28..66077d35a9b9 100644
--- a/arch/ppc64/kernel/sys_ppc32.c
+++ b/arch/ppc64/kernel/sys_ppc32.c
@@ -32,6 +32,7 @@
#include <linux/shm.h>
#include <linux/slab.h>
#include <linux/uio.h>
+#include <linux/aio.h>
#include <linux/nfs_fs.h>
#include <linux/smb_fs.h>
#include <linux/smb_mount.h>
@@ -2717,7 +2718,7 @@ long sys32_io_submit(aio_context_t ctx_id, u32 number, u32 *iocbpp)
struct iocb tmp;
u32 *user_iocb;
- if (unlikely(__get_user(user_iocb, iocbpp + i))) {
+ if (unlikely(__get_user((u32)(long)user_iocb, iocbpp + i))) {
ret = -EFAULT;
break;
}
@@ -2727,7 +2728,7 @@ long sys32_io_submit(aio_context_t ctx_id, u32 number, u32 *iocbpp)
break;
}
- ret = io_submit_one(ctx, user_iocb, &tmp);
+ ret = io_submit_one(ctx, (struct iocb *)user_iocb, &tmp);
if (ret)
break;
}
diff --git a/include/linux/aio.h b/include/linux/aio.h
index a00ad7b7bf92..adbf5ea8bbe9 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -147,6 +147,9 @@ extern int FASTCALL(aio_complete(struct kiocb *iocb, long res, long res2));
extern void FASTCALL(__put_ioctx(struct kioctx *ctx));
struct mm_struct;
extern void FASTCALL(exit_aio(struct mm_struct *mm));
+extern struct kioctx *lookup_ioctx(unsigned long ctx_id);
+extern int FASTCALL(io_submit_one(struct kioctx *ctx,
+ struct iocb *user_iocb, struct iocb *iocb));
/* semi private, but used by the 32bit emulations: */
struct kioctx *lookup_ioctx(unsigned long ctx_id);