Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp246663imw; Fri, 15 Jul 2022 02:18:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uj8u85r2057rpI93ol9Jdre6+URI9XZWkitu4Gm/wkpPepl5n6QPscItzzmM6YG4tcyQb3 X-Received: by 2002:a17:906:7482:b0:722:ea8f:3a12 with SMTP id e2-20020a170906748200b00722ea8f3a12mr13036277ejl.220.1657876682464; Fri, 15 Jul 2022 02:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657876682; cv=none; d=google.com; s=arc-20160816; b=bGMvHyq1l3m5vtERXl01Pjg2vd1AxvM/QAQ+6INzflLoisj+PM3k7+21o7DmXJFYU6 M8EX7MZ9agx0PHTAvcjQX8R+tTUU3gSrxEV10Fc9C1MjAjd+W7M32wW/WpHKLrHrUY0M 0Noc5BP6lrFVvpMbQm8+L3YJhucLGULaOWhkIpueUDGa1FOfzkX8u96A5w3bXYjc2BVe SzaO7Z24heZhVs5SeXo2V/uZD1vUYI9mD3+yRRFq3Ge45ON4gFz6eFpAvrHuamPX1tFN Gthq0BmtWvEIjEqP3B31jxqrsRoZLgk/oiLogmo44G9jyxqVOhWoGvaE4c0y45S71ggC GIQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=nAu+pZlZ/AA/ehfVKENnE1zB034jX3ORhTeIk1D6Lss=; b=sas9/GOpFq4NhdvY3k/N1/3EjTSMojoW73WSzR9Ll7TmYNNrrHpkIlwbNk0hAt60pm C0JmlSnS1pCsXNBvhFzJt+JkxhZMJ8LXrxaGMtnQM0tcqaoM34DzT6zdS8MPFM2Pi92l GgqMVRbbC/oedyGUY8Qi65PruvMpEMx769Ejy3GkVSmIe7D7FGgg3jBepieH1xBlpHou l3uCBVtFTpmSYvImPleHqvKEfun9zImx3lvFZ5i2Zv1CXNP/sYB1/KlJAo2YZYZh+cWg o8MXtywR9NBZ8TSXni1m3/gmDALjGieJ9eFxQoIJ/wJdu6LHzki7pjfgeCKqeZKmJTjD 2EvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd30-20020a170907969e00b0072b3305dbbesi6313445ejc.520.2022.07.15.02.17.37; Fri, 15 Jul 2022 02:18:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233060AbiGOIjU (ORCPT + 99 others); Fri, 15 Jul 2022 04:39:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232915AbiGOIjL (ORCPT ); Fri, 15 Jul 2022 04:39:11 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56BFE51416; Fri, 15 Jul 2022 01:39:09 -0700 (PDT) Received: from mail-ot1-f51.google.com ([209.85.210.51]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Mhl4Q-1nYpMx1O9A-00dosM; Fri, 15 Jul 2022 10:39:07 +0200 Received: by mail-ot1-f51.google.com with SMTP id k8-20020a9d4b88000000b0061c7f8c4f77so2095004otf.10; Fri, 15 Jul 2022 01:39:06 -0700 (PDT) X-Gm-Message-State: AJIora9ZfrV3bdROid6AD8wQL3PFzt++iQ2xe4ScwhMuGWO2zhZ88xap t260M3+xVdEyWttA+X/tktJ88qKp3/feYInthCI= X-Received: by 2002:a25:73d1:0:b0:66e:aee4:feb3 with SMTP id o200-20020a2573d1000000b0066eaee4feb3mr13106300ybc.452.1657872578352; Fri, 15 Jul 2022 01:09:38 -0700 (PDT) MIME-Version: 1.0 References: <20220714214657.2402250-1-shorne@gmail.com> <20220714214657.2402250-3-shorne@gmail.com> In-Reply-To: <20220714214657.2402250-3-shorne@gmail.com> From: Arnd Bergmann Date: Fri, 15 Jul 2022 10:09:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 2/2] asm-generic: Add new pci.h and use it To: Stafford Horne Cc: LKML , Arnd Bergmann , Catalin Marinas , Will Deacon , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Richard Weinberger , Anton Ivanov , Johannes Berg , Bjorn Helgaas , Linux ARM , linux-csky@vger.kernel.org, linux-riscv , linux-um , linux-pci , linux-arch , David Woodhouse Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Nt52xjsJzLfJbx6bRziB8rKjrlCwthE2G6HtbRBCsNBt/zs2mo2 R+zxCpzWBn+E9PRIJX9sfMfdZ2jE2MFo0nx40nPnt/KwgS5rY+jNF8OTtCszYlSR+DvY55Q N8/Q53v9N0+VyQGEsBoArO6QqUcFEg0pTflRtXN7VtD5MerfYTdmUDGldG1AzUHDwPbTmi3 2XGtKEqTZPyfR9FDnGlLQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:rYyucx0ZdqI=:rPmF0o7ogy9z6EtFl7IA7Q j/McKn5R/FIJ0+0/sN20bcGfqmONXGRRmTvP7LVDrzKVPveFiTULe2gkPGKzEkIMczsZ5RZvl 2qYhOPZUmtYqEuJuabNpBpo6Ciykp0/kmTYiAjaYljvlLqGx/sjmDJv6HdULJUAsWMxpjYTEw wsLC6xmeEzESPYpluUHhPsnR2XwmvqmcUUAubC9D+3MChqbfdxuHk4O5bTF7Kcoj5dsg3NW3H jHhynwT7qRT4p6eF/tfG9aMTSbVtRJp4x+MaVitnAiRiaXFYXPYu+9qPIoPbQy2VMUN3EPipF mWqHH6dB3xR1Ae8RZSNT+F0fbyCVM1a2FEHANAUzCa0MnyKl0Q7/hjpXMWrQCwYwc6UjiN89N 1CEL9hsDTTUS3U1b6iEXEDqL69G6UjtteEhaVhR1FVPXL1PlBJTzbzohRUUE/jOsyfUU37+YX ABfFnIC4BlyUxk89Q911u0a7585RD+s8UKrdT8gJRs+UlwDoxRsmY1ZBS5APZHoitpwjKX4II GVkpT6RNrvY+dpS5Hk3vxeQKAKEof3tBzwMwECk2HCNk2V/JPZbi0aW/6RMnLo/8VlfcBx8YO llwJmiSN2P/fnVe5RAJV7QnjUAHzqoammocfEl+BqQgxSeafNHxGrps7iNU/McitKPXbY+clj 8Z17D1VcrZK6CvDi/nvZn2Ka/uwr1IAOc5wLsojfRnxu5oagPNk3X8CUVxQCdkbzOxkVa3qbJ y2uMIRgmjD8TOC8qLtcSVSXhEyKPZl7XihFDKfea7sRGSYcX/tzvtJAaOBvtOrf5so5j9NZ0B Yrnhjjk/dXEqVvWfvTphGhuO9rc1KnZpNW3RqdRW/oxg5dKKzmgd/l40PX0Od75ZSo2X/CTKH hS4ccGAbxSsDH/Ehbh4Q== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2022 at 11:46 PM Stafford Horne wrote: > > The asm/pci.h used for many newer architectures share similar > definitions. Move the common parts to asm-generic/pci.h to allow for > sharing code. This looks very nice, thanks for doing it! > Two things to note are: > > - isa_dma_bridge_buggy, traditionally this is defined in asm/dma.h but > these architectures avoid creating that file and add the definition > to asm/pci.h. I would prefer if we could just kill off this variable for non-x86, as it's only set to a nonzero value in two implementations that are both x86-specific and most of the references are gone. That does not have to be part of this series though, if you don't want to address it here, just add a comment to the new pci.h file. > - ARCH_GENERIC_PCI_MMAP_RESOURCE, csky does not define this so we > undefine it after including asm-generic/pci.h. Why doesn't csky > define it? Adding David Woodhouse to Cc, as he introduced this interface. As I understand it, this was meant as a replacement for the old architecture specific pci_mmap_page_range interface, and is ideally used everywhere. It's probably something that slipped through the review of csky and should have been there. As an aside, it seems the pci_mmap_page_range() cleanup was left almost complete, with sparc being the only one left after David Miller found a problem with the generic code. Not sure if this was ever resolved: https://lore.kernel.org/lkml/1519887203.622.3.camel@infradead.org/t/#u > +#ifndef PCIBIOS_MIN_IO > +#define PCIBIOS_MIN_IO 0 > +#endif > + > +#define PCIBIOS_MIN_MEM 0 We should probably #ifdef both of these for consistency. > +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) > +{ > + /* no legacy ide irq support */ > + return -ENODEV; > +} And this can just go away now, according to what we found. Arnd