summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0301-vchiq_arm-Add-completion-records-under-the-mutex.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-06-08 11:59:37 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-06-08 21:23:21 +0200
commit3fc661a98c8046a27dcf45a63049ee6605ebd364 (patch)
tree0468b8f3c8d4aa13ecce333ab3ad84146263cbc4 /target/linux/brcm2708/patches-4.4/0301-vchiq_arm-Add-completion-records-under-the-mutex.patch
parentc17f02d2f272c6d74b20c2df050437f761d013a6 (diff)
downloadmaster-31e0f0ae-3fc661a98c8046a27dcf45a63049ee6605ebd364.tar.gz
master-31e0f0ae-3fc661a98c8046a27dcf45a63049ee6605ebd364.tar.bz2
master-31e0f0ae-3fc661a98c8046a27dcf45a63049ee6605ebd364.zip
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Also alphabetically order sound-soc kernel packages. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0301-vchiq_arm-Add-completion-records-under-the-mutex.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0301-vchiq_arm-Add-completion-records-under-the-mutex.patch63
1 files changed, 0 insertions, 63 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0301-vchiq_arm-Add-completion-records-under-the-mutex.patch b/target/linux/brcm2708/patches-4.4/0301-vchiq_arm-Add-completion-records-under-the-mutex.patch
deleted file mode 100644
index 399e80e27e..0000000000
--- a/target/linux/brcm2708/patches-4.4/0301-vchiq_arm-Add-completion-records-under-the-mutex.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 48b162fd15cc5a39d244f7c339786df4aa4c2c4d Mon Sep 17 00:00:00 2001
-From: Phil Elwell <phil@raspberrypi.org>
-Date: Thu, 21 Apr 2016 13:49:32 +0100
-Subject: [PATCH 301/304] vchiq_arm: Add completion records under the mutex
-
-An issue was observed when flushing openmax components
-which generate a large number of messages returning
-buffers to host.
-
-We occasionally found a duplicate message from 16
-messages prior, resulting in a buffer returned twice.
-
-While only one thread adds completions, without the
-mutex you don't get the protection of the automatic
-memory barrier you get with synchronisation objects.
-
-Signed-off-by: Phil Elwell <phil@raspberrypi.org>
----
- drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
---- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c
-+++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c
-@@ -210,6 +210,8 @@ add_completion(VCHIQ_INSTANCE_T instance
- VCHIQ_COMPLETION_DATA_T *completion;
- DEBUG_INITIALISE(g_state.local)
-
-+ mutex_lock(&instance->completion_mutex);
-+
- while (instance->completion_insert ==
- (instance->completion_remove + MAX_COMPLETIONS)) {
- /* Out of space - wait for the client */
-@@ -217,11 +219,17 @@ add_completion(VCHIQ_INSTANCE_T instance
- vchiq_log_trace(vchiq_arm_log_level,
- "add_completion - completion queue full");
- DEBUG_COUNT(COMPLETION_QUEUE_FULL_COUNT);
-+
-+ mutex_unlock(&instance->completion_mutex);
- if (down_interruptible(&instance->remove_event) != 0) {
- vchiq_log_info(vchiq_arm_log_level,
- "service_callback interrupted");
- return VCHIQ_RETRY;
-- } else if (instance->closing) {
-+ }
-+
-+ mutex_lock(&instance->completion_mutex);
-+ if (instance->closing) {
-+ mutex_unlock(&instance->completion_mutex);
- vchiq_log_info(vchiq_arm_log_level,
- "service_callback closing");
- return VCHIQ_SUCCESS;
-@@ -254,8 +262,11 @@ add_completion(VCHIQ_INSTANCE_T instance
- if (reason == VCHIQ_MESSAGE_AVAILABLE)
- user_service->message_available_pos =
- instance->completion_insert;
-+
- instance->completion_insert++;
-
-+ mutex_unlock(&instance->completion_mutex);
-+
- up(&instance->insert_event);
-
- return VCHIQ_SUCCESS;