Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp482256ybi; Sat, 15 Jun 2019 05:14:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVtbTlLHBX6s0vfq3b8nUveXWTTWjfQf/azMp9WhHcQMRJr7B3g1Xs71Bz3irpziXZ9HkO X-Received: by 2002:aa7:9115:: with SMTP id 21mr100993784pfh.14.1560600875070; Sat, 15 Jun 2019 05:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560600875; cv=none; d=google.com; s=arc-20160816; b=dXK9yfmefO4eUObL98pZ2g42QX6cOznH+Mqlwylv0wGJjVpVRBjbGGNKdGRtBxOF+W E8Kzc0mmDCT96ElZtYiHop/wMJRwknuJHaUwWmEtenoGLWSCuRZ7zbU8C1/NWslREgs2 U1lM5yO3OWAagy5WBdf7TC6qgv28vxjuNqOKJG2hV5pNzRjyQ6D1Vhic7yWOB8L78oJG TOYh6cFqq5kbNuXvBcoqjwLDqieS/WCZqMQ/yL4MA4f0rjK35rvybDyvuW5ZwKoThfDX 0Dd4D0QIYyehgW7oCamKhq6IArH32kH4DuT183y+5Ym0+OtdLIxHpQfvpBy/RpYxSSks z8Yw== 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=M+fcWa0RF3atnyomc+tzHvLdKdAoWbr83oMmY7V9PB4=; b=p+uUHZGL92N/IaKyCD6BQEbUOl5mHy/Tl9iODebJSJK52wyJznJT/zrNEf8WpXqi7m 2Hkjg40JBn5Kzsrrw5hs+CfjP7uPBMuCpEASw4Cj4mvpMgi+72Kub+LBONXdJ6h6TbFC X+EDhF6uVErBoN1KnCuekQXwTeLJoys96OrDRJZVABWMmuGYD95KzU7/yPKhEBC99cnk X2WdikGczli6JvB9uCDSOsn4zmSv9EU6HKeMMZE6uahDVUaagoUocWLy2X1GG+FIstoo ZyDQA+SiW1183ywunEtWdycEukoGHNBU6D2lPP5QR5Ysr08CYhxg6850kIYUFM5odKpQ ttSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dKwaqUZx; 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 g25si5265401pgb.113.2019.06.15.05.13.47; Sat, 15 Jun 2019 05:14:35 -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=dKwaqUZx; 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 S1726614AbfFOMND (ORCPT + 99 others); Sat, 15 Jun 2019 08:13:03 -0400 Received: from mail-ua1-f68.google.com ([209.85.222.68]:43446 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbfFOMND (ORCPT ); Sat, 15 Jun 2019 08:13:03 -0400 Received: by mail-ua1-f68.google.com with SMTP id o2so1847518uae.10 for ; Sat, 15 Jun 2019 05:13:02 -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=M+fcWa0RF3atnyomc+tzHvLdKdAoWbr83oMmY7V9PB4=; b=dKwaqUZxbjJZ57Y2LOI2bdMvnmhtKZRnjgjTNdY8s/yoY3Rv2rRwikdDtlCI2fNdSN r+enr2a8LcP+iuBaX7Ae7nBBdggpNiVgfKFipOj9eEoApUkkxnlcCCbfsjrO/7TQNeCa rEte4KPXGPMQvUR4CmpHM3aEEsJLxKBHfGdDKDVVq3wt215eEecbOY8/hroHhCz48xj6 9q4meSJUf6n1ku3YUDLoU+BawyFK5BAa5S48ZsLn5jKCWWeEZ/w41jFMF2tbYnoW17/Q VdSbq5tHzKa/RCRrFss4AhMvEsf0ZDSY2UvHw6ihNUIEweT26QZBtHd9oRVEgfvZhw4+ fkVw== 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=M+fcWa0RF3atnyomc+tzHvLdKdAoWbr83oMmY7V9PB4=; b=MHQmu4gWr8RlyDmRsQ0olDbixWcpHgqdkUJ8f0Sx7OMtanJ6aQMZZQH0bd5QbIAwvF cvrsUQd7+6ZCviQqn5f48oEE68FXw8xhSM0jDAabJyzmPbvGLrUrA93z7KEqjNVi6ijl YPtns9L41uhNajy4eDzRXx1SuJElHXvP2RcvNP5OP/Hc6rBomthwE5IFNNV+aB5q39wg rvRM6lEcZ9y07K6slxL4mQtsTTCgf7x4rEJvijGvTg1jhJuoSzYW3ed1Rw6pSYHvEWa2 ENfsQouL/QB5veq/z1Ef4jwUlQ5G74ywGA+fuCYjHWjAhQgWmUj4WTtH+k2ohklkhuMM DL7g== X-Gm-Message-State: APjAAAWwAvwmZ3E3fOafLOa3eTPsYchBLLCEkXF/5LDzLvem5soy/t5A yIQMJ7q+V4kF3GhuNcNlTVPgfO5IT0DX81lYGZmQ02tJ5f1LWQ== X-Received: by 2002:ab0:4a55:: with SMTP id r21mr34963888uae.133.1560600781930; Sat, 15 Jun 2019 05:13:01 -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: <20190611152655.GA3972@kroah.com> From: Oded Gabbay Date: Sat, 15 Jun 2019 15:12:36 +0300 Message-ID: Subject: Re: [PATCH v2 8/8] habanalabs: enable 64-bit DMA mask in POWER9 To: Greg KH Cc: "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 Tue, Jun 11, 2019 at 6:26 PM Greg KH wrote: > > On Tue, Jun 11, 2019 at 08:17:53AM -0700, Christoph Hellwig wrote: > > On Tue, Jun 11, 2019 at 11:58:57AM +0200, Greg KH wrote: > > > That feels like a big hack. ppc doesn't have any "what arch am I > > > running on?" runtime call? Did you ask on the ppc64 mailing list? I'm > > > ok to take this for now, but odds are you need a better fix for this > > > sometime... > > > > That isn't the worst part of it. The whole idea of checking what I'm > > running to set a dma mask just doesn't make any sense at all. > > Oded, I thought I asked if there was a dma call you should be making to > keep this type of check from being needed. What happened to that? As > Christoph points out, none of this should be needed, which is what I > thought I originally said :) > > thanks, > > greg k-h Hi Greg, So after the dust has settled a bit, do you think it is reasonable to add this patch upstream ? As Benjamin and Oliver mentioned, there is no better-looking/standard way to solve this, considering my device's limitations. AFAICS, the only way is either this hack, or the kernel module parameter method. I'll of course monitor the PPC code upstream and if they will manage to push a fix to their current DMA mask limitation (that will allow setting dma mask of 48 bits and without setting bit 59 in outbound transactions), I will modify my code accordingly and then this hack won't be necessary. But for now, it is what it is. What do you think ? Oded