From patchwork Fri Jan 5 23:57:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 123580 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1429324qgn; Fri, 5 Jan 2018 16:00:05 -0800 (PST) X-Google-Smtp-Source: ACJfBosKdWefLn95UQYznrHSPn1z7lk+ap8P3VwhoraskwtwxtUCqiUvoZEgiwESvt2m+PGONSJn X-Received: by 10.84.129.36 with SMTP id 33mr4621437plb.69.1515196805216; Fri, 05 Jan 2018 16:00:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515196805; cv=none; d=google.com; s=arc-20160816; b=LT/XmEj8CNIaSvrOnD52bAe3oaC3LRrjW4XxavXKOP32J69m6tbQFBkHWuOJuRIycM 2+PBmuyQKoMjHv9N3QoCj6V3IIb8Yuyd0XAqbxdY80qjhsquzwGpfvuWP30SlFJ2qh1R 6mBqRLJfCM0nU+rm1nE24zftFVaex0GtSsw3uk3fcnguMrX2XrQbtDKviqdWl6X7xkjz SsSb0VtC/7H3JX8l32rOOUybY1kWUC2HeogniFrvke+EdTii65vZSkKhYyjjTnwPvLEu 17bnCoZUlHmSyfgp4MiTTqUBoEwX3OaDkRfXa5QnIFJxDPtBlubkD8Hx3R0JWfCnhFNt mr+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=MyAujyRV4KT3zFlegLXQFsBHCi2qd1voVZmo+WdUOn0=; b=rvX0nhwqb8DTDpGXHGV09ThQwDsz9atiqVVglyg4/HFx08TwvgaC82XK2zU+ADCUKL XfA8fIQdAr1hQWAAxWkeu7il83zFSybxb/9CikxHPu/Zq+ugrKSUASS2jgFhxOpNzQYF dV1B7lyAysEQhBZSNnxZ0gLX4n3I7jrnDIf54JHgjAn0Xt8TRAYR4g2+mS2OwHezxj8W KmkGbeeTu149kR/ekp9gSVdXTXW33+K/2n7MbSVAzuHtHcmtRvYVDt+355zN1dmGS8hD IOmF0mASS7kmfGhp1YhZ3bcZ9yZFOfyUGHD2JyN2MoWAPh78lJi33Oye05+h2qV2e3ip mBtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TBhHphKK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si4636838ply.324.2018.01.05.16.00.04; Fri, 05 Jan 2018 16:00:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TBhHphKK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753510AbeAFAAD (ORCPT + 28 others); Fri, 5 Jan 2018 19:00:03 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37995 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752735AbeAEX6L (ORCPT ); Fri, 5 Jan 2018 18:58:11 -0500 Received: by mail-pg0-f67.google.com with SMTP id t67so2567807pgc.5 for ; Fri, 05 Jan 2018 15:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MyAujyRV4KT3zFlegLXQFsBHCi2qd1voVZmo+WdUOn0=; b=TBhHphKK11uSoOsgd5igbYTtsUCv8uoI3rAVKhf/7KbA/Qu1Zz6f6a29ZkaTJsAolg XlwOYxV73xI4W1mpRXnZeVREGpwBCLf4tlK5R5+tdd4dRgiIuh5+onkAly6YcSWsknaM +ccgnMF3YYZU6zsWXdjenwk7qDLx0SQYWeN58= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MyAujyRV4KT3zFlegLXQFsBHCi2qd1voVZmo+WdUOn0=; b=RMrIymnEXnuU2K8crPXx7F17uKbLDPHvQjKHEgRRlDpgCPOpL99psSDj3xKB1EVFM4 txeH5UxS2h085uSXGfsuJJ6wdoFIQW8/wAr7xAlEftiCkvX8Bxte0Qk58i6gBdvdR+P/ kkYIISTyfbSy2YCekKyDjhger0igAEmQxN3Rpe3iXArefjHTlAZDeMq9JhOuB6QqSA/G Zslfcca3FYAvUFgZGrDnh8fxX5ML3qM48/ogxbFPh17+DhLVTdcKdhCiuwBTFP3AcU1J UqyxJtlWg9JYsHHrXyGblJmdlu50/NNhQ6IEt/FCKzp3XeugKzaAdCH/GW9MbZXtQfR+ KbVQ== X-Gm-Message-State: AKGB3mKpgq4s966OVwuwYnlgBQzHHSZHHNcvrai8P3U3giohKnU1xErN 51DQsFbplLpQhp0nTqEyPMno8w== X-Received: by 10.99.42.83 with SMTP id q80mr3765875pgq.183.1515196691003; Fri, 05 Jan 2018 15:58:11 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id x4sm14473188pfk.51.2018.01.05.15.58.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 15:58:10 -0800 (PST) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Loic Pallardy Subject: [PATCH v2 1/8] remoteproc: Remove depricated crash completion Date: Fri, 5 Jan 2018 15:57:58 -0800 Message-Id: <20180105235805.9948-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180105235805.9948-1-bjorn.andersson@linaro.org> References: <20180105235805.9948-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The crash handling now happens in a single execution context, so there's no longer a need for a completion to synchronize this. Signed-off-by: Bjorn Andersson --- Changes since v1: - None drivers/remoteproc/remoteproc_core.c | 10 ---------- include/linux/remoteproc.h | 2 -- 2 files changed, 12 deletions(-) -- 2.15.0 diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index eab14b414bf0..758fad3131a3 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1028,10 +1028,6 @@ static int rproc_stop(struct rproc *rproc) return ret; } - /* if in crash state, unlock crash handler */ - if (rproc->state == RPROC_CRASHED) - complete_all(&rproc->crash_comp); - rproc->state = RPROC_OFFLINE; dev_info(dev, "stopped remote processor %s\n", rproc->name); @@ -1057,8 +1053,6 @@ int rproc_trigger_recovery(struct rproc *rproc) dev_err(dev, "recovering %s\n", rproc->name); - init_completion(&rproc->crash_comp); - ret = mutex_lock_interruptible(&rproc->lock); if (ret) return ret; @@ -1067,9 +1061,6 @@ int rproc_trigger_recovery(struct rproc *rproc) if (ret) goto unlock_mutex; - /* wait until there is no more rproc users */ - wait_for_completion(&rproc->crash_comp); - /* load firmware */ ret = request_firmware(&firmware_p, rproc->firmware, dev); if (ret < 0) { @@ -1459,7 +1450,6 @@ struct rproc *rproc_alloc(struct device *dev, const char *name, INIT_LIST_HEAD(&rproc->subdevs); INIT_WORK(&rproc->crash_handler, rproc_crash_handler_work); - init_completion(&rproc->crash_comp); rproc->state = RPROC_OFFLINE; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 44e630eb3d94..6f1d8e025c81 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -406,7 +406,6 @@ enum rproc_crash_type { * @index: index of this rproc device * @crash_handler: workqueue for handling a crash * @crash_cnt: crash counter - * @crash_comp: completion used to sync crash handler and the rproc reload * @recovery_disabled: flag that state if recovery was disabled * @max_notifyid: largest allocated notify id. * @table_ptr: pointer to the resource table in effect @@ -437,7 +436,6 @@ struct rproc { int index; struct work_struct crash_handler; unsigned int crash_cnt; - struct completion crash_comp; bool recovery_disabled; int max_notifyid; struct resource_table *table_ptr;