Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp29451imi; Thu, 21 Jul 2022 15:14:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tO/rAiZake/nTL1+P5Eac7z+uY3x0IKebx1gJZOCM/TxYViICN5CkHkiqtdWZRfBVGwY3d X-Received: by 2002:a17:906:9754:b0:72f:58fe:41ce with SMTP id o20-20020a170906975400b0072f58fe41cemr550440ejy.467.1658441681944; Thu, 21 Jul 2022 15:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658441681; cv=none; d=google.com; s=arc-20160816; b=Furl8EOyMUmrlTmVTR1rJ3r1MvvC8U6l9Ah7OdhLoBE9GNpCnrBPBxRZKsJxYfqFau skOhEL8129RKy3led8nWqW2zdGzXtS98nvfp5ytzC1oOTPfrQlewo0o5E8VmX/Cu7rMI Cl5rYWqyanBnVzOJ1S+wQ+tV3YQWzrawmREx4nFQdiWD9sbeyKM/f3HQ76sr22I2DB7d cbO4vjpRariJSGtASgZOxIuHzI87FOQyAjq6Pfppg1moJGf9RKszJG1kKCD2QvY1cPPB +tmKr1mBLNevVZEGi7MQbgwjgwcaWzKXRUrEZwh0dEg5GfuKKGOZSkXLxL3bqP6NYkpg ocGw== 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=PktSKT1L2O3nGxL2SVwxNXiNfS8ZomkMf08apPvZeCg=; b=UUJNw4EUR8q9wjNjPQirmZE3yCNiFU6f/8MQiELbDQCdJ73ehgLxRd95hDr3ExpOvh JQ0TbFeNQ5r8d1LOVyN5ycqir/QaykUBJiJlE1gjVRxDNb73RN5fYVwNWP9LPSqq/oIt mhlJmTMwvBBlw03a/v1U8Qg42a2JGdqHbT/hg6vJ6oMZ2wdJ0mH8qk/F734w4lUvmgqY vit+qVsaIxhnsxOq2QDaoNY42pQmaSSTbrXJJWJZ62XSpqDz+MqpP9xBlYvvFNPp+Lzi /YffOcFcPADKQK9lWfRLqlYz00l6dHHL8Zrt9qqWUq3c1U6UHabCTnB4ZlEJ+5m7llNU x1Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DJY3jYWE; 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 x12-20020a05640226cc00b0043bbb57cedfsi4353238edd.112.2022.07.21.15.14.14; Thu, 21 Jul 2022 15:14:41 -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=DJY3jYWE; 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 S234009AbiGUV6u (ORCPT + 99 others); Thu, 21 Jul 2022 17:58:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233998AbiGUV6s (ORCPT ); Thu, 21 Jul 2022 17:58:48 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E58F936B6; Thu, 21 Jul 2022 14:58:46 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id x24-20020a17090ab01800b001f21556cf48so6528059pjq.4; Thu, 21 Jul 2022 14:58: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=PktSKT1L2O3nGxL2SVwxNXiNfS8ZomkMf08apPvZeCg=; b=DJY3jYWEFScuIXxMnaqONdYTGCVVwRulQsGebVz6JYCl1utvdLvXQ94toEx5kGMkZZ z1/pEiOFwUNWBrMC7+4ufNAkz0jd7cbHp8Zx0ZkqjXfnzObxdRWZcdzVyVOTA1gGu7Wp JmFlPgpXKXjsmdzknKots5Mlaul12c7HuPzlH/glqY7CBGvnUXzOUm/Pn6d996JPp/kd n4swd/grc13CTgVSCCDo1KShFnI4Jm/FapFGmE8Z2OWfZZMKtLemGcWh4NS19m7XSq9K xCmGPLb+25sN7ef6IEg88SWqFRVXLoHcy1Qc9xBZLqp1omKZJBnUyIg5gJB28vKKwrti vv4Q== 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=PktSKT1L2O3nGxL2SVwxNXiNfS8ZomkMf08apPvZeCg=; b=QX3ON5P8XnidJ3mqnXmOxCx30psrBgp2f2fHaCVchi4PAvYzaHh7oouU5akT/bHnzz CGkMXACMHBAJFnMii1Sk11QDzcANeFkIgAvIVydM+ozIG3XDxxX40Dmd1ysTiM1ZcnJ+ ZFK9I3RBFuAvOJevR2wxKAToqPNSSHV7C1AwMq8tBdfxhDGVSyKf5krwlfCh13WcreDF m4/iseMeKoFM+yN8LsMigP9H8OogUQc2TCVB61Ifgs2Uhbcg5D7NB1SSTrUJ3xcbSIi2 7nOBowFR+pnGE4lw6TDyRwpviH3ELKFWj1HUWn5VQh6gcmGr1ZHpqaEqJgUEuOBrMlJY I+Kg== X-Gm-Message-State: AJIora+ShTVDGUfTQI3igZk2vlwavHQ3sTo2K0qs/h5q3ntrtiMKnZCv cafkeCgX0t7Wg8J0elw5n/s= X-Received: by 2002:a17:902:db02:b0:16c:5568:d740 with SMTP id m2-20020a170902db0200b0016c5568d740mr362437plx.100.1658440725499; Thu, 21 Jul 2022 14:58:45 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id b17-20020a170903229100b0016bef6f6903sm2266180plh.72.2022.07.21.14.58.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 14:58:44 -0700 (PDT) Date: Fri, 22 Jul 2022 06:58:43 +0900 From: Stafford Horne To: Bjorn Helgaas Cc: LKML , Arnd Bergmann , Pierre Morel , Geert Uytterhoeven , Catalin Marinas , Will Deacon , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Richard Weinberger , Anton Ivanov , Johannes Berg , Bjorn Helgaas , "Rafael J. Wysocki" , linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org, linux-um@lists.infradead.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v5 4/4] asm-generic: Add new pci.h and use it Message-ID: References: <20220721134924.596152-5-shorne@gmail.com> <20220721173733.GA1731649@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220721173733.GA1731649@bhelgaas> 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 Thu, Jul 21, 2022 at 12:37:33PM -0500, Bjorn Helgaas wrote: > On Thu, Jul 21, 2022 at 10:49:24PM +0900, 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. > > > > Suggested-by: Arnd Bergmann > > Link: https://lore.kernel.org/lkml/CAK8P3a0JmPeczfmMBE__vn=Jbvf=nkbpVaZCycyv40pZNCJJXQ@mail.gmail.com/ > > Acked-by: Pierre Morel > > Acked-by: Geert Uytterhoeven > > Reviewed-by: Arnd Bergmann > > Signed-off-by: Stafford Horne > > --- > > Since v4: > > - Add reviewed-by > > > > arch/arm64/include/asm/pci.h | 10 ++-------- > > arch/csky/include/asm/pci.h | 17 ++--------------- > > arch/riscv/include/asm/pci.h | 23 ++++------------------- > > arch/um/include/asm/pci.h | 14 ++------------ > > include/asm-generic/pci.h | 32 ++++++++++++++++++++++++++++++++ > > 5 files changed, 42 insertions(+), 54 deletions(-) > > create mode 100644 include/asm-generic/pci.h > > > +++ b/include/asm-generic/pci.h > > @@ -0,0 +1,32 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > + > > +#ifndef __ASM_GENERIC_PCI_H > > +#define __ASM_GENERIC_PCI_H > > + > > +#include > > Do we need here? I don't see anything below that > depends on it. Thanks, you are right, I think some of the earlier functions may have needed it, which is why I had it earlier. But now that we have removed those we should be able to remove this. That said, I think some of the architecture includes could also be removed. On OpenRISC we are able to get away with only having the global asm-generic/pci.h so we don't need a wrapper pci.h header at all. However, I don't have everything setup to build all of those architectures so I was being a bit conservative to remove headers. I'll see what I can do in the next version. -Stafford > > +#ifndef PCIBIOS_MIN_IO > > +#define PCIBIOS_MIN_IO 0 > > +#endif > > + > > +#ifndef PCIBIOS_MIN_MEM > > +#define PCIBIOS_MIN_MEM 0 > > +#endif > > + > > +#ifndef pcibios_assign_all_busses > > +/* For bootloaders that do not initialize the PCI bus */ > > +#define pcibios_assign_all_busses() 1 > > +#endif > > + > > +/* Enable generic resource mapping code in drivers/pci/ */ > > +#define ARCH_GENERIC_PCI_MMAP_RESOURCE > > + > > +#ifdef CONFIG_PCI_DOMAINS > > +static inline int pci_proc_domain(struct pci_bus *bus) > > +{ > > + /* always show the domain in /proc */ > > + return 1; > > +} > > +#endif /* CONFIG_PCI_DOMAINS */ > > + > > +#endif /* __ASM_GENERIC_PCI_H */ > > -- > > 2.36.1 > > > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel