Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 Fix two off-by-one loops. Saves a whole t...
details: https://anonhg.NetBSD.org/src/rev/eb8fb608aa43
branches: trunk
changeset: 782136:eb8fb608aa43
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Oct 17 20:44:48 2012 +0000
description:
Fix two off-by-one loops. Saves a whole two pages.
diffstat:
sys/arch/arm/arm32/arm32_kvminit.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 3a81e0aff2b4 -r eb8fb608aa43 sys/arch/arm/arm32/arm32_kvminit.c
--- a/sys/arch/arm/arm32/arm32_kvminit.c Wed Oct 17 20:22:23 2012 +0000
+++ b/sys/arch/arm/arm32/arm32_kvminit.c Wed Oct 17 20:44:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm32_kvminit.c,v 1.7 2012/10/15 12:26:06 skrll Exp $ */
+/* $NetBSD: arm32_kvminit.c,v 1.8 2012/10/17 20:44:48 skrll Exp $ */
/*
* Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved.
@@ -122,7 +122,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.7 2012/10/15 12:26:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.8 2012/10/17 20:44:48 skrll Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -452,7 +452,7 @@
#ifdef VERBOSE_INIT_ARM
printf(" kernel");
#endif
- for (size_t idx = 0; idx <= KERNEL_L2PT_KERNEL_NUM; ++idx) {
+ for (size_t idx = 0; idx < KERNEL_L2PT_KERNEL_NUM; ++idx) {
valloc_pages(bmi, &kernel_l2pt[idx], L2_TABLE_SIZE / PAGE_SIZE,
VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
add_pages(bmi, &kernel_l2pt[idx]);
@@ -460,7 +460,7 @@
#ifdef VERBOSE_INIT_ARM
printf(" vm");
#endif
- for (size_t idx = 0; idx <= KERNEL_L2PT_VMDATA_NUM; ++idx) {
+ for (size_t idx = 0; idx < KERNEL_L2PT_VMDATA_NUM; ++idx) {
valloc_pages(bmi, &vmdata_l2pt[idx], L2_TABLE_SIZE / PAGE_SIZE,
VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
add_pages(bmi, &vmdata_l2pt[idx]);
Home |
Main Index |
Thread Index |
Old Index