Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp31847imw; Thu, 14 Jul 2022 19:48:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tPPgkjfqI77jCedZ95nvXqPehEVrS0fv/5YGIiIBABsDJGZSc8nro4UeEJ8y7sdvLCx7Ot X-Received: by 2002:a17:906:ef8c:b0:72e:dd32:4163 with SMTP id ze12-20020a170906ef8c00b0072edd324163mr6112133ejb.430.1657853300364; Thu, 14 Jul 2022 19:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657853300; cv=none; d=google.com; s=arc-20160816; b=AxfXqxO1/7Ss2I61kecMw8K6l0ia38QMbBVgJpX4l4OTyr1P7T29aWbJuxiyvcr8V0 D+3ktBKn62esYdBKlcGAFONREDIfxdYjgQgECw06WZXIWBbXrAop06KPTgqBJ1V4P5z/ jHkjwNg7WSXa+2cnwAGV3KAasRt5uoAOmUi/Byv3XeSpfWmtU8Aud3YL321r0byisR4w ByUZ9O8zJIfE/TyO7l2BMLwD2NkKYb3pFn02UPmGWDXwkiM3xN7ihzC8bEy/ekUMEfz7 nrWJtI8vSSLC3w8HUg5f4G1XOlRXlnWRBxdJVbzEb3vkM8cUsN/sxWGGRz4gjDPga/Ex oj3A== 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=2PHQEHiPUK5/kMXd0Tiaa/2KkMXqEO7YBVcbpRdWkzU=; b=flTUOXX5GS34BittPGQ5Y4mcEmlSES/k1CTovwlz4fY78VttlzYPbC3okp2/qP802L c0cBwAxsWhC93mg0icqqy1yhRaLXR/GKfMAdWZdcCzBtk8fO3x4rudwdNaMBUd5jlbEC 3VCywAwWvPq60ctEjhnCT3nZSrQnpnWMKKmFEGyl+flGKdNtLxoI1/JgaNFOv/TlQMJw HbcUKORE2Xue0z6gKOM0lNHu126YDu+cmbBO9jmomQgic6WzSc28LnQIahWeNNpHH7LZ u1bdskIFvFH1wzacpndl9ir1iwmM/i0LtjbaPj/NU/qm9ownl1d9iMW3BEdousE5mV32 et3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IEJMJOhz; 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 t1-20020a056402240100b0043a7b67ce58si3867301eda.107.2022.07.14.19.47.55; Thu, 14 Jul 2022 19:48:20 -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=IEJMJOhz; 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 S232406AbiGOC1q (ORCPT + 99 others); Thu, 14 Jul 2022 22:27:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbiGOC1o (ORCPT ); Thu, 14 Jul 2022 22:27:44 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C70757538B; Thu, 14 Jul 2022 19:27:43 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id 70so3500387pfx.1; Thu, 14 Jul 2022 19:27:43 -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=2PHQEHiPUK5/kMXd0Tiaa/2KkMXqEO7YBVcbpRdWkzU=; b=IEJMJOhzDLt+yfASXyPdeXR1oGGTsGDx3vl/pKDJYU0fM7xGoEYifRYmndgoDBn8V+ 8KaH2UOTKaWNm2bcmSVrDZgCQRS5bZdc/JErVv0oiKI4D779tqf8qqqo8Y4iLSedLKu6 KJvBrd7MyyR0lBJJ++sR+EsLWE8c5/Kb5Z0fTJPJtZS1NwarGIQrRHk8mNKtsfmdVnsk DdHkjkVUI3Go5QJOuWJ7tFYeVZyOTWJ1DVFRKCXBlPEbNV+fVinpn4yVP5n1HJQodgh9 gnwtaOMTLLw/5pbt9rN0/tXbYqausx/cGWYNWZ3PmgEiWfJZrxEj2bcNKssaqRx0mKTs 9LaA== 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=2PHQEHiPUK5/kMXd0Tiaa/2KkMXqEO7YBVcbpRdWkzU=; b=anzorEmxO85UsEOGY79quda28Vup/O9mu/0P2oIsBhYfxOUJPiVm5chHxphIUi+qG8 4JKlUTYDfFuNQ2NdgKL7kYaFgHDjNzvTWC5SPjdUkoc7IK7oy4kcH7iMkaO0zqc19Ov6 hEebLt4VbY2sACEh5DmypErbaGEDKMBy4gjp9JnDMGrQ/Jj85i6pIOeVGDj3GkGptVle hWNJ4bjSksMCBcYYStGk9+gXIKB4HVU7U5iqbIG/X7qYXz9/D7dUu2eeEfJNP0HpFm2p mGQ1NyDrUwmqzIrqCUkQMX+c+u8jZJ/nkh6eRtPnlINY5r+zs4qkH0dUbANz428TkgjW u73g== X-Gm-Message-State: AJIora8lPZykhRvvBAWD4qPP2kEntgbVxTreeZ7C766wrU0aAjiVrjT1 ZbEJ8hknm2iWb1TTMIHV398= X-Received: by 2002:a63:9547:0:b0:408:be53:b599 with SMTP id t7-20020a639547000000b00408be53b599mr10179125pgn.463.1657852063244; Thu, 14 Jul 2022 19:27:43 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id v22-20020a631516000000b0040caab35e5bsm1998257pgl.89.2022.07.14.19.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 19:27:42 -0700 (PDT) Date: Fri, 15 Jul 2022 11:27:41 +0900 From: Stafford Horne To: Max Filippov Cc: 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@lists.ozlabs.org, linux-s390 , "open list:SPARC + UltraSPAR..." , "open list:TENSILICA XTENSA PORT (xtensa)" , linux-pci@vger.kernel.org, Linux-Arch , linux-riscv Subject: Re: [RFC PATCH 1/2] asm-generic: Remove pci.h copying code out to architectures Message-ID: References: <20220714214657.2402250-1-shorne@gmail.com> <20220714214657.2402250-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,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 Thu, Jul 14, 2022 at 06:45:27PM -0700, Max Filippov wrote: > On Thu, Jul 14, 2022 at 2:47 PM Stafford Horne wrote: > > > > The generic pci.h header provides a definition of pci_get_legacy_ide_irq > > which is used by architectures that use PC-style interrupt numbers. > > > > This patch removes the old pci.h in order to make room for a new > > pci.h to be used by arm64, riscv, openrisc, etc. > > > > The existing code in pci.h is moved out to architectures. > > > > Suggested-by: Arnd Bergmann > > Link: https://lore.kernel.org/lkml/CAK8P3a0JmPeczfmMBE__vn=Jbvf=nkbpVaZCycyv40pZNCJJXQ@mail.gmail.com/ > > Signed-off-by: Stafford Horne > > --- > > arch/alpha/include/asm/pci.h | 1 - > > arch/ia64/include/asm/pci.h | 1 - > > arch/m68k/include/asm/pci.h | 7 +++++-- > > arch/powerpc/include/asm/pci.h | 1 - > > arch/s390/include/asm/pci.h | 6 +++++- > > arch/sparc/include/asm/pci.h | 5 ++++- > > arch/x86/include/asm/pci.h | 6 ++++-- > > arch/xtensa/include/asm/pci.h | 6 ++++-- > > include/asm-generic/pci.h | 17 ----------------- > > 9 files changed, 22 insertions(+), 28 deletions(-) > > delete mode 100644 include/asm-generic/pci.h > > [...] > > > diff --git a/arch/xtensa/include/asm/pci.h b/arch/xtensa/include/asm/pci.h > > index 8e2b48a268db..f57ede61f5db 100644 > > --- a/arch/xtensa/include/asm/pci.h > > +++ b/arch/xtensa/include/asm/pci.h > > @@ -43,7 +43,9 @@ > > #define ARCH_GENERIC_PCI_MMAP_RESOURCE 1 > > #define arch_can_pci_mmap_io() 1 > > > > -/* Generic PCI */ > > -#include > > Ok. > > > +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. Thanks for your feedback, this is the kind of feedback I was hoping to fish out with this patch. I will look into completely removing this then. -Stafford