Commit Graph

2755 Commits

Author SHA1 Message Date
rjs
925bb52c9a Set sc_dev field of softc.
Should pullup to 7.
2016-02-28 19:39:27 +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
christos
d5137ecf34 fenv for m68k 2015-12-24 14:12:39 +00:00
dholland
25d3b9e7cb Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
2015-09-07 03:49:44 +00:00
uebayasi
44e9385020 Declare dependency on fpsp.o via newly introduced ${MD_LIBS} instead of
${MD_OBJS}.

${MD_OBJS} should be used only for objects that must be linked first (i.e.,
start code).  Objects have to be compiled following common compile rules,
and have to be generated into common places (i.e., top of kernel build
directory).

${MD_LIBS} defines libraries that are built by separate makefiles, under
separate directories.  `Makefile.kern.inc' doesn't know intermediate library
objects.
2015-09-06 02:17:30 +00:00
uebayasi
c692eec272 Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sources. Remove a hack
to set -DCOPY_SYMTAB from sys/conf/Makefile.kern.inc.  Remove unnecessary
dependencies too.
2015-08-30 01:46:02 +00:00
uebayasi
7fe7089a02 Add pseudo-device ksyms' where options DDB' is used, because
config(1)/config(5) can't handle module dependency correctly at this
moment.

(This is another proof that shared file definition (`file xxx.c a|b')
is a bad idea.)
2015-08-21 01:52:07 +00:00
christos
e7ae23fd9e include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
maxv
b74522aae1 Remove KMEMSTATS. 2015-08-08 06:36:24 +00:00
maxv
d22da207ed Remove the KMEMSTATS option. It no longer exists. 2015-08-07 07:29:33 +00:00
mlelstv
6f00c789e1 Use C99-style initializers for struct dkdriver. 2015-04-26 15:15:19 +00:00
pgoyette
37202cb966 Update device dependency information - the sysmon major device now depends on the sysmon module itself, not on the individual components. 2015-04-23 23:22:51 +00:00
martin
c39c2a5c70 Handle EINVAL in the fault path and send SIGBUS on mmap'd access past EOF. 2015-03-03 20:36:31 +00:00
christos
ca4020acbe fix typo 2015-01-03 16:44:14 +00:00
christos
c182898b0d We have three sets of DTYPE_ constants in the kernel:
altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
2015-01-02 19:42:05 +00:00
christos
936e9da4e4 avoid trigraph 2015-01-02 15:50:28 +00:00
christos
39080bbec6 name the flag ioctl argument "flag" like most other drivers. 2015-01-02 15:49:51 +00:00
christos
555c17c325 declare error 2015-01-01 17:46:09 +00:00
christos
c60db2e923 make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
2014-12-31 19:52:04 +00:00
chs
6d40f9ff57 add a new "fo_mmap" fileops method to allow use of arbitrary uvm_objects for
mappings of file objects.  move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap().  add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).
2014-12-14 23:48:58 +00:00
manu
239cf5506d Remove unused extended attributes kernel options
As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
2014-11-16 16:01:39 +00:00
manu
2cab231d44 Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr

Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
2014-11-12 10:47:20 +00:00
snj
f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
dholland
4acb6306f5 Systematize (and in many cases, fix) the comments on options COMPAT_NN.
There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
2014-08-23 20:26:56 +00:00
joerg
a26164117a Reorganize symbol table embedding. The existing option SYMTAB_SPACE is
replaced by the make option COPY_SYMTAB set to any value. The copy of
the symbol table is no longer put into a buffer in kern_ksyms.o, but a
small helper object. This object is build first with a dummy size, then
the kernel is linked to compute the real dimension of the symbol table
buffer. After that, the helper object is rebuild and the kernel linked
again.
2014-08-17 21:17:43 +00:00
apb
2275423cea Add "no options COMPAT_70" to all kernel configuration files that
already had "no options COMPAT_60".
2014-08-16 17:57:02 +00:00
apb
30a0368950 Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
2014-08-16 17:56:30 +00:00
dholland
f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
dholland
8c70ef39af Add d_discard to all struct bdevsw instances I could find.
I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
2014-07-25 08:02:18 +00:00
tsutsui
63fc04e1bf Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.
Compile tests only.
2014-07-05 09:21:14 +00:00
martin
a2e013be29 Remove an unused variable 2014-06-29 12:18:42 +00:00
christos
43ebc39121 kill sprintf 2014-03-26 17:41:15 +00:00
christos
b2543b9136 use cpu_{g,s}etmodel 2014-03-24 20:06:31 +00:00
dholland
a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
tsutsui
b836c6ccfa Use common m68k/busaddrerr.s for bus error and address error handlers.
No binary changes on GENERIC.
2014-03-15 12:04:22 +00:00
tsutsui
7dbadedea5 Remove an instruction for nonexistent 060 branch prediction error accounting.
It's amiga and atari specific and copied from amiga/locore.s
to mac68k/locore.s in rev 1.80, then pasted into other ports.
Note this is harmless because all these ports don't have 68060 variants
(i.e. it's inside #if defined(M68060) block) and mvme68k (which has 68060)
has removed it since the initial import.
2014-03-09 16:28:43 +00:00
martin
efe0246c05 Add missing cast (to make it compilable) 2014-01-30 13:04:06 +00:00
christos
2cfa1ce520 kill VM_DEFAULT_ADDRESS use 2014-01-26 00:08:48 +00:00
martin
652316b56c Simplify 2013-10-25 21:42:30 +00:00
martin
0e5f0c1170 Remove not yet used stuff 2013-10-25 21:24:14 +00:00
martin
12d38f74fe Mark potentially unused variable 2013-10-25 21:19:56 +00:00
martin
79c1d84493 Mark a potentially unused variable 2013-10-25 21:09:25 +00:00
martin
7b1be0e5a2 Remove unused variables 2013-10-25 20:49:38 +00:00
martin
db379ec35c Remove an unused variable 2013-10-19 19:47:55 +00:00
christos
86b6b2fef2 make cpu_need_resched() macros consistent; __USE flags 2013-10-19 19:20:59 +00:00
martin
ed33e23721 Avoid unused variables 2013-10-19 19:08:39 +00:00
martin
2f3905777f Mark a potentially unused variable 2013-10-19 16:23:17 +00:00
martin
cc82fef0a2 comment out unused code (for documentation purposes) 2013-10-19 16:21:57 +00:00
martin
7536c3dbed Make sure we don't accidently pass an unsolicited packet as "ack only"
(which would dereference unitialized pointers)
2013-10-19 16:19:13 +00:00
martin
f05fd841f8 Remove set but unused variables. 2013-10-18 18:38:49 +00:00