From nobody Tue Nov 4 19:05:30 2025 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530340219300234.54842759725545; Fri, 29 Jun 2018 23:30:19 -0700 (PDT) Received: from localhost ([::1]:45762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ9Og-0004SX-1N for importer@patchew.org; Sat, 30 Jun 2018 02:30:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ96G-0004LK-PT for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ96F-0002JW-Nw for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:12 -0400 Received: from mail-wr0-x22c.google.com ([2a00:1450:400c:c0c::22c]:43456) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZ96F-0002Gw-FR for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:11 -0400 Received: by mail-wr0-x22c.google.com with SMTP id c5-v6so10637845wrs.10 for ; Fri, 29 Jun 2018 23:11:11 -0700 (PDT) Received: from donizetti.lan ([82.84.124.111]) by smtp.gmail.com with ESMTPSA id 24-v6sm563454wrz.94.2018.06.29.23.11.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 23:11:09 -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=bnnOftntBQ7pzVZgedKlC87hjNi23GfbJ+81jXcnqsY=; b=muyJBgurJlPYYFOQ2NZg+kiUPNVtABEWnBz+uTECfMAi8dQ5n4xotOQkZyyK4TTmca XxiKnkbcmEHsrmSMhHPKpIKZUbNbAONYuoikhpM11AFNU9okhevcmg8p5JqaZI7lvJL0 bEyaB5eh8AyX062jIjDlocI2V4t1q/8ZZfqFuCZkmh3pCwt8MWN1QxbTm3Xwm02FKL34 nIwQxdM+EaP48bVCCRwFlgEY4pBI+H4S/g+c7ew+WqT1sNeL85yi5kb/ceg1hlJQOQsh jE2sA+RkdNLc4SMN3Mvimv6aCacUrANjQCf3svPIlFVwF9QTFlb5rNqJdDvBWZv74r6n gPGQ== 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=bnnOftntBQ7pzVZgedKlC87hjNi23GfbJ+81jXcnqsY=; b=AP0TSJXMxHaNoJgRki9wetlKEVunAImex0XkxSgjm4uEIP81STJCqN+akhuqQXLfgy UX0HH0jgkluYLv8Tv3CwLpsiB1YmCv6IpUeBhBco5Q+VPzmbZjPHaORjI+9tN/CnL6kL 4P0TQ0POTes+g/BsLGsZECXks3xAB6wZKE2VjBrGYd528eqayCddKUL9fj+AFzbFoF8k H+EkN3dIocGyV8k+09X4Qjdk3lfzX8o4n8QTAbmLMZ7iqCWx5NhcA6TkKZA7bkQLwgwf FuzPKRU2m7rK6e/eM9aYRV0uufhwOayWgKkbQ8S8QEeYNLS2+B8DrUqpCi4HP2817sto GVuQ== X-Gm-Message-State: APt69E0xMlyEt8XN0ecPupwvOySuHJ2YcafXjR0ppzPXPITmhp90HHcy RSlJApSlXoQC81pm2P7/uwcXoJCV X-Google-Smtp-Source: AAOMgpes8q00mJ/3jQtV1wBj5dbwp2b1pPPp9gi1pjW7F1I5/8bxrpcw057BxVcuGIqhODwqEv7WzA== X-Received: by 2002:adf:b839:: with SMTP id h54-v6mr14315525wrf.36.1530339070260; Fri, 29 Jun 2018 23:11:10 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sat, 30 Jun 2018 08:10:20 +0200 Message-Id: <20180630061040.6018-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180630061040.6018-1-pbonzini@redhat.com> References: <20180630061040.6018-1-pbonzini@redhat.com> 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: 2a00:1450:400c:c0c::22c Subject: [Qemu-devel] [PULL 27/47] 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: =?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) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Philippe Mathieu-Daud=C3=A9 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 Message-Id: <20180625124238.25339-26-f4bug@amsat.org> Signed-off-by: Paolo Bonzini --- 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 94f436e..4bb5b60 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 1.8.3.1