Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2020 17:47:22 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Alexander Richardson <arichardson@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org>, Konstantin Belousov <kib@freebsd.org>
Subject:   Re: svn commit: r368329 - head/stand/kshim
Message-ID:  <920898b7-fdae-bfbf-96a1-5988fdebd422@selasky.org>
In-Reply-To: <CANCZdfq7Bz0n9T34G0ds=biTWXjEtCTT_gj7aYhO4Gr-x5kCLw@mail.gmail.com>
References:  <202012041450.0B4EouQ2024632@repo.freebsd.org> <CA%2BZ_v8pwWmPx_b7oj2otpmcA1OZ5GS%2Bytf7ZhaTD0i72sW5jdA@mail.gmail.com> <6f9541e4-b216-8a93-881e-e3859bff84fa@selasky.org> <CANCZdfq7Bz0n9T34G0ds=biTWXjEtCTT_gj7aYhO4Gr-x5kCLw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/4/20 5:31 PM, Warner Losh wrote:
>> Hi Alexander,
>>
>> I'm not sure how that definition will work together with existing code,
>> mixing uint64_t, unsigned long, and unsigned long long. Will this cause
>> more compiler warnings? This also will affect user-space and ports.
>>
> I think for the boot loader context, this suggestion will be completely
> fine. Since this file is only used there, it should be identical to your
> changes in that context.

Hi,

Does this mean that all uintXX_t types should go this way? I like 
symmetry. Or only uint64_t?

The reason for changing this the way I did are expectations in the 
current code. Right now, uint64_t _must_ be defined exactly like 
unsigned long for amd64, else I get silly warnings like this:

sys/compat/linuxkpi/common/include/asm/atomic64.h:140:38: error: 
incompatible
       pointer types passing 'int64_t *' (aka 'long long *') to 
parameter of type 'u_long *'
       (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
                 if (atomic_fcmpset_64(&v->counter, &ret, new))

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?920898b7-fdae-bfbf-96a1-5988fdebd422>