Commit Graph

88688 Commits

Author SHA1 Message Date
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 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
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 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
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
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
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
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
yamt 4b7209cf60 hide internals of struct work. 2007-07-20 12:43:25 +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
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
dsl f3ade04dc0 include sys/cdefs.h 2007-07-19 22:17:23 +00:00
pooka 3d29492693 add debug printf 2007-07-19 22:05:22 +00:00
dsl cb40f24fa8 include sys/cdefs.h 2007-07-19 22:00:04 +00:00