Skip to contentSkip to conversation

PATCH

PATCH Pete Popov 4 participants 9 messages Oct 10, 2004 – Oct 11, 2004

Subsystems (2)
lore
Share & tools
lore

Pete Popov

author
#0 lore raw

Ralf, or anyone else, any suggestions on how to get a patch like the one below accepted in 2.6? It's needed due to the 36 bit address of the pcmcia controller on the Au1x CPUs.

include/pcmcia/cs_types.h +4 -2
diff -Naur --exclude=CVS linux-2.6-orig/include/pcmcia/cs_types.h linux-2.6-dev/include/pcmcia/cs_types.h
@@ -36,8 +36,10 @@
 #include <sys/types.h>
 #endif
 
-#if defined(__arm__) || defined(__mips__)
-typedef u_int   ioaddr_t;
+#if defined(__arm__)
+typedef u_int ioaddr_t;
+#elif defined(__mips__)
+typedef phys_t ioaddr_t;
 #else
 typedef u_short	ioaddr_t;
 #endif
include/pcmcia/ss.h +1 -1
diff -Naur --exclude=CVS linux-2.6-orig/include/pcmcia/ss.h linux-2.6-dev/include/pcmcia/ss.h
@@ -103,7 +103,7 @@
     u_char	map;
     u_char	flags;
     u_short	speed;
-    u_long	static_start;
+    ioaddr_t	static_start;
     u_int	card_start;
     struct resource *res;
 } pccard_mem_map;
#1 lore raw
Quoted 3 lines · Pete Popov

Ralf, or anyone else, any suggestions on how to get a patch like the one below accepted in 2.6? It's needed due to the 36 bit address of the pcmcia controller on the Au1x CPUs.

Perhaps you can ask the PPC people? Book E PPC has 36-bit I/O as well.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 5 lines · Geert Uytterhoeven
Quoted 3 lines

Ralf, or anyone else, any suggestions on how to get a patch like the one below accepted in 2.6? It's needed due to the 36 bit address of the pcmcia controller on the Au1x CPUs.

Perhaps you can ask the PPC people? Book E PPC has 36-bit I/O as well.

Using 36-bit pointers for PCMCIA seems questionable to me -- does the bus
support such wide addresses? If not, why not use a data type that covers valid offsets only when passing addresses to bus access functions? In particular, the range of offsets (the data type used) shouldn't depend on the processor type, should it?

Maciej

#6 lore raw
In reply to Geert Uytterhoeven
Quoted 6 lines · Geert Uytterhoeven
Quoted 3 lines · Pete Popov

Ralf, or anyone else, any suggestions on how to get a patch like the one below accepted in 2.6? It's needed due to the 36 bit address of the pcmcia controller on the Au1x CPUs.

Perhaps you can ask the PPC people? Book E PPC has 36-bit I/O as well.

FWIW, it's specifically PPC440 cores that have a 36-bit address space. It should be noted that nobody has as of yet expressed public interest in having PCMCIA working on PPC440. I just ran into a person with a custom board last week interfacing a CF card that would need a similar patch to handle ppc's phys_addr_t.

To answer Pete's original question, I would suggest posting the patch to http://lists.infradead.org/mailman/listinfo/linux-pcmcia which is where PCMCIA subsystem development conversations are taking place. It might be good to cc: rmk since he's been the de facto PCMCIA maintainer.

-Matt

author
#3 lore raw
In reply to Maciej W. Rozycki
Quoted 7 lines · Maciej W. Rozycki
Quoted 4 lines · Geert Uytterhoeven
Quoted 3 lines

Ralf, or anyone else, any suggestions on how to get a patch like the one below accepted in 2.6? It's needed due to the 36 bit address of the pcmcia controller on the Au1x CPUs.

Quoted 5 lines
Quoted 1 line

Perhaps you can ask the PPC people? Book E PPC has 36-bit I/O as well.

Using 36-bit pointers for PCMCIA seems questionable to me -- does the bus
support such wide addresses?

Sort of. The internal CPU bus has a 36 bit chip select. You never see the 36 bit phys address on the bus, but the PCI, external LCD, and pcmcia addresses are 36 bit. That's the reason for the 36 bit I/O address patch I sent last night.

Quoted 2 lines

If not, why not use a data type that covers
valid offsets only when passing addresses to bus access functions?

