165921 Commits

Author SHA1 Message Date
yamt
b471ec2032 whitespace 2008-01-14 12:48:52 +00:00
yamt
c6345d661d add a script to produce something like opannotate. 2008-01-14 12:47:59 +00:00
yamt
9a2ecb37c6 rename fmt.sh to tpfmt.sh 2008-01-14 12:42:02 +00:00
yamt
ea8e75911e add a per-cpu storage allocator. 2008-01-14 12:40:02 +00:00
yamt
8c93baa802 constify 2008-01-14 08:53:42 +00:00
yamt
8a58f724e1 tabify 2008-01-14 08:52:16 +00:00
tsutsui
e88df705a1 Use htole32() to write parameters to DMA descriptors for big endian machines.
Tested on Pegasos by mrg@ on port-ofppc.
2008-01-14 06:32:10 +00:00
dyoung
b6c0385fe0 Use device_t, device_private(). 2008-01-14 06:12:13 +00:00
dyoung
5624d2b7cd Use rtcache_validate() instead of rtcache_getrt(). Delete rtcache_getrt().
In rtcache_lookup2(), use the return values of rtcache_validate()
and _rtcache_init() instead of looking at _ro_rt.  Also, check the
return code of rtcache_setdst() for an error.
2008-01-14 05:00:18 +00:00
dyoung
2d4e7e5856 Use rtcache_validate() instead of rtcache_getrt(). Shorten staircase
in in_losing().
2008-01-14 04:19:09 +00:00
dyoung
688ff775ce Use rtcache_validate() instead of rtcache_getrt(). 2008-01-14 04:17:35 +00:00
dyoung
19dd9ed4a7 Use rtcache_validate() instead of rtcache_getrt(). Shorten staircase
in in6_losing().
2008-01-14 04:16:45 +00:00
dyoung
6a0b0c88d2 Use rtcache_lookup() instead of rtcache_lookup() + rtcache_getrt(). 2008-01-14 04:14:37 +00:00
dyoung
9e32c93d1d Use rtcache_validate() instead of rtcache_getrt(). 2008-01-14 04:12:40 +00:00
dholland
130a8172b6 ANSIfy. Remove unnecessary casts. Clean up for -Wsign-compare. Make more
things file-static. Other minor tidyups, and fix a couple minor bugs found
along the way.
2008-01-14 03:50:01 +00:00
dyoung
132fca675f In pccbbdetach(), panic if interrupt handlers are still registered
after detaching children.

Use PCI_CB_MEMBASE0, PCI_CB_MEMLIMIT0, PCI_CB_IOBASE0, PCI_CB_IOLIMIT0
instead of magic numbers.
2008-01-14 03:01:41 +00:00
mrg
a33e9e3b3f implement bus_dmamem_mmap() for sparc64. this is copied from the x86
code and then a single line adjusted to make it look identical to the
openbsd sparc64 version, who provided inspiration for this.

NOTE: not really tested yet with a real device, but, it can't really
be worse than panic() in a device mmap()...
2008-01-14 00:43:54 +00:00
dholland
23c02a454f Whitespace/KNF nits. 2008-01-14 00:23:51 +00:00
yamt
729c3a185b unwrap short lines. 2008-01-13 16:46:47 +00:00
dholland
c6fda077dc Bail out cleanly if kernel nfs server support is missing, instead of
dumping core.
2008-01-13 16:39:07 +00:00
yamt
b0fbe32ddf nonresident_rotate: micro optimization 2008-01-13 16:28:41 +00:00
skrll
193f2ba372 Update a comment. 2008-01-13 13:42:58 +00:00
skrll
046bde4260 Re-run mknative to pick up bsd-kvm.o. 2008-01-13 13:18:17 +00:00
degroote
f8d4f721c1 Fix ieee80211_node leak
We can't use IF_PURGE here because m_pkthdr.rcvif have here a special meaning :
it holds ieee80211_node to which the management frame should be sent and the
node has its reference count bumped.

Introduce ieee80211_drain_ifq which release the node before freeing the mbuf.
Use it instead of IF_PURGE.

From DragonflyBSD
2008-01-13 13:01:12 +00:00
skrll
1bd2744b54 Add bsd-kvm.o. 2008-01-13 12:40:26 +00:00
yamt
04db6c4347 pmap_extract_ma: fix a missing pmap_unmap_ptes. 2008-01-13 11:34:18 +00:00
chris
a87adf7279 When manipulating the interrupt status for atomic ops use cpsr_c rather
than cpsr_all, this avoids updating unnecessary fields in the cpsr.

