From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1588094930; cv=none; d=zohomail.com; s=zohoarc; b=axMhI+4loj/JXKVFL1xRoJ3f0Ivbr6sM86YbvODi/pfA1rJcZNxoQY9TAKwTRrFFkK8I9RrR9jYP0aNvQ5gjxTsklUw1/EmVhy6shRAxViA7SFr84PpUs67GfMKMYjF2b2h//BtjBWjKMDZ7SSFjklcRUBSPLgUCuXbU3OQAXrg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588094930; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=xj9mbELBxmDJv8s9rOOYS9YWnqmysEZNeFuMvyIIlyA=; b=j4thD5UY+RQ2HPqxfAq1XJQao1y6muvdGF1BBHWpnqODOfsxDjUe6KfwRtDdJDTtrTTQ2kd6pdeZSjApIsrhRr7VAJLkKR7ZePiVQ4fC1DiJ9/E0xi9cWbEWJ6OYpMEzs0k/ZyV7ba4lUSxhZGYMlQlqh+6e94y+ARoK62Eojzs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158809493032830.714670469167572; Tue, 28 Apr 2020 10:28:50 -0700 (PDT) Received: from localhost ([::1]:41256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTU2K-0004jm-Mz for importer@patchew.org; Tue, 28 Apr 2020 13:28:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41410) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTU0y-00036E-8T for qemu-devel@nongnu.org; Tue, 28 Apr 2020 13:27:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTU0F-0006ve-Fv for qemu-devel@nongnu.org; Tue, 28 Apr 2020 13:27:24 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:41365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTU0F-0006vK-3Q; Tue, 28 Apr 2020 13:26:39 -0400 Received: by mail-wr1-x443.google.com with SMTP id g13so25618199wrb.8; Tue, 28 Apr 2020 10:26:38 -0700 (PDT) Received: from x1w.redhat.com (137.red-88-21-205.staticip.rima-tde.net. [88.21.205.137]) by smtp.gmail.com with ESMTPSA id w6sm27132286wrm.86.2020.04.28.10.26.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 10:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xj9mbELBxmDJv8s9rOOYS9YWnqmysEZNeFuMvyIIlyA=; b=Kzkdl6ZotuJuQRi9dX0Gl+v1Qt0Rrwc/vwPNM7kYUWRImgpXPnYJW7Jrw87F+YYr1J c68jfMCbFNtTJ/1hsZv0drxDIyjrxQ014XUg7ipvyaKgWB7Vuxo3cJyKdpAguzRZP9E+ 9wRKj24gb2AyvHGkBlj0vdbZvthc41UhN1gIst9GnUrQagUNqZkHNcZtiRAJX3j5WEj3 Pr0b2x3HT1TFmAKTFqqEBFwQNLaNHyxau23MTPaU9WvEx+88E6sNdvqoZceAjh5vMZ7b Fq3PX6q1jJabTzHHWM+Jo1gcY4avryYTOQRTg9gC4qNAhkZkaAUMPSrK4U0nJCYb1BCo 4ygQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=xj9mbELBxmDJv8s9rOOYS9YWnqmysEZNeFuMvyIIlyA=; b=ITPzEspDVtPcuaOcNhcMd0f3nAWDDUNj+9muNz8PlZwzL81iFLqWLWWhYa/qi0jFwD TrF8jMrm3kJcGg92MeFPd1McZ2G8xwQ8sEtjBiGhcplXpAJUyxqoZeGimh2i6xFgo2Kh Swli3BvPtwsDXpD5IN6uTahSF+A39iSNKpstboweuSEZ0t+H817wxYUcFXcxRsKc3XU9 ymygH+3HQU1k9Ar7QJhikXaSUAIWmLv+9fhVcIfWwqYC2r785ue0jHODHGRPL6HU/rB/ MeiFh2a6BiQL/WqyEy3FdXDvBMmY6cJp3rUT0+5yQU6sFci2B/ERzRiOFsI3O3fyyr8i zFGw== X-Gm-Message-State: AGi0PubY8uUAv3hynISh5Edg9xzIq10xHf8rTORd3W/zYwW1y6f+JhOY BmwwEmCA5B3Gx0Ms4gm9wx9GDFO9WFw= X-Google-Smtp-Source: APiQypL47sLmxJRilvt7J9SQ036wwpQ0Wh7mkdbsCW45ZpWGBbrNTFllZpiG1bY0BIjdP+QeNzOvRg== X-Received: by 2002:adf:f1c6:: with SMTP id z6mr27383600wro.361.1588094796438; Tue, 28 Apr 2020 10:26:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1 Date: Tue, 28 Apr 2020 19:26:34 +0200 Message-Id: <20200428172634.29707-1-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::443 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Desnogues , Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) MIDR_EL1 a 64-bit system register with the top 32-bit being RES0. This fixes when compiling with -Werror=3Dconversion: target/arm/cpu64.c: In function =E2=80=98aarch64_max_initfn=E2=80=99: target/arm/cpu64.c:628:21: error: conversion from =E2=80=98uint64_t=E2=80= =99 {aka =E2=80=98long unsigned int=E2=80=99} to =E2=80=98uint32_t=E2=80=99= {aka =E2=80=98unsigned int=E2=80=99} may change value [-Werror=3Dconversio= n] 628 | cpu->midr =3D t; | ^ Suggested-by: Laurent Desnogues Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Desnogues --- Since v2: Do not use RESERVED bits. Since v1: Follow Laurent and Peter suggestion. --- target/arm/cpu.h | 2 +- target/arm/cpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 8b9f2961ba..592fb217d6 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -894,7 +894,7 @@ struct ARMCPU { uint64_t id_aa64dfr0; uint64_t id_aa64dfr1; } isar; - uint32_t midr; + uint64_t midr; uint32_t revidr; uint32_t reset_fpsid; uint32_t ctr; diff --git a/target/arm/cpu.c b/target/arm/cpu.c index a79f233b17..7ff80894b6 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2757,7 +2757,7 @@ static const ARMCPUInfo arm_cpus[] =3D { static Property arm_cpu_properties[] =3D { DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false= ), DEFINE_PROP_UINT32("psci-conduit", ARMCPU, psci_conduit, 0), - DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0), + DEFINE_PROP_UINT64("midr", ARMCPU, midr, 0), DEFINE_PROP_UINT64("mp-affinity", ARMCPU, mp_affinity, ARM64_AFFINITY_INVALID), DEFINE_PROP_INT32("node-id", ARMCPU, node_id, CPU_UNSET_NUMA_NODE_ID), --=20 2.21.1