[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YtHozgXIkpyWHKth@antec>
Date: Sat, 16 Jul 2022 07:23:10 +0900
From: Stafford Horne <shorne@...il.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Guo Ren <guoren@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-csky@...r.kernel.org,
linux-riscv <linux-riscv@...ts.infradead.org>,
linux-um <linux-um@...ts.infradead.org>,
linux-pci <linux-pci@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [RFC PATCH 2/2] asm-generic: Add new pci.h and use it
On Fri, Jul 15, 2022 at 10:09:21AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 14, 2022 at 11:46 PM Stafford Horne <shorne@...il.com> 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.
>
> This looks very nice, thanks for doing it!
>
> > Two things to note are:
> >
> > - isa_dma_bridge_buggy, traditionally this is defined in asm/dma.h but
> > these architectures avoid creating that file and add the definition
> > to asm/pci.h.
>
> I would prefer if we could just kill off this variable for non-x86, as it's
> only set to a nonzero value in two implementations that are both
> x86-specific and most of the references are gone. That does not have
> to be part of this series though, if you don't want to address it here, just
> add a comment to the new pci.h file.
I will look at it, maybe in a v3.
> > - ARCH_GENERIC_PCI_MMAP_RESOURCE, csky does not define this so we
> > undefine it after including asm-generic/pci.h. Why doesn't csky
> > define it?
>
> Adding David Woodhouse to Cc, as he introduced this interface. As I
> understand it, this was meant as a replacement for the old
> architecture specific pci_mmap_page_range interface, and is ideally
> used everywhere.
>
> It's probably something that slipped through the review of csky and
> should have been there.
>
> As an aside, it seems the pci_mmap_page_range() cleanup was
> left almost complete, with sparc being the only one left after
> David Miller found a problem with the generic code. Not sure if
> this was ever resolved:
> https://lore.kernel.org/lkml/1519887203.622.3.camel@infradead.org/t/#u
I see, I will leave it foe now.
> > +#ifndef PCIBIOS_MIN_IO
> > +#define PCIBIOS_MIN_IO 0
> > +#endif
> > +
> > +#define PCIBIOS_MIN_MEM 0
>
> We should probably #ifdef both of these for consistency.
OK.
> > +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
> > +{
> > + /* no legacy ide irq support */
> > + return -ENODEV;
> > +}
>
> And this can just go away now, according to what we found.
Yeah, that will be nice.
-Stafford
Powered by blists - more mailing lists