View | Details | Raw Unified | Return to bug 19720
Collapse All | Expand All

(-)alpha/alpha/machdep.c (-6 / +7 lines)
Lines 186-196 Link Here
186
186
187
struct msgbuf *msgbufp=0;
187
struct msgbuf *msgbufp=0;
188
188
189
int bootverbose = 0, Maxmem = 0;
189
int bootverbose = 0;
190
u_int Maxmem = 0;
190
long dumplo;
191
long dumplo;
191
192
192
int	totalphysmem;		/* total amount of physical memory in system */
193
u_int	totalphysmem;		/* total amount of physical memory in system */
193
int	physmem;		/* physical memory used by NetBSD + some rsvd */
194
u_int	physmem;		/* physical memory used by NetBSD + some rsvd */
194
int	resvmem;		/* amount of memory reserved for PROM */
195
int	resvmem;		/* amount of memory reserved for PROM */
195
int	unusedmem;		/* amount of memory for OS that we don't use */
196
int	unusedmem;		/* amount of memory for OS that we don't use */
196
int	unknownmem;		/* amount of memory with an unknown use */
197
int	unknownmem;		/* amount of memory with an unknown use */
Lines 206-212 Link Here
206
}
207
}
207
208
208
SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD,
209
SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD,
209
	0, 0, sysctl_hw_physmem, "I", "");
210
	0, 0, sysctl_hw_physmem, "IU", "");
210
211
211
static int
212
static int
212
sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
213
sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
Lines 219-225 Link Here
219
SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD,
220
SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD,
220
	0, 0, sysctl_hw_usermem, "I", "");
221
	0, 0, sysctl_hw_usermem, "I", "");
