From patchwork Fri Jun 30 15:39:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 782901 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wzghf1Wr0z9sNS for ; Sat, 1 Jul 2017 01:40:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Qi77BMPO"; dkim-atps=neutral Received: from localhost ([::1]:44966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQy1m-0004Lf-E2 for incoming@patchwork.ozlabs.org; Fri, 30 Jun 2017 11:40:14 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=xAfF1XlVMBsQB/aAXtb/6W0AE5b0zU4YmKM1OpMcgBY=; b=Qi77BMPOhoCr1CCycd1sAuGXAUGR7xnxVdLHENIrTfD+QdmZD4p9NOtUZTDwCLC6wQ QaYMl9m1Vzw2+ipOGtP0WRkxADG9MkWgQNxvcSM+Q63GLayWPyrHlWJz1DyCygTsjym6 57Bn4QM0zJkMSPrYVyDiTWiawZ+5sKtyX7L7vGnZnitCpkn8hb/16IIxhnbkXKqacb0F 34cresr+h+8IHMD2Psi+asQYbBR64RaYOZIESL/qPZXjKXz+7SQeudipbxwVbs8HCCkw 03KJ/aVLWKaAh7WYsCZVlW6VWCck9AYhdK/qZNaYJvECOg8aiEwx+XbQKXCxtDxBY6M4 9FXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=xAfF1XlVMBsQB/aAXtb/6W0AE5b0zU4YmKM1OpMcgBY=; b=Rd6ho1Q9Z+mEcGD0TKAW8teltmOVvD3b+pLOc7dethccfxnsMwbB5QAQpgn5OOzEfJ KhnUceWeoG6/TyU+LFksBbw87TpZ8cRlFRZH4Js+t1Dq/bXM4pyWRumuU+OfV2EoDJ4S FLHzXaMRQpB6xX8jZo/jYEaI2Fwijv+D42QRlIwbM1jCp8VaQfbF7WrmHNJQruWwjyQK aMqHYcmIgXOfpnz5kebgMPhBAGJLKwR2V4DjOHCNxYmgIw6nD9+/wYa/6EhV/vwosDlx dgO85D+yU4ptGgQSHsDyvd+PPY0Ble9LoEcF48wndrfsEtmrxZCmdGABU+ckSk29u7H6 QZfg== X-Gm-Message-State: AKS2vOzz/fyjG/UW46srQMMALiyGmoUb4+9ShxsV4O8jVY2Iw1k9HHB3 PbU5gKhl+znuWQ== X-Received: by 10.129.138.134 with SMTP id a128mr16661429ywg.287.1498837188580; Fri, 30 Jun 2017 08:39:48 -0700 (PDT) Received: from localhost.localdomain (c-73-207-178-95.hsd1.ga.comcast.net. [73.207.178.95]) by smtp.gmail.com with ESMTPSA id n16sm1684841ywh.14.2017.06.30.08.39.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jun 2017 08:39:47 -0700 (PDT) From: Pranith Kumar To: Richard Henderson , "Emilio G. Cota" , qemu-devel@nongnu.org (open list:All patches CC here) Date: Fri, 30 Jun 2017 11:39:46 -0400 Message-Id: <20170630153946.11997-1-bobby.prani@gmail.com> X-Mailer: git-send-email 2.13.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::243 Subject: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Tested-by: Emilio G. Cota Reviewed-by: Emilio G. Cota --- 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