From nobody Wed Feb 11 03:25:55 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 1528681798776930.944964136291; Sun, 10 Jun 2018 18:49:58 -0700 (PDT) Received: from localhost ([::1]:45890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSBxy-0007DX-Ak for importer@patchew.org; Sun, 10 Jun 2018 21:49:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSBS2-0005hf-Qx for qemu-devel@nongnu.org; Sun, 10 Jun 2018 21:16:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSBS1-0003IU-Sp for qemu-devel@nongnu.org; Sun, 10 Jun 2018 21:16:54 -0400 Received: from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]:33484) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSBS1-0003IF-OX; Sun, 10 Jun 2018 21:16:53 -0400 Received: by mail-qt0-x22f.google.com with SMTP id l10-v6so13656826qtj.0; Sun, 10 Jun 2018 18:16:53 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id o5-v6sm28237223qtm.60.2018.06.10.18.16.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jun 2018 18:16:52 -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=nh51WnvB2CGj4NcWumgTICBRoOxVMIfP8Qv/r23Xz6U=; b=Dv67ROM9i5oNkw+vAQ0UasjxNckCsy+EroCJNDO/wHRGcNCs3wHN3jIb1Fgk+P/y/n X7639qCj9lAZvugsrnwJQV7ol2tWXvdqdWCN2SNZSkVr1d67sj0q6F66SLMUya8M0jrP 7aSIO6/XJ6126IUSO3/tBpBYIELBN11YxnS/NNPjAzcKmn3iE4YACXqu+Ep8N7Cx3dRI 5z/oF5RXHNqW8i3OwCSvIcZHggf0Ij5+DWuvh5Z93FPvrNF0C2NctNDSpsANvNTPnjtu RyMhtSVuumfVjcjwi/+nZx7204srytGVXsMGULk9GT+lwMOo25Zk+p/U/fK0fHBKj2vg OfPA== 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=nh51WnvB2CGj4NcWumgTICBRoOxVMIfP8Qv/r23Xz6U=; b=ev9c8M3FRjCVb0xDSxn+usTMNrDrpotd0+GPiCV9shNgSB1LTADNpz9n3WSXq7SNEz CyJpw169K2EuLGOvwRRqVcYfEjXBhEMz65x28VgWgaNPTTUg3bejRGolZoXdSJjwrlmz d4q6L47T9RVyeYQrdO+SRpsslG4wVdiaRKOmkfX0XnJS1e1djZafj7Ew6V4Fkdbp3W3F 7VE92TO5SEeMQUj/eLP1wORlwijMj+6EQ559lbcwPaA0wfc0hRlUW0U+dBFA+XL0mEJi mUyDVjvWp1qVK85bkn2IDQNzewcPpSH3j91x7hlGum0a4kRYRvsXu6w1lLn1Gac/fn+t DgyQ== X-Gm-Message-State: APt69E333wzP9i6IlFm0OpqCOGquHZS/dHf0bNyCgoG/X2WdoAtVAZ9Z jhz6iY4EuwYFf5oENDQOUlA= X-Google-Smtp-Source: ADUXVKLBpIT6W6kj3oe335e5jC/6gk4rUGuDs2jtgnzGoLnq/5ywDJmbGQrICHMrhynbSACrpWBoxg== X-Received: by 2002:ac8:1bee:: with SMTP id m43-v6mr14744762qtk.339.1528679813330; Sun, 10 Jun 2018 18:16:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Thomas Huth , Stefan Weil Date: Sun, 10 Jun 2018 22:14:46 -0300 Message-Id: <20180611011501.10235-26-f4bug@amsat.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180611011501.10235-1-f4bug@amsat.org> References: <20180611011501.10235-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:c0d::22f Subject: [Qemu-devel] [PATCH v4 25/40] hw/nios2: Use the IEC binary prefix 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: qemu-trivial@nongnu.org, Marek Vasut , Chris Wulff , =?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/nios2/boot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c index 94f436e7fb..4bb5b601d3 100644 --- a/hw/nios2/boot.c +++ b/hw/nios2/boot.c @@ -29,6 +29,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/units.h" #include "qemu-common.h" #include "cpu.h" #include "qemu/option.h" @@ -38,7 +39,6 @@ #include "sysemu/sysemu.h" #include "hw/loader.h" #include "elf.h" -#include "qemu/cutils.h" =20 #include "boot.h" =20 @@ -177,7 +177,7 @@ void nios2_load_kernel(Nios2CPU *cpu, hwaddr ddr_base, high =3D ddr_base + kernel_size; } =20 - high =3D ROUND_UP(high, 1024 * 1024); + high =3D ROUND_UP(high, 1 * MiB); =20 /* If initrd is available, it goes after the kernel, aligned to 1M= . */ if (initrd_filename) { @@ -213,7 +213,7 @@ void nios2_load_kernel(Nios2CPU *cpu, hwaddr ddr_base, high +=3D fdt_size; =20 /* Kernel command is at the end, 4k aligned. */ - boot_info.cmdline =3D ROUND_UP(high, 4096); + boot_info.cmdline =3D ROUND_UP(high, 4 * KiB); if (kernel_cmdline && strlen(kernel_cmdline)) { pstrcpy_targphys("cmdline", boot_info.cmdline, 256, kernel_cmd= line); } --=20 2.17.1