Commit Graph

88077 Commits

Author SHA1 Message Date
dogcow 9ab52b1142 Move isp* from INSTALL to INSTALL_LARGE; isp is gigantic enough that it
makes a noticable impact in the size of the kernel. (build release now works
again.)
2007-06-03 03:39:53 +00:00
uwe c75253c460 Nuke traces of PCI. Minor cosmetic clean ups. 2007-06-03 01:52:54 +00:00
uwe dcaa9bf80c Include igsfb_ofbusvar.h by its full official name. 2007-06-03 01:31:31 +00:00
uwe 217bc0b26b Make the name of the multiple-inclusion guard symbol match the file location. 2007-06-03 01:28:54 +00:00
tsutsui 04776a47dd Remove another #ifdef PCB_CMAP2 portion. 2007-06-02 23:51:37 +00:00
alc 3a676de695 don't increment `ip6stat.ip6s_noroute' here, it has already been done in
in6_src:in6_selectroute().

ok dyoung@
2007-06-02 23:26:26 +00:00
njoly df2c7d05e6 Revert fs/gs changes for now.
This make clone(2) work again under NPTL compat linux emulation.

ok by fvdl.
2007-06-02 22:59:03 +00:00
dsl 44250a9038 Add some 'magic' defines so that we can build the svr4_32 version of this
code from the same source file as the svr4 copy.
I suspect this cpuld be done in other places....
2007-06-02 21:39:27 +00:00
uwe cc652c9405 Add COMPAT_40. While here, make COMPAT_30 comment match other COMPAT_*. 2007-06-02 17:16:12 +00:00
dsl 21d1d4f346 Instead of unconditionally initialising the ktriov and conditionally
copying in aiov, just unconditionally copy in aiov.
Probably saves a mispredicted branch and a data cache miss - as well as
removing some code.
2007-06-02 13:38:31 +00:00
yamt a15e4b5b1b wrap #include "opt_ktrace.h" by #ifdef _KERNEL_OPT. 2007-06-02 13:16:19 +00:00
tsutsui 0264c643f5 Rather than attaching fpu as a usual device during cpu_configure(9),
initialize it explicitly in identifycpu() (before cpu_configure(9))
because after yamt-idlelwp merge savectx() is called before
cpu_configure(9) and it requires fputype initialized properly,
otherwise a kernel fails in savectx() if a machine doesn't have an FPU.
2007-06-02 12:07:03 +00:00
dsl 3d0e15d3b2 Call selcommon() directly instead of using the stackgap... 2007-06-02 11:51:42 +00:00
tsutsui 5044d1542d Fix bus_dmamap_sync(9) to do more proper cache flush operations.
Mostly taken from mvme68k.

Tested on (not yet integrated) mac68k SONIC Ethernet with MI dp83932.c.

