On Wed, Mar 12, 2014 at 03:51:35PM +0800, Chen Fan wrote:
[...]
>      if (compat_apic_id_mode) {
> -        if (cpu_index != correct_id && !warned) {
> +        if (cpu_index != correct_id && !compat_apic_id_warned) {
>              error_report("APIC IDs set in compatibility mode, "
>                           "CPU topology won't match the configuration");
> -            warned = true;
> +            compat_apic_id_warned = true;
[...]
> +    if (compat_apic_id_mode) {
> +        correct_apic_id = apicid_from_topo_ids(smp_cores,
> +                                               smp_threads,
> +                                               topo);
> +        if (cpu_index != correct_apic_id && !compat_apic_id_warned) {
> +            error_report("APIC IDs set in compatibility mode, "
> +                         "CPU topology won't match the configuration");
> +            compat_apic_id_warned = true;

The new logic makes sense, but please don't duplicate code.

-- 
Eduardo

Reply via email to