summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/Kconfig6
-rw-r--r--drivers/Makefile3
-rw-r--r--drivers/android/binder.c196
-rw-r--r--drivers/android/binder_alloc.c29
-rw-r--r--drivers/android/binder_alloc.h4
-rw-r--r--drivers/auxdisplay/img-ascii-lcd.c4
-rw-r--r--drivers/base/regmap/Kconfig4
-rw-r--r--drivers/base/regmap/Makefile1
-rw-r--r--drivers/base/regmap/regmap-slimbus.c80
-rw-r--r--drivers/char/lp.c69
-rw-r--r--drivers/char/mem.c27
-rw-r--r--drivers/char/xillybus/Kconfig4
-rw-r--r--drivers/char/xillybus/xillybus_of.c12
-rw-r--r--drivers/eisa/eisa-bus.c62
-rw-r--r--drivers/eisa/pci_eisa.c10
-rw-r--r--drivers/eisa/virtual_root.c19
-rw-r--r--drivers/extcon/extcon-adc-jack.c2
-rw-r--r--drivers/extcon/extcon-axp288.c36
-rw-r--r--drivers/extcon/extcon-max77693.c2
-rw-r--r--drivers/extcon/extcon-max8997.c2
-rw-r--r--drivers/fpga/Kconfig103
-rw-r--r--drivers/fpga/Makefile1
-rw-r--r--drivers/fpga/fpga-bridge.c113
-rw-r--r--drivers/fpga/fpga-mgr.c123
-rw-r--r--drivers/fpga/fpga-region.c464
-rw-r--r--drivers/fpga/of-fpga-region.c504
-rw-r--r--drivers/fpga/socfpga-a10.c8
-rw-r--r--drivers/fsi/Kconfig6
-rw-r--r--drivers/hv/hv.c3
-rw-r--r--drivers/hv/vmbus_drv.c40
-rw-r--r--drivers/hwtracing/coresight/coresight-dynamic-replicator.c4
-rw-r--r--drivers/hwtracing/coresight/coresight-etb10.c1
-rw-r--r--drivers/hwtracing/coresight/coresight-funnel.c4
-rw-r--r--drivers/hwtracing/coresight/coresight-tpiu.c17
-rw-r--r--drivers/hwtracing/coresight/coresight.c25
-rw-r--r--drivers/misc/Kconfig4
-rw-r--r--drivers/misc/ad525x_dpot.c30
-rw-r--r--drivers/misc/ad525x_dpot.h12
-rw-r--r--drivers/misc/apds990x.c11
-rw-r--r--drivers/misc/ds1682.c35
-rw-r--r--drivers/misc/eeprom/at25.c3
-rw-r--r--drivers/misc/enclosure.c12
-rw-r--r--drivers/misc/fsa9480.c1
-rw-r--r--drivers/misc/genwqe/card_base.c16
-rw-r--r--drivers/misc/genwqe/card_base.h20
-rw-r--r--drivers/misc/genwqe/card_ddcb.c22
-rw-r--r--drivers/misc/genwqe/card_debugfs.c2
-rw-r--r--drivers/misc/genwqe/card_dev.c19
-rw-r--r--drivers/misc/genwqe/card_utils.c25
-rw-r--r--drivers/misc/hpilo.c5
-rw-r--r--drivers/misc/hpilo.h5
-rw-r--r--drivers/misc/ics932s401.c8
-rw-r--r--drivers/misc/isl29003.c7
-rw-r--r--drivers/misc/lkdtm_core.c2
-rw-r--r--drivers/misc/lkdtm_heap.c4
-rw-r--r--drivers/misc/mei/bus.c10
-rw-r--r--drivers/misc/mei/hw-me.c4
-rw-r--r--drivers/misc/mei/hw-txe.c4
-rw-r--r--drivers/misc/mei/init.c4
-rw-r--r--drivers/misc/mei/pci-me.c5
-rw-r--r--drivers/misc/mic/vop/vop_vringh.c22
-rw-r--r--drivers/misc/vexpress-syscfg.c4
-rw-r--r--drivers/mux/Kconfig1
-rw-r--r--drivers/mux/Makefile1
-rw-r--r--drivers/mux/adg792a.c5
-rw-r--r--drivers/mux/core.c5
-rw-r--r--drivers/mux/gpio.c5
-rw-r--r--drivers/mux/mmio.c5
-rw-r--r--drivers/nvmem/core.c17
-rw-r--r--drivers/nvmem/rockchip-efuse.c70
-rw-r--r--drivers/nvmem/uniphier-efuse.c10
-rw-r--r--drivers/siox/Kconfig18
-rw-r--r--drivers/siox/Makefile2
-rw-r--r--drivers/siox/siox-bus-gpio.c172
-rw-r--r--drivers/siox/siox-core.c934
-rw-r--r--drivers/siox/siox.h49
-rw-r--r--drivers/slimbus/Kconfig24
-rw-r--r--drivers/slimbus/Makefile10
-rw-r--r--drivers/slimbus/core.c480
-rw-r--r--drivers/slimbus/messaging.c332
-rw-r--r--drivers/slimbus/qcom-ctrl.c747
-rw-r--r--drivers/slimbus/sched.c121
-rw-r--r--drivers/slimbus/slimbus.h261
-rw-r--r--drivers/soundwire/Kconfig37
-rw-r--r--drivers/soundwire/Makefile18
-rw-r--r--drivers/soundwire/bus.c997
-rw-r--r--drivers/soundwire/bus.h71
-rw-r--r--drivers/soundwire/bus_type.c193
-rw-r--r--drivers/soundwire/cadence_master.c751
-rw-r--r--drivers/soundwire/cadence_master.h48
-rw-r--r--drivers/soundwire/intel.c345
-rw-r--r--drivers/soundwire/intel.h23
-rw-r--r--drivers/soundwire/intel_init.c198
-rw-r--r--drivers/soundwire/mipi_disco.c401
-rw-r--r--drivers/soundwire/slave.c114
-rw-r--r--drivers/uio/uio_hv_generic.c138
-rw-r--r--drivers/virt/Kconfig1
-rw-r--r--drivers/virt/Makefile1
-rw-r--r--drivers/virt/vboxguest/Kconfig18
-rw-r--r--drivers/virt/vboxguest/Makefile3
-rw-r--r--drivers/virt/vboxguest/vboxguest_core.c1571
-rw-r--r--drivers/virt/vboxguest/vboxguest_core.h174
-rw-r--r--drivers/virt/vboxguest/vboxguest_linux.c466
-rw-r--r--drivers/virt/vboxguest/vboxguest_utils.c803
-rw-r--r--drivers/virt/vboxguest/vboxguest_version.h19
-rw-r--r--drivers/virt/vboxguest/vmmdev.h449
-rw-r--r--drivers/vme/vme.c2
107 files changed, 11461 insertions, 933 deletions
diff --git a/drivers/Kconfig b/drivers/Kconfig
index ef5fb8395d76..879dc0604cba 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -153,6 +153,8 @@ source "drivers/remoteproc/Kconfig"
source "drivers/rpmsg/Kconfig"
+source "drivers/soundwire/Kconfig"
+
source "drivers/soc/Kconfig"
source "drivers/devfreq/Kconfig"
@@ -213,4 +215,8 @@ source "drivers/opp/Kconfig"
source "drivers/visorbus/Kconfig"
+source "drivers/siox/Kconfig"
+
+source "drivers/slimbus/Kconfig"
+
endmenu
diff --git a/drivers/Makefile b/drivers/Makefile
index 7a2330077e47..7a0438744053 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -87,6 +87,7 @@ obj-$(CONFIG_MTD) += mtd/
obj-$(CONFIG_SPI) += spi/
obj-$(CONFIG_SPMI) += spmi/
obj-$(CONFIG_HSI) += hsi/
+obj-$(CONFIG_SLIMBUS) += slimbus/
obj-y += net/
obj-$(CONFIG_ATM) += atm/
obj-$(CONFIG_FUSION) += message/
@@ -157,6 +158,7 @@ obj-$(CONFIG_MAILBOX) += mailbox/
obj-$(CONFIG_HWSPINLOCK) += hwspinlock/
obj-$(CONFIG_REMOTEPROC) += remoteproc/
obj-$(CONFIG_RPMSG) += rpmsg/
+obj-$(CONFIG_SOUNDWIRE) += soundwire/
# Virtualization drivers
obj-$(CONFIG_VIRT_DRIVERS) += virt/
@@ -185,3 +187,4 @@ obj-$(CONFIG_FSI) += fsi/
obj-$(CONFIG_TEE) += tee/
obj-$(CONFIG_MULTIPLEXER) += mux/
obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
+obj-$(CONFIG_SIOX) += siox/
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index cc89d0d2b965..d21040c5d343 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -141,7 +141,7 @@ enum {
};
static uint32_t binder_debug_mask = BINDER_DEBUG_USER_ERROR |
BINDER_DEBUG_FAILED_TRANSACTION | BINDER_DEBUG_DEAD_TRANSACTION;
-module_param_named(debug_mask, binder_debug_mask, uint, S_IWUSR | S_IRUGO);
+module_param_named(debug_mask, binder_debug_mask, uint, 0644);
static char *binder_devices_param = CONFIG_ANDROID_BINDER_DEVICES;
module_param_named(devices, binder_devices_param, charp, 0444);
@@ -160,7 +160,7 @@ static int binder_set_stop_on_user_error(const char *val,
return ret;
}
module_param_call(stop_on_user_error, binder_set_stop_on_user_error,
- param_get_int, &binder_stop_on_user_error, S_IWUSR | S_IRUGO);
+ param_get_int, &binder_stop_on_user_error, 0644);
#define binder_debug(mask, x...) \
do { \
@@ -249,7 +249,7 @@ static struct binder_transaction_log_entry *binder_transaction_log_add(
unsigned int cur = atomic_inc_return(&log->cur);
if (cur >= ARRAY_SIZE(log->entry))
- log->full = 1;
+ log->full = true;
e = &log->entry[cur % ARRAY_SIZE(log->entry)];
WRITE_ONCE(e->debug_id_done, 0);
/*
@@ -493,8 +493,6 @@ enum binder_deferred_state {
* (protected by @inner_lock)
* @todo: list of work for this process
* (protected by @inner_lock)
- * @wait: wait queue head to wait for proc work
- * (invariant after initialized)
* @stats: per-process binder statistics
* (atomics, no lock needed)
* @delivered_death: list of delivered death notification
@@ -537,7 +535,6 @@ struct binder_proc {
bool is_dead;
struct list_head todo;
- wait_queue_head_t wait;
struct binder_stats stats;
struct list_head delivered_death;
int max_threads;
@@ -579,6 +576,8 @@ enum {
* (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
@@ -604,6 +603,7 @@ struct binder_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;
@@ -789,6 +789,16 @@ static bool binder_worklist_empty(struct binder_proc *proc,
return ret;
}
+/**
+ * binder_enqueue_work_ilocked() - Add an item to the work list
+ * @work: struct binder_work to add to list
+ * @target_list: list to add work to
+ *
+ * Adds the work to the specified list. Asserts that work
+ * is not already on a list.
+ *
+ * Requires the proc->inner_lock to be held.
+ */
static void
binder_enqueue_work_ilocked(struct binder_work *work,
struct list_head *target_list)
@@ -799,22 +809,56 @@ binder_enqueue_work_ilocked(struct binder_work *work,
}
/**
- * binder_enqueue_work() - Add an item to the work list
- * @proc: binder_proc associated with list
+ * binder_enqueue_deferred_thread_work_ilocked() - Add deferred thread work
+ * @thread: thread to queue work to
* @work: struct binder_work to add to list
- * @target_list: list to add work to
*
- * Adds the work to the specified list. Asserts that work
- * is not already on a list.
+ * Adds the work to the todo list of the thread. Doesn't set the process_todo
+ * flag, which means that (if it wasn't already set) the thread will go to
+ * sleep without handling this work when it calls read.
+ *
+ * Requires the proc->inner_lock to be held.
*/
static void
-binder_enqueue_work(struct binder_proc *proc,
- struct binder_work *work,
- struct list_head *target_list)
+binder_enqueue_deferred_thread_work_ilocked(struct binder_thread *thread,
+ struct binder_work *work)
{
- binder_inner_proc_lock(proc);
- binder_enqueue_work_ilocked(work, target_list);
- binder_inner_proc_unlock(proc);
+ binder_enqueue_work_ilocked(work, &thread->todo);
+}
+
+/**
+ * binder_enqueue_thread_work_ilocked() - Add an item to the thread work list
+ * @thread: thread to queue work to
+ * @work: struct binder_work to add to list
+ *
+ * Adds the work to the todo list of the thread, and enables processing
+ * of the todo queue.
+ *
+ * Requires the proc->inner_lock to be held.
+ */
+static void
+binder_enqueue_thread_work_ilocked(struct binder_thread *thread,
+ struct binder_work *work)
+{
+ binder_enqueue_work_ilocked(work, &thread->todo);
+ thread->process_todo = true;
+}
+
+/**
+ * binder_enqueue_thread_work() - Add an item to the thread work list
+ * @thread: thread to queue work to
+ * @work: struct binder_work to add to list
+ *
+ * Adds the work to the todo list of the thread, and enables processing
+ * of the todo queue.
+ */
+static void
+binder_enqueue_thread_work(struct binder_thread *thread,
+ struct binder_work *work)
+{
+ binder_inner_proc_lock(thread->proc);
+ binder_enqueue_thread_work_ilocked(thread, work);
+ binder_inner_proc_unlock(thread->proc);
}
static void
@@ -940,7 +984,7 @@ err:
static bool binder_has_work_ilocked(struct binder_thread *thread,
bool do_proc_work)
{
- return !binder_worklist_empty_ilocked(&thread->todo) ||
+ return thread->process_todo ||
thread->looper_need_return ||
(do_proc_work &&
!binder_worklist_empty_ilocked(&thread->proc->todo));
@@ -1228,6 +1272,17 @@ static int binder_inc_node_nilocked(struct binder_node *node, int strong,
node->local_strong_refs++;
if (!node->has_strong_ref && target_list) {
binder_dequeue_work_ilocked(&node->work);
+ /*
+ * Note: this function is the only place where we queue
+ * directly to a thread->todo without using the
+ * corresponding binder_enqueue_thread_work() helper
+ * functions; in this case it's ok to not set the
+ * process_todo flag, since we know this node work will
+ * always be followed by other work that starts queue
+ * processing: in case of synchronous transactions, a
+ * BR_REPLY or BR_ERROR; in case of oneway
+ * transactions, a BR_TRANSACTION_COMPLETE.
+ */
binder_enqueue_work_ilocked(&node->work, target_list);
}
} else {
@@ -1239,6 +1294,9 @@ static int binder_inc_node_nilocked(struct binder_node *node, int strong,
node->debug_id);
return -EINVAL;
}
+ /*
+ * See comment above
+ */
binder_enqueue_work_ilocked(&node->work, target_list);
}
}
@@ -1928,9 +1986,9 @@ static void binder_send_failed_reply(struct binder_transaction *t,
binder_pop_transaction_ilocked(target_thread, t);
if (target_thread->reply_error.cmd == BR_OK) {
target_thread->reply_error.cmd = error_code;
- binder_enqueue_work_ilocked(
- &target_thread->reply_error.work,
- &target_thread->todo);
+ binder_enqueue_thread_work_ilocked(
+ target_thread,
+ &target_thread->reply_error.work);
wake_up_interruptible(&target_thread->wait);
} else {
WARN(1, "Unexpected reply error: %u\n",
@@ -2569,20 +2627,18 @@ static bool binder_proc_transaction(struct binder_transaction *t,
struct binder_proc *proc,
struct binder_thread *thread)
{
- struct list_head *target_list = NULL;
struct binder_node *node = t->buffer->target_node;
bool oneway = !!(t->flags & TF_ONE_WAY);
- bool wakeup = true;
+ bool pending_async = false;
BUG_ON(!node);
binder_node_lock(node);
if (oneway) {
BUG_ON(thread);
if (node->has_async_transaction) {
- target_list = &node->async_todo;
- wakeup = false;
+ pending_async = true;
} else {
- node->has_async_transaction = 1;
+ node->has_async_transaction = true;
}
}
@@ -2594,19 +2650,17 @@ static bool binder_proc_transaction(struct binder_transaction *t,
return false;
}
- if (!thread && !target_list)
+ if (!thread && !pending_async)
thread = binder_select_thread_ilocked(proc);
if (thread)
- target_list = &thread->todo;
- else if (!target_list)
- target_list = &proc->todo;
+ binder_enqueue_thread_work_ilocked(thread, &t->work);
+ else if (!pending_async)
+ binder_enqueue_work_ilocked(&t->work, &proc-&g