Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp203863imw; Fri, 15 Jul 2022 01:09:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1taMbtUuKwlycQa+UJgkPOxX0AHxGIO9L8+9mFhfm+c21amabJnAsXAAtCOx2rrgXtr7I7E X-Received: by 2002:a17:902:e5c6:b0:16c:413c:fbff with SMTP id u6-20020a170902e5c600b0016c413cfbffmr12458718plf.62.1657872573701; Fri, 15 Jul 2022 01:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657872573; cv=none; d=google.com; s=arc-20160816; b=JFo3TbJla9VXHlnMMw45hIAz/t/BSV54ohlt7fyD62ab0S/LlaMwDJqpWdTpq32sm9 jvvGmT+TKviECk/Kcn4IEn//jn6pFLA+kVtZKvKu3k1fsOjRRC9k8Y52h1gBJIq8arCX SDGDyMwUlWXNVnSPPxjA6JFALzhG3wsqYvb2Bg431pp8OEzpPTBhOjovVoYnup+RMDkv C0xLB1M4DdBIbJx6n53W3RYMhBkopxEbuIngSWJg12qE+XHFx078XAtA1c6wyvfCLdH7 WRWhpbkPlE6XGcI9/4cEErV36XoxqbpX2wcREDnbgs8NYMH+64L+wSd595OkqhzKTF7J Dr+w== 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=NMbgonRC3e5sasrnMQyRpQg+xIQ+3pWECWdYHVEEOik=; b=Nf7iVhLSD7kdeq18heYnoM+7Xxvh4t5T8h8PAQaOgn54teLySlR2HUEFVI84AwjOjs 8V6FeAXeKJdh2wFF5cku/zYk8776pdcXtAmtFlGYUR4fE0rmtQ8cOOa6Vg+LDMJIegg3 gADztQgblpurgHaA5vz0Bo6aRry4SNFrG0vlmI2Y+QeAsI/9Xwez932xGfQsVSEx5Bop TWFH6rXr0uMubDuLwjHQ0MKQ6P702TrMoYZswVpN1NFsXNNBkrGyly/2X3Rq6YaHG8+N ptosQ+bRv2gFrIoPFgFx/MFxm6NFfdZZK9x/wwBE4UJLTjJaNfFYJDypOprpIa3xEYyt RWLQ== 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 w184-20020a6362c1000000b0041249d5aeddsi5144070pgb.605.2022.07.15.01.09.10; Fri, 15 Jul 2022 01:09:33 -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 S231971AbiGOHkd (ORCPT + 99 others); Fri, 15 Jul 2022 03:40:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbiGOHkb (ORCPT ); Fri, 15 Jul 2022 03:40:31 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4FE1753BE; Fri, 15 Jul 2022 00:40:30 -0700 (PDT) Received: from mail-yw1-f182.google.com ([209.85.128.182]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MA7Ss-1oNpiA3254-00BfVX; Fri, 15 Jul 2022 09:40:28 +0200 Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-31cf1adbf92so39648387b3.4; Fri, 15 Jul 2022 00:40:27 -0700 (PDT) X-Gm-Message-State: AJIora/fTKTlEaQ6ForIwp6vaAUn/b1dpffbCpl9ZZp7EW7eVUyBRrY+ OOlAwzzHtCrJhUczSWFnSA3F0hO+0qnHf0ghyiY= X-Received: by 2002:a81:1e4d:0:b0:31c:86f1:95b1 with SMTP id e74-20020a811e4d000000b0031c86f195b1mr14141207ywe.42.1657870826723; Fri, 15 Jul 2022 00:40:26 -0700 (PDT) MIME-Version: 1.0 References: <20220714214657.2402250-1-shorne@gmail.com> <20220714214657.2402250-2-shorne@gmail.com> In-Reply-To: From: Arnd Bergmann Date: Fri, 15 Jul 2022 09:40:10 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 1/2] asm-generic: Remove pci.h copying code out to architectures To: Max Filippov Cc: Stafford Horne , LKML , Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , Geert Uytterhoeven , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE..." , "H. Peter Anvin" , Chris Zankel , Bjorn Helgaas , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Child , Niklas Schnelle , Matthew Rosato , Pierre Morel , Kees Cook , "Gustavo A. R. Silva" , "open list:ALPHA PORT" , "open list:IA64 (Itanium) PL..." , "open list:M68K ARCHITECTURE" , linuxppc-dev , linux-s390 , "open list:SPARC + UltraSPAR..." , "open list:TENSILICA XTENSA PORT (xtensa)" , linux-pci , Linux-Arch , linux-riscv Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:xBt1Buqz4uz21xjgRTcz1sB5ZZm4RpSgjeDdgjcJqTVZpbgGxE9 nD1Zu4Ge/pN+IeJ5he3jwNMmhWT/KQ3Tih2/6CVgZId1G/PwWsU/qowRmpQOyfQoQmRELAt O10L1cjPx95JNrnrugzLqkMFdBASwkg7W3Y7jkVvUZ2Vh4E6XJobZnUTDU1xZGnR6J8Ks3c d7BkFYX1WbWfFA63SEFXQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:seUnc9f1U8s=:S9bJx32885XPj3UntqciIn ryJq6wlXd/INdO3qLpKv+zCWHiUjDZHNmdPUsxhqmWEa6ZmnX3NvQ6MeLIbAd7o+CAlnsafus i6abMxSuJr9BGrFHXiAxrKZsCbGYlKWDaeBu0foqLJvV32PORbOHK8cus2vZRSGLElHIF+V47 pvCZWmjE1I9A4hSILa+lvmBteOWavAMvo4PuzH3bl+SJGR9gYLOWU76tKbbO1ev+0wg1dkfJ5 jOkbcykeZEbY7bJ4JT3Kz8xo4oc93rUUELLafzbIWwCdOln8ovo4DIlrFkLawnUqdn41KTZta cFPNuJW3CvbABFv8dsogeL7fN12yN4Kkgw/TPHMIVVrBBmhxRo0d/TZTJqcrs1biQHTOUG9dZ qm+D02lYx5lTen6fDRIlPt2K7ob7TKdEOzBhR0v+/91FZZCGY1t0MD4mUaXTa9CzdnE2MxJ8B YJWBF61C1YkdlKt1pVua25I1BXCzAFjCn1PjGmdBbGS2LFNTnqOikH1V0oxOf7zRDz/IXOjuH czUNZlrKFoEKu4X0Ui99YyM0CqG3o2h7CmsLh1sdC9NmN7r2Fokzucsn4it15JPSVSY5SFGUP LRyKGnUfuYWNKhpkJLqEINJ9de8p6aWvBjdfBllf+cZ/FJujV62i2d1HUj9UYmqlUhyJq1Rsi itoNBMjEm6QsNefBh/wXaPPABqzFahvNiJ0qTDow2Ei7rKvAlSkA49IX1DnPzE6GLN82Y9oEs F4pvQjtLbS4jo0FS7R2xfwsOEXeIZ/mXlHNC6LHMWI+lBUgpWEfJ4GktmCkEXYZyYI3np/PBw BqfiRAVc9YXGgJDvTumU2YsGpgrAOXJcSE+XeecOUGLMAlQo51d20sGA78I9SDjWn1YQgsyBM UBE4CRWuJ9+H8oksXb0w== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Fri, Jul 15, 2022 at 3:45 AM Max Filippov wrote: > On Thu, Jul 14, 2022 at 2:47 PM Stafford Horne wrote: > > > +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) > > +{ > > + return channel ? 15 : 14; > > +} > > This addition does not make sense for the xtensa as it isn't even possible > to enable PNP support (the only user of this function) on xtensa. Nice catch! I had looked at this function earlier and only tried to infer which architectures might have this based on who has those interrupt numbers reserved for ISA devices, but looking at CONFIG_PNP is clearly better here. PNP depends on "ISA || ACPI", and this already rules out most architectures. The remaining ones are: * x86, ia64, alpha: These clearly use PNP based on-board devices on common machines, and use PC-style interrupts * arm64, loongarch: These select PNP when ACPI is enabled. I don't think they actually use PNP, but for the moment the function needs to be defined, probably returning 0. Loongarch still lacks PCI support though, so asm/pci.h is not yet there. * arm, mips, powerpc: Only a few older machines in each of these support ISA devices, and the function is probably machine specific. These all have a custom pci.h already and don't use the asm-generic version. * m68k: there are two that enable CONFIG_ISA and one that enables CONFIG_PCI, but nothing that has both, so we don't need this function. In summary, I think only x86 actually uses this function, and it is correct there, everything else either has its own implementation or does not need it, so the existing asm-generic/pci.h file can just be folded into the x86 asm/pci.h. That is a great cleanup. Arnd