From: Olof Johansson <olof@lixom.net>
To: linux-kernel@vger.kernel.org
Cc: linux-pcmcia@lists.infradead.org, hch@lst.de,
akpm@linux-foundation.org, linuxppc-dev@ozlabs.org
Subject: [PATCH] pcmcia: Convert io_req_t to use kio_addr_t
Date: Wed, 5 Sep 2007 09:27:43 -0500 [thread overview]
Message-ID: <20070905142742.GA1760@lixom.net> (raw)
Convert the io_req_t members to kio_addr_t, to allow use on machines with
more than 16 bits worth of IO port address space (ppc64 in this case,
but it applies to others as well).
Signed-off-by: Olof Johansson <olof@lixom.net>
---
I'm not at home in the PCMCIA stack, so I'd appreciate some extra eyes
on it to avoid regressions. As far as I can tell, the io_req_t structure
is not exported through any userspace interface and only used internally.
This supersedes the earlier (rejected) "increase ioaddr_t to 32-bits"
patch (http://patchwork.ozlabs.org/linuxppc/patch?id=11908) for ppc64,
since with this change that would not be needed.
Thanks,
Olof
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 0ce39de..585c14b 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -65,8 +65,8 @@ extern int ds_pc_debug;
* Special stuff for managing IO windows, because they are scarce
*/
-static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
- ioaddr_t num, u_int lines)
+static int alloc_io_space(struct pcmcia_socket *s, u_int attr, kio_addr_t *base,
+ kio_addr_t num, u_int lines)
{
int i;
kio_addr_t try, align;
@@ -74,14 +74,14 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
align = (*base) ? (lines ? 1<<lines : 0) : 1;
if (align && (align < num)) {
if (*base) {
- ds_dbg(s, 0, "odd IO request: num %#x align %#lx\n",
+ ds_dbg(s, 0, "odd IO request: num %#lx align %#lx\n",
num, align);
align = 0;
} else
while (align && (align < num)) align <<= 1;
}
if (*base & ~(align-1)) {
- ds_dbg(s, 0, "odd IO request: base %#x align %#lx\n",
+ ds_dbg(s, 0, "odd IO request: base %#lx align %#lx\n",
*base, align);
align = 0;
}
@@ -132,8 +132,8 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
} /* alloc_io_space */
-static void release_io_space(struct pcmcia_socket *s, ioaddr_t base,
- ioaddr_t num)
+static void release_io_space(struct pcmcia_socket *s, kio_addr_t base,
+ kio_addr_t num)
{
int i;
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index d5838c3..657d653 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -147,11 +147,11 @@ typedef struct config_req_t {
/* For RequestIO and ReleaseIO */
typedef struct io_req_t {
- ioaddr_t BasePort1;
- ioaddr_t NumPorts1;
+ kio_addr_t BasePort1;
+ kio_addr_t NumPorts1;
u_int Attributes1;
- ioaddr_t BasePort2;
- ioaddr_t NumPorts2;
+ kio_addr_t BasePort2;
+ kio_addr_t NumPorts2;
u_int Attributes2;
u_int IOAddrLines;
} io_req_t;
next reply other threads:[~2007-09-05 15:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-05 14:27 Olof Johansson [this message]
2007-09-14 10:48 ` [PATCH] pcmcia: Convert io_req_t to use kio_addr_t Andrew Morton
2007-09-14 16:52 ` Olof Johansson
2007-09-21 22:15 ` [PATCH v2] " Olof Johansson
2007-09-21 22:39 ` Alan Cox
2007-09-22 6:25 ` Matthew Wilcox
2007-09-22 9:13 ` Christoph Hellwig
2007-10-19 20:17 ` [PATCH v3] pcmcia: Convert io_req_t to use unsigned int Olof Johansson
2007-10-28 13:44 ` Dominik Brodowski
2007-10-28 20:10 ` [PATCH] pcmcia: Remove replace kio_addr_t with unsigned int everywhere Olof Johansson
2007-10-28 20:18 ` [PATCH v2] " Olof Johansson
2007-10-28 23:50 ` Stephen Rothwell
2007-10-29 0:16 ` Olof Johansson
2007-11-04 9:11 ` Komuro
2007-09-22 15:11 ` [PATCH v2] pcmcia: Convert io_req_t to use kio_addr_t Olof Johansson
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=20070905142742.GA1760@lixom.net \
--to=olof@lixom.net \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=linuxppc-dev@ozlabs.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