Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1291559ybp; Wed, 9 Oct 2019 11:44:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJbFjXvJII/njrsrpNtKHjiL8Y5BOeQuoZbJfYVuKseQESALR0aXQJQQtIAMU7OvGzFYM+ X-Received: by 2002:a17:906:1f44:: with SMTP id d4mr4194038ejk.16.1570646667417; Wed, 09 Oct 2019 11:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570646667; cv=none; d=google.com; s=arc-20160816; b=tiQYPJ59Ww9YmclzmL0rbYc//rbG6R24F/0UXkslN+P2B+fJwWvbKqvo6oSN2wtkP2 geOMalfemjLz9AF3loIJWZZgitEb7lP1lwoxhLL9ZB5QJ61YFOMU5TpZzoqpEv/gI5lD H/yxNqRgJiAmvwu9PuF3qOksH3JF/sJm8zjC89oBTzvDgADzp+xM8oB1zXX+iHN4jp8W FuyQXyY7/mCmWu9RfUx+u4woi2t9lG+rTmCcCblga/4FrJYZJNMB2hc80BJtiIbQuZxR O3sV/zDMkivgm39VPKVZFnA3zjBNgrCdM6heuNir0TVWVVyagLDuFYPVSSLKttx7ialC tJ6g== 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=4IINCFeaSJyuK///5d+ZVyEn9IR5HdVzFzHth3rJj94=; b=fGx6ECMNCEvKNUfbAD9AB8/i0sSauqB4K4eq11gKoqB60ogILJ8zTqAshn1o1t7vQi 1/77jtXXAJP4WIf6c5wccEbVRfTm9vRbttehKEPSnLE6VsUrv1VHBR0xCF5U5byG9P8B AqiiEUk841gmh5o4WetInug6rzKZqqTptUjuRC9hKC96QmOG6yeDTRFyH0AtVeZx4j39 HHWwxYQNHODleQmaD3Sb05+oOAy1QTNHIF+uXHwEI7zBC4Mvw9AR0uoBJdQZKp9aXLfU jE55+UIxTstgWHeX9X8ErZRUYfEpNr9J69TsdUyXvQ8PZNZ9WBr49btHRl4JwExBxBic 5e4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WNndJd8i; 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 f43si2111356edf.422.2019.10.09.11.44.03; Wed, 09 Oct 2019 11:44:27 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WNndJd8i; 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 S1731331AbfJISnO (ORCPT + 99 others); Wed, 9 Oct 2019 14:43:14 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33612 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728804AbfJISnO (ORCPT ); Wed, 9 Oct 2019 14:43:14 -0400 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=4IINCFeaSJyuK///5d+ZVyEn9IR5HdVzFzHth3rJj94=; b=WNndJd8iEM1zprft3l27wvIsf meIaoWTsmNDuGLgQZJ7VOmwlYs9l8Y1l8AkowGTHRJ1VfNpJvUVIZfCkr4gTvDcWTooV5KloG0czV x8sXo2VRYn+K/fsyIGfoYSX34WcnneGFkDIIG6yaoEu5MR2I9dRjPw/JO25DXmGmTWQAxnPvfC0+R ttVYbv7tLrm4gjTz3+MswMTyJ6zryiXjew9wDj4pLpJ2TLdVEeaTP6Ewjzbkv+QIxPaswGm2bUCwv 0S0axOq7ytdUaKGF1vbwUoJYlF8Uj0LF3NA/+KmQ/oBi80MtmKf/IGBRw1CqlYvo85ERvDgXD1/Zu q92iUrevg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iIGvX-0001tD-Ee; Wed, 09 Oct 2019 18:43:11 +0000 Date: Wed, 9 Oct 2019 11:43:11 -0700 From: Christoph Hellwig To: Thomas Bogendoerfer Cc: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: add support for SGI Octane (IP30) Message-ID: <20191009184311.GA20261@infradead.org> References: <20191009155928.3047-1-tbogendoerfer@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191009155928.3047-1-tbogendoerfer@suse.de> User-Agent: Mutt/1.12.1 (2019-06-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 > +++ b/arch/mips/sgi-ip30/ip30-pci.c > @@ -0,0 +1,19 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * ip30-pci.c: misc PCI related helper code for IP30 architecture > + */ > + > +#include > + > +dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr) > +{ > + struct pci_dev *pdev = to_pci_dev(dev); > + struct bridge_controller *bc = BRIDGE_CONTROLLER(pdev->bus); > + > + return bc->baddr + paddr; > +} > + > +phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr) > +{ > + return dma_addr & ~(0xffUL << 56); > +} This file is duplicated from ip27. I think we should aim to share it given the common hardware even if it is mostly trivial.