1. 25 Feb, 2014 3 commits
    • John Stultz's avatar
      staging: binder: Improve Kconfig entry for ANDROID_BINDER_IPC_32BIT · 1acec6a2
      John Stultz authored
      Add a more clear explanation of the option in the prompt, and
      make the config depend on ANDROID_BINDER_IPC being selected.
      
      Also sets the default to y, which matches AOSP.
      
      Cc: Colin Cross <ccross@android.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1acec6a2
    • Arve Hjønnevåg's avatar
      staging: binder: Support concurrent 32 bit and 64 bit processes. · da49889d
      Arve Hjønnevåg authored
      For 64bit systems we want to use the same binder interface for 32bit and
      64bit processes. Thus the size and the layout of the structures passed
      between the kernel and the userspace has to be the same for both 32 and
      64bit processes.
      
      This change replaces all the uses of void* and size_t with
      binder_uintptr_t and binder_size_t. These are then typedefed to specific
      sizes depending on the use of the interface, as follows:
             * __u32 - on legacy 32bit only userspace
             * __u64 - on mixed 32/64bit userspace where all processes use the same
      interface.
      
      This change also increments the BINDER_CURRENT_PROTOCOL_VERSION to 8 and
      hooks the compat_ioctl entry for the mixed 32/64bit Android userspace.
      
      This patch also provides a CONFIG_ANDROID_BINDER_IPC_32BIT option for
      compatability, which if set which enables the old protocol, setting
      BINDER_CURRENT_PROTOCOL_VERSION to 7, on 32 bit systems.
      
      Please note that all 64bit kernels will use the 64bit Binder ABI.
      
      Cc: Colin Cross <ccross@android.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
      [jstultz: Merged with upstream type changes. Various whitespace fixes
      and longer Kconfig description for checkpatch. Included improved commit
      message from Serban (with a few tweaks).]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      da49889d
    • Serban Constantinescu's avatar
      staging: binder: Fix ABI for 64bit Android · df24a2ea
      Serban Constantinescu authored
      BC_REQUEST_DEATH_NOTIFICATION and BC_CLEAR_DEATH_NOTIFICATION were
      defined with the wrong structure that did not match the code. Since a
      binder pointer and handle are the same size on 32 bit systems, this
      change does not affect them. The two commands claimed they were using
      struct binder_ptr_cookie but they are using a 32bit handle and a pointer.
      
      The main purpose of this patch is to add the binder_handle_cookie
      struct so the service manager does not have to define its own version
      (libbinder writes one field at a time so it does not use the struct).
      
      On 32bit systems the payload size is the same as the size of struct
      binder_ptr_cookie. On 64bit systems, the size does differ, and the
      ioctl number does change. However, there are no known 64bit users of
      this interface, and any 64bit systems will need the following patch to
      run 32 bit processes anyway, so it is not expected that anyone will
      ship a 64bit system without this change, so this change should not
      affect any existing systems.
      
      Cc: Colin Cross <ccross@android.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: default avatarSerban Constantinescu <serban.constantinescu@arm.com>
      [jstultz: Few 80+ col fixes for checkpatch, improved commit message
      with help from Serban, and included rational from Arve's email]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      df24a2ea
  2. 24 Feb, 2014 34 commits
  3. 23 Feb, 2014 3 commits