Commit Graph

246824 Commits

Author SHA1 Message Date
christos
c035549e68 Factor our model printing code; use aprint; eliminate alloca. 2016-12-09 17:18:35 +00:00
christos
e084f4b0b4 don't use alloca 2016-12-09 16:22:09 +00:00
christos
efb3a6b68d audiobell now only needs the unit. 2016-12-09 13:26:47 +00:00
christos
86703f4f21 restore audiobell api 2016-12-09 13:26:11 +00:00
christos
37817cca55 minor cleanups (no functional change) 2016-12-09 13:16:22 +00:00
roy
89a9eb7b34 When loading a kernel, test if it's already loaded before authorizing.
This allows us to return EEXIST instead of EPERM for higher secure levels.

My use case was to stop npfctl complaining that it could not load bpfjit
on ERLITE when it was compiled into the kernel.
It then went on to complain that NPF performance would be de-graded,
but this is clearly not the case.
2016-12-09 13:06:41 +00:00
martin
3a4e285d27 paddr_t might be a different size then a pointer, so cast viauintptr_t
to avoid compiler warnings.
2016-12-09 13:06:02 +00:00
roy
bf6fb5bd46 Include sljit on octeon so we can use OPTIONS BPFJIT to speed up NPF on ERLITE. 2016-12-09 10:30:48 +00:00
kamil
f6271ea6ad Restrict atf_tc_expect_fail(PR port-amd64/51700) only for amd64 (x86_64)
Other ports than amd64 have their own issues, mostly keeping this call as
unimplemented.

While there cast sig_atomic_t to int in the printf(3)-like call -- pointed
out by <martin>

Sponsored by <The NetBSD Foundation>
2016-12-09 08:34:37 +00:00
kamil
56cbf6fa65 Add check in t_exect_null to verify that SIGTRAP was emitted only once
Currently this test fails on amd64.

PR port-amd64/51700
    exect(NULL,NULL,NULL) generates 15859 times SIGTRAP on amd64

On FreeBSD/amd64 this tests passes correctly.

Sponsored by <The NetBSD Foundation>
2016-12-09 06:47:48 +00:00
christos
bbe824547d sync with latest. this should either be called spkr_pcppi or made to work
with both busses.
2016-12-09 06:12:03 +00:00
kamil
5e8d31ff24 Attach t_exect to ATF tests and distribution
Add missing SIGTRAP handler. Assert there that the signal is SIGTRAP as
expected and si_code TRAP_TRACE.

This test will break on some ports that have dummy or incomplete
implementation of exect(2).

This test works on amd64 correctly.

Sponsored by <The NetBSD Foundation>
2016-12-09 06:12:02 +00:00
christos
b5e1bd240f put back the isa/spkrio.h for compat 2016-12-09 06:05:25 +00:00
christos
2721c61205 put back spkrio.h for compat 2016-12-09 06:04:06 +00:00
christos
c53de4b74f include <sys/module.h for now so that things compile. 2016-12-09 05:45:20 +00:00
christos
6f1aff8971 spkrio.h is not isa only anymore. 2016-12-09 05:18:37 +00:00
christos
a93a382016 fix module build
XXX: spkr module is the pcppi version.
2016-12-09 05:17:03 +00:00
christos
5c277ab4e5 move spkrio.h out of isa 2016-12-09 04:46:39 +00:00
christos
2fb257653e more spkr rework. 2016-12-09 04:32:39 +00:00
kamil
13f6a6536b Add new test t_exect to verify exect(2)
This test is a clone of tests/lib/libc/gen/execve/t_execve

t_exect_null:
    Tests an empty exect(2) executing

The function exect() executes a file with the program tracing facilities
enabled (see ptrace(2)).
    -- exect(2)

This test will be attached to build afterwards.

