Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1014294ybi; Fri, 12 Jul 2019 08:15:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQXPchQgxyCDqLiQ+TcgVEkqKW4dW1R8F81SdWQwHjBwXLovw0Eo9myXD8Kh8tYPTCcmq8 X-Received: by 2002:a65:6495:: with SMTP id e21mr11499928pgv.359.1562944543072; Fri, 12 Jul 2019 08:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562944543; cv=none; d=google.com; s=arc-20160816; b=anfR8OwZ77XGOlrhtVCA7tzRgIX2CsNo8WzzUDTlCsf/WmTRfn0BdjAc8Rbdwc9a9G hIO3rLHjK81XlPMBbDFYrdSaAp5hbATjiy0p/XiO2SDIijRzKHsuBw+XSj9ZJsrtXkSH wM2Pfhf6fnc+fP4+9yo8C73+Q+KAHSumnI438XNyr2m+5bVb78EstpuPXDgdv/ae+bH2 1dH1wSInAO2GyNd8/d08u8iH8mJlCN3IytwTIECvLm87KUjhpB9ii6YeOQJTZ7ScD+Da 3kTl8rpK3d62c17nrAwcASNXX1Zd5/c5byqKdsBOYJEHCve7G1G4e8+GDORYBYcTJ3Hf nnJw== 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; bh=1NndeDHC4SKCtD2njC25wcF/fpw0ZFMG+wxyiwc8W7Y=; b=e9GaPDh/KEzCl9SOP1pHQM1rJnmomsCE+ZW2VR7zQ//X6bR1muStAVID+IncR/xxJ8 5AKspHhujfUn+i6NWXMbyvzwoCdwGgMK3UFQi0V1duz+q93ryWm7Nqd5Tz0k+FljvbQR ulfExR+mmqrCKrlbxo+zSvMmd/SdkJZO0bJxV2/gcxvE2JfdPj+wuQc0cNoDYFR9uU/V sCK1orFUOk2SfVAGwi2vGce1bSP2OXyFhk1YijKPm6PSVBwdMtF6JyKOZKKvHq5BBeI3 w8fxy7O4L77XzvICFOOzSjyjxSCBKz+hV6ViMgwjb6EIq2HuIbXEqcaotnCd3b9e+A1E 3gTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="l45/aiqY"; 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 cb13si7848460plb.325.2019.07.12.08.15.27; Fri, 12 Jul 2019 08:15:43 -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="l45/aiqY"; 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 S1727132AbfGLPOZ (ORCPT + 99 others); Fri, 12 Jul 2019 11:14:25 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:41701 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbfGLPOZ (ORCPT ); Fri, 12 Jul 2019 11:14:25 -0400 Received: by mail-qt1-f195.google.com with SMTP id d17so8394819qtj.8 for ; Fri, 12 Jul 2019 08:14:24 -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=1NndeDHC4SKCtD2njC25wcF/fpw0ZFMG+wxyiwc8W7Y=; b=l45/aiqYWpvyQ1RtFqL4X2dgQ4zP4rHvDqXZDf+brdvNfOSxkqU5NzKU7E56br/H+e zoJ7wBWrL//znBKcRoro1c9RrDoLsxUlUGt0b3WHUvQ1gaOavfbEMrsCEBBw0Zj0iuxp 41/CfFkA8o6kRCiaXTE1ZeevDGmvF41ji1PiODQU8nizvAgIpiAJdoSlHvLbKodPZb4L gXoFZpa+1EKQHdqp9CrqPvV49ZfSKr4i/QcQdaGpudb1mnXU6gXicDgbomjMdopnFJPH PXqnAt74gvGMDuT5DzQeeHxli7baf1lzNYDqPHzPlzYkhpOAjqk+jqXegqzk1GCB+A1q sECQ== 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=1NndeDHC4SKCtD2njC25wcF/fpw0ZFMG+wxyiwc8W7Y=; b=PTI/ZU4kn2OeA9AGQhs93gffbFc6rrpCsSGKHguJdXJYk4yW6UmL83NVe4CcbIyXGX eXOunYr4lETigFSnFsn+nq6AmfnJ5bG1FNEW4TRv7pKAjBHt21qJ1dQluGLzqA30nRh2 i07DjbkEhDzXvvB0Tr1NKSK0pvdXdofNYPip5lSs7u+h36D1v8NhzY4V+BGsmQconNJu 7SXd0RRScLdcudrmIUUlGFfh7bnD8J9vT461c4seThBhRV0ym0D5Mt83QlrHSzBhRJz8 /fCM+oKDaywQMaVnknz6k9VjIpLNA3mgiGsnOWXhI078JAkROTdbFOUNwilCb4HY+AKv oZow== X-Gm-Message-State: APjAAAWGSzZRhjOx1bRcyPfv5p06i7Vopw3Yy+/v5lu++4r23gNOZcyc 82+VKTQZxZiQBZVKpVNfrnmEeQ== X-Received: by 2002:a05:6214:1447:: with SMTP id b7mr7231470qvy.89.1562944464279; Fri, 12 Jul 2019 08:14:24 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id d25sm3518972qko.96.2019.07.12.08.14.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jul 2019 08:14:23 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hlxFf-0002BK-4s; Fri, 12 Jul 2019 12:14:23 -0300 Date: Fri, 12 Jul 2019 12:14:23 -0300 From: Jason Gunthorpe To: Arnd Bergmann Cc: Bernard Metzler , Doug Ledford , Peter Zijlstra , linux-rdma , Linux Kernel Mailing List Subject: Re: Re: [PATCH] rdma/siw: avoid smp_store_mb() on a u64 Message-ID: <20190712151423.GG27512@ziepe.ca> References: <20190712085212.3901785-1-arnd@arndb.de> <20190712120328.GB27512@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 12, 2019 at 03:22:35PM +0200, Arnd Bergmann wrote: > On Fri, Jul 12, 2019 at 3:05 PM Bernard Metzler wrote: > > > > > We share CQ (completion queue) notification flags between application > > (which may be user land) and producer (kernel QP's (queue pairs)). > > Those flags can be written by both application and QP's. The application > > writes those flags to let the driver know if it shall inform about new > > work completions. It can write those flags at any time. > > Only a kernel producer reads those flags to decide if > > the CQ notification handler shall be kicked, if a new CQ element gets > > added to the CQ. When kicking the completion handler, the driver resets the > > notification flag, which must get re-armed by the application. > > > > We use READ_ONCE() and WRITE_ONCE(), since the flags are potentially > > shared (mmap'd) between user and kernel land. > > > > siw_req_notify_cq() is being called only by kernel consumers to change > > (write) the CQ notification state. We use smp_store_mb() to make sure > > the new value becomes visible to all kernel producers (QP's) asap. > > > > > > From cfb861a09dcfb24a98ba0f1e26bdaa1529d1b006 Mon Sep 17 00:00:00 2001 > > From: Bernard Metzler > > Date: Fri, 12 Jul 2019 13:19:27 +0200 > > Subject: [PATCH] Make shared CQ notification flags 32bit to respect 32bit > > architectures > > > > Signed-off-by: Bernard Metzler > > This fixes the build for me, thanks! > > Tested-by: Arnd Bergmann Since this is coming up so late in the merge window, I'm inclined to take the simple path while Bernard makes a complete solution here. What do you think Arnd? From 0b043644c0ca601cb19943a81aa1f1455dbe9461 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Fri, 12 Jul 2019 12:12:06 -0300 Subject: [PATCH] RMDA/siw: Require a 64 bit arch The new siw driver fails to build on i386 with drivers/infiniband/sw/siw/siw_qp.c:1025:3: error: invalid output size for constraint '+q' smp_store_mb(*cq->notify, SIW_NOTIFY_NOT); As it is using 64 bit values with the smp_store_mb. Since the entire scheme here seems questionable, and we are in the merge window, fix the compile failures by disabling 32 bit support on this driver. A proper fix will be reviewed post merge window. Fixes: c0cf5bdde46c ("rdma/siw: addition to kernel build environment") Reported-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe --- drivers/infiniband/sw/siw/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/siw/Kconfig b/drivers/infiniband/sw/siw/Kconfig index b622fc62f2cd6d..dace276aea1413 100644 --- a/drivers/infiniband/sw/siw/Kconfig +++ b/drivers/infiniband/sw/siw/Kconfig @@ -1,6 +1,6 @@ config RDMA_SIW tristate "Software RDMA over TCP/IP (iWARP) driver" - depends on INET && INFINIBAND && LIBCRC32C + depends on INET && INFINIBAND && LIBCRC32C && 64BIT select DMA_VIRT_OPS help This driver implements the iWARP RDMA transport over -- 2.21.0