From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA519C10F14 for ; Thu, 10 Oct 2019 13:01:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 919DB206B6 for ; Thu, 10 Oct 2019 13:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728339AbfJJNBi convert rfc822-to-8bit (ORCPT ); Thu, 10 Oct 2019 09:01:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:57892 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728274AbfJJNBi (ORCPT ); Thu, 10 Oct 2019 09:01:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8B7CEAED6; Thu, 10 Oct 2019 13:01:36 +0000 (UTC) Date: Thu, 10 Oct 2019 15:01:36 +0200 From: Thomas Bogendoerfer To: Christoph Hellwig 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: <20191010150136.a30e47b37f8c8aed9e863a5e@suse.de> In-Reply-To: <20191009184311.GA20261@infradead.org> References: <20191009155928.3047-1-tbogendoerfer@suse.de> <20191009184311.GA20261@infradead.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Wed, 9 Oct 2019 11:43:11 -0700 Christoph Hellwig wrote: > > +++ 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. ok, as far as I can anticipate IP35 verion of this functions will be the same as well. So I'll move both into pci-xtalk-bridge.c in the next version of the patch. Thomas. -- SUSE Software Solutions Germany GmbH HRB 247165 (AG München) Geschäftsführer: Felix Imendörffer