Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5726321ybv; Tue, 11 Feb 2020 22:34:11 -0800 (PST) X-Google-Smtp-Source: APXvYqygzlrMiQab8a0xpIgRS7OL61ueU3bLlTQ0Rg5Fkm1MaP9pklPjNd7kEgpjjlx+C020MtVl X-Received: by 2002:a05:6830:50:: with SMTP id d16mr8221988otp.166.1581489251082; Tue, 11 Feb 2020 22:34:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581489251; cv=none; d=google.com; s=arc-20160816; b=XRY0eBSRUUMLhrR+6o0qQe/FI+kvp+FI/DNhE9TrPvZmVRCAVNTZDiXuCxJI4OdwX4 6XihcF7Bz9n5YfR6n/CqYuKJj3mOwJahKrmF/QtIbs20QwA6+sykCpU2E40vpTalWemr fr32rAPnBGNxspGn+6h4UGdzzW4XVYrk8YTvRZnfquFEA33tLdLnQ9tG/PPf7AQBfhfs xK5UKfHEapgXYACkcMZJ+mJpeBJ9r/IZY2p8Lqa1QjhmPIMooTRV6V7kXnkEiNf09Goh /Y0gRp1lwbbkOefVITRQncPdnwpnpmV77aAzgY7TPqaiw1qLunihFC9nwVXf/Z7vjBYS i/7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GxlpTDEfBiM+Lrd0uvS3F76lPFNbhk2ZRTz1WbZMTKk=; b=SgRV03fE+rB6abaH1WZIUJv1WXAS6mxN129orl3gXAFIvvxZYoAl7gq8/JUrRlBBJf UtPCOT1rEs+zZfRcoMjIE0wGuQmXVlz9iepYvso4lbLf8tEDoq/6EGoQ7z8ZSyczV+I2 /SD94Dt+82FIsoEmrM+9wEa3+o/6LqImp6IBsexaMMHp/VM0Ng5NiadHfN/ncqxy4Djm 49V3L9EK6KFgkyH5WCUBsgnAgkvNjByE5Po7S3bpjEYBWl4AmDRzJUHtuu5jguHQG9+v nd3KF8yoFbtz4SryFhEcuZolHuElY1z+02sNVwkGIAuEPWwqix6q3rCqusFzMF6JzUiw z9pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TMKHfvTs; 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 n7si2806783oie.95.2020.02.11.22.33.58; Tue, 11 Feb 2020 22:34:11 -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=TMKHfvTs; 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 S1728273AbgBLGcT (ORCPT + 99 others); Wed, 12 Feb 2020 01:32:19 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34320 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728100AbgBLGcT (ORCPT ); Wed, 12 Feb 2020 01:32:19 -0500 Received: by mail-pl1-f194.google.com with SMTP id j7so573201plt.1 for ; Tue, 11 Feb 2020 22:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GxlpTDEfBiM+Lrd0uvS3F76lPFNbhk2ZRTz1WbZMTKk=; b=TMKHfvTsUQifq2CQtrudVlOCHAb6Nb3YWpNg08b0/IQTbPlQ2PKKni61zTK9j5Mk84 oQP70mkWXnUPl4dg5H034uLrOnMW6yrX34706D9q4jZGFIFPklsDBDkrnbRSOGwhsPD0 WxO2AkIDFE/R9gBECZ7Ie8yAQM/zjZ0DbIC4bZGXL0v71JZ2vPuo7Txnp5MC87+yzYyh EMuYoA0OxXqdOKtY5ELEJiWYkuWOKFpz42kTjEdrmf5ckuwTfd3lJZAqFiT795n5bKIt Kl1ZoAjIBP6XszFNdxZGE/4Bct120kWwS60sUYNP776KQWhQRohjaGdbPS/HCswyB9un o2PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GxlpTDEfBiM+Lrd0uvS3F76lPFNbhk2ZRTz1WbZMTKk=; b=YNnuhYws2KursG2pzSzdBNHcN2xV1Uslv8XBGaNm73HfOYaLwh67f2TWDkAI0up5oB 2pc1Q5L3enwItimwCNil6M1Gu/CXEJ1p/SYq1Km7FWHBH2OzGijNPSl5apQ602BfRy5W inDfwrICUSCpjq5mstO+X4Fo6HKxSJ2J+Jk6HD+gNEuj2o7O1gDKO8tqSgiVuee6j7kh PpU1sd2MbjoFvpq1tpsubpbnOIQDRQAtGYlOzK8ZHll2FntFKt5RcGYtJEKAyViWooEi P084XVpylEKlv2u/xdC2Hrqsm8nCFsQua6pkF1oeGV0l0kSMHT0iaVolarkNiPrdARWV oU2g== X-Gm-Message-State: APjAAAU7Eoz9pwMaR8C2529xh9dnrSatfTBsw9sdIyjFfeMiUOL9vHSk PYt8uZPpmv5ZKN7XHazYtL0tkg== X-Received: by 2002:a17:902:8d83:: with SMTP id v3mr7040485plo.282.1581489136996; Tue, 11 Feb 2020 22:32:16 -0800 (PST) Received: from builder (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id l26sm6309608pgn.46.2020.02.11.22.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 22:32:16 -0800 (PST) Date: Tue, 11 Feb 2020 22:32:14 -0800 From: Bjorn Andersson To: Arun Kumar Neelakantam Cc: clew@codeaurora.org, Andy Gross , "open list:ARM/QUALCOMM SUPPORT" , open list Subject: Re: [PATCH] soc: qcom: aoss: Read back before triggering the IRQ Message-ID: <20200212063214.GP3948@builder> References: <1579681454-1229-1-git-send-email-aneela@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1579681454-1229-1-git-send-email-aneela@codeaurora.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 22 Jan 00:24 PST 2020, Arun Kumar Neelakantam wrote: > In some device memory used by msm_qmp, there can be an early ack of a > write to memory succeeding. This may cause the outgoing interrupt to be > triggered before the msgram reflects the write. > > Add a readback to ensure the data is flushed to device memory before > triggering the ipc interrupt. > > Signed-off-by: Arun Kumar Neelakantam Applied Thanks, Bjorn > --- > drivers/soc/qcom/qcom_aoss.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c > index fe79661..f43a2e0 100644 > --- a/drivers/soc/qcom/qcom_aoss.c > +++ b/drivers/soc/qcom/qcom_aoss.c > @@ -225,6 +225,7 @@ static bool qmp_message_empty(struct qmp *qmp) > static int qmp_send(struct qmp *qmp, const void *data, size_t len) > { > long time_left; > + size_t tlen; > int ret; > > if (WARN_ON(len + sizeof(u32) > qmp->size)) > @@ -239,6 +240,9 @@ static int qmp_send(struct qmp *qmp, const void *data, size_t len) > __iowrite32_copy(qmp->msgram + qmp->offset + sizeof(u32), > data, len / sizeof(u32)); > writel(len, qmp->msgram + qmp->offset); > + > + /* Read back len to confirm data written in message RAM */ > + tlen = readl(qmp->msgram + qmp->offset); > qmp_kick(qmp); > > time_left = wait_event_interruptible_timeout(qmp->event, > -- > 1.9.1