Commit Graph

7605 Commits

Author SHA1 Message Date
drochner cc068f7930 fix and cleanup for tvtohz():
-assume (KASSERT) that the timeval given is normalized, and remove
 some partial fixup which I don't see what it is good for
 (I'm ready to back that out if someone tells a reason)
-catch overflows due to conversion of time_t (from tv_sec) to
 integer -- this function doesn't do 64-bit arithmetics (which makes
 sense because relative times which don't fit into 32 bits can be
 considered nonsense here), and before a huge tv_sec could lead to
 a zero hz result, violating the caller's assumptions (in particular
 trigger a diagnostic panic in abstimeout2timo())
2011-01-26 19:15:13 +00:00
mbalmer 34218c6ae7 Cast arguments to vaddr_t when using PRIxVADDR in the printf format string. 2011-01-23 11:01:08 +00:00
matt f8b3fec406 Change ^T/SIGINFO to print the PC/CPU# or PC instead of "running"/"runable"
if a port provide LWP_PC.
2011-01-23 07:30:07 +00:00
christos ea936748e5 Use the L_ flags instead of the P_ flags for lwps. 2011-01-22 20:54:43 +00:00
dyoung 705a4fcdb3 Exclude drm sources from tags computation. 2011-01-21 23:23:44 +00:00
dyoung 56f6a5a11c Move device_printf() from ath_netbsd.c to subr_prf.c for reuse in a new
driver.
2011-01-21 17:46:19 +00:00
cegger 690a6887c5 buildfix: uvm_extern.h -> uvm.h 2011-01-19 09:02:52 +00:00
matt 2dfab23c8c Copy PK_32 to p2->p_flag instead of doing it in the cpu_proc_fork hook. 2011-01-18 23:56:48 +00:00
rmind 2e8aa0fd8f mq_poll_fop: return only those events which are polled. 2011-01-18 20:32:53 +00:00
matt ad396e28d0 Make struct disklabel 8 byte aligned. This increases its size by 4 bytes
on IPL32 platforms so add code in sys_ioctl (and netbsd32_ioctl) to deal
with the older/smaller diskabel size.  This change makes disklabel the
same for both IPL32 and LP64 platforms.
2011-01-18 19:52:23 +00:00
pooka d2269cc00d regen: include sys/sched.h in syscallargs.h 2011-01-18 17:34:28 +00:00
pooka 8aa52577fe Make syscallargs.h include <sys/sched.h> for cpuset_t typedef for
the benefit of ports where it does not get typedef'd via autoinclusion
of other headers.

problem pointed out & fix proposed by Izumi Tsutsui
2011-01-18 17:33:05 +00:00
matt 748b8f0d25 Add more detailed debug printfs (one for each error case). 2011-01-18 08:21:03 +00:00
matt 962f7d2435 Move up evcnt_init to before cpu_startup() 2011-01-18 08:18:43 +00:00
matt c710686832 Add code to detect attaching of evcnt before evcnt has been initialized. 2011-01-18 08:16:43 +00:00
matt a20c25e484 Deal with ELFnn_MACHDEP_ID_CASES a bit better. 2011-01-18 08:15:51 +00:00
pooka 111bbbce9e Missed pselect50 in previous (file was open in editor ... d0h).
Add mknod50 and fhstat50 too.
2011-01-17 18:24:17 +00:00
pooka 322c9db78b regen with no changes (to show previous commits affected rump only) 2011-01-17 16:22:53 +00:00
pooka 39a698a4f3 Mark a few 5.0 COMPAT syscalls as RUMP now that it's possible 2011-01-17 16:21:40 +00:00
pooka 53c9307857 Rework how syscall compat is handled for rump syscalls. The old
one had the problem of bypassing the syscall layer and doing a
function call into the kernel directly.  Therefore there was no
way for users of librumpclient to specify compat.  The new model
pushes the compat handling in the kernel and leaves only the task
of selecting the right syscall number to the client.

This change also introduces a stable ABI for rump syscalls, i.e.
it is possible to use the same syscall client library both on NetBSD
5.0 and -current and get the syscalls resolved to the right place
depending on the ABI at the time the client binary is compiled.

A list of what to be called when will have to maintained separately
simply because this information is not available in syscalls.master
-- in the case of the normal kernel we always want to resolve a
newly linked syscall to the latest version, whereas in rump we
might want to resolve a syscall to a -current kernel to the 5.0
compat call (because our client namespace is 5.0).  This information
in maintained in rump_syscalls_compat.h with the current format:

/* time_t change */
#if !__NetBSD_Prereq__(5,99,7)
#define RUMP_SYS_RENAME_STAT rump___sysimpl_stat30
....

If no compat override is given, a syscall resolves automatically
to the latest version of the syscall.

