Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/x86 gdt_prepframes() is called with a number of...
details: https://anonhg.NetBSD.org/src/rev/48a6a5e62784
branches: trunk
changeset: 354976:48a6a5e62784
user: bouyer <bouyer%NetBSD.org@localhost>
date: Thu Jul 06 20:26:05 2017 +0000
description:
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.
diffstat:
sys/arch/xen/x86/cpu.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 53610d8359ae -r 48a6a5e62784 sys/arch/xen/x86/cpu.c
--- a/sys/arch/xen/x86/cpu.c Thu Jul 06 20:23:57 2017 +0000
+++ b/sys/arch/xen/x86/cpu.c Thu Jul 06 20:26:05 2017 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index