From owner-svn-src-all@freebsd.org Fri Dec 4 16:47:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AC144A4D76; Fri, 4 Dec 2020 16:47:34 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cndsy1Whhz3CxP; Fri, 4 Dec 2020 16:47:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 61D0A260726; Fri, 4 Dec 2020 17:47:32 +0100 (CET) Subject: Re: svn commit: r368329 - head/stand/kshim To: Warner Losh Cc: Alexander Richardson , src-committers , svn-src-all , svn-src-head , Konstantin Belousov References: <202012041450.0B4EouQ2024632@repo.freebsd.org> <6f9541e4-b216-8a93-881e-e3859bff84fa@selasky.org> From: Hans Petter Selasky Message-ID: <920898b7-fdae-bfbf-96a1-5988fdebd422@selasky.org> Date: Fri, 4 Dec 2020 17:47:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Cndsy1Whhz3CxP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2020 16:47:34 -0000 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