svn commit: r368329 - head/stand/kshim

Hans Petter Selasky hps at selasky.org
Fri Dec 4 16:47:34 UTC 2020


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


More information about the svn-src-head mailing list