From patchwork Fri Jun 8 14:46:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138055 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp963048lji; Fri, 8 Jun 2018 07:46:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKHCrUhJvEyuLxkk/uPKZcoj28tEXuFNmMLMHKja5Il+H+EDy/VpxwOgrOSjM9ESHeOnjuH X-Received: by 2002:a65:4b46:: with SMTP id k6-v6mr2967313pgt.113.1528469217124; Fri, 08 Jun 2018 07:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528469217; cv=none; d=google.com; s=arc-20160816; b=s4jJHeD6Gm1+WG8NyZEU9fEc0ic9VhQ+WqJ+jdL/LmRiKxz033khfXo58htMJJcU+U 4o2hfgux4LMzmlriZlD8GcLDcEzf/9YdJYgMuxLLrREwSP68LZVxa5ySyatBsc06Csxz BiutLyPgcZ0Qw1Ph+BtYwhZV568aNq1INjGimtb5n1pcR5Cjcw4XAzVRr0945t59OTQA i3HC0GE26niX+sU5TzW6w2sCPpuXQy46yUnyapOlSlf3CFM3hiY91MrAgSKHn8QPn9KO rWUXjWnMBOphuQAQBySTHXyYByQE+ZZn7rdP9M9gIrsh8wENfHBjUBr4uHQR1AHezUEy Tu7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=hBcBtWKRvbXWBNlypS8Jt6HHWyPRYxC1Gy2ZFZSCLgo=; b=vxgcrHiVU7Rt551+455Ut/u+jryJfNQ+mMYkSDegIUu95Zw2n+JshrQqB04n58UDu8 AwW+A/jdzJDxhXLqv07JAip04zwlSOmkQXAWTe/hx8B9C0jkDHI4zzvum9utyobjTyKU 8zMtugsU6hu5UgDeGaQiDmRqBwCFO4Qk9ycdj8zUkpZyzCMYf6TCQhikY1vypDLfC3wD PtWI/6IiyRSK/IAAOtl/HUJWh+CPAauX711B5tfIDk4muRE/htk93T9ODFjvJVDBlSaz M7DS63Tnw91ABoeoCXfapcfo2MIvaUKZ0OVW9E1qeeA2it4QUI71S2dfXrGNYqvIxbiq OSoA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k23-v6si6782689pfi.177.2018.06.08.07.46.47; Fri, 08 Jun 2018 07:46:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753018AbeFHOqp (ORCPT + 30 others); Fri, 8 Jun 2018 10:46:45 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:45337 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977AbeFHOqi (ORCPT ); Fri, 8 Jun 2018 10:46:38 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MD8ge-1fUcYi19jw-00GaGi; Fri, 08 Jun 2018 16:46:20 +0200 From: Arnd Bergmann To: Brian King , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Arnd Bergmann , Kees Cook , Hannes Reinecke , Souptick Joarder , Wen Xiong , Sinan Kaya , Bart Van Assche , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: ipr: fix build on 32-bit architectures Date: Fri, 8 Jun 2018 16:46:00 +0200 Message-Id: <20180608144617.2900894-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:cCu/TTaTkc4gYbWtM3wDqUVBG45VXopUBxoNoybfEu5S4HjRYaU t2FSNBxKtk0zs7tcm5XgKS9tdpY4XHRL+qlJ7R2SouEUZ9jNLl1CAZwF3P46B/mbELpm9nK +lb5SLhA5UzaVEJRMemmbeqTBul1NZ07lBqxuYL1jQpRzlFeodCr12xSM+AN+HHijSBbxOC wpI9Zzjmka1RUCfW9QKxA== X-UI-Out-Filterresults: notjunk:1; V01:K0:qwLVsRHVGY4=:GEYev9FE7Gj80Cn9Cf/DD+ pMyev9ooifMju3cpPHlDYXWvT2N/F2z4jMPIw6SjWL3c18WWFgQu5Hdnw3MtBQD59Sm0aysqR hOvayT9VmwhWXpR86FXtcKY/DS5+0igptJYJWFdEu0v3vLGlRZAhLboSmsT9gUaRW786Z8PW8 nc4bHBA8FlwDwQxZ4UfcWAAuObgMCBgtKWew7ezHKQQWJp1v605vpCrApDYMzW2LlynlDJWDF uVhEBYbGPyV2oASN5q6h4/XF7yOIuBn7/K5FVG83fscQBeGfNVaFRaTnoIbZWiJQHganB48Y/ cGbjp34memPx+b1t4BxcARXkvCx+S3fiGG+QsqThU1a8UHUNLLx4hjrRWGN2Cscuvp6a/+wkj JGZnHbLuIGGzhvPbMJYdxtlKjN0LKqh7ycu51aJZteVbLTFNwAhM/VwR7OkTPkhZ8upYAjMgg 5qkak0FO5YQocU10YP7SWTRixeVJkGC5DjvhTrpP1LPzvO4hOA3l0WDMslkZhjOckVmUKQcyi oODScBuwcv6LlS1mDcigppDS3baRZzZFoQJIr3hgLY1DOtE5BF1W/vBw+2CEULEXN+LaJpGS0 QdXp8HE6POT8cMYMoeDVQ1wuc0RiVTA53wUC59gDV0h7CUPyWq/kknrwGeP0wKx5uUv9XscGv DRoh/34WnAN+k1I/yS0IP+Mu//OLH4BxIG6RY+RtuYIDu04VV//YiDShKq/0FM+I1dxk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replacing writeq() with writeq_relaxed() doesn't work on many architectures, as that variant is not available in general: net/Makefile:24: CC cannot link executables. Skipping bpfilter. drivers/scsi/ipr.c: In function 'ipr_mask_and_clear_interrupts': drivers/scsi/ipr.c:767:3: error: implicit declaration of function 'writeq_relaxed'; did you mean 'writew_relaxed'? [-Werror=implicit-function-declaration] writeq_relaxed(~0, ioa_cfg->regs.set_interrupt_mask_reg); ^~~~~~~~~~~~~~ writew_relaxed The other issue here is that the patch eliminated the wrong barrier. As per a long discussion that followed Sinan's original patch submission, the conclusion was that drivers should generally assume that the barrier implied by writel() is sufficient for ordering DMA, so this reverts his change and instead removes the extraneous wmb() before it, which is no longer needed on any architecture now. Fixes: 0109a4f2e02d ("scsi: ipr: Eliminate duplicate barriers on weakly-ordered archs") Signed-off-by: Arnd Bergmann --- drivers/scsi/ipr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.9.0 diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 865c07dc11ea..d2f67a41fcdd 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -760,13 +760,12 @@ static void ipr_mask_and_clear_interrupts(struct ipr_ioa_cfg *ioa_cfg, ioa_cfg->hrrq[i].allow_interrupts = 0; spin_unlock(&ioa_cfg->hrrq[i]._lock); } - wmb(); /* Set interrupt mask to stop all new interrupts */ if (ioa_cfg->sis64) - writeq_relaxed(~0, ioa_cfg->regs.set_interrupt_mask_reg); + writeq(~0, ioa_cfg->regs.set_interrupt_mask_reg); else - writel_relaxed(~0, ioa_cfg->regs.set_interrupt_mask_reg); + writel(~0, ioa_cfg->regs.set_interrupt_mask_reg); /* Clear any pending interrupts */ if (ioa_cfg->sis64) @@ -8401,10 +8400,9 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd) ioa_cfg->hrrq[i].allow_interrupts = 1; spin_unlock(&ioa_cfg->hrrq[i]._lock); } - wmb(); if (ioa_cfg->sis64) { /* Set the adapter to the correct endian mode. */ - writel_relaxed(IPR_ENDIAN_SWAP_KEY, + writel(IPR_ENDIAN_SWAP_KEY, ioa_cfg->regs.endian_swap_reg); int_reg = readl(ioa_cfg->regs.endian_swap_reg); }