Merge "Merge android11-5.4.86+ (884688f
) into msm-5.4"
This commit is contained in:
commit
943946435c
@ -7315,6 +7315,12 @@ F: drivers/hid/
|
||||
F: include/linux/hid*
|
||||
F: include/uapi/linux/hid*
|
||||
|
||||
HID PLAYSTATION DRIVER
|
||||
M: Roderick Colenbrander <roderick.colenbrander@sony.com>
|
||||
L: linux-input@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/hid/hid-playstation.c
|
||||
|
||||
HID SENSOR HUB DRIVERS
|
||||
M: Jiri Kosina <jikos@kernel.org>
|
||||
M: Jonathan Cameron <jic23@kernel.org>
|
||||
|
@ -1 +1 @@
|
||||
LTS_5.4.86_75c93eb4397b
|
||||
LTS_5.4.86_884688fe0cd4
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@
|
||||
complete
|
||||
__const_udelay
|
||||
consume_skb
|
||||
_copy_from_iter_full
|
||||
cpu_hwcap_keys
|
||||
cpu_hwcaps
|
||||
cpu_number
|
||||
@ -63,7 +64,6 @@
|
||||
kfree_skb
|
||||
__kmalloc
|
||||
kmalloc_caches
|
||||
kmalloc_order_trace
|
||||
kmem_cache_alloc
|
||||
kmem_cache_alloc_trace
|
||||
kmem_cache_create
|
||||
@ -159,6 +159,7 @@
|
||||
sg_init_one
|
||||
sg_init_table
|
||||
skb_clone
|
||||
skb_dequeue
|
||||
skb_put
|
||||
sk_free
|
||||
snd_device_new
|
||||
@ -261,6 +262,19 @@
|
||||
serdev_device_write
|
||||
serdev_device_write_wakeup
|
||||
|
||||
# required by hci_vhci.ko
|
||||
bt_err
|
||||
hci_alloc_dev
|
||||
hci_free_dev
|
||||
hci_recv_frame
|
||||
hci_register_dev
|
||||
hci_unregister_dev
|
||||
skb_pull
|
||||
skb_push
|
||||
skb_queue_head
|
||||
skb_queue_purge
|
||||
skb_queue_tail
|
||||
|
||||
# required by incrementalfs.ko
|
||||
bin2hex
|
||||
__break_lease
|
||||
@ -312,10 +326,12 @@
|
||||
__msecs_to_jiffies
|
||||
mutex_is_locked
|
||||
notify_change
|
||||
override_creds
|
||||
pagecache_get_page
|
||||
path_get
|
||||
path_put
|
||||
register_filesystem
|
||||
revert_creds
|
||||
seq_puts
|
||||
set_anon_super
|
||||
sget
|
||||
@ -595,6 +611,7 @@
|
||||
drm_set_preferred_mode
|
||||
drm_universal_plane_init
|
||||
__get_task_comm
|
||||
kmalloc_order_trace
|
||||
kvfree
|
||||
kvmalloc_node
|
||||
memdup_user
|
||||
@ -825,12 +842,13 @@
|
||||
bpf_trace_run10
|
||||
bpf_trace_run8
|
||||
cancel_delayed_work
|
||||
_copy_from_iter_full
|
||||
_copy_to_iter
|
||||
trace_print_symbols_seq
|
||||
|
||||
# required by vsock.ko
|
||||
autoremove_wake_function
|
||||
init_user_ns
|
||||
ns_capable_noaudit
|
||||
prandom_u32
|
||||
prepare_to_wait
|
||||
proto_register
|
||||
@ -839,7 +857,6 @@
|
||||
_raw_write_unlock_bh
|
||||
security_sock_graft
|
||||
sk_alloc
|
||||
skb_dequeue
|
||||
sock_init_data
|
||||
sock_no_accept
|
||||
sock_no_getsockopt
|
||||
|
1882
android/abi_gki_aarch64_imx
Normal file
1882
android/abi_gki_aarch64_imx
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,7 @@
|
||||
alarm_cancel
|
||||
alarm_init
|
||||
alarm_start_relative
|
||||
alarm_expires_remaining
|
||||
alloc_chrdev_region
|
||||
__alloc_disk_node
|
||||
alarmtimer_get_rtcdev
|
||||
@ -617,19 +618,24 @@
|
||||
drm_atomic_helper_crtc_destroy_state
|
||||
__drm_atomic_helper_crtc_duplicate_state
|
||||
drm_atomic_helper_crtc_duplicate_state
|
||||
__drm_atomic_helper_crtc_reset
|
||||
drm_atomic_helper_crtc_reset
|
||||
drm_atomic_helper_dirtyfb
|
||||
drm_atomic_helper_disable_plane
|
||||
drm_atomic_helper_duplicate_state
|
||||
drm_atomic_helper_page_flip
|
||||
__drm_atomic_helper_plane_destroy_state
|
||||
drm_atomic_helper_plane_destroy_state
|
||||
__drm_atomic_helper_plane_duplicate_state
|
||||
drm_atomic_helper_plane_duplicate_state
|
||||
__drm_atomic_helper_plane_reset
|
||||
drm_atomic_helper_plane_reset
|
||||
drm_atomic_helper_prepare_planes
|
||||
__drm_atomic_helper_private_obj_duplicate_state
|
||||
drm_atomic_helper_resume
|
||||
drm_atomic_helper_set_config
|
||||
drm_atomic_helper_shutdown
|
||||
drm_atomic_helper_suspend
|
||||
drm_atomic_helper_swap_state
|
||||
drm_atomic_helper_update_legacy_modeset_state
|
||||
drm_atomic_helper_update_plane
|
||||
@ -768,6 +774,10 @@
|
||||
drm_gem_prime_mmap
|
||||
drm_gem_private_object_init
|
||||
drm_gem_put_pages
|
||||
drm_gem_shmem_dumb_create
|
||||
drm_gem_shmem_get_pages_sgt
|
||||
drm_gem_shmem_mmap
|
||||
drm_gem_shmem_prime_import_sg_table
|
||||
drm_gem_vm_close
|
||||
drm_gem_vm_open
|
||||
drm_get_connector_status_name
|
||||
@ -835,6 +845,7 @@
|
||||
drm_panel_remove
|
||||
drm_plane_cleanup
|
||||
drm_plane_create_rotation_property
|
||||
drm_plane_from_index
|
||||
drm_poll
|
||||
drm_prime_gem_destroy
|
||||
drm_prime_pages_to_sg
|
||||
|
@ -46,6 +46,7 @@
|
||||
__class_create
|
||||
class_destroy
|
||||
class_find_device
|
||||
clear_nlink
|
||||
clk_bulk_disable
|
||||
clk_bulk_enable
|
||||
clk_bulk_prepare
|
||||
@ -94,6 +95,7 @@
|
||||
__crypto_xor
|
||||
csum_ipv6_magic
|
||||
csum_partial
|
||||
d_splice_alias
|
||||
default_llseek
|
||||
delayed_work_timer_fn
|
||||
del_timer
|
||||
@ -271,6 +273,7 @@
|
||||
ieee80211_freq_khz_to_channel
|
||||
ieee80211_get_channel_khz
|
||||
ignore_console_lock_warning
|
||||
igrab
|
||||
inet_proto_csum_replace4
|
||||
init_net
|
||||
__init_rwsem
|
||||
@ -571,8 +574,10 @@
|
||||
seq_putc
|
||||
seq_puts
|
||||
seq_read
|
||||
set_nlink
|
||||
set_normalized_timespec64
|
||||
set_user_nice
|
||||
setattr_prepare
|
||||
sg_init_table
|
||||
sg_miter_next
|
||||
sg_miter_start
|
||||
@ -679,6 +684,7 @@
|
||||
trace_handle_return
|
||||
trace_raw_output_prep
|
||||
trace_seq_printf
|
||||
truncate_setsize
|
||||
try_module_get
|
||||
__tty_alloc_driver
|
||||
tty_flip_buffer_push
|
||||
@ -1558,6 +1564,7 @@
|
||||
dev_pm_opp_init_cpufreq_table
|
||||
|
||||
# required by sprd-drm.ko
|
||||
adjust_managed_page_count
|
||||
component_add
|
||||
component_bind_all
|
||||
component_del
|
||||
|
@ -393,8 +393,11 @@ CONFIG_HID_MULTITOUCH=y
|
||||
CONFIG_HID_NINTENDO=y
|
||||
CONFIG_HID_PICOLCD=y
|
||||
CONFIG_HID_PLANTRONICS=y
|
||||
CONFIG_HID_PLAYSTATION=y
|
||||
CONFIG_PLAYSTATION_FF=y
|
||||
CONFIG_HID_ROCCAT=y
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_HID_STEAM=y
|
||||
CONFIG_HID_WACOM=y
|
||||
CONFIG_HID_WIIMOTE=y
|
||||
|
@ -343,8 +343,11 @@ CONFIG_HID_MULTITOUCH=y
|
||||
CONFIG_HID_NINTENDO=y
|
||||
CONFIG_HID_PICOLCD=y
|
||||
CONFIG_HID_PLANTRONICS=y
|
||||
CONFIG_HID_PLAYSTATION=y
|
||||
CONFIG_PLAYSTATION_FF=y
|
||||
CONFIG_HID_ROCCAT=y
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_HID_STEAM=y
|
||||
CONFIG_HID_WACOM=y
|
||||
CONFIG_HID_WIIMOTE=y
|
||||
|
@ -5,7 +5,7 @@ CC=clang
|
||||
LD=ld.lld
|
||||
NM=llvm-nm
|
||||
OBJCOPY=llvm-objcopy
|
||||
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r383902/bin
|
||||
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r416183/bin
|
||||
DEPMOD=depmod
|
||||
BUILDTOOLS_PREBUILT_BIN=build/build-tools/path/linux-x86
|
||||
|
||||
|
@ -12,6 +12,7 @@ android/abi_gki_aarch64_exynosauto
|
||||
android/abi_gki_aarch64_galaxy
|
||||
android/abi_gki_aarch64_goldfish
|
||||
android/abi_gki_aarch64_hikey960
|
||||
android/abi_gki_aarch64_imx
|
||||
android/abi_gki_aarch64_oneplus
|
||||
android/abi_gki_aarch64_oplus
|
||||
android/abi_gki_aarch64_qcom
|
||||
|
@ -69,11 +69,9 @@
|
||||
|
||||
#include <uapi/linux/sched/types.h>
|
||||
#include <uapi/linux/android/binder.h>
|
||||
#include <uapi/linux/android/binderfs.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
#include "binder_alloc.h"
|
||||
#include "binder_internal.h"
|
||||
#include "binder_trace.h"
|
||||
#include <trace/hooks/binder.h>
|
||||
@ -167,24 +165,6 @@ module_param_call(stop_on_user_error, binder_set_stop_on_user_error,
|
||||
#define to_binder_fd_array_object(hdr) \
|
||||
container_of(hdr, struct binder_fd_array_object, hdr)
|
||||
|
||||
enum binder_stat_types {
|
||||
BINDER_STAT_PROC,
|
||||
BINDER_STAT_THREAD,
|
||||
BINDER_STAT_NODE,
|
||||
BINDER_STAT_REF,
|
||||
BINDER_STAT_DEATH,
|
||||
BINDER_STAT_TRANSACTION,
|
||||
BINDER_STAT_TRANSACTION_COMPLETE,
|
||||
BINDER_STAT_COUNT
|
||||
};
|
||||
|
||||
struct binder_stats {
|
||||
atomic_t br[_IOC_NR(BR_FAILED_REPLY) + 1];
|
||||
atomic_t bc[_IOC_NR(BC_REPLY_SG) + 1];
|
||||
atomic_t obj_created[BINDER_STAT_COUNT];
|
||||
atomic_t obj_deleted[BINDER_STAT_COUNT];
|
||||
};
|
||||
|
||||
static struct binder_stats binder_stats;
|
||||
|
||||
static inline void binder_stats_deleted(enum binder_stat_types type)
|
||||
@ -220,299 +200,11 @@ static struct binder_transaction_log_entry *binder_transaction_log_add(
|
||||
return e;
|
||||
}
|
||||
|
||||
/**
|
||||
* struct binder_work - work enqueued on a worklist
|
||||
* @entry: node enqueued on list
|
||||
* @type: type of work to be performed
|
||||
*
|
||||
* There are separate work lists for proc, thread, and node (async).
|
||||
*/
|
||||
struct binder_work {
|
||||
struct list_head entry;
|
||||
|
||||
enum binder_work_type {
|
||||
BINDER_WORK_TRANSACTION = 1,
|
||||
BINDER_WORK_TRANSACTION_COMPLETE,
|
||||
BINDER_WORK_RETURN_ERROR,
|
||||
BINDER_WORK_NODE,
|
||||
BINDER_WORK_DEAD_BINDER,
|
||||
BINDER_WORK_DEAD_BINDER_AND_CLEAR,
|
||||
BINDER_WORK_CLEAR_DEATH_NOTIFICATION,
|
||||
} type;
|
||||
};
|
||||
|
||||
struct binder_error {
|
||||
struct binder_work work;
|
||||
uint32_t cmd;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_node - binder node bookkeeping
|
||||
* @debug_id: unique ID for debugging
|
||||
* (invariant after initialized)
|
||||
* @lock: lock for node fields
|
||||
* @work: worklist element for node work
|
||||
* (protected by @proc->inner_lock)
|
||||
* @rb_node: element for proc->nodes tree
|
||||
* (protected by @proc->inner_lock)
|
||||
* @dead_node: element for binder_dead_nodes list
|
||||
* (protected by binder_dead_nodes_lock)
|
||||
* @proc: binder_proc that owns this node
|
||||
* (invariant after initialized)
|
||||
* @refs: list of references on this node
|
||||
* (protected by @lock)
|
||||
* @internal_strong_refs: used to take strong references when
|
||||
* initiating a transaction
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @local_weak_refs: weak user refs from local process
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @local_strong_refs: strong user refs from local process
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @tmp_refs: temporary kernel refs
|
||||
* (protected by @proc->inner_lock while @proc
|
||||
* is valid, and by binder_dead_nodes_lock
|
||||
* if @proc is NULL. During inc/dec and node release
|
||||
* it is also protected by @lock to provide safety
|
||||
* as the node dies and @proc becomes NULL)
|
||||
* @ptr: userspace pointer for node
|
||||
* (invariant, no lock needed)
|
||||
* @cookie: userspace cookie for node
|
||||
* (invariant, no lock needed)
|
||||
* @has_strong_ref: userspace notified of strong ref
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @pending_strong_ref: userspace has acked notification of strong ref
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @has_weak_ref: userspace notified of weak ref
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @pending_weak_ref: userspace has acked notification of weak ref
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @has_async_transaction: async transaction to node in progress
|
||||
* (protected by @lock)
|
||||
* @sched_policy: minimum scheduling policy for node
|
||||
* (invariant after initialized)
|
||||
* @accept_fds: file descriptor operations supported for node
|
||||
* (invariant after initialized)
|
||||
* @min_priority: minimum scheduling priority
|
||||
* (invariant after initialized)
|
||||
* @inherit_rt: inherit RT scheduling policy from caller
|
||||
* @txn_security_ctx: require sender's security context
|
||||
* (invariant after initialized)
|
||||
* @async_todo: list of async work items
|
||||
* (protected by @proc->inner_lock)
|
||||
*
|
||||
* Bookkeeping structure for binder nodes.
|
||||
*/
|
||||
struct binder_node {
|
||||
int debug_id;
|
||||
spinlock_t lock;
|
||||
struct binder_work work;
|
||||
union {
|
||||
struct rb_node rb_node;
|
||||
struct hlist_node dead_node;
|
||||
};
|
||||
struct binder_proc *proc;
|
||||
struct hlist_head refs;
|
||||
int internal_strong_refs;
|
||||
int local_weak_refs;
|
||||
int local_strong_refs;
|
||||
int tmp_refs;
|
||||
binder_uintptr_t ptr;
|
||||
binder_uintptr_t cookie;
|
||||
struct {
|
||||
/*
|
||||
* bitfield elements protected by
|
||||
* proc inner_lock
|
||||
*/
|
||||
u8 has_strong_ref:1;
|
||||
u8 pending_strong_ref:1;
|
||||
u8 has_weak_ref:1;
|
||||
u8 pending_weak_ref:1;
|
||||
};
|
||||
struct {
|
||||
/*
|
||||
* invariant after initialization
|
||||
*/
|
||||
u8 sched_policy:2;
|
||||
u8 inherit_rt:1;
|
||||
u8 accept_fds:1;
|
||||
u8 txn_security_ctx:1;
|
||||
u8 min_priority;
|
||||
};
|
||||
bool has_async_transaction;
|
||||
struct list_head async_todo;
|
||||
};
|
||||
|
||||
struct binder_ref_death {
|
||||
/**
|
||||
* @work: worklist element for death notifications
|
||||
* (protected by inner_lock of the proc that
|
||||
* this ref belongs to)
|
||||
*/
|
||||
struct binder_work work;
|
||||
binder_uintptr_t cookie;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_ref_data - binder_ref counts and id
|
||||
* @debug_id: unique ID for the ref
|
||||
* @desc: unique userspace handle for ref
|
||||
* @strong: strong ref count (debugging only if not locked)
|
||||
* @weak: weak ref count (debugging only if not locked)
|
||||
*
|
||||
* Structure to hold ref count and ref id information. Since
|
||||
* the actual ref can only be accessed with a lock, this structure
|
||||
* is used to return information about the ref to callers of
|
||||
* ref inc/dec functions.
|
||||
*/
|
||||
struct binder_ref_data {
|
||||
int debug_id;
|
||||
uint32_t desc;
|
||||
int strong;
|
||||
int weak;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_ref - struct to track references on nodes
|
||||
* @data: binder_ref_data containing id, handle, and current refcounts
|
||||
* @rb_node_desc: node for lookup by @data.desc in proc's rb_tree
|
||||
* @rb_node_node: node for lookup by @node in proc's rb_tree
|
||||
* @node_entry: list entry for node->refs list in target node
|
||||
* (protected by @node->lock)
|
||||
* @proc: binder_proc containing ref
|
||||
* @node: binder_node of target node. When cleaning up a
|
||||
* ref for deletion in binder_cleanup_ref, a non-NULL
|
||||
* @node indicates the node must be freed
|
||||
* @death: pointer to death notification (ref_death) if requested
|
||||
* (protected by @node->lock)
|
||||
*
|
||||
* Structure to track references from procA to target node (on procB). This
|
||||
* structure is unsafe to access without holding @proc->outer_lock.
|
||||
*/
|
||||
struct binder_ref {
|
||||
/* Lookups needed: */
|
||||
/* node + proc => ref (transaction) */
|
||||
/* desc + proc => ref (transaction, inc/dec ref) */
|
||||
/* node => refs + procs (proc exit) */
|
||||
struct binder_ref_data data;
|
||||
struct rb_node rb_node_desc;
|
||||
struct rb_node rb_node_node;
|
||||
struct hlist_node node_entry;
|
||||
struct binder_proc *proc;
|
||||
struct binder_node *node;
|
||||
struct binder_ref_death *death;
|
||||
};
|
||||
|
||||
enum binder_deferred_state {
|
||||
BINDER_DEFERRED_FLUSH = 0x01,
|
||||
BINDER_DEFERRED_RELEASE = 0x02,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_priority - scheduler policy and priority
|
||||
* @sched_policy scheduler policy
|
||||
* @prio [100..139] for SCHED_NORMAL, [0..99] for FIFO/RT
|
||||
*
|
||||
* The binder driver supports inheriting the following scheduler policies:
|
||||
* SCHED_NORMAL
|
||||
* SCHED_BATCH
|
||||
* SCHED_FIFO
|
||||
* SCHED_RR
|
||||
*/
|
||||
struct binder_priority {
|
||||
unsigned int sched_policy;
|
||||
int prio;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_proc - binder process bookkeeping
|
||||
* @proc_node: element for binder_procs list
|
||||
* @threads: rbtree of binder_threads in this proc
|
||||
* (protected by @inner_lock)
|
||||
* @nodes: rbtree of binder nodes associated with
|
||||
* this proc ordered by node->ptr
|
||||
* (protected by @inner_lock)
|
||||
* @refs_by_desc: rbtree of refs ordered by ref->desc
|
||||
* (protected by @outer_lock)
|
||||
* @refs_by_node: rbtree of refs ordered by ref->node
|
||||
* (protected by @outer_lock)
|
||||
* @waiting_threads: threads currently waiting for proc work
|
||||
* (protected by @inner_lock)
|
||||
* @pid PID of group_leader of process
|
||||
* (invariant after initialized)
|
||||
* @tsk task_struct for group_leader of process
|
||||
* (invariant after initialized)
|
||||
* @deferred_work_node: element for binder_deferred_list
|
||||
* (protected by binder_deferred_lock)
|
||||
* @deferred_work: bitmap of deferred work to perform
|
||||
* (protected by binder_deferred_lock)
|
||||
* @is_dead: process is dead and awaiting free
|
||||
* when outstanding transactions are cleaned up
|
||||
* (protected by @inner_lock)
|
||||
* @todo: list of work for this process
|
||||
* (protected by @inner_lock)
|
||||
* @stats: per-process binder statistics
|
||||
* (atomics, no lock needed)
|
||||
* @delivered_death: list of delivered death notification
|
||||
* (protected by @inner_lock)
|
||||
* @max_threads: cap on number of binder threads
|
||||
* (protected by @inner_lock)
|
||||
* @requested_threads: number of binder threads requested but not
|
||||
* yet started. In current implementation, can
|
||||
* only be 0 or 1.
|
||||
* (protected by @inner_lock)
|
||||
* @requested_threads_started: number binder threads started
|
||||
* (protected by @inner_lock)
|
||||
* @tmp_ref: temporary reference to indicate proc is in use
|
||||
* (protected by @inner_lock)
|
||||
* @default_priority: default scheduler priority
|
||||
* (invariant after initialized)
|
||||
* @debugfs_entry: debugfs node
|
||||
* @alloc: binder allocator bookkeeping
|
||||
* @context: binder_context for this proc
|
||||
* (invariant after initialized)
|
||||
* @inner_lock: can nest under outer_lock and/or node lock
|
||||
* @outer_lock: no nesting under innor or node lock
|
||||
* Lock order: 1) outer, 2) node, 3) inner
|
||||
* @binderfs_entry: process-specific binderfs log file
|
||||
*
|
||||
* Bookkeeping structure for binder processes
|
||||
*/
|
||||
struct binder_proc {
|
||||
struct hlist_node proc_node;
|
||||
struct rb_root threads;
|
||||
struct rb_root nodes;
|
||||
struct rb_root refs_by_desc;
|
||||
struct rb_root refs_by_node;
|
||||
struct list_head waiting_threads;
|
||||
int pid;
|
||||
struct task_struct *tsk;
|
||||
struct hlist_node deferred_work_node;
|
||||
int deferred_work;
|
||||
bool is_dead;
|
||||
|
||||
struct list_head todo;
|
||||
struct binder_stats stats;
|
||||
struct list_head delivered_death;
|
||||
int max_threads;
|
||||
int requested_threads;
|
||||
int requested_threads_started;
|
||||
int tmp_ref;
|
||||
struct binder_priority default_priority;
|
||||
struct dentry *debugfs_entry;
|
||||
struct binder_alloc alloc;
|
||||
struct binder_context *context;
|
||||
spinlock_t inner_lock;
|
||||
spinlock_t outer_lock;
|
||||
struct dentry *binderfs_entry;
|
||||
};
|
||||
|
||||
enum {
|
||||
BINDER_LOOPER_STATE_REGISTERED = 0x01,
|
||||
BINDER_LOOPER_STATE_ENTERED = 0x02,
|
||||
@ -522,129 +214,6 @@ enum {
|
||||
BINDER_LOOPER_STATE_POLL = 0x20,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_thread - binder thread bookkeeping
|
||||
* @proc: binder process for this thread
|
||||
* (invariant after initialization)
|
||||
* @rb_node: element for proc->threads rbtree
|
||||
* (protected by @proc->inner_lock)
|
||||
* @waiting_thread_node: element for @proc->waiting_threads list
|
||||
* (protected by @proc->inner_lock)
|
||||
* @pid: PID for this thread
|
||||
* (invariant after initialization)
|
||||
* @looper: bitmap of looping state
|
||||
* (only accessed by this thread)
|
||||
* @looper_needs_return: looping thread needs to exit driver
|
||||
* (no lock needed)
|
||||
* @transaction_stack: stack of in-progress transactions for this thread
|
||||
* (protected by @proc->inner_lock)
|
||||
* @todo: list of work to do for this thread
|
||||
* (protected by @proc->inner_lock)
|
||||
* @process_todo: whether work in @todo should be processed
|
||||
* (protected by @proc->inner_lock)
|
||||
* @return_error: transaction errors reported by this thread
|
||||
* (only accessed by this thread)
|
||||
* @reply_error: transaction errors reported by target thread
|
||||
* (protected by @proc->inner_lock)
|
||||
* @wait: wait queue for thread work
|
||||
* @stats: per-thread statistics
|
||||
* (atomics, no lock needed)
|
||||
* @tmp_ref: temporary reference to indicate thread is in use
|
||||
* (atomic since @proc->inner_lock cannot
|
||||
* always be acquired)
|
||||
* @is_dead: thread is dead and awaiting free
|
||||
* when outstanding transactions are cleaned up
|
||||
* (protected by @proc->inner_lock)
|
||||
* @task: struct task_struct for this thread
|
||||
*
|
||||
* Bookkeeping structure for binder threads.
|
||||
*/
|
||||
struct binder_thread {
|
||||
struct binder_proc *proc;
|
||||
struct rb_node rb_node;
|
||||
struct list_head waiting_thread_node;
|
||||
int pid;
|
||||
int looper; /* only modified by this thread */
|
||||
bool looper_need_return; /* can be written by other thread */
|
||||
struct binder_transaction *transaction_stack;
|
||||
struct list_head todo;
|
||||
bool process_todo;
|
||||
struct binder_error return_error;
|
||||
struct binder_error reply_error;
|
||||
wait_queue_head_t wait;
|
||||
struct binder_stats stats;
|
||||
atomic_t tmp_ref;
|
||||
bool is_dead;
|
||||
struct task_struct *task;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_txn_fd_fixup - transaction fd fixup list element
|
||||
* @fixup_entry: list entry
|
||||
* @file: struct file to be associated with new fd
|
||||
* @offset: offset in buffer data to this fixup
|
||||
*
|
||||
* List element for fd fixups in a transaction. Since file
|
||||
* descriptors need to be allocated in the context of the
|
||||
* target process, we pass each fd to be processed in this
|
||||
* struct.
|
||||
*/
|
||||
struct binder_txn_fd_fixup {
|
||||
struct list_head fixup_entry;
|
||||
struct file *file;
|
||||
size_t offset;
|
||||
};
|
||||
|
||||
struct binder_transaction {
|
||||
int debug_id;
|
||||
struct binder_work work;
|
||||
struct binder_thread *from;
|
||||
struct binder_transaction *from_parent;
|
||||
struct binder_proc *to_proc;
|
||||
struct binder_thread *to_thread;
|
||||
struct binder_transaction *to_parent;
|
||||
unsigned need_reply:1;
|
||||
/* unsigned is_dead:1; */ /* not used at the moment */
|
||||
|
||||
struct binder_buffer *buffer;
|
||||
unsigned int code;
|
||||
unsigned int flags;
|
||||
struct binder_priority priority;
|
||||
struct binder_priority saved_priority;
|
||||
bool set_priority_called;
|
||||
kuid_t sender_euid;
|
||||
struct list_head fd_fixups;
|
||||
binder_uintptr_t security_ctx;
|
||||
/**
|
||||
* @lock: protects @from, @to_proc, and @to_thread
|
||||
*
|
||||
* @from, @to_proc, and @to_thread can be set to NULL
|
||||
* during thread teardown
|
||||
*/
|
||||
spinlock_t lock;
|
||||
ANDROID_VENDOR_DATA(1);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_object - union of flat binder object types
|
||||
* @hdr: generic object header
|
||||
* @fbo: binder object (nodes and refs)
|
||||
* @fdo: file descriptor object
|
||||
* @bbo: binder buffer pointer
|
||||
* @fdao: file descriptor array
|
||||
*
|
||||
* Used for type-independent object copies
|
||||
*/
|
||||
struct binder_object {
|
||||
union {
|
||||
struct binder_object_header hdr;
|
||||
struct flat_binder_object fbo;
|
||||
struct binder_fd_object fdo;
|
||||
struct binder_buffer_object bbo;
|
||||
struct binder_fd_array_object fdao;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* binder_proc_lock() - Acquire outer lock for given binder_proc
|
||||
* @proc: struct binder_proc to acquire
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/uidgid.h>
|
||||
#include <uapi/linux/android/binderfs.h>
|
||||
#include "binder_alloc.h"
|
||||
|
||||
struct binder_context {
|
||||
struct binder_node *binder_context_mgr_node;
|
||||
@ -141,6 +143,435 @@ struct binder_transaction_log {
|
||||
struct binder_transaction_log_entry entry[32];
|
||||
};
|
||||
|
||||
enum binder_stat_types {
|
||||
BINDER_STAT_PROC,
|
||||
BINDER_STAT_THREAD,
|
||||
BINDER_STAT_NODE,
|
||||
BINDER_STAT_REF,
|
||||
BINDER_STAT_DEATH,
|
||||
BINDER_STAT_TRANSACTION,
|
||||
BINDER_STAT_TRANSACTION_COMPLETE,
|
||||
BINDER_STAT_COUNT
|
||||
};
|
||||
|
||||
struct binder_stats {
|
||||
atomic_t br[_IOC_NR(BR_FAILED_REPLY) + 1];
|
||||
atomic_t bc[_IOC_NR(BC_REPLY_SG) + 1];
|
||||
atomic_t obj_created[BINDER_STAT_COUNT];
|
||||
atomic_t obj_deleted[BINDER_STAT_COUNT];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_work - work enqueued on a worklist
|
||||
* @entry: node enqueued on list
|
||||
* @type: type of work to be performed
|
||||
*
|
||||
* There are separate work lists for proc, thread, and node (async).
|
||||
*/
|
||||
struct binder_work {
|
||||
struct list_head entry;
|
||||
|
||||
enum binder_work_type {
|
||||
BINDER_WORK_TRANSACTION = 1,
|
||||
BINDER_WORK_TRANSACTION_COMPLETE,
|
||||
BINDER_WORK_RETURN_ERROR,
|
||||
BINDER_WORK_NODE,
|
||||
BINDER_WORK_DEAD_BINDER,
|
||||
BINDER_WORK_DEAD_BINDER_AND_CLEAR,
|
||||
BINDER_WORK_CLEAR_DEATH_NOTIFICATION,
|
||||
} type;
|
||||
};
|
||||
|
||||
struct binder_error {
|
||||
struct binder_work work;
|
||||
uint32_t cmd;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_node - binder node bookkeeping
|
||||
* @debug_id: unique ID for debugging
|
||||
* (invariant after initialized)
|
||||
* @lock: lock for node fields
|
||||
* @work: worklist element for node work
|
||||
* (protected by @proc->inner_lock)
|
||||
* @rb_node: element for proc->nodes tree
|
||||
* (protected by @proc->inner_lock)
|
||||
* @dead_node: element for binder_dead_nodes list
|
||||
* (protected by binder_dead_nodes_lock)
|
||||
* @proc: binder_proc that owns this node
|
||||
* (invariant after initialized)
|
||||
* @refs: list of references on this node
|
||||
* (protected by @lock)
|
||||
* @internal_strong_refs: used to take strong references when
|
||||
* initiating a transaction
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @local_weak_refs: weak user refs from local process
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @local_strong_refs: strong user refs from local process
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @tmp_refs: temporary kernel refs
|
||||
* (protected by @proc->inner_lock while @proc
|
||||
* is valid, and by binder_dead_nodes_lock
|
||||
* if @proc is NULL. During inc/dec and node release
|
||||
* it is also protected by @lock to provide safety
|
||||
* as the node dies and @proc becomes NULL)
|
||||
* @ptr: userspace pointer for node
|
||||
* (invariant, no lock needed)
|
||||
* @cookie: userspace cookie for node
|
||||
* (invariant, no lock needed)
|
||||
* @has_strong_ref: userspace notified of strong ref
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @pending_strong_ref: userspace has acked notification of strong ref
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @has_weak_ref: userspace notified of weak ref
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @pending_weak_ref: userspace has acked notification of weak ref
|
||||
* (protected by @proc->inner_lock if @proc
|
||||
* and by @lock)
|
||||
* @has_async_transaction: async transaction to node in progress
|
||||
* (protected by @lock)
|
||||
* @sched_policy: minimum scheduling policy for node
|
||||
* (invariant after initialized)
|
||||
* @accept_fds: file descriptor operations supported for node
|
||||
* (invariant after initialized)
|
||||
* @min_priority: minimum scheduling priority
|
||||
* (invariant after initialized)
|
||||
* @inherit_rt: inherit RT scheduling policy from caller
|
||||
* @txn_security_ctx: require sender's security context
|
||||
* (invariant after initialized)
|
||||
* @async_todo: list of async work items
|
||||
* (protected by @proc->inner_lock)
|
||||
*
|
||||
* Bookkeeping structure for binder nodes.
|
||||
*/
|
||||
struct binder_node {
|
||||
int debug_id;
|
||||
spinlock_t lock;
|
||||
struct binder_work work;
|
||||
union {
|
||||
struct rb_node rb_node;
|
||||
struct hlist_node dead_node;
|
||||
};
|
||||
struct binder_proc *proc;
|
||||
struct hlist_head refs;
|
||||
int internal_strong_refs;
|
||||
int local_weak_refs;
|
||||
int local_strong_refs;
|
||||
int tmp_refs;
|
||||
binder_uintptr_t ptr;
|
||||
binder_uintptr_t cookie;
|
||||
struct {
|
||||
/*
|
||||
* bitfield elements protected by
|
||||
* proc inner_lock
|
||||
*/
|
||||
u8 has_strong_ref:1;
|
||||
u8 pending_strong_ref:1;
|
||||
u8 has_weak_ref:1;
|
||||
u8 pending_weak_ref:1;
|
||||
};
|
||||
struct {
|
||||
/*
|
||||
* invariant after initialization
|
||||
*/
|
||||
u8 sched_policy:2;
|
||||
u8 inherit_rt:1;
|
||||
u8 accept_fds:1;
|
||||
u8 txn_security_ctx:1;
|
||||
u8 min_priority;
|
||||
};
|
||||
bool has_async_transaction;
|
||||
struct list_head async_todo;
|
||||
};
|
||||
|
||||
struct binder_ref_death {
|
||||
/**
|
||||
* @work: worklist element for death notifications
|
||||
* (protected by inner_lock of the proc that
|
||||
* this ref belongs to)
|
||||
*/
|
||||
struct binder_work work;
|
||||
binder_uintptr_t cookie;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_ref_data - binder_ref counts and id
|
||||
* @debug_id: unique ID for the ref
|
||||
* @desc: unique userspace handle for ref
|
||||
* @strong: strong ref count (debugging only if not locked)
|
||||
* @weak: weak ref count (debugging only if not locked)
|
||||
*
|
||||
* Structure to hold ref count and ref id information. Since
|
||||
* the actual ref can only be accessed with a lock, this structure
|
||||
* is used to return information about the ref to callers of
|
||||
* ref inc/dec functions.
|
||||
*/
|
||||
struct binder_ref_data {
|
||||
int debug_id;
|
||||
uint32_t desc;
|
||||
int strong;
|
||||
int weak;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_ref - struct to track references on nodes
|
||||
* @data: binder_ref_data containing id, handle, and current refcounts
|
||||
* @rb_node_desc: node for lookup by @data.desc in proc's rb_tree
|
||||
* @rb_node_node: node for lookup by @node in proc's rb_tree
|
||||
* @node_entry: list entry for node->refs list in target node
|
||||
* (protected by @node->lock)
|
||||
* @proc: binder_proc containing ref
|
||||
* @node: binder_node of target node. When cleaning up a
|
||||
* ref for deletion in binder_cleanup_ref, a non-NULL
|
||||
* @node indicates the node must be freed
|
||||
* @death: pointer to death notification (ref_death) if requested
|
||||
* (protected by @node->lock)
|
||||
*
|
||||
* Structure to track references from procA to target node (on procB). This
|
||||
* structure is unsafe to access without holding @proc->outer_lock.
|
||||
*/
|
||||
struct binder_ref {
|
||||
/* Lookups needed: */
|
||||
/* node + proc => ref (transaction) */
|
||||
/* desc + proc => ref (transaction, inc/dec ref) */
|
||||
/* node => refs + procs (proc exit) */
|
||||
struct binder_ref_data data;
|
||||
struct rb_node rb_node_desc;
|
||||
struct rb_node rb_node_node;
|
||||
struct hlist_node node_entry;
|
||||
struct binder_proc *proc;
|
||||
struct binder_node *node;
|
||||
struct binder_ref_death *death;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_priority - scheduler policy and priority
|
||||
* @sched_policy scheduler policy
|
||||
* @prio [100..139] for SCHED_NORMAL, [0..99] for FIFO/RT
|
||||
*
|
||||
* The binder driver supports inheriting the following scheduler policies:
|
||||
* SCHED_NORMAL
|
||||
* SCHED_BATCH
|
||||
* SCHED_FIFO
|
||||
* SCHED_RR
|
||||
*/
|
||||
struct binder_priority {
|
||||
unsigned int sched_policy;
|
||||
int prio;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_proc - binder process bookkeeping
|
||||
* @proc_node: element for binder_procs list
|
||||
* @threads: rbtree of binder_threads in this proc
|
||||
* (protected by @inner_lock)
|
||||
* @nodes: rbtree of binder nodes associated with
|
||||
* this proc ordered by node->ptr
|
||||
* (protected by @inner_lock)
|
||||
* @refs_by_desc: rbtree of refs ordered by ref->desc
|
||||
* (protected by @outer_lock)
|
||||
* @refs_by_node: rbtree of refs ordered by ref->node
|
||||
* (protected by @outer_lock)
|
||||
* @waiting_threads: threads currently waiting for proc work
|
||||
* (protected by @inner_lock)
|
||||
* @pid PID of group_leader of process
|
||||
* (invariant after initialized)
|
||||
* @tsk task_struct for group_leader of process
|
||||
* (invariant after initialized)
|
||||
* @deferred_work_node: element for binder_deferred_list
|
||||
* (protected by binder_deferred_lock)
|
||||
* @deferred_work: bitmap of deferred work to perform
|
||||
* (protected by binder_deferred_lock)
|
||||
* @is_dead: process is dead and awaiting free
|
||||
* when outstanding transactions are cleaned up
|
||||
* (protected by @inner_lock)
|
||||
* @todo: list of work for this process
|
||||
* (protected by @inner_lock)
|
||||
* @stats: per-process binder statistics
|
||||
* (atomics, no lock needed)
|
||||
* @delivered_death: list of delivered death notification
|
||||
* (protected by @inner_lock)
|
||||
* @max_threads: cap on number of binder threads
|
||||
* (protected by @inner_lock)
|
||||
* @requested_threads: number of binder threads requested but not
|
||||
* yet started. In current implementation, can
|
||||
* only be 0 or 1.
|
||||
* (protected by @inner_lock)
|
||||
* @requested_threads_started: number binder threads started
|
||||
* (protected by @inner_lock)
|
||||
* @tmp_ref: temporary reference to indicate proc is in use
|
||||
* (protected by @inner_lock)
|
||||
* @default_priority: default scheduler priority
|
||||
* (invariant after initialized)
|
||||
* @debugfs_entry: debugfs node
|
||||
* @alloc: binder allocator bookkeeping
|
||||
* @context: binder_context for this proc
|
||||
* (invariant after initialized)
|
||||
* @inner_lock: can nest under outer_lock and/or node lock
|
||||
* @outer_lock: no nesting under innor or node lock
|
||||
* Lock order: 1) outer, 2) node, 3) inner
|
||||
* @binderfs_entry: process-specific binderfs log file
|
||||
*
|
||||
* Bookkeeping structure for binder processes
|
||||
*/
|
||||
struct binder_proc {
|
||||
struct hlist_node proc_node;
|
||||
struct rb_root threads;
|
||||
struct rb_root nodes;
|
||||
struct rb_root refs_by_desc;
|
||||
struct rb_root refs_by_node;
|
||||
struct list_head waiting_threads;
|
||||
int pid;
|
||||
struct task_struct *tsk;
|
||||
struct hlist_node deferred_work_node;
|
||||
int deferred_work;
|
||||
bool is_dead;
|
||||
|
||||
struct list_head todo;
|
||||
struct binder_stats stats;
|
||||
struct list_head delivered_death;
|
||||
int max_threads;
|
||||
int requested_threads;
|
||||
int requested_threads_started;
|
||||
int tmp_ref;
|
||||
struct binder_priority default_priority;
|
||||
struct dentry *debugfs_entry;
|
||||
struct binder_alloc alloc;
|
||||
struct binder_context *context;
|
||||
spinlock_t inner_lock;
|
||||
spinlock_t outer_lock;
|
||||
struct dentry *binderfs_entry;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_thread - binder thread bookkeeping
|
||||
* @proc: binder process for this thread
|
||||
* (invariant after initialization)
|
||||
* @rb_node: element for proc->threads rbtree
|
||||
* (protected by @proc->inner_lock)
|
||||
* @waiting_thread_node: element for @proc->waiting_threads list
|
||||
* (protected by @proc->inner_lock)
|
||||
* @pid: PID for this thread
|
||||
* (invariant after initialization)
|
||||
* @looper: bitmap of looping state
|
||||
* (only accessed by this thread)
|
||||
* @looper_needs_return: looping thread needs to exit driver
|
||||
* (no lock needed)
|
||||
* @transaction_stack: stack of in-progress transactions for this thread
|
||||
* (protected by @proc->inner_lock)
|
||||
* @todo: list of work to do for this thread
|
||||
* (protected by @proc->inner_lock)
|
||||
* @process_todo: whether work in @todo should be processed
|
||||
* (protected by @proc->inner_lock)
|
||||
* @return_error: transaction errors reported by this thread
|
||||
* (only accessed by this thread)
|
||||
* @reply_error: transaction errors reported by target thread
|
||||
* (protected by @proc->inner_lock)
|
||||
* @wait: wait queue for thread work
|
||||
* @stats: per-thread statistics
|
||||
* (atomics, no lock needed)
|
||||
* @tmp_ref: temporary reference to indicate thread is in use
|
||||
* (atomic since @proc->inner_lock cannot
|
||||
* always be acquired)
|
||||
* @is_dead: thread is dead and awaiting free
|
||||
* when outstanding transactions are cleaned up
|
||||
* (protected by @proc->inner_lock)
|
||||
* @task: struct task_struct for this thread
|
||||
*
|
||||
* Bookkeeping structure for binder threads.
|
||||
*/
|
||||
struct binder_thread {
|
||||
struct binder_proc *proc;
|
||||
struct rb_node rb_node;
|
||||
struct list_head waiting_thread_node;
|
||||
int pid;
|
||||
int looper; /* only modified by this thread */
|
||||
bool looper_need_return; /* can be written by other thread */
|
||||
struct binder_transaction *transaction_stack;
|
||||
struct list_head todo;
|
||||
bool process_todo;
|
||||
struct binder_error return_error;
|
||||
struct binder_error reply_error;
|
||||
wait_queue_head_t wait;
|
||||
struct binder_stats stats;
|
||||
atomic_t tmp_ref;
|
||||
bool is_dead;
|
||||
struct task_struct *task;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_txn_fd_fixup - transaction fd fixup list element
|
||||
* @fixup_entry: list entry
|
||||
* @file: struct file to be associated with new fd
|
||||
* @offset: offset in buffer data to this fixup
|
||||
*
|
||||
* List element for fd fixups in a transaction. Since file
|
||||
* descriptors need to be allocated in the context of the
|
||||
* target process, we pass each fd to be processed in this
|
||||
* struct.
|
||||
*/
|
||||
struct binder_txn_fd_fixup {
|
||||
struct list_head fixup_entry;
|
||||
struct file *file;
|
||||
size_t offset;
|
||||
};
|
||||
|
||||
struct binder_transaction {
|
||||
int debug_id;
|
||||
struct binder_work work;
|
||||
struct binder_thread *from;
|
||||
struct binder_transaction *from_parent;
|
||||
struct binder_proc *to_proc;
|
||||
struct binder_thread *to_thread;
|
||||
struct binder_transaction *to_parent;
|
||||
unsigned need_reply:1;
|
||||
/* unsigned is_dead:1; */ /* not used at the moment */
|
||||
|
||||
struct binder_buffer *buffer;
|
||||
unsigned int code;
|
||||
unsigned int flags;
|
||||
struct binder_priority priority;
|
||||
struct binder_priority saved_priority;
|
||||
bool set_priority_called;
|
||||
kuid_t sender_euid;
|
||||
struct list_head fd_fixups;
|
||||
binder_uintptr_t security_ctx;
|
||||
/**
|
||||
* @lock: protects @from, @to_proc, and @to_thread
|
||||
*
|
||||
* @from, @to_proc, and @to_thread can be set to NULL
|
||||
* during thread teardown
|
||||
*/
|
||||
spinlock_t lock;
|
||||
ANDROID_VENDOR_DATA(1);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct binder_object - union of flat binder object types
|
||||
* @hdr: generic object header
|
||||
* @fbo: binder object (nodes and refs)
|
||||
* @fdo: file descriptor object
|
||||
* @bbo: binder buffer pointer
|
||||
* @fdao: file descriptor array
|
||||
*
|
||||
* Used for type-independent object copies
|
||||
*/
|
||||
struct binder_object {
|
||||
union {
|
||||
struct binder_object_header hdr;
|
||||
struct flat_binder_object fbo;
|
||||
struct binder_fd_object fdo;
|
||||
struct binder_buffer_object bbo;
|
||||
struct binder_fd_array_object fdao;
|
||||
};
|
||||
};
|
||||
|
||||
extern struct binder_transaction_log binder_transaction_log;
|
||||
extern struct binder_transaction_log binder_transaction_log_failed;
|
||||
#endif /* _LINUX_BINDER_INTERNAL_H */
|
||||
|
@ -846,6 +846,24 @@ config HID_PLANTRONICS
|
||||
|
||||
Say M here if you may ever plug in a Plantronics USB audio device.
|
||||
|
||||
config HID_PLAYSTATION
|
||||
tristate "PlayStation HID Driver"
|
||||
depends on HID
|
||||
select CRC32
|
||||
select POWER_SUPPLY
|
||||
help
|
||||
Provides support for Sony PS5 controllers including support for
|
||||
its special functionalities e.g. touchpad, lights and motion
|
||||
sensors.
|
||||
|
||||
config PLAYSTATION_FF
|
||||
bool "PlayStation force feedback support"
|
||||
depends on HID_PLAYSTATION
|
||||
select INPUT_FF_MEMLESS
|
||||
help
|
||||
Say Y here if you would like to enable force feedback support for
|
||||
PlayStation game controllers.
|
||||
|
||||
config HID_PRIMAX
|
||||
tristate "Primax non-fully HID-compliant devices"
|
||||
depends on HID
|
||||
|
@ -91,6 +91,7 @@ hid-picolcd-$(CONFIG_HID_PICOLCD_CIR) += hid-picolcd_cir.o
|
||||
hid-picolcd-$(CONFIG_DEBUG_FS) += hid-picolcd_debugfs.o
|
||||
|
||||
obj-$(CONFIG_HID_PLANTRONICS) += hid-plantronics.o
|
||||
obj-$(CONFIG_HID_PLAYSTATION) += hid-playstation.o
|
||||
obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
|
||||
obj-$(CONFIG_HID_REDRAGON) += hid-redragon.o
|
||||
obj-$(CONFIG_HID_RETRODE) += hid-retrode.o
|
||||
|
@ -1066,6 +1066,7 @@
|
||||
#define USB_DEVICE_ID_SONY_PS4_CONTROLLER 0x05c4
|
||||
#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2 0x09cc
|
||||
#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE 0x0ba0
|
||||
#define USB_DEVICE_ID_SONY_PS5_CONTROLLER 0x0ce6
|
||||
#define USB_DEVICE_ID_SONY_MOTION_CONTROLLER 0x03d5
|
||||
#define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER 0x042f
|
||||
#define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER 0x0002
|
||||
|
1351
drivers/hid/hid-playstation.c
Normal file
1351
drivers/hid/hid-playstation.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -378,7 +378,7 @@ static int __configfs_open_file(struct inode *inode, struct file *file, int type
|
||||
|
||||
attr = to_attr(dentry);
|
||||
if (!attr)
|
||||
goto out_put_item;
|
||||
goto out_free_buffer;
|
||||
|
||||
if (type & CONFIGFS_ITEM_BIN_ATTR) {
|
||||
buffer->bin_attr = to_bin_attr(dentry);
|
||||
@ -391,7 +391,7 @@ static int __configfs_open_file(struct inode *inode, struct file *file, int type
|
||||
/* Grab the module reference for this attribute if we have one */
|
||||
error = -ENODEV;
|
||||
if (!try_module_get(buffer->owner))
|
||||
goto out_put_item;
|
||||
goto out_free_buffer;
|
||||
|
||||
error = -EACCES;
|
||||
if (!buffer->item->ci_type)
|
||||
@ -435,8 +435,6 @@ static int __configfs_open_file(struct inode *inode, struct file *file, int type
|
||||
|
||||
out_put_module:
|
||||
module_put(buffer->owner);
|
||||
out_put_item:
|
||||
config_item_put(buffer->item);
|
||||
out_free_buffer:
|
||||
up_read(&frag->frag_sem);
|
||||
kfree(buffer);
|
||||
|
@ -12,7 +12,8 @@
|
||||
#define VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE (1024 * 256)
|
||||
#define VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE (1024 * 4)
|
||||
#define VIRTIO_VSOCK_MAX_BUF_SIZE 0xFFFFFFFFUL
|
||||
#define VIRTIO_VSOCK_MAX_PKT_BUF_SIZE (1024 * 64)
|
||||
#define VIRTIO_VSOCK_MAX_PKT_BUF_SIZE virtio_transport_max_vsock_pkt_buf_size
|
||||
extern uint virtio_transport_max_vsock_pkt_buf_size;
|
||||
|
||||
enum {
|
||||
VSOCK_VQ_RX = 0, /* for host to guest data */
|
||||
|
@ -29,6 +29,10 @@
|
||||
/* Threshold for detecting small packets to copy */
|
||||
#define GOOD_COPY_LEN 128
|
||||
|
||||
uint virtio_transport_max_vsock_pkt_buf_size = 64 * 1024;
|
||||
module_param(virtio_transport_max_vsock_pkt_buf_size, uint, 0444);
|
||||
EXPORT_SYMBOL_GPL(virtio_transport_max_vsock_pkt_buf_size);
|
||||
|
||||
static const struct virtio_transport *virtio_transport_get_ops(void)
|
||||
{
|
||||
const struct vsock_transport *t = vsock_core_get_transport();
|
||||
|
Loading…
Reference in New Issue
Block a user