| Age | Commit message (Collapse) | Author |
|
|
|
implementation visibility of these relocations.
Currently all implementations resolve local symbol relocations in the first
pass and simply skip them in the second. The RISC-V implementation will
make use of this visiblity.
|
|
This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
|
|
|
|
|
|
as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.
|
|
No multiprocessor support here but the compiler can still reorder
memory access.
|
|
newer standardized name. NFC.
|
|
|
|
|
|
to _LIBC and _KERNEL.
|
|
- sparc and sparc64 were not using version 0 sigcontext when there were
no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
sigcontext before. all the other ports that supported sigcontext had
the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
|
|
|
|
|
|
|
|
Using r0 as a temp is a common choice. Some instructions _must_ use
r0 as the destination (like mova or instructions with immediates).
ABI uses r0 as the return register. So a helpful name is not that
helpful for the former use case (temp) and is confusing for the latter
two (ISA or ABI constraints). Same object code is generated.
|
|
|
|
/usr/tests/net/in_cksum/in_cksum.
Now, all the tests for in_cksum successfully pass for sh[34].
No binary changes for kernel.
|
|
Since both this 'mova' and 'and #imm' above must be used against r0,
we need extra 'mov r0, r3'. However, this should still be good both for
sh3 and sh4:
- For sh3, 'mov.l' at odd half-word address is removed; pipeline hazard
due to instruction fetch is resolved.
- For sh4, data cache line is no longer assigned for this 'mov.l'.
Also:
- Upcoming __PIC__ support (in order to avoid text relocations when built
in tests/net/in_cksum) becomes simpler; no need CALL_DATUM_LOCAL() for
cksum128_tail.
- Shave off 4 bytes from text.
No regression is observed for sh3 (hpcsh) and sh4 (landisk).
|
|
*before* checking pcb->pbc_onfault != NULL.
Should fix part of
PR port-sh3/56382
PR port-sh3/56401
i.e., DDB will no longer wrongly indicate NULL as fault PC for kernel mode
address error (and 0xe == EFAULT as r0).
Yes, we have another bugs that cause panics described in the two PRs, but
now we can examine them more easily :).
|
|
|
|
but physically multiple lines.
This is recommended by an example in style:
http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style#rev1.58
Thanks tsutsui@ for pointing it out.
|
|
- Improve uniformity of panic messages. Also, use __func__ instead of
hard-coded function names.
|
|
- Remove redundant parentheses/braces/comments.
- Fix indents.
No binary changes confirmed this time.
|
|
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sh3/sh3/pmap.c#rev1.89
I misunderstood evaluation order of ? operator.
I should have split the commit into two parts, i.e., with and without
binary diffs, in order to avoid such a serious mistake.
Thanks rillig@ so much for careful check!!!!
|
|
- Remove redundant parentheses/braces/comments.
- Improve uniformity of panic messages. Also, use __func__ instead of
hard-coded function names.
- Fix indents.
|
|
they are less likely expected to fire again.
|
|
PR_NOWAIT) in __pmap_pv_enter().
Then, handle this failure in pmap_enter(); return ENOMEM if
PMAP_CANFAIL, and panic otherwise.
|
|
pmap_enter() returns ENOMEM if __pmap_pte_alloc() fails and PMAP_CANFAIL
flag is specified. In this case, remove pv via __pmap_pv_remove() if it is
added to p-v map list via __pmap_pv_enter().
Otherwise, pmap becomes an inconsistent state, which results in an infinite
loop in pmap_page_protect(), as reported in the PR.
Also, KASSERT's are added for sure, in order to detect the infinite loops.
Great thanks to chs@ for finding out this bug!!
|
|
atomic_cas_ulong().
- For arm, ia64, m68k, mips, or1k, riscv, vax: don't define our own
MUTEX_CAS(), as they either use atomic_cas_ulong() or equivalent
(atomic_cas_uint() on m68k).
- For alpha and sparc64, don't define MUTEX_CAS() in terms of their own
_lock_cas(), which has its own memory barriers; the call sites in
kern_mutex.c already have the appropriate memory barrier calls. Thus,
alpha and sparc64 can use default definition.
- For sh3, don't define MUTEX_CAS() in terms of its own _lock_cas();
atomic_cas_ulong() is strong-aliased to _lock_cas(), therefore defining
our own MUTEX_CAS() is redundant.
Per thread:
https://mail-index.netbsd.org/tech-kern/2021/07/25/msg027562.html
|
|
mainly because copy paste code big amount of files are affected.
|
|
|
|
definition. Noted by tsutsui.
|
|
log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
|
|
Otherwise, IPL is lost during context switch, which allows improper
interrupts when, e.g., spin mutexes are hold.
With this fix, full ATF is successfully completed on DIAGNOSTIC
kernel (with one KASSERT in uvm_map.c, which triggers kern/51254,
converted to printf).
Thanks uwe@ for review and suggesting optimization.
Also thanks ad@ for useful comment, and ryo@ for giving me reference
manuals of SH-4!
|
|
have any spare cpu cycles to waste (encrypted swap still could be
enabled by the admin in /etc/sysctl.conf).
|
|
referenced since some sources include <machine/param.h>.
|
|
Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.
Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)
Remove unnecessary or redundant interface attributes where they're not
needed.
There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)
...and a sentinel value CFARG_EOL.
Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.
Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
|
|
list of NULLs and 0. idea from rillig@.
all touched ports built, several booted.
|
|
|
|
|
|
sys_process_getlwpstatus.c which is always included.
|
|
|
|
|
|
|
|
Fix the machine-dependent ptrace register-related requests (e.g.
PT_GETXMMREGS, PT_GETXSTATE on x86) to correctly respect the LWP number
passed as the data argument. Before this change, these requests
did not operate on the requested LWP of a multithreaded program.
This change required moving ptrace_update_lwp() out of unit scope,
and changing ptrace_machdep_dorequest() function to take a pointer
to pointer as the second argument, consistently with ptrace_regs().
I am planning to extend the ATF ptrace() register tests in the future
to check for regressions in multithreaded programs, as time permits.
Reviewed by kamil.
|
|
|
|
Print the WT bit as either "WT" or "CB" when C is set, as "--"
otherwise. Few other minor tweaks.
|
|
Move code that needs to run from P2 into separate functions and call
them via P2 pointer.
|
|
Split construction of the initial MMUCR value into several assignments
for readability. Same object code is generated.
|