Commit Graph

283800 Commits

Author SHA1 Message Date
rillig
6c432fc224 make(1): indent for.c using tabs instead of spaces 2020-12-15 16:24:17 +00:00
rillig
b1d7af486a make(1): clean up hash function for HashTable
Expressing a multiplication as a bit shifts and subtraction is the job
of the compiler.  For humans, a multiplication is easier to read.
2020-12-15 15:20:05 +00:00
skrll
b18dbbf907 it's cpu_switchto (not cpu_switch) 2020-12-15 08:35:52 +00:00
skrll
1c4c122099 Fixup the big mutex_exit comment a little. It's actually, cpu_switchto
that posts a store fence and it's AFTER setting curlwp.

More to come.
2020-12-15 08:17:31 +00:00
martin
ce89f85d6a Make comments are not C comments - use # instead of /* ... */ 2020-12-15 05:48:30 +00:00
rillig
4743be9ab6 make(1): indent hash.h and make_malloc.h with tabs instead of spaces 2020-12-15 01:23:55 +00:00
rillig
f779f26a46 make(1): document how to detect typos in .elif directives 2020-12-15 00:32:26 +00:00
rillig
623f275b16 make(1): clean up ParseReadLine
In function names, the word "get" was not used consistently to look up
or compute data, in several cases "get" was a synonym for "read", just
like in the standard C library (fgetc).

The really confusing part is that there are two functions now, called
ParseGetLine and ParseReadLine, and both were underdocumented.
2020-12-14 23:48:03 +00:00
chs
d1d48122ad when updating the per-uid "semcnt", decrement the counter for the uid
that created the ksem, not the uid of the process freeing the ksem.
fixes PR 55509.

Reported-by: syzbot+9d04b3ef2ca180ef9b06@syzkaller.appspotmail.com
2020-12-14 23:12:12 +00:00
rillig
a1af58d13b make(1): error out on .else with extraneous text 2020-12-14 22:17:11 +00:00
rillig
bb1cb5b505 make(1): error out if an '.endif' contains extraneous text 2020-12-14 21:56:17 +00:00
rillig
4d12251138 make(1): make structure of the code in Cond_EvalLine clearer 2020-12-14 21:35:21 +00:00
rillig
2f1b70eeeb make(1): add tests for parsing .if conditions 2020-12-14 21:02:25 +00:00
rillig
1eeb87db64 make(1): add more tests for parsing .endif 2020-12-14 20:57:31 +00:00
rillig
fa6ec3776b make(1): don't pretend to expand CondParser_Eval
At that point, the variable expression has already been expanded.  To
avoid the impression that the token might be relevant, pass FALSE
instead of TRUE.  No change of behavior.
2020-12-14 20:39:35 +00:00
rillig
da444aa84e make(1): add test for variable expressions after a parse error
These variable expressions don't need to be expanded, and they aren't.
2020-12-14 20:28:09 +00:00
rillig
22b3e4f8b0 make(1): add test for parsing the end of a condition 2020-12-14 20:23:49 +00:00
skrll
7ef7e7e9a9 Trailing whitespace 2020-12-14 19:42:51 +00:00
skrll
40e51fa61c Add a note about completion vs ordering barrier as well. 2020-12-14 19:32:29 +00:00
skrll
7dc583c694 Add a big comment in generic_bs_barrier about mappings and what barriers
are really required and why we cheat.  Inspired by a similar comment in
x86/bus_space.c
2020-12-14 19:25:28 +00:00
martin
95f08802a7 Initialize namelen 2020-12-14 12:34:07 +00:00
jmcneill
805249166d Use full system DSB ops for bs barrier. 2020-12-14 11:42:44 +00:00
jmcneill
af0e226b37 The bus_space(9) man page is not clear whether barriers should enforce
ordering or completion. To be safe, use dsb here instead of dmb.
2020-12-14 11:16:33 +00:00
nia
a26ac9a7a3 t_ossaudio: More descriptive failure cases 2020-12-14 10:58:08 +00:00
jmcneill
798fdf3f82 MAsk -> Mask, spotted by rillig@ 2020-12-14 10:18:28 +00:00
rin
c85c1127ef Add some precautions for platforms without PT_STEP support.
"nat/gdb_ptrace.h" defines PT_STEP as 9, if it is not defined. nat-ptrace.c
depends on this; inf_ptrace_target::resume() uses PT_STEP unconditionally
when its ``step'' argument is non-zero. Therefore,

- Add comment that nbsd-nat.c should include <sys/ptrace.h> directly,
  instead of "nat/gdb_ptrace.h".

- Add gdb_assert(step == 0) in nbsd_nat_target::resume() ifndef PT_STEP,
  before calling inf_ptrace_target::resume().
