From: khc@pm.waw.pl (Krzysztof Halasa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro.
Date: Sat, 28 Nov 2009 21:47:29 +0100 [thread overview]
Message-ID: <m37htawf4u.fsf@intrepid.localdomain> (raw)
In-Reply-To: <20091128202523.GD497@n2100.arm.linux.org.uk> (Russell King's message of "Sat, 28 Nov 2009 20:25:23 +0000")
Russell King - ARM Linux <linux@arm.linux.org.uk> writes:
> The point of the #ifndef is so that you _can_ redefine them. As illustrated
> above, you want:
This is not what I'm talking about. I know IXP4xx can live without
changing arch/arm/include/asm/io.h. Let's forget about IXP4xx for
a moment.
arch/arm/include/asm/io.h:
/*
* io{read,write}{8,16,32} macros
*/
#ifndef ioread8
#define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; })
#define ioread16(p) ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __v; })
#define ioread32(p) ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __v; })
#define iowrite8(v,p) __raw_writeb(v, p)
#define iowrite16(v,p) __raw_writew((__force __u16)cpu_to_le16(v), p)
(and so on).
This header file defines a bunch of things depending on existence of
this very ioread8 macro. I'm asking about this single "#ifndef ioread8"
line, i.e. if you find defining ioread16, ioread32, iowrite8 etc. based
only on existence of ioread8 to be correct.
If it's indeed correct then I'll just adjust IXP4xx headers accordingly,
there is absolutely no problem from this side.
--
Krzysztof Halasa
prev parent reply other threads:[~2009-11-28 20:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-14 23:05 [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro Krzysztof Halasa
2009-11-14 23:33 ` IXP4xx: Drop "__ixp4xx_" prefix from in/out/ioread/iowrite functions for clarity. Re: (to fool the list server) Krzysztof Halasa
2009-11-14 23:43 ` IXP4xx: Rename indirect MMIO primitives from __ixp4xx_* to __indirect_*. Re: nothing Krzysztof Halasa
2009-11-28 18:24 ` [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro Russell King - ARM Linux
2009-11-28 20:12 ` Krzysztof Halasa
2009-11-28 20:25 ` Russell King - ARM Linux
2009-11-28 20:47 ` Krzysztof Halasa [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=m37htawf4u.fsf@intrepid.localdomain \
--to=khc@pm.waw.pl \
--cc=linux-arm-kernel@lists.infradead.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