From nobody Mon Feb 9 05:13:46 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 1529932186642140.09164342471604; Mon, 25 Jun 2018 06:09:46 -0700 (PDT) Received: from localhost ([::1]:46785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXRFZ-0005Ti-Od for importer@patchew.org; Mon, 25 Jun 2018 09:09:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXQqy-0001vW-Tr for qemu-devel@nongnu.org; Mon, 25 Jun 2018 08:44:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXQqy-00081a-3m for qemu-devel@nongnu.org; Mon, 25 Jun 2018 08:44:20 -0400 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]:42890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXQqx-00081W-Vt; Mon, 25 Jun 2018 08:44:20 -0400 Received: by mail-qk0-x22f.google.com with SMTP id u62-v6so4824275qkf.9; Mon, 25 Jun 2018 05:44:19 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id m15-v6sm12549562qtm.84.2018.06.25.05.44.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 05:44:19 -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=X12l4Aoe2kRtlEABqCKPMZ0wxEOwnCu+oNzwaXBv9H4=; b=EHY6yLzJAQFMA5QiX/ifdQGfJWOz3blpNTximpV3k4pbGXm4hBqCZC6CbRWIefHZtE uBkR22S4579VZpjarPxJDtxGm1akKSn8j1+pUNe0stAgvZubfCOjKAJk8Vm5j4OhjDKJ 9wKtRfCG6l5RXBSgT6g1BNHnpSmWKYfCUb0DSWV/ublDe5m0NlZHvTCSh584VleWu2pf ib2dGyoOvdG/7G+bG8QV8Pard+hxcd4uejQCh5KjhFpfq4R7R8PQ4VQIF/GpaU/P5FkL UoTXpP4GcT8Cb3znylAPY17W2bs1TjPak8V89o6rqDFCA3xY5+3VLiXxouMO4T6Cx7jp XBEA== 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=X12l4Aoe2kRtlEABqCKPMZ0wxEOwnCu+oNzwaXBv9H4=; b=kM8IrbyWp9++ZDgUtHZM+clL1Zvh3iKNx08SuW6lFYDAf0Hi8j2gjVeCIz1uWIdoGR ZkpIpw/uFSXn2HXdqsk3w4Do4XK0vwrHssBu1NC7+80F2qGVkzmQyj9a7Z/pb2NmGGS7 toYD3DlI7DnUGsaE9wYr5+qyY2IoLOOufu9Rby3G3og8MOM41gYjocuHYMxlTnqd9iNs hpiBNb/P9EKQ5vXDjQe+vCuBnCPWAX2JfX2cuUx78IQYpnsxMgngikJij/L0DnyLyPAv A1nOu8LeioVZgNckfYZtngAFLbl6uzph/6RCQLGLLGFQRflyIceJC6AbzA4kkR6vXDOY pbJg== X-Gm-Message-State: APt69E1vqngOdBxv4EmgqRJmbtRBOL0PVGa1f44QItuQbMsCeX5PkWRH gnYASMh8scY4QE9XwEcKYTo= X-Google-Smtp-Source: AAOMgpeY7glr45BWpm6BbTTf0FcHZai0eBVAr+r6ybzr6IziH1WIAvye7Vbx2dvEAPbmvbAZYHgmLg== X-Received: by 2002:a37:b91:: with SMTP id 139-v6mr511174qkl.429.1529930659496; Mon, 25 Jun 2018 05:44:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Thomas Huth , Stefan Weil Date: Mon, 25 Jun 2018 09:42:17 -0300 Message-Id: <20180625124238.25339-26-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180625124238.25339-1-f4bug@amsat.org> References: <20180625124238.25339-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::22f Subject: [Qemu-devel] [PATCH v5 25/46] 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 Reviewed-by: Richard Henderson --- 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.18.0