XXX: should we also enable _pmap_set_page_cache{able,inhibit}()
XXX: functions in m68k/pmap_motorola.c for BUS_DMA_COHERENT support?
2007-06-02 11:13:45 +00:00
tsutsui a2d77b96dc In sonic_reset(), make sure to stop TX, RX and timer
and clear and disable all interrupts.
Required by mac68k obio sonic cards, and
no bad side effect on arc jazzio sonic.
2007-06-02 10:48:24 +00:00
dsl e12ac31b52 Remove an unsed call to stackgap_init() 2007-06-02 10:09:05 +00:00
tsutsui 8964fdca7a Sync tda_status and rda_status DMA descriptors also after they are polled
in interrupt handlers for systems which don't have BUS_DMA_COHERENT support.
2007-06-02 06:41:34 +00:00
tsutsui 9955baccd9 Add #define __NO_STRICT_ALIGNMENT. 2007-06-02 06:34:21 +00:00
tsutsui 59a3d07b9a Don't try to clear BSS if bootinfo is passed
(i.e. running kernel is loaded by the native bootloader).
2007-06-02 06:30:17 +00:00
tsutsui f4ba139f1a Use some more ANSI character escape sequences in keymaps. 2007-06-02 06:27:12 +00:00
tsutsui b1102490c5 Sort some keymap entries. 2007-06-02 06:24:56 +00:00
tsutsui c0f042edea - Don't refer fputype before FPU is probed.
- Call m68k_make_fpu_idle_frame() from initfpu().
2007-06-02 06:23:56 +00:00
yamt 326517bd8d add some #include. 2007-06-02 03:32:51 +00:00
nisimura 404200bf24 - add MPC8245 to cpuname table. 2007-06-02 02:41:41 +00:00
enami 0c8f6382c6 Reduce difference between compat_ifconf() and ifconf():
- exit on error rather than proceeding to next interface.
- make code simpler.
2007-06-02 01:29:25 +00:00
enami d35ef328a7 - Fix obvious typos so that sendto(2) works.
- Wrap lines again.
2007-06-02 01:24:34 +00:00
dogcow 0023297d28 it seems like a good idea to include <sys/condvar.h>, as we're using them... 2007-06-01 23:16:33 +00:00
dsl d7f93c5c67 Split sys_bind() and sys_connect() so that compat code can use common code
once the 'address' has been copied into an mbuf.
Add extra flags for 'struct msghdr.msg_flags' to indicate that the address
  and control are already in mbufs, and that the uio structure is in userspace
  for sending data, rename sendit() to do_sys_sendmsg() to ensure no old code
  passes in random flags.
Changes to compat code to use new functions - removing some stackgap use.
Fix a 'use after free' in compat_43_sys_recvmsg.
I ***THINK*** the code that converts 'cmsg' formatted data is borked!
svr4_stream.c ought to be generated from svr4_32_stream.c during the build.
2007-06-01 22:53:52 +00:00
dsl d95fed7315 (Ab)use a KTR_USER trace entry for the linux socket command and arguments. 2007-06-01 22:42:47 +00:00
dsl 79b4d16759 KNF and layout changes to match (my copy of) svr4/svr4_stream.c 2007-06-01 22:15:38 +00:00
dsl d23c3b01a0 Add a ktrkuser() function that can be used to generate a KTR_USER trace
entry from kernel-resident data.
Mainly so I can (ab)use the KTR_USER entry for extra info.
2007-06-01 20:24:21 +00:00
uwe 4a747421e0 Rename j6x0tp_set_enable to j6x0tp_enable_child which better reflects
what this function does and is way less confusing too.
2007-06-01 18:23:46 +00:00
jmcneill 58b50f5359 Regen. 2007-06-01 17:49:19 +00:00
jmcneill 635fbd63e1 Add RIM BlackBerry. 2007-06-01 17:48:56 +00:00
uwe aa1315c604 Cosmetic. Use device_xname. Don't compile debugging support. Drop
out-of-date comment for j6x0tp_attach (we haven't been using submatch
for quite a while).
2007-06-01 17:44:46 +00:00
yamt 7e6f80a234 \xa0 -> space. 2007-06-01 15:59:37 +00:00
christos 89734304c6 - fix unused variable when none of the compat options are defined.
- remove debugging
2007-06-01 15:41:15 +00:00
yamt 63abe2b629 nfssvc_nfsd: check SPCF_SHOULDYIELD and yield cpu. 2007-06-01 14:43:17 +00:00
uwe 6542efa4c8 Add COMPAT_40. 2007-06-01 14:30:32 +00:00
blymn 12de420234 Add smsc device 2007-06-01 14:26:36 +00:00
nisimura c966ccb8d8 - add booted_device and booted_kernel sysctl nodes to let userland know
about runtime environment.
2007-06-01 14:23:50 +00:00
blymn 3099e9ed7a Added smsc device. 2007-06-01 14:14:16 +00:00
blymn eeece1c927 Add driver for the hardware monitoring portion of the SMSC LPC47B397 2007-06-01 14:11:59 +00:00
yamt ab5f84630b nfssvc_nfsd: add assertions. 2007-06-01 14:10:02 +00:00
uwe 0390c5df8f Add COMPAT_40. 2007-06-01 13:20:56 +00:00
yamt 05aaff39ff use mutex and condvar. 2007-06-01 11:56:03 +00:00
yamt 61131eb130 nfsdsock_lock: fix an inverted check of SLP_VALID. 2007-06-01 11:38:44 +00:00
he 8f77cc1c43 Fallout from the interface ioctl changes:
OSIOCGIFADDR -> OOSIOCGIFADDR
OSIOCGIFDSTADDR -> OOSIOCGIFDSTADDR
OSIOCGIFNETMASK -> OOSIOCGIFNETMASK

