Commit Graph

7413 Commits

Author SHA1 Message Date
christos
242fd69b63 give the name of the dup initialization. 2010-05-05 02:20:42 +00:00
kardel
a2c1ee7188 switch to nanotime() for 100ns resolution 2010-05-04 19:23:56 +00:00
tsutsui
9a9555d932 Some KNF. 2010-05-04 14:14:54 +00:00
tsutsui
25362a67ff Don't #error on invalid LABELSECTOR or LABELOFFSET on __RUMPKERNEL build.
As mentioned in src/sys/rump/dev/lib/libdisk/Makefile,
rump(4) builds don't check if each ${MACHINE} actually supports
MBR in MD readdisklabel(9) ops while it pulls MD <machine/disklabel.h>.

Workarounds so long broken build of ews4800mips.
2010-05-04 12:20:50 +00:00
darran
17b7c13057 DTrace: Fix several bugs where the mod_ctf_get() function could return
success even though no CTF section was present in the kernel or module.
This fixes the panic that several people saw when trying out the FBT
provider without updating /boot or missing a CTF section in /netbsd.
2010-05-03 09:51:36 +00:00
dholland
05d90ebea1 Blanking the path buffer only needs to be done when DIAGNOSTIC.
(I meant to set it back this way before committing but evidently forgot
last night. Thanks to rmind for noticing.)
2010-05-02 23:22:51 +00:00
pooka
193bcc771a If a builtin dependency is missing, error instead of panic. As
pointed out by martin, configurations like builtin nfsserver can
be succesfully linked without including all dependencies (specifically,
nfs).  Until all such weirdosities are fixed, opt for at least a
semifunctional system.
2010-05-02 11:01:03 +00:00
dholland
30c9deb259 Don't printf a userspace pointer; print the copied-in kernel version
instead, now that it's readily available. Fixes PR 43217.
2010-05-02 06:35:21 +00:00
dholland
54f6c52ba9 Remove the nameidata from struct exec_package. It was used only for two
things: passing an argument to check_exec, which is better done explicitly,
and handing back the resolved pathname generated by namei, which we can
make an explicit slot for in struct exec_package instead. While here,
perform some related tidyup, and store the kernel-side copy of the path
to the executable as well as the pointer into userspace. (But the latter
should probably be removed in the future.)
2010-05-02 05:30:20 +00:00
dyoung
b875f6ccc8 IPL_VM is the highest interrupt priority where alldevs is read/written,
and acquiring alldevs_mtx already blocks those interrupts, so delete the
splhigh()/splx() in config_alldevs_lock()/_unlock().

Release alldevs_mtx while freeing memory with kmem_free(9); according to
new documentation, kmem_free(9) can sleep! :-) Thanks to rmind@ for the
tip.

Next step: use finer-grained locking, probably by adding a mutex to
    cfdriver_t.

And after that: make sure that all threads of execution are out of the
    device_t and/or softc before releasing their memory.
2010-04-30 21:17:22 +00:00
pooka
6e3fa8db54 Add translation from vtype to dirent type. Convert rumpfs now.
I'll convert the rest of the file servers in need after the next
version bump to avoid the coding module crisis.
2010-04-30 10:03:13 +00:00
martin
ffb5896ed4 Add a CTASSERT to make sure the cexp and ldavg arrays are kept in sync 2010-04-30 10:02:00 +00:00
dyoung
3f82819ca5 Add data types, function prototypes, and stub implementations
for pci_chipset_tag_create() and pci_chipset_tag_destroy().  On
architectures that support it, an MI PCI bus driver can override the
architecture's default pci(9) and pci_intr(9) implementation.

Coming up next: documentation.
After that: x86 implementation.
Last but not least: make cbb(4) use MI PCI overrides.
2010-04-28 20:33:52 +00:00
pooka
6ec71a1c75 Use sys_nomodule for modular rump system calls so that they can be
autoloaded.
2010-04-27 10:57:46 +00:00
pooka
da792af712 Add an optional hook for adjusting module string table after load.
Currently to be used for rump "SAOS" namespace trick.
2010-04-26 22:58:53 +00:00
rmind
3144d8ae3f Revert rev1.6, it shall return ETIMEDOUT for pthread calls. 2010-04-26 16:26:11 +00:00
ad
a0f75dc2db Allocate the cpu_infos array dynamically. 2010-04-25 15:57:59 +00:00
ad
3f21f42490 - console spam.
- atomic_dec_uint -> vfs_destroy.
2010-04-25 15:56:00 +00:00
ad
2e2855a6f2 Make select/poll work with more than 32 CPUs.
No ABI change.
2010-04-25 15:55:24 +00:00
ad
caac34d32b MAXCPUS -> maxcpus 2010-04-25 11:49:22 +00:00
ad
b445fb5178 MAXCPUS -> __arraycount 2010-04-25 11:49:04 +00:00
rmind
5b61593723 mq_timed{send,receive}: as required by POSIX, return EINVAL on invalid
timeout and thread would have blocked, instead of ETIMEDOUT.  Change is
to abstimeout2timo(), thus also affects _lwp_park(2).

