[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5hhsspm.ffs@tglx>
Date: Mon, 12 Aug 2024 16:48:05 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Yuntao Wang <yuntao.wang@...ux.dev>, linux-kernel@...r.kernel.org,
x86@...nel.org
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave
Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, Thorsten Blum
<thorsten.blum@...lux.com>, Tony Luck <tony.luck@...el.com>, Daniel
Sneddon <daniel.sneddon@...ux.intel.com>, Yuntao Wang
<yuntao.wang@...ux.dev>
Subject: Re: [PATCH] x86/apic: Fix the issues in x2apic_disable()
On Mon, Aug 12 2024 at 18:08, Yuntao Wang wrote:
> static __init void x2apic_disable(void)
> {
> - u32 x2apic_id, state = x2apic_state;
> + u32 x2apic_id;
>
> - x2apic_mode = 0;
> - x2apic_state = X2APIC_DISABLED;
> -
> - if (state != X2APIC_ON)
> - return;
> + if (x2apic_state < X2APIC_ON)
> + goto out;
There is no point in overwriting the state in case it is < ON, no?
Thanks,
tglx
Powered by blists - more mailing lists