Commit Graph

2839 Commits

Author SHA1 Message Date
ozaki-r 040205ae93 Protect ifnet list with psz and psref
The change ensures that ifnet objects in the ifnet list aren't freed during
list iterations by using pserialize(9) and psref(9).

Note that the change adds a pslist(9) for ifnet but doesn't remove the
original ifnet list (ifnet_list) to avoid breaking kvm(3) users. We
shouldn't use the original list in the kernel anymore.
2016-05-12 02:24:16 +00:00
pooka c8a34480e3 Avoid '.' in variable names which are expected to be passed to
this Makefile via the env.

That character is strictly speaking not allowed by POSIX in an exported
variable name, and at least dash >= 0.58 refuses to export such variables.

Furthermore, since the individual CFLAGS/CPPFLAGS/etc. variables
are not comprehensive enough for all cases (e.g. HURD), just
support the .includable version from now on, i.e.
RUMPCOMP_MAKEFILEINC_rumpdev_pci.

curious failure mode debugged by Martin Lucina
2016-05-10 19:38:29 +00:00
pooka 7ddba29e76 regen syscall files 2016-05-06 10:19:40 +00:00
martin 4b3cc0cbac Add lwp_find() - verbatim copy from the hard kernel. 2016-04-24 07:45:10 +00:00
christos ef9bd43259 regen 2016-04-23 23:09:27 +00:00
skrll 4e8e66439e Merge nick-nhusb
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix
2016-04-23 10:15:27 +00:00
ozaki-r 220ff4e7a0 Prevent LWP migrations between CPUs during upper layer processing
This is a contract of psref(9) that is used by upper layer componenets,
e.g., bridge(4).
2016-04-19 05:48:10 +00:00
ozaki-r 4da47673a2 Rump-ify if_pppoe
From s-yamaguchi@IIJ
2016-04-15 01:35:25 +00:00
martin 8dca0c72be Add a dummy splraiseipl() 2016-04-11 10:53:06 +00:00
ozaki-r 322b6a238d Sweep unncessary radix.h inclusions 2016-04-11 08:56:16 +00:00
ozaki-r 6a82a3a147 Add psref to rump kernel 2016-04-11 06:49:11 +00:00
christos 4fbdf206cb Split p_xstat (composite wait(2) status code, or signal number depending
on context) into:
1. p_xexit:		exit code
2. p_xsig:		signal number
3. p_sflag & WCOREFLAG	bit to indicated that the process core-dumped.

