From patchwork Mon Jan 11 09:01:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 565707 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DCD3F1402F0 for ; Mon, 11 Jan 2016 20:02:34 +1100 (AEDT) Received: from localhost ([::1]:52689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIYMy-0005xc-UE for incoming@patchwork.ozlabs.org; Mon, 11 Jan 2016 04:02:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIYMa-0005G2-I4 for qemu-devel@nongnu.org; Mon, 11 Jan 2016 04:02:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIYMU-0005NH-L3 for qemu-devel@nongnu.org; Mon, 11 Jan 2016 04:02:08 -0500 Received: from out1134-178.mail.aliyun.com ([42.120.134.178]:63335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIYMU-0005Mp-6K for qemu-devel@nongnu.org; Mon, 11 Jan 2016 04:02:02 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.09462552|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e01l10450; MF=chengang@emindsoft.com.cn; NM=1; PH=DS; RN=7; RT=6; SR=0; TI=SMTPD_----4RH5exV_1452502915; Received: from localhost.localdomain(mailfrom:chengang@emindsoft.com.cn ip:36.110.17.42) by smtp.aliyun-inc.com(10.147.41.199); Mon, 11 Jan 2016 17:01:56 +0800 From: chengang@emindsoft.com.cn To: riku.voipio@iki.fi, laurent@vivier.eu Date: Mon, 11 Jan 2016 17:01:07 +0800 Message-Id: <1452502867-12148-3-git-send-email-chengang@emindsoft.com.cn> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452502867-12148-1-git-send-email-chengang@emindsoft.com.cn> References: <1452502867-12148-1-git-send-email-chengang@emindsoft.com.cn> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 42.120.134.178 Cc: peter.maydell@linaro.org, Chen Gang , qemu-devel@nongnu.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v2 3/3] linux-user/mmap.c: Use TARGET_PAGE_SIZE as the increasing step X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Chen Gang Just like another areas have done. --- 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 51c381d..86c270b 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -151,7 +151,7 @@ static int mmap_frag(abi_ulong real_start, /* get the protection of the target pages outside the mapping */ prot1 = 0; - for(addr = real_start; addr < real_end; addr++) { + for (addr = real_start; addr < real_end; addr += TARGET_PAGE_SIZE) { if (addr < start || addr >= end) prot1 |= page_get_flags(addr); }