linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: Stafford Horne <shorne@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	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>
Subject: Re: [PATCH v2 2/2] asm-generic: Add new pci.h and use it
Date: Mon, 18 Jul 2022 08:56:20 +0200	[thread overview]
Message-ID: <CAK8P3a1KJe4K5g1z-Faoxc9NhXqjCUWxnvk2HPxsj2wzG_iDbg@mail.gmail.com> (raw)
In-Reply-To: <YtTjeEnKr8f8z4JS@infradead.org>

On Mon, Jul 18, 2022 at 6:37 AM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Sun, Jul 17, 2022 at 12:34:53PM +0900, Stafford Horne wrote:
> > 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.
>
> This doesn't have anyting to do with PCI support.  I think adding a
> separate header just for this that always stubs it out unless a config
> option is set (which x86 then selects) is the besy idea here.  I also
> think the isa_dma_bridge_buggy needs to move out of the PCI code as
> well.

Most architectures have it in asm/dma.h, which is probably the right place
(if we end up keeping it), since this is for the ISA DMA API.

I would copy this declaration from x86

#ifdef CONFIG_PCI
extern int isa_dma_bridge_buggy;
#else
#define isa_dma_bridge_buggy (0)
#endif

to asm-generic/dma.h and remove it from arch/sh to avoid the
one duplicate definition. The architectures that have the declaration
in asm/pci.h (arm64, csky, riscv) already get the asm-generic version
of asm/dma.h.

As mentioned before, it would be even better to just remove it
entirely from everything except x86, and enclose the four
references in an explicit "#ifdef X86_32". The variable declaration
only exists because drivers/pci/quirks.c is compiled on all
architecture, but the individual quirk is only active  based on
the PCI device ID of certain early PCI-ISA bridges.

      Arnd

  reply	other threads:[~2022-07-18  6:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220717033453.2896843-1-shorne@gmail.com>
2022-07-17  3:34 ` [PATCH v2 1/2] asm-generic: Remove pci.h copying remaining code to x86 Stafford Horne
2022-07-17  9:23   ` Geert Uytterhoeven
2022-07-18  4:33   ` Christoph Hellwig
2022-07-18  8:40     ` Arnd Bergmann
2022-07-19 10:51       ` Stafford Horne
2022-07-17  3:34 ` [PATCH v2 2/2] asm-generic: Add new pci.h and use it Stafford Horne
2022-07-18  4:37   ` Christoph Hellwig
2022-07-18  6:56     ` Arnd Bergmann [this message]
     [not found]       ` <CAAfxs740yz1vJmtFHOPTXT6fqi0+37SR_OhoGsONe4mx_21+_g@mail.gmail.com>
2022-07-19  7:45         ` Arnd Bergmann
2022-07-19 10:55           ` Stafford Horne
2022-07-19 11:55             ` Arnd Bergmann
2022-07-19 12:23               ` Stafford Horne
2022-07-19 13:05                 ` Stafford Horne
2022-07-19 13:18                   ` Arnd Bergmann
2022-07-19 13:33                     ` Stafford Horne
2022-07-19 14:32                   ` Christoph Hellwig
2022-07-20 13:21                     ` Stafford Horne
2022-07-19 15:09                 ` David Laight
2022-07-20 13:24                   ` Stafford Horne

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=CAK8P3a1KJe4K5g1z-Faoxc9NhXqjCUWxnvk2HPxsj2wzG_iDbg@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=guoren@kernel.org \
    --cc=hch@infradead.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=shorne@gmail.com \
    --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).