Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5666483imu; Wed, 30 Jan 2019 01:18:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN7lgTcoz6qfRJpoU1CDzkHa116OXyVNXNA/YKT0SrLH6EUIY5/3XY6deR8AJv/RZNF11M2x X-Received: by 2002:a62:868b:: with SMTP id x133mr31283711pfd.252.1548839905257; Wed, 30 Jan 2019 01:18:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548839905; cv=none; d=google.com; s=arc-20160816; b=Z7NBbccGWfg5qSPiMhkk/zlA4mOW27cdlL57X42hUUT2io9/7Wl1ZHXzGpMUuUuSzT A+y9lT4/sqnH42ulA1E//HJHUoldGeErRbYK6HQ5R139lNMP2SjvqeG936CUWoFfqW4W EUOhALoeKNglmjmJognpBiV/JyGhF9v5dkJTxOSXf3ZJvPlD3xS1U4RFEaFUCn6085oI Qnc7t16GiRmo6Spm982s+JDgzVQW85pjGaC28HH3/LC4tGPOOKstJ+TNHLQ8ITxnNFeQ MyFry+2qj6V8NSZxBgxmysxs/wIRZZtNu3RzF+iwybGt+GSa9cpCE6td9pd35jw1E8V7 ZuEw== 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=PkkRrH7Upoq4Qs5K73ZsT40YYfKo1vrfTnkSOGPXaak=; b=qzSMT+aTwNnKF0rMYNYVpalej9zHcqa0fKX0PJd5vivWEQsVwgZmoPpeaN7M8f1sp/ E+i80Xj3R04nPfpWo2pUjUgMpJ6SPvoHz+G/FnCsP6vomhnt3fzVOOG429tV6ta5XhVP 9dj2eyztinwvx/apgICrOsUcKO+e4Or4mQWtMPOFOGq8SKsP1dNCwcgrNxd7tOTMm9m0 lKL3TZnac1k4gbU81aLvglEo7ckG9d+ZklbMnU6WNL1pLP/4+tkSedPmmQyo+bvTcSFi 7VcZUs69QNqmEEPwZFgOfCenKD7zOVT4hZagHd1MvcmEAHb3BPAD73SAGVwIJkswnSJc ZLNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NjuaUyU7; 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 1si955063ply.409.2019.01.30.01.18.09; Wed, 30 Jan 2019 01:18:25 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NjuaUyU7; 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 S1730450AbfA3JRK (ORCPT + 99 others); Wed, 30 Jan 2019 04:17:10 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:58886 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726452AbfA3JRJ (ORCPT ); Wed, 30 Jan 2019 04:17:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PkkRrH7Upoq4Qs5K73ZsT40YYfKo1vrfTnkSOGPXaak=; b=NjuaUyU7G/RQx2NHQ5Wzvm+DT 2B4zkjV/NFMgartmyl2XVNLBduYK8e/7ut80VVYoMtvL2KMv+9JMlb9QLIGQBTAXmInTCWmweXS62 dwMQwTWmKHf3RBK2GaKDSWSvRQtW7D2OAwwZMGsx1vH2Git2v2whu8YDZo/IYuWiW7HPZBxadXq0Y GyBu3WakPbpGyUKCtaY39ReWA4DGzWDz7gKEi18Du6KorP8bjUkSVnyakgGg3FnjWOteXVpZy8Se0 oupSKfK7f9ddCb+wyBtiPKHgYCqCwYdFaiDEZgju8Q2L1rBmaIMI0JxTCP7+BhxdA9+wd4BGR/nY+ 1/Ho4IRig==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1golzW-0004Dc-6L; Wed, 30 Jan 2019 09:17:06 +0000 Date: Wed, 30 Jan 2019 01:17:06 -0800 From: Christoph Hellwig To: Thomas Bogendoerfer Cc: Christoph Hellwig , Bjorn Helgaas , James Hogan , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-pci@vger.kernel.org, Lorenzo Pieralisi , Paul Burton , Ralf Baechle Subject: Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver Message-ID: <20190130091706.GA3617@infradead.org> References: <20190124174728.28812-1-tbogendoerfer@suse.de> <20190124174728.28812-7-tbogendoerfer@suse.de> <20190128133215.GC744@infradead.org> <20190129162445.8584b58862068c0a7693718c@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190129162445.8584b58862068c0a7693718c@suse.de> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 29, 2019 at 04:24:45PM +0100, Thomas Bogendoerfer wrote: > > From an abstraction point of view this doesn't really belong into > > a bridge driver as it is a global exported function. I guess we can > > keep it here with a fixme comment, but we should probably move this > > into a method call instead. > > or put the nodeid into the bus struct ? Doesn't sound to bad to me, you'll just have to update a fair amount of arch implementations. > I'm all for it. I looked at the examples for using dma_pfn_offset and the > only one coming close to usefull for me is arch/sh/drivers/pci/pcie-sh7786.c > It overloads pcibios_bus_add_device() to set dma_pfn_offset, which doesn't > look much nicer. What about having a dma_pfn_offset in struct pci_bus > which all device inherit from ? Or add a add_dev callback, similar to what I did for a previous series that we didn't end up needing after all: http://git.infradead.org/users/hch/misc.git/commitdiff/06d9b4fc7deed336edc1292fe2e661729e98ec39