Commit Graph

5712 Commits

Author SHA1 Message Date
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
christos 33cb8be1db - add an elf aux vector entry for implementing $ORIGIN.
- the code to convert from a vnode to a path is commented out now until
  a better solution is implemented. Only absolute paths work for now
  (which is most of the cases).

requested by core
2007-12-03 02:06:57 +00:00
ad 208085366c sys__lwp_create: set in the correct lock when the LWP is created suspended. 2007-12-02 15:49:38 +00:00
ad e2aaefb859 - mi_switch: adjust so that we don't have to hold the old LWP locked across
context switch, since cpu_switchto() can be slow under certain conditions.
  From rmind@ with adjustments by me.
- lwpctl: allow LWPs to reregister instead of returning EINVAL. Just return
  their existing lwpctl user address.
2007-12-02 14:55:32 +00:00
hannken d556dc98b0 Fscow_run(): add a flag "bool data_valid" to note still valid data.
Buffers run through copy-on-write are marked B_COWDONE.  This condition
is valid until the buffer has run through bwrite() and gets cleared from
biodone().

Welcome to 4.99.39.

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
2007-12-02 13:56:15 +00:00
yamt ee39418409 getnewvnode: remove a homegrown decl. of uvm_vnodeops. 2007-12-01 10:36:47 +00:00
ad b470ab628d Use membar_*(). 2007-11-30 23:05:43 +00:00
rmind cbb391653c aio_enqueue_job: Fix the mix of previous commits, that is, increase
aio_jobs_count only once; also, decrease it in second error case too.

Noted by <ad>.
2007-11-30 17:39:43 +00:00
yamt 8ec86368e9 - reduce the number of VOP_ACCESS calls for O_RDWR. for nfs, it reduces
the number of rpcs.
- reduce code duplication.
2007-11-30 16:52:19 +00:00
ad 045db07a6d Fix minor error in previous. 2007-11-29 19:50:28 +00:00
ad 4acbed1e86 Fix DIAGNOSTIC build. 2007-11-29 18:33:29 +00:00
ad e7e13da4c3 Use atomics to adjust lim->pl_refcnt. 2007-11-29 18:21:03 +00:00
ad 1cb3506898 Use atomics to adjust filedesc::fd_refcnt. 2007-11-29 18:17:47 +00:00