64-bit support..what happened?
I am trying to integrate a recent version of MTD from CVS with Linux 2.4.19 in order to gain 64-bit support. However there appears to be several things wrong which indicates that this does not work.
1. The conditional CONFIG_CFI_64 is defined within cfi.h. However not all the source modules that use this conditional include the proper header file. (all the source modules under drivers/mtd/maps)
2. drivers/mtd/maps/physmap.c - attempts to reference __raw_readll() and __raw_writell() when in 64-bit mode. These functions/macros do not exist. They would appear in include/asm/io.h. Nothing exists in the MTD tree to patch this file or otherwise provide these functions.
Any ideas where I can get the 64-bit implementation?
THX
Quoted 3 lines · [email protected] said:
1. The conditional
CONFIG_CFI_64is defined withincfi.h. However not
all the source modules that use this conditional include the proper header file. (all the source modules underdrivers/mtd/maps)
You presumably only need to include it for the map drivers on those platforms which can actually support 64-bit operation. So that's not necessarily a problem.
Quoted 4 lines
2.
drivers/mtd/maps/physmap.c- attempts to reference__raw_readll()and__raw_writell()when in 64-bit mode. These functions/macros do not exist. They would appear ininclude/asm/io.h. Nothing exists in the MTD tree to patch this file or otherwise provide these functions.
Correct. Again, this is platform-specific and you need to provide it. Some people have to play tricks with transferring all 64 bits into a FP register and storing form there, etc. It's probably best to take the stuff in physmap.c as merely an example, and provide your own map driver.
--
dwmw2
Quoted 11 lines
Quoted 4 lines
2.
drivers/mtd/maps/physmap.c- attempts to reference__raw_readll()and__raw_writell()when in 64-bit mode. These functions/macros do not exist. They would appear ininclude/asm/io.h. Nothing exists in the MTD tree to patch this file or otherwise provide these functions.Correct. Again, this is platform-specific and you need to provide it. Some
people have to play tricks with transferring all 64 bits into a FP register
and storing form there, etc. It's probably best to take the stuff inphysmap.cas merely an example, and provide your own map driver.
As you mentioned, although my architecture has a 64-bit bus, the only way to perform a 64-bit bus access is through the floating point processor. Do you see any reason why I couldn't just perform 2 32-bit operations?
I will take physmap.c as an example and make our own version. However good sample code would include the proper headers if they reference conditional defines. (slight jab...sorry) I believe that there are 3 files under map that include the conditional compile and none of them include the proper header file. Perhaps this just indicates that the conditional should be moved to another file or change to use the autoconfig defines?
Quoted 4 lines · [email protected] said:
As you mentioned, although my architecture has a 64-bit bus, the only
way to perform a 64-bit bus access is through the floating point processor. Do you see any reason why I couldn't just perform 2 32-bit operations?
Er, I suppose not. Defeats the whole point of interleaving, but I don't see a reason why it shouldn't _work_, offhand, hardware permitting.
Quoted 3 lines
I will take
physmap.cas an example and make our own version. However good sample code would include the proper headers if they reference conditional defines. (slight jab...sorry)
You're right. It looks like the code snippet in physmap.c is in fact a _bad_ example and has been copied into two new map files.
Quoted 4 lines
I believe that there are 3 files under map that include the conditional compile and none of them include the proper header file. Perhaps this just indicates that the conditional should be moved to another file or change to use the autoconfig defines?
I'm inclined to suggest that it should be removed from all three offending map files and a new example for 64-bit operation be added; physmap64.c. And you should only be able to enable physmap64.c in the config if you've enabled 64-bit operation -- so it shouldn't need any conditionals at all.
Does that sound sane?
--
dwmw2
Quoted 5 lines
Quoted 4 lines
I believe that there are 3 files under map that include the conditional compile and none of them include the proper header file. Perhaps this just indicates that the conditional should be moved to another file or change to use the autoconfig defines?
Quoted 7 lines
I'm inclined to suggest that it should be removed from all three offending map files and a new example for 64-bit operation be added;
physmap64.c. And
you should only be able to enablephysmap64.cin the config if you've enabled 64-bit operation -- so it shouldn't need any conditionals at all.Does that sound sane?
Sounds good and just a Makefile change. Do you want me to do that?
Quoted 1 line · [email protected] said:
Sounds good and just a
Makefilechange. Do you want me to do that?
... and removing the offending #defines and the code they surround from those three map drivers, and adding physmap64.c. Yes please :)
--
dwmw2