Commit Graph

279 Commits

Author SHA1 Message Date
cherry
e08917ef90 switch all ports to use uvm_init.c:uvm_md_init()
uvm_setpagesize() is now subsumed within this funciton.
2016-12-22 14:47:53 +00:00
ozaki-r
dd8638eea5 Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input
The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
2016-12-15 09:28:02 +00:00
christos
ef2deb33e0 wildcard speaker attachments, now that we can handle many of them. 2016-12-13 20:42:15 +00:00
christos
219b8dae14 remove VAUDIOSPEAKER for now, will be done differently. 2016-12-10 23:03:22 +00:00
nat
03783bb56a Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
2016-12-08 11:31:08 +00:00
ozaki-r
c0e7885f20 Apply deferred if_start framework
if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
2016-12-08 01:12:00 +00:00
maya
ef4ada88df CFATTACH_DECL -> CFATTACH_DECL_NEW
struct device * -> device_t
2016-07-19 17:04:25 +00:00
maya
28b30b97a1 Remove unused bits
(mostly because _IPL_NSOFT is not defined)
2016-07-19 16:39:54 +00:00
maya
67b719e39e Change cpu_intr prototype to new one, to avoid conflicts.
Make the function resemble typical cpu_intr code.
2016-07-19 13:58:09 +00:00
maya
294885819e Don't use old style definition 2016-07-19 13:50:02 +00:00
maya
c7f49c0a67 We need to include param.h before device.h, as it uses uint64_t 2016-07-19 13:48:51 +00:00
maya
6d7eeb5b57 ret is only used in debug cases, mark as __unused. 2016-07-18 22:24:15 +00:00
maya
605a5134f3 Include mips/cpuregs.h for MIPS_PHYS_TO_KSEG1 2016-07-18 22:17:09 +00:00
maya
2cdb8600b4 Remove unused variables 2016-07-18 22:13:22 +00:00
maya
55444510e0 Don't use old-style definitions.
Appeases GCC.
2016-07-18 22:07:38 +00:00
maya
7fc0e5755e Include sys/device.h for cfdata_t 2016-07-18 22:05:53 +00:00
maya
a87b681f14 Adapt to change: struct cfdata * -> cfdata_t 2016-07-18 21:54:12 +00:00
maya
88c2982e9a Adapt to recent MIPS changes
need mips/locore.h for cpu_identify
2016-07-18 19:50:11 +00:00
ozaki-r
d938d837b3 Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
2016-06-10 13:27:10 +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
martin
a182d9ea04 Add missing includes 2016-04-03 10:03:34 +00:00
martin
117132e6a6 Adopt to device_t/struct ifnet* changes 2016-04-03 10:03:04 +00:00
martin
9027300348 Use device_t/struct ifnet* for phy callbacks 2016-04-03 10:01:52 +00:00
martin
62078f8320 Fix bpf_mtap argument 2016-04-03 09:58:45 +00:00
martin
044276cb07 Convert # line comments to // line to avoid preprocessor confusion 2016-04-03 09:06:28 +00:00
martin
0213dfd655 Add missing include 2016-03-28 10:35:36 +00:00
martin
e002a1e12e Simplify now that we have an internal toolchain 2016-03-28 10:31:45 +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
257ef94e95 Add mips fenv.h (From FreeBSD) 2015-12-21 17:02:32 +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
maxv
d22da207ed Remove the KMEMSTATS option. It no longer exists. 2015-08-07 07:29:33 +00:00
matt
4732ca2c1e Use cpu_startup_common() 2015-06-30 02:39:03 +00:00
matt
c525e41f98 Declare or #define avail_start and avail_end as appropriate 2015-06-11 15:11:13 +00:00
riastradh
445478ce67 MD rnd.h cleanups. Please let me know if I broke anything! 2015-04-13 21:18:40 +00:00
martin
4a2bbe3d84 Force gcc to pass -msoft-float to the assembler (to make newer binutils
happy)
2015-04-06 10:49:13 +00:00
martin
3884499e40 Use ta0 instead of t4 (so at least it compiles for all ABIs) 2015-03-22 20:32:08 +00:00
christos
b59f66e17c use the inline bcdtobin and bintobcd directly instead through a macro. 2014-11-20 16:34:25 +00:00
tls
ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
martin
0ce6eb3787 Split softc, fix wsfont_find call. 2014-07-08 13:35:43 +00:00
martin
d6d2ce559a Add missing includes, use new style function declarations. 2014-07-07 10:12:24 +00:00
martin
589d32fb2c Adapt to struct buf changes 2014-07-04 08:51:15 +00:00
martin
b99d8c4997 Adapt to new attach world order 2014-07-04 08:33:08 +00:00
martin
ae2c055efb Add missing includes, fix C99 struct initialization 2014-07-04 08:09:47 +00:00
martin
7db833408c Use .set arch=r5900 to enable r5900 specific instructions 2014-07-04 07:59:17 +00:00
martin
3f40a990f2 Fix extent_create() call 2014-07-04 07:51:14 +00:00
martin
d42796f67d Add missing <sys/device.h> include 2014-07-04 07:27:57 +00:00
martin
3bdb758acc md_imask_update is not an inline function, fix declaration. 2014-07-04 07:27:28 +00:00
martin
637a4fdb26 Add missing OBJCOPY 2014-07-04 07:03:35 +00:00
martin
294d08149c Add -msoft-float to AFLAGS as well 2014-07-02 13:27:14 +00:00
martin
377dd2856e The correct toolchain tuple is mipsel--netbsd (not netbsdelf) 2014-07-02 12:44:15 +00:00