Also, one instance of needing to include <net/if.h> before
<compat/sys/sockio.h> due to use of IFNAMSIZ in the latter.

Discussed with christos.
2007-06-01 11:36:35 +00:00
skrll 322ba9d3c4 Another missed changed for acorn26 idlelwp. Provide IRQenable/IRQdisable
macros.
2007-06-01 11:31:01 +00:00
hannken b110563f3a Fallout from last commit:
OSIOCGIFADDR -> OOSIOCGIFADDR
OSIOCGIFDSTADDR -> OOSIOCGIFDSTADDR
OSIOCGIFNETMASK -> OOSIOCGIFNETMASK

Sparc64 compiles again.
2007-06-01 10:21:22 +00:00
enami 723ff30abc Fix some bugs in ifconf():
- maintain space left correctly.  the pointer is advanced by the size
  of struct ifreq when length of address is small.
- single sizeof operator is enough to take the size of struct.
- the type of `sz' must be singed type since it is/was compared against to
  the variable which may become negative.
- no need to traverse rest of interfaces once we got an error.  note that
  the latter `break' statement was inside inner loop.
2007-06-01 09:35:47 +00:00
skrll 4868ebda4e want_resched is no longer required here. 2007-06-01 07:21:51 +00:00
skrll afcc3d424c Missed this in previous commit.
Attempt to adacpt acorn26 to idlelwp. This is untested.

