[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/23] lib: move 64-bit div/mod compiler helpers



On 06.04.2021 21:34, Julien Grall wrote:
> Hi Jan,
> 
> On 01/04/2021 16:23, Jan Beulich wrote:
>> On 01.04.2021 16:56, Julien Grall wrote:
>>> On 01/04/2021 11:19, Jan Beulich wrote:
>>>> --- a/xen/common/lib.c
>>>> +++ b/xen/lib/divmod.c
>>>> @@ -40,7 +40,6 @@
>>>>     * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
>>>> OF
>>>>     * SUCH DAMAGE.
>>>>     */
>>>> -#if BITS_PER_LONG == 32
>>>
>>> In theory BITS_PER_LONG == 32 is not quite the same as 32-bit arch. Can
>>> you clarify whether this code is necessary on 64-bit arch where long is
>>> only 32-bit.
>>
>> Likely the compiler can get away without invoking these helpers, so
>> the code would remain unused. I'm uncertain whether CONFIG_64BIT
>> ought to be set for such an architecture, as we assume sizeof(long)
>> == sizeof(void*), and hence pointers would then need to be 32-bit
>> as well there.
> 
> This is a fair point. Would you mind to add a sentence explaining that 
> in the commit message?

I've added

"Note that we imply "32-bit arch" to be the same as BITS_PER_LONG == 32,
 i.e. we aren't (not just here) prepared to have a 64-bit arch with
 BITS_PER_LONG == 32. Yet even if we supported such, likely the compiler
 would get away there without invoking these helpers, so the code would
 remain unused in practice."

> With that:
> 
> Acked-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks. Any chance to also get an ack on patch 1, so at least these two
(or three, seeing that you also did ack patch 3) could go in before my
re-posting of the series to add the one line commit message additions
that you did ask for on all the str* and mem* patches? (Alternatively I
could take the time and re-order the two.)

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.