summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/binder.h
diff options
context:
space:
mode:
authorSerban Constantinescu <serban.constantinescu@arm.com>2013-07-04 10:54:48 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 14:37:22 -0700
commit64dcfe6b84d4104d93e4baf2b5a0b3e7f2e4cc30 (patch)
tree93dfb8641bc423ee1e602d805dfdb42e0cb05bf3 /drivers/staging/android/binder.h
parenteecddef594f9eb159040160b929642f16a07387f (diff)
downloadop-kernel-dev-64dcfe6b84d4104d93e4baf2b5a0b3e7f2e4cc30.zip
op-kernel-dev-64dcfe6b84d4104d93e4baf2b5a0b3e7f2e4cc30.tar.gz
staging: android: binder: fix binder interface for 64bit compat layer
The changes in this patch will fix the binder interface for use on 64bit machines and stand as the base of the 64bit compat support. The changes apply to the structures that are passed between the kernel and userspace. Most of the changes applied mirror the change to struct binder_version where there is no need for a 64bit wide protocol_version(on 64bit machines). The change inlines with the existing 32bit userspace(the structure has the same size) and simplifies the compat layer such that the same handler can service the BINDER_VERSION ioctl. Other changes make use of kernel types as well as user-exportable ones and fix format specifier issues. The changes do not affect existing 32bit ABI. Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com> Acked-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/binder.h')
-rw-r--r--drivers/staging/android/binder.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/android/binder.h b/drivers/staging/android/binder.h
index dadfce0..cbe3451 100644
--- a/drivers/staging/android/binder.h
+++ b/drivers/staging/android/binder.h
@@ -48,13 +48,13 @@ enum {
*/
struct flat_binder_object {
/* 8 bytes for large_flat_header. */
- unsigned long type;
- unsigned long flags;
+ __u32 type;
+ __u32 flags;
/* 8 bytes of data. */
union {
void __user *binder; /* local object */
- signed long handle; /* remote object */
+ __u32 handle; /* remote object */
};
/* extra data associated with local object */
@@ -78,7 +78,7 @@ struct binder_write_read {
/* Use with BINDER_VERSION, driver fills in fields. */
struct binder_version {
/* driver protocol version -- increment with incompatible change */
- signed long protocol_version;
+ __s32 protocol_version;
};
/* This is the current protocol version. */
@@ -119,7 +119,7 @@ struct binder_transaction_data {
* identifying the target and contents of the transaction.
*/
union {
- size_t handle; /* target descriptor of command transaction */
+ __u32 handle; /* target descriptor of command transaction */
void *ptr; /* target descriptor of return transaction */
} target;
void *cookie; /* target object cookie */
@@ -154,7 +154,7 @@ struct binder_ptr_cookie {
struct binder_pri_desc {
__s32 priority;
- __s32 desc;
+ __u32 desc;
};
struct binder_pri_ptr_cookie {
OpenPOWER on IntegriCloud