Received: by 10.213.65.68 with SMTP id h4csp482769imn; Tue, 20 Mar 2018 07:57:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELvcFiMwfO+PSSX54TrxqDzwoXvrXVVkTkUI3vy2F/HknuhCra0mz4JjPoJWNX+q1/HlNjmv X-Received: by 10.99.112.25 with SMTP id l25mr12630681pgc.412.1521557872249; Tue, 20 Mar 2018 07:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521557872; cv=none; d=google.com; s=arc-20160816; b=CM4qfxUqOvhk3KS+VBq1S/g6zzrrKnAZK3UQi5Te89o//xUOlxfVMSFf/HGgndCQIO gGL6S+erny+Kd+IQJjtOoxYspe7Io9j92hmZLhtx5hxXsVZ5qPTTGt33rPsRolu2tcik jTyNj6Axha05kz4NNUUtT1WaXqE/76qC6CGgqG26b75vefTWpNUueT8/HrcAW87Kloar Li+Qk/sAN3UJ7+m1QKzPwo5vOFkaauYYanDAfXUhsokwg7BZ8oeKPvKV7ahXH59HwvHS JdYymhNoPJ49gy5xa+qWPMOAohGsRVU7wmaacTUSuwaQGUgoUsVZ+HBNGUtnuhwMA5jq VZNA== 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:arc-authentication-results; bh=5plO9xSBzShF62/fBBtMGSHVPVwXPUwP4MW74ynCg6s=; b=OGx5MVY9eeRkdEHoet/sR1+uqIULbpuwoxcSbJTTtbgseK7iqYNCGQ1PUaeeq2B3ys CtH6CeJt/prHwu7PzxuDUA+AO8NJuUQ8pz6NddqS+d3JndMFlFOeH1P4w0z+kP80wNjF Ite9856DqIVd5+K3hMlQmdzwug82i9UvwzlEMTD6wRqV/fpMVQGOKDiu2ClpCcGsFk1C InX77+Qr6qbEkvuO5fHKE4de2H/kuelpzlfnIxp83R2xoEQ2SqQlfBQYTUw+qwjJooQ/ KhIwIthgHijCj0FBRSDbHSRk3DpMwCqAQebO35I9oGrVBIQZqUNjbpMi73/uhjJnwpv0 ECqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=YYNPCnLD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2-v6si1712239plp.544.2018.03.20.07.57.38; Tue, 20 Mar 2018 07:57:52 -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=@ziepe.ca header.s=google header.b=YYNPCnLD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751583AbeCTO4e (ORCPT + 99 others); Tue, 20 Mar 2018 10:56:34 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33930 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbeCTO4c (ORCPT ); Tue, 20 Mar 2018 10:56:32 -0400 Received: by mail-wr0-f195.google.com with SMTP id o8so2010175wra.1 for ; Tue, 20 Mar 2018 07:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5plO9xSBzShF62/fBBtMGSHVPVwXPUwP4MW74ynCg6s=; b=YYNPCnLDAaV7ZkhsTvLfjoNMHlP+63Ct9hg3S9GtUiiCD/eRj6GshYJ8yCwnh5a8Zh EwoDh/HtepgXkVbEuB4W3SA67RCt3hJpg3SEWzoVePaU5GBz3cxL/p4TafhpLOHguZ00 SvbcwO3EOAmImDRWy+USueSY5B6mzWvmJ2dYCML0BBIFqqOhUmO/XdViwdzHBxydbLaz Hc9x+y/XIpNAWY/Tz8YB4fqL1BDGdWk0b1QbYpvhYrh0gDsyRnUjQCfavGTumq3KXRFn ivR9HQZHLjew9pPZNUiICujxKwalL2nhFRhRsrC+tgXaF4r37JxfsHJw+FVpdyZVgkS+ Op5A== 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=5plO9xSBzShF62/fBBtMGSHVPVwXPUwP4MW74ynCg6s=; b=o3axWpiVtTrP57/05H1BTcI6wQ2JR7X2+/0OHqv1bWKRQ1b0wy7bIVcBWmYxAojoFf bLasgXgvNx5saHoP7/CcY6tmVwxRq/eendGAwH1AZlyC6tobNFoA9fdPjILEcHYnkq4u 4B9nZlSRdf0BhOzJ6TeCNpEWKUqX5HwbtJpQUribtDT3E4CAR0CetwPs3lXZZgvtE75T kz0rIGvPePWIJuWeLH3ka/PSqk/uddBH85+LQYXJtTJX5Sgu26lR57WFCIY4sCcSZA4l HgLNTS4SrEFWEqQRrNxPhZd1YXALgIhOtCGACzT3RzBoAac0HfpWmSyxXXV7L+3tm5Go SGwQ== X-Gm-Message-State: AElRT7EEXF4uEkI5R5TuBRu9jA/WkTlMYiwrzk1kJ1K7YHQI4Hil80Sj FpTp6/meOk51RGxIx8DOayefOQ== X-Received: by 10.223.150.117 with SMTP id c50mr13403537wra.196.1521557791344; Tue, 20 Mar 2018 07:56:31 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id 33sm1524305wrs.74.2018.03.20.07.56.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 07:56:30 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1eyIgc-0006DT-Ul; Tue, 20 Mar 2018 08:56:26 -0600 Date: Tue, 20 Mar 2018 08:56:26 -0600 From: Jason Gunthorpe To: Sinan Kaya Cc: linux-rdma@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Faisal Latif , Shiraz Saleem , Doug Ledford , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/6] RDMA/i40iw: Eliminate duplicate barriers on weakly-ordered archs Message-ID: <20180320145626.GJ19744@ziepe.ca> References: <1521514068-8856-1-git-send-email-okaya@codeaurora.org> <1521514068-8856-4-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521514068-8856-4-git-send-email-okaya@codeaurora.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 19, 2018 at 10:47:45PM -0400, Sinan Kaya wrote: > Code includes wmb() followed by writel(). writel() already has a barrier on > some architectures like arm64. > > This ends up CPU observing two barriers back to back before executing the > register write. > > Create a new wrapper function with relaxed write operator. Use the new > wrapper when a write is following a wmb(). > > Since code already has an explicit barrier call, changing writel() to > writel_relaxed(). > > Signed-off-by: Sinan Kaya > drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 6 ++++-- > drivers/infiniband/hw/i40iw/i40iw_osdep.h | 1 + > drivers/infiniband/hw/i40iw/i40iw_uk.c | 2 +- > drivers/infiniband/hw/i40iw/i40iw_utils.c | 11 +++++++++++ > 4 files changed, 17 insertions(+), 3 deletions(-) The one looks fine Reviewed-by: Jason Gunthorpe Jason