Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3996483ybi; Fri, 19 Jul 2019 12:50:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCK7XVMYFD2hm0VEViCFdLvN0Ee3myUmLM0IeJ8gNWWxljCfmFolb4wyag2PP/gNinG8V7 X-Received: by 2002:a63:3046:: with SMTP id w67mr17366502pgw.37.1563565825404; Fri, 19 Jul 2019 12:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563565825; cv=none; d=google.com; s=arc-20160816; b=d/KnDYrRjieuOBS88ATdnI4j7DxjjmMYPdT2kHQcVgW5OU3sk0UWyN5fiC+gEZM5Ce E9KjiNFErPih+rOBL/rWqAogpBspe+wMsaMSIiidBhUXQ7qIC9SXJdDVMDWZu3EUOdkq ZuMO3osul97chmrDYh8ZSrBDRN4mZ0c5OoI3tJpKUopGptXfhJws5H9fVuZc6nnAoFMg VSUMLD9w9mfax3wo8S2YswRVJq4SgosKBDjfOqv2wM2U9SzoMZQ5t4WY+h8lv/mIL3qi 7rHyheIuuAsHhKajO2+UYIATRDXUGBOrW764zZIhNa3waO9aMoMLD1PBjHZcp65ZaFBW McDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:user-agent:from:cc:to:subject :references:in-reply-to:content-transfer-encoding:mime-version :message-id:dkim-signature; bh=Re7bGdDSOibN8TyYx8ctmhIgW7ORnAd3d48dCZJCs8Q=; b=IRGD++fY8nVW8lmXYbeoJmnwGt9HrPGrgchQ0EHAMAcB+nMijBQYsql9XDknbMjzhG E7VLQ5URVfirtfMbaC0AzvJHSWy0635vb+UW0O18khJUSjwLA1yIqaYE/y7Ej1ZXB3NW 7LHLxE94bvuu6Ji4Gdd7TC1TEaan0JzCEJVxdkbUOGFbMEi8dU7GGPeInnROCR7Dq6GG wOBzHitzArIQ3GBd4TjLKqBofXa0ZKYnnVcKWOBdqdFW7b74Sn/U1qUTXbtfBWknTyJA KxTm65tfusWpmU3pGWme06LHK1+0UTB5V9c5sOPleAkayPHOSHEYFf2eGoO3sHv/cTs8 mBIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="oEoDF/B5"; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n61si300129pjb.20.2019.07.19.12.50.10; Fri, 19 Jul 2019 12:50:25 -0700 (PDT) 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=@chromium.org header.s=google header.b="oEoDF/B5"; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731299AbfGSSWv (ORCPT + 99 others); Fri, 19 Jul 2019 14:22:51 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39612 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729247AbfGSSWu (ORCPT ); Fri, 19 Jul 2019 14:22:50 -0400 Received: by mail-pg1-f193.google.com with SMTP id u17so14811346pgi.6 for ; Fri, 19 Jul 2019 11:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=message-id:mime-version:content-transfer-encoding:in-reply-to :references:subject:to:cc:from:user-agent:date; bh=Re7bGdDSOibN8TyYx8ctmhIgW7ORnAd3d48dCZJCs8Q=; b=oEoDF/B5t2C4jMyi0S3gpDDDEAULRf8xC6rFSgoeZdTzvCnFkmp2+heSBg+MUNkDIK 79pg5Yxh7fPZnpa/k7fQwwMAqUxRN8E9EliidC4XXf5Ub3aqt9uKBijJG11AFMkmnDa8 VEjbN6CNTvnTRyBw2vzdxu6dkh15XZOgB/88Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version :content-transfer-encoding:in-reply-to:references:subject:to:cc:from :user-agent:date; bh=Re7bGdDSOibN8TyYx8ctmhIgW7ORnAd3d48dCZJCs8Q=; b=EeVr4gguX3g8Pni/PnHFe0BlYk3tTBNHGInEnAbT10oa5u0kxCdrQD1hgLN5HVOKNY MLnhqa3tmJowsefnc6BTNaAsXXLlMiAF8PsN6miZ2FXjMfjmInvYHmpZniaZcH8Wwwod dyvzez7jSsilYI31bL+G58wOpPwdm8/4XaC8XAOaCX91wnK6gO5O3smcDCNLfMMWMcWp +hePAAhhN5fke9+3vsu5gX7itCcIBLxiR2pdjGg1sgUVk2xd1yTaHpl3FdeLeHSr0ZPp 13lonZwLaXxlp/sT30osuVA6R2olz5vdXYGhTO+FoyGwEbHXe33X3hB/2bTYHVkEgECP QEWA== X-Gm-Message-State: APjAAAUha19d9biO6PXo5C/lgRpbF4qDFrlUcv7Q8vljK5EZThAAySf5 N8DTaw7C7zI7zbgxByZuiWxKig== X-Received: by 2002:a17:90a:8a15:: with SMTP id w21mr59661059pjn.134.1563560570145; Fri, 19 Jul 2019 11:22:50 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id 81sm52293060pfx.111.2019.07.19.11.22.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 19 Jul 2019 11:22:49 -0700 (PDT) Message-ID: <5d320a79.1c69fb81.17c57.b9ba@mx.google.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190701152907.16407-2-ilina@codeaurora.org> References: <20190701152907.16407-1-ilina@codeaurora.org> <20190701152907.16407-2-ilina@codeaurora.org> Subject: Re: [PATCH 2/2] drivers: qcom: rpmh-rsc: fix read back of trigger register To: Lina Iyer , andy.gross@linaro.org, bjorn.andersson@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rnayak@codeaurora.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dianders@chromium.org, mkshah@codeaurora.org, Lina Iyer From: Stephen Boyd User-Agent: alot/0.8.1 Date: Fri, 19 Jul 2019 11:22:48 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Lina Iyer (2019-07-01 08:29:07) > When triggering a TCS to send its contents, reading back the trigger > value may return an incorrect value. That is because, writing the > trigger may raise an interrupt which could be handled immediately and > the trigger value could be reset in the interrupt handler. By doing a > read back we may end up spinning waiting for the value we wrote. Doesn't this need to be squashed into the patch that gets rid of the irqs disabled state of this code? It sounds an awful lot like this problem only happens now because the previous patch removed the irqsave/irqrestore code around this function.