Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5378037ybi; Wed, 12 Jun 2019 01:17:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDJpjhi983S/3tjF+yTtSr5WvkU7HQS3L898vjKuC0SBO6gTnazkukos4KJEyyrEQR0biR X-Received: by 2002:a17:90a:9dc5:: with SMTP id x5mr30196048pjv.110.1560327432509; Wed, 12 Jun 2019 01:17:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560327432; cv=none; d=google.com; s=arc-20160816; b=y9WcjvehPHN8OtDmSzt1ByEmKPCJsb55W+3miZ0B4q7FZcWJuhu4S7jA1y/u/snt/Z MrZ1vT9sAbqnv1eqwJBAxhtGP2QqHR8gyJtBiMolfHtaUZ9vyaslBLqII0BFVjrCegb+ PL4pXSJAZAtlKal+JtUHjrLmu9YYdjtD1eoBvBg98+izEB1WCjHxONd6kENHDrsrXzff /23Hsa36jizdLIASGEt5+54xvPF2SIWWajUXcaGNqdoJy358KMBOdJlp926+UFvmqH9c hRFn3RiUq+WeaOq/7xgP/pf5IyJVQJKpZ0hPpNh60vyYdmm/BsQtJ4qSs5yrN3to4djJ IOHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MHcvYWRnrXWxsWWs0BejJhNYWntQgPzwqsTyK3JVcEE=; b=j4mKt8rnXegZvH124O9+S8k2ccPOi1Qt83TQQr/FsBl9+Tbg3C/tZQZJ9CpUOfeGzU zdHsJ1cHqTHlfPzBdNxBxvAxhoaDRrJW4M5iOExgUZ1u1xAPRGbbCMKhspzUZrdEMTYG 1W9kki6n8DoRKHK2Zv/sSx4RL8FZ/0fslsCnXSyakeAj6xq7NqRZ3YCyqq1OForZJGKS esnHNl8DZjCOeRQ92HwOJtBCb8h11Bi4fBEaXDug/2mQGo3D864MfKIBJlUeX5VF0k84 wr48cz6lMCOGazv4uWNUlkiaNrG3bCDcdNBZ5uMh4h09iwju4WmcFMlFP7fjG2EZYg/w tU8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S9hscLxT; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q195si14923975pgq.119.2019.06.12.01.16.56; Wed, 12 Jun 2019 01:17: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S9hscLxT; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731149AbfFLGfe (ORCPT + 99 others); Wed, 12 Jun 2019 02:35:34 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:56021 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbfFLGfe (ORCPT ); Wed, 12 Jun 2019 02:35:34 -0400 Received: by mail-it1-f193.google.com with SMTP id i21so9000117ita.5 for ; Tue, 11 Jun 2019 23:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MHcvYWRnrXWxsWWs0BejJhNYWntQgPzwqsTyK3JVcEE=; b=S9hscLxT9U0oYcldK6EV5J/lbYqp/LZmLHawIS7nzJVR0hsF1YqVy150zNpRA9eZtS 04C0Hbr1JbzSiOoaoXFWJijWoXICJeBvkpEM2EMr+QojWFDJ8UlLUaUSBOpD2z9Nlfgc F6zwaVjxQlFzllxXNlNlaICFHIf4OAVLxZbKKCgBXFSFsBKTRA1B1KYpGaN4woeCH091 GNSM6lSXYFA+slAMAiohXpmR69HFHKhg/lxP3dP1h954Fc/oEsyat+AX0WldkvkU2u94 81Otxa9+L7GosJ3ZF8B3x8fOUMRgxm3yuiWt+QNnp/cOpbigVendTpVFvhXldkxI+/D3 x2Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MHcvYWRnrXWxsWWs0BejJhNYWntQgPzwqsTyK3JVcEE=; b=K+VzZmUlN9j24946oOjFNyAE6igtFwtkMu9V9SCEfD9LbLqHj7TeD6BFzCcCwxcr6g 5BA/JPXTdM9rj3YKYIrTiU7xsXd+FgH3tQxrrRx60OY2KuYJFyz9ysfF+zwGanhXb9Zt VOdJ7Ig0/6yVkpcn7iRIU5vm7A92pb2NYpg18H4uYi4TSxkmqAmDTEHHEwzVZ8y2bARr bFZqcmOh+SCroVUEU/9JCyXpFqmeq/rrVkBdWT8cDOSSDWyE7RsI7Ziz7poifAmWos2v ccSLtyNCWAFy034P5IYTlCztYJac9+d/08yQ6CEv1uiKnAD0tEQh/pNCyeFRUW1qCfJW bRoQ== X-Gm-Message-State: APjAAAVEovKXNzWR2lLPjbMvlSk26U55XirmlaR0I9Bz32kP69Fha1IT XRRMpPAUXE7ltnO3iUhItBaWH0ufFb4TlnCMBUcQFE/t X-Received: by 2002:a24:d145:: with SMTP id w66mr20513709itg.71.1560321333285; Tue, 11 Jun 2019 23:35:33 -0700 (PDT) MIME-Version: 1.0 References: <20190611092144.11194-1-oded.gabbay@gmail.com> <20190611095857.GB24058@kroah.com> <20190611151753.GA11404@infradead.org> <20190611152655.GA3972@kroah.com> In-Reply-To: From: "Oliver O'Halloran" Date: Wed, 12 Jun 2019 16:35:22 +1000 Message-ID: Subject: Re: [PATCH v2 8/8] habanalabs: enable 64-bit DMA mask in POWER9 To: Oded Gabbay Cc: Greg KH , linuxppc-dev@ozlabs.org, Christoph Hellwig , "Linux-Kernel@Vger. Kernel. Org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 12, 2019 at 3:25 AM Oded Gabbay wrote: > > On Tue, Jun 11, 2019 at 8:03 PM Oded Gabbay wrote: > > > > On Tue, Jun 11, 2019 at 6:26 PM Greg KH wrote: > > > *snip* > > > > Now, when I tried to integrate Goya into a POWER9 machine, I got a > > reject from the call to pci_set_dma_mask(pdev, 48). The standard code, > > as I wrote above, is to call the same function with 32-bits. That > > works BUT it is not practical, as our applications require much more > > memory mapped then 32-bits. Setting a 48 bit DMA mask doesn't work today because we only allocate IOMMU tables to cover the 0..2GB range of PCI bus addresses. Alexey has some patches to expand that range so we can support devices that can't hit the 64 bit bypass window. You need: This fix: http://patchwork.ozlabs.org/patch/1113506/ This series: http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=110810 Give that a try and see if the IOMMU overhead is tolerable. > >In addition, once you add more cards which > > are all mapped to the same range, it is simply not usable at all. Each IOMMU group should have a separate bus address space and seperate cards shouldn't be in the same IOMMU group. If they are then there's something up. Oliver