Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp250165ybk; Tue, 12 May 2020 22:12:27 -0700 (PDT) X-Google-Smtp-Source: APiQypLprfUkLQ+VDPvcst0iHUtrcvnPMKJGYyp8OKqAoA7he0vrOtAyBjHmSqH3af0epP37k1yz X-Received: by 2002:a50:e704:: with SMTP id a4mr14812946edn.146.1589346747127; Tue, 12 May 2020 22:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589346747; cv=none; d=google.com; s=arc-20160816; b=0w3knSP3S+/Z3/FV3I0S3ItoEHryPuEakPvDYkn4m/YLoNGBC6j0ClJ05AITrP2OoR 5s9wVGI9lpAHFaF87XEePKxMY69HhFO546HC7X4UT6PYBYMBca72ilvVqOlNQZ2nWHkg zjq7/BFp9op5vEjNIQCWXgobuQYyhKhaGSnDZF9X+KTdWMELbyBlX650OTAgf3u8dsDR m+p9KVqWcbGF+wTs1GeVfl3nYKT1H9pby/QL3SGXfHVUSVdXsuw6cIIl8/2oc6fL3QtH Dm3Le3xxzrByYqZ1SwEqIX5WJqAo2wbwZvjl/bScDHXV3DgLReh0etTjCL81MlGtyBpy 3jtg== 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:dmarc-filter:dkim-signature; bh=Qw+4P/R9wWZW2AWyEuW8ad7PiceDW8cyznou4kkoxlU=; b=OAqPAhnMMk+Vtp6D/0bOwLzcYSHJBCWQkOMl9cHrN8CkMGFNWW3kRlUoTjQQgt6hnn FPsZ3K8SnPfzjjGs2/0e2UA610I6hmUxBc6OBg5QfGnCIEf9e+PT5xx/9fMCBU0MiWvM DI7pqAATn300XRL0nmFXIry2+YjPteDmicwPfKYZOUyedLCtIDQH0cECe1lgX6UKhnUs BspAbtky9rljEPmU9T/8ipxxrIdFVlBosTGcuY4k84FH6aD3JE6HPuDVNTqaFPhb0OTH Xyq/K+23kPiR1ctQoqOa0r43sEUueHrmUiJSbSM5j7zD4ryFqUhgyX1rtd/Ak+uBR929 Iq5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=paJB2yKm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si1837295edp.75.2020.05.12.22.12.04; Tue, 12 May 2020 22:12:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=paJB2yKm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728568AbgEMFK2 (ORCPT + 99 others); Wed, 13 May 2020 01:10:28 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:57244 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbgEMFK1 (ORCPT ); Wed, 13 May 2020 01:10:27 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1589346627; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=Qw+4P/R9wWZW2AWyEuW8ad7PiceDW8cyznou4kkoxlU=; b=paJB2yKmmOW6ig0It2oRynK+GSZlljsGjTaxFM1g7zoOZo5Jp3FMbyAd+Hx0rNQimNJsQcYe Fmx27ytsFiZq19WVh91oflIqrwjJ3RIJqPgSgKQiWkl5PCfbP7hTCZI/5AuwT3go2MGoeIAl 3p/xxuOyoalzwjrL86Rbeh5f8rI= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5ebb8142.7f00682d9ea0-smtp-out-n02; Wed, 13 May 2020 05:10:26 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 28DA6C433CB; Wed, 13 May 2020 05:10:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 Received: from aneelaka-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: aneela) by smtp.codeaurora.org (Postfix) with ESMTPSA id DBBF8C433BA; Wed, 13 May 2020 05:10:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DBBF8C433BA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=aneela@codeaurora.org From: Arun Kumar Neelakantam To: ohad@wizery.com, bjorn.andersson@linaro.org, clew@codeaurora.org, sricharan@codeaurora.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Arun Kumar Neelakantam , Andy Gross , linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT) Subject: [PATCH V5 1/5] rpmsg: glink: Use complete_all for open states Date: Wed, 13 May 2020 10:40:02 +0530 Message-Id: <1589346606-15046-2-git-send-email-aneela@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589346606-15046-1-git-send-email-aneela@codeaurora.org> References: <1589346606-15046-1-git-send-email-aneela@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Lew The open_req and open_ack completion variables are the state variables to represet a remote channel as open. Use complete_all so there are no races with waiters and using completion_done. Signed-off-by: Chris Lew Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/qcom_glink_native.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 1995f5b..604f11f 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -970,7 +970,7 @@ static int qcom_glink_rx_open_ack(struct qcom_glink *glink, unsigned int lcid) return -EINVAL; } - complete(&channel->open_ack); + complete_all(&channel->open_ack); return 0; } @@ -1413,7 +1413,7 @@ static int qcom_glink_rx_open(struct qcom_glink *glink, unsigned int rcid, channel->rcid = ret; spin_unlock_irqrestore(&glink->idr_lock, flags); - complete(&channel->open_req); + complete_all(&channel->open_req); if (create_device) { rpdev = kzalloc(sizeof(*rpdev), GFP_KERNEL); -- 2.7.4