> > With the help from Kevin Kissell, I've found out that the compilation > > directives "set .mips3[4]" were turned on before cpu_probe() and cpu_probe > > () functions in my head.S file. This is the reason why I've got that wrong > > code generated although I've specified mip1 in the gcc options. > > > > I 've temporarily used #define to add "set .mips1" in the code to fix the > > problem. My question now, is: how can we make the kernel code flexible > > to free from the problem of the one that I've got? > > 1. Don't use "set .mips*" unless absolutely needed. The right ISA level > is already set via a compiler option depending on the host CPU selected > upon kernel configuration. Lisa's underlying problem may be that there isn't a Config option for the R39xx CPUs, and she's ended up getting an R4000 (or whatever) configuration by default. At some point specific support for the R3900 features (MIPS II ISA, seperate hardware interrupt vector, etc.) should go into the kernel, but for the moment, you should make sure that when you do the initial "make config" (or xconfig or menuconfig or whatever) you select an R3000 CPU. You won't get it by default. You may also need to hack the head.S code to detect an R39xx PrID value and replace it with an R3000 value before it gets used by the kernel. Otherwise, you may need to generate additional cases/conditionals for R3900 wherever you see R3000 called out in the existing code. If your kernel base has my cpu_probe() in C, adding R39xx support will be much easier, but while I *think* I set it up such that, if the R4K_EXCEPTION_MODEL option bit isn't set, the kernel assumes an R3K model, I never tested that option - not having any R3xxx platforms in the lab! Kevin K.