Fix the documentation of the flag bits in <sys/proc.h>
2016-04-04 20:47:57 +00:00
christos cfc738154f regen 2016-04-03 01:22:39 +00:00
christos 2a60134171 regen 2016-04-03 01:01:46 +00:00
christos 3d596ad050 regen 2016-04-02 21:02:39 +00:00
christos 3b88282d06 elide vax compiler bug. 2016-03-23 21:38:51 +00:00
joerg 9adca58c0e Align the message buffer. The kernel routines normally are used only
with page aligned buffers and they assume at least pointer alignment. Be
defensive here and align to 256 Bytes.
2016-03-08 14:30:48 +00:00
christos 3eda01ea39 Avoid void * arithmetic 2016-03-07 00:51:32 +00:00
christos 8e7e68da22 PR/50900: David Binderman: optimize memset 2016-03-06 19:47:41 +00:00
pooka 2657abc4e0 add cpu_lock
from freqlabs on irc
2016-02-19 18:38:37 +00:00
riastradh d80621961e Need <sys/mutex.h> for mutex(9). 2016-02-17 01:48:36 +00:00
riastradh 9e2ce23efb Caller must have exclusive access to rndsource for rnd_add_data(_sync). 2016-02-17 01:48:04 +00:00
riastradh e3389acee7 Make hyperentropy rndsource work synchronously, again.
This time for real!  *crosses fingers*
2016-02-17 01:42:25 +00:00
ozaki-r 9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
pooka 09c0762f99 Allocate struct cpu_info dynamically. Saves quite a lot of BSS in the
common case and reduces rump kernel memory requirements by 10% or more
in really tiny deployments.
2016-02-08 18:18:19 +00:00
mlelstv bbd8666d0f Split case folding table into separate source file and add full
copyright and permission notice from http://www.unicode.org/copyright.html
2016-02-06 10:40:58 +00:00
pooka b47801c831 Remove leading spaces.
Bet you didn't see that one coming.
2016-02-02 13:07:30 +00:00
pooka f30877a77a optimize for size a.k.a. operation nuke trailing spaces 2016-02-02 13:02:34 +00:00
pooka a8b37cc8bf Add capability to attach external memory to files on rumpfs. This
feature is useful e.g. for tight-memory systems where you don't need
block storage, but still need to provide some data via files.
2016-02-02 12:22:23 +00:00
pooka 4dac192382 regen 2016-02-02 01:15:58 +00:00
pooka ae1e89ede5 snarf fcntl definitions 2016-02-02 01:15:24 +00:00
pooka 0bb9321be6 periodic regen (because having new rcs ids in comments is most useful) 2016-02-02 01:14:26 +00:00
pooka 524147ffc7 Move "shotgun approach to rump syscalls" from rump.h to a separate header,
sort of as a hint that relying on those macros is not necessarily the
way you want to do things in 2016.  Include things from rump.h for compat
for the time being, though.
2016-01-31 23:14:34 +00:00
christos 84c7254397 PR/50631: Joerg Sonnenberger: Don't rename syscalls before you include
the relevant headers.
2016-01-29 20:35:48 +00:00
pooka cbf188301a regen syscall files 2016-01-26 23:49:46 +00:00
pooka 1730d8f0cf nuke a few missed -Ifactiondir CPPFLAGSitions. 2016-01-26 23:41:15 +00:00
pooka 93f2ab8ce8 regen vnode interfaces 2016-01-26 23:30:10 +00:00
pooka 00e5ca99e7 regen rump kernel interfaces for header change.
(they were already manually edited for a prior commit, so not much change)
2016-01-26 23:25:40 +00:00
pooka 9187c84558 "rump_private.h" -> <rump-sys/kern.h> 2016-01-26 23:24:55 +00:00
pooka a3ffdb865d generate privhdrs to new location 2016-01-26 23:22:22 +00:00
pooka bf54b2f752 include rumpif private headers from <rump-sys> 2016-01-26 23:21:18 +00:00
pooka 6bb5142288 Put the kernelside rump kernel headers into <rump-sys> instead of
sprinkling them around the faction directories.  Avoids having
to add a CPPFLAGS (or several) to pretty much every component
Makefile.

Leave compat headers around in the old locations.

The commit changes some autogenerated files, but I'll fix the
generators shortly and regen.
2016-01-26 23:12:14 +00:00
pooka 18353ae21f prop_dictionary_t hasn't been needed here in, um, 5 years, so remove
the type madness.
2016-01-25 12:25:38 +00:00
pooka d35b86acad Don't include <rump/rumpvnode_if.h> from rump.h. It's not needed
unless you're doing something special, but requires register_t.
Adjust the few places which actually need rumpvnode_if.h.
2016-01-25 11:45:57 +00:00
pooka 9331c560dd Move librumpuser compile-time options into the librumpuser source
directory.  Those options apply only for the in-tree implementation.
2016-01-25 00:24:23 +00:00
ozaki-r eef1a9e462 Fix build with RUMP_LOCKDEBUG=yes 2016-01-22 04:26:01 +00:00
pooka ea1845ad67 put lwp/proc stuff into the same source module (emul.c -> lwproc.c) 2016-01-18 23:27:20 +00:00
pooka 85df50f357 massively reduce header pollution from times prehistoric 2016-01-18 23:21:28 +00:00
pooka 45c68bb8cc Fix dlopen()/dlclose()+RUMP_USE_CTOR to not leave dangling pointers around. 2016-01-18 16:46:08 +00:00
pooka bd792fddbf boottime is a timespec, not timeval 2016-01-18 15:53:38 +00:00