Revision f0ad8c34 target-ppc/translate_init.c

b/target-ppc/translate_init.c
10047 10047
    return 0;
10048 10048
}
10049 10049

  
10050
static bool ppc_cpu_usable(const ppc_def_t *def)
10051
{
10052
#if defined(TARGET_PPCEMB)
10053
    /* When using the ppcemb target, we only support 440 style cores */
10054
    if (def->mmu_model != POWERPC_MMU_BOOKE) {
10055
        return false;
10056
    }
10057
#endif
10058

  
10059
    return true;
10060
}
10061

  
10050 10062
const ppc_def_t *ppc_find_by_pvr(uint32_t pvr)
10051 10063
{
10052 10064
    int i;
10053 10065

  
10054 10066
    for (i = 0; i < ARRAY_SIZE(ppc_defs); i++) {
10067
        if (!ppc_cpu_usable(&ppc_defs[i])) {
10068
            continue;
10069
        }
10070

  
10055 10071
        /* If we have an exact match, we're done */
10056 10072
        if (pvr == ppc_defs[i].pvr) {
10057 10073
            return &ppc_defs[i];
......
10091 10107
    ret = NULL;
10092 10108
    max = ARRAY_SIZE(ppc_defs);
10093 10109
    for (i = 0; i < max; i++) {
10110
        if (!ppc_cpu_usable(&ppc_defs[i])) {
10111
            continue;
10112
        }
10113

  
10094 10114
        if (strcasecmp(name, ppc_defs[i].name) == 0) {
10095 10115
            ret = &ppc_defs[i];
10096 10116
            break;
......
10106 10126

  
10107 10127
    max = ARRAY_SIZE(ppc_defs);
10108 10128
    for (i = 0; i < max; i++) {
10129
        if (!ppc_cpu_usable(&ppc_defs[i])) {
10130
            continue;
10131
        }
10132

  
10109 10133
        (*cpu_fprintf)(f, "PowerPC %-16s PVR %08x\n",
10110 10134
                       ppc_defs[i].name, ppc_defs[i].pvr);
10111 10135
    }

Also available in: Unified diff