221
222
222
SYSCTL_INT(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
223
SYSCTL_UINT(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
223
224
224
/* must be 2 less so 0 0 can signal end of chunks */
225
/* must be 2 less so 0 0 can signal end of chunks */
225
#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2)
226
#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2)
Lines 267-273 Link Here
267
#ifdef PERFMON
268
#ifdef PERFMON
268
	perfmon_init();
269
	perfmon_init();
269
#endif
270
#endif
270
	printf("real memory  = %ld (%ldK bytes)\n", alpha_ptob(Maxmem), alpha_ptob(Maxmem) / 1024);
271
	printf("real memory  = %lu (%luK bytes)\n", alpha_ptob(Maxmem), alpha_ptob(Maxmem) / 1024);
271
272
272
	/*
273
	/*
273
	 * Display any holes after the first chunk of extended memory.
274
	 * Display any holes after the first chunk of extended memory.
(-)alpha/alpha/vm_machdep.c (-2 / +2 lines)
Lines 381-389 Link Here
381
}
381
}
382
382
383
383
384
static int cnt_prezero;
384
static u_int cnt_prezero;
385
385
386
SYSCTL_INT(_machdep, OID_AUTO, cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, "");
386
SYSCTL_UINT(_machdep, OID_AUTO, cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, "");
387
387
388
/*
388
/*
389
 * Implement the pre-zeroed page mechanism.
389
 * Implement the pre-zeroed page mechanism.
(-)i386/i386/machdep.c (-3 / +3 lines)
Lines 150-156 Link Here
150
#endif
150
#endif
151
SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
151
SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
152
152
153
int physmem = 0;
153
u_int physmem = 0;
154
int cold = 1;
154
int cold = 1;
155
155
156
static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code));
156
static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code));
Lines 163-169 Link Here
163
}
163
}
164
164
165
SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD,
165
SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD,
166
	0, 0, sysctl_hw_physmem, "I", "");
166
	0, 0, sysctl_hw_physmem, "IU", "");
167
167
168
static int
168
static int
169
sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
169
sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
Lines 174-180 Link Here
174
}
174
}
175
175
176
SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD,
176
SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD,
177
	0, 0, sysctl_hw_usermem, "I", "");
177
	0, 0, sysctl_hw_usermem, "IU", "");
178
178
179
static int
179
static int
180
sysctl_hw_availpages(SYSCTL_HANDLER_ARGS)
180
sysctl_hw_availpages(SYSCTL_HANDLER_ARGS)
(-)i386/i386/vm_machdep.c (-2 / +2 lines)
Lines 533-541 Link Here
533
533
534
SYSCTL_DECL(_vm_stats_misc);
534
SYSCTL_DECL(_vm_stats_misc);
535
535
536
static int cnt_prezero;
536
static u_int cnt_prezero;
537
537
538
SYSCTL_INT(_vm_stats_misc, OID_AUTO,
538
SYSCTL_UINT(_vm_stats_misc, OID_AUTO,
539
	cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, "");
539
	cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, "");
540
540
541
/*
541
/*
(-)kern/init_main.c (-2 / +2 lines)
Lines 91-98 Link Here
91
extern	struct user *proc0paddr;
91
extern	struct user *proc0paddr;
92
92
93
struct	vnode *rootvp;
93
struct	vnode *rootvp;
94
int	boothowto = 0;		/* initialized so that it can be patched */
94
u_int	boothowto = 0;		/* initialized so that it can be patched */
95
SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, "");
95
SYSCTL_UINT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, "");
96
96
97
/*
97
/*
98
 * Promiscuous argument pass for start_init()
98
 * Promiscuous argument pass for start_init()
(-)kern/kern_mib.c (-2 / +1 lines)
Lines 187-194 Link Here
187
    &domainname, sizeof(domainname), "Name of the current YP/NIS domain");
187
    &domainname, sizeof(domainname), "Name of the current YP/NIS domain");
188
188
189
long hostid;
189
long hostid;
190
/* Some trouble here, if sizeof (int) != sizeof (long) */
190
SYSCTL_LONG(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID");
191
SYSCTL_INT(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID");
192
191
193
/*
192
/*
194
 * This is really cheating.  These actually live in the libc, something
193
 * This is really cheating.  These actually live in the libc, something
(-)kern/kern_tc.c (-8 / +8 lines)
Lines 49-62 Link Here
49
static unsigned nnanouptime;
49
static unsigned nnanouptime;
50
static unsigned ngetmicrouptime;
50
static unsigned ngetmicrouptime;
51
static unsigned ngetnanouptime;
51
static unsigned ngetnanouptime;
52
SYSCTL_INT(_kern_timecounter, OID_AUTO, nmicrotime, CTLFLAG_RD, &nmicrotime, 0, "");
52
SYSCTL_UINT(_kern_timecounter, OID_AUTO, nmicrotime, CTLFLAG_RD, &nmicrotime, 0, "");
53
SYSCTL_INT(_kern_timecounter, OID_AUTO, nnanotime, CTLFLAG_RD, &nnanotime, 0, "");
53
SYSCTL_UINT(_kern_timecounter, OID_AUTO, nnanotime, CTLFLAG_RD, &nnanotime, 0, "");
54
SYSCTL_INT(_kern_timecounter, OID_AUTO, nmicrouptime, CTLFLAG_RD, &nmicrouptime, 0, "");
54
SYSCTL_UINT(_kern_timecounter, OID_AUTO, nmicrouptime, CTLFLAG_RD, &nmicrouptime, 0, "");
55
SYSCTL_INT(_kern_timecounter, OID_AUTO, nnanouptime, CTLFLAG_RD, &nnanouptime, 0, "");
55
SYSCTL_UINT(_kern_timecounter, OID_AUTO, nnanouptime, CTLFLAG_RD, &nnanouptime, 0, "");
56
SYSCTL_INT(_kern_timecounter, OID_AUTO, ngetmicrotime, CTLFLAG_RD, &ngetmicrotime, 0, "");
56
SYSCTL_UINT(_kern_timecounter, OID_AUTO, ngetmicrotime, CTLFLAG_RD, &ngetmicrotime, 0, "");
57
SYSCTL_INT(_kern_timecounter, OID_AUTO, ngetnanotime, CTLFLAG_RD, &ngetnanotime, 0, "");
57
SYSCTL_UINT(_kern_timecounter, OID_AUTO, ngetnanotime, CTLFLAG_RD, &ngetnanotime, 0, "");
58
SYSCTL_INT(_kern_timecounter, OID_AUTO, ngetmicrouptime, CTLFLAG_RD, &ngetmicrouptime, 0, "");
58
SYSCTL_UINT(_kern_timecounter, OID_AUTO, ngetmicrouptime, CTLFLAG_RD, &ngetmicrouptime, 0, "");
59
SYSCTL_INT(_kern_timecounter, OID_AUTO, ngetnanouptime, CTLFLAG_RD, &ngetnanouptime, 0, "");
59
SYSCTL_UINT(_kern_timecounter, OID_AUTO, ngetnanouptime, CTLFLAG_RD, &ngetnanouptime, 0, "");
60
60
61
/*
61
/*
62
 * Implement a dummy timecounter which we can use until we get a real one
62
 * Implement a dummy timecounter which we can use until we get a real one
(-)kern/subr_kobj.c (-4 / +4 lines)
Lines 47-58 Link Here
47
47
48
#include <sys/sysctl.h>
48
#include <sys/sysctl.h>
49
49
50
int kobj_lookup_hits;
50
u_int kobj_lookup_hits;
51
int kobj_lookup_misses;
51
u_int kobj_lookup_misses;
52
52
53
SYSCTL_INT(_kern, OID_AUTO, kobj_hits, CTLFLAG_RD,
53
SYSCTL_UINT(_kern, OID_AUTO, kobj_hits, CTLFLAG_RD,
54
	   &kobj_lookup_hits, 0, "")
54
	   &kobj_lookup_hits, 0, "")
55
SYSCTL_INT(_kern, OID_AUTO, kobj_misses, CTLFLAG_RD,
55
SYSCTL_UINT(_kern, OID_AUTO, kobj_misses, CTLFLAG_RD,
56
	   &kobj_lookup_misses, 0, "")
56
	   &kobj_lookup_misses, 0, "")
57
57
58
#endif
58
#endif
(-)kern/sys_generic.c (-3 / +3 lines)
Lines 603-611 Link Here
603
	return (error);
603
	return (error);
604
}
604
}
605
605
606
static int	nselcoll;	/* Select collisions since boot */
606
static u_int	nselcoll;	/* Select collisions since boot */
607
int	selwait;
607
u_int	selwait;
608
SYSCTL_INT(_kern, OID_AUTO, nselcoll, CTLFLAG_RD, &nselcoll, 0, "");
608
SYSCTL_UINT(_kern, OID_AUTO, nselcoll, CTLFLAG_RD, &nselcoll, 0, "");
609
609
610
/*
610
/*
611
 * Select system call.
611
 * Select system call.
(-)kern/vfs_subr.c (+1 lines)
Lines 138-143 Link Here
138
static int syncer_maxdelay = SYNCER_MAXDELAY;	/* maximum delay time */
138
static int syncer_maxdelay = SYNCER_MAXDELAY;	/* maximum delay time */
139
time_t syncdelay = 30;		/* max time to delay syncing data */
139
time_t syncdelay = 30;		/* max time to delay syncing data */
140
time_t filedelay = 30;		/* time to delay syncing files */
140
time_t filedelay = 30;		/* time to delay syncing files */
141
/* XXX time_t != int on all archetectures. */
141
SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, "");
142
SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, "");
142
time_t dirdelay = 29;		/* time to delay syncing directories */
143
time_t dirdelay = 29;		/* time to delay syncing directories */
143
SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, "");
144
SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, "");
(-)pc98/i386/machdep.c (-3 / +3 lines)
Lines 160-166 Link Here
160
#endif
160
#endif
161
SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
161
SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
162
162
163
int physmem = 0;
163
u_int physmem = 0;
164
int cold = 1;
164
int cold = 1;
165
165
166
static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code));
166
static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code));
Lines 173-179 Link Here
173
}
173
}
174
174
175
SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD,
175
SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD,
176
	0, 0, sysctl_hw_physmem, "I", "");
