From patchwork Wed Dec 12 18:51:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 10726959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F2D23E9D for ; Wed, 12 Dec 2018 18:55:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E9BD28760 for ; Wed, 12 Dec 2018 18:55:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42F452A5B7; Wed, 12 Dec 2018 18:55:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B0452A514 for ; Wed, 12 Dec 2018 18:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lN1Lcr22HlBEJXEWezQGxpHTxQg8ST+V1/iTGRCQPQM=; b=AJ/dYQMV6p73Zg +TQVs00ec94DNeqMebyUsVATkYoTVjbwxdzApPbKmEyhlah/wh/XjMws4ZSbManmiD14tOPQkP4xC 87iWMYLZ1L2Fxq1zg1sQMRF4bKjeXROOrRTev9pp6BIMspsbLz2/HCbqc9e2fdxdfMKnc06hvtBCA 2TveFZuq3CEQkZFjJmtEoyAdK6sZDG5KFs9Hp7hi/6ID6QeyX3EmzLX2ioqLiWD/aUG7pwilIAU63 j7X+U+rtjSG94uHwR7uQ5qPNxHBrVk7AHAIcI1dzWefT8Bnwgb2Otnl2haoezPnmCDqc9xak2bMXe /MVXyuD2Vn1piv1y2Dqw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gX9fQ-00021d-OP; Wed, 12 Dec 2018 18:55:32 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gX9eb-0008IT-5K; Wed, 12 Dec 2018 18:54:44 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 80BDEAF1A; Wed, 12 Dec 2018 18:54:26 +0000 (UTC) From: Nicolas Saenz Julienne To: linux-kernel@vger.kernel.org Subject: [PATCH 1/3] staging: vchiq: switch to wait_for_completion_killable Date: Wed, 12 Dec 2018 19:51:33 +0100 Message-Id: <20181212185136.6620-2-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181212185136.6620-1-nsaenzjulienne@suse.de> References: <20181212185136.6620-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181212_105441_613749_54FE3CF9 X-CRM114-Status: GOOD ( 13.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefan.wahren@i2se.com, devel@driverdev.osuosl.org, arnd@arndb.de, gregkh@linuxfoundation.org, eric@anholt.net, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This fixes f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") as it neglected the subtle down_interruptible() macro override in vchiq_killable.h. Hence all completions should be killable instead of interruptible. Fixes: f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") Reported-by: Arnd Bergmann Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 21 +++++++++---------- .../interface/vchiq_arm/vchiq_core.c | 21 +++++++++---------- .../interface/vchiq_arm/vchiq_util.c | 6 +++--- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index f28f681192dd..227c208dd122 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -559,8 +559,7 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, vchiq_log_trace(vchiq_arm_log_level, "%s - completion queue full", __func__); DEBUG_COUNT(COMPLETION_QUEUE_FULL_COUNT); - if (wait_for_completion_interruptible( - &instance->remove_event)) { + if (wait_for_completion_killable( &instance->remove_event)) { vchiq_log_info(vchiq_arm_log_level, "service_callback interrupted"); return VCHIQ_RETRY; @@ -671,7 +670,7 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header, } DEBUG_TRACE(SERVICE_CALLBACK_LINE); - if (wait_for_completion_interruptible( + if (wait_for_completion_killable( &user_service->remove_event) != 0) { vchiq_log_info(vchiq_arm_log_level, @@ -1006,7 +1005,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) has been closed until the client library calls the CLOSE_DELIVERED ioctl, signalling close_event. */ if (user_service->close_pending && - wait_for_completion_interruptible( + wait_for_completion_killable( &user_service->close_event)) status = VCHIQ_RETRY; break; @@ -1182,7 +1181,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) DEBUG_TRACE(AWAIT_COMPLETION_LINE); mutex_unlock(&instance->completion_mutex); - rc = wait_for_completion_interruptible( + rc = wait_for_completion_killable( &instance->insert_event); mutex_lock(&instance->completion_mutex); if (rc != 0) { @@ -1351,7 +1350,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) do { spin_unlock(&msg_queue_spinlock); DEBUG_TRACE(DEQUEUE_MESSAGE_LINE); - if (wait_for_completion_interruptible( + if (wait_for_completion_killable( &user_service->insert_event)) { vchiq_log_info(vchiq_arm_log_level, "DEQUEUE_MESSAGE interrupted"); @@ -2356,7 +2355,7 @@ vchiq_keepalive_thread_func(void *v) while (1) { long rc = 0, uc = 0; - if (wait_for_completion_interruptible(&arm_state->ka_evt) + if (wait_for_completion_killable(&arm_state->ka_evt) != 0) { vchiq_log_error(vchiq_susp_log_level, "%s interrupted", __func__); @@ -2606,7 +2605,7 @@ block_resume(VCHIQ_ARM_STATE_T *arm_state) write_unlock_bh(&arm_state->susp_res_lock); vchiq_log_info(vchiq_susp_log_level, "%s wait for previously " "blocked clients", __func__); - if (wait_for_completion_interruptible_timeout( + if (wait_for_completion_killable_timeout( &arm_state->blocked_blocker, timeout_val) <= 0) { vchiq_log_error(vchiq_susp_log_level, "%s wait for " @@ -2632,7 +2631,7 @@ block_resume(VCHIQ_ARM_STATE_T *arm_state) write_unlock_bh(&arm_state->susp_res_lock); vchiq_log_info(vchiq_susp_log_level, "%s wait for resume", __func__); - if (wait_for_completion_interruptible_timeout( + if (wait_for_completion_killable_timeout( &arm_state->vc_resume_complete, timeout_val) <= 0) { vchiq_log_error(vchiq_susp_log_level, "%s wait for " @@ -2839,7 +2838,7 @@ vchiq_arm_force_suspend(VCHIQ_STATE_T *state) do { write_unlock_bh(&arm_state->susp_res_lock); - rc = wait_for_completion_interruptible_timeout( + rc = wait_for_completion_killable_timeout( &arm_state->vc_suspend_complete, msecs_to_jiffies(FORCE_SUSPEND_TIMEOUT_MS)); @@ -2935,7 +2934,7 @@ vchiq_arm_allow_resume(VCHIQ_STATE_T *state) write_unlock_bh(&arm_state->susp_res_lock); if (resume) { - if (wait_for_completion_interruptible( + if (wait_for_completion_killable( &arm_state->vc_resume_complete) < 0) { vchiq_log_error(vchiq_susp_log_level, "%s interrupted", __func__); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 5ee667d46eb5..afe2aa5ac3e9 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -592,7 +592,7 @@ reserve_space(VCHIQ_STATE_T *state, size_t space, int is_blocking) remote_event_signal(&state->remote->trigger); if (!is_blocking || - (wait_for_completion_interruptible( + (wait_for_completion_killable( &state->slot_available_event))) return NULL; /* No space available */ } @@ -862,7 +862,7 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, spin_unlock("a_spinlock); mutex_unlock(&state->slot_mutex); - if (wait_for_completion_interruptible( + if (wait_for_completion_killable( &state->data_quota_event)) return VCHIQ_RETRY; @@ -893,7 +893,7 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, service_quota->slot_use_count); VCHIQ_SERVICE_STATS_INC(service, quota_stalls); mutex_unlock(&state->slot_mutex); - if (wait_for_completion_interruptible( + if (wait_for_completion_killable( &service_quota->quota_event)) return VCHIQ_RETRY; if (service->closing) @@ -1742,8 +1742,7 @@ parse_rx_slots(VCHIQ_STATE_T *state) &service->bulk_rx : &service->bulk_tx; DEBUG_TRACE(PARSE_LINE); - if (mutex_lock_killable( - &service->bulk_mutex) != 0) { + if (mutex_lock_killable(&service->bulk_mutex)) { DEBUG_TRACE(PARSE_LINE); goto bail_not_ready; } @@ -2468,7 +2467,7 @@ vchiq_open_service_internal(VCHIQ_SERVICE_T *service, int client_id) QMFLAGS_IS_BLOCKING); if (status == VCHIQ_SUCCESS) { /* Wait for the ACK/NAK */ - if (wait_for_completion_interruptible(&service->remove_event)) { + if (wait_for_completion_killable(&service->remove_event)) { status = VCHIQ_RETRY; vchiq_release_service_internal(service); } else if ((service->srvstate != VCHIQ_SRVSTATE_OPEN) && @@ -2835,7 +2834,7 @@ vchiq_connect_internal(VCHIQ_STATE_T *state, VCHIQ_INSTANCE_T instance) } if (state->conn_state == VCHIQ_CONNSTATE_CONNECTING) { - if (wait_for_completion_interruptible(&state->connect)) + if (wait_for_completion_killable(&state->connect)) return VCHIQ_RETRY; vchiq_set_conn_state(state, VCHIQ_CONNSTATE_CONNECTED); @@ -2934,7 +2933,7 @@ vchiq_close_service(VCHIQ_SERVICE_HANDLE_T handle) } while (1) { - if (wait_for_completion_interruptible(&service->remove_event)) { + if (wait_for_completion_killable(&service->remove_event)) { status = VCHIQ_RETRY; break; } @@ -2995,7 +2994,7 @@ vchiq_remove_service(VCHIQ_SERVICE_HANDLE_T handle) request_poll(service->state, service, VCHIQ_POLL_REMOVE); } while (1) { - if (wait_for_completion_interruptible(&service->remove_event)) { + if (wait_for_completion_killable(&service->remove_event)) { status = VCHIQ_RETRY; break; } @@ -3078,7 +3077,7 @@ VCHIQ_STATUS_T vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle, VCHIQ_SERVICE_STATS_INC(service, bulk_stalls); do { mutex_unlock(&service->bulk_mutex); - if (wait_for_completion_interruptible( + if (wait_for_completion_killable( &service->bulk_remove_event)) { status = VCHIQ_RETRY; goto error_exit; @@ -3155,7 +3154,7 @@ VCHIQ_STATUS_T vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle, if (bulk_waiter) { bulk_waiter->bulk = bulk; - if (wait_for_completion_interruptible(&bulk_waiter->event)) + if (wait_for_completion_killable(&bulk_waiter->event)) status = VCHIQ_RETRY; else if (bulk_waiter->actual == VCHIQ_BULK_ACTUAL_ABORTED) status = VCHIQ_ERROR; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c index 4b8554bc647e..42e10d7d97a4 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c @@ -80,7 +80,7 @@ void vchiu_queue_push(VCHIU_QUEUE_T *queue, VCHIQ_HEADER_T *header) return; while (queue->write == queue->read + queue->size) { - if (wait_for_completion_interruptible(&queue->pop)) + if (wait_for_completion_killable(&queue->pop)) flush_signals(current); } @@ -93,7 +93,7 @@ void vchiu_queue_push(VCHIU_QUEUE_T *queue, VCHIQ_HEADER_T *header) VCHIQ_HEADER_T *vchiu_queue_peek(VCHIU_QUEUE_T *queue) { while (queue->write == queue->read) { - if (wait_for_completion_interruptible(&queue->push)) + if (wait_for_completion_killable(&queue->push)) flush_signals(current); } @@ -107,7 +107,7 @@ VCHIQ_HEADER_T *vchiu_queue_pop(VCHIU_QUEUE_T *queue) VCHIQ_HEADER_T *header; while (queue->write == queue->read) { - if (wait_for_completion_interruptible(&queue->push)) + if (wait_for_completion_killable(&queue->push)) flush_signals(current); } From patchwork Wed Dec 12 18:51:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 10726947 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 455EE112E for ; Wed, 12 Dec 2018 18:54:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3922E2A5B7 for ; Wed, 12 Dec 2018 18:54:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B9A52A7CA; Wed, 12 Dec 2018 18:54:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B14CA2A514 for ; Wed, 12 Dec 2018 18:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=atVA5qtgCEHOJNEnKfdW4uH1Bs9YG49FbnqEsbstxzk=; b=oWI4kS3ikJ08x5 orplYDnrmJVNHe6lRns5yVrGXPXqvJWPAhuDz//7eM5GL83Pl8SKlkWstkFqrHtHStoE7Awt+dEXG KMZh9CClNpQ7TmvXOr6YZstc2K2bj5zeGmx9I3iNzPb9OTPjczuWBh/x22HuigREkpXluqggi+k/R tQLMXhocODAP96Uj9m5sKzTfD0URp/yC3W2ZV9iAGQXUs+OZdd26ny6Qa7xAiMlOj6OnoSjHs5MWq FZ7CQOgJN3j/glZmWTMrgo0tvXFzqOpkO7xnD5zwt6a0aK8+Rgdt6YnFnS7GfoTzxDiYTwmmzqTKA XJQKJV4SxQM60DndUt/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gX9ee-0008M9-1n; Wed, 12 Dec 2018 18:54:44 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gX9eb-0008IS-5L; Wed, 12 Dec 2018 18:54:42 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 857FBAF81; Wed, 12 Dec 2018 18:54:27 +0000 (UTC) From: Nicolas Saenz Julienne To: linux-kernel@vger.kernel.org Subject: [PATCH 2/3] staging: vchiq_2835_arm: quit using custom down_interruptible() Date: Wed, 12 Dec 2018 19:51:34 +0100 Message-Id: <20181212185136.6620-3-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181212185136.6620-1-nsaenzjulienne@suse.de> References: <20181212185136.6620-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181212_105441_455819_AB0A376D X-CRM114-Status: GOOD ( 10.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefan.wahren@i2se.com, devel@driverdev.osuosl.org, arnd@arndb.de, gregkh@linuxfoundation.org, eric@anholt.net, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP vchi_killable.h overrides down_interruptible() by implementing a function similar to down_killable(). To make things simpler we turn calls to down_interruptible() into kernel's implementation of down_killable(). Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index ecee54a31f8d..691038cdfdab 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -543,7 +543,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type) (g_cache_line_size - 1)))) { char *fragments; - if (down_interruptible(&g_free_fragments_sema) != 0) { + if (down_killable(&g_free_fragments_sema)) { cleanup_pagelistinfo(pagelistinfo); return NULL; } From patchwork Wed Dec 12 18:51:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 10726957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3FF1112E for ; Wed, 12 Dec 2018 18:55:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B64EB28760 for ; Wed, 12 Dec 2018 18:55:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA83F2A5B7; Wed, 12 Dec 2018 18:55:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 289F128760 for ; Wed, 12 Dec 2018 18:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LduOJqX5iaMR4DOgdMmto2n/dRPBHQj3oLRO97CKQKk=; b=uPwqidbXx6b4xQ zXGlcTTPrkOJ1iVkbPZjwTwO8WjqDL6ZIEZU1tDnDWkYkFFSM481AUP+Wtt9aP9LTwwLaq7EDchUP j2TW7oy91I1n80sCd1EO+GE2qEmpZMVg996V+nhyEkOhzjuqvHsiKxub6jDtUpYh1ttLf9HbM7FQn vyRURJTqc34HlokzMAhHh6eg76EUCMWT6Ut/bQ9QY6iBGJxyqlVAH/PncHBEySD/6oNuaI6oLG6re j5KDDWjFmI7y+IX457wsEj00yhlQfi6Z9TOfdWhs7QGzejzQSqNQ5F2Wi1ZMuYYXSo+XkA8D6TFcf 5CTINVLb+qdpuRK2hOXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gX9fC-0001Cm-3q; Wed, 12 Dec 2018 18:55:18 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gX9eb-0008Id-5K; Wed, 12 Dec 2018 18:54:44 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AC0A8AF88; Wed, 12 Dec 2018 18:54:29 +0000 (UTC) From: Nicolas Saenz Julienne To: linux-kernel@vger.kernel.org Subject: [PATCH 3/3] staging: vchiq: delete vchiq_killable.h Date: Wed, 12 Dec 2018 19:51:35 +0100 Message-Id: <20181212185136.6620-4-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181212185136.6620-1-nsaenzjulienne@suse.de> References: <20181212185136.6620-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181212_105441_598586_8AD23B4C X-CRM114-Status: GOOD ( 14.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefan.wahren@i2se.com, devel@driverdev.osuosl.org, arnd@arndb.de, gregkh@linuxfoundation.org, eric@anholt.net, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There are no users for that header file. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_2835_arm.c | 1 - .../interface/vchiq_arm/vchiq_arm.c | 1 - .../interface/vchiq_arm/vchiq_connected.c | 1 - .../interface/vchiq_arm/vchiq_core.c | 1 - .../interface/vchiq_arm/vchiq_killable.h | 55 ------------------- .../interface/vchiq_arm/vchiq_util.c | 1 - 6 files changed, 60 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index 691038cdfdab..66fbb9ff551a 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -48,7 +48,6 @@ #include "vchiq_arm.h" #include "vchiq_connected.h" -#include "vchiq_killable.h" #include "vchiq_pagelist.h" #define MAX_FRAGMENTS (VCHIQ_NUM_CURRENT_BULKS * 2) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 227c208dd122..acc7b07c7291 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -55,7 +55,6 @@ #include "vchiq_ioctl.h" #include "vchiq_arm.h" #include "vchiq_debugfs.h" -#include "vchiq_killable.h" #define DEVICE_NAME "vchiq" diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c index 7ea29665bd0c..7d64e2ed7b42 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -33,7 +33,6 @@ #include "vchiq_connected.h" #include "vchiq_core.h" -#include "vchiq_killable.h" #include #include diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index afe2aa5ac3e9..31e69b445b4c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -32,7 +32,6 @@ */ #include "vchiq_core.h" -#include "vchiq_killable.h" #define VCHIQ_SLOT_HANDLER_STACK 8192 diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h deleted file mode 100644 index 778063ba312a..000000000000 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) 2010-2012 Broadcom. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The names of the above-listed copyright holders may not be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2, as published by the Free - * Software Foundation. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef VCHIQ_KILLABLE_H -#define VCHIQ_KILLABLE_H - -#include -#include - -#define SHUTDOWN_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | sigmask(SIGQUIT) | sigmask(SIGTRAP) | sigmask(SIGSTOP) | sigmask(SIGCONT)) - -static inline int __must_check down_interruptible_killable(struct semaphore *sem) -{ - /* Allow interception of killable signals only. We don't want to be interrupted by harmless signals like SIGALRM */ - int ret; - sigset_t blocked, oldset; - siginitsetinv(&blocked, SHUTDOWN_SIGS); - sigprocmask(SIG_SETMASK, &blocked, &oldset); - ret = down_interruptible(sem); - sigprocmask(SIG_SETMASK, &oldset, NULL); - return ret; -} -#define down_interruptible down_interruptible_killable - -#endif diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c index 42e10d7d97a4..248a3170b42c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c @@ -32,7 +32,6 @@ */ #include "vchiq_util.h" -#include "vchiq_killable.h" static inline int is_pow2(int i) {