Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3789291imm; Tue, 29 May 2018 13:48:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLs1+2yJCHTCNt2vwdcW8bf/6kOmJ9QD7kmfnDhqDOd7N10yaDGHTxnvYX/M8olgcqU5gkQ X-Received: by 2002:a63:2f04:: with SMTP id v4-v6mr9733427pgv.33.1527626892722; Tue, 29 May 2018 13:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527626892; cv=none; d=google.com; s=arc-20160816; b=yLYKd963MF7KbMTs+j+S8rTw8cx/Lf6wrrFE48R6TOxkMWK1gZZL8kbwXzFU6UoL59 sEaT/gmWbid760j8JABeVPHmFQvwrxDVHBv2a997hUYcKweuETrXt0+Q9jbH81brjnNp ToTZfTbh+clRxo14CyuUln/mxIIlIcQjf/mnJ+24zKLSZBOnnBjDRXrtQ0jYX0yV4Fh5 lMKAWOuF3CQt3oPz3I6IPO1OEz3g6/ISTBWhcqQSRoYUfjeM1CaDjJSwMzt8BYUIA3H3 RpxjzQ6P1sLCBScKPhS9F0mQmEMiZ8KZoStnrUvhnUGhaLmS2NIxcEkz6ZTtzsGZU/xO u1Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=ITCxQjEJWw7eySxTMZr8j0npxYKLUK7RA38tl1RhngQ=; b=nqKAwX1twGsh1yj/cHvIuq/Wo/dX7MNDv+j2WSX7Xq9rbM2kO+zMA++yGkh7PwzV3r m4+PVfkZ0gy5DM/nElBf+he7TE32+brjzmtKQQf7UjCV56NwVYeJmpdHAiogrXo/V+BP J6yhy3/zqu/wayROOwQJLvJNY8wAZ0X5R9hBR2IHyh+ADOgGWo3eg5E63CgURx2OYMxG gbTBZnuSCMAXlOG3PSyRx2DZQuyH3BFEuB32DDQ7Hx36WcRBiYhlYsnoxB5i2Q/lSj6Z quvfXks7xlvGsjXuVJyzG9n8BPNHdqLY344MkXIs4ITc/YuiCEJm3mVa+62ZflHvlA19 DHfw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14-v6si9467773pgu.415.2018.05.29.13.47.58; Tue, 29 May 2018 13:48:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966921AbeE2UqA (ORCPT + 99 others); Tue, 29 May 2018 16:46:00 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42724 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966767AbeE2Up6 (ORCPT ); Tue, 29 May 2018 16:45:58 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4TKiRRv019276 for ; Tue, 29 May 2018 16:45:57 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j9cy3ahfn-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 29 May 2018 16:45:57 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 May 2018 14:45:56 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 29 May 2018 14:45:54 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4TKjrcf11469220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 29 May 2018 13:45:53 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B5CCEBE038; Tue, 29 May 2018 14:45:53 -0600 (MDT) Received: from oc6034535106.ibm.com (unknown [9.10.86.128]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id 0BDA1BE040; Tue, 29 May 2018 14:45:52 -0600 (MDT) Subject: Re: [PATCH v4 5/7] scsi: ipr: Eliminate duplicate barriers on weakly-ordered archs To: Sinan Kaya , linux-scsi@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Brian King , "James E.J. Bottomley" , "Martin K. Petersen" , linux-kernel@vger.kernel.org References: <1521514207-10695-1-git-send-email-okaya@codeaurora.org> <1521514207-10695-6-git-send-email-okaya@codeaurora.org> From: Brian King Date: Tue, 29 May 2018 15:45:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1521514207-10695-6-git-send-email-okaya@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18052920-0016-0000-0000-000008D403A0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009097; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000264; SDB=6.01039523; UDB=6.00532045; IPR=6.00818652; MB=3.00021362; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-29 20:45:56 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052920-0017-0000-0000-00003EFC8DE1 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-29_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=801 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1805290219 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/19/2018 09:50 PM, Sinan Kaya wrote: > Code includes barrier() 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. > > Since code already has an explicit barrier call, changing writeX() to > writeX_relaxed(). > > Signed-off-by: Sinan Kaya > --- > drivers/scsi/ipr.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c > index e07dd99..209adac 100644 > --- a/drivers/scsi/ipr.c > +++ b/drivers/scsi/ipr.c > @@ -762,9 +762,9 @@ static void ipr_mask_and_clear_interrupts(struct ipr_ioa_cfg *ioa_cfg, > > /* Set interrupt mask to stop all new interrupts */ > if (ioa_cfg->sis64) > - writeq(~0, ioa_cfg->regs.set_interrupt_mask_reg); > + writeq_relaxed(~0, ioa_cfg->regs.set_interrupt_mask_reg); > else > - writel(~0, ioa_cfg->regs.set_interrupt_mask_reg); > + writel_relaxed(~0, ioa_cfg->regs.set_interrupt_mask_reg); > > /* Clear any pending interrupts */ > if (ioa_cfg->sis64) > @@ -8435,7 +8435,8 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd) > wmb(); > if (ioa_cfg->sis64) { > /* Set the adapter to the correct endian mode. */ > - writel(IPR_ENDIAN_SWAP_KEY, ioa_cfg->regs.endian_swap_reg); > + writel_relaxed(IPR_ENDIAN_SWAP_KEY, > + ioa_cfg->regs.endian_swap_reg); > int_reg = readl(ioa_cfg->regs.endian_swap_reg); > } > Looks fine to me. Thanks. Acked-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center