Commit Graph

160698 Commits

Author SHA1 Message Date
xtraeme
bd0460e614 <sys/proc.h> is needed to get nprocs... fixes the build on amd64. 2007-07-21 23:39:46 +00:00
xtraeme
5623c9a1de Convert sysmon_taskqueue to use mutex(9) and condvar(9) and initialize
them in init_main.c via sysmon_task_queue_preinit().

Reviewed and ok by ad@.
2007-07-21 23:15:16 +00:00
pooka
a97de7b959 nuke homegrown getcwd_common() decl 2007-07-21 22:47:36 +00:00
rumble
23622f237e Ensure that the special host token '*SMBSERVER' is not automatically
hyphenated, as this can lead to some confusion (e.g.: '*SMB-SERVER' isn't
valid).

(Thanks Wiz!)
2007-07-21 22:41:09 +00:00
xtraeme
e25c1ce382 - Add more sensors after the two that have duplicate descriptions, to verify
they work fine.
- Remove the workaround for sensor with index 0, it's fixed now.
2007-07-21 22:30:21 +00:00
ad
e7e35c1d1d Temporarily work around an assertion from mutex_enter. 2007-07-21 22:14:42 +00:00
xtraeme
38371ef4fb - Do not touch sme_nsensors when sensors with duplicate description are
found, rather maintain a global counter for all sensors that are unique,
  and use this global to get the correct index in the array.
- Use prop_array_set() rather than prop_array_add() for adding dictionaries
  into our global array. Thanks to yamt@.
- Overwrite the sensor index in the first sensor of a device, to avoid
  a problem with LKMs where the first sensor gets the index of all edata
  structures allocated in kernel.
- Add missing proto for sme_register_sensorname().

All them fix another part of yamt@'s PR.
2007-07-21 22:11:02 +00:00
ad
9a40651fc7 VM_MAP_BUSY, VM_MAP_WANTLOCK are no more. 2007-07-21 20:54:12 +00:00
ad
6e948e8304 Fix DEBUG build. 2007-07-21 20:52:59 +00:00
ad
75c47bdc49 NetBSD 4.99.25 - struct disk changed, . 2007-07-21 19:54:03 +00:00
ad
b5a9ff06f1 Replace some uses of lockmgr(). 2007-07-21 19:51:47 +00:00
matt
5aaa0be03a Don't call proc_trampoline_mp when starting a lwp. (XXX why did we do this
before?)
2007-07-21 19:26:14 +00:00
ad
54d8f5b6c1 +#include <sys/conf.h> 2007-07-21 19:23:03 +00:00
ad
4688843d2b Merge unobtrusive locking changes from the vmlocking branch. 2007-07-21 19:21:53 +00:00
ad
253ada188c Move declaration of seltrue_kqfilter() to conf.h, where it's needed. 2007-07-21 19:20:39 +00:00
matt
ae0a442af3 Make MP kernels build again. Heck, if I'm lucky, maybe these changes will
even make one boot.
2007-07-21 19:12:15 +00:00
ad
744a92f0f8 Don't depend on uvm_extern.h pulling in proc.h. 2007-07-21 19:06:20 +00:00
xtraeme
82313816f8 Use the mutex that belongs to the specific task and do not mix them
blindly.

	- sme_list_mtx to access to the linked lists sme_list/sme_names_list.
	- sme_mtx to access to the data in the sysmon envsys device.
2007-07-21 17:18:00 +00:00
xtraeme
2ae3d17915 sme_update_dictionary: if there's a sensor with duplicate description,
there's no need to decrease 'i' again, just sme->sme_nsensors is enough.

Reported by yamt@.
2007-07-21 16:16:59 +00:00
xtraeme
ed4bc532ce Simplify previous. 2007-07-21 15:45:12 +00:00
dsieger
206d59d40f Fix a glitch in previous commit:
s/mi_switch 9/mi_switch.9/

Reported by Paul Goyette.
2007-07-21 15:35:46 +00:00
xtraeme
bbb2e25d8f Skip sensor with duplicate descriptions in the COMPAT_40 case, verified
with envstat(8) from netbsd-4 and sys/lkm/misc/envsys2.

Fixes another part of kern/36673 by yamt@.
2007-07-21 15:30:04 +00:00
xtraeme
3fbf42ac66 - Add sme_events_destroy() to stop/destroy the callout and workqueue if
there are no more events.
- Add sme_event_unregister_all() to remove all events associated with
  a device and use it in sysmon_envsys_unregister() to fix a "use-after-free".
- Check return error of sme_sensor_upfoo() in sme_make_dictionary() and
  return it rather than 0 all the time.
- Add more KASSERTS.
2007-07-21 15:16:58 +00:00
tsutsui
78c4167012 - kern_kern_microtime.c is gone, so replace references of it
with new kern/kern_cctr.c in TODO comments
- also replace struct cc_microtime_state member in struct cpu_info
  with struct cctr_state defined in <sys/cctr.h>, which is unused yet
  in this port
2007-07-21 12:15:05 +00:00
kiyohara
2fd3ecbe55 We wait for the clearness of the NFORCE_SMB_PROTOCOL as transfer completion.
And, the maximum is assumed to be 10msec.  I think that the thing for which
it waits any further is dangerous for the system.
2007-07-21 12:14:27 +00:00
xtraeme
b2537bf157 Some fixes for kern/36673 by yamt@:
- sme_register_sensorname: there's no need to handle empty list case.
- 'obj' argument in sme_sensor_upstring and similar functions is useless:
  removed the obj argument from the functions, it's handled in the function
  itself now.