OK'd by Ben Harris
2007-06-01 07:21:26 +00:00
skrll fb901b95c7 __HAVE_MD_RUNQUEUE is no longer relevant. 2007-06-01 07:18:31 +00:00
skrll a6c4dd7bcd Attempt to adacpt acorn26 to idlelwp. This is untested.
OK'd by Ben Harris
2007-06-01 07:04:53 +00:00
mhitch fb64759fb7 Get rid of one more incompatibility with pmap_motorola.c from pmap_bootstrap(). 2007-06-01 04:05:05 +00:00
christos ab89ea8ca6 message size == 0 is valid. From Markus Mayer 2007-05-31 23:34:42 +00:00
mhitch d9ac73c21c PTE for Sysptmap was not getting set correctly. 2007-05-31 22:16:48 +00:00
ad 057666ad0c setrunnable: adjust to slightly different locking strategy post yamt-idlewlp.
Should fix kern/36398. Untested due to connectivity issues.
2007-05-31 22:06:09 +00:00
bouyer 03182b8569 Move mapping of AHCI register so that jmide knows if it fails, and avoids
calling ahci_intr() (which would cause a panic).
Try to use the pciide function for SATA drives if attaching ahci fails (this
doesn't seems to work though, it may be BIOS dependant).
Thanks to Gary Duzan for testing multiple pacthes.
2007-05-31 21:26:48 +00:00
darrenr fade943a7f The wrong condition was being tested for when deciding which fields to
update in ICMP error messages.  In the test case for this, the wrong
input was actually being used (it should be the headers from the previous
packet output) and therefore the expected results were also wildly wrong.

kern/36309
2007-05-31 10:33:54 +00:00
rmind 59085afd2c Make AIO initialization MP-safe.
Actually, lwp_exit() with (l != curlwp) will not work.
This fix might be pulled up from vmlocking branch.
2007-05-31 06:24:23 +00:00
rmind e825692169 As suggested by <yamt>, make the aiocb structure alignment friendly.
- Change the type of the internal members to int
- Reorder the members
2007-05-31 05:39:24 +00:00
rmind 0a227b1913 - Make aio_worker to handle pending exits and coredumps
- Allow aio_suspend() to be ended early by a signal
- Fix reference counting on LIO structures (remove hack)
- Use two global pools for AIO structures
- Minor cleanups

Patch provided by <ad>. Some additional modifications by me.
Reviewed by <yamt>.
2007-05-31 05:29:43 +00:00
christos f6ca3502bf provide the minimum ifreq size (when sockaddr is empty) 2007-05-31 02:56:50 +00:00
christos d81aadc176 Move the nasty ifdefs in one place. Requested by ad and dyoung. 2007-05-30 21:02:02 +00:00
christos 3fe1c0adb5 lock_stubs.S depends on assym.h 2007-05-30 17:16:55 +00:00
xtraeme e09d1dbb48 Fix for SIOGIFCAP provided by christos, test successful. 2007-05-30 17:03:30 +00:00
darrenr 5daa30646c the call to ipf_freetoken() free's the structure pointed to by 't' so doing
any sort of dereference of it afterwards is just a bad idea...
2007-05-30 06:27:11 +00:00
christos 9bf57b1f3a make this compile again
XXX: The ioctls will need to be fixed.
2007-05-30 00:00:59 +00:00
christos d5dcfde7aa wrap the whole function in COMPAT_40 2007-05-29 23:57:33 +00:00
christos 781021f65e fix unused variable. 2007-05-29 23:32:41 +00:00
christos 3ce718d4da Add compat 4.0 2007-05-29 23:21:52 +00:00
xtraeme 967c5e0168 Initialize oifr to fix build with COMPAT_40. 2007-05-29 22:05:01 +00:00
christos cb17d4ac11 Add COMPAT_40 for struct ifreq changes. 2007-05-29 21:37:07 +00:00
christos 20bfd9898e Add a sockaddr_storage member to "struct ifreq" maintaining backwards
compatibility with the older ioctls. This avoids stack smashing and
abuse of "struct sockaddr" when ioctls placed "struct sockaddr_foo's" that
were longer than "struct sockaddr".
XXX: Some of the emulations might be broken; I tried to add code for
them but I did not test them.
2007-05-29 21:32:27 +00:00
alc 36457ddc20 fix typo in comment 2007-05-29 21:23:30 +00:00
dyoung 57e4ee7cd0 Fix rtw(4) on NetBSD/macppc: use bus_space_write_region_stream_4()
instead of bus_space_write_region_4() to write WEP Rx keys to the
NIC.  Thanks macallan@ for detecting the bug and testing the fix.
2007-05-29 18:38:20 +00:00
dyoung 58c85a01d2 Cosmetic: simplify a memset() statement, use __arraycount(), and
remove a gratuitous return statement at the end of a void subroutine.
2007-05-29 18:33:38 +00:00
dyoung 85c572c7f9 Simplify multicast filter programming, and take care to avoid
gratuitous device resets when the kernel adds/deletes a multicast
address.
2007-05-29 18:32:07 +00:00
macallan b0698fecd5 cpu_info.ci_idle_pcb is gone so don't try to set it
probably needs more work but it works fine like that at least on my PB3400c
2007-05-29 13:26:39 +00:00
tsutsui 82e46da13f Use the kernel symbol table to see the beginning of the current
subroutine to get more proper backtrace on ddb(4).

In the previous code it scans backwards from the current PC
for the end of the previous subroutine and checks "jr ra" or
"jr k0" instructions, but it often fails because gcc is
so aggressive nowadays as to reorder instruction blocks
to create efficient code path by branch predict etc. and
"jr ra" is not always located at the end of subroutines.

No objection on port-mips.
2007-05-29 12:03:45 +00:00
tsutsui cd07663368 Fix inconsistent changes in rev 1.153 and 1.154:
Adjust fs->fs_maxfilesize instead of ump->um_maxfilesize
in ffs_oldfscompat_read() because the latter is overrided
by the former after ffs_oldfscompat_read() returned.

Fixes EFBIG errors on read(2) and "exec /sbin/init: error 8"
problem on mac68k after mountroot() on old 4.3BSD UFS created
by the Mkfs tool for MacOS (reported and confirmed on port-mac68k).
2007-05-29 11:30:17 +00:00
simonb 9dc083f73e Fix a tyop. 2007-05-29 07:17:23 +00:00
ad 1ae6657a7b Fix lock order inversion between vnode locks and ufs_hashlock. Addresses
kern/36331 (MP deadlock between ufs_ihashget() and VOP_LOOKUP()) for ffs,
other file systems to follow. Reported by perseant@, debugged by Sverre
Froyen, patch posted/tested by Blair Sadewitz.
2007-05-28 23:42:56 +00:00
mrg 565d4d6ca6 disable mutex_spin_enter() & mutex_spin_exit() as they are currently
broken and cause MULTIPROCESSOR kernels to hang while entering
userland boot up.
2007-05-28 22:56:19 +00:00
mhitch 82970a259f Got rid of too much - need to allocate virtual space for msgbuf. 2007-05-28 22:36:15 +00:00
pavel c9cec95fb7 Move ixpide from INSTALL to INSTALL_LARGE. This controller is apparently
found only in southbridges of relatively recent motherboards.
2007-05-28 21:54:38 +00:00
mrg b4ff11c2dd fix some NOTDEF_DEBUG code. 2007-05-28 21:52:49 +00:00
pavel e09c8c416e Move puc, ahcisata, nfe, svwsata from INSTALL to INSTALL_LARGE to help fit
INSTALL to a 2.88 MB floppy image. Suggested by Manuel Bouyer.
2007-05-28 21:45:29 +00:00
mrg 839b86dc5e cpu_attach(): in the MP case, fix up idle lwp info as well as lwp0.l_cpu.
for LOCKDEBUG, mutex_destroy() the cpu0 spc_lwplock with the global
cpuinfo VA, and re-mutex_init() it with the per-cpu address that is only
now available.  for non-boot cpus, be sure to also initialise curlwp to
the idle lwp.

xcall(), pmap_quiet_check(), pmap_pmap_pool_ctor(), pmap_pmap_pool_dtor(),
and pmap_enu4m(): don't care about cpus that have not been attached yet.
2007-05-28 21:24:17 +00:00
mrg 8f8cea5c68 clean up cpu_switchto() a little - no need to flushw or membar
excessively.  optimise an rdpr.  tested by tnn.
2007-05-28 20:09:50 +00:00
yamt febe85111f - remove nfs_exit exit hook. ok'ed by christos@.
- as far as i understand the code, it shouldn't be necessary
	  because nfs_request can't return without removing its request
	  and r->r_lwp is either curlwp or NULL.
	- even if it's necessary, leaking requests is not the correct way
	  to recover from the condition.
- nfs_request: add a related assertion.
2007-05-28 16:47:38 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
mrg 8c454927d9 regenerate. 2007-05-28 05:55:10 +00:00
mrg f08e949808 add ALi M5261 ethernet (tulip clone) 2007-05-28 05:54:07 +00:00
mhitch 5a0ae3b2c5 Oops. I thought I had caught this before commiting the CMAP[12] removal,
but obviously I didn't.  Non-DEBUG kernels were unbootable because I left
some code inside an #ifdef DEBUG group.
2007-05-27 21:33:55 +00:00
uwe 19eb8fc1bc Need to use atop() when adjusting kernend for ksyms.
XXX: This code has obviously bit-rotted.

Pointed out by Anders Gavare on port-sh3.
2007-05-27 18:30:01 +00:00
cube 8b523203e0 Tyop. 2007-05-27 16:58:17 +00:00
tsutsui 2fc470a315 Reorder IPL_SOFTSERIAL and IPL_SOFTCLOCK properly. 2007-05-27 14:22:36 +00:00
tsutsui cd02a491e7 - Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
  cpu_info_store.ci_curlwp after clearing BSS in case
  a kernel is loaded by the firmware directly since these
  values are in BSS and initilized before mach_init() is called.
  (actually they are restored in mips_machdep.c:mips_vector_init()
   but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.
2007-05-27 14:10:49 +00:00
tsutsui 5964c0cd2d Pass correct args to lwp_startup() in lwp_trampoline().
Should fix "panic: TLB out of universe" on MIPS3 machines.
2007-05-27 13:57:30 +00:00
uwe 269ff6629e In sh3_tlb_update we need to ensure we are not interrupted while
meesing with the TLB.  That would usually show up as misterious kernel
crashes under heavy load.

Prettify the code while here so that traversal of the memory mapped
TLB arrays looks congruent in all functions.

Fixes PR 34706
2007-05-27 12:21:24 +00:00
he e0ce1262e3 Bump SYMTAB_SPACE so that it fits again. 2007-05-27 11:47:11 +00:00
skrll f27ffb061f Fix up the frame sanity checking to not bitch when taking interrupts in
the sti ROM code.

Fixes PR/34715.

Thanks to David H. Gutteridge.
2007-05-27 09:41:25 +00:00
briggs f5462cf43d Clear interrupt status at once instead of piecemeal.
Enable a few more bits in the I/O requested by ld and check for the fast
response bit when reading back from the queue.
Both changes come from reading the FreeBSD driver and testing on a Dell
CERC SATA controller.
2007-05-26 18:10:46 +00:00
agc f1a5908695 In /proc/<pid>/statm, avoid leaking buffer space if the attempt to get
vmspace information fails.

Return the nice value properly to userland via the /proc/<pid>/stat entry.

Use vm sizes from vmspace, rather than rusage structs, for the same
reasons as mentioned previously - see the comment in
kvm_proc.c::kvm_getproc2() about rusage values and zombie processes.
2007-05-26 16:21:04 +00:00
briggs a21419937e Import code from FreeBSD to tell the controller how much physical RAM the
system has.  This has the (scary-because-we've-been-running-so-long-
without-it) commit message (for the first version of the change):
        Tell the controller how much physical memory we have.  Without this
        there was a chance that our DMA regions would collide with the
        memory window used by the cache on the controller.  The result would
        be massive data corruption.  This seemed to mainly affect systems with
        >2GB of memory.
2007-05-26 12:45:02 +00:00
dyoung 8c4b63fb77 Do not run ctags on sys/dev/usb/usb_port.h. Its #defines shadow
NetBSD symbols, such as clalloc(), that one might one to tag to.
2007-05-26 05:34:04 +00:00
tsutsui 19c950bfd5 Fix a typo in RFACT of the second 3.3Vcc of W83627EHF. From OpenBSD. 2007-05-26 04:19:29 +00:00
tsutsui 2ae2a9ae1e Update function names in comments. 2007-05-26 03:26:49 +00:00
briggs 98fa060bce Enable aac(4) and ld at aac. 2007-05-26 03:02:02 +00:00
briggs ffe5a7921a Don't use pointers in device structures.
Bring in some newer stuff for the init structure from FreeBSD.
2007-05-26 02:09:40 +00:00
tsutsui 2c07c8ddd5 Use consistent cast. 2007-05-26 00:08:32 +00:00
tsutsui ba1003bc61 Remove an obsolete file after yamt-idlelwp merge. 2007-05-26 00:02:28 +00:00
tsutsui aee64784f3 proc_trampoline -> lwp_trampoline in comment. 2007-05-25 23:58:43 +00:00
uwe 6a75919c1e Clarify comments in pmap_enter. 2007-05-25 23:55:13 +00:00
agc 12003e8756 Use a bit more common code for the MULTIPROCESSOR and !MULTIPROCESSOR
cases.

Use the lwp's priority when returning the priority value, rather than
returning the nice value.
2007-05-25 22:26:14 +00:00
agc 15a3a67ede Various changes for better Linux emulation:
+ in /proc/<pid>/statm emulation, use the memory values from vmspace,
rather than struct rusage, since the rusage values appear to be 0 for
all processes except zombies.  cf dsl's comment in
kvm_proc.c::kvm_getproc2()

+ in /proc/<pid>/stat, instead of returning the tv_sec value, return the
number of ticks we've had (roughly equivalent to the Linux jiffies).
Calculate these values from the tv_usec values.

Also:

+ enclose CPU_INFO_ITERATOR and CPU_INFO_FOREACH usage in #ifdef
MULTIPROCESSOR, at the request of Nick Hudson

Together, these changes allow htop to work on NetBSD.
2007-05-25 19:20:06 +00:00
yamt 8e69ce0726 dumpsys: build a fake switchframe for postmortem debugging.
reviewed by Frank van der Linden.
2007-05-25 15:09:50 +00:00
martin 95f43235b7 remove some debugging printfs for the MULTIPROCESSOR case 2007-05-25 12:42:07 +00:00
skrll 178869e145 Fix typo in comment. 2007-05-25 12:11:28 +00:00
tsutsui 0f31f5cb6c Preserve local symbols on linking a kernel so that
we can get more useful trace on ddb(4).
2007-05-25 10:44:27 +00:00
skrll 71c04700f6 No need to check if oldl == newl in cpu_switchto. All the callers ensure
this is never the case.

Fixup a few comments while I'm here.
2007-05-25 10:40:04 +00:00
martti 6b17040b66 Fix problems with stateful filtering. Patch received from darrenr@. 2007-05-25 06:44:20 +00:00
macallan 8add5b3a22 defflag SPARCBOOK_CMD 2007-05-25 02:01:41 +00:00
mjacob 3470b7cb13 Whoops- I almost forgot. Thank MetrumRG Associates for material
support in making 4Gb NetBSD support possible.
2007-05-25 01:59:24 +00:00
mjacob 8e237f7550 Major update to isp(4) driver to bring it in line with external sources.
The major changes are:

 + 4Gb (24XX) card support
 + Rewritten fabric and loop evaluation code
 + New f/w sets

The 4Gb changes required major rototilling, which caused a rewrite of
fabric and loop eval code. The latter can now be set up to tune for
dynamic device arrival/departure if the framework is set up for it,
or to be firm about waiting for devices.

Testing has been principally on amd64, i386 and sparc64 and seems to
not have broken things for me.
2007-05-24 22:12:02 +00:00
mjacob f0b57d5f54 Major update to isp(4) driver to bring it in line with external sources.
The major changes are:

 + 4Gb (24XX) card support
 + Rewritten fabric and loop evaluation code
 + New f/w sets

The 4Gb changes required major rototilling, which caused a rewrite of
fabric and loop eval code. The latter can now be set up to tune for
dynamic device arrival/departure if the framework is set up for it,
or to be firm about waiting for devices.

Testing has been principally on amd64, i386 and sparc64 and seems to
not have broken things for me.
2007-05-24 21:30:41 +00:00
briggs 9e95a6e477 The number of max_lat units in 1 sec is 4000000 instead of 40000000 (an
extra 0 snuck into the code).
Found when looking at this with dyoung.
2007-05-24 15:57:58 +00:00
briggs 4208391f45 Some changes from the FreeBSD driver:
* Include definitions of adapter-initiated fibs.
* Send aifs back to the adapter after we receive them.
* Use indexes instead of pointers in 32-bit hardware registers.
* If we get a message that there's a printf from the adapter, but we have
  a NUL in the first character of the printf string, change the NUL to a
  space.
2007-05-24 15:07:47 +00:00
xtraeme 8f6f7665fa Indentation. 2007-05-24 13:36:57 +00:00
njoly f70cd37804 Fix restart of interrupted system calls.
- Make linux_sys_rt_sigreturn() return EJUSTRETURN on success.
- Add missing rax to linux_sigcontext structure; and save/restore
  its value like other members in linux_sendsig()/linux_sys_rt_sigreturn().

With valuable help from manu.
2007-05-24 11:21:52 +00:00
dogcow 905b715a4b use PRIu64, not llu, to unbork on 64-bit platforms. 2007-05-24 05:33:08 +00:00
agc 4dbe5ed7e7 Extend the Linux emulation of /proc to include
/proc/stat
	/proc/loadavg and
	/proc/<pid>/statm.

These are only present when -o linux is specified as a mount option
to procfs.

Factor out some common code so that it can be used by a number of
functions.

XXX The values returned in the statm emulation need to be verified.
2007-05-24 00:37:40 +00:00
christos 68a6db0f0b fix typos in previous 2007-05-23 17:32:46 +00:00
christos 72cfe7327b Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
he 410727fbc5 Remove MUNGE(NOP_ON_4M_15), that label no longer exists. 2007-05-23 14:51:16 +00:00
martin dad9937fa5 In pmap_kenter_pa honour VM_PROT_EXECUTE - otherwise LKMs are not mapped
executable.
Fixes PR port-sparc64/36376.
2007-05-23 09:36:22 +00:00
martin 48290fcae6 Fix a stupid bug in the save_fpstate ipi, which caused overwriting of
struct lwp of the lwp owning the fpu. Fix clearing the fplwp - %o0 will
not survive the call to savefpstate - duh!
2007-05-23 08:16:43 +00:00
mhitch 058579391c Rework pmap_zero_page() and pmap_copy_page() so it doesn't need the pte
pointers from pmap_bootstrap(), and make pmap_bootstrap() more compatible
with the common m68k pmap_motorola.c.
cVS: ----------------------------------------------------------------------
2007-05-23 00:47:03 +00:00
mhitch 786f6950fd Get rid of pcb_cmap2 - it hasn't been used for a long, long time. 2007-05-22 20:29:31 +00:00
rjs 9b21104e57 Fix for yamt-idlelwp merge. 2007-05-22 20:06:33 +00:00
mrg b9baf4bfef cpu_switchto(): if oldlwp is NULL, don't bother saving it. 2007-05-22 18:15:58 +00:00
martin 6b07dc2e73 In cpu_hatch() set curlwp to the idlelwp.
While here, remove a few debug printfs we no longer need.
2007-05-22 15:44:06 +00:00
xtraeme f8dd8c3128 Do not print twice features2. This was added with yamt-idlelwp. 2007-05-22 13:56:54 +00:00
tnn 6380d93405 When renaming, copy the new name into the designated memory area.
Tested by martti@
2007-05-22 10:39:10 +00:00
mhitch 719ec3a2b9 From pmap_motorols,c:
Allow pmap_enter_ptpage to fail, sometimes. Pass WAIT/NOWAIT flags and
fix some obvious locking problems. This allows us to run a LOCKDEBUG
ernel now.
2007-05-22 05:05:32 +00:00
cube 03744d91f8 Rename si_sigval -> si_value to match POSIX RTS. [hi christos!] 2007-05-22 03:51:54 +00:00
rjs 4bf1455184 Remove two unused global variables. 2007-05-22 00:23:57 +00:00