Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589325

Re: IB on s390 broken with commit 99db94940 "IB/core: Remove ib_device.dma_device"

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Sebastian Ott <sebott@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: IB on s390 broken with commit 99db94940 "IB/core: Remove ib_device.dma_device"
Date Tue, 28 Feb 2017 11:00:01 +0100
Message-ID <tfMJz-2En-7@gated-at.bofh.it> (permalink)
References <tfFI5-6em-1@gated-at.bofh.it> <tfMJz-2En-9@gated-at.bofh.it>
X-X-Sender sebott@schleppi.fritz.box
User-Agent Alpine 2.20 (LFD 67 2015-01-07)
Organization "IBM Deutschland Research & Development GmbH / Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294"
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
X-Tm-As-Gconf 00
X-Content-Scanned Fidelis XPS MAILER
X-Cbid 17022808-0040-0000-0000-000003510312
X-Ibm-Av-Detection SAVI=unused REMOTE=unused XFE=unused
X-Cbparentid 17022808-0041-0000-0000-00001F0DC2ED
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:,, definitions=2017-02-28_07:,, signatures=0
X-Proofpoint-Spam-Details rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702280083
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 31
X-Original-Cc "dledford@redhat.com" <dledford@redhat.com>, "gerald.schaefer@de.ibm.com" <gerald.schaefer@de.ibm.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
X-Original-Date Tue, 28 Feb 2017 09:53:47 +0100 (CET)
X-Original-Message-ID <alpine.LFD.2.20.1702280950380.2045@schleppi.fritz.box>
X-Original-References <alpine.LFD.2.20.1702272047120.2997@schleppi.fritz.box> <1488233058.2597.1.camel@sandisk.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1589325

Show key headers only | View raw


On Mon, 27 Feb 2017, Bart Van Assche wrote:

> On Mon, 2017-02-27 at 21:17 +0100, Sebastian Ott wrote:
> > commit 99db94940 "IB/core: Remove ib_device.dma_device"
> > breaks infiniband on s390 (and I think also other archs that do something
> > like to_pci_dev(dev) in one of their dma_ops callbacks).
> > 
> > With this commit you use the dma_ops of the device that called
> > ib_register_device but you call e.g. dma_map with ib_device->dev
> > as an argument.
> > 
> > S390's (pci specific) dma_map uses to_pci_dev(dev) to look into the
> > pci device (and its arch specific data) and oopses.
> > 
> > Calling dma_map with ib_device->dev.parent would work but then it
> > wouldn't make sense to copy dma_ops and mask from ib_device->dev.parent
> > to ib_device->dev..
> 
> How about something like the untested patch below?

It works but it doesn't feel right (why should all pci devices have this
duplicated data).

Frankly I don't get the usecase of infiniband (sometimes) using
device->dev.dma_ops instead of parent->dma_ops. Also that these values are
selectively copied from the parent looks weird (opposed to all or nothing).

What about reintroducing dma_device (as an infiniband internal) and set it
to &ib_device->dev if you have to and to parent in all other cases?

Sebastian

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

IB on s390 broken with commit 99db94940 "IB/core: Remove  ib_device.dma_device" Sebastian Ott <sebott@linux.vnet.ibm.com> - 2017-02-28 03:30 +0100
  Re: IB on s390 broken with commit 99db94940 "IB/core: Remove  ib_device.dma_device" Sebastian Ott <sebott@linux.vnet.ibm.com> - 2017-02-28 11:00 +0100
    Re: IB on s390 broken with commit 99db94940 "IB/core: Remove  ib_device.dma_device" Sebastian Ott <sebott@linux.vnet.ibm.com> - 2017-02-28 12:00 +0100
    RE: IB on s390 broken with commit 99db94940 "IB/core: Remove  ib_device.dma_device" Parav Pandit <parav@mellanox.com> - 2017-02-28 22:40 +0100

csiph-web