From patchwork Mon Sep 18 19:50:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9957589 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 49F2860385 for ; Mon, 18 Sep 2017 20:03:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C66F28D87 for ; Mon, 18 Sep 2017 20:03:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3183528D89; Mon, 18 Sep 2017 20:03:25 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 B235028D87 for ; Mon, 18 Sep 2017 20:03:24 +0000 (UTC) Received: from localhost ([::1]:38680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du2GJ-0007wW-Tn for patchwork-qemu-devel@patchwork.kernel.org; Mon, 18 Sep 2017 16:03:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du251-00072x-To for qemu-devel@nongnu.org; Mon, 18 Sep 2017 15:51:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du251-0006QN-2k for qemu-devel@nongnu.org; Mon, 18 Sep 2017 15:51:43 -0400 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:34994) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1du24y-0006Mu-JE; Mon, 18 Sep 2017 15:51:40 -0400 Received: by mail-pg0-x243.google.com with SMTP id j16so775373pga.2; Mon, 18 Sep 2017 12:51:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HQ958ER2hrScn+TIeN3g4iCb4dqKDWOI7wizkj8UUoc=; b=V+NhDcHoxm637VHw7qxSMxN0NGFUoj8mfQK6GjxMbNHZCA8efx273c9UQW6Cg3OS+e h9cFqUNMat113HRnS80cWmSG3UkAA5ijvyjHdZaK1BOO9S79dVsvmOwezv7crmROqcBV WkkxLWyDin08K7Bj0xgFfJKSv9fyIjhtJ8PeXBd1ggMuBtLAhFebWkThwXeWvyiU+J5/ 4b5BBIGDqcmxmUIjKDq+8qt9dONsAsvXsA7g9a+i3HJe1j9wX7RjljM1JUdmjp0YAsZE uyh5VnqZcH0kXG7kNF6LsLRbgsimq9oxO+YnCqjg9nIFfswEbiioUrLzlC6IuF9MWyRF JYMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HQ958ER2hrScn+TIeN3g4iCb4dqKDWOI7wizkj8UUoc=; b=Ah94qBB+rLcCQiWKs4dtIoROhGZU4pRdltybJ26Vq9av7CEMycIvLjPvD7vtKCaReY olCQWXpVRdy0123brwwYHZYNr5i5lYT4tkWJjXSE0R4G5B4MAHhFe1aQpHj85y3F9Dbk U5/g68CPYXErRWvXPq4hH1puICAAhEeS6a1bH7Q3Um00F5Rwh6XDIkOWZBpX9qaUccwO QRn7Nlity7OvgvDHX3RTbH8nuFFFUCrh0PDcL1x3bAqjxTtXkI3QmDz9jKvhVeMw8LoT kf3JV+hnoI1PZPgRcP/AUoSI2etEjl8cTS9jZItH0G2upA7v8rwgTaBaRWLWrz61dIaA j8UQ== X-Gm-Message-State: AHPjjUgL055BhVlQ0RoBMwgdbRyHDaTJXXkVWCD+7IADFCCUP9NqgmKE zuj95ZuPKdWnF/GkEyw= X-Google-Smtp-Source: AOwi7QC2Z0Hq1WEF88ZOXzkVJcaxeZatV7/OuXoL1MOQVBAXshQGBAf9gFSB5KWPid6a3I0g8b5mcA== X-Received: by 10.84.233.66 with SMTP id k2mr14943254plt.134.1505764299390; Mon, 18 Sep 2017 12:51:39 -0700 (PDT) Received: from squirtle.westlake.spaceflightindustries.com ([173.226.206.194]) by smtp.gmail.com with ESMTPSA id d186sm200791pfd.117.2017.09.18.12.51.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Sep 2017 12:51:38 -0700 (PDT) From: Andrey Smirnov To: qemu-arm@nongnu.org Date: Mon, 18 Sep 2017 12:50:58 -0700 Message-Id: <20170918195100.17593-16-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170918195100.17593-1-andrew.smirnov@gmail.com> References: <20170918195100.17593-1-andrew.smirnov@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PATCH 15/17] include/qemu: Add sizes.h from Linux 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: Andrey Smirnov , Peter Maydell , qemu-devel@nongnu.org, yurovsky@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add sizes.h from Linux to have a more readable way of specifying MemoryRegion sizes. Cc: Peter Maydell Cc: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Cc: yurovsky@gmail.com Signed-off-by: Andrey Smirnov --- include/qemu/sizes.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 include/qemu/sizes.h diff --git a/include/qemu/sizes.h b/include/qemu/sizes.h new file mode 100644 index 0000000000..9aedb9f8f6 --- /dev/null +++ b/include/qemu/sizes.h @@ -0,0 +1,47 @@ +/* + * Copy of include/linux/sizes.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef SIZES_H +#define SIZES_H + +#define SZ_1 0x00000001 +#define SZ_2 0x00000002 +#define SZ_4 0x00000004 +#define SZ_8 0x00000008 +#define SZ_16 0x00000010 +#define SZ_32 0x00000020 +#define SZ_64 0x00000040 +#define SZ_128 0x00000080 +#define SZ_256 0x00000100 +#define SZ_512 0x00000200 + +#define SZ_1K 0x00000400 +#define SZ_2K 0x00000800 +#define SZ_4K 0x00001000 +#define SZ_8K 0x00002000 +#define SZ_16K 0x00004000 +#define SZ_32K 0x00008000 +#define SZ_64K 0x00010000 +#define SZ_128K 0x00020000 +#define SZ_256K 0x00040000 +#define SZ_512K 0x00080000 + +#define SZ_1M 0x00100000 +#define SZ_2M 0x00200000 +#define SZ_4M 0x00400000 +#define SZ_8M 0x00800000 +#define SZ_16M 0x01000000 +#define SZ_32M 0x02000000 +#define SZ_64M 0x04000000 +#define SZ_128M 0x08000000 +#define SZ_256M 0x10000000 +#define SZ_512M 0x20000000 + +#define SZ_1G 0x40000000 +#define SZ_2G 0x80000000 + +#endif /* SIZES_H */