From nobody Wed Feb 11 05:11:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523837275148608.5091917509791; Sun, 15 Apr 2018 17:07:55 -0700 (PDT) Received: from localhost ([::1]:53055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7rgT-0007iZ-Ey for importer@patchew.org; Sun, 15 Apr 2018 20:07:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7rJy-0005Pl-3z for qemu-devel@nongnu.org; Sun, 15 Apr 2018 19:44:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f7rJv-0000wv-2C for qemu-devel@nongnu.org; Sun, 15 Apr 2018 19:44:34 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:46042) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f7rJr-0000t2-TA; Sun, 15 Apr 2018 19:44:27 -0400 Received: by mail-qk0-x244.google.com with SMTP id f9so6881060qkm.12; Sun, 15 Apr 2018 16:44:27 -0700 (PDT) Received: from x1.local ([138.117.48.212]) by smtp.gmail.com with ESMTPSA id d1sm1081394qtk.57.2018.04.15.16.44.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Apr 2018 16:44:26 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=wHXkPGIa530WojrbOFi9Lqpqs6254CPKzcjs2oxJZM4=; b=iJ9U2oQs69H7xrq90d8Iny6n+BPP6bHxNLSvXX6Qa0XLiTAswhgXQQ7uXYEaEg6Qci LBm9wpM2CIBea3mQYvPzZZtRUTA4na5GgNoHJw8Vn70A57zMxqTgJDB4ey9BMefA/c6F Jzhx6uydvIgp4GuUkw7ADWoaGg1OULah/kyz0XTJOt4ydM1rqjl4H+yKPoTtU8m9wjmM qvIkjM15yZ+he3+RHYKAyft+eWDPt0FO6Mkne0ZK9oZOX32+ZkCZRmIVLV2wOlxscgsc A7AwVr1FKUJwLNLhIG4QgJinzAeQqQ7LYX6mAUo5AvGh9O5vmZ/a1C3W7WBHSG4fVEu5 aEUg== 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 :in-reply-to:references:mime-version:content-transfer-encoding; bh=wHXkPGIa530WojrbOFi9Lqpqs6254CPKzcjs2oxJZM4=; b=QlwiCB/uolSCzXz4dgj5lQ4sGB4fssL75nVnFkIAZq4xusUkFPo5y4NVaZ9ekmdX9K Dsf2OpiojwIKdEHWz2A6xZ384E61Z7hlJlMk1zk+xBw/daEw58456twOrc52HLTMBsk8 5tZC6XLPg/R0iII6rc7jHsOJnEwWw+/Iy888elrQYUiHwL67q6TQ9zCGFEw2K9PP474F UqCYSwv5XSZvWBaGDNyGirM30QKjsEoSAfcYtJ0EnV+TfeKqpnKnWDd7P0qNCzJpQNrI vS/yhjJldHp/6+H7z4hhogsICW9SJGaZCupkVSdJUJ7n0yldG2deBFSHjiEbI7N20uX0 GXSg== X-Gm-Message-State: ALQs6tDMShty9Ikm1EEZ867+8rqJqTS5skF08HqyRngAHRex8mNP/rU/ R6E5HWRLS/mZ3yxWWvliQC4DLoem X-Google-Smtp-Source: AIpwx48ztyEZtiUWYw9dZpdR3RItGDUiXnPbOYbi7NdcTW0xQxlm2HrPS1Q5rfmZs0P4Kv3yMSZLDA== X-Received: by 10.55.132.132 with SMTP id g126mr14774771qkd.108.1523835867239; Sun, 15 Apr 2018 16:44:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org, Thomas Huth Date: Sun, 15 Apr 2018 20:42:48 -0300 Message-Id: <20180415234307.28132-23-f4bug@amsat.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180415234307.28132-1-f4bug@amsat.org> References: <20180415234307.28132-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::244 Subject: [Qemu-devel] [PATCH v3 22/41] hw/alpha: Use the BYTE-based definitions 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: , Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/alpha/typhoon.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index 6a40869488..85fe072063 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -7,6 +7,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/units.h" #include "qapi/error.h" #include "cpu.h" #include "hw/hw.h" @@ -812,8 +813,6 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_= bus, qemu_irq *p_rtc_irq, AlphaCPU *cpus[4], pci_map_irq_fn sys_map_irq) { - const uint64_t MB =3D 1024 * 1024; - const uint64_t GB =3D 1024 * MB; MemoryRegion *addr_space =3D get_system_memory(); DeviceState *dev; TyphoonState *s; @@ -854,30 +853,30 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **is= a_bus, =20 /* Pchip0 CSRs, 0x801.8000.0000, 256MB. */ memory_region_init_io(&s->pchip.region, OBJECT(s), &pchip_ops, s, "pch= ip0", - 256*MB); + 256 * M_BYTE); memory_region_add_subregion(addr_space, 0x80180000000ULL, &s->pchip.region); =20 /* Cchip CSRs, 0x801.A000.0000, 256MB. */ memory_region_init_io(&s->cchip.region, OBJECT(s), &cchip_ops, s, "cch= ip0", - 256*MB); + 256 * M_BYTE); memory_region_add_subregion(addr_space, 0x801a0000000ULL, &s->cchip.region); =20 /* Dchip CSRs, 0x801.B000.0000, 256MB. */ memory_region_init_io(&s->dchip_region, OBJECT(s), &dchip_ops, s, "dch= ip0", - 256*MB); + 256 * M_BYTE); memory_region_add_subregion(addr_space, 0x801b0000000ULL, &s->dchip_region); =20 /* Pchip0 PCI memory, 0x800.0000.0000, 4GB. */ - memory_region_init(&s->pchip.reg_mem, OBJECT(s), "pci0-mem", 4*GB); + memory_region_init(&s->pchip.reg_mem, OBJECT(s), "pci0-mem", 4 * G_BYT= E); memory_region_add_subregion(addr_space, 0x80000000000ULL, &s->pchip.reg_mem); =20 /* Pchip0 PCI I/O, 0x801.FC00.0000, 32MB. */ memory_region_init_io(&s->pchip.reg_io, OBJECT(s), &alpha_pci_ignore_o= ps, - NULL, "pci0-io", 32*MB); + NULL, "pci0-io", 32 * M_BYTE); memory_region_add_subregion(addr_space, 0x801fc000000ULL, &s->pchip.reg_io); =20 @@ -898,13 +897,13 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **is= a_bus, =20 /* Pchip0 PCI special/interrupt acknowledge, 0x801.F800.0000, 64MB. */ memory_region_init_io(&s->pchip.reg_iack, OBJECT(s), &alpha_pci_iack_o= ps, - b, "pci0-iack", 64*MB); + b, "pci0-iack", 64 * M_BYTE); memory_region_add_subregion(addr_space, 0x801f8000000ULL, &s->pchip.reg_iack); =20 /* Pchip0 PCI configuration, 0x801.FE00.0000, 16MB. */ memory_region_init_io(&s->pchip.reg_conf, OBJECT(s), &alpha_pci_conf1_= ops, - b, "pci0-conf", 16*MB); + b, "pci0-conf", 16 * M_BYTE); memory_region_add_subregion(addr_space, 0x801fe000000ULL, &s->pchip.reg_conf); =20 --=20 2.17.0