The attribute and memory pcmcia addresses are just stored in these variables, and then the upper pcmcia stack layer calls ioremap on these addresses. Thus, you need the 36 bit I/O address patch, as well as the tiny pcmcia patch.

The pcmcia I/O address is ioremapped at the socket driver level. If that was the case with the mem and attribute addresses, I wouldn't need this 64 bit pcmcia patch. But since it's the upper pcmcia layer that ioremaps these addresses, I need to store tham in 64 bit types.

Pete

author
#7 lore raw
In reply to Matt Porter
Quoted 17 lines · Matt Porter
Quoted 7 lines · Geert Uytterhoeven
Quoted 3 lines · Pete Popov

Ralf, or anyone else, any suggestions on how to get a patch like the one below accepted in 2.6? It's needed due to the 36 bit address of the pcmcia controller on the Au1x CPUs.

Perhaps you can ask the PPC people? Book E PPC has 36-bit I/O as well.

FWIW, it's specifically PPC440 cores that have a 36-bit address space. It should be noted that nobody has as of yet expressed public interest in having PCMCIA working on PPC440. I just ran into a person with a custom board last week interfacing a CF card that would need a similar patch to handle ppc's phys_addr_t.

Quoted 5 lines

To answer Pete's original question, I would suggest posting the patch to http://lists.infradead.org/mailman/listinfo/linux-pcmcia which is where PCMCIA subsystem development conversations are taking place. It might be good to cc: rmk since he's been the de facto PCMCIA maintainer.

I'll try that, thanks. If more SOCs needed this feature, it might have been possible to get it accepted in 2.4 a long time ago. With the PPC440, now it's not only the Au1x that needs the patch.

Pete

author
#8 lore raw
In reply to Matt Porter
Quoted 6 lines

To answer Pete's original question, I would suggest posting the patch to http://lists.infradead.org/mailman/listinfo/linux-pcmcia which is where PCMCIA subsystem development conversations are taking place. It might be good to cc: rmk since he's been the de facto PCMCIA maintainer.

Or, we'll go with your idea we just discussed :) No need for the 64 bit pcmcia patch in that case.

I'll make the updates in the next few hours and test them.

Pete

#4 lore raw
In reply to Pete Popov
Quoted 8 lines · Pete Popov
Quoted 2 lines

If not, why not use a data type that covers
valid offsets only when passing addresses to bus access functions?

The attribute and memory pcmcia addresses are just stored in these variables, and then the upper pcmcia stack layer calls ioremap on these addresses. Thus, you need the 36 bit I/O address patch, as well as the tiny pcmcia patch.

Quoted 4 lines

The pcmcia I/O address is ioremapped at the socket driver level. If that was the case with the mem and attribute addresses, I wouldn't need this 64 bit pcmcia patch. But since it's the upper pcmcia layer that ioremaps these addresses, I need to store tham in 64 bit types.

OK, but then phys_t should be used for ioaddr_t universally, shouldn't
it? Any architecture can have the controller seen in a 64-bit memory space, after all.

Maciej

author
#5 lore raw
Quoted 6 lines · Maciej W. Rozycki
Quoted 3 lines · Pete Popov
Quoted 2 lines

If not, why not use a data type that covers
valid offsets only when passing addresses to bus access functions?

Quoted 8 lines
Quoted 3 lines

The attribute and memory pcmcia addresses are just stored in these variables, and then the upper pcmcia stack layer calls ioremap on these addresses. Thus, you need the 36 bit I/O address patch, as well as the tiny pcmcia patch.

The pcmcia I/O address is ioremapped at the socket driver level. If that was the case with the mem and attribute addresses, I wouldn't need this 64 bit pcmcia patch. But since it's the upper pcmcia layer that ioremaps these addresses, I need to store tham in 64 bit types.

OK, but then phys_t should be used for ioaddr_t universally, shouldn't
it? Any architecture can have the controller seen in a 64-bit memory space, after all.

Perhaps, but when I tried that in 2.4, I got rejected. Matt had an idea that works for both, mips and ppc, since the 36 bit fixup_bigphys_addr routine is very similar. I think I'll pursue that instead, since we already have that routine as part of the pci address support. Thus, I won't have to make pcmcia changes to common files, and no more 64bit_pcmcia.patch hanging around in my directory.

Pete