Received: from eggs.gnu.org ([2001:4830:134:3::10]:50978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQy1Q-0004La-HP for qemu-devel@nongnu.org; Fri, 30 Jun 2017 11:39:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQy1N-0002C8-FW for qemu-devel@nongnu.org; Fri, 30 Jun 2017 11:39:52 -0400 Received: from mail-yw0-x243.google.com ([2607:f8b0:4002:c05::243]:35472) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQy1N-0002Bt-Bu for qemu-devel@nongnu.org; Fri, 30 Jun 2017 11:39:49 -0400 Received: by mail-yw0-x243.google.com with SMTP id z21so6787702ywz.2 for ; Fri, 30 Jun 2017 08:39:49 -0700 (PDT) From: Pranith Kumar Date: Fri, 30 Jun 2017 11:39:46 -0400 Message-Id: <20170630153946.11997-1-bobby.prani@gmail.com> Subject: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , "Emilio G. Cota" , "open list:All patches CC here" Clang generates the following warning on aarch64 host: CC util/cacheinfo.o /home/pranith/qemu/util/cacheinfo.c:121:48: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] asm volatile("mrs\t%0, ctr_el0" : "=r"(ctr)); ^ /home/pranith/qemu/util/cacheinfo.c:121:28: note: use constraint modifier "w" asm volatile("mrs\t%0, ctr_el0" : "=r"(ctr)); ^~ %w0 Constraint modifier 'w' is not (yet?) accepted by gcc. Fix this by increasing the ctr size. Signed-off-by: Pranith Kumar --- util/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cacheinfo.c b/util/cacheinfo.c index f987522df4..6253049533 100644 --- a/util/cacheinfo.c +++ b/util/cacheinfo.c @@ -112,7 +112,7 @@ static void sys_cache_info(int *isize, int *dsize) static void arch_cache_info(int *isize, int *dsize) { if (*isize == 0 || *dsize == 0) { - unsigned ctr; + unsigned long ctr; /* The real cache geometry is in CCSIDR_EL1/CLIDR_EL1/CSSELR_EL1, but (at least under Linux) these are marked protected by the -- 2.13.0