From patchwork Mon Mar 5 11:27:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10258731 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5EB2760211 for ; Mon, 5 Mar 2018 11:31:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F3C528A0B for ; Mon, 5 Mar 2018 11:31:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4332C28A12; Mon, 5 Mar 2018 11:31:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E2BE28A08 for ; Mon, 5 Mar 2018 11:31:07 +0000 (UTC) Received: from localhost ([::1]:48665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esoKg-0006lJ-8M for patchwork-qemu-devel@patchwork.kernel.org; Mon, 05 Mar 2018 06:31:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esoHk-0003XD-6q for qemu-devel@nongnu.org; Mon, 05 Mar 2018 06:28:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esoHj-00072W-2G for qemu-devel@nongnu.org; Mon, 05 Mar 2018 06:28:04 -0500 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:34522) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esoHg-0006z9-81; Mon, 05 Mar 2018 06:28:00 -0500 Received: by mail-wr0-x244.google.com with SMTP id o8so5353742wra.1; Mon, 05 Mar 2018 03:28:00 -0800 (PST) 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=8859JAFfvgR0CHN9Au1q8ZmVRu+VggFIrlOIOMlt8Tk=; b=qPmFHHAymXIUwf69ZctfL8F33R0sA/3xHTgknVOvSb0cfB//+DlbBHRDGjMc8pDNlo NgK+2j83N9yIUUZT6rInbV78t1b1oSQiRAVn5aagLUuSHyjlOQIjGD+LhF+soYZU+UUk /CPjIuPOMRfig341mInVLRljNjEVw5wZcV98msrVHWfQWo86gZYWyVZvRLlTF8RJFeWt kOaLxHn7HVgdl5WA9RroTE9gbxJwHbhCHYIvP6bEGA7id5aCzjo56IjcrHrdAIh4fRSU PARQwo2rU0KBlHJOpi7NTVSl2y6Xg/D1xvR8IoLK+PcIpMWuYv1zCdz2kcm+yHV7el8j YNLw== 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=8859JAFfvgR0CHN9Au1q8ZmVRu+VggFIrlOIOMlt8Tk=; b=s+/zx8/guYxLHVFv9L7DqJYHIQ7Qb2LPUbGDPJMmOwAGLbRTuYSSUNhyc8pLRTUaJF beebvHb2q4TNQlhI+Vuw6LpZULVuzcBJuJw5ht1YC7KEPmS6JmqFzRSqmN5bLHiWgta0 jENIQD1QaxHXNRuqGOhibybF7SpZbAVP2ZUVWzFvUxej1zATOl2dfHJNVYMcUHrnAx5Y 0h/6lyUOnUxNenRDrbTOeeHKzCNWC/SOQ24K7k3Vp8ZrbHO/Q0x2pnq+gk18v5cfi4Ph yrk7bz/a1ckNtt3YFQIGph/svxFg/y5ElUiRGdgMsZtGSm/8B/7kSRjRq6bEcQVxJqQC X0yA== X-Gm-Message-State: APf1xPC1uEGuKawPaXwYvW7p6sdLbFeJxr1NnP5SDTXbhcOQDSWQPuTR rF7q8FXdjUPJA9ow22+jsP8lZHUl X-Google-Smtp-Source: AG47ELt1IJ10xTMZi5ElIfK1PQyqPudZ0q+Ebb+gqANOiAJVreBr0PdvIylVb5CZLLuGaw/Z6dihRA== X-Received: by 10.223.148.37 with SMTP id 34mr13153118wrq.243.1520249279041; Mon, 05 Mar 2018 03:27:59 -0800 (PST) Received: from x1.local (ABayonne-654-1-79-224.w86-222.abo.wanadoo.fr. [86.222.222.224]) by smtp.gmail.com with ESMTPSA id k45sm11744388wrf.62.2018.03.05.03.27.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 03:27:58 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org Date: Mon, 5 Mar 2018 08:27:16 -0300 Message-Id: <20180305112732.26471-15-f4bug@amsat.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180305112732.26471-1-f4bug@amsat.org> References: <20180305112732.26471-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v2 14/30] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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é --- hw/alpha/typhoon.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index 6a40869488..0acfb4b1d0 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -812,8 +812,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 = 1024 * 1024; - const uint64_t GB = 1024 * MB; MemoryRegion *addr_space = get_system_memory(); DeviceState *dev; TyphoonState *s; @@ -854,30 +852,30 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus, /* Pchip0 CSRs, 0x801.8000.0000, 256MB. */ memory_region_init_io(&s->pchip.region, OBJECT(s), &pchip_ops, s, "pchip0", - 256*MB); + 256 * M_BYTE); memory_region_add_subregion(addr_space, 0x80180000000ULL, &s->pchip.region); /* Cchip CSRs, 0x801.A000.0000, 256MB. */ memory_region_init_io(&s->cchip.region, OBJECT(s), &cchip_ops, s, "cchip0", - 256*MB); + 256 * M_BYTE); memory_region_add_subregion(addr_space, 0x801a0000000ULL, &s->cchip.region); /* Dchip CSRs, 0x801.B000.0000, 256MB. */ memory_region_init_io(&s->dchip_region, OBJECT(s), &dchip_ops, s, "dchip0", - 256*MB); + 256 * M_BYTE); memory_region_add_subregion(addr_space, 0x801b0000000ULL, &s->dchip_region); /* 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_BYTE); memory_region_add_subregion(addr_space, 0x80000000000ULL, &s->pchip.reg_mem); /* Pchip0 PCI I/O, 0x801.FC00.0000, 32MB. */ memory_region_init_io(&s->pchip.reg_io, OBJECT(s), &alpha_pci_ignore_ops, - NULL, "pci0-io", 32*MB); + NULL, "pci0-io", 32 * M_BYTE); memory_region_add_subregion(addr_space, 0x801fc000000ULL, &s->pchip.reg_io); @@ -898,13 +896,13 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus, /* Pchip0 PCI special/interrupt acknowledge, 0x801.F800.0000, 64MB. */ memory_region_init_io(&s->pchip.reg_iack, OBJECT(s), &alpha_pci_iack_ops, - b, "pci0-iack", 64*MB); + b, "pci0-iack", 64 * M_BYTE); memory_region_add_subregion(addr_space, 0x801f8000000ULL, &s->pchip.reg_iack); /* 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);