linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Guo Ren <guoren@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	linux-csky@vger.kernel.org,
	linux-riscv <linux-riscv@lists.infradead.org>,
	linux-um <linux-um@lists.infradead.org>,
	linux-pci <linux-pci@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [RFC PATCH 2/2] asm-generic: Add new pci.h and use it
Date: Sat, 16 Jul 2022 07:23:10 +0900	[thread overview]
Message-ID: <YtHozgXIkpyWHKth@antec> (raw)
In-Reply-To: <CAK8P3a2_HKMf8nMcSkK1_jyCEHEdzz=YiRmPvN+ACbPTafXJzA@mail.gmail.com>

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@gmail.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

      reply	other threads:[~2022-07-15 22:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220714214657.2402250-1-shorne@gmail.com>
2022-07-14 21:46 ` [RFC PATCH 1/2] asm-generic: Remove pci.h copying code out to architectures Stafford Horne
2022-07-15  1:45   ` Max Filippov
2022-07-15  2:27     ` Stafford Horne
2022-07-15  7:40     ` Arnd Bergmann
2022-07-14 21:46 ` [RFC PATCH 2/2] asm-generic: Add new pci.h and use it Stafford Horne
2022-07-15  8:09   ` Arnd Bergmann
2022-07-15 22:23     ` Stafford Horne [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YtHozgXIkpyWHKth@antec \
    --to=shorne@gmail.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=dwmw2@infradead.org \
    --cc=guoren@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-um@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=richard@nod.at \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).