Reported by Stathis Kamperis some months ago.
2010-04-23 19:29:23 +00:00
rmind
13f624ca0f Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
2010-04-23 19:18:09 +00:00
rmind
d8eaa1fed9 Remove M_IOV (missed in previous commit) and M_1394DATA types. 2010-04-23 19:09:15 +00:00
pooka
0c20c076ce Enforce RLIMIT_FSIZE before VOP_WRITE. This adds support to file
system drivers where it was missing from and fixes one buggy
implementation.  The arguably weird semantics of the check are
maintained (v_size vs. va_bytes, overwrite).
2010-04-23 15:38:46 +00:00
rmind
d00df28408 Replace M_IOV and some malloc(9)s with kmem(9), and while there:
- Fix invalid free (M_TEMP vs M_IOV) in do_sys_recvmsg(), spotted by jakllsch@.
  Also, same fix in osf1_sys_sendmsg_xopen().
- Fix attempt to free non-allocated memory in error path in netbsd32___getfh30().
- Plug a memory leak in compat_43_netbsd32_orecvmsg().
2010-04-23 15:19:19 +00:00
pooka
33de26e6c6 dumdidumdum, need _KERNEL in previous for fsck. noticed by moof 2010-04-21 19:50:57 +00:00
pooka
34244e1069 Reduce #ifdef spew by attaching wapbl as a module.
(no, it's still too ifdef-ridden to be able to actually do anything
useful and module-like like load into any kernel)
2010-04-21 16:51:24 +00:00
pooka
593dfe42a8 make get/setrlimit as rump-capable 2010-04-21 16:17:04 +00:00
rmind
f08aebed01 sched_pstats: fix previous, exclude system/softintr threads from loadavg. 2010-04-20 16:49:48 +00:00
dyoung
ad6e139a80 Add default implementations for bus_space_is_equal(9),
bus_space_tag_create(9), and bus_space_tag_destroy(9).  Use
bus_space_is_equal(9) throughout the kernel to compare
bus_space_tag_t's.  Tested on i386 and on sparc64.
2010-04-19 18:24:26 +00:00
jruoho
1cbdcd8dc6 Use CTLTYPE_BOOL. 2010-04-19 11:20:56 +00:00
pooka
d8c5395931 Don't loop eternal if init of a builtin module fails. 2010-04-16 11:51:23 +00:00
rmind
5f0ac9a4fa - Merge sched_pstats() and uvm_meter()/uvm_loadav(). Avoids double loop
through all LWPs and duplicate locking overhead.

- Move sched_pstats() from soft-interrupt context to process 0 main loop.
  Avoids blocking effect on real-time threads.  Mostly fixes PR/38792.

Note: it might be worth to move the loop above PRI_PGDAEMON.  Also,
sched_pstats() might be cleaned-up slightly.
2010-04-16 03:21:49 +00:00
rmind
93deacb9f4 Remove mclpool_allocator, which is unnecessary since mb_map removal. 2010-04-16 02:57:15 +00:00
pooka
cc69e4568b will it include, that is the question
(to everyone's disappointment on some archs it didn't)
2010-04-15 20:46:08 +00:00
pooka
0d8b367e2d Need a few funny #defines in kern_syscall.c too. 2010-04-14 15:15:37 +00:00
pooka
64d6a27dc2 need opt_modular.h in kern_syscall 2010-04-14 15:12:44 +00:00
pooka
7ea24651a7 Move routines related to syscall establishment from kern_subr.c and
kern_stub.c to kern_syscall.c.
2010-04-14 14:46:59 +00:00
pooka
00dd646066 regen: rump vnodeif went on a diet 2010-04-14 14:00:04 +00:00
pooka
fcde1e9ca0 Make rump vnode interface lightweight: the only things we
really need are:

  0) provide VOP_OP in the alternate RUMP_VOP_OP namespace

  and for each op:
  1) schedule rump cpu
  2) call VOP_OP
  3) unschedule rump cpu

While here, take the opportunity to get rid of _t lossage in the
rump-exported interfaces.
2010-04-14 13:58:51 +00:00
pooka
592f1701c5 regenefactor for comment and whitespace changes 2010-04-14 12:21:04 +00:00
pooka
7b0c00ddf9 Print "end of special cases" only where special cases end and not
a second time at the end of the file.  Adjust whitespace for the
sheer functional joy of it.

(i hope i didn't ruin someone's joke by missing a humorous implication
that all vnode operations are considered a little special)
2010-04-14 12:19:50 +00:00
pooka
794d5a7111 _KERNEL_OPT 2010-04-13 22:46:10 +00:00
pooka
2c4f731dd6 tyop 2010-04-12 23:20:18 +00:00
christos
302c1e42ae void police! 2010-04-12 23:09:28 +00:00
pooka
290fe400e0 Separate lwp specificdata data structure management from lwp cpu/vm
management.

No functional change.

(specificdata routines went from kern_lwp.c to subr_lwp_specificdata.c)
2010-04-12 22:15:31 +00:00
mrg
18d175fa3c reject attempts to write CTLTYPE_BOOL nodes with a value other than 0 or 1. 2010-04-11 01:50:25 +00:00
pooka
cfff0936d1 regen: remove unused vdesc_transports 2010-04-10 19:44:02 +00:00
pooka
790df5ab8d "Not yet" since 4.4BSD is quite a lot of "not yet", so remove
vdesc_transports from vnodeop_desc until we have a "not not yet"
situation.

Ride 5.99.27 bump (full build still in progress.  i wanted to get
this in as soon as possible to most effectively ride the bump.)
2010-04-10 19:41:54 +00:00