Commit Graph

285256 Commits

Author SHA1 Message Date
ryoon 28390de185 Enable to mount Raspberry Pi Pico's USB mass storage partition
Fix PR kern/55985.
O.k. by thorpej@.

Pull-up to netbsd-8 and netbsd-9.
2021-02-11 00:15:55 +00:00
christos 45516a99e8 PR/55986: Ryo Onodera: DK_BUSY must have mask as second argument. Make cd.c
consistent by also using __BIT()
2021-02-10 16:30:01 +00:00
ryo 1b3a3b1b74 Oh...the name of the mcount call was different between gcc and llvm.
gcc calls it as "_mconut", llvm calls as "__mcount".

Change the main name of mcount to "mcount()", and created "_mcount" and "__mcount" entries
to work regardless of which compiler the object was created with.
2021-02-10 12:31:34 +00:00
ryo 05347759f0 add support kernel profiling on aarch64
- add MCOUNT_ENTER, MCOUNT_EXIT macro
- __mcount() function should be aligned
- add "-fno-optimize-sibling-calls" option when PROF. for accurate profiling, it is better to suppress the tail call.
2021-02-10 08:25:01 +00:00
simonb b8da3fc26d On MIPS use a helper function to work out the current PC and then
call stacktrace_subr() directly for displaying a stacktrace with
db_stacktrace() and friends.
2021-02-10 07:19:54 +00:00
simonb 5267a28fdc Allow for MD code to use a different function than db_stack_trace_print()
to be used with db_stacktrace() and friends by pre-defining the
db_stacktrace_print macro.
2021-02-10 07:17:39 +00:00
christos dc6815d699 From Cy Schubert:
ipfilter: Use the softn (NAT softc) host map size in ip_nat6
calculation. The ipfilter NAT table host map size is a tunable
that defaults to a macro value defined at build time. HOSTMAP_SIZE
is saved in softn (the ipnat softc) at initialization. It can be
tuned (changed) at runtime using the ipf -T command. If the
hostmap_size tunable is adjusted the calculation to determine where
to put new entries in the table was incorrect. Use the tunable in
the NAT softc instead of the static build time value.
2021-02-10 00:28:55 +00:00
rillig 518cbcb21b tests/libcurses: add missing space after control flow keywords 2021-02-09 20:42:31 +00:00
rillig 6938509815 tests/libcurses: replace remaining strcasecmp with strcmp
There is no reason to write special functions in a different case than
the canonical one, just like for the regular curses functions.
2021-02-09 20:39:20 +00:00
rillig e91849a6b1 tests/libcurses: fix spelling of the special call to DRAIN 2021-02-09 20:31:02 +00:00
rillig 82a08c1a4a tests/libcurses: compare function names case-sensitive
There is absolutely no reason to write function names in upper case or
mixed case.
2021-02-09 20:24:02 +00:00
rillig 74a9e3d2cc tests/libcurses: fix scanf parameter for unsigned int 2021-02-09 20:22:11 +00:00
ryo b30f8af34d fix build without MULTIPROCESSOR 2021-02-09 17:44:01 +00:00
jakllsch 2e3b0e2d82 Zero interrupt handles upon allocation.
Might prevent detach-time bugs.
2021-02-09 15:05:49 +00:00
jakllsch f7e5a58297 Avoid an extra daif read when dispatching interrupts by using
ENABLE_INTERRUPT() / DISABLE_INTERRUPT() instead of cpsie() / cpsid() macros.
2021-02-09 14:24:14 +00:00
simonb fca6380f2a Remove a macro that has never been used. 2021-02-09 13:28:47 +00:00
simonb 493ef37bf0 Trailing whitespace, remove extra blank line. 2021-02-09 13:26:25 +00:00
isaki 530812a995 Update function name in a comment. 2021-02-09 12:39:28 +00:00
isaki ede4f2b616 Protect also audioopen() and audiobellopen() from audiodetach() with
psref(9), as well as others(audioread, audiowrite, etc..).
- Rename audio_file_enter to audio_sc_acquire_fromfile, audio_file_exit
  to audio_sc_release, for clarify.  These are the reference counter for
  this sc.
- Introduce audio_sc_acquire_foropen for audio{,bell}open.
- audio_open needs to examine sc_dying again before inserting it into
  sc_files, in order to keep sc_files consistency.
The race between audiodetach and audioopen is pointed out by riastradh@.
Thank you for many advices.
2021-02-09 12:36:34 +00:00
yamt 3bc7a17908 Make Raspberry PI 3 Model A+ use bwfm config for Model B+
* It works for me.

* It's what linux-firmware does.
  https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=923bfa68a1c97929652f029da699495f4ce43f14
2021-02-09 11:57:20 +00:00
wiz d2560851e3 Try improving readability in wrt negations.
Use Nx.  Remove trailing whitespace.  Fix some typos.
2021-02-09 09:01:29 +00:00
isaki 9f9bc7f002 Change the lock conditions to call audio_unlink().
This can remove a different copy of audio_exlock_enter() in audio_unlink()
and can use normal one.  Also, in audiodetach(), this can set the exlock
at more natual order (before calling audio_unlink()).
No noticeable functional changes are intended.
Thanks for comments, riastradh@.
2021-02-09 05:53:14 +00:00
dholland d4c3ba45a9 Document in poll(2) that poll first appeared in NetBSD in NetBSD 1.3. 2021-02-09 01:12:01 +00:00
dholland 800d267b53 typo in previous. 2021-02-09 01:01:31 +00:00
dholland cf51226d61 Rework the text of poll(2) for clarity. Bump date. 2021-02-09 00:50:47 +00:00
rillig 03f821dbf2 tests/libcurses: fix off-by-one error in line numbers in diagnostics
I had broken this in testlang_parse.y 1.22 from 2021-02-07, when I
extracted the common 'eol' from the statements.  Extracting 'eol' had
the effect that the action for the statement was run before the line
number increased.

