From patchwork Tue Jan 2 01:57:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 759330 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp5855965wrw; Mon, 1 Jan 2024 17:58:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdGc9rAEq1r+CzqT7xRy1+4hdW/yESVTCOVDwFh3uW18BJp8XDIM9Ex7y85GCWkkX+oYGc X-Received: by 2002:a05:620a:3788:b0:781:84ad:26d5 with SMTP id pi8-20020a05620a378800b0078184ad26d5mr8081011qkn.129.1704160732107; Mon, 01 Jan 2024 17:58:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704160732; cv=none; d=google.com; s=arc-20160816; b=PyYz4chBmuzCucFOqq5Emj39zh9wqMk2PTi+aKqenKefNMmrZJXXjI4jDxyo0w6ng0 UmG/qv42Ff8+W9ZuqiTIM+U0ocdgolxAuqFaUxW5pNXgRJB0CubSMSTPiD15YJrTvW/S MWqIHpqY0YYEh6VXvRdT7tQDs3l5mfpqIgXAb1STNw8T7/iBQR1s5Ll29/qVQQKidB4K Z7bK6NlAfKZiM3phcrz5DTPYcJhs0kQuUZf2VSTBfr8Gly5aO5iHtSKOcqDzLL4QKSHV UbLhNUmfqe6vbFDr2MogzTyw+3wjpBFNLqI60cP0YmkGEmFQXBni20gNWoi3GD7LyCwX OtIg== 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:cc:to :from:dkim-signature; bh=7qyMzlpzWlHoGSx0bplKdPfg7TJkUYYgysQjBpEEncg=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=gGfdcId2OJfmo+fUQ0UEh+4TrTBPq68t4Gu1IF5YHMzCjS7zv+fCYNRuScDVut90Zs 3g+wuujqG8t7jnL29zqYZlgadoeS5kYoS3xVJREQt2fVkCiuRJqA/IXGAAPRtLzqcfTx s9+YW7Gq3y1wMEGzFpRV1KJjaarPbMXF3ZaXnOSk8zeswDwthp0/FA5QRY+lX49Y5gMY YfW3rNFWkU1BMwDEzoGXpG7KY7LwH3XNU3XJazFF02DXqCtMPZtOliIuL9hkhQlPFnh8 dtPjp1orRu1fJfH/BxonzmLy5Bubb0zw1hoTge3ZJTvOKufPYprsuxMhlgJa43xQK1d8 NJhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wCrmBHiQ; 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 bm31-20020a05620a199f00b0078114c142bcsi27387067qkb.292.2024.01.01.17.58.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jan 2024 17:58:52 -0800 (PST) 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=wCrmBHiQ; 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 1rKU39-0003Hb-Rv; Mon, 01 Jan 2024 20:58:35 -0500 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 1rKU38-0003HO-Qd for qemu-devel@nongnu.org; Mon, 01 Jan 2024 20:58:34 -0500 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rKU37-00070a-97 for qemu-devel@nongnu.org; Mon, 01 Jan 2024 20:58:34 -0500 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-20400d5b54eso7076022fac.1 for ; Mon, 01 Jan 2024 17:58:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704160712; x=1704765512; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7qyMzlpzWlHoGSx0bplKdPfg7TJkUYYgysQjBpEEncg=; b=wCrmBHiQBmvk9tFIhNgjBNYnvBQ2v9j5Occ7+z4qOupkZyPqGIeiILuSFzaJhnM/Sl ffTVI1GH/uzK3XAZBXhwsdSt7+mhCGsKKd1sw63EI44R2hj0d96Dx1GJfs/JYVkOIymj tIwibiFbrN5yMh+Z0swkLcFwp9UvkIsXjzObyeXLy4Q3fNYRy50dLXXKmnLbWvOkFbop EUR3vpF/wbMerOxM/2B5TA4oxVwIIpVBAQSVYrncE+5ZuqRDAJTdCYP3XVUqivSxJ9F6 STBTglV+Ie7aXXiMc+l3TMaAsgI4Jp5gJM1UR8doZJY1hjViWJumWETp821F5FpywWwl 1+vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704160712; x=1704765512; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7qyMzlpzWlHoGSx0bplKdPfg7TJkUYYgysQjBpEEncg=; b=f+4hfvxu9Xvryp/jLfrC7ZiGtG9YsIxrpSIhGaFSYi2NZ5SJEiugxdEYSj+K7gPlSz lBdd/H1CPp/nuTx5F+Ii65py04wQnqjauYdogkWaoYuq7jt+0Fyrx4uxxm8JOWtusg/c ue3/kuIswi3Aksw3u/YQU1WX7r1UIHtxVBge1J63zrXwQMDlR8rqUg0Z+sXhuhYgTDRH TrfRYHrdKPlaFA7qsHBC3gHujX7VwfpUToFq7JY6EldCPZLO0RAZ3u/Is6J8q3o5+mdV /TShTn1ImhuC69lCfUgd6G2yUM049rfVLcPRFo5DdO1T/7dXdK+c0LLsC943eIzayIyq tCXg== X-Gm-Message-State: AOJu0YyD+w0J+1QoS59w/JJDuSfSXhH+v7sBJ0vun2DaX2wFqXXLTUmG dEt9opAuuJ+QLh0zkSIwt4GFS8YodsW8alWPPrsZwk4vtdg= X-Received: by 2002:a05:6871:5228:b0:1fa:dac9:1cd2 with SMTP id ht40-20020a056871522800b001fadac91cd2mr19439525oac.27.1704160712082; Mon, 01 Jan 2024 17:58:32 -0800 (PST) Received: from stoup.. (124-149-254-207.tpgi.com.au. [124.149.254.207]) by smtp.gmail.com with ESMTPSA id g33-20020a635221000000b0058ee60f8e4dsm19561891pgb.34.2024.01.01.17.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 17:58:31 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 09/33] linux-user: Remove REAL_HOST_PAGE_ALIGN from mmap.c Date: Tue, 2 Jan 2024 12:57:44 +1100 Message-Id: <20240102015808.132373-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240102015808.132373-1-richard.henderson@linaro.org> References: <20240102015808.132373-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::36; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x36.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, T_SCC_BODY_TEXT_LINE=-0.01 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich --- 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 4d3c8717b9..53e5486cc8 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -585,7 +585,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); } }