[ppc64] cputable cleanup, from Dave Engebretsen: Formatting cleanup, fix for firmware_features init, use cpu_features to display processor names. --- arch/ppc64/kernel/chrp_setup.c | 33 ++++++++++++++++++--------------- arch/ppc64/kernel/setup.c | 40 +++++++++------------------------------- 2 files changed, 27 insertions(+), 46 deletions(-) diff -puN arch/ppc64/kernel/chrp_setup.c~ppc64-cputable_2 arch/ppc64/kernel/chrp_setup.c --- 25/arch/ppc64/kernel/chrp_setup.c~ppc64-cputable_2 2004-01-13 23:22:36.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/chrp_setup.c 2004-01-13 23:22:36.000000000 -0800 @@ -281,24 +281,27 @@ chrp_init(unsigned long r3, unsigned lon cur_cpu_spec->firmware_features = 0; hypertas = get_property(dn, "ibm,hypertas-functions", &len); if (hypertas) { - while (len > 0){ - int i, hypertas_len; - /* check value against table of strings */ - for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) { - if ((firmware_features_table[i].name) && (strcmp(firmware_features_table[i].name,hypertas))==0) { - /* we have a match */ - cur_cpu_spec->firmware_features |= (1UL << firmware_features_table[i].val); - break; - } + while (len > 0){ + int i, hypertas_len; + /* check value against table of strings */ + for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) { + if ((firmware_features_table[i].name) && + (strcmp(firmware_features_table[i].name,hypertas))==0) { + /* we have a match */ + cur_cpu_spec->firmware_features |= + (firmware_features_table[i].val); + break; + } + } + hypertas_len = strlen(hypertas); + len -= hypertas_len +1; + hypertas+= hypertas_len +1; } - hypertas_len = strlen(hypertas); - len -= hypertas_len +1; - hypertas+= hypertas_len +1; - } } + of_node_put(dn); - udbg_printf("firmware_features bitmask: 0x%x \n", - cur_cpu_spec->firmware_features); + printk(KERN_INFO "firmware_features = 0x%lx\n", + cur_cpu_spec->firmware_features); } void diff -puN arch/ppc64/kernel/setup.c~ppc64-cputable_2 arch/ppc64/kernel/setup.c --- 25/arch/ppc64/kernel/setup.c~ppc64-cputable_2 2004-01-13 23:22:36.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/setup.c 2004-01-13 23:22:36.000000000 -0800 @@ -137,7 +137,7 @@ void __init disable_early_printk(void) } /* - * Do some initial setup of the system. The paramters are those which + * Do some initial setup of the system. The parameters are those which * were passed in from the bootloader. */ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5, @@ -277,35 +277,12 @@ static int show_cpuinfo(struct seq_file seq_printf(m, "processor\t: %lu\n", cpu_id); seq_printf(m, "cpu\t\t: "); - switch (PVR_VER(pvr)) { - case PV_NORTHSTAR: - seq_printf(m, "RS64-II (northstar)\n"); - break; - case PV_PULSAR: - seq_printf(m, "RS64-III (pulsar)\n"); - break; - case PV_POWER4: - seq_printf(m, "POWER4 (gp)\n"); - break; - case PV_ICESTAR: - seq_printf(m, "RS64-III (icestar)\n"); - break; - case PV_SSTAR: - seq_printf(m, "RS64-IV (sstar)\n"); - break; - case PV_POWER4p: - seq_printf(m, "POWER4+ (gq)\n"); - break; - case PV_630: - seq_printf(m, "POWER3 (630)\n"); - break; - case PV_630p: - seq_printf(m, "POWER3 (630+)\n"); - break; - default: - seq_printf(m, "Unknown (%08x)\n", pvr); - break; - } + if (cur_cpu_spec->pvr_mask) + seq_printf(m, "%s", cur_cpu_spec->cpu_name); + else + seq_printf(m, "unknown (%08x)", pvr); + + seq_printf(m, "\n"); /* * Assume here that all clock rates are the same in a @@ -354,7 +331,8 @@ struct seq_operations cpuinfo_op = { }; /* - * Fetch the cmd_line from open firmware. */ + * Fetch the cmd_line from open firmware. + */ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { _