Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3088388imw; Mon, 18 Jul 2022 01:44:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s/E/bCD3shOQfwmwzYVEG45VNFJyHvMThljk8e6o6gdpExk6+R+4xgLunf2qc8iKX65YfQ X-Received: by 2002:a05:6402:350c:b0:43a:e25f:d73 with SMTP id b12-20020a056402350c00b0043ae25f0d73mr36038426edd.66.1658133877891; Mon, 18 Jul 2022 01:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658133877; cv=none; d=google.com; s=arc-20160816; b=w0Fos0LA4i5S/euwouM+SXjCxfH7rhDt2PuZDMWLax/ah/7+XfjSXtN476luYdGRo5 yxtpPferM2TxD/NTSl68m932F+vCXUAKX3LsUC8TYYAIVYRV2zwdr/3RCcn8jcrT4Sve +/o90eEw3pVCdyXNrLgb9Owx5u5HeHeVra93pJRSJiqYMdS0/oWPNhtXtMYA9WkCGZxX t48UCG9ECr5/qMSAt2/Gpm9yE8xYrPlN+DcI7nA1QD8XGKpMBbd+Zm97NyECv4Yi8QXE AA+G6DO7pOEsuFXgYoJ6M4lwTg2Zxwzr3Qqv47lqucvONcuYM/2ELqkpvn6pYgEjuuVG lhlA== 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=uCUVu1Kj7NqFvLhxI3mrLTrdaZ7Il/NXIk8NxR/m6ME=; b=RdRFxeQ234Gkzzv4/clrwt15N+GFppjhj9/9dsyha/yglkZOuT/+2/ZBlJwBLfvmxj LEiA2HWtdQfGYWGFqFL0RBAglWNuCvtUKwxymdZsyapwKNCx3ImjSrhM5a5oQ+qACNU8 AUyf3cVspWIWJm+fXrSlSNanSRI2j95bmEFB+SW7Q8WNOIcXsfh9X4TU+e+rez5R6giH lAaaPdyv6EJ04SytY8O5cZXQZ/XRu+vXiJtahf8o8ciCVjQ4JtnPyglnpXWZeNx/8U12 WGEoNt9dr0ECSMOhzXaXgWqAa+0zLhFp6RqhpJn+nSLKu3Kl6mfG4IM+xv/BRdQPEISb +61g== 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 qk12-20020a1709077f8c00b0072b58288194si12792993ejc.293.2022.07.18.01.44.13; Mon, 18 Jul 2022 01:44:37 -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 S233984AbiGRIk6 (ORCPT + 99 others); Mon, 18 Jul 2022 04:40:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233896AbiGRIk4 (ORCPT ); Mon, 18 Jul 2022 04:40:56 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38605643D; Mon, 18 Jul 2022 01:40:55 -0700 (PDT) Received: from mail-yb1-f175.google.com ([209.85.219.175]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MzyAy-1nHnbX127a-00wzfO; Mon, 18 Jul 2022 10:40:53 +0200 Received: by mail-yb1-f175.google.com with SMTP id 7so2009864ybw.0; Mon, 18 Jul 2022 01:40:52 -0700 (PDT) X-Gm-Message-State: AJIora8X1Aam3ySj99TD9MY7dEOrlzAcfoHZSziEomsOrAjSbgLG0eR3 v3RZQoiFJulLqzogfBppia/njAD+HIPZjpj74D0= X-Received: by 2002:a25:9f87:0:b0:669:4345:a8c0 with SMTP id u7-20020a259f87000000b006694345a8c0mr25927260ybq.472.1658133650969; Mon, 18 Jul 2022 01:40:50 -0700 (PDT) MIME-Version: 1.0 References: <20220717033453.2896843-1-shorne@gmail.com> <20220717033453.2896843-2-shorne@gmail.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 18 Jul 2022 10:40:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] asm-generic: Remove pci.h copying remaining code to x86 To: Christoph Hellwig 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 , "the arch/x86 maintainers" , "H. Peter Anvin" , Chris Zankel , Max Filippov , Bjorn Helgaas , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Child , Niklas Schnelle , Matthew Rosato , Pierre Morel , Kees Cook , "Gustavo A. R. Silva" , alpha , "open list:IA64 (Itanium) PLATFORM" , linux-m68k , linuxppc-dev , linux-s390 , sparclinux , "open list:TENSILICA XTENSA PORT (xtensa)" , linux-pci , linux-arch , linux-riscv Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:VA+ADZ1wlySE9Ouh2tYgU0A8V4oQDK6lPEeoN9EGdoubUZTOHeD mP3qZxOOrOyzBXf7VEeKAez7oCwQjAB7mSIfnIdxmzayc77FlghLUKmImGs2Qi7jkpQ46Sx mlXcKYCf770vn2MC/YUeoNNcpJouPP015V2R2VQElZ6j9Mh5zlTdp7VdWlCdhtq5X1IxSN4 Vo23t32Imfrki/PvPbzsQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:4b3jq7bjLLE=:a6qWrjWnERxR/3JaIClND/ DeiDquV6H8SJWHIaREUVCNILb2747FAmBq4hAwESAA8dFrq8z+X3wOvj9jvRGJIZPAFoFQqa+ 1CGLsM/kx1ZAe97kLjHsfnabr0C3IGizgzLpu8HtdbJGSmKxN+km8B1G0d/NdxP0xrjwDdyB0 LbEZ/8NkMTReY0kzowLf1LutJ+ECbNyuUsQRC04RJchI9Ezxp3oPUs5AltUscC6wjNg+n4zDc lE4tZ3kwy+WVvQjqfV/ScuT277jRzNyjU26FycqDC6jGCq/yp0Sxk7wFwhHYoSz1J4YBP37OA H3TVEaSFYEp0BGS8F6wnkG2Xb+qrPxdBJvr7Y4J8XLEiISkKR/lrWtdDyG/HIksfIscUG/zKj jS7Q2ChLj2XGo2Pbmk2DHR87gfoysZgStaEjymog1xDKEfpgVL1ft71+i+G8pQvHDzC2c4UwY UUOC3FkL7RxJBsxEQ+SoirTqVXh8CA7RTmxZUIQrk2hc8xL9b67lMJ8N78U9Ogk8DzrAzaLk0 5OR7JIeoGBsFy2YOiJ321GR04ymgZ846JuKqac+ha58viPaHnohhZhGlGV/D205LOJurQo6g6 6wxILAg/bldYxAI3UeRoKKemhZ221RQ8J7fDPCIUH/orpvq3O4Halu/OAiHsnMOC8kmF3fJ9R JcZqLRpkowdRcOw7voZhpFbAoSxdwWFKovPN1BZmFXaoi4wB+PGe6W66tFttvCeNXsNDZJ0SR cZzf7hR0bkQfwBo6G//PlVEy0sp+ltYv1eVHE36fxEm6tZjW2RpxzIvfyIo6Xh0rKcaelbg+N skhOpesKt88SkWklSTgAXKVpaOdJ0/zs3bBkbHWvVJARJweqXTY4hsrAlGgwdBGP9PVPTyWlL h2q7+CBWav3EOUiTQMlYzaeCWF4I4m4y7AmXMuE3Q= 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 Mon, Jul 18, 2022 at 6:33 AM Christoph Hellwig wrote: > > On Sun, Jul 17, 2022 at 12:34:52PM +0900, Stafford Horne wrote: > > The generic pci.h header now only provides a definition of > > pci_get_legacy_ide_irq which is used by architectures that support PNP. > > Of the architectures that use asm-generic/pci.h this is only x86. > > Please move this into a separate header, ike legacy-ide.h. It doens't > have anyting to do with actual PCI support. It looks like asm/libata-portmap.h is meant to have this information already, and this is what libata uses, while drivers/ide used the pci_get_legacy_ide_irq() function for the same purpose. Only ia64 and powerpc have interesting definitions of both, and they return the same thing, so I think this is sufficient to remove the last caller: diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 2fa0f7d55259..d7a6250589d6 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include @@ -322,8 +322,8 @@ static int pci_dev_uses_irq(struct pnp_dev *pnp, struct pci_dev *pci, * treat the compatibility IRQs as busy. */ if ((progif & 0x5) != 0x5) - if (pci_get_legacy_ide_irq(pci, 0) == irq || - pci_get_legacy_ide_irq(pci, 1) == irq) { + if (ATA_PRIMARY_IRQ(pci) == irq || + ATA_SECONDARY_IRQ(pci) == irq) { pnp_dbg(&pnp->dev, " legacy IDE device %s " "using irq %d\n", pci_name(pci), irq); return 1; This is fine on the architectures that currently return an error from pci_get_legacy_ide_irq() but will change to returning 15/14 instead, because they do not support ISA devices, so pci_dev_uses_irq() will never be called either. Arnd