linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: Christophe Leroy <christophe.leroy@c-s.fr>,
	Arnd Bergmann <arnd@arndb.de>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/5] powerpc: make iowrite32be etc. inline
Date: Thu, 31 Oct 2019 08:38:54 +0100	[thread overview]
Message-ID: <04799503-b423-6bc8-71cd-bee54e45883e@rasmusvillemoes.dk> (raw)
In-Reply-To: <20191031003154.21969-1-linux@rasmusvillemoes.dk>

On 31/10/2019 01.31, Rasmus Villemoes wrote:

> At first I tried something that wouldn't need to touch anything
> outside arch/powerpc/, but I ended up with conditional inclusion of
> asm-generic headers and/or duplicating a lot of their contents.

Urrgh, this is much worse than I feared. Already 1/5 is broken because
asm-generic.h includes asm-generic/iomap.h conditionally, but
asm-generic/pci_iomap.h unconditionally, so now users of io.h with
CONFIG_PCI and !CONFIG_GENERIC_IOMAP get an external declaration of
pci_iounmap they didn't use to, in addition to the static inline defined
in io.h.

And I didn't think 2/5 could break anything - on the premise that if
somebody already have a non-trivial define of ioread16, they couldn't
possibly also include asm-generic/iomap.h. alpha proves me wrong; as
long as one doesn't define ioread16 until after iomap.h has been parsed,
there's no problem (well, except of course if some static inline that
uses ioread16 got parsed between the compiler seeing the extern
declaration and alpha then defining the ioread16 macro, but apparently
that doesn't happen).

So sorry for the noise. Maybe I'll just have to bite the bullet and
introduce private qe_iowrite32be etc. and define them based on $ARCH.
Any better ideas would be much appreciated.

Thanks,
Rasmus

  parent reply	other threads:[~2019-10-31  7:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31  0:31 [RFC PATCH 0/5] powerpc: make iowrite32be etc. inline Rasmus Villemoes
2019-10-31  0:31 ` [RFC PATCH 1/5] asm-generic: move pcu_iounmap from iomap.h to pci_iomap.h Rasmus Villemoes
2019-10-31  0:31 ` [RFC PATCH 2/5] asm-generic: employ "ifndef foo; define foo foo" idiom in iomap.h Rasmus Villemoes
2019-10-31  0:31 ` [RFC PATCH 3/5] powerpc: move pci_iounmap() from iomap.c to pci-common.c Rasmus Villemoes
2019-10-31  0:31 ` [RFC PATCH 4/5] powerpc: make pcibios_vaddr_is_ioport() static Rasmus Villemoes
2019-10-31  0:31 ` [RFC PATCH 5/5] powerpc: make iowrite32 and friends static inline when no indirection Rasmus Villemoes
2019-10-31  7:38 ` Rasmus Villemoes [this message]
2019-10-31 13:46   ` [RFC PATCH 0/5] powerpc: make iowrite32be etc. inline Arnd Bergmann

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=04799503-b423-6bc8-71cd-bee54e45883e@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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).