Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4216860ybi; Tue, 11 Jun 2019 02:59:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYrjJlMtzfwHUxtwrteq0A+9IXm5f7GfwuoByIOKEqc3IWriir1+BY7rHOCyQI3c67QS7R X-Received: by 2002:a17:902:7c04:: with SMTP id x4mr16086518pll.70.1560247180570; Tue, 11 Jun 2019 02:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560247180; cv=none; d=google.com; s=arc-20160816; b=jpiadXAy8fyDTGEkmAMWtKekqUJc3pEXEI5ZcmDRGvKWH2L/Z1vIpHwpnpkbipPzCb lFfZ7YxX1YYeoGv83q/oxWGY9cQXiDxpLofZyjfQj582ecnyYncp3jdD7LxRrMRtg6Jc xgd8b5370TIkYuKbiHnPmG2WUFNeaTY7YLQPV+DM3ha2iL6j+Bs62dqnw4UXDLJtja/a 80BTOf0bUW+P/MwTJKAAPIyLVT8kjD6ck0EHCavL5uz3WCHUMV63QuW7hWEEGchY0JxT R1L9XLKCyq/Hv6Yx0epGjEDhTKml/QmRwBZzVd3xSP+dU1ALfMHdy0AQun3aky6+wj1d NRKw== 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=reMdFtnBlgLyyh895sgp+eWhMM8jstdROlTkaXrhbTg=; b=rW1uisfX6DB1FfRFVUl8z9KCYg4oZvESmwEcIv2On0VhlMfxjMCwXDRezlxn7gx2cK NvMPLfaaG9QWQUcZ6W2PT/DS6csuSe9CSjqU5wSWi7IfHOVcAxZC8wHkvVjom45U0irX 7eCsYd34zM2Ezaw9UhM/3vveB1VLsqFqt9i8MTZlCwFJdm/gqZ+cJkOf0DHxG/FQZlpl 9IIvmAnpuBiwA7/Cw0kbtfJVax55dwqMcGOrFba99sJhEdK4c53PZs0YkGtUm3KJMyKr TaQsdNYIKufW84AzuBllF5Zlo7c3kS9vaNdeQcs3IKahij4pDUIVRPB/Le4ttpkK/3Gi OFFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="KfXp/WzA"; 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 ch15si12467491plb.316.2019.06.11.02.59.25; Tue, 11 Jun 2019 02:59:40 -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=@kernel.org header.s=default header.b="KfXp/WzA"; 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 S2404608AbfFKJ7B (ORCPT + 99 others); Tue, 11 Jun 2019 05:59:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:34886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404084AbfFKJ7A (ORCPT ); Tue, 11 Jun 2019 05:59:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CBB622086A; Tue, 11 Jun 2019 09:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560247140; bh=6Bh7Pmi1wYitq3SDdcV/dHDabKgX0W7RapgIq/UJbaM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KfXp/WzAc8D34BhjNGsEauGsum4V3I1uK5WfFCoJr4MRoPRvU+evwC5Dy7wJhwYET UAeS85B5df/3fkusbdohttsvD+U+4aTbPftkBW1wrLA7oB330vK0SVkSolZno1Dk9y ItVhiph4ZnnetzLuUsbu5bh/fPuFniC1ASjIRpVQ= Date: Tue, 11 Jun 2019 11:58:57 +0200 From: Greg KH To: Oded Gabbay Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 8/8] habanalabs: enable 64-bit DMA mask in POWER9 Message-ID: <20190611095857.GB24058@kroah.com> References: <20190611092144.11194-1-oded.gabbay@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190611092144.11194-1-oded.gabbay@gmail.com> User-Agent: Mutt/1.12.0 (2019-05-25) 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 12:21:44PM +0300, Oded Gabbay wrote: > +bool hl_pci_parent_is_phb4(struct hl_device *hdev) > +{ > + struct pci_dev *parent_port = hdev->pdev->bus->self; > + > + if ((parent_port->vendor == PCI_VENDOR_ID_IBM) && > + (parent_port->device == PCI_DEVICE_ID_IBM_PHB4)) { > + hdev->power9_64bit_dma_enable = 1; > + return true; > + } > + > + hdev->power9_64bit_dma_enable = 0; > + return false; > +} 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... thanks, greg k-h