2020-12-14 02:05:07 +00:00
rin
9b9416d880 Revert previous as per request from kamil; now, arm/ptrace.h does not
expose unimplemented PT_STEP.
2020-12-14 02:01:03 +00:00
rin
3d5424fd1c Obsolete PT_STEP and friends, that have never been implemented.
PT_STEP was exposed to userland for NetBSD 1.6 to 9, and
PT_SETSTEP and PT_CLEARSTEP was for 8 to 9. Therefore, they cannot be
reused for other purposes.

PT_STEP was introduced to arm/ptrace.h rev 1.2:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/include/ptrace.h#rev1.2

This was for workaround against GDB, which assumes PT_STEP is 9 (even
today!!), if it is undefined. But, this should have been dealt with
differently...
2020-12-14 01:58:48 +00:00
jnemeth
464df8b50e PR/55875 - Valentin -- "gpt recover -r" does nothing
Delete do nothing undocumented option, that was there from initial
import.  No idea what it was intended to do and there is no longer
an "upstream".
2020-12-13 21:55:25 +00:00
rillig
ed7166493f make(1): replace %zu with %u in printf calls
This is needed to compile bmake with GCC 2.8.1 on SunOS 5.9.

To support ancient systems like this, the whole code of usr.bin/make is
supposed to use only ISO C90 features, except for filemon, which is not
used on these systems.
2020-12-13 21:27:45 +00:00
rillig
ac4393a924 make(1): rename Vector.priv_cap to cap
There is no use case for accessing or even modifying the capacity of a
vector, therefore there is no need to hide it using the prefix "priv_".
This way, the member names are aligned between Buffer and Vector.
2020-12-13 20:57:17 +00:00
jmcneill
11475177bc SBBR says that the CPPC interface should be used on AArch64 instead of
P-states and T-states. Enable acpipcc and acpicppc, and disable acpicpu.
2020-12-13 20:40:38 +00:00
jmcneill
ad3a4041d4 acpi: Add support for Collaborative Processor Performance Control (CPPC).
CPPC is the modern replacement for processor performance controls (P-states
and T-states). The _CPC method on a processor device contains information
about supported performance levels of the device.

This driver reports the supported performance levels and allows for
setting the desired level using the machdep.cpufreq.cpuN.* sysctls. Note
that a "performance level" value is not guaranteed to represent a CPU
frequency, so treat the numbers reported as such.
2020-12-13 20:39:20 +00:00
jmcneill
06ca7fb40c acpi: Add support for ACPI Platform Communications Channel (PCC). 2020-12-13 20:27:53 +00:00
jmcneill
da7b62795b Add MI support for attaching drivers to arbitrary System Description
Tables.
2020-12-13 20:24:26 +00:00
rillig
7f604d4793 make(1): add str_basename to reduce duplicate code
The function basename from POSIX has a few unfortunate properties, it is
allowed to return a pointer to static memory.  This is too unreliable,
therefore this trivial own implementation.
2020-12-13 20:14:48 +00:00
rillig
9ab63ee0aa make(1): constify progname 2020-12-13 20:09:02 +00:00
rillig
528c699500 make(1): fix .ERROR_TARGET in compat -k mode (since 2010-04-07) 2020-12-13 19:33:53 +00:00
chs
81a07a7135 Disable use of UBC_FAULTBUSY in tmpfs_write() for now,
which brings back zeroing of all new tmpfs data pages.
The existing code that enables this optimization skips the zeroing
in numerous cases where it is needed, resulting in corrupted files
and data leaks from the page's previous identity.
2020-12-13 19:22:02 +00:00
rillig
95fe5be41c make(1): add tests for variable expansion in .ERROR handling 2020-12-13 19:08:20 +00:00
rillig
73287a0b22 make(1): document variable expansion in the .END node 2020-12-13 18:57:44 +00:00
christos
53f65f3d12 fix comment 2020-12-13 18:12:29 +00:00
rillig
6d3aa3c8ae make(1): demonstrate wrong error handling in compat mode 2020-12-13 17:44:31 +00:00
christos
ae9ebf6f0f Improve previous: generated names end with .[[:digits:]] so look for that
instead.
2020-12-13 16:50:47 +00:00
rillig
61121a11fe make(1): add comments for strange error handling in Compat_Run 2020-12-13 16:47:19 +00:00
rillig
a65a89393b make(1): extract InitSignals from Compat_Run 2020-12-13 16:32:57 +00:00
rillig
edc3918f88 make(1): extract MakeBeginNode from Compat_Run
The comment "execute the commands" had once been correct but not
anymore.  Since a few years, not only the commands of the .BEGIN and
.END nodes are executed, instead the nodes are made as usual, including
their dependencies.
2020-12-13 16:30:08 +00:00
rillig
67ff6c82cb make(1): extract UseShell from Compat_RunCommand 2020-12-13 16:14:40 +00:00
martin
77641d430c Add atppc* at acpi? 2020-12-13 08:23:52 +00:00
martin
52a4e4b878 Add missing include 2020-12-13 08:20:56 +00:00