176
	0, 0, sysctl_hw_physmem, "IU", "");
177
177
178
static int
178
static int
179
sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
179
sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
Lines 184-190 Link Here
184
}
184
}
185
185
186
SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD,
186
SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD,
187
	0, 0, sysctl_hw_usermem, "I", "");
187
	0, 0, sysctl_hw_usermem, "IU", "");
188
188
189
static int
189
static int
190
sysctl_hw_availpages(SYSCTL_HANDLER_ARGS)
190
sysctl_hw_availpages(SYSCTL_HANDLER_ARGS)
(-)sys/kobj.h (-2 / +2 lines)
Lines 130-137 Link Here
130
 * Maintain stats on hits/misses in lookup caches.
130
 * Maintain stats on hits/misses in lookup caches.
131
 */
131
 */
132
#ifdef KOBJ_STATS
132
#ifdef KOBJ_STATS
133
extern int kobj_lookup_hits;
133
extern u_int kobj_lookup_hits;
134
extern int kobj_lookup_misses;
134
extern u_int kobj_lookup_misses;
135
#define KOBJOPHIT	do { kobj_lookup_hits++; } while (0)
135
#define KOBJOPHIT	do { kobj_lookup_hits++; } while (0)
136
#define KOBJOPMISS	do { kobj_lookup_misses++; } while (0)
136
#define KOBJOPMISS	do { kobj_lookup_misses++; } while (0)
137
#else
137
#else
(-)sys/sysctl.h (-2 / +2 lines)
Lines 349-356 Link Here
349
#define	HW_MODEL	 2		/* string: specific machine model */
349
#define	HW_MODEL	 2		/* string: specific machine model */
350
#define	HW_NCPU		 3		/* int: number of cpus */
350
#define	HW_NCPU		 3		/* int: number of cpus */
351
#define	HW_BYTEORDER	 4		/* int: machine byte order */
351
#define	HW_BYTEORDER	 4		/* int: machine byte order */
352
#define	HW_PHYSMEM	 5		/* int: total memory */
352
#define	HW_PHYSMEM	 5		/* uint: total memory */
353
#define	HW_USERMEM	 6		/* int: non-kernel memory */
353
#define	HW_USERMEM	 6		/* uint: non-kernel memory */
354
#define	HW_PAGESIZE	 7		/* int: software page size */
354
#define	HW_PAGESIZE	 7		/* int: software page size */
355
#define	HW_DISKNAMES	 8		/* strings: disk drive names */
355
#define	HW_DISKNAMES	 8		/* strings: disk drive names */
356
#define	HW_DISKSTATS	 9		/* struct: diskstats[] */
356
#define	HW_DISKSTATS	 9		/* struct: diskstats[] */
(-)sys/systm.h (-3 / +4 lines)
Lines 56-66 Link Here
56
56
57
extern int nswap;		/* size of swap space */
57
extern int nswap;		/* size of swap space */
58
58
59
extern int selwait;		/* select timeout address */
59
extern u_int selwait;		/* select timeout address */
60
60
61
extern u_char curpriority;	/* priority of current process */
61
extern u_char curpriority;	/* priority of current process */
62
62
63
extern int physmem;		/* physical memory */
63
/* XXX Should be segsz_t. */
64
extern u_int physmem;		/* physical memory */
64
65
65
extern dev_t dumpdev;		/* dump device */
66
extern dev_t dumpdev;		/* dump device */
66
extern long dumplo;		/* offset into dumpdev */
67
extern long dumplo;		/* offset into dumpdev */
Lines 70-76 Link Here
70
extern char *rootdevnames[2];	/* names of possible root devices */
71
extern char *rootdevnames[2];	/* names of possible root devices */
71
extern struct vnode *rootvp;	/* vnode equivalent to above */
72
extern struct vnode *rootvp;	/* vnode equivalent to above */
72
73
73
extern int boothowto;		/* reboot flags, from console subsystem */
74
extern u_int boothowto;		/* reboot flags, from console subsystem */
74
extern int bootverbose;		/* nonzero to print verbose messages */
75
extern int bootverbose;		/* nonzero to print verbose messages */
75
76
76
#ifdef	INVARIANTS		/* The option is always available */
77
#ifdef	INVARIANTS		/* The option is always available */
(-)vm/vm_meter.c (-1 / +1 lines)
Lines 309-315 Link Here
309
	v_pageout_free_min, CTLFLAG_RD, &cnt.v_pageout_free_min, 0, "");
309
	v_pageout_free_min, CTLFLAG_RD, &cnt.v_pageout_free_min, 0, "");
310
SYSCTL_UINT(_vm_stats_vm, OID_AUTO,
310
SYSCTL_UINT(_vm_stats_vm, OID_AUTO,
311
	v_interrupt_free_min, CTLFLAG_RD, &cnt.v_interrupt_free_min, 0, "");
311
	v_interrupt_free_min, CTLFLAG_RD, &cnt.v_interrupt_free_min, 0, "");
312
SYSCTL_INT(_vm_stats_misc, OID_AUTO,
312
SYSCTL_UINT(_vm_stats_misc, OID_AUTO,
313
	zero_page_count, CTLFLAG_RD, &vm_page_zero_count, 0, "");
313
	zero_page_count, CTLFLAG_RD, &vm_page_zero_count, 0, "");
314
#if 0
314
#if 0
315
SYSCTL_INT(_vm_stats_misc, OID_AUTO,
315
SYSCTL_INT(_vm_stats_misc, OID_AUTO,

Return to bug 19720