Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/cherry-xenmp]: src/sys/arch/i386/i386 gdtgrow() must extend the gdt size...
details: https://anonhg.NetBSD.org/src/rev/176407663f03
branches: cherry-xenmp
changeset: 765625:176407663f03
user: cherry <cherry%NetBSD.org@localhost>
date: Sat Aug 06 14:05:35 2011 +0000
description:
gdtgrow() must extend the gdt size on all cpus, not just the primary
diffstat:
sys/arch/i386/i386/gdt.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diffs (44 lines):
diff -r e67f1a6e312b -r 176407663f03 sys/arch/i386/i386/gdt.c
--- a/sys/arch/i386/i386/gdt.c Fri Aug 05 17:26:27 2011 +0000
+++ b/sys/arch/i386/i386/gdt.c Sat Aug 06 14:05:35 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gdt.c,v 1.50.10.1 2011/07/31 20:49:10 cherry Exp $ */
+/* $NetBSD: gdt.c,v 1.50.10.2 2011/08/06 14:05:35 cherry Exp $ */
/*-
* Copyright (c) 1996, 1997, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.50.10.1 2011/07/31 20:49:10 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.50.10.2 2011/08/06 14:05:35 cherry Exp $");
#include "opt_multiprocessor.h"
#include "opt_xen.h"
@@ -266,15 +266,17 @@
gdt_size[which] = MINGDTSIZ;
new_len = gdt_size[which] * sizeof(gdt[0]);
}
- for(va = (vaddr_t)(cpu_info_primary.ci_gdt) + old_len + max_len;
- va < (vaddr_t)(cpu_info_primary.ci_gdt) + new_len + max_len;
- va += PAGE_SIZE) {
- while ((pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_ZERO))
- == NULL) {
- uvm_wait("gdt_grow");
+ for (CPU_INFO_FOREACH(cii, ci)) {
+ for(va = (vaddr_t)(ci->ci_gdt) + old_len + max_len;
+ va < (vaddr_t)(ci->ci_gdt) + new_len + max_len;
+ va += PAGE_SIZE) {
+ while ((pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_ZERO))
+ == NULL) {
+ uvm_wait("gdt_grow");
+ }
+ pmap_kenter_pa(va, VM_PAGE_TO_PHYS(pg),
+ VM_PROT_READ | VM_PROT_WRITE, 0);
}
- pmap_kenter_pa(va, VM_PAGE_TO_PHYS(pg),
- VM_PROT_READ | VM_PROT_WRITE, 0);
}
return;
}
Home |
Main Index |
Thread Index |
Old Index