[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeZic8KTj5x-OFMojWB2jn4tMq9eKSWm_MeJoaO5FQOGg@mail.gmail.com>
Date:   Mon, 7 Aug 2023 18:24:59 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Tom Lendacky <thomas.lendacky@....com>,
        Andrew Cooper <andrew.cooper3@...rix.com>,
        Arjan van de Ven <arjan@...ux.intel.com>,
        Huang Rui <ray.huang@....com>, Juergen Gross <jgross@...e.com>,
        Dimitri Sivanich <dimitri.sivanich@....com>,
        Michael Kelley <mikelley@...rosoft.com>,
        Sohil Mehta <sohil.mehta@...el.com>,
        K Prateek Nayak <kprateek.nayak@....com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Zhang Rui <rui.zhang@...el.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Feng Tang <feng.tang@...el.com>,
        Andy Shevchenko <andy@...radead.org>
Subject: Re: [patch 05/53] x86/apic: Get rid of get_physical_broadcast()
On Mon, Aug 7, 2023 at 4:52 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> There is no point for this function. The only case where this is used when
used is when
> there is no XAPIC available, which means the broadcast address is 0xF.
...
> +               if (mpc_ioapic_id(ioapic_idx) >= broadcast_id) {
> +                       pr_err("BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n",
Wouldn't it be better to switch to FW_BUG instead of the "BIOS bug,  " thingy?
Same for other similar cases.
> +                              ioapic_idx, mpc_ioapic_id(ioapic_idx));
> +                       pr_err("... fixing up to %d. (tell your hw vendor)\n", reg_00.bits.ID);
>                         ioapics[ioapic_idx].mp_config.apicid = reg_00.bits.ID;
>                 }
...
> -       if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
> -           !APIC_XAPIC(boot_cpu_apic_version))
> +       if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && !APIC_XAPIC(boot_cpu_apic_version))
>                 return io_apic_get_unique_id(idx, id);
>         else
You can also kill the redundant 'else'.
>                 return id;
-- 
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists