Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4299438imw; Tue, 19 Jul 2022 04:08:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tqS0AsjK1T1v0PW8uxVPaQsfRg24cRPxsM7RXwMhbJi8/CTWHYa4cl7miPHYip8FTafBMF X-Received: by 2002:a17:907:9620:b0:72b:5822:93d0 with SMTP id gb32-20020a170907962000b0072b582293d0mr30510680ejc.235.1658228888106; Tue, 19 Jul 2022 04:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658228888; cv=none; d=google.com; s=arc-20160816; b=qCL4omyqhqbyLgFlm4Ee9gLT/acHfdKxmo9WhIh7LmYrqPyTjSjsoNucSQPqOh4QLQ PQ+sHDVU0CTXMIR1zvwkb7lTJoXPyVX63f+En5Y3q2iSdm/H35Wld+NGDpWj/cZ+GnCu 9tkn660ej7lmG7tVjLXbVKgbegyBKb5DYAXgF5SQMzoZLM7h8GvKi/j8kQsb3+/crzF0 +ydB69Gkae+w9Ym4so8h6s+CrwIZ4yjfU/H9ckLK+rC+OZD8cTG+Cs9oBLdQg4RkgBFA eXe6acndwToeaiDqpEGzo9n8C3Fy6uyPXn++0/hP3mTwz4B5ksBnAyaForDFRYeiVDYX uaEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9r5Q68sSonSuFNnUgS5s5Aq4lQPVRc3ftjUkjt5E+/U=; b=d0arANY3eQgoM3LUwDVovwnlb7qzRkfKAMCIam7SRce5WTlx9I1XPU25CThpcSML8z TgZz+1gkAKpUaR/Y0w9oE9rL0hQTbO98L1oo/3ZQOWyabczujhPyXJ5Ls6LqTqjfBSMm 847wLpc06pMHdFRZb2nbB5wOst/wicTNfJcLGf7GJPLli0JEotyDYstw0tBB+RsDQgjF T/1VTkgR1WsqdRjCGcu6lOk0d0Co0NV+IN5VbWqzPRDPEZdSzvOwVeFe7nZpJeD1KGYp pzVd5dO1yo2RGhTUUoSRK9QGsKZMYZ4w5CFsZ16yiBNrsbMjqbwt42IB9qHATvnB+ZCI 8zKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BOnJQHOr; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz4-20020a1709072ce400b0072ab8afaaacsi1778212ejc.696.2022.07.19.04.07.42; Tue, 19 Jul 2022 04:08:08 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BOnJQHOr; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237357AbiGSKvu (ORCPT + 99 others); Tue, 19 Jul 2022 06:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237334AbiGSKvs (ORCPT ); Tue, 19 Jul 2022 06:51:48 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 828E9371B1; Tue, 19 Jul 2022 03:51:46 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id y15so6881851plp.10; Tue, 19 Jul 2022 03:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9r5Q68sSonSuFNnUgS5s5Aq4lQPVRc3ftjUkjt5E+/U=; b=BOnJQHOrKNukFMXMC1nU6y4ArvL3vrbcOB435U/Vzx1k1fn6r436k543OFDgaWokoN tDErjZCkEJHwVO1H9RQMX6lk34fHev+Aj5/gKGFjtSnH8f4W9B86s0nsqJfg9JeN8ml2 JpIehp+Baf/hC0iEenp4Vlpui6EBPFyHuw5pyeahpcXpOlX6hXba88BFS6CklcADGLsD uF4jiHQM1YmdN8VkpQPyWmk/8xJ0QlGm1a4CTd/3gGsmLRaK9WiL+TrM3sZCWwiys/37 kJ3jZOnmNy/5GCMbwcqkClcv2x5+kayzRqwLIi+9L4ewDsXPITUTBKitxHlTC+mUPCTq HiqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9r5Q68sSonSuFNnUgS5s5Aq4lQPVRc3ftjUkjt5E+/U=; b=LPsDP8XJBZ6ZK9N1ajE4Vj30okuZZfWMtbEkaaS16BZQvZWzxzWBtLg99TcJK0keNB kCC/h2FHh1VqTABv/nRUDKPoND6hklQslHcXeZH/psN8Wa6V62BXNv8cACJ1L6azOkov StgCs5mLtcAXWUxDvtJkSJoH/PJZ2oflVRJ78LBsH2nhbrI4eM5ja7p2pCYa5HlUDsAw XnahBTph8fFho7/VgDl5CTFUUi/QBnCDXjgcgOhdtf26dvTA6lWdfgqWyS8FduTsSDcN SehIEbjScym1ph0+bgUO4mTgSaM6Z+Rla8xm0SQgsqmv60TbMtM85A4H6vPAhl/jaLtb YTIQ== X-Gm-Message-State: AJIora/958TaYEQsanx3r7zXYskZTgNYgZRgrba+OA4HTRv7RQePpWwS w+/vVtodIiSq79McmrqG19M= X-Received: by 2002:a17:90b:3e89:b0:1f0:4233:b20e with SMTP id rj9-20020a17090b3e8900b001f04233b20emr37808145pjb.0.1658227905897; Tue, 19 Jul 2022 03:51:45 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id x23-20020a1709027c1700b001696751796asm11299184pll.139.2022.07.19.03.51.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 03:51:45 -0700 (PDT) Date: Tue, 19 Jul 2022 19:51:43 +0900 From: Stafford Horne To: Arnd Bergmann Cc: Christoph Hellwig , LKML , 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 Subject: Re: [PATCH v2 1/2] asm-generic: Remove pci.h copying remaining code to x86 Message-ID: References: <20220717033453.2896843-1-shorne@gmail.com> <20220717033453.2896843-2-shorne@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 10:40:34AM +0200, Arnd Bergmann wrote: > 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. I like this, I didn't know about the ATA_PRIMARY_IRQ/ATA_SECONDARY_IRQ macro. Let me add this to the series before 1/2. I will keep you as the author via Signed-off-by annotation. -Stafford