Now the line numbers in the diagnostics are the same again as before.

For lines that end with a backslash, the reported line number is the one
from the last of these lines, not the first one, also as before.  This
feature is not used by any of the current tests though.
2021-02-08 23:54:03 +00:00
joerg cfe420e9b1 Don't define a label twice. 2021-02-08 23:50:25 +00:00
rillig facc9c9e92 tests/libcurses: use consistent indentation for grammar rules 2021-02-08 20:55:42 +00:00
rillig 91cc09774d tests/libcurses: extract functions 'input' and 'noinput' from grammar 2021-02-08 20:39:33 +00:00
rillig 9e7915b0b6 tests/libcurses: indent grammar functions consistently 2021-02-08 20:26:46 +00:00
rillig 66374bbd09 tests/libcurses: declare %type in grammar
It looks as if the original author just didn't know how to declare the
type of non-terminals.  The explicit types in the '$' expressions were
all consistent.

No functional change.
2021-02-08 20:09:45 +00:00
rillig 9dc059c978 tests/libcurses: extract function 'delay_millis' from the grammar 2021-02-08 19:35:21 +00:00
rillig b798190935 tests/libcurses: move function 'check' out of the grammar section
This removes the inconsistent indentation.
2021-02-08 19:28:08 +00:00
rillig 09f966d145 tests/libcurses: fix typo in license text 2021-02-08 19:15:20 +00:00
martin f44c8ec769 Use the same naming scheme for install images as we use for the ISO images. 2021-02-08 19:11:41 +00:00
rillig 057f5777ce tests/libcurses: remove unused token DRAIN
There is a special function named 'DRAIN', but not a statement.  The
function name does not need its own token.
2021-02-08 19:09:59 +00:00
rillig 12fb37738f tests/libcurses: fix sentinel for execl
For systems where NULL is defined as a simple 0 or 0L.
2021-02-08 19:04:37 +00:00
rillig dc127031c2 tests/libcurses: on errors, print nonprintable characters as well 2021-02-08 19:00:22 +00:00
wiz 00fea3bc7a Fix typo in comment. 2021-02-08 09:31:05 +00:00
skrll d6c5fb612e Trailing whitespace 2021-02-08 06:56:26 +00:00
nia 1b135bd341 clarify what happens when kill(-1, ...) does nothing 2021-02-08 01:00:49 +00:00
simonb 31dd19e36c Comment out HZ=512. This was only intended to be enabled for profiling. 2021-02-08 00:47:53 +00:00
simonb af7828c9eb Correct the comment at the top of these config files identifying what
they run on.
2021-02-08 00:35:25 +00:00
rillig 7879077738 tests/libcurses: fix undefined behavior in test addch
The libcurses framework is not strictly typed and thus provides plenty
of ways to shoot yourself in the foot.  It's a waste of time debugging
things that a proper programming language can easily prevent.

The function addch expects an argument of type 'chtype'.  Passing a
"double-quoted" string does not match this, as 'chtype' is completely
different from a plain 'char'.  Instead, functions taking a 'chtype'
must be passed a `backtick-quoted` string.
2021-02-07 23:30:33 +00:00
rillig a9a73810b2 curses_screen.3: fix typo 2021-02-07 23:00:57 +00:00
rillig 1f48f93d43 tests/libcurses: use a single message style for diagnostics
Previously, there were several concurring styles:

	$msg in line %zu of file %s
	$msg line %zu of file %s
	%s, %zu: $msg

All these are now replaced with "%s:%zu: $msg".
2021-02-07 21:33:27 +00:00
jmcneill 720d77e079 Optimize hardware priority updates.
In gicv3_set_priority, read the current priority mask and only update it
if we are lowering the priority. The hardware priority filter is raised
only after taking an interrupt. This makes splfoo/splx without an interrupt
in between considerably cheaper as PMR writes are relatively expensive
compared to reads.

While here, avoid an extra daif read when dispatching interrupts by using
ENABLE_INTERRUPT() / DISABLE_INTERRUPT() instead of cpsie() / cpsid() macros.
2021-02-07 21:24:50 +00:00
jmcneill 0830e5abd5 Use ENABLE_INTERRUPT() / DISABLE_INTERRUPT() instead of cpsie()/cpsid() in
places where we don't care about the cpsie() return value.
2021-02-07 21:18:37 +00:00
jmcneill f0c0b04781 Add ENABLE_INTERRUPT() / DISABLE_INTERRUPT() macros for compatibility
with aarch64.
2021-02-07 21:15:40 +00:00
jmcneill e410421efc Use reg_daif{set,clr}_write directly instead of daif_{en,dis}able for
ENABLE_INTERRUPT() and DISABLE_INTERRUPT() macros, to avoid an unnecessary
reg_daif_read().
2021-02-07 21:15:09 +00:00