Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6631286yba; Wed, 1 May 2019 16:45:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyCXJRdwGhivRWVvac5o8J3AKakHE4IaDrhpUW17zezoFH3Z5euRUBucPzYOPQBmzPAZd5 X-Received: by 2002:a17:902:1003:: with SMTP id b3mr393174pla.306.1556754347317; Wed, 01 May 2019 16:45:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556754347; cv=none; d=google.com; s=arc-20160816; b=NFi1gF87FG5x15mv5mwMAVmyfanv39yE8wvghEt2Wcx4K3j6uwrLz3FkA5BweUfpO7 sceQZxGnlZ1OhK2gFm+bBJI1vqce5MUSALE8Itvnni+SMgHgfXrMIyjgLc7qw1dVlzDf mVNINg7nl7cRO/VKnS5dH+qU72ZMwQ3enHzj1wXdaXgwah/wIw7jdP4RemH4mxhNMyEm VIcx04U2oWjHlrPBRMFZEbT83/qrmVdC4GZuUGyBPVQo0Tz9sYGeGRwgtzBIbXXTkkgs u0WpTodqAXz87DV/wDTVN6S87s4+zl+zo+Z1wfx9y+SJaFSEU+6B2VLdfk7xSxytIZM2 Xsbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pafXGoHRoY3A9Ph0hnVkDMbF8BglHn/cfuWPvnCS8lw=; b=rhvVqOAijgwf7/FYPkBYdegFO2viB4ZJyXaYNOXCgm4UekvCgC9C/6fxI7bkwp/kzC XwferDGVIlVUrBwNXAINrFsXCTt7L6YxaiC+ZW7Yjm2F1UOfKdg+F1UATiGpXHLSvWtr o6Jo+nJbdLywBKQqKj4q5BeOd3jNHy+B6sAfKWglnSu5jkdsCz2St7KAZBQbOJUzVRHg vXATplN8cuMgWumM3t7le21DeM/eHHmVctUviR+36TWIloosf/oiK561Y+UtOZKTVI// oub0AwBL2RPHNXClbI0xe5BLCJHwXowdDWgP85o0nmYbRf/mLFxjMNiJDFn7UNateWF6 ZYQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nigCYDpO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si821067pfb.29.2019.05.01.16.45.32; Wed, 01 May 2019 16:45:47 -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=@gmail.com header.s=20161025 header.b=nigCYDpO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726335AbfEAXlv (ORCPT + 99 others); Wed, 1 May 2019 19:41:51 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:35567 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726296AbfEAXlt (ORCPT ); Wed, 1 May 2019 19:41:49 -0400 Received: by mail-it1-f194.google.com with SMTP id l140so376567itb.0; Wed, 01 May 2019 16:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pafXGoHRoY3A9Ph0hnVkDMbF8BglHn/cfuWPvnCS8lw=; b=nigCYDpOgmLtrcVFIoZU3TIg1KrhqoK81CSwx03NR/QB85HmPYu1nasg69LZViyM1m xB9lx0wduOqLJMo8FFrGwI5XOKYaiDv3h5R8moZ8TnBRgcO1UAt9k5WG6xiif1uZnAHW erIugG5TZHXNHD/0NKwGNDOfu0tcvGfZCs5swFkOzmU+H5sR+aTUGdK+OTo2CP1fy5SN yR04Of2L6lb2vnRR/qHrhC3iGsaA9CP86pdafz3x8ws4rmZb55EYB9vRwnunqpg5uQUZ vy7r1MJrpWT8EnJ+cD2dDl10lgAr6+pKS+iuXDscow+dcH6tblvHOtJGGytRAmCuypuG 1wng== 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:mime-version:content-transfer-encoding; bh=pafXGoHRoY3A9Ph0hnVkDMbF8BglHn/cfuWPvnCS8lw=; b=t4gNG1eBU5wga1PUTCeLopyPpXGinWP+H4nVld7snfkLLZgeOrO5fFDf6qSN9+VhmL QChCDyqiHa4chmYnwf7/vxsqtIq9HtJp9ba5VQjxgb0FsBw1UmyItvo/iC7w+BVsGvlM dEKp67k70Acj1kWpGvi6QKMHT+45AeTT1XHxio/AiVcrOaOqZZt8xrlsZZtdlnahQ4vz GfOBpO+acABTIIwc1gDqJ2rF0l64i6i0z9qcTIHNJQBapTaidQbVvnheePntNeZCg/KT +ub6PoJ/3sZgHgbdZ300nnOsGaDXXQzKcgrZAGCN5/T2dNqv3/OeCNP/OFIf3TjsNK+i +EEg== X-Gm-Message-State: APjAAAUHN18sfiB8CgQ7fg105VCnZ6Srn2/yB065/TyY34yoJKr8OEc5 yq5iwRSjrNzozdDz2ULHJtA= X-Received: by 2002:a24:f8c7:: with SMTP id a190mr227439ith.72.1556754108465; Wed, 01 May 2019 16:41:48 -0700 (PDT) Received: from localhost.localdomain (ppp94-29-35-107.pppoe.spdop.ru. [94.29.35.107]) by smtp.gmail.com with ESMTPSA id m3sm2392507ion.69.2019.05.01.16.41.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 May 2019 16:41:48 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Tomeu Vizoso Cc: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 03/16] PM / devfreq: tegra: Replace write memory barrier with the read barrier Date: Thu, 2 May 2019 02:38:02 +0300 Message-Id: <20190501233815.32643-4-digetx@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501233815.32643-1-digetx@gmail.com> References: <20190501233815.32643-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The write memory barrier isn't needed because the BUS buffer is flushed by read after write that happens after the removed wmb(), we will also use readl() instead of the relaxed version to ensure that read is indeed completed. Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko --- drivers/devfreq/tegra-devfreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/devfreq/tegra-devfreq.c b/drivers/devfreq/tegra-devfreq.c index f7378a42d184..7d7b9a5895b2 100644 --- a/drivers/devfreq/tegra-devfreq.c +++ b/drivers/devfreq/tegra-devfreq.c @@ -243,8 +243,7 @@ static void tegra_devfreq_update_wmark(struct tegra_devfreq *tegra, static void actmon_write_barrier(struct tegra_devfreq *tegra) { /* ensure the update has reached the ACTMON */ - wmb(); - actmon_readl(tegra, ACTMON_GLB_STATUS); + readl(tegra->regs + ACTMON_GLB_STATUS); } static void actmon_isr_device(struct tegra_devfreq *tegra, -- 2.21.0