Module Name: src Committed By: bouyer Date: Thu Jul 6 20:26:05 UTC 2017
Modified Files: src/sys/arch/xen/x86: cpu.c Log Message: gdt_prepframes() is called with a number of pages, don't convert to a number of pages again. This didn't fail because we're called with only one page, and the conversion from '1' to pages resulted in 1 again. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/xen/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/xen/x86/cpu.c diff -u src/sys/arch/xen/x86/cpu.c:1.110 src/sys/arch/xen/x86/cpu.c:1.111 --- src/sys/arch/xen/x86/cpu.c:1.110 Thu Mar 23 18:08:06 2017 +++ src/sys/arch/xen/x86/cpu.c Thu Jul 6 20:26:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.110 2017/03/23 18:08:06 maxv Exp $ */ +/* $NetBSD: cpu.c,v 1.111 2017/07/06 20:26:05 bouyer Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.110 2017/03/23 18:08:06 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111 2017/07/06 20:26:05 bouyer Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -762,7 +762,7 @@ static void gdt_prepframes(paddr_t *frames, vaddr_t base, uint32_t entries) { int i; - for (i = 0; i < roundup(entries, PAGE_SIZE) >> PAGE_SHIFT; i++) { + for (i = 0; i < entries; i++) { frames[i] = ((paddr_t)xpmap_ptetomach( (pt_entry_t *)(base + (i << PAGE_SHIFT)))) >> PAGE_SHIFT;