Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/matt-nb6-plus]: src/sys Pull from HEAD:
details: https://anonhg.NetBSD.org/src/rev/240cc52f028d
branches: matt-nb6-plus
changeset: 774514:240cc52f028d
user: matt <matt%NetBSD.org@localhost>
date: Wed Nov 28 22:59:09 2012 +0000
description:
Pull from HEAD:
Add a __HAVE_CPU_UAREA_IDLELWP hook so that the MD code can allocate
special UAREAs for idle lwp's.
diffstat:
sys/kern/kern_kthread.c | 7 ++++---
sys/uvm/uvm_extern.h | 4 ++--
sys/uvm/uvm_glue.c | 10 +++++++---
3 files changed, 13 insertions(+), 8 deletions(-)
diffs (78 lines):
diff -r 9b7c0a39ab0b -r 240cc52f028d sys/kern/kern_kthread.c
--- a/sys/kern/kern_kthread.c Wed Nov 28 22:52:52 2012 +0000
+++ b/sys/kern/kern_kthread.c Wed Nov 28 22:59:09 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_kthread.c,v 1.38 2011/11/01 15:39:37 jym Exp $ */
+/* $NetBSD: kern_kthread.c,v 1.38.10.1 2012/11/28 22:59:09 matt Exp $ */
/*-
* Copyright (c) 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.38 2011/11/01 15:39:37 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.38.10.1 2012/11/28 22:59:09 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -70,7 +70,8 @@
KASSERT((flag & KTHREAD_INTR) == 0 || (flag & KTHREAD_MPSAFE) != 0);
- uaddr = uvm_uarea_system_alloc();
+ uaddr = uvm_uarea_system_alloc(
+ (flag & (KTHREAD_INTR|KTHREAD_IDLE)) == KTHREAD_IDLE ? ci : NULL);
if (uaddr == 0) {
return ENOMEM;
}
diff -r 9b7c0a39ab0b -r 240cc52f028d sys/uvm/uvm_extern.h
--- a/sys/uvm/uvm_extern.h Wed Nov 28 22:52:52 2012 +0000
+++ b/sys/uvm/uvm_extern.h Wed Nov 28 22:59:09 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_extern.h,v 1.181.2.1 2012/04/12 17:05:37 riz Exp $ */
+/* $NetBSD: uvm_extern.h,v 1.181.2.1.2.1 2012/11/28 22:59:09 matt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -611,7 +611,7 @@
__dead void uvm_scheduler(void);
vaddr_t uvm_uarea_alloc(void);
void uvm_uarea_free(vaddr_t);
-vaddr_t uvm_uarea_system_alloc(void);
+vaddr_t uvm_uarea_system_alloc(struct cpu_info *);
void uvm_uarea_system_free(vaddr_t);
vaddr_t uvm_lwp_getuarea(lwp_t *);
void uvm_lwp_setuarea(lwp_t *, vaddr_t);
diff -r 9b7c0a39ab0b -r 240cc52f028d sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Wed Nov 28 22:52:52 2012 +0000
+++ b/sys/uvm/uvm_glue.c Wed Nov 28 22:59:09 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.156.2.3 2012/04/12 17:05:37 riz Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.156.2.3.2.1 2012/11/28 22:59:09 matt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.156.2.3 2012/04/12 17:05:37 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.156.2.3.2.1 2012/11/28 22:59:09 matt Exp $");
#include "opt_kgdb.h"
#include "opt_kstack.h"
@@ -366,8 +366,12 @@
}
vaddr_t
-uvm_uarea_system_alloc(void)
+uvm_uarea_system_alloc(struct cpu_info *ci)
{
+#ifdef __HAVE_CPU_UAREA_ALLOC_IDLELWP
+ if (__predict_false(ci != NULL))
+ return cpu_uarea_alloc_idlelwp(ci);
+#endif
return (vaddr_t)pool_cache_get(uvm_uarea_system_cache, PR_WAITOK);
}
Home |
Main Index |
Thread Index |
Old Index