Sponsored by <The NetBSD Foundation>
2016-12-09 04:00:36 +00:00
christos
12fdff5295 remove ptree add lpm 2016-12-09 02:50:06 +00:00
christos
658319f6a2 ditch ptree and use lpm 2016-12-09 02:41:09 +00:00
christos
8f6d079f97 This patches ditches the ptree(3) library, because it is broken (you
can get missing entries!).  Instead, as a temporary solution, we switch
to a simple linear scan of the hash tables for the longest-prefix-match
(lpm.c lpm.h) algorithm. In fact, with few unique prefixes in the set,
on modern hardware this simple algorithm is pretty fast anyway!
2016-12-09 02:40:38 +00:00
christos
9230257046 This spams 100's of times during boot! 2016-12-09 02:38:14 +00:00
christos
2ca960b3b3 make this compile again 2016-12-09 02:26:36 +00:00
christos
9ce9948a4f kill PCPPISPEAKER 2016-12-09 02:25:46 +00:00
christos
c3651a54b6 PCPPISPEAKER 2016-12-09 02:24:17 +00:00
christos
5eb91ec546 kill PCPPISPEAKER 2016-12-09 02:23:25 +00:00
christos
2bfcd885c5 Add spkr_pcppi.c 2016-12-09 02:22:56 +00:00
christos
b8a6dedcae split out the pcppi attachment of the speaker
XXX: needs more work
2016-12-09 02:22:34 +00:00
nat
ae6f65cc33 Revert to previous. Add PCPPISPEAKER flag to fix build. 2016-12-08 23:22:18 +00:00
rmind
f453fec4c6 NPF: adjust the 'stateful-ends' mechanism to tag the packets and thus
pass-through them on other interfaces.  Per discussion with christos@.
2016-12-08 23:07:11 +00:00
nat
3af52eea80 Fix building of the spkr module. The module now is the synthesized speaker.
Reported by joerg@
2016-12-08 21:42:42 +00:00
nat
da633c5ed5 MCLOSE class->flag. Found by hannken@ 2016-12-08 20:53:12 +00:00
nat
4bb9801b95 spkr->speaker. Found by kamil@ 2016-12-08 20:44:24 +00:00
nat
e73c2a631e Fix a build error. Found by joerg@ 2016-12-08 20:33:52 +00:00
christos
a582531a1a finish arm regeneration 2016-12-08 19:35:10 +00:00
christos
5398e0956f more stuff needs -mfpu=vfp 2016-12-08 18:42:01 +00:00
kamil
4b927362a8 Fix Clang/LLVM build
Reported error:
    src/tests/kernel/t_ptrace_wait.c:4401:33:
    error: missing field 'pl_event' initializer
            [-Werror,-Wmissing-field-initializers]

Line in the code:
    struct ptrace_lwpinfo info = {0};

Appease it with initializing info to {0, 0}.

Sponsored by <The NetBSD Foundation>
2016-12-08 13:32:17 +00:00
mlelstv
95b40fadb3 invoke optional d_label callback to give the driver the possibility
to adjust the label with driver specific data.
2016-12-08 12:22:56 +00:00
mlelstv
a80956dfbe Add driver entry point to augment a default disklabel with driver specific
data. Legacy data like RPM values, typenames but also special paritioning
representing disk formats.

Bump kernel rev.
2016-12-08 12:21:54 +00:00
nat
a60401d684 Synthesized PC speaker(4) device. 2016-12-08 11:34:40 +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
nat
d33023d925 New audio sub-system changes - in kernel mixing 2016-12-08 11:17:36 +00:00
nat
82924a36bf The audio sub-system now supports the following features as
posted to tech-kern:

    * Simultaneous playback and mixing of multiple streams
    * Playback streams can be of different encoding, frequency, precision
      and number of channels
    * Simultaneous recording to different formats
    * One audio device per process
    * Sysctls to set the common format frequency, precision and channels
    * Independent mixer controls for recording/playback per stream
    * Utilizes little cpu time for multiple streams / good performance
    * Compatible with existing programs that use OSS/NetBSD audio
    * Changes to audioctl(1) to allow specifying process id for corresponding
      audio device
2016-12-08 10:28:44 +00:00
msaitoh
29ceb203f4 - Remove "pcommit".
- Add "rdt_a".
2016-12-08 06:28:21 +00:00
ozaki-r
5baee62c70 Use psref for ip_rtaddr
ip_rtaddr will be sleepable soon. So use psref instead of pserialize.
2016-12-08 06:25:43 +00:00
msaitoh
9f7ea7417b Add CLWB bit. 2016-12-08 06:11:03 +00:00
ozaki-r
4c25fb2f83 Add rtcache_unref to release points of rtentry stemming from rtcache
In the MP-safe world, a rtentry stemming from a rtcache can be freed at any
points. So we need to protect rtentries somehow say by reference couting or
passive references. Regardless of the method, we need to call some release
function of a rtentry after using it.

The change adds a new function rtcache_unref to release a rtentry. At this
point, this function does nothing because for now we don't add a reference
to a rtentry when we get one from a rtcache. We will add something useful
in a further commit.

This change is a part of changes for MP-safe routing table. It is separated
to avoid one big change that makes difficult to debug by bisecting.
2016-12-08 05:16:33 +00:00
christos
db332cd014 factor out expression. 2016-12-08 03:25:35 +00:00