From patchwork Fri Aug 18 17:12:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 714659 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp629407wrs; Fri, 18 Aug 2023 10:15:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhtuYn+uG5gNwohY68FrySA03kpbJpGvr0lqXqrs8YibSBT94ncA1IBPQstnWJBdId6U20 X-Received: by 2002:ac8:5b07:0:b0:40c:58a1:cb40 with SMTP id m7-20020ac85b07000000b0040c58a1cb40mr4363512qtw.15.1692378943865; Fri, 18 Aug 2023 10:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692378943; cv=none; d=google.com; s=arc-20160816; b=cJI0lwW1lHdgYn6TnbJBztwU3FFnVVI+VDXccLoilVEvxWa+BMKszBqc20CXwjxI7+ bgUoa7l794K7Hkp9dmOG8w5gjY5DP/XwwwoEq7v4GQidELiCg0WAU9s5KRiLLjLHUIlf ZEVGLujkeziMdRLBbIY487BsigTIlYzXVR+nfdrEHLmn+GeT+q2/0NkliiTgjPOcx4gR btp6XfK2/yWWc+rT/tJj8iXkH+JpM/pW+BkVW5NYCud+4xEkDXW1srDdmBRjpMfND7BM OSJHckwTDmF5xWSmCMN84FeU+zeq8OdEw+YIavEjrefW7zcU2zPVGcMWrH/xo94Nzgf7 mxWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=0VhX8uKhISO1+aAbqkSU7fErwJnjxPvu/vXb9fW78xU=; fh=oYAd+8Lj9FKlReeF9hgENQXa3P4LhBP5C4njRBbobDA=; b=zsETYWQa3XJHVENREEyvCe6VWarzDBD5DN/+vJTCi9RYUsnkKCRXO+H79Oks/TeXWy gttONiA9E8u9TyLiYERZ7J+pWzNq1hv9jDajluF45okIrlgq41B9osSUqJqHGE5kpm5O 9teafHJBYz8RgUHRr1VJXj8ATpjPe6+F3OrVesHSJ9BcwCl3A8O24JuTxbw3mBfIkZDM FKJNJ+6gvUecef/30mXlu8q+UMPwACqokNuLgYDwghLLH2F0+iZxovNYOpuBWD8hNVLv 5x+JVZdp9aTdzkXhCf6Z00i5gE5C00jjjt8VzcvHaVA7no533IMygV7sbhaGEIXxDOIL iNig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RpA4C2lq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l11-20020a05622a174b00b00405d0bc11f0si1549105qtk.563.2023.08.18.10.15.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Aug 2023 10:15:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RpA4C2lq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX31h-0008Da-G2; Fri, 18 Aug 2023 13:12:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qX31g-0008DA-5D for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:12:44 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX31d-00081J-Uw for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:12:43 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bdf4752c3cso8537985ad.2 for ; Fri, 18 Aug 2023 10:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692378760; x=1692983560; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0VhX8uKhISO1+aAbqkSU7fErwJnjxPvu/vXb9fW78xU=; b=RpA4C2lqWVg+lVV3ks5rrrQFu3awe1dUw9+puCeDBwn8RB7+TRrNbEfNiDbumDWknT T4J5Cd8O+S+gnLNj4SVl99fMNs2bhczfySoM0His4csqMRRYHkjHGgijk+EiOEqyz3jZ GaJ0I3knINgbSf0qhLR7OSuSvtPb5ohKmd9HjFIFqDvLvG3br3UHet0+81lCv5xq7Fvn YioDeCAE1/QpG3YzEzwC+6xmaidFNhyUq5Ea3geZFlErUU2J6B3C8fHNKTQzJrh/vNSv 3p7CYx3fJPijM41kbuz+yTX/+M2b4O//GiKEn0NKWyEdHmt1w6s1krShyMNpXdbS9Szp mZnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692378760; x=1692983560; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0VhX8uKhISO1+aAbqkSU7fErwJnjxPvu/vXb9fW78xU=; b=PkRaNo6b3vTRglYwd8PSXqY2Y0MrjfRAFIQakBOzkGaxXNML532Zj1cKEk0ZdvSpuA x4PrXvMiSNdRKIUV2bvQV2CpMrgKvvwTFJBq3GGwQivnVS/GQlcgoy9On/WZ1MXUtKBD bxTVGxkHkRV2PryqjNzXfGfOO0gFlgEmlElSragu0RwtivoS6ZgaV14G222I618XqhB/ +Zn/if/4oA+ndU78dPdfxDMv3SoDZ6VaiwdVx93aWhvMrb+6NKeZppfUkSKevKYpu8Uv 10X5+d0yveFCjKFaOy50EMPurxxmSzizKIwvWyfW9dIazvp+RS/lnA9zRGqIvO9XewKI 0KYw== X-Gm-Message-State: AOJu0Yxw2A6/dxKDXUc0gq1481LDd+SQ/XZbmgs5pxxeTFhHGhFvgo/E ggdgGlYRvpBYYtGCuathPkMV2z44+zbnOIDLF1M= X-Received: by 2002:a17:902:8c98:b0:1b8:aef2:773e with SMTP id t24-20020a1709028c9800b001b8aef2773emr2848273plo.46.1692378760684; Fri, 18 Aug 2023 10:12:40 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:cf24:6daf:2b9e:7972]) by smtp.gmail.com with ESMTPSA id jw24-20020a170903279800b001adf6b21c77sm2020025plb.107.2023.08.18.10.12.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 10:12:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/33] linux-user: Remove REAL_HOST_PAGE_ALIGN from mmap.c Date: Fri, 18 Aug 2023 10:12:03 -0700 Message-Id: <20230818171227.141728-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230818171227.141728-1-richard.henderson@linaro.org> References: <20230818171227.141728-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We already have qemu_real_host_page_size() in a local variable. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index fc23192a32..48a6ef0af9 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -541,7 +541,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int target_prot, * the hosts real pagesize. Additional anonymous maps * will be created beyond EOF. */ - len = REAL_HOST_PAGE_ALIGN(sb.st_size - offset); + len = ROUND_UP(sb.st_size - offset, host_page_size); } }