Commit Graph

160779 Commits

Author SHA1 Message Date
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
christos
f228decd49 PR/36668: Matthias Kretschmer: Silence lint -aa complaints about "may lose
accuracy".
2007-07-20 15:07:15 +00:00
xtraeme
d78abcef3d Add another missing break if updating the drive-state object fails. 2007-07-20 14:59:58 +00:00
pooka
e2dc8334cf simplify send loop 2007-07-20 14:55:42 +00:00
xtraeme
2e71dae02e Example LKM to test envsys2 and verify that some things work as
expected.
2007-07-20 14:21:00 +00:00
xtraeme
7282589dc3 Move the functions to create/update objects in a dictionary into its
own file, and DO NOT MAKE THEM inline AS IT IS WRONG.

Looks like I'm very stupid and I didn't know what inline meant.
Thank you very much YAMAMOTO Takashi.
2007-07-20 14:10:22 +00:00
he
2eb0397ad6 Fix three identical typos in the previous (fs_fstypename -> f_fstypename). 2007-07-20 13:48:24 +00:00
hannken
7111447178 Move intr_init() from cpu_configure() to cpu_startup() so softintrs
pool_get() works again.
2007-07-20 13:41:53 +00:00
hannken
89bef33fc3 Bump SYMTAB_SPACE so that it fits again. 2007-07-20 13:39:58 +00:00
pooka
242bfad7a6 support poll 2007-07-20 13:18:09 +00:00
pooka
343e8df31e Add puffs_framev_enqueue_waitevent, which waits for read/write/error
events from an i/o descriptor.  It yields until an event happens
and continues execution when the event loop notices the event has
happened.
2007-07-20 13:14:55 +00:00
yamt
c83659bb5a add audit-packages.debug. 2007-07-20 12:45:46 +00:00
yamt
4b7209cf60 hide internals of struct work. 2007-07-20 12:43:25 +00:00
yamt
8a52d96235 add a comment. 2007-07-20 12:41:07 +00:00
xtraeme
20fa88e24a Add a missing break if error when setting a new description. 2007-07-20 10:47:25 +00:00
xtraeme
bf9c65870b Replace the macros to create/update objects in dictionary with three
inline functions, suggested by yamt@.

This also gets rid of a few gotos.
2007-07-20 10:40:07 +00:00
pooka
99db048c69 note caveat with puffs_node_poll 2007-07-20 10:01:24 +00:00
heinz
635671d6ac This document ends up in processed form on the NetBSD web site
(currently as http://www.NetBSD.org/docs/software/3rdparty/), so make
sure that "NetBSD.org" is spelled exactly like that.
2007-07-20 08:15:34 +00:00
xtraeme
7867660706 Fix typo that wasn't allowing to change the rfact. 2007-07-20 07:23:47 +00:00
dsl
1b3b0fe4f7 include sys/cdefs.h before opt_xxx.h 2007-07-19 22:18:54 +00:00