From patchwork Tue Dec 12 23:58:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 121686 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4784533qgn; Tue, 12 Dec 2017 15:59:30 -0800 (PST) X-Google-Smtp-Source: ACJfBovPv4JLgtdXG2Dwz3zdef5xTf6pN0fM01vq9Ejq2CMVoOygdPzK6WoCuZvO3eQzXK6Bgy+z X-Received: by 10.159.247.202 with SMTP id v10mr3842755plz.309.1513123170310; Tue, 12 Dec 2017 15:59:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513123170; cv=none; d=google.com; s=arc-20160816; b=yW+qcsuYddbkUD9wcsTHXkXQIi8b7JFSijKVmPovx97C3ujUyeI93sl8n4imfvX/QS czAcjx3KUbUvpWTBJvnIuLJW5awq3eKtFdiQUATp4EPPOqX/moW+gRVwV52vpvq1/Oz8 VnOVMIuQVcvjxJ7gPv821MbOKhdx9zxJMcDRWk0TOJeGSmVEND+oYjaRfVATqGc4pUbY HLJ/sPuDI4jTencZvfOx/kiY6Vb8ss+AbKZbWWDZovaYu8Wk88CTk+HeMmam0dhqw9yl MpBi8JxUD15qv3pICiTJYU4NHiEluy/kljKTZcqQOre11MGB+wY4Y4q+vTzzJ69BidPa wqhQ== 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=/OMeT0++q3DjkQ150GU/dIlSKmy49pn+j/+5N656LrM=; b=XFDLy92sUtUxrkc48XFX09jDucd5DkosAdbkbo3AOx61m+K28Z4hnBx7agfAY8Yj2D zhCNn15+W4m7voYa0FXeqib+yFF8/E83FbHnjzFSQox5qxbtzaL7OlLFedlTFU4Qjl6s ziMVHN0oPe3SosWGHE2zhFEmbgOZXkp31A9DJpg63YMEh0WHG8JV8uFvlKEMMSE5JDm+ /JjWnKzXseryd5NwsTxACOPPY11iwIsef0SOyizLfzU2N3f8sdzOl9cmC0/NCg4wAi+Y RKQTsLmftSmmyeQ2Kwxx+M9M65xmV1cK78T4O+LNlEhPFa6nWLGA71oIKueRUhFU0EHJ I7Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bIrFmbcb; 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 n3si258952pld.566.2017.12.12.15.59.30; Tue, 12 Dec 2017 15:59:30 -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=bIrFmbcb; 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 S1752922AbdLLX7L (ORCPT + 11 others); Tue, 12 Dec 2017 18:59:11 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:42474 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752872AbdLLX7F (ORCPT ); Tue, 12 Dec 2017 18:59:05 -0500 Received: by mail-pf0-f193.google.com with SMTP id d23so484172pfe.9 for ; Tue, 12 Dec 2017 15:59:05 -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=/OMeT0++q3DjkQ150GU/dIlSKmy49pn+j/+5N656LrM=; b=bIrFmbcbEzKztD6TLy4BpYzxrVMkiQnvhAUtwuqgTtEJdVYBPSHyrlcgVI/GJeyk+o kVPh6Pb4JwWu0QmzMo0YJmFbAomTjlWsPj/fak+spfEl4YA3sFp81bxO1T/AHPs+EhT5 0Au2duYmmrB531P5Vw4D6tPh+bZNX2MvJXJrI= 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=/OMeT0++q3DjkQ150GU/dIlSKmy49pn+j/+5N656LrM=; b=Td9hSdgnyN3rZjptPqlxNNPaGuqXZN/GmWKGyA9VGIL2lmpMiGlv6pbJMl3T1GbYPu XsuqgyCo3n7PCWgiWRugLqZ0732f0zjern+V7epKwWyzBM7I51JxVkGwUFXxcXV6Yuvh kn88U5nRzXyjshGXQeIkI2QLG8QfsHWL7xe2by2Qceh3CfVHLOCb4xg+fTF+sz0cqiYi drcJixngBcgInbqgzuKTeSmAQGB0Q7aHYKwdDd8AjnSoYPgdbNceRWjcYdTccMyojN9H FnpLsIooH/B5L3uIsT4FTeDcyFb25rjZ7jT8Q4tjDKmOb3x0q8tFq6/COe76B7bfKmg7 CJzA== X-Gm-Message-State: AKGB3mJedcuPMgjYA7oM1ogCPfpc7duhUq2yBGjbivvt1YXDdEUjsJ9a hOcj3Q2J09Q7VYHMZ/n98fWR9Q== X-Received: by 10.101.80.1 with SMTP id f1mr3588825pgo.262.1513123144491; Tue, 12 Dec 2017 15:59:04 -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 t202sm270317pgb.75.2017.12.12.15.59.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 15:59:03 -0800 (PST) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Chris Lew , Jeremy McNicoll , Will Newton Subject: [PATCH 3/5] rpmsg: smd: Wake up all waiters Date: Tue, 12 Dec 2017 15:58:55 -0800 Message-Id: <20171212235857.10432-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171212235857.10432-1-bjorn.andersson@linaro.org> References: <20171212235857.10432-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's possible to have multiple contexts waiting for new channel events and with an upcoming change it's possible to have multiple contexts waiting for a full FIFO. As such we need to wake them all up. Signed-off-by: Bjorn Andersson --- drivers/rpmsg/qcom_smd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.15.0 diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 1beddea6f087..0993e95bf0f5 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -579,7 +579,7 @@ static bool qcom_smd_channel_intr(struct qcom_smd_channel *channel) /* Signal waiting qcom_smd_send() about the interrupt */ if (!GET_TX_CHANNEL_FLAG(channel, fBLOCKREADINTR)) - wake_up_interruptible(&channel->fblockread_event); + wake_up_interruptible_all(&channel->fblockread_event); /* Don't consume any data until we've opened the channel */ if (channel->state != SMD_CHANNEL_OPENED) @@ -1191,7 +1191,7 @@ static void qcom_channel_scan_worker(struct work_struct *work) dev_dbg(&edge->dev, "new channel found: '%s'\n", channel->name); set_bit(i, edge->allocated[tbl]); - wake_up_interruptible(&edge->new_channel_event); + wake_up_interruptible_all(&edge->new_channel_event); } }