On 21.05.14 08:20, Alexey Kardashevskiy wrote:
This moves SPR initialization to helper functions.
Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru>
I like the idea, but please refactor all book3s CPUs, not just POWER7.
I also think we can cover a lot of the SPR registration by matching on
feature fields. VR for example is coupled to Altivec.
Maybe we could also introduce an enum for the exact cpu type, similar to
how we do it on e500? Then we could do fun things like
if (cpu_type >= CPU_TYPE_970) {
gen_spr_book3s_vr(env);
}
if (cpu_type >= CPU_TYPE_POWER7) {
gen_spr_lpar(env);
}
switch (cpu_type) {
case CPU_TYPE_POWER7:
env->slb_nr = 32;
break;
default:
env->slb_nr = 64;
break;
}
and thus combine all those book3s init functions into a single, more
maintainable version.
Alex