Commit Graph

5724 Commits

Author SHA1 Message Date
yamt
949e16d902 use binuptime for l_stime/l_rtime. 2007-12-22 01:14:53 +00:00
yamt
bf162a4cf7 vmem_alloc: round-up size only when necessary. suggested by Andrew Doran. 2007-12-22 01:11:37 +00:00
yamt
ad5800688c reduce #ifdef __HAVE_TIMECOUNTER. 2007-12-22 00:35:32 +00:00
yamt
5ffcee498d provide binuptime etc for !__HAVE_TIMECOUNTER. 2007-12-22 00:34:37 +00:00
jmcneill
a992c95cdd Fix handling of directed pmf events. 2007-12-21 23:49:55 +00:00
ad
5b42fe1209 KM_NOSLEEP -> KM_SLEEP for clarity. 2007-12-21 12:05:39 +00:00
ad
6ef6e00632 KM_NOSLEEP -> KM_SLEEP 2007-12-21 12:04:19 +00:00
ad
73157b0e11 - Support two different sizes of pool_cache group. The default has 14 or 15
items, and the new large groups (for busy caches) have 62 or 63 items.
- Add PR_LARGECACHE flag as a hint that a pool_cache should use large groups.
  This should be eventually be tuned at runtime.
- Report group size for vmstat -C.
2007-12-20 23:49:10 +00:00
dsl
6fb2884c3a regen 2007-12-20 23:07:25 +00:00
dsl
7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
elad
17c98b1431 Make solisten() take an lwp pointer like the rest, so it can be passed down
to pr_usrreq.
2007-12-16 21:25:59 +00:00
dyoung
2bfef6f106 Add config_deferred() for forcing the deferred configuration to
run, which we need to do from drvctl(4) sometimes.

Add device_foreach_child() for calling a function on each child of
a device_t.

Add config_detach_children() for detaching all of the children of
a device (uses device_foreach_child()).
2007-12-16 20:49:52 +00:00
yamt
5755384fd5 fix a comment. 2007-12-15 18:20:11 +00:00
ad
bed92f8580 sched_mutex -> runqueue_lock 2007-12-15 03:31:36 +00:00
pooka
2780a147ca nuke the leprechaun from VOP_ACCESS
Paul Lavoie, kern/37542
2007-12-14 16:48:24 +00:00
jmcneill
e692a6c76a Introduce pmf_system_bus_resume. In the ACPI S3 resume path, use this to
separate powering up devices from restoring their state. This is required
on some machines where AcpiLeaveSleepState can fail due to an attempt to
access a powered off device.
2007-12-14 01:29:29 +00:00
yamt
555511ff96 include <sys/user.h>. 2007-12-13 05:25:03 +00:00
yamt
0c38201391 add ddb "whatis" command. inspired from solaris ::whatis dcmd. 2007-12-13 02:45:09 +00:00
yamt
b839442793 don't forget to initialize ph_off for PR_NOTOUCH. 2007-12-13 01:22:50 +00:00
ad
7b8aa25abc Change the ncpu test to work when a pool_cache or softint is initialized
between mi_cpu_attach() and attachment of the boot CPU. Suggested by mrg@.
2007-12-11 19:07:27 +00:00
lukem
961afe5035 use __KERNEL_RCSID() instead of __RCSID() 2007-12-11 12:16:34 +00:00
jmcneill
4d6cb5af6b Use PRI_NONE for the event workqueue. 2007-12-11 01:20:06 +00:00
jmcneill
5bd9c210ef Use malloc/free instead of kmem_alloc/kmem_free in pmf_event_inject, since
the latter is not safe to use from a softint. Pointed out by rmind.
2007-12-11 01:00:45 +00:00
xtraeme
947675b6c4 Remove useless returns at the end of void functions. 2007-12-10 23:50:25 +00:00
ad
eb83663daa softint_establish: hack around CPU_INFO_FOREACH() not working before
configure() on some architectures.
2007-12-10 20:43:43 +00:00
elad
9725bcfd97 - Use KAUTH_ARG() instead of casts,
- Don't ignore return value of settime() in sysctl_kern_rtc_offset(), as
  suggested by yamt@.

