Commit Graph

92016 Commits

Author SHA1 Message Date
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
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
yamt 729c3a185b unwrap short lines. 2008-01-13 16:46:47 +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
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
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
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
skrll b440b92fa2 Add and fix a couple of comments. 2008-01-12 20:57:26 +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 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
tsutsui a07f7c8069 Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
2008-01-12 09:54:21 +00:00
yamt b46466b4df revert a whitespace change which is against KNF. 2008-01-12 09:10:24 +00:00
dyoung 1386ee4adf Good-bye, rtcache_check(). Call both rtcache_validate() and
rtcache_update(,1) instead of rtcache_check().
2008-01-12 02:58:58 +00:00
dyoung 5bf14fd932 _rtcache_init(): shorten this by getting out immediately if rtalloc1()
returns NULL.
rtcache_copy(): re-order operations a bit.  KASSERT() that we are
    not copying a route over itself.
2008-01-12 02:56:30 +00:00
ad 08c770b434 Initialize caches at IPL_SOFTBIO (not IPL_NONE) so that we are allocating
from kmem_map.
2008-01-12 00:34:10 +00:00
tnn 103f966e33 regen (add ServeRAID 6/7) 2008-01-11 20:49:14 +00:00
tnn 2abb4192af Add ServeRAID 6/7 2008-01-11 20:47:21 +00:00
bouyer 26315d042c Merge the bouyer-xeni386 branch to head, at tag bouyer-xeni386-merge1 (the
branch is still active and will see i386PAE support developement).
Sumary of changes:
- switch xeni386 to the x86/x86/pmap.c, and the xen/x86/x86_xpmap.c
  pmap bootstrap.
- merge back most of xen/i386/ to i386/i386
- change the build to reduce diffs between i386 and amd64 in file locations
- remove include files that were identical to the i386/amd64 counterparts,
  the build will find them via the xen-ma/machine link.
2008-01-11 20:00:13 +00:00
he 4b2e779458 Include <sys/simplelock.h> to pull in appropriate definitions. 2008-01-11 14:03:47 +00:00
ragge 1d93d6da72 Add entry to match the "Intel® PRO/1000 PT Quad Port Server Adapter". 2008-01-11 13:04:39 +00:00
ragge 9360a7471b Regen 2008-01-11 12:01:20 +00:00
tsutsui 7ae8e79ff0 - add options COMPAT_40
- adjust comments
2008-01-11 11:45:24 +00:00
ragge 5f5a2ae52a Add Intel quad 1000baseT copper PCI express card. 2008-01-11 11:31:25 +00:00
tsutsui 8dcb4a7ea6 Always account idepth for cpu_intr_p(), which is now
mandatory for sys/kern/vfs_bio.c:biodone().

Comments from Andrew Doran, and fixes mutex errors on sun3.
2008-01-11 10:21:26 +00:00
tsutsui 8c58569757 WARNSfy 2008-01-11 09:26:26 +00:00
mrg 626bd12a5c enable PCI_NETBSD_CONFIGURE for ofppc.
the call to pci_configure_bus(9) and it's supporting code is
copied verbatim from the prep port.

this allows us to completely remove the really gross pegasos
specific pegasospci_indirect_attach_hook() that set various
pci command regs, since all those devices (mostly work now,
see below) and additionally PCI plugin cards work now too.

it also makes the pegasos onboard vr(4) ethernet work with
disk boot (it previously only worked with netboot.)

in the generic macppc ofw pci conf hook and for pegasos,
don't configure the viaide(4) device, and don't configure
memory space on the fwohci(4) device.


with this, and my other recent ofppc/ppc changes the pegasos
port is mostly functional.  the marvell gige is not working,
and my 512mb appears as only about 256mb, but otherwise
this port is almost done!
2008-01-11 05:18:58 +00:00
mrg 5206bb3800 several changes to make boot device work for disks, at least
on my pegasos:

- don't chop off the 2nd part of the OFW address, it makes it
  match pcib (ISA bridge - dev 12 fn 0) instead of viaide (dev 12
  fn 1).
- now that it's available, provide an "addr2" that has the
  second address present.
- for pci devices match against device and function, not just
  function.
- remove the special case and actually broken check in the
  "pciide" section, and use the now generic "addr2" and check
  against the drive and channel number if provided.
- support "viaide" and "slide" in here, as well as "pciide".
  (is there a good way to say "any ide adapter"?)
2008-01-11 05:11:18 +00:00
dyoung a52afa8f89 Cosmetic: remove redundant 'not' from a comment, re-wrap lines. 2008-01-11 01:38:45 +00:00
skrll 1086712904 #options<space><tab> 2008-01-10 21:22:49 +00:00
skrll ae654e4721 Various improvements to the hppa kernel for gdb.
- add the useful space and control registers to struct reg
	- update process_{read,write}_regs accordingly
	- use MID_HPPA in core dumps.
	- dump the fp regs into cores.
	- add single stepping support from OpenBSD.
2008-01-10 21:08:40 +00:00
ad e8532b7138 - Fix a memory order problem with non-interlocked mutex release.
- Give kernel_lock its own cache line.
2008-01-10 20:14:10 +00:00
ad a38086a9b8 Remove hack that's no longer needed. 2008-01-10 19:04:23 +00:00
ad 9dc48ffbf6 uiomove: don't bother with kernel_lock any more. 2008-01-10 16:29:17 +00:00
tsutsui fba7c262a8 Move todr_attach(9) calls from each MD attachment to MI intersil7170_attach(). 2008-01-10 16:04:57 +00:00