From patchwork Fri Jan 31 10:38:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359609 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2358C112B for ; Fri, 31 Jan 2020 10:39:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00CE8206F0 for ; Fri, 31 Jan 2020 10:39:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PjS+iWtP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00CE8206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=uj+JxI3pWxDBYcx4Vx/ycPrUQsQrf9CeOD+PSS5p6Do=; b=PjS+iWtPHLS+G0 Y5uGrGHvQgH9iJYQng4w8tvppcTm6qeiA4z/r9eye+ff3NvGVa6gdrqxK8LufqDP8L8+qTsNDXizj pG6h9mIjQnJxAJxQZA6Hr6ZNW5E29FU3GMmaHCoUUefFFwIXFRfoyFszuLfTXw9wlV3NnJAIGMteP Hh4SYaDVc8r2xW03Ky7HLzvcnf5aLTWsbIWaQpsrOqQfSxZFC19DwaH1YyLzap7qrNxLGmCLTauxv MDxSvn399rkfX0w1neCr6LVMg0CWo11FXhh8zH0fsyVAboAJMRneY5C3OPipXyRupdiyIv7PnrQO9 Um9j2+AcsCfjw6j/EFFg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThf-0003Vr-5g; Fri, 31 Jan 2020 10:39:11 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThb-0003TY-P7; Fri, 31 Jan 2020 10:39:09 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id F3F4BAF2D; Fri, 31 Jan 2020 10:39:04 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 01/21] staging: vc04_services: Remove unused variables in struct vchiq_arm_state Date: Fri, 31 Jan 2020 11:38:17 +0100 Message-Id: <20200131103836.14312-2-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023907_964164_DCA47341 X-CRM114-Status: GOOD ( 10.75 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There are not being used, so we're better off without them. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 19d2a2eefb6a..f0044289b6bc 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -53,8 +53,6 @@ struct vchiq_arm_state { enum vc_suspend_status vc_suspend_state; enum vc_resume_status vc_resume_state; - unsigned int wake_address; - struct vchiq_state *state; struct timer_list suspend_timer; int suspend_timer_timeout; @@ -80,19 +78,11 @@ struct vchiq_arm_state { struct completion blocked_blocker; int blocked_count; - int autosuspend_override; - /* Flag to indicate that the first vchiq connect has made it through. ** This means that both sides should be fully ready, and we should ** be able to suspend after this point. */ int first_connect; - - unsigned long long suspend_start_time; - unsigned long long sleep_start_time; - unsigned long long resume_start_time; - unsigned long long last_wake_time; - }; struct vchiq_drvdata { From patchwork Fri Jan 31 10:38:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359635 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92BC3921 for ; Fri, 31 Jan 2020 10:44:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67281206F0 for ; Fri, 31 Jan 2020 10:44:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="riLSlaqW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67281206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=I46juow/kRQ1iFNnxq0muy4Nw+ZmwA+XwHAKFntcP70=; b=riLSlaqWqnt/PF sH0DfXYbhRl/iq84SNG2/F9t6ulS7XKUZ2lJNfYF4n4E2rifjcFi8FjHBoX5YO8uw9bBkjeSGK1G3 hjrS/sJwK0i4I77wbAlOfGcLBG81zo6alAMKqjSUkFDc1NkHqLzxsA6S86wJFShlU5LDOUzWqcntb ljhUzNJCd3s3BfLgo5rc3aiqYKQMloRszqM5EELECEYYsWbrCTj1mOlqfHDn/cEHADsw0aDSmUuUj A9+CkQAYrkHh90IwNaS4uTpVlI4BaVOWP603/2i2HxLSTMnXJIPTwMyO2EpFtagp38mWQYHLV8VpK qy2RrZ3XnZsp6snAGJDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTmI-0000Eq-14; Fri, 31 Jan 2020 10:43:58 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThb-0003Tg-P5; Fri, 31 Jan 2020 10:39:10 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B2A9EB001; Fri, 31 Jan 2020 10:39:05 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/21] staging: vc04_services: Get rid of resume_blocked in struct vchiq_arm_state Date: Fri, 31 Jan 2020 11:38:18 +0100 Message-Id: <20200131103836.14312-3-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023908_103309_10AFC6F1 X-CRM114-Status: GOOD ( 17.20 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The boolean value is never set to true, hence remove it and all the code that depends on it. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 51 +------------------ .../interface/vchiq_arm/vchiq_arm.h | 1 - 2 files changed, 2 insertions(+), 50 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 4458c1e60fa3..af4dc23f5510 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2270,10 +2270,7 @@ vchiq_videocore_wanted(struct vchiq_state *state) return 1; else if (!arm_state->videocore_use_count) /* usage count zero - check for override unless we're forcing */ - if (arm_state->resume_blocked) - return 0; - else - return vchiq_platform_videocore_wanted(state); + return vchiq_platform_videocore_wanted(state); else /* non-zero usage count - videocore still required */ return 1; @@ -2567,7 +2564,6 @@ static inline void unblock_resume(struct vchiq_arm_state *arm_state) { complete_all(&arm_state->resume_blocker); - arm_state->resume_blocked = 0; } /* Initiate suspend via slot handler. Should be called with the write lock @@ -2724,46 +2720,6 @@ vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, } write_lock_bh(&arm_state->susp_res_lock); - while (arm_state->resume_blocked) { - /* If we call 'use' while force suspend is waiting for suspend, - * then we're about to block the thread which the force is - * waiting to complete, so we're bound to just time out. In this - * case, set the suspend state such that the wait will be - * canceled, so we can complete as quickly as possible. */ - if (arm_state->resume_blocked && arm_state->vc_suspend_state == - VC_SUSPEND_IDLE) { - set_suspend_state(arm_state, VC_SUSPEND_FORCE_CANCELED); - break; - } - /* If suspend is already in progress then we need to block */ - if (!try_wait_for_completion(&arm_state->resume_blocker)) { - /* Indicate that there are threads waiting on the resume - * blocker. These need to be allowed to complete before - * a _second_ call to force suspend can complete, - * otherwise low priority threads might never actually - * continue */ - arm_state->blocked_count++; - write_unlock_bh(&arm_state->susp_res_lock); - vchiq_log_info(vchiq_susp_log_level, "%s %s resume " - "blocked - waiting...", __func__, entity); - if (wait_for_completion_killable( - &arm_state->resume_blocker)) { - vchiq_log_error(vchiq_susp_log_level, "%s %s " - "wait for resume blocker interrupted", - __func__, entity); - ret = VCHIQ_ERROR; - write_lock_bh(&arm_state->susp_res_lock); - arm_state->blocked_count--; - write_unlock_bh(&arm_state->susp_res_lock); - goto out; - } - vchiq_log_info(vchiq_susp_log_level, "%s %s resume " - "unblocked", __func__, entity); - write_lock_bh(&arm_state->susp_res_lock); - if (--arm_state->blocked_count == 0) - complete_all(&arm_state->blocked_blocker); - } - } stop_suspend_timer(arm_state); @@ -2861,10 +2817,7 @@ vchiq_release_internal(struct vchiq_state *state, struct vchiq_service *service) --(*entity_uc); if (!vchiq_videocore_wanted(state)) { - if (vchiq_platform_use_suspend_timer() && - !arm_state->resume_blocked) { - /* Only use the timer if we're not trying to force - * suspend (=> resume_blocked) */ + if (vchiq_platform_use_suspend_timer()) { start_suspend_timer(arm_state); } else { vchiq_log_info(vchiq_susp_log_level, diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index f0044289b6bc..c904f7be9084 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -74,7 +74,6 @@ struct vchiq_arm_state { ** ARM is suspending */ struct completion resume_blocker; - int resume_blocked; struct completion blocked_blocker; int blocked_count; From patchwork Fri Jan 31 10:38:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359613 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82940112B for ; Fri, 31 Jan 2020 10:40:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 347A224682 for ; Fri, 31 Jan 2020 10:40:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ITyMas+Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 347A224682 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=XYxadSYk3DMw3DJQ9CmPU0RBSqiIm772YDjqyooFRd4=; b=ITyMas+Qqn2BpS +WjUYg3UbPFoktPDfrfCefbjLI8QWjCw5PTLGNiCWiUDbkHlXFkHcfc4ou/Vt4f5slUeYAVWsO7qd HzKfgBpW0Cw/ocd5CF8JxUSlTPGLBvuSe/w4tRaogfiXWsW83jtdtspK60ZNlMVlJhlKOZ3zuT6jc OrSl+sdhUc88aDn3ACF4AlynIt48VCc4ZvxvwBCRGlVX+QNsNTlUCk/JwAL3kVog2d8OvR3Dy4RIn LhX8qSVr63k+N6B1PVUNarHCgZhGV7D9oLETkerZtRc8gfMxzJ7wMJGr4Kncm3ePHUWoZCLljFD15 lni1nnrU2J3p8ldAhP5A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTiO-0004CQ-Ov; Fri, 31 Jan 2020 10:39:56 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThb-0003Th-RF; Fri, 31 Jan 2020 10:39:10 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 94B47AF96; Fri, 31 Jan 2020 10:39:06 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 03/21] staging: vc04_services: Get rid of resume_blocker completion in struct vchiq_arm_state Date: Fri, 31 Jan 2020 11:38:19 +0100 Message-Id: <20200131103836.14312-4-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023908_023743_0A050D55 X-CRM114-Status: GOOD ( 11.34 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Nobody is waiting on it, so delete all relevant code. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 11 ----------- .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 4 ---- 2 files changed, 15 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 af4dc23f5510..311df3d85494 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2386,11 +2386,6 @@ vchiq_arm_init_state(struct vchiq_state *state, * completion while videocore is suspended. */ set_resume_state(arm_state, VC_RESUME_RESUMED); - init_completion(&arm_state->resume_blocker); - /* Initialise to 'done' state. We only want to block on this - * completion while resume is blocked */ - complete_all(&arm_state->resume_blocker); - init_completion(&arm_state->blocked_blocker); /* Initialise to 'done' state. We only want to block on this * completion while things are waiting on the resume blocker */ @@ -2560,12 +2555,6 @@ need_resume(struct vchiq_state *state) vchiq_videocore_wanted(state); } -static inline void -unblock_resume(struct vchiq_arm_state *arm_state) -{ - complete_all(&arm_state->resume_blocker); -} - /* Initiate suspend via slot handler. Should be called with the write lock * held */ enum vchiq_status diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index c904f7be9084..7d1316875343 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -70,10 +70,6 @@ struct vchiq_arm_state { */ int peer_use_count; - /* Flag to indicate whether resume is blocked. This happens when the - ** ARM is suspending - */ - struct completion resume_blocker; struct completion blocked_blocker; int blocked_count; From patchwork Fri Jan 31 10:38:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359615 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7867112B for ; Fri, 31 Jan 2020 10:40:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B164206F0 for ; Fri, 31 Jan 2020 10:40:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cqHIESdb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B164206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=kYn9ZzoaqMNWU2Xj9/vi6QcFLuftetMYtVTfaLmhzL0=; b=cqHIESdbLiAYBg U0haXEksQezVLLTE5OaxRjMMWf4rlgLjdt8Tk98AXSXBJpcudqdSmB7GGgrjgm0BfTSbwZ1J+Mnbn Ced2J+dWT2aFwRzaQMWNsuuAV0Q4KcjZI10BpFJ+cd/KJFzDGoSyOKeuuAgd4CapNSfyWhlhZ5Vgx deSez+/edIIxy5X5vmIGS2T9GilIfj6WstfBckn5FMhqfuLJ+z+RYFgYG3coNycoH/s2Hh/GjLjSJ 3iNwkOCfqhDGqGmzhe5caCvdZWh8gEPM/Tyk1yyK8ED80+Xuytyengb57dHU2IaClGll2E6UDLiDS by31thNoVJHc0REOPVeg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTiq-0005h2-3h; Fri, 31 Jan 2020 10:40:24 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThc-0003Tk-Is; Fri, 31 Jan 2020 10:39:10 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 567E9AFF4; Fri, 31 Jan 2020 10:39:07 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/21] staging: vc04_services: get rid of blocked_blocker completion in struct vchiq_arm_state Date: Fri, 31 Jan 2020 11:38:20 +0100 Message-Id: <20200131103836.14312-5-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023908_765917_6D78F687 X-CRM114-Status: GOOD ( 11.10 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Nobody is waiting on it, so delete it. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 ----- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 1 - 2 files changed, 6 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 311df3d85494..9264bb5d0bbe 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2386,11 +2386,6 @@ vchiq_arm_init_state(struct vchiq_state *state, * completion while videocore is suspended. */ set_resume_state(arm_state, VC_RESUME_RESUMED); - init_completion(&arm_state->blocked_blocker); - /* Initialise to 'done' state. We only want to block on this - * completion while things are waiting on the resume blocker */ - complete_all(&arm_state->blocked_blocker); - arm_state->suspend_timer_timeout = SUSPEND_TIMER_TIMEOUT_MS; arm_state->suspend_timer_running = 0; arm_state->state = state; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 7d1316875343..6bab241313b8 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -70,7 +70,6 @@ struct vchiq_arm_state { */ int peer_use_count; - struct completion blocked_blocker; int blocked_count; /* Flag to indicate that the first vchiq connect has made it through. From patchwork Fri Jan 31 10:38:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359617 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7922E13A4 for ; Fri, 31 Jan 2020 10:41:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5334620CC7 for ; Fri, 31 Jan 2020 10:41:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TRIN/sgo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5334620CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=fPp99UIBJduCq13wPvPwwfE2iHxRL5Hlr0bdZiqh5QA=; b=TRIN/sgoPkgwXe KZcaYw0K4aDUdhTREIZPou0KjS92SP0mNpwlbqnKtV0ozP5i6lj4dwBQvIlKORhbTy6bWLGxZjhzk dC9lt6MPcAkBDOcEb172GVcWucQm0PtxPX4YWDjtaMDyRE9JOXZ6eQDLzeA/6qieZ1xTd+9D1AVvW tM6DFFh9gJ6hyN7cxxKzsRqftx0j3gHi9yPJgeXQsfMpy/RCp6tdDgwwyWOAx/Kca9Mv/vv1zSglT IhPw6SbISbuENQemMZ8JLKcUjgofmdKZJP/sNAT81/kitVajtl99qJPCu8ho69Abo7RQ3hGjMDF1R wcA6W2WxVCUt8AkgXcmg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTjK-000627-5a; Fri, 31 Jan 2020 10:40:54 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThe-0003VN-Fx; Fri, 31 Jan 2020 10:39:12 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0E5ABAFFC; Fri, 31 Jan 2020 10:39:08 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 05/21] staging: vc04_services: Delete blocked_count in struct vchiq_arm_state Date: Fri, 31 Jan 2020 11:38:21 +0100 Message-Id: <20200131103836.14312-6-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023910_679085_DE1EC698 X-CRM114-Status: GOOD ( 11.45 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The variable is always 0. So delete it an all the code conditional to it. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 -- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 2 -- 2 files changed, 4 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 9264bb5d0bbe..4545df573c90 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2266,8 +2266,6 @@ vchiq_videocore_wanted(struct vchiq_state *state) if (!arm_state) /* autosuspend not supported - always return wanted */ return 1; - else if (arm_state->blocked_count) - return 1; else if (!arm_state->videocore_use_count) /* usage count zero - check for override unless we're forcing */ return vchiq_platform_videocore_wanted(state); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 6bab241313b8..35889a65b17f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -70,8 +70,6 @@ struct vchiq_arm_state { */ int peer_use_count; - int blocked_count; - /* Flag to indicate that the first vchiq connect has made it through. ** This means that both sides should be fully ready, and we should ** be able to suspend after this point. From patchwork Fri Jan 31 10:38:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359619 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC20E13A4 for ; Fri, 31 Jan 2020 10:41:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9CC3206F0 for ; Fri, 31 Jan 2020 10:41:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="u9PoLp0N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9CC3206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=7/gVNpgZObu4enU6NkjjkqjyZOkgH4y/+9VYUd+7uSU=; b=u9PoLp0NRkQsKm igyOTS0pX7b98A7f41xZ83/lX+rpRNloHh7Z5SEWTrjHo+jB8ck9mwPmTTFs6JO6hOn83az1y50Zy KPza0UlSnFZgtiCwFb4mPs0ZdYkutthHhcieupQGkKzlnbLcUlNqjfIM92rwKdCkaFhcyG3n9oIAu GrSXPL9vz3TrTYjd7e9EiqEG0xxc0GhO+jj1HJlRwrI1787cBvi2Gvo/Rn0WsDSLTsRYz9XPzQeTk c2ZmMSxR7c0TBEOu/2tiMr/GeqSEXWb4ooaV7aqz/N6iFcG60GpQ3HeCFOo1DmAa/7pWcyUFAkOIB td15tzI+rY7tV8QCN27Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTji-0006KE-KM; Fri, 31 Jan 2020 10:41:18 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThe-0003VO-Fv; Fri, 31 Jan 2020 10:39:12 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E5F77B004; Fri, 31 Jan 2020 10:39:08 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 06/21] staging: vc04_services: get rid of vchiq_platform_use_suspend_timer() Date: Fri, 31 Jan 2020 11:38:22 +0100 Message-Id: <20200131103836.14312-7-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023910_844957_8282ADA1 X-CRM114-Status: GOOD ( 15.11 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The function always returns 0, delete the function and all code conditional to it, namely the suspend timer. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Don't delete vchiq_dump_service_use_state() .../interface/vchiq_arm/vchiq_2835_arm.c | 11 --- .../interface/vchiq_arm/vchiq_arm.c | 83 ++----------------- .../interface/vchiq_arm/vchiq_arm.h | 9 -- 3 files changed, 5 insertions(+), 98 deletions(-) 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 ca30bfd52919..1ffb2aea947c 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 @@ -284,17 +284,6 @@ vchiq_platform_videocore_wanted(struct vchiq_state *state) { return 1; // autosuspend not supported - videocore always wanted } - -int -vchiq_platform_use_suspend_timer(void) -{ - return 0; -} -void -vchiq_dump_platform_use_state(struct vchiq_state *state) -{ - vchiq_log_info(vchiq_arm_log_level, "Suspend timer not in use"); -} void vchiq_platform_handle_timeout(struct vchiq_state *state) { 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 4545df573c90..2dfa5793d83b 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -48,9 +48,6 @@ int vchiq_arm_log_level = VCHIQ_LOG_DEFAULT; int vchiq_susp_log_level = VCHIQ_LOG_ERROR; -#define SUSPEND_TIMER_TIMEOUT_MS 100 -#define SUSPEND_RETRY_TIMER_TIMEOUT_MS 1000 - #define VC_SUSPEND_NUM_OFFSET 3 /* number of values before idle which are -ve */ static const char *const suspend_state_names[] = { "VC_SUSPEND_FORCE_CANCELED", @@ -79,8 +76,6 @@ static const char *const resume_state_names[] = { * requested */ #define FORCE_SUSPEND_TIMEOUT_MS 200 -static void suspend_timer_callback(struct timer_list *t); - struct user_service { struct vchiq_service *service; void *userdata; @@ -2384,12 +2379,7 @@ vchiq_arm_init_state(struct vchiq_state *state, * completion while videocore is suspended. */ set_resume_state(arm_state, VC_RESUME_RESUMED); - arm_state->suspend_timer_timeout = SUSPEND_TIMER_TIMEOUT_MS; - arm_state->suspend_timer_running = 0; arm_state->state = state; - timer_setup(&arm_state->suspend_timer, suspend_timer_callback, - 0); - arm_state->first_connect = 0; } @@ -2517,27 +2507,6 @@ set_resume_state(struct vchiq_arm_state *arm_state, } } -/* should be called with the write lock held */ -inline void -start_suspend_timer(struct vchiq_arm_state *arm_state) -{ - del_timer(&arm_state->suspend_timer); - arm_state->suspend_timer.expires = jiffies + - msecs_to_jiffies(arm_state->suspend_timer_timeout); - add_timer(&arm_state->suspend_timer); - arm_state->suspend_timer_running = 1; -} - -/* should be called with the write lock held */ -static inline void -stop_suspend_timer(struct vchiq_arm_state *arm_state) -{ - if (arm_state->suspend_timer_running) { - del_timer(&arm_state->suspend_timer); - arm_state->suspend_timer_running = 0; - } -} - static inline int need_resume(struct vchiq_state *state) { @@ -2626,28 +2595,6 @@ vchiq_platform_check_suspend(struct vchiq_state *state) return; } -void -vchiq_check_suspend(struct vchiq_state *state) -{ - struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state); - - if (!arm_state) - goto out; - - vchiq_log_trace(vchiq_susp_log_level, "%s", __func__); - - write_lock_bh(&arm_state->susp_res_lock); - if (arm_state->vc_suspend_state != VC_SUSPEND_SUSPENDED && - arm_state->first_connect && - !vchiq_videocore_wanted(state)) { - vchiq_arm_vcsuspend(state); - } - write_unlock_bh(&arm_state->susp_res_lock); - -out: - vchiq_log_trace(vchiq_susp_log_level, "%s exit", __func__); -} - /* This function should be called with the write lock held */ int vchiq_check_resume(struct vchiq_state *state) @@ -2702,9 +2649,6 @@ vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, } write_lock_bh(&arm_state->susp_res_lock); - - stop_suspend_timer(arm_state); - local_uc = ++arm_state->videocore_use_count; local_entity_uc = ++(*entity_uc); @@ -2799,15 +2743,11 @@ vchiq_release_internal(struct vchiq_state *state, struct vchiq_service *service) --(*entity_uc); if (!vchiq_videocore_wanted(state)) { - if (vchiq_platform_use_suspend_timer()) { - start_suspend_timer(arm_state); - } else { - vchiq_log_info(vchiq_susp_log_level, - "%s %s count %d, state count %d - suspending", - __func__, entity, *entity_uc, - arm_state->videocore_use_count); - vchiq_arm_vcsuspend(state); - } + vchiq_log_info(vchiq_susp_log_level, + "%s %s count %d, state count %d - suspending", + __func__, entity, *entity_uc, + arm_state->videocore_use_count); + vchiq_arm_vcsuspend(state); } else vchiq_log_trace(vchiq_susp_log_level, "%s %s count %d, state count %d", @@ -2902,17 +2842,6 @@ vchiq_instance_set_trace(struct vchiq_instance *instance, int trace) instance->trace = (trace != 0); } -static void suspend_timer_callback(struct timer_list *t) -{ - struct vchiq_arm_state *arm_state = - from_timer(arm_state, t, suspend_timer); - struct vchiq_state *state = arm_state->state; - - vchiq_log_info(vchiq_susp_log_level, - "%s - suspend timer expired - check suspend", __func__); - vchiq_check_suspend(state); -} - enum vchiq_status vchiq_use_service(unsigned int handle) { @@ -3028,8 +2957,6 @@ vchiq_dump_service_use_state(struct vchiq_state *state) "--- Overall vchiq instance use count %d", vc_use_count); kfree(service_data); - - vchiq_dump_platform_use_state(state); } enum vchiq_status diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 35889a65b17f..61c50d7d4396 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -54,9 +54,6 @@ struct vchiq_arm_state { enum vc_resume_status vc_resume_state; struct vchiq_state *state; - struct timer_list suspend_timer; - int suspend_timer_timeout; - int suspend_timer_running; /* Global use count for videocore. ** This is equal to the sum of the use counts for all services. When @@ -121,9 +118,6 @@ vchiq_platform_suspend(struct vchiq_state *state); extern int vchiq_platform_videocore_wanted(struct vchiq_state *state); -extern int -vchiq_platform_use_suspend_timer(void); - extern void vchiq_dump_platform_use_state(struct vchiq_state *state); @@ -166,7 +160,4 @@ extern void set_resume_state(struct vchiq_arm_state *arm_state, enum vc_resume_status new_state); -extern void -start_suspend_timer(struct vchiq_arm_state *arm_state); - #endif /* VCHIQ_ARM_H */ From patchwork Fri Jan 31 10:38:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359621 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4549921 for ; Fri, 31 Jan 2020 10:41:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77EB3206F0 for ; Fri, 31 Jan 2020 10:41:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ubpaKU+t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77EB3206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=AUjzmwdY+lzBzWmGRXOPFE0rrFcY09vFA6Je7kCuYbQ=; b=ubpaKU+t9LJSlo JqhlnUqHJ3MDeWvym7bNRIMlzOHuJ6I9Zilsk3QhK5nNtT0DT62ZveYoP1SBQNdgm9Rm3/ErOIGqz L9t4iZwer9yGGan1xqTyrqgdhXa803xQjZW49cnev7Mgc1VQGlAUA79sUq9SHhDEYF5SKYTuVw4It qXZRKcPqL770hVwaNWENpg98V8kWwoLQSmpNVTgWS6Vxytl/i8egK64aI1XPI/Q7IZtxZn6DqDakO YGEh5yShc6ZFyu39Gm6s0hY05OOb83oZBoYnMlI+LE0bANw/y7bfpF1Xu6/R9DrC5zrkc0Q+HVMQF 09uDAIOzPlW2MzCG6EJA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTk4-0006ct-Er; Fri, 31 Jan 2020 10:41:40 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThf-0003VV-7e; Fri, 31 Jan 2020 10:39:13 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C7360AF43; Fri, 31 Jan 2020 10:39:09 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 07/21] staging: vc04_services: Get rid of vchiq_platform_paused/resumed() Date: Fri, 31 Jan 2020 11:38:23 +0100 Message-Id: <20200131103836.14312-8-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023911_440694_BA61B70B X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org vchiq_platform_paused() and vchiq_platform_resumed() do nothing. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 10 ---------- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 3 --- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 6 ------ 3 files changed, 19 deletions(-) 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 1ffb2aea947c..5f59145f251b 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 @@ -269,16 +269,6 @@ vchiq_platform_resume(struct vchiq_state *state) return VCHIQ_SUCCESS; } -void -vchiq_platform_paused(struct vchiq_state *state) -{ -} - -void -vchiq_platform_resumed(struct vchiq_state *state) -{ -} - int vchiq_platform_videocore_wanted(struct vchiq_state *state) { 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 76351078affb..71342826ed33 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1798,7 +1798,6 @@ parse_rx_slots(struct vchiq_state *state) } /* At this point slot_mutex is held */ vchiq_set_conn_state(state, VCHIQ_CONNSTATE_PAUSED); - vchiq_platform_paused(state); break; case VCHIQ_MSG_RESUME: vchiq_log_trace(vchiq_core_log_level, @@ -1807,7 +1806,6 @@ parse_rx_slots(struct vchiq_state *state) /* Release the slot mutex */ mutex_unlock(&state->slot_mutex); vchiq_set_conn_state(state, VCHIQ_CONNSTATE_CONNECTED); - vchiq_platform_resumed(state); break; case VCHIQ_MSG_REMOTE_USE: @@ -1908,7 +1906,6 @@ slot_handler_func(void *v) != VCHIQ_RETRY) { vchiq_set_conn_state(state, VCHIQ_CONNSTATE_CONNECTED); - vchiq_platform_resumed(state); } else { /* This should really be impossible, ** since the PAUSE should have flushed diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index c31f953a9986..72c88fe5feb1 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -593,15 +593,9 @@ remote_event_signal(struct remote_event *event); void vchiq_platform_check_suspend(struct vchiq_state *state); -extern void -vchiq_platform_paused(struct vchiq_state *state); - extern enum vchiq_status vchiq_platform_resume(struct vchiq_state *state); -extern void -vchiq_platform_resumed(struct vchiq_state *state); - extern int vchiq_dump(void *dump_context, const char *str, int len); From patchwork Fri Jan 31 10:38:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359623 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A13EF13A4 for ; Fri, 31 Jan 2020 10:42:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EEEB206F0 for ; Fri, 31 Jan 2020 10:42:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uSQu7HZa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EEEB206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=Fv7a4bygTL6yG5dT44saM6by+mH8T0eff/fUy1uQtks=; b=uSQu7HZaVsu6HW 7a7y7h+HVjMHYnA2eQ5lHpBwtwbaciO1n1MTQUyjryIBY35whUKVnkoS+IIaZzGnQsEhVHrbwkq3r jlkUszYXdK+/t6SuKckDMIFbGrpnTf08KYEwy8u9hH7PKiL26ANTSa7YAyZrGv74YZYQwPF4XF7oG mNp/pf6MgirtgCPsLO6YS17K6AolgSjlauz5IVbOAYSQDRc4tV05QE0dWsUO4Rb2FLtMG6+P+92Uu 1fVU9kWz3n8dbgkyPyy070T71mlya5vHlw8+uyQjx0uaA+43xGomAAAMtm3Lv5cdVj52XwIaCvB0K HaW0J6eP1BuDOoWE4A6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTkP-0006v4-Pw; Fri, 31 Jan 2020 10:42:01 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThg-0003WW-7F; Fri, 31 Jan 2020 10:39:14 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C08A8AF96; Fri, 31 Jan 2020 10:39:10 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 08/21] staging: vc04_services: Get rid of vchiq_platform_suspend/resume() Date: Fri, 31 Jan 2020 11:38:24 +0100 Message-Id: <20200131103836.14312-9-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023912_567662_D5DFDC5E X-CRM114-Status: GOOD ( 11.45 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org vchiq_platform_suspend() and vchiq_platform_resume() do nothing, get rid of them. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_2835_arm.c | 12 ------------ .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 8 +------- .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 3 --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 4 ---- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 3 --- 5 files changed, 1 insertion(+), 29 deletions(-) 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 5f59145f251b..65e26a90c1db 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 @@ -257,18 +257,6 @@ int vchiq_dump_platform_state(void *dump_context) return vchiq_dump(dump_context, buf, len + 1); } -enum vchiq_status -vchiq_platform_suspend(struct vchiq_state *state) -{ - return VCHIQ_ERROR; -} - -enum vchiq_status -vchiq_platform_resume(struct vchiq_state *state) -{ - return VCHIQ_SUCCESS; -} - int vchiq_platform_videocore_wanted(struct vchiq_state *state) { 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 2dfa5793d83b..850774ded8db 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2572,7 +2572,6 @@ void vchiq_platform_check_suspend(struct vchiq_state *state) { struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state); - int susp = 0; if (!arm_state) goto out; @@ -2581,15 +2580,10 @@ vchiq_platform_check_suspend(struct vchiq_state *state) write_lock_bh(&arm_state->susp_res_lock); if (arm_state->vc_suspend_state == VC_SUSPEND_REQUESTED && - arm_state->vc_resume_state == VC_RESUME_RESUMED) { + arm_state->vc_resume_state == VC_RESUME_RESUMED) set_suspend_state(arm_state, VC_SUSPEND_IN_PROGRESS); - susp = 1; - } write_unlock_bh(&arm_state->susp_res_lock); - if (susp) - vchiq_platform_suspend(state); - out: vchiq_log_trace(vchiq_susp_log_level, "%s exit", __func__); return; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 61c50d7d4396..1874a01f5201 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -112,9 +112,6 @@ vchiq_release_service(unsigned int handle); extern enum vchiq_status vchiq_check_service(struct vchiq_service *service); -extern enum vchiq_status -vchiq_platform_suspend(struct vchiq_state *state); - extern int vchiq_platform_videocore_wanted(struct vchiq_state *state); 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 71342826ed33..ef8340ab8a52 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1895,10 +1895,6 @@ slot_handler_func(void *v) } break; - case VCHIQ_CONNSTATE_PAUSED: - vchiq_platform_resume(state); - break; - case VCHIQ_CONNSTATE_RESUMING: if (queue_message(state, NULL, VCHIQ_MAKE_MSG(VCHIQ_MSG_RESUME, 0, 0), diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 72c88fe5feb1..535a67cc68ed 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -593,9 +593,6 @@ remote_event_signal(struct remote_event *event); void vchiq_platform_check_suspend(struct vchiq_state *state); -extern enum vchiq_status -vchiq_platform_resume(struct vchiq_state *state); - extern int vchiq_dump(void *dump_context, const char *str, int len); From patchwork Fri Jan 31 10:38:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359627 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F33913A4 for ; Fri, 31 Jan 2020 10:42:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6A2E820CC7 for ; Fri, 31 Jan 2020 10:42:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rNq4vq3D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A2E820CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=bPXdzcYZlaQ8HCmfRUbjGoOyj3+ZW3yNP0kpxDQoSXM=; b=rNq4vq3DCwoDXu 39Z6rGA6pabWLzXm/DXAT2AAs+hMM9CXZ+JWrw36artunNZ31IWAfK2a2jmpYK8iHSAuvOiOZsWZn Nfve2Qv5jry3gTtjCjblooqtExSuw15V15+02wVibSAqZi9f12JTPYYr2pKOUBVH7Z0f4AW6V/mNY 8xtXCnchVqebpRfK1FghrIb6yAC01DzJXrrm7i8JizwO9IPcrcQBZD/IZVnlti8LaUQqM2xK0DdxU mqrAWfDVK9c6bx3A2b657n2Kdz57DbAubRTTJ8ilDzE2S22Xho4Zk2P+V4tLecboCyy2rrEc+FA70 5V7d5fMwrCtwzZHffqhQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTkv-0007MM-J5; Fri, 31 Jan 2020 10:42:33 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThh-0003XO-6a; Fri, 31 Jan 2020 10:39:15 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A4489AFF4; Fri, 31 Jan 2020 10:39:11 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/21] staging: vc04_services: Get rid of vchiq_platform_videocore_wanted() Date: Fri, 31 Jan 2020 11:38:25 +0100 Message-Id: <20200131103836.14312-10-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023913_552577_32C37173 X-CRM114-Status: GOOD ( 12.47 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The function always returns true, which makes a whole bunch of code useless. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_2835_arm.c | 5 --- .../interface/vchiq_arm/vchiq_arm.c | 34 +++---------------- .../interface/vchiq_arm/vchiq_arm.h | 5 --- 3 files changed, 5 insertions(+), 39 deletions(-) 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 65e26a90c1db..a7f72dba2e20 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 @@ -257,11 +257,6 @@ int vchiq_dump_platform_state(void *dump_context) return vchiq_dump(dump_context, buf, len + 1); } -int -vchiq_platform_videocore_wanted(struct vchiq_state *state) -{ - return 1; // autosuspend not supported - videocore always wanted -} void vchiq_platform_handle_timeout(struct vchiq_state *state) { 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 850774ded8db..c147d94784eb 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2253,22 +2253,6 @@ vchiq_fops = { * Autosuspend related functionality */ -int -vchiq_videocore_wanted(struct vchiq_state *state) -{ - struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state); - - if (!arm_state) - /* autosuspend not supported - always return wanted */ - return 1; - else if (!arm_state->videocore_use_count) - /* usage count zero - check for override unless we're forcing */ - return vchiq_platform_videocore_wanted(state); - else - /* non-zero usage count - videocore still required */ - return 1; -} - static enum vchiq_status vchiq_keepalive_vchiq_callback(enum vchiq_reason reason, struct vchiq_header *header, @@ -2513,8 +2497,7 @@ need_resume(struct vchiq_state *state) struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state); return (arm_state->vc_suspend_state > VC_SUSPEND_IDLE) && - (arm_state->vc_resume_state < VC_RESUME_REQUESTED) && - vchiq_videocore_wanted(state); + (arm_state->vc_resume_state < VC_RESUME_REQUESTED); } /* Initiate suspend via slot handler. Should be called with the write lock @@ -2736,17 +2719,10 @@ vchiq_release_internal(struct vchiq_state *state, struct vchiq_service *service) --arm_state->videocore_use_count; --(*entity_uc); - if (!vchiq_videocore_wanted(state)) { - vchiq_log_info(vchiq_susp_log_level, - "%s %s count %d, state count %d - suspending", - __func__, entity, *entity_uc, - arm_state->videocore_use_count); - vchiq_arm_vcsuspend(state); - } else - vchiq_log_trace(vchiq_susp_log_level, - "%s %s count %d, state count %d", - __func__, entity, *entity_uc, - arm_state->videocore_use_count); + vchiq_log_trace(vchiq_susp_log_level, + "%s %s count %d, state count %d", + __func__, entity, *entity_uc, + arm_state->videocore_use_count); unlock: write_unlock_bh(&arm_state->susp_res_lock); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 1874a01f5201..0a4efcf95a61 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -112,9 +112,6 @@ vchiq_release_service(unsigned int handle); extern enum vchiq_status vchiq_check_service(struct vchiq_service *service); -extern int -vchiq_platform_videocore_wanted(struct vchiq_state *state); - extern void vchiq_dump_platform_use_state(struct vchiq_state *state); @@ -124,8 +121,6 @@ vchiq_dump_service_use_state(struct vchiq_state *state); extern struct vchiq_arm_state* vchiq_platform_get_arm_state(struct vchiq_state *state); -extern int -vchiq_videocore_wanted(struct vchiq_state *state); extern enum vchiq_status vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, From patchwork Fri Jan 31 10:38:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359625 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F80A921 for ; Fri, 31 Jan 2020 10:42:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68B0020CC7 for ; Fri, 31 Jan 2020 10:42:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="owxwCm+v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68B0020CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=qz81fvvT4AEtlCTFYHuwSfozkLVM5MENC4NIwLkZ5Cc=; b=owxwCm+vUJVs6+ rMTYhZk1NHj+bUsPYJ8aijZuA/UUAXij8aOXZTTP9f8hCDqIOAXl49GkfS56f4HYDwGeAFKSfsH1N xOz1/j0J4XcvIH6YVgbNqRGulv4/3YQf5/yvpKu0PxP53AedL1hSsgjkBWgttG9Peq1OKEfl/Vr4O mIYiYpbT1eXozeNQypqHb8uIiy5Y/NU/qCiLRvpRXpOLf1ZyjUfbTid37p29vkw6OAAqmZvJkd6qW K6Edq6seg54WthsPnbMgbvt7S0n+N0SkYydoeXHk6PLQp/CKrqBjme8lI6mC3n0PwBVPyN1vock1b 2NnGAY9uk80bOn4LuJYg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTki-00079u-U3; Fri, 31 Jan 2020 10:42:20 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThh-0003Y9-RQ; Fri, 31 Jan 2020 10:39:15 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6DE1CAFFC; Fri, 31 Jan 2020 10:39:12 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/21] staging: vc04_services: Get rid of vchiq_platform_handle_timeout() Date: Fri, 31 Jan 2020 11:38:26 +0100 Message-Id: <20200131103836.14312-11-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023914_059411_7B7EE98E X-CRM114-Status: UNSURE ( 8.60 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The function does nothing. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 5 ----- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 5 ----- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 3 --- 3 files changed, 13 deletions(-) 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 a7f72dba2e20..c18c6ca0b6c0 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 @@ -257,11 +257,6 @@ int vchiq_dump_platform_state(void *dump_context) return vchiq_dump(dump_context, buf, len + 1); } -void -vchiq_platform_handle_timeout(struct vchiq_state *state) -{ - (void)state; -} /* * Local functions */ 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 ef8340ab8a52..f135d55b29e5 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1911,11 +1911,6 @@ slot_handler_func(void *v) "message"); } break; - - case VCHIQ_CONNSTATE_PAUSE_TIMEOUT: - case VCHIQ_CONNSTATE_RESUME_TIMEOUT: - vchiq_platform_handle_timeout(state); - break; default: break; } diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 535a67cc68ed..11037a499408 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -638,9 +638,6 @@ vchiq_platform_conn_state_changed(struct vchiq_state *state, enum vchiq_connstate oldstate, enum vchiq_connstate newstate); -extern void -vchiq_platform_handle_timeout(struct vchiq_state *state); - extern void vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate); From patchwork Fri Jan 31 10:38:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359629 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF008921 for ; Fri, 31 Jan 2020 10:43:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8CD64206F0 for ; Fri, 31 Jan 2020 10:43:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OR0BvP2L" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CD64206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=91c8Pf1sumZXuIL5xCkuxfd2gQ3lA14R83tCMG3bFSA=; b=OR0BvP2LoIW7q2 hjfZF16U/fI0Jk+0zoyG05ul3Ks/MeUtZCTzuWwRNyo5HbzLB3ISBmKx9/3UKnfN6glz9k5TkRzzm 5jKpbgGQ6Z6ioHuqJlznB4GOOmHkHtuwjoe7lZmPgcJ2y6NQ8KRh8is4Cm5UtKnNFqprVuvxCZ4Fk Xby46//2W1Mt/ZTjE01xlJB3iHV+LGhy/XoBNurY+5nvhvtoKQQicNaVDkb1E1DQ32PvLX7+E7IQs R8Cttb550XC8982hMc3IRA7XGVW7Tq/fjlnS8FRE8BQO6L/tzTX7z7MkcFG4J8pMuRIi7Mzq23BVD A/bYDJGjiZqXwvT97AqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTlN-0007p9-6t; Fri, 31 Jan 2020 10:43:01 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThi-0003Ym-FS; Fri, 31 Jan 2020 10:39:15 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2556AB001; Fri, 31 Jan 2020 10:39:13 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 11/21] staging: vc04_services: Get rid of vchiq_on_remote_use_active() Date: Fri, 31 Jan 2020 11:38:27 +0100 Message-Id: <20200131103836.14312-12-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023914_687065_2D01CC4E X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Function does nothing. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 6 ------ .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 - 2 files changed, 7 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 c147d94784eb..7c620366dfb6 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2962,12 +2962,6 @@ vchiq_check_service(struct vchiq_service *service) return ret; } -/* stub functions */ -void vchiq_on_remote_use_active(struct vchiq_state *state) -{ - (void)state; -} - void vchiq_platform_conn_state_changed(struct vchiq_state *state, enum vchiq_connstate oldstate, enum vchiq_connstate newstate) 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 f135d55b29e5..c5493dee6dd7 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1815,7 +1815,6 @@ parse_rx_slots(struct vchiq_state *state) vchiq_on_remote_release(state); break; case VCHIQ_MSG_REMOTE_USE_ACTIVE: - vchiq_on_remote_use_active(state); break; default: From patchwork Fri Jan 31 10:38:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359631 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 375BC921 for ; Fri, 31 Jan 2020 10:43:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 155A620CC7 for ; Fri, 31 Jan 2020 10:43:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bcPsFxop" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 155A620CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=d/NABDFE76oYWwYzI7vi3SNkaMf6UD2J80o+A1YEdnk=; b=bcPsFxopm3hmpH eHSilPmumWsymGX8JmYyal8BhLSi+UejXkBhdM2TqxxQpXLQ/ofRXz2bzt96UN9XbtPKjTrtlOLc0 SJjtFM8i1VHhxJwK0dvULBVrUe1gqrxegU/t7KvYMjj2Wv7AZNnAsxhjftALtvesq3WCn+zjPKsEt FviwEWiZkMThsojcxk6HAVMk0ytqp7lEU47LjaC8srU7Rxd+dZbjlCtDFnwWRhnCIeYXoFEFFcUKw bxdjyUJD+xoj9YiFp1nMgcoduC0Y+sV6yFKmj2tcmq1tZ/1ZxwptyCc1uOzr7tjHg33WvTNxeKIAM mZmDvd4849dIN/lMMhzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTla-00080f-6q; Fri, 31 Jan 2020 10:43:14 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThj-0003Zj-7W; Fri, 31 Jan 2020 10:39:16 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E5D7EAFF6; Fri, 31 Jan 2020 10:39:13 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 12/21] staging: vc04_services: Get rid of vchiq_arm_vcsuspend() Date: Fri, 31 Jan 2020 11:38:28 +0100 Message-Id: <20200131103836.14312-13-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023915_431078_E830DC7A X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It's not used. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 51 ------------------- .../interface/vchiq_arm/vchiq_arm.h | 3 -- 2 files changed, 54 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 7c620366dfb6..a33f0fb5d45f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2500,57 +2500,6 @@ need_resume(struct vchiq_state *state) (arm_state->vc_resume_state < VC_RESUME_REQUESTED); } -/* Initiate suspend via slot handler. Should be called with the write lock - * held */ -enum vchiq_status -vchiq_arm_vcsuspend(struct vchiq_state *state) -{ - enum vchiq_status status = VCHIQ_ERROR; - struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state); - - if (!arm_state) - goto out; - - vchiq_log_trace(vchiq_susp_log_level, "%s", __func__); - status = VCHIQ_SUCCESS; - - switch (arm_state->vc_suspend_state) { - case VC_SUSPEND_REQUESTED: - vchiq_log_info(vchiq_susp_log_level, "%s: suspend already " - "requested", __func__); - break; - case VC_SUSPEND_IN_PROGRESS: - vchiq_log_info(vchiq_susp_log_level, "%s: suspend already in " - "progress", __func__); - break; - - default: - /* We don't expect to be in other states, so log but continue - * anyway */ - vchiq_log_error(vchiq_susp_log_level, - "%s unexpected suspend state %s", __func__, - suspend_state_names[arm_state->vc_suspend_state + - VC_SUSPEND_NUM_OFFSET]); - /* fall through */ - case VC_SUSPEND_REJECTED: - case VC_SUSPEND_FAILED: - /* Ensure any idle state actions have been run */ - set_suspend_state(arm_state, VC_SUSPEND_IDLE); - /* fall through */ - case VC_SUSPEND_IDLE: - vchiq_log_info(vchiq_susp_log_level, - "%s: suspending", __func__); - set_suspend_state(arm_state, VC_SUSPEND_REQUESTED); - /* kick the slot handler thread to initiate suspend */ - request_poll(state, NULL, 0); - break; - } - -out: - vchiq_log_trace(vchiq_susp_log_level, "%s exit %d", __func__, status); - return status; -} - void vchiq_platform_check_suspend(struct vchiq_state *state) { diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 0a4efcf95a61..606a519dd3db 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -88,9 +88,6 @@ int vchiq_platform_init(struct platform_device *pdev, extern struct vchiq_state * vchiq_get_state(void); -extern enum vchiq_status -vchiq_arm_vcsuspend(struct vchiq_state *state); - extern enum vchiq_status vchiq_arm_vcresume(struct vchiq_state *state); From patchwork Fri Jan 31 10:38:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359633 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C3A4921 for ; Fri, 31 Jan 2020 10:43:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 371FC206F0 for ; Fri, 31 Jan 2020 10:43:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OdXsa90J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 371FC206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=Rh8ihtgMe+sqMEgppGkwHUpbyO5TOu6w/lNxSJMqGuc=; b=OdXsa90JPGO+MU 2e4xctjiF4moZT/LqQV6hJAR5pkHXrKlRgn8x9TOjQKL/bLHrFpjHV71VvYD8nb0s+LXHLau7jQzZ NnZu0dTkDHPHBtCD6f5UxYPAA5HgEm0RPoCYhtonU5JVb3bxUEt1Hd7vrS4QYqLkGjAWQj3QISxTs NFJbl9OyGbjY4DgW+OGdoZHFe507sDwLRQLNiz4gwLZLm0BN3Iwr6bxZhuJwF5Li8+njK04IoOT3V akC31N1yKq8AlhrUFHEshmjXO6bkjGrWrG3cf+poN099Z+gsO5dTQlYS2TX0m6t5TYvoOScdDK8zV sbmbDlRBam5rgVKQaUrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTlk-0008EF-Oi; Fri, 31 Jan 2020 10:43:24 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThk-0003aa-33; Fri, 31 Jan 2020 10:39:17 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B09BEAF2D; Fri, 31 Jan 2020 10:39:14 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 13/21] staging: vc04_services: Get rid of vchiq_check_resume() Date: Fri, 31 Jan 2020 11:38:29 +0100 Message-Id: <20200131103836.14312-14-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023916_299205_CD0B79C6 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Nobody calls this function. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 23 ------------------- .../interface/vchiq_arm/vchiq_arm.h | 3 --- 2 files changed, 26 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 a33f0fb5d45f..a26f9f6311a6 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2521,29 +2521,6 @@ vchiq_platform_check_suspend(struct vchiq_state *state) return; } -/* This function should be called with the write lock held */ -int -vchiq_check_resume(struct vchiq_state *state) -{ - struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state); - int resume = 0; - - if (!arm_state) - goto out; - - vchiq_log_trace(vchiq_susp_log_level, "%s", __func__); - - if (need_resume(state)) { - set_resume_state(arm_state, VC_RESUME_REQUESTED); - request_poll(state, NULL, 0); - resume = 1; - } - -out: - vchiq_log_trace(vchiq_susp_log_level, "%s exit", __func__); - return resume; -} - enum vchiq_status vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, enum USE_TYPE_E use_type) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 606a519dd3db..676b1cb6f332 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -95,9 +95,6 @@ extern enum vchiq_status vchiq_arm_init_state(struct vchiq_state *state, struct vchiq_arm_state *arm_state); -extern int -vchiq_check_resume(struct vchiq_state *state); - extern void vchiq_check_suspend(struct vchiq_state *state); enum vchiq_status From patchwork Fri Jan 31 10:38:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359637 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92A3813A4 for ; Fri, 31 Jan 2020 10:44:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5FA8120CC7 for ; Fri, 31 Jan 2020 10:44:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JNw19nQy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FA8120CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=tudkJ5uou9CDHJgZnJy4gCUL/Cy6dfv+cp4xRV4DA+c=; b=JNw19nQyuK+qpB 2DbN1ng/DbRV0tpFDqxGFbroZedU01EvkRXrOJufyL4sRSqLgJmqM49yphwij80ImrsBrH6/arLzV FAGfoP0KLlBecVOt98alzB1siZHONvWUGKTGKwCczbnir5PjaueXuHO4wNhOe4m6KNl0vL29ckQyS 2RaX2CWTpKTbkZYDOyhrQ5twIxzcX+CknPX1ntT+/bHqE1CMe9zSofJPKcbxr3CDykW4aCcB3GpFj e0gCDmlqt0lfKcQgBYDkFqNBp3/y3SwOg9BUi652ce3SA5zJw38LGYwbK9HrvPXC6LTv1rMLeR2K1 fDiovZZWa6Y6rZAVtUuw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTmX-0000Ub-EA; Fri, 31 Jan 2020 10:44:13 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThk-0003bN-SV; Fri, 31 Jan 2020 10:39:18 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 725D7AF96; Fri, 31 Jan 2020 10:39:15 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 14/21] staging: vc04_services: Delete vc_suspend_complete completion Date: Fri, 31 Jan 2020 11:38:30 +0100 Message-Id: <20200131103836.14312-15-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023917_101376_040DFFF9 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Nobody is waiting on it. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 7 ------- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 1 - 2 files changed, 8 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 a26f9f6311a6..f66280663d0d 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2356,8 +2356,6 @@ vchiq_arm_init_state(struct vchiq_state *state, atomic_set(&arm_state->ka_use_ack_count, 0); atomic_set(&arm_state->ka_release_count, 0); - init_completion(&arm_state->vc_suspend_complete); - init_completion(&arm_state->vc_resume_complete); /* Initialise to 'done' state. We only want to block on resume * completion while videocore is suspended. */ @@ -2436,18 +2434,14 @@ set_suspend_state(struct vchiq_arm_state *arm_state, /* state specific additional actions */ switch (new_state) { case VC_SUSPEND_FORCE_CANCELED: - complete_all(&arm_state->vc_suspend_complete); break; case VC_SUSPEND_REJECTED: - complete_all(&arm_state->vc_suspend_complete); break; case VC_SUSPEND_FAILED: - complete_all(&arm_state->vc_suspend_complete); arm_state->vc_resume_state = VC_RESUME_RESUMED; complete_all(&arm_state->vc_resume_complete); break; case VC_SUSPEND_IDLE: - reinit_completion(&arm_state->vc_suspend_complete); break; case VC_SUSPEND_REQUESTED: break; @@ -2455,7 +2449,6 @@ set_suspend_state(struct vchiq_arm_state *arm_state, set_resume_state(arm_state, VC_RESUME_IDLE); break; case VC_SUSPEND_SUSPENDED: - complete_all(&arm_state->vc_suspend_complete); break; default: BUG(); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 676b1cb6f332..aa081d642818 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -46,7 +46,6 @@ struct vchiq_arm_state { atomic_t ka_use_ack_count; atomic_t ka_release_count; - struct completion vc_suspend_complete; struct completion vc_resume_complete; rwlock_t susp_res_lock; From patchwork Fri Jan 31 10:38:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359639 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F278313A4 for ; Fri, 31 Jan 2020 10:44:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCC8E20CC7 for ; Fri, 31 Jan 2020 10:44:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tPg37f4p" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCC8E20CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=pdLLazQX202Dr8bZqWJpKmfU79VGISXuOIv0S+XAepQ=; b=tPg37f4p3Lwouw S8/djUppFFE3mek5nAZZxK/7Y6bHjiLzIrO8JyUbVjjuNDOpCRimBCJHrqCrk5xrF2fRTXIRMkgh7 C7PbStfkdMuRqKKXtA5kvyvuK/DkzEd7C8BpUCFMkDJhEVLiC8NqHBywjM0kC09bOn96h0Tyx6zJw KzWNiIgp4ADfecngPGYKmCGJ+0bwxVZ00vYHRr4UZ5CJazoINvQkQ3VGbF5k1TsvL6Bdzsm7l8h7e hJod9aNI8stdW99UkIS2HFQc/Xzu5uzjiN/FOFGn2gGbWUtrh3BlZ6Te8FIeT6Ua6iwxVS/2F9OLj IP9LdOMK2M/h3ux3dyrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTmm-0000iU-8M; Fri, 31 Jan 2020 10:44:28 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThl-0003c9-JP; Fri, 31 Jan 2020 10:39:19 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 41FF8AF43; Fri, 31 Jan 2020 10:39:16 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 15/21] staging: vc04_services: Get rid of unused suspend/resume states Date: Fri, 31 Jan 2020 11:38:31 +0100 Message-Id: <20200131103836.14312-16-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023917_961387_DF94B676 X-CRM114-Status: GOOD ( 12.71 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It's impossible to get into them, so simply delete them. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 55 ------------------- .../interface/vchiq_arm/vchiq_arm.h | 7 --- 2 files changed, 62 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 f66280663d0d..db7ae204f50f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -50,20 +50,13 @@ int vchiq_susp_log_level = VCHIQ_LOG_ERROR; #define VC_SUSPEND_NUM_OFFSET 3 /* number of values before idle which are -ve */ static const char *const suspend_state_names[] = { - "VC_SUSPEND_FORCE_CANCELED", - "VC_SUSPEND_REJECTED", - "VC_SUSPEND_FAILED", "VC_SUSPEND_IDLE", - "VC_SUSPEND_REQUESTED", "VC_SUSPEND_IN_PROGRESS", - "VC_SUSPEND_SUSPENDED" }; #define VC_RESUME_NUM_OFFSET 1 /* number of values before idle which are -ve */ static const char *const resume_state_names[] = { - "VC_RESUME_FAILED", "VC_RESUME_IDLE", "VC_RESUME_REQUESTED", - "VC_RESUME_IN_PROGRESS", "VC_RESUME_RESUMED" }; /* The number of times we allow force suspend to timeout before actually @@ -2396,18 +2389,6 @@ vchiq_arm_init_state(struct vchiq_state *state, ** before resuming can occur. We therefore also reset the ** resume state machine to VC_RESUME_IDLE in this state. ** -** VC_SUSPEND_SUSPENDED - Suspend has completed successfully. Also call -** complete_all on the suspend completion to notify -** anything waiting for suspend to happen. -** -** VC_SUSPEND_REJECTED - Videocore rejected suspend. Videocore will also -** initiate resume, so no need to alter resume state. -** We call complete_all on the suspend completion to notify -** of suspend rejection. -** -** VC_SUSPEND_FAILED - We failed to initiate videocore suspend. We notify the -** suspend completion and reset the resume state machine. -** ** VC_RESUME_IDLE - Initialise the resume completion at the same time. The ** resume completion is in it's 'done' state whenever ** videcore is running. Therefore, the VC_RESUME_IDLE @@ -2415,13 +2396,6 @@ vchiq_arm_init_state(struct vchiq_state *state, ** Hence, any thread which needs to wait until videocore is ** running can wait on this completion - it will only block ** if videocore is suspended. -** -** VC_RESUME_RESUMED - Resume has completed successfully. Videocore is running. -** Call complete_all on the resume completion to unblock -** any threads waiting for resume. Also reset the suspend -** state machine to it's idle state. -** -** VC_RESUME_FAILED - Currently unused - no mechanism to fail resume exists. */ void @@ -2433,23 +2407,11 @@ set_suspend_state(struct vchiq_arm_state *arm_state, /* state specific additional actions */ switch (new_state) { - case VC_SUSPEND_FORCE_CANCELED: - break; - case VC_SUSPEND_REJECTED: - break; - case VC_SUSPEND_FAILED: - arm_state->vc_resume_state = VC_RESUME_RESUMED; - complete_all(&arm_state->vc_resume_complete); - break; case VC_SUSPEND_IDLE: break; - case VC_SUSPEND_REQUESTED: - break; case VC_SUSPEND_IN_PROGRESS: set_resume_state(arm_state, VC_RESUME_IDLE); break; - case VC_SUSPEND_SUSPENDED: - break; default: BUG(); break; @@ -2465,15 +2427,11 @@ set_resume_state(struct vchiq_arm_state *arm_state, /* state specific additional actions */ switch (new_state) { - case VC_RESUME_FAILED: - break; case VC_RESUME_IDLE: reinit_completion(&arm_state->vc_resume_complete); break; case VC_RESUME_REQUESTED: break; - case VC_RESUME_IN_PROGRESS: - break; case VC_RESUME_RESUMED: complete_all(&arm_state->vc_resume_complete); set_suspend_state(arm_state, VC_SUSPEND_IDLE); @@ -2503,12 +2461,6 @@ vchiq_platform_check_suspend(struct vchiq_state *state) vchiq_log_trace(vchiq_susp_log_level, "%s", __func__); - write_lock_bh(&arm_state->susp_res_lock); - if (arm_state->vc_suspend_state == VC_SUSPEND_REQUESTED && - arm_state->vc_resume_state == VC_RESUME_RESUMED) - set_suspend_state(arm_state, VC_SUSPEND_IN_PROGRESS); - write_unlock_bh(&arm_state->susp_res_lock); - out: vchiq_log_trace(vchiq_susp_log_level, "%s exit", __func__); return; @@ -2548,13 +2500,6 @@ vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, local_uc = ++arm_state->videocore_use_count; local_entity_uc = ++(*entity_uc); - /* If there's a pending request which hasn't yet been serviced then - * just clear it. If we're past VC_SUSPEND_REQUESTED state then - * vc_resume_complete will block until we either resume or fail to - * suspend */ - if (arm_state->vc_suspend_state <= VC_SUSPEND_REQUESTED) - set_suspend_state(arm_state, VC_SUSPEND_IDLE); - if ((use_type != USE_TYPE_SERVICE_NO_RESUME) && need_resume(state)) { set_resume_state(arm_state, VC_RESUME_REQUESTED); vchiq_log_info(vchiq_susp_log_level, diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index aa081d642818..afd822546e2e 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -15,20 +15,13 @@ #include "vchiq_debugfs.h" enum vc_suspend_status { - VC_SUSPEND_FORCE_CANCELED = -3, /* Force suspend canceled, too busy */ - VC_SUSPEND_REJECTED = -2, /* Videocore rejected suspend request */ - VC_SUSPEND_FAILED = -1, /* Videocore suspend failed */ VC_SUSPEND_IDLE = 0, /* VC active, no suspend actions */ - VC_SUSPEND_REQUESTED, /* User has requested suspend */ VC_SUSPEND_IN_PROGRESS, /* Slot handler has recvd suspend request */ - VC_SUSPEND_SUSPENDED /* Videocore suspend succeeded */ }; enum vc_resume_status { - VC_RESUME_FAILED = -1, /* Videocore resume failed */ VC_RESUME_IDLE = 0, /* VC suspended, no resume actions */ VC_RESUME_REQUESTED, /* User has requested resume */ - VC_RESUME_IN_PROGRESS, /* Slot handler has received resume request */ VC_RESUME_RESUMED /* Videocore resumed successfully (active) */ }; From patchwork Fri Jan 31 10:38:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359641 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CDCE921 for ; Fri, 31 Jan 2020 10:44:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A5CD206F0 for ; Fri, 31 Jan 2020 10:44:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XzAP0Z/c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A5CD206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=xSg1P405J14nEi2h5z63Q3XEA0ccO1vvMKgMoO0wm4w=; b=XzAP0Z/c7gDs89 NxdrH9FqkjfJ7cfkbZ3n9XNNnKRLvFVk+2casS42KGO8Xs3ae8Siy+hL/bCOT2Y9LRPZfCNsZMhuC D5Ie946jnhalPCtdUGNcy9HUQl7AwqLkaxqX8x9kVQoNTwRnqtwDvKMQWEuUtLasBTf54UYjlUc9h x/eQXzJk1VR+K8RbK5QRIUdeTyyw1HAtQd4M4YhwC+B+2jxuFUHygoy6F9U2G3c+7WGqh9i2lpEnI aGq0OgHFyJCXMnOiLZXXEPw6P9S/zldU6R3Npg25T0DCtGLrDa0UmCjuVtjSZtSA6dOOosZHazvXz XaH/mHfRN0hVQHZzEkDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTn2-00010m-GT; Fri, 31 Jan 2020 10:44:44 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThm-0003d3-Ft; Fri, 31 Jan 2020 10:39:20 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1A3D2AFF4; Fri, 31 Jan 2020 10:39:17 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 16/21] staging: vc04_services: Get of even more suspend/resume states Date: Fri, 31 Jan 2020 11:38:32 +0100 Message-Id: <20200131103836.14312-17-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023918_870288_401ECCB1 X-CRM114-Status: GOOD ( 16.88 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org After the first states cleanup pass some set_suspend/resume_state() calls disappeared which opened up even more opportunities for deletions. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 100 +----------------- .../interface/vchiq_arm/vchiq_arm.h | 12 --- 2 files changed, 5 insertions(+), 107 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 db7ae204f50f..cee643a33642 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -48,15 +48,8 @@ int vchiq_arm_log_level = VCHIQ_LOG_DEFAULT; int vchiq_susp_log_level = VCHIQ_LOG_ERROR; -#define VC_SUSPEND_NUM_OFFSET 3 /* number of values before idle which are -ve */ -static const char *const suspend_state_names[] = { - "VC_SUSPEND_IDLE", - "VC_SUSPEND_IN_PROGRESS", -}; #define VC_RESUME_NUM_OFFSET 1 /* number of values before idle which are -ve */ static const char *const resume_state_names[] = { - "VC_RESUME_IDLE", - "VC_RESUME_REQUESTED", "VC_RESUME_RESUMED" }; /* The number of times we allow force suspend to timeout before actually @@ -2361,63 +2354,6 @@ vchiq_arm_init_state(struct vchiq_state *state, return VCHIQ_SUCCESS; } -/* -** Functions to modify the state variables; -** set_suspend_state -** set_resume_state -** -** There are more state variables than we might like, so ensure they remain in -** step. Suspend and resume state are maintained separately, since most of -** these state machines can operate independently. However, there are a few -** states where state transitions in one state machine cause a reset to the -** other state machine. In addition, there are some completion events which -** need to occur on state machine reset and end-state(s), so these are also -** dealt with in these functions. -** -** In all states we set the state variable according to the input, but in some -** cases we perform additional steps outlined below; -** -** VC_SUSPEND_IDLE - Initialise the suspend completion at the same time. -** The suspend completion is completed after any suspend -** attempt. When we reset the state machine we also reset -** the completion. This reset occurs when videocore is -** resumed, and also if we initiate suspend after a suspend -** failure. -** -** VC_SUSPEND_IN_PROGRESS - This state is considered the point of no return for -** suspend - ie from this point on we must try to suspend -** before resuming can occur. We therefore also reset the -** resume state machine to VC_RESUME_IDLE in this state. -** -** VC_RESUME_IDLE - Initialise the resume completion at the same time. The -** resume completion is in it's 'done' state whenever -** videcore is running. Therefore, the VC_RESUME_IDLE -** state implies that videocore is suspended. -** Hence, any thread which needs to wait until videocore is -** running can wait on this completion - it will only block -** if videocore is suspended. -*/ - -void -set_suspend_state(struct vchiq_arm_state *arm_state, - enum vc_suspend_status new_state) -{ - /* set the state in all cases */ - arm_state->vc_suspend_state = new_state; - - /* state specific additional actions */ - switch (new_state) { - case VC_SUSPEND_IDLE: - break; - case VC_SUSPEND_IN_PROGRESS: - set_resume_state(arm_state, VC_RESUME_IDLE); - break; - default: - BUG(); - break; - } -} - void set_resume_state(struct vchiq_arm_state *arm_state, enum vc_resume_status new_state) @@ -2427,14 +2363,8 @@ set_resume_state(struct vchiq_arm_state *arm_state, /* state specific additional actions */ switch (new_state) { - case VC_RESUME_IDLE: - reinit_completion(&arm_state->vc_resume_complete); - break; - case VC_RESUME_REQUESTED: - break; case VC_RESUME_RESUMED: complete_all(&arm_state->vc_resume_complete); - set_suspend_state(arm_state, VC_SUSPEND_IDLE); break; default: BUG(); @@ -2442,15 +2372,6 @@ set_resume_state(struct vchiq_arm_state *arm_state, } } -static inline int -need_resume(struct vchiq_state *state) -{ - struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state); - - return (arm_state->vc_suspend_state > VC_SUSPEND_IDLE) && - (arm_state->vc_resume_state < VC_RESUME_REQUESTED); -} - void vchiq_platform_check_suspend(struct vchiq_state *state) { @@ -2500,16 +2421,9 @@ vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, local_uc = ++arm_state->videocore_use_count; local_entity_uc = ++(*entity_uc); - if ((use_type != USE_TYPE_SERVICE_NO_RESUME) && need_resume(state)) { - set_resume_state(arm_state, VC_RESUME_REQUESTED); - vchiq_log_info(vchiq_susp_log_level, - "%s %s count %d, state count %d", - __func__, entity, local_entity_uc, local_uc); - request_poll(state, NULL, 0); - } else - vchiq_log_trace(vchiq_susp_log_level, - "%s %s count %d, state count %d", - __func__, entity, *entity_uc, local_uc); + vchiq_log_trace(vchiq_susp_log_level, + "%s %s count %d, state count %d", + __func__, entity, *entity_uc, local_uc); write_unlock_bh(&arm_state->susp_res_lock); @@ -2720,7 +2634,6 @@ vchiq_dump_service_use_state(struct vchiq_state *state) int only_nonzero = 0; static const char *nz = "<-- preventing suspend"; - enum vc_suspend_status vc_suspend_state; enum vc_resume_status vc_resume_state; int peer_count; int vc_use_count; @@ -2735,7 +2648,6 @@ vchiq_dump_service_use_state(struct vchiq_state *state) return; read_lock_bh(&arm_state->susp_res_lock); - vc_suspend_state = arm_state->vc_suspend_state; vc_resume_state = arm_state->vc_resume_state; peer_count = arm_state->peer_use_count; vc_use_count = arm_state->videocore_use_count; @@ -2814,12 +2726,10 @@ vchiq_check_service(struct vchiq_service *service) if (ret == VCHIQ_ERROR) { vchiq_log_error(vchiq_susp_log_level, "%s ERROR - %c%c%c%c:%d service count %d, " - "state count %d, videocore suspend state %s", __func__, + "state count %d", __func__, VCHIQ_FOURCC_AS_4CHARS(service->base.fourcc), service->client_id, service->service_use_count, - arm_state->videocore_use_count, - suspend_state_names[arm_state->vc_suspend_state + - VC_SUSPEND_NUM_OFFSET]); + arm_state->videocore_use_count); vchiq_dump_service_use_state(service->state); } out: diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index afd822546e2e..b1fad282db04 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -14,14 +14,7 @@ #include "vchiq_core.h" #include "vchiq_debugfs.h" -enum vc_suspend_status { - VC_SUSPEND_IDLE = 0, /* VC active, no suspend actions */ - VC_SUSPEND_IN_PROGRESS, /* Slot handler has recvd suspend request */ -}; - enum vc_resume_status { - VC_RESUME_IDLE = 0, /* VC suspended, no resume actions */ - VC_RESUME_REQUESTED, /* User has requested resume */ VC_RESUME_RESUMED /* Videocore resumed successfully (active) */ }; @@ -42,7 +35,6 @@ struct vchiq_arm_state { struct completion vc_resume_complete; rwlock_t susp_res_lock; - enum vc_suspend_status vc_suspend_state; enum vc_resume_status vc_resume_state; struct vchiq_state *state; @@ -130,10 +122,6 @@ vchiq_instance_get_trace(struct vchiq_instance *instance); extern void vchiq_instance_set_trace(struct vchiq_instance *instance, int trace); -extern void -set_suspend_state(struct vchiq_arm_state *arm_state, - enum vc_suspend_status new_state); - extern void set_resume_state(struct vchiq_arm_state *arm_state, enum vc_resume_status new_state); From patchwork Fri Jan 31 10:38:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359645 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B767B139A for ; Fri, 31 Jan 2020 10:45:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94B95214D8 for ; Fri, 31 Jan 2020 10:45:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Tqqm666i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94B95214D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=DDIuFhbj8U2eLYC5ywZkd3pNZVC55uG/5HHNjOcZ9qs=; b=Tqqm666iewxBhH HSx+aZduZAQxWWS0kMe5TCdwQ6u0UsQk2gu7bcvhfOlo2hGYkrGXHETsafd24REz79L6Mk0itJFyZ KhMoI22XDAqLi6iKiyrRMvJ3INpmecfkPfv0+Mx+3cVYrb/YI/DkRrcvXUsyDAfcGfNnPxYhJwCSK xlwz0wTpc/TCtnPXjs4TV1TMtM2EagQTEhjqBzPJYMd9DXsKoZuUiuA/vyMV1F/wdnF3CQch0RuzJ f2UX/j3hDwELQ2O4sxa5fODpi0XZOnx4Mfk+MxKWwgF5DnaDNtVcZ5l6QwK9sa8iJwdX/eW9FAQKR fdNGUvnH63EZHayzraEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTni-0002nn-AP; Fri, 31 Jan 2020 10:45:26 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThn-0003dv-6g; Fri, 31 Jan 2020 10:39:21 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D4430AFF6; Fri, 31 Jan 2020 10:39:17 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 17/21] staging: vc04_services: Get rid of the rest of suspend/resume state handling Date: Fri, 31 Jan 2020 11:38:33 +0100 Message-Id: <20200131103836.14312-18-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023919_672394_1291952F X-CRM114-Status: GOOD ( 13.78 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The only remaining state doesn't provide any information anymore nor the completion that depends on it, which is set to complete_all() before any user may wait on it. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 52 ------------------- .../interface/vchiq_arm/vchiq_arm.h | 11 ---- 2 files changed, 63 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 cee643a33642..e753ccffd588 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -48,10 +48,6 @@ int vchiq_arm_log_level = VCHIQ_LOG_DEFAULT; int vchiq_susp_log_level = VCHIQ_LOG_ERROR; -#define VC_RESUME_NUM_OFFSET 1 /* number of values before idle which are -ve */ -static const char *const resume_state_names[] = { - "VC_RESUME_RESUMED" -}; /* The number of times we allow force suspend to timeout before actually ** _forcing_ suspend. This is to cater for SW which fails to release vchiq ** correctly - we don't want to prevent ARM suspend indefinitely in this case. @@ -2342,11 +2338,6 @@ vchiq_arm_init_state(struct vchiq_state *state, atomic_set(&arm_state->ka_use_ack_count, 0); atomic_set(&arm_state->ka_release_count, 0); - init_completion(&arm_state->vc_resume_complete); - /* Initialise to 'done' state. We only want to block on resume - * completion while videocore is suspended. */ - set_resume_state(arm_state, VC_RESUME_RESUMED); - arm_state->state = state; arm_state->first_connect = 0; @@ -2354,24 +2345,6 @@ vchiq_arm_init_state(struct vchiq_state *state, return VCHIQ_SUCCESS; } -void -set_resume_state(struct vchiq_arm_state *arm_state, - enum vc_resume_status new_state) -{ - /* set the state in all cases */ - arm_state->vc_resume_state = new_state; - - /* state specific additional actions */ - switch (new_state) { - case VC_RESUME_RESUMED: - complete_all(&arm_state->vc_resume_complete); - break; - default: - BUG(); - break; - } -} - void vchiq_platform_check_suspend(struct vchiq_state *state) { @@ -2427,22 +2400,6 @@ vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, write_unlock_bh(&arm_state->susp_res_lock); - /* Completion is in a done state when we're not suspended, so this won't - * block for the non-suspended case. */ - if (!try_wait_for_completion(&arm_state->vc_resume_complete)) { - vchiq_log_info(vchiq_susp_log_level, "%s %s wait for resume", - __func__, entity); - if (wait_for_completion_killable( - &arm_state->vc_resume_complete)) { - vchiq_log_error(vchiq_susp_log_level, "%s %s wait for " - "resume interrupted", __func__, entity); - ret = VCHIQ_ERROR; - goto out; - } - vchiq_log_info(vchiq_susp_log_level, "%s %s resumed", __func__, - entity); - } - if (ret == VCHIQ_SUCCESS) { enum vchiq_status status = VCHIQ_SUCCESS; long ack_cnt = atomic_xchg(&arm_state->ka_use_ack_count, 0); @@ -2634,7 +2591,6 @@ vchiq_dump_service_use_state(struct vchiq_state *state) int only_nonzero = 0; static const char *nz = "<-- preventing suspend"; - enum vc_resume_status vc_resume_state; int peer_count; int vc_use_count; int active_services; @@ -2648,7 +2604,6 @@ vchiq_dump_service_use_state(struct vchiq_state *state) return; read_lock_bh(&arm_state->susp_res_lock); - vc_resume_state = arm_state->vc_resume_state; peer_count = arm_state->peer_use_count; vc_use_count = arm_state->videocore_use_count; active_services = state->unused_service; @@ -2677,13 +2632,6 @@ vchiq_dump_service_use_state(struct vchiq_state *state) read_unlock_bh(&arm_state->susp_res_lock); - vchiq_log_warning(vchiq_susp_log_level, - "-- Videcore suspend state: %s --", - suspend_state_names[vc_suspend_state + VC_SUSPEND_NUM_OFFSET]); - vchiq_log_warning(vchiq_susp_log_level, - "-- Videcore resume state: %s --", - resume_state_names[vc_resume_state + VC_RESUME_NUM_OFFSET]); - if (only_nonzero) vchiq_log_warning(vchiq_susp_log_level, "Too many active " "services (%d). Only dumping up to first %d services " diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index b1fad282db04..54c8796d5004 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -14,10 +14,6 @@ #include "vchiq_core.h" #include "vchiq_debugfs.h" -enum vc_resume_status { - VC_RESUME_RESUMED /* Videocore resumed successfully (active) */ -}; - enum USE_TYPE_E { USE_TYPE_SERVICE, USE_TYPE_SERVICE_NO_RESUME, @@ -32,10 +28,7 @@ struct vchiq_arm_state { atomic_t ka_use_ack_count; atomic_t ka_release_count; - struct completion vc_resume_complete; - rwlock_t susp_res_lock; - enum vc_resume_status vc_resume_state; struct vchiq_state *state; @@ -122,8 +115,4 @@ vchiq_instance_get_trace(struct vchiq_instance *instance); extern void vchiq_instance_set_trace(struct vchiq_instance *instance, int trace); -extern void -set_resume_state(struct vchiq_arm_state *arm_state, - enum vc_resume_status new_state); - #endif /* VCHIQ_ARM_H */ From patchwork Fri Jan 31 10:38:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359643 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B306139A for ; Fri, 31 Jan 2020 10:45:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 73B2B20CC7 for ; Fri, 31 Jan 2020 10:45:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="N/SUdNxm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73B2B20CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=0z6VLVyfAhtVDu5OIOi5XdQDyq0eWt7yyT7gIde8W4c=; b=N/SUdNxmLeqYEI 3iuut9LwK9NaXMJZjay71IN/t7xGYF205iBPfYU5AzEFQw54upsYSty+Y7rEpmfbrpeCsbIvc3zNq btFZfOyqrmDQjuLExoRhCLe7SZfR+d46he6rrVXE1yyZkYURMwdoyh6BzX480qQ8f8/ycczlrEcPA l49MFRGhNBSvq0ioiajavDWS1stQRdISEWlkVrriGuTygySMfjd5NUUxsx+udgx2h8ydrmJjIqyEy 02b3E4y3IkGnf8ky3c8/beP0rnQrJXwudBDpiQo6dG/49RgWtStN9+IAMlFY6jnIr3Clb3/x4qXOC nDu2b1brwLnKMHIVwoeg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTnW-0002L5-Q4; Fri, 31 Jan 2020 10:45:14 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTho-0003eW-BA; Fri, 31 Jan 2020 10:39:21 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 85A3CAFFC; Fri, 31 Jan 2020 10:39:18 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 18/21] staging: vc04_services: Get rid of USE_TYPE_SERVICE_NO_RESUME Date: Fri, 31 Jan 2020 11:38:34 +0100 Message-Id: <20200131103836.14312-19-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023920_607698_4FE53657 X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It's not used anywhere. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 54c8796d5004..795fd82a1d00 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -16,7 +16,6 @@ enum USE_TYPE_E { USE_TYPE_SERVICE, - USE_TYPE_SERVICE_NO_RESUME, USE_TYPE_VCHIQ }; From patchwork Fri Jan 31 10:38:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359651 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C658139A for ; Fri, 31 Jan 2020 10:46:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CAB95214D8 for ; Fri, 31 Jan 2020 10:46:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DR8zaX6t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAB95214D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=juUrl8B6WY/kSlxcoCv0Ug0tZtRzn9PesjWTT4jkj3U=; b=DR8zaX6tKZ4Lyq inJgPYaPMImyvUHy8/7L4PC110EsH7n9hdJsixfY8UOxo5ubfGlOkFwU2gEBCrYXQtQ0GCiPF+75c DdwIkSMZiirG82d9wKMpv5+YyS/7F87zTqvJ5Ws6RcWftk63mT7Its4QmXH/AcfudH8Txt3U6ZzzP kihY+vVA/WkuVF23FEmBOQjwUIiT1XpJTDV0Gi0GsSseKoNg+Wr1VO91pO+jJYOvalvD5hvOeaaNu YNSQsSMYYiUgRFz9iRJ6lrcMGVQaf+BbM+rhtt2O+MdwMWxDVB12Im8KRMJCJD9wLks69tLbF2CWp VjuGn1zmu4KfLKu0ppyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixToI-0003Na-La; Fri, 31 Jan 2020 10:46:02 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTho-0003fQ-UF; Fri, 31 Jan 2020 10:39:22 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 67526AF96; Fri, 31 Jan 2020 10:39:19 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 19/21] staging: vc04_services: Delete vchiq_platform_check_suspend() Date: Fri, 31 Jan 2020 11:38:35 +0100 Message-Id: <20200131103836.14312-20-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023921_235108_A80B5195 X-CRM114-Status: GOOD ( 10.07 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The function does nothing. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 15 --------------- .../interface/vchiq_arm/vchiq_core.c | 3 --- .../interface/vchiq_arm/vchiq_core.h | 3 --- 3 files changed, 21 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 e753ccffd588..81b1c98cae3c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2345,21 +2345,6 @@ vchiq_arm_init_state(struct vchiq_state *state, return VCHIQ_SUCCESS; } -void -vchiq_platform_check_suspend(struct vchiq_state *state) -{ - struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state); - - if (!arm_state) - goto out; - - vchiq_log_trace(vchiq_susp_log_level, "%s", __func__); - -out: - vchiq_log_trace(vchiq_susp_log_level, "%s exit", __func__); - return; -} - enum vchiq_status vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, enum USE_TYPE_E use_type) 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 c5493dee6dd7..d5957411d906 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1866,9 +1866,6 @@ slot_handler_func(void *v) DEBUG_TRACE(SLOT_HANDLER_LINE); if (state->poll_needed) { - /* Check if we need to suspend - may change our - * conn_state */ - vchiq_platform_check_suspend(state); state->poll_needed = 0; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 11037a499408..604d0c330819 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -590,9 +590,6 @@ vchiq_complete_bulk(struct vchiq_bulk *bulk); extern void remote_event_signal(struct remote_event *event); -void -vchiq_platform_check_suspend(struct vchiq_state *state); - extern int vchiq_dump(void *dump_context, const char *str, int len); From patchwork Fri Jan 31 10:38:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359647 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D8D013A4 for ; Fri, 31 Jan 2020 10:45:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B9BB206F0 for ; Fri, 31 Jan 2020 10:45:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q6BE2e8d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B9BB206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=q6I4gNkJno0Ziq8SP50JYJBHA4kmMHzUiFwhVWbevjg=; b=q6BE2e8d6HP4Mv jqw4lHt/zIqaIXUBnDvax+CyKsNVCc5fORQR+3HxxsJA1OgAw+Z2/0e7mhAQQteNsi/6kpgAmAzNM 55mjUn9acbOtWtxPF7rd1YcQYsaACCJTX6OEels8N0pWkyCCaqXFjkZ6oRTld/TQGZ/VjB//sCkxo Tg1ZkjcYLxcqgfCt6x4SPil0TUyZoPeOiwvlQB0+EVBVJPuLDUMFEJx9K6xBZidyZXsqM6t3SGUZU iSX6TV0UqIbY5vRpK7M1v3YmXghWdpfPrdGjF5qDtBqkn7Ts1+832Qouv06Zb1LR73mq1e84Vf4eL 0R/hz1bzcDVRWhWruoaQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTo1-00036E-2Y; Fri, 31 Jan 2020 10:45:45 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThp-0003ft-EV; Fri, 31 Jan 2020 10:39:22 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 123C9B001; Fri, 31 Jan 2020 10:39:20 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 20/21] staging: vc04_services: Get rid of vchiq_arm_vcresume()'s signature Date: Fri, 31 Jan 2020 11:38:36 +0100 Message-Id: <20200131103836.14312-21-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023921_677034_83E4498A X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The function implementation does not exist. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 795fd82a1d00..0784c5002417 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -64,9 +64,6 @@ int vchiq_platform_init(struct platform_device *pdev, extern struct vchiq_state * vchiq_get_state(void); -extern enum vchiq_status -vchiq_arm_vcresume(struct vchiq_state *state); - extern enum vchiq_status vchiq_arm_init_state(struct vchiq_state *state, struct vchiq_arm_state *arm_state); From patchwork Fri Jan 31 10:38:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11359675 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E12EB13A4 for ; Fri, 31 Jan 2020 10:46:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BEFFB206F0 for ; Fri, 31 Jan 2020 10:46:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gyD2qYx7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEFFB206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=DV6emEQdVW9mdo7o3o2uAsBbAdCbdlwNca3L081GEvY=; b=gyD2qYx7YyI8gz OZ3tvgtp47VPSh10L5KUelOAI4SWNNx81f+bPF+HubtfVcX+nztZCBOz52+n4nINm3WLKoFNpJG8s VfKbwgtawIjA2ifQv7SO/kntkfKxHNgsg1V7auXGRuFPoqRVagvvVWtBHSBkLQqttGA0TeZHQxfUt ojfSudGHxcqBpcTDCgGlb2aL7qs3U1CtsgKwym7DEWoX8ubkcjz/hi9abmD5otaQQDi+l3bzkgGee 9vTrjKl5h05ZLovqssM6mQa4O1jPriMbXTBk1WWgLHu+lvr25DNXoTDzcOkqEDZ+KmH3fRENaqEi3 Favjm9oyyH6M8JOHUjBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixTon-0003lQ-79; Fri, 31 Jan 2020 10:46:33 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixThq-0003gk-32; Fri, 31 Jan 2020 10:39:23 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B348EAF43; Fri, 31 Jan 2020 10:39:20 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 21/21] staging: vc04_services: vchiq_arm: Get rid of unused defines Date: Fri, 31 Jan 2020 11:38:37 +0100 Message-Id: <20200131103836.14312-22-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131103836.14312-1-nsaenzjulienne@suse.de> References: <20200131103836.14312-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_023922_288628_895C5689 X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org They aren't used anywhere. Get rid of them. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 10 ---------- 1 file changed, 10 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 81b1c98cae3c..c456ced431af 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -48,16 +48,6 @@ int vchiq_arm_log_level = VCHIQ_LOG_DEFAULT; int vchiq_susp_log_level = VCHIQ_LOG_ERROR; -/* The number of times we allow force suspend to timeout before actually -** _forcing_ suspend. This is to cater for SW which fails to release vchiq -** correctly - we don't want to prevent ARM suspend indefinitely in this case. -*/ -#define FORCE_SUSPEND_FAIL_MAX 8 - -/* The time in ms allowed for videocore to go idle when force suspend has been - * requested */ -#define FORCE_SUSPEND_TIMEOUT_MS 200 - struct user_service { struct vchiq_service *service; void *userdata;