From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/10] ARM: io: add a default IO_SPACE_LIMIT definition
Date: Wed, 17 Aug 2011 08:53:36 +0100 [thread overview]
Message-ID: <E1QtawS-0007N5-Rz@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20110817075104.GC1006@n2100.arm.linux.org.uk>
Add a default IO_SPACE_LIMIT definition. Explain the chosen value and
suggest why platforms would want to make it larger.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/io.h | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index d66605d..ffb089d 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -110,6 +110,27 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
#include <mach/io.h>
/*
+ * This is the limit of PC card/PCI/ISA IO space, which is by default
+ * 64K if we have PC card, PCI or ISA support. Otherwise, default to
+ * zero to prevent ISA/PCI drivers claiming IO space (and potentially
+ * oopsing.)
+ *
+ * Only set this larger if you really need inb() et.al. to operate over
+ * a larger address space. Note that SOC_COMMON ioremaps each sockets
+ * IO space area, and so inb() et.al. must be defined to operate as per
+ * readb() et.al. on such platforms.
+ */
+#ifndef IO_SPACE_LIMIT
+#if defined(CONFIG_PCMCIA_SOC_COMMON) || defined(CONFIG_PCMCIA_SOC_COMMON_MODULE)
+#define IO_SPACE_LIMIT ((resource_size_t)0xffffffff)
+#elif defined(CONFIG_PCI) || defined(CONFIG_ISA) || defined(CONFIG_PCCARD)
+#define IO_SPACE_LIMIT ((resource_size_t)0xffff)
+#else
+#define IO_SPACE_LIMIT ((resource_size_t)0)
+#endif
+#endif
+
+/*
* IO port access primitives
* -------------------------
*
--
1.7.4.4
next prev parent reply other threads:[~2011-08-17 7:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 7:51 [PATCH 00/10] Clean up some io.h and associated code Russell King - ARM Linux
2011-08-17 7:51 ` [PATCH 01/10] ARM: io: s3c2410: remove ioaddr() Russell King - ARM Linux
2011-08-17 7:51 ` [PATCH 02/10] ARM: io: RiscPC: define io addresses relative to IO_BASE Russell King - ARM Linux
2011-08-17 7:52 ` [PATCH 03/10] ARM: io: ecard: move ioaddr() inside __ecard_address Russell King - ARM Linux
2011-08-17 7:52 ` [PATCH 04/10] ARM: io: ecard: remove ioaddr() from ecard.c Russell King - ARM Linux
2011-08-17 7:52 ` [PATCH 05/10] ARM: io: RiscPC: make EASI_BASE a void iomem pointer Russell King - ARM Linux
2011-08-17 7:53 ` [PATCH 06/10] ARM: io: RiscPC: eliminate private inb() et.al. definitions Russell King - ARM Linux
2011-08-17 7:53 ` Russell King - ARM Linux [this message]
2011-08-17 7:53 ` [PATCH 08/10] ARM: io: remove IO_SPACE_LIMIT from platforms with ISA/PCI and 64K window Russell King - ARM Linux
2011-08-17 7:54 ` [PATCH 09/10] ARM: io: remove IO_SPACE_LIMIT from platforms without PCI/ISA Russell King - ARM Linux
2011-08-17 7:54 ` [PATCH 10/10] ARM: io: remove IO_SPACE_LIMIT from SA11x0 Russell King - ARM Linux
2011-08-18 15:14 ` [PATCH 00/10] Clean up some io.h and associated code Arnd Bergmann
2011-08-21 8:37 ` Russell King - ARM Linux
2011-08-21 13:21 ` 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=E1QtawS-0007N5-Rz@rmk-PC.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.