Commit Graph

95431 Commits

Author SHA1 Message Date
mlelstv
76a664c61a Drop !cv_has_waiters assertion.
bdirty() is called from within biodone() processing before
waiters have been woken up and removed.

N.B. it is also used by smbfs.
2008-06-17 19:14:14 +00:00
tsutsui
3de743094e No need to terminate DMA in si_dma_poll(). 2008-06-17 18:24:21 +00:00
tsutsui
36bc2e34d4 Implement si_dma_poll() properly so that crashdump works with DMA xfer. 2008-06-17 17:31:51 +00:00
phx
9645c1f1c1 Renamed via_pegasos_mapregs_native to via_mapregs_compat_native, after
discussion with simonb. There may be other architectures who want to use
this function.
2008-06-17 17:03:14 +00:00
he
bc897d8e45 Typo correction to restore buildability. 2008-06-17 16:27:30 +00:00
christos
f5be32608a PR/38942: Pedro F. Giffuni: no support for birthtime in utimes(2). 2008-06-17 16:18:01 +00:00
tsutsui
d7d2a525b1 Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t. 2008-06-17 16:17:21 +00:00
tsutsui
57b3a1930e Regen from syscalls.master rev 1.204. 2008-06-17 16:13:37 +00:00
he
f776c48636 <sys/syscallargs.h> now needs <sys/sched.h> included for the cpuset_t type
declaragion, so comply with that so that this builds again.
2008-06-17 16:13:08 +00:00
tsutsui
2bc3b0c694 Regen from syscalls.master rev 1.204:
> Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t.
2008-06-17 16:07:57 +00:00
tsutsui
33dfc34006 Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t. 2008-06-17 16:05:23 +00:00
mlelstv
cc60ba374c fix copy&paste error 2008-06-17 15:05:15 +00:00
mlelstv
b0199ee162 One more place to mark an iobuf busy before use. 2008-06-17 15:04:12 +00:00
reinoud
f6a70673ba Mark a buffer busy in getnewbuf() when it came from the pool_cache since
its not on a free list.

Also change buf_init() to not automatically mark buffers `busy' since this
only makes sense for bufcache buffers.

Mark all buf_init'd buffers 'busy' on the places where they ought to be
flagged as such to not confuse the buffer cache.

Fixes PR 38923.
2008-06-17 14:53:10 +00:00
reinoud
a61f3416a6 Change comments on marking buffer busy. 2008-06-17 14:14:05 +00:00
cube
c0bb1f4b42 Use MUTEX_DEFAULT to initialise the mutex, per martin@'s input. 2008-06-17 12:59:32 +00:00
ad
4810cbe2bf sleepq_block: add a comment. 2008-06-17 09:11:25 +00:00
ad
629b15f463 Update a comment. 2008-06-17 09:08:52 +00:00
cegger
d9fad28f12 Disable the check introduced in rev. 1.184. It works in first place, but not in second place.
The new check is not enough to detect sparse files reliably.
per discussion with bouyer
2008-06-17 09:01:56 +00:00
chris
464e92d443 Fix two KASSERT(value | (C1|C2)) to KASSERT(value & (C1|C2)) so that it
tests for something, rather than always being true.

Pointed out by Andy Shevchenko in:
http://mail-index.netbsd.org/port-arm/2008/06/17/msg000255.html
2008-06-17 08:04:26 +00:00
mlelstv
2f1d68867c add rnd(4) hooks. Note that interrupts on bge hardware may occur
with certain patterns, especially when the interrupt mitigation
logic kicks in. So this might be a very weak entropy source.
2008-06-17 06:08:46 +00:00
mlelstv
f1f0ceb1ae No longer try to start sending packets from status change handler.
This is already handled by the general status change code.

For non-TBI devices always call mii_tick(). This fixes ifwatchd
signalling.
2008-06-17 06:04:07 +00:00
yamt
56fc124dff 4.99.65; bump for cpuset changes 2008-06-17 02:59:08 +00:00
yamt
52d8b786fc - uvm_pagereplace: don't try to insert multiple pages with the same offset
into uvm_object rbtree.
- inline static -> static inline
2008-06-17 02:30:57 +00:00
yamt
90e623a314 initialize uvm_loanzero_object correctly after page-cache rbtree changes. 2008-06-17 02:29:10 +00:00
dyoung
fac54884d4 Repair a discrepancy between the 802.11 standard and ath(4) operation
where transmit fragmentation is concerned.

Extract from ath_tx_start() the code for subtracting padding from
the packet length, creating subroutine deduct_pad_bytes().  Note
that the arithmetic in deduct_pad_bytes() is suspicious.

Use deduct_pad_bytes() to repair the computation of the 802.11
Duration field for fragments.  The computation used to leave out
the FCS, among other things.

Some discrepancies between ath(4) operation and the standard may
still remain.  According to my observations, the gaps between
transmitted fragments may be approximately 8 microseconds too long.
2008-06-17 02:01:58 +00:00
christos
7a9a590e57 regen 2008-06-16 20:00:53 +00:00
christos
5f09cf30c9 an attempt at ptrace32 2008-06-16 19:57:43 +00:00
oster
bd09a31134 We don't care about md devices here. Fixes issue reported by Jukka Salmi
on current-users.  Thanks!
2008-06-16 16:58:26 +00:00
ad
f9e99b470b PPWAIT is now in proc::p_lflag. 2008-06-16 12:25:54 +00:00
ad
cad3a145a3 PR kern/38761: new (?) race in buffer cache code
Back out the workaround from cv_has_waiters(), which is not longer needed.
Removal was missed earlier.
2008-06-16 12:03:01 +00:00
ad
a9c4cefebd PR kern/38927: processes getting stuck in uvm_map (cv_timedwait), hanging
machine

Assume that a vnode (and associated data structures) costs 2kB in the
worst imaginable case. Don't allow sysctl to set desiredvnodes to a
value that would use more than 75% of KVA or 75% of physical memory.
2008-06-16 11:26:28 +00:00
drochner
dd989679ec -plug a minimal memory leak on attach/detach
-avoid unnecessary tree walks and port status requests:
 -acknowledge hub status change notifications (but do nothing)
 -clear cached port status change bits earlier (but not on ehci, due
  to an ehci driver bug)
-do the ehci check on attach rather than a string comparision at runtime
2008-06-16 10:37:54 +00:00
ad
8c49cfa7b6 Make pmap_extract() lockless. Reviewed by chs@ who reports a ~1% reduction
in system time during a kernel build on a quad core amd64 system.
2008-06-16 10:31:03 +00:00
drochner
94d328c85c fix selective port resume signaling (not used in normal operation,
just for correctness)
2008-06-16 10:29:41 +00:00
drochner
c4003ef269 more cleanup: the sc_dev backpointer is unused, remove it 2008-06-16 10:27:47 +00:00
ad
c0cd593d89 uvm_swapout: try to lock the vm_map before calling pmap_collect. 2008-06-16 10:19:57 +00:00
ad
45850c3df9 PPWAIT need only be locked by proc_lock, so move it to proc::p_lflag. 2008-06-16 10:15:57 +00:00
ad
672f91757e PR kern/38761: new (?) race in buffer cache code
- Back out the previous workaround now that the sleep queue code has
  been changed to never let the queue become empty if there are valid
  waiters.
- Use sleepq_hashlock() to improve clarity.
- Sprinkle some assertions.
2008-06-16 10:03:47 +00:00
ad
461a5fb24b PR kern/38761: new (?) race in buffer cache code
sleepq_changepri, sleepq_lendpri: don't let an active sleep queue head become
empty. The condvar code inspects the queue head without holding the sleep
queue lock and needs to see a non-empty queue if there are waiters.
2008-06-16 10:02:15 +00:00
ad
a3deca2578 - Add sleepq_hashlock(). Like sleeptab_lookup() but only returns the lock
corresponding to a given wait channel.
- sleepq_enter: reduce number of function calls made.

No functional change.
2008-06-16 09:56:46 +00:00
ad
5adf7333fd - PPWAIT is need only be locked by proc_lock, so move it to proc::p_lflag.
- Remove a few needless lock acquires from exec/fork/exit.
- Sprinkle branch hints.

No functional change.
2008-06-16 09:51:14 +00:00
ad
b0ac1133c6 Sprinkle some assertions. 2008-06-16 09:48:13 +00:00
ad
5bfa865311 Sprinkle more assertions. 2008-06-16 09:47:55 +00:00
ad
b7f5063255 lwp_lock_retry: return a pointer to the lock acquired. No functional change. 2008-06-16 09:45:20 +00:00
cegger
54a1f88f19 fix typo. should compile again. 2008-06-16 08:36:51 +00:00
mlelstv
c2b3f9acc5 Compute the correct number of pages spanned by the firmware.
The old code just uses the firmware size and rounds up to full
pages. However, if the firmware isn't loaded aligned to a page
boundary (which it isn't), then one more page (and thus DMA
segment) might be necessary.
2008-06-16 06:19:24 +00:00
skd
66fcc9f90f Add some locking, runs with DIAGNOSTIC. 2008-06-16 02:36:27 +00:00
rmind
481ae1556f - Add general cpuset macros.
- Use kcpuset name for kernel-only functions.
- Use cpuid_t to specify CPU ID.
- Unify all cpuset users.

API is expected to be stable now.
2008-06-16 01:41:20 +00:00
christos
09e715922e regen 2008-06-16 01:00:21 +00:00