[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5dfc62d1-5778-ed94-3f3e-54e12ee5e4e6@csail.mit.edu>
Date: Tue, 31 May 2022 14:51:53 +0200
From: "Srivatsa S. Bhat" <srivatsa@...il.mit.edu>
To: Peter Zijlstra <peterz@...radead.org>,
Shreenidhi Shedi <yesshedi@...il.com>
Cc: amakhalov@...are.com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
virtualization@...ts.linux-foundation.org, pv-drivers@...are.com,
x86@...nel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Shreenidhi Shedi <sshedi@...are.com>
Subject: Re: [PATCH v3] x86/vmware: use unsigned integer for shifting
On 5/28/22 6:52 AM, Peter Zijlstra wrote:
> On Fri, May 27, 2022 at 11:27:37PM +0530, Shreenidhi Shedi wrote:
>> From: Shreenidhi Shedi <sshedi@...are.com>
>>
>> Shifting signed 32-bit value by 31 bits is implementation-defined
>> behaviour. Using unsigned is better option for this.
>
> The kernel builds with -fno-strict-overflow and as such this behaviour
> is well defined.
>
Ah, I see. Thank you, Peter!
>> Fixes: 4cca6ea04d31 ("x86/apic: Allow x2apic without IR on VMware platform")
>
> Nothing broken, therefore nothing fixed.
>
Agreed.
I think using the BIT() macro still provides a nice readability
improvement. So, Shreenidhi, could you spin a new version of the patch
with the same code changes but with a different commit message about
using the BIT() macro to simplify the code, and also include a
clarification as to why the existing code is correct (which Peter
pointed out), please?
Thank you!
Regards,
Srivatsa
VMware Photon OS
Powered by blists - more mailing lists