Commit Graph

7430 Commits

Author SHA1 Message Date
pooka
f0c67b0751 Feed dust to a few linkset uses and explicitly call the constructor. 2010-05-26 23:53:21 +00:00
pgoyette
c77c96962b Move definition of module_load_vfs_vec from kern_module_vfs.c to
kern_module.c - keeps rump happy.

Thanks, pooka!
2010-05-24 16:37:17 +00:00
pgoyette
c269eb06dd Clean up kern_module.c rev 1.66, thanks to pooka@ for review & suggestions 2010-05-24 15:34:48 +00:00
pgoyette
2c4465aaa0 Protect against attempting to load modules from the filesystem until we
have mounted the root file-system.  This allows us to load built-in and
boot-loader-provided modules much earlier during startup.
2010-05-24 03:50:25 +00:00
pooka
42da46e1d2 Don't namei while holding vnode lock. kern/43328 2010-05-21 16:48:55 +00:00
drochner
8239dc73b5 fix sigwaitinfo/sigtimedwait:
-allow NULL "info" pointer
-return signal number
2010-05-20 17:10:42 +00:00
njoly
a00a76ca8d Add multiple inclusion protection to rump_syscalls.h. 2010-05-17 12:35:20 +00:00
cegger
dfa8eb2f81 Move PMAP_KMPAGE to be used in pmap_kenter_pa flags argument.
'Looks good to me' gimpy@
2010-05-14 05:02:05 +00:00
haad
6b319cec0e Fix bogus KASSERT, typo and KNFize my previous patch. 2010-05-12 15:53:20 +00:00
rmind
70f6a0718b pool_{cache_}get: improve previous diagnostic by checking for panicstr,
so it wont trigger the assert while trying to dump core on crash.
2010-05-12 08:11:16 +00:00
rmind
b3d53a5f95 - Sprinkle asserts to catch calls from interrupt context on IPL_NONE pools.
- Add diagnostic drain attempt.
2010-05-12 03:43:46 +00:00
rmind
6bf9a07036 execve1: move few PNBUF_PUT() outside the lock paths. 2010-05-12 03:40:38 +00:00
haad
6af3749398 Add support for kthread_join in our kernel thread implementation. This is used
by zfs but I think that it can be generaly usefull. Thread need to be created
with KTHREAD_JOINABLE flag and can be joined only once.
When joinable thread was created it will not e automatically reaped from system
and kthread_join must be called on it to reap it.

Ok by ad@.
2010-05-11 22:26:00 +00:00
pooka
a96791040e remove unnecessary #ifdef 2010-05-11 20:21:56 +00:00
pooka
14d288df20 _RUMPKERNEL -> _KERNEL 2010-05-11 20:09:11 +00:00
pooka
b2cb120dee This not working on ews4800mips has nothing to do with rump, so:
_RUMPKERNEL -> _MACHINE != ews4800mips
2010-05-11 20:07:40 +00:00
pooka
5fd51e5ff8 the crowd went crazy
as typo left the stage
2010-05-11 09:30:29 +00:00
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