Re: [PATCH] x86/apic: Fix the issues in x2apic_disable()
From: Thomas Gleixner
Date: Mon Aug 12 2024 - 14:00:56 EST
On Mon, Aug 12 2024 at 23:53, Yuntao Wang wrote:
> On Mon, 12 Aug 2024 16:48:05 +0200, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>> There is no point in overwriting the state in case it is < ON, no?
>
> Are you saying that we should replace 'goto out' with a return statement?
>
> However, when x2apic_disable() is called, it's possible that x2apic_state
> is X2APIC_OFF. In that case, we should set x2apic_state to X2APIC_DISABLED.
What for? It can't be enabled later on and for the rest of the system it
does not matter whether the state is OFF or DISABLED. Either case says:
X2APIC is not enabled.
Thanks,
tglx