As a side effect, the inline versions no longer clobber the condition
codes.
2008-01-13 11:19:05 +00:00
bouyer
4308d7e8b5 Revert tmpstk size to 512 bytes, it was bumped to 1024 by mistake when
bouyer-xeni386 was merged.
2008-01-13 11:03:04 +00:00
dsl
ca99a9496c Add AMD64_R9_REGNUM through AMD64_R14_REGNUM. 2008-01-13 10:54:47 +00:00
msaitoh
f03e380ca2 s/DIGAGNOSTIC/DIAGNOSTIC/ 2008-01-13 10:45:19 +00:00
yamt
1fc0c47f67 add functions to update pm_stats and use them in some places.
for pmap_kernel(), use atomic ops to update stats because pmap_map_ptes
doesn't lock the pmap.
2008-01-13 07:26:32 +00:00
yamt
0c8275031f add pmap_pte_cas. 2008-01-13 07:05:42 +00:00
chris
d21493ad1e Take a micro-optimization from FreeBSD/arm.
When switching from SVC32->UND32 to read/write R13_und we don't need to clear
the mode bits as:
PSR_SVC32_MODE | PSR_UND32_MODE = PSR_UND32_MODE

While reading the code I also noted that interrupts are enabled for most of
the function as pmap_switch returns with interrupts in the state they are on
entry.  This appears to be different to what the code after pmap_switch
expects, in that the behaviour suggests they should be disabled.

Because of this I've made the writing of R13_und explicitly disable.
interupts as part of the mode switch.

This also means that the IRQenableALL call is now redundant as the
interrupts are already enabled.

XXX: it's not clear if arm_fpe_core_changecontext should be called with
interrupts disabled.

Remove unused items: IRQdisableALL, IRQenableALL & Lcpufuncs.

Tested on cats. lmbench shows no performance change.
2008-01-13 02:43:53 +00:00
ad
9dfa2c0234 Add a function to look up a section by name and return address/size, and
nuke return of object entrypoint from kobj_stat(). It's a lot easier to
denote the module entypoint using a linkset.
2008-01-12 23:34:48 +00:00
ad
9ac502f441 Remove curlwp check, all ports should hopefully be doing the right thing
now (NOTICE: curlwp should be set before main()).
2008-01-12 23:31:40 +00:00
cube
55f21981d9 workqueue(9) has the non-evident limitation that the caller cannot reuse
the same struct work before workqueue(9) has internally started to work on
the task.

So to make sure that doesn't happen, provide a semaphore not to run the
workqueue multiple times.  It might be clearer just skip using workqueue(9)
and use a thread for about everything, but oh well, I leave that to
someone else.

Now is@ can yank his USB-to-Ethernet adapter while the interface is up.
2008-01-12 22:32:51 +00:00
mkirby
bb55aebb4f Fix a small grammatical error. 2008-01-12 21:05:13 +00:00
skrll
b440b92fa2 Add and fix a couple of comments. 2008-01-12 20:57:26 +00:00
skrll
8af98e5f70 Add NetBSD/arm32 kvm support.
Nearly 10 years later... PR/5667 can be closed.
2008-01-12 20:55:12 +00:00
skrll
cf47b9b0c7 Push a switchframe in dumpsys and cpu_switchto, but as dumpsys calls
other funcs a switchframe needs to be a multiple of 8 bytes. Stash sp as
well in the switchframe to bump it to 24bytes.

Setup the switchframe appropriately in cpu_lwp_fork.

Remove savectx - nothing uses it.

All of this make gdb's life much easier when dealing with crash dumps and
live kernels.

Reviewd by chris.
2008-01-12 20:50:23 +00:00
ad
ee652e42b1 - Split crashdump code out into its own file.
- Remove NO_SPARSE_DUMP.
- Minor KNF, sprinkle static.
2008-01-12 20:03:41 +00:00
ad
c03e2ac7c3 sysctl_free: don't have the caller acquire sysctl_treelock, do it here. 2008-01-12 19:27:27 +00:00
ad
2e85c8c3b2 sysctl_kern_proc_args: avoid zero length allocation. 2008-01-12 19:25:25 +00:00
bouyer
c45f69b0fd Xen doesn't need NKPTP_MIN/NKPTP_MAX any more. 2008-01-12 18:16:20 +00:00
ad
79aa087ae2 - lwp_exit: if the LWP has a name, rename it to "(zombie)".
- lwp_free: don't leak l_name.
2008-01-12 18:06:40 +00:00
ad
607fd8ae21 atomic_and/atomic_or don't operate on pointers, so don't copy the return
to a0. From thorpej@.
2008-01-12 17:29:03 +00:00
ad
f6c08490ef Don't put membar in the delay slot. thorpej@ says it may be problematic. 2008-01-12 17:27:28 +00:00
ad
eb24572347 Fix some problems with TLB shootdown and (hopefully) make it faster. This
had the potential to cause problems prior to 4.99.48 because it called into
the VM system without kernel_lock held.

XXX1 pmap_update() should be waiting for shootdown jobs to complete. It's
not clear how to do that because the shootdowns happen at IPL_VM.
2008-01-12 16:45:29 +00:00
wiz
38febee9fd Add NIFOC, from Philippe Audéoud in PR 37291. 2008-01-12 11:47:13 +00:00
dsl
9551b193fd The interval timers (setitimer()) are not inherited by fork (I've checked
the SuS) so start the timer in the correct process otherwise this test
will never timeout.
2008-01-12 11:10:08 +00:00