- check for more errors in sme_make_dictionary() and
  sysmon_envsys_createplist().
2007-07-21 12:11:27 +00:00
tsutsui
f3050cbf0d Remove obsolete cc_microtime() and cc_microset() support.
All ports which used this file have been switched to using
new timecounter(9) APIs.
2007-07-21 12:09:54 +00:00
tsutsui
2dd7a425a4 Note timecounter(9) and todr(9) support on alpha. 2007-07-21 12:03:31 +00:00
tsutsui
13084fc846 Add MI todr(9) support and timercounter(9) support with kern_cctr.c to alpha:
- use todr(9) API with MI mc146818(4) driver and remove homegrown
  todr stuff from MD alpha/clock.c and alpha/mcclock.c
- also remove obsolete cc_microtime stuff from MD code
- add ci_pcc_freq member in struct cpu_info for cpu_frequency(), and
  calibrate it with mc146818 interval clock in mcclock attachment
- call cc_init() in cpu_initclocks(9) because all alpha cpus have
  a pcc counter

Tested on DEC 3000/300 and AlphaPC 164, but not on any SMP machines yet.
2007-07-21 11:59:55 +00:00
tsutsui
ccee2438df Add sys/kern/kern_cctr.c, which contains MI cpu cyclecounter based
timecounter(9) support functions split out from sys/arch/x86/x86/tsc.c.
Written by and ok'ed to commit by kardel@.

Also add <sys/cctr.h>, which is copied from #ifdef __HAVE_TIMECOUNTER
part of <sys/cc_microtime.h> to migrate MI kern_cctr.c per each port.
2007-07-21 11:47:07 +00:00
xtraeme
9293272695 Erm... fix previous. 2007-07-21 11:11:10 +00:00
xtraeme
6d38d74b11 Fix a logic bug: report a message and error if -s or -m is being used
without -d.
2007-07-21 10:59:57 +00:00
pooka
b0e54182a4 document puffs_framev_enqueue_waitevent 2007-07-21 09:36:49 +00:00
pooka
e30ed21300 Return -1 and errno from puffs_framev_enqueue_waitevent instead of
a direct error value.
2007-07-21 09:29:07 +00:00
dsieger
93f4326679 Remove obsolete content about cpu_switchto() from ctxsw(9) and rename
it to mi_switch(9).

Suggested by yamt@
2007-07-21 08:51:31 +00:00
dyoung
edc2327d04 Cosmetic: remove superfluous parentheses. Compare pointers with
NULL instead of testing "truth."  Remove unnecessary casts to void*
in memset() calls.
2007-07-21 03:12:10 +00:00
dyoung
49412ed4f9 Use NULL instead of 0 for null pointers. 2007-07-21 02:24:11 +00:00
agc
217f538f17 Add pcn device - useful for VMware guests, as VMware emulates a pcn. 2007-07-21 02:24:03 +00:00
nonaka
c3fdd97b8c Add missing callout_init(). 2007-07-21 01:47:58 +00:00
xtraeme
ad4c687095 Re-add a strlcpy() to copy the new description in edata->desc, if the
object in dictionary was updated succesfully.
2007-07-21 00:05:54 +00:00
tsutsui
0681619847 Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick.  Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc).  Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise.  Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.
2007-07-20 22:26:29 +00:00
rumble
da6e256110 Comment FILECORE and add ADOSFS. 2007-07-20 22:26:12 +00:00
macallan
7f13961be1 pull in mulaw with dbri
Although dbri supports mulaw and a-law in hardware we can unly use it in mono
so for 8bit stereo we need to use sw encoding
2007-07-20 22:23:08 +00:00
macallan
0d2dd3f5fa make this work with the onboard codec found on my SS20 2007-07-20 22:21:51 +00:00
tsutsui
92501230f2 Defer callout_startup2() (which calls softintr_establish(9)) call
after cpu_configure(9) for now because softintr(9) is initialized
in cpu_configure(9) on some ports.

Ok'ed by ad@ on current-users, and fixes hangs on m68k ports
during scsi probe.
2007-07-20 22:15:47 +00:00
christos
ce7376f2ed more cygwin fixes. 2007-07-20 18:58:14 +00:00
drochner
adf4078381 Fix a possible integer overflow in buffer length calculation due to
insufficient check of snprintf()'s return value, see gentoo bug #184815.
The exploit provided appearently doesn't trigger the overflow in
NetBSD; this might be due to different error return behavior of snprintf
implementations, or due to the fact that out tcpdump is still 3.8.3
while the bug was reported against 3.9.x. The fix looks correct in any
case.
The exploit caused an endless loop at another place instead, due
to an obvious bug, so fix this too.
Also apply another patch which was applied to the 3.8 branch upstream
but never released: rev. 1.72.2.5, infinite loop protection for ldp and bgp

We should update tcpdump to 3.9.x.
2007-07-20 17:12:37 +00:00
pooka
9137aeda4b In sync, skip over vnodes based on if they are clean rather than
if they have pages.
2007-07-20 16:46:43 +00:00
christos
52c8d9f862 cygwin support. 2007-07-20 16:39:05 +00:00
yamt
97c7bbe6b8 - fix decreasing of vfs.nfs.iothreads after the recent partial merge
of vmlocking.
- don't make nfsiod exit with requests left.
- make NFSSVC_BIOD a dummy so that nfsiod can be simplified.
2007-07-20 15:36:41 +00:00