linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pcmcia: Convert io_req_t to use kio_addr_t
@ 2007-09-05 14:27 Olof Johansson
  2007-09-14 10:48 ` Andrew Morton
  0 siblings, 1 reply; 15+ messages in thread
From: Olof Johansson @ 2007-09-05 14:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: linuxppc-dev, akpm, linux-pcmcia, hch

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;

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-11-04  9:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-05 14:27 [PATCH] pcmcia: Convert io_req_t to use kio_addr_t Olof Johansson
2007-09-14 10:48 ` 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

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).