Also, this change autogenerates forward declarations for all syscall
types where it is possible (i.e. ones without typedef insanity).
This makes it possible to include rump_syscalls.h without including
rump.h.
2011-01-17 16:16:54 +00:00
matt 7eef82641e If LWP0_MD_INITIALIZER is defined, use it to initalize .l_md (avoid runtime
to do it if possible).
2011-01-17 08:26:58 +00:00
uebayasi ab332b69c7 Fix a conditional include. 2011-01-17 07:36:58 +00:00
uebayasi 9d567f003d Include internal definitions (uvm/uvm.h) only where necessary. 2011-01-17 07:13:31 +00:00
martin 72b336b07f Using "int" variables with sysctl's CTLTYPE_BOOL is a simple receipt to
loose on big endian machines. So make the variables "bool".
2011-01-14 10:18:21 +00:00
rmind 7146b2f61d Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
2011-01-14 02:06:22 +00:00
pooka 4a92140584 allow file system to decide if it can be downgraded from r/w to r/o 2011-01-13 07:25:50 +00:00
dyoung d92d0c4971 Don't compute tags over cxgb, its symbols clash too often with symbols
in other drivers and subsystems.
2011-01-11 00:36:03 +00:00
christos fb4e945aa5 regen 2011-01-10 04:42:24 +00:00
christos 3d70c4b47c implement sigqueueinfo 2011-01-10 04:39:18 +00:00
christos f79b6ffa09 Add two sysctls one that does verbose transaction logging and a second one
that disables flushing the disk cache (which is fast but dangerous for
data integrity). From simon a long while back.
2011-01-08 20:37:05 +00:00
christos 27ec421326 fix sysctl again. 2011-01-08 20:29:13 +00:00
dholland 5382c59ae1 Tsort functions and remove a small #if 0 block leftover from earlier cleanup.
No functional change.
2011-01-04 07:43:42 +00:00
matt 1cf358c3b4 When determining max/min sym value, ignore ABS symbols which don't
have a type.  This stops ksym thinking that the _KERNEL_OPT symbols
could actually be useful.
2011-01-04 01:40:19 +00:00
pooka a27f30410a update comment 2011-01-03 13:22:32 +00:00
christos 7e1e338bd2 Simplify and avoid kernel segv when the list is NULL. 2011-01-02 20:50:55 +00:00
dholland 6422814ed0 Remove references to SAVESTART and SAVENAME in comments. 2011-01-02 06:58:45 +00:00
dholland 6d2ff39e83 Remove remaining references to SAVESTART. 2011-01-02 05:12:33 +00:00
dholland 13fc777536 Remove the special refcount behavior (adding an extra reference to the
parent dir) associated with SAVESTART in relookup().

Check all call sites to make sure that SAVESTART wasn't set while
calling relookup(); if it was, adjust the refcount behavior. Remove
related references to SAVESTART.

The only code that was reaching the extra ref was msdosfs_rename,
where the refcount behavior was already fairly broken and/or gross;
repair it.

Add a dummy 4th argument to relookup to make sure code that hasn't
been inspected won't compile. (This will go away next time the
relookup semantics change, which they will.)
2011-01-02 05:09:30 +00:00
dholland b845056678 Add an INRELOOKUP namei flag. Sigh. (We don't need more namei flags.)
However, because of a protocol deficiency puffs relies on being able
to keep track of VOP_LOOKUP calls by inspecting their contents, and
this at least allows it to use something vaguely principled instead of
making wild guesses based on whether SAVESTART is set.

Update libp2k to use INRELOOKUP instead of SAVESTART.
2011-01-02 05:04:58 +00:00
dholland a508b19c66 Remove unused nameidata field ni_startdir. 2011-01-02 05:01:20 +00:00
pooka 08421f3eea Update comment and inspired by that update variable naming too.
no functional change.
2011-01-01 22:05:11 +00:00
pooka 2f7b77901e Include system call name in comment even for unimplemented syscalls
in rump_syscalls.c.
2010-12-30 20:09:53 +00:00
pooka afe2ca27dd Mark syscalls not supported by a rump kernel with SYCALL_NOSYS, as
pure function pointer comparison brings weak alias confusion (weak
aliases are necessary for static linkage).
2010-12-30 16:49:24 +00:00
pooka cb92cf6235 whitespace polish in rump_syscalls.c 2010-12-30 13:38:10 +00:00
pooka 8b73c28f1c snafu in previous: extra printf arg 2010-12-30 11:54:50 +00:00
pooka 4d48de638f regen: fill syscallnames up to the rim 2010-12-30 11:45:39 +00:00
pooka c86a7bcf7c Fill syscallnames up to nsysent so that n<nsysent has a non-hyperspace
string mapping.
2010-12-30 11:42:53 +00:00
pooka d9b1a59b40 Pass potential prop dictionary to modcmd when reenabling a builtin
module.
2010-12-29 15:07:36 +00:00
reinoud 766116b74d Fix nestio's behavior on error.
The mbp->b_resid is used to track if all the nested buffers have been issued
and reported back. When the last buffer calls in, mbp->b_resid becomes zero
and biodone(mbp) is called. This is fine as long as there are no errors.

If a read-error does occure in one of the nested buffers, the mbp->b_error is
set and on its call to biodone(mbp), with mbp->b_resid is zero, physio()
panics since it asserts that IF an error is set on a buffer, there should be a
residual amount of data left to transfered.

The patch fixes this case by setting mbp->b_resid back to mbp->b_bcount on
mbp->b_error just before biodone(mbp).

This behaviour is consistent with normal buffer issueing. It either succeeds
or doesn't succeed.
2010-12-22 14:05:50 +00:00
matt 86c8e7039d Add CTASSERT to verify __HAVE_CPU_DATA_FIRST is correct defined or undefined. 2010-12-22 02:43:23 +00:00