From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: chengang@emindsoft.com.cn Date: Mon, 11 Jan 2016 17:01:07 +0800 Message-Id: <1452502867-12148-3-git-send-email-chengang@emindsoft.com.cn> In-Reply-To: <1452502867-12148-1-git-send-email-chengang@emindsoft.com.cn> References: <1452502867-12148-1-git-send-email-chengang@emindsoft.com.cn> Subject: [Qemu-devel] [PATCH v2 3/3] linux-user/mmap.c: Use TARGET_PAGE_SIZE as the increasing step List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: riku.voipio@iki.fi, laurent@vivier.eu Cc: peter.maydell@linaro.org, Chen Gang , qemu-devel@nongnu.org, rth@twiddle.net 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); } -- 1.9.1