Note: the kauth(9) call in sysctl_kern_rtc_offset() is bogus, but this will
be addressed separately.
2007-12-10 18:58:02 +00:00
jmcneill
6829a93c1c Use aprint_debug to notify the user that a device does not implement the
power management framework rather than aprint_error.
2007-12-09 21:11:57 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
pooka
db06a930e6 Remove cn_lwp from struct componentname. curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
2007-12-08 19:29:36 +00:00
ad
a9eb927490 Merge from vmlocking2: don't hold semlock across copyin(). 2007-12-08 15:02:46 +00:00
ad
461cd942ea Merge changes from vmlocking2 branch. 2007-12-08 15:00:13 +00:00
elad
51fe5bc63c Replace usage of p_cred in kauth(9) call with kauth_cred_get().
okay yamt@.
2007-12-08 13:31:03 +00:00
ad
e23d4a9b80 Nothing uses shared -> exclusive upgrades any more, so remove the code.
This is good since they are effectively the same as ...

	lockmgr(&lock, LK_RELEASE);
	lockmgr(&lock, LK_EXCLUSIVE);

.. and therefore don't behave as expected.
2007-12-06 17:05:07 +00:00
rmind
6fcda0686a Increase the default limit of SEM_MAX, allow changing of limit
dynamically via sysctl.  Closes PR/36979.
2007-12-06 01:27:21 +00:00
ad
f2fb0b3870 mutex_init: use 'if' instead of 'switch' to avoid complaints from the
compiler.
2007-12-06 01:18:46 +00:00
pooka
4e38160d4d Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
2007-12-05 17:19:46 +00:00
ad
598ab03ad0 Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.
2007-12-05 07:06:50 +00:00
ad
8cd835a351 pool_init, pool_cache_init: hack around IP input processing which can
not yet safely block without severely confusing soo_write() and friends.
If the pool's IPL is IPL_SOFTNET, initialize the mutex at IPL_VM so that
it's a spinlock. To be dealt with correctly in the near future.
2007-12-05 06:52:01 +00:00
ad
b21038696d mutex_init: make MUTEX_DEFAULT + IPL_SOFT* return an adaptive mutex. 2007-12-05 06:50:07 +00:00
mjf
d4a648c345 Implement a new magic string for magic symlinks, @ruid, which exapnds to the
real user id of the process and use this magic string for per-user tmp.
This should fix PR/35687

Kernel parts reviewed by wrstuden@
2007-12-04 22:09:01 +00:00
ad
deb8b3146e Use atomics to maintain nprocs. 2007-12-04 16:56:16 +00:00
ad
bb7ddbf003 rw_vector_enter: assert !cpu_intr_p(). 2007-12-04 09:13:59 +00:00
ad
3a2e0f7355 ktd_callout: ktrace_lock can be acquired now. 2007-12-04 09:08:58 +00:00
ad
72bfe5209f ttysigintr: proclist_lock can be taken now. 2007-12-04 08:57:35 +00:00
elad
5187640465 Don't make root an exception when enforcing rlimits.
Suggested by yamt@ months ago; okay christos@.
2007-12-03 22:37:34 +00:00
ad
27f20ecf58 Soft interrupts can now take proclist_lock, so there is no need to
double-lock alllwp or allproc.
2007-12-03 20:26:24 +00:00
ad
9027344d32 For the slow path soft interrupts, arrange to have the priority of a
borrowed user LWP raised into the 'kernel RT' range if the LWP sleeps
(which is unlikely).
2007-12-03 17:14:59 +00:00
ad
4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
pooka
01f5a6d143 Some boys take a beautiful seltrue_filtops and hide her away from
the rest of the world - but let's not.
2007-12-03 15:21:57 +00:00
christos
9e2c6405b0 kill a diagnostic for now. 2007-12-03 02:20:24 +00:00