Commit Graph

166685 Commits

Author SHA1 Message Date
ad 25153c3ec9 PR kern/37706 (forced unmount of file systems is unsafe):
- Do reference counting for 'struct mount'. Each vnode associated with a
  mount takes a reference, and in turn the mount takes a reference to the
  vfsops.
- Now that mounts are reference counted, replace the overcomplicated mount
  locking inherited from 4.4BSD with a recursable rwlock.
2008-01-30 11:46:59 +00:00
ad 508b2997d7 Fix pasto. Spotted by pooka@ 2008-01-30 10:22:02 +00:00
ad 3490efcc63 Replace struct lock on vnodes with a simpler lock object built on
krwlock_t. This is a step towards removing lockmgr and simplifying
vnode locking. Discussed on tech-kern.
2008-01-30 09:50:19 +00:00
ad 3da93d9e92 splhigh == splipi 2008-01-30 09:02:46 +00:00
lukem d9ce2acdd5 Explicitly note the unsupported requests from RFC 2228.
Improvements from FreeBSD:
* Document `ftp-chroot' from login.conf(5).
* Document that SIZE is prevented for files > 10240 bytes via ASCII transfers.
2008-01-30 02:16:35 +00:00
jmcneill f5f534770c pmf: Naively track online/offline state of APs during suspend/resume. 2008-01-30 01:10:21 +00:00
jmcneill a9ec01ccfb pmf_event_deregister was passing M_WAITOK to free instead of M_DEVBUF,
pointed out by simonb
2008-01-30 00:50:17 +00:00
ad ec93662039 Another locking botch. 2008-01-30 00:43:47 +00:00
mrg 9e023272db initialise "paddr_t lastaddr" to 0 in the cases it is not otherwise
set.  previously, if the stack garbage happened to match the
"curaddr" in _bus_dmamap_load_buffer(), the wrong thing may have
happened.
2008-01-29 23:46:21 +00:00
tron ce82b598ec Add support for function keys F16 to F19 as present on e.g. the new
Apple aluminum keyboard.

Patch contributed by Michael Piotrowski in PR kern/37788, reviewed
by Matthias Drochner.
2008-01-29 20:54:32 +00:00
tls 651160c66b Fix accidental checkin inverting the sense of cryptodev_allowsoft, which
is crazy but has always documented.
2008-01-29 20:33:44 +00:00
tls 16a9229cf8 Sigh. What was meant here was an ITR register value of 1500, for 2604
interrupts/sec -- not the other way around.  Caught by yamt.

When I can confirm that it won't lock the chip up on the models claimed
to be problematic, I'll probably adjust the packet timers a bit further
to see if I can get latency down under low load.  But this should be
better.
2008-01-29 20:24:41 +00:00
xtraeme d187549ef6 Pass the same size to kmem_alloc(9) and kmem_free(9), this fixes
the kmem_poison_check panic on DEBUG kernels.
2008-01-29 19:35:05 +00:00
skrll f7a8a22745 Catch up with "Refactor in_cksum/in4_cksum/in6_cksum implementations".
Hi Joerg.
2008-01-29 19:29:37 +00:00
skrll dbf783eccf bcopy -> memcpy 2008-01-29 18:46:18 +00:00
pooka 81de436273 init genfs_node before potential vput() 2008-01-29 18:22:24 +00:00
pooka 13d9236c46 Nuke #ifdef __OtherOS__ clutter to make maintaining slightly easier. 2008-01-29 18:21:10 +00:00
pooka bc13687cf3 default owner to getuid() 2008-01-29 18:17:21 +00:00
ad 1b6e5c8b2e Remove reference to lockmgr(). 2008-01-29 18:06:14 +00:00
dyoung 534869a24d Use device_t. Add a handler for child detachment. Now I can detach
cd0 at atapibus0 without getting a panic when atapibus0 detaches,
later.
2008-01-29 17:26:57 +00:00
pooka 04973f7441 When reading a request from the kernel, only allocate as much memory
as needed to read a request instead of the maximum message size.
Insanely enough, this makes "cheap backend I/O" file systems such
dtfs and sysctlfs perform 10-30% better (depending on the average
size of incoming requests).
2008-01-29 14:54:08 +00:00
nakayama c3420b91a3 Follow the recent rpcgen(1) change.
The environment variable of the C preprocessor has replaced to RPCGEN_CPP.
2008-01-29 14:14:54 +00:00
abs e26de9edf5 Adjust "The getpeereid() function appeared in NetBSD 4.0" to a more
correct NetBSD 5.0.
2008-01-29 13:55:27 +00:00
yamt c73d250f0f uid_find: use kmem_alloc rather than malloc. 2008-01-29 12:41:59 +00:00
yamt 94259462ac sbreserve: curlwp can't be NULL these days.
XXX these code seems to need an overhaul.
2008-01-29 12:39:39 +00:00
yamt a944f4302a revert tcp_output.c 1.253 because it has an ill effect when sending
small (not full-sized) segments.
http://mail-index.NetBSD.org/tech-net/2008/01/27/0009.html
2008-01-29 12:34:47 +00:00
pooka 98d94502be whoops, bump date - pretty significant change 2008-01-29 10:15:50 +00:00
pooka be5ed87c1e Fix a weirdosity in the framebuf gotfb interface: hand buffer
ownership to the called routine instead of keeping it.  This means
that callees must now destroy the buffer once they are done with it.
2008-01-29 10:07:29 +00:00
yamt 64c4bfc90e sbrelease: unwrap a short line. 2008-01-29 09:31:22 +00:00
joerg 7b068e8d04 Fix typo. 2008-01-29 09:12:16 +00:00
wiz 1a4ecbe12b Use more markup. 2008-01-29 07:05:30 +00:00
rafal 77f8afb936 Adapt to renamelock_{enter, exit} addition to struct vfsops. 2008-01-29 04:06:46 +00:00
xtraeme 1cc7b13a55 coretemp_refresh: run xc_unicast() regardless if sc->sc_ci is curcpu()
or not, this fixes a deadlock seen by Greg Oster in a Dual Quad Core
machine with 8 coretemp instances.
2008-01-28 22:49:49 +00:00
jmcneill ab245e294e PCI Power Management 1.2 says that system software should wait 10ms after
transitioning a device to or from D3hot, 200us to or from D2, and no wait
for D1 transitions. Update pci_set_powerstate_int to match the spec,
rather than naively waiting 1ms after every state transition.
2008-01-28 22:48:43 +00:00
jmcneill a0a5798f83 Change synaptics 'unusual delay' printf to aprint_debug. I'm tired of
seeing it over and over again.
2008-01-28 22:30:27 +00:00
jmcneill 1ec278b34c Don't call do_enable on synaptics resume if !sc->sc_enabled 2008-01-28 22:29:00 +00:00
jmcneill 6d105ec7c2 De-noisify resume handler. 2008-01-28 22:28:32 +00:00
pooka feea4545b8 For code clarity typedef void *puffs_cookie_t.
No functional change.
2008-01-28 21:06:36 +00:00
garbled 9c0d5a87e0 Pull another instance of bridge mode avoiding the BATs.
Fix FIRMWORKSBUGS.  The #else on one of the ifdefs for it made it so that
it would never work on a machine that didn't need it.  This caused IBM
machines to be unable to talk to OFW if the option was enabled.  Replace
the #else with a branch and call it good.
2008-01-28 21:06:29 +00:00
jmcneill ef5ded9b39 No need to operate in polling mode in ehci_resume. 2008-01-28 20:58:23 +00:00
jmcneill b7cf8d358c The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.
2008-01-28 20:31:55 +00:00
xtraeme fd81136064 Pass the same size to both kmem_alloc(9) and kmem_free(9), this fixes
the kmem_poison_check in DEBUG kernels.
2008-01-28 20:19:06 +00:00
ad a77566d7d5 Authorize using the LWP cached credentials, not process credentials. 2008-01-28 20:09:06 +00:00
ad eb97d34997 More file/proc locking fixes. 2008-01-28 20:05:21 +00:00
ad 5ba557a53c - Update global counters using atomics before allocating. When freeing,
update the couters afterwards.
- Cosmetic / code generation changes.
2008-01-28 20:01:50 +00:00
ad 40fb254ec2 Fix error in previous. Spotted by yamt@. 2008-01-28 19:58:32 +00:00
ad 2b43ec397e Enablel locking that was stubbed out. 2008-01-28 19:57:43 +00:00
pooka 704ded372f Don't add asserts between testing and commit - especially not
if you're going to write "assert(foo = 0)"
2008-01-28 18:51:03 +00:00
pooka 7c2ddc1d53 Bump version for lazy contexts (probably not necessary, but it's
been a long time since I bumbed the version ;)
2008-01-28 18:42:09 +00:00
pooka d1d05d65b9 Implement lazy contexts for file systems using puffs_mainloop().
Previously each request was executed on its own callcontext and
switched to every time the request was being processed.  Now requests
borrow the mainloop context and switch only if/when they yield.
This takes two context switches away from a file system request
bringing down the typical amounts 2->0 (e.g. dtfs) and 4->2 (e.g.
psshfs).

The interfaces for manually executing requests changed a bit:
puffs_dispatch_create() and puffs_dispatch_exec() must now be used.
They are not tested, as nothing in-tree wants them and I doubt
anyone else is really interested in them either.

Also do some misc code cleanup related to execution contexts.  The
"work-in-progress checkpoint" committed over a year ago was starting
to look slightly weed-infested.
2008-01-28 18:35:49 +00:00