move pdhist initialisation to the same place as maphist. also, declare
the history buffers are "struct uvm_history_ent" to ensure proper alignment (eg, alpha). this fixes a boottime panic when the pdhist was used before it had been initialised.
This commit is contained in:
parent
b06b31d8e2
commit
d9b2f81e27
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uvm_map.c,v 1.4 1998/02/07 12:31:32 mrg Exp $ */
|
||||
/* $NetBSD: uvm_map.c,v 1.5 1998/02/08 07:52:28 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE!
|
||||
|
@ -274,7 +274,8 @@ void uvm_map_init()
|
|||
{
|
||||
static struct vm_map_entry kernel_map_entry[MAX_KMAPENT];
|
||||
#if defined(UVMHIST)
|
||||
static char histbuf[sizeof(struct uvm_history_ent) * 100];
|
||||
static struct uvm_history_ent maphistbuf[100];
|
||||
static struct uvm_history_ent pdhistbuf[100];
|
||||
#endif
|
||||
int lcv;
|
||||
|
||||
|
@ -283,7 +284,8 @@ void uvm_map_init()
|
|||
*/
|
||||
|
||||
UVMHIST_FUNC("uvm_map_init");
|
||||
UVMHIST_INIT_STATIC(maphist, histbuf);
|
||||
UVMHIST_INIT_STATIC(maphist, maphistbuf);
|
||||
UVMHIST_INIT_STATIC(pdhist, pdhistbuf);
|
||||
UVMHIST_CALLED(maphist);
|
||||
UVMHIST_LOG(maphist,"<starting uvm map system>", 0, 0, 0, 0);
|
||||
UVMCNT_INIT(uvm_map_call, UVMCNT_CNT, 0, "# uvm_map() successful calls", 0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uvm_swap.c,v 1.3 1998/02/07 11:09:45 mrg Exp $ */
|
||||
/* $NetBSD: uvm_swap.c,v 1.4 1998/02/08 07:52:32 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Matthew R. Green
|
||||
|
@ -206,7 +206,6 @@ struct vndbuf {
|
|||
/*
|
||||
* local variables
|
||||
*/
|
||||
UVMHIST_DECL(pdhist);
|
||||
static struct extent *swapmap; /* controls the mapping of /dev/drum */
|
||||
SIMPLEQ_HEAD(swapbufhead, swapbuf);
|
||||
static struct swapbufhead freesbufs; /* list of free swapbufs */
|
||||
|
@ -263,12 +262,8 @@ uvm_swap_init()
|
|||
struct swapbuf *sp;
|
||||
struct proc *p = &proc0; /* XXX */
|
||||
int i;
|
||||
#if defined(UVMHIST)
|
||||
static char histbuf[sizeof(struct uvm_history_ent) * 100];
|
||||
#endif
|
||||
UVMHIST_FUNC("uvm_swap_init");
|
||||
|
||||
UVMHIST_INIT_STATIC(pdhist, histbuf);
|
||||
UVMHIST_CALLED(pdhist);
|
||||
/*
|
||||
* first, init the swap list, its counter, and its lock.
|
||||
|
|
Loading…
Reference in New Issue