Commit Graph

283615 Commits

Author SHA1 Message Date
uwe
bd65e18f86 sp_tlb_flush() - fix inline asm miscompiled by newer gcc versions.
As one national park director once said: "my problems start when the
dumber of my visitors meet the smarter of my bears".

Old inline asm used specific hardcoded registers "assuming that gcc
doesn't do anything funny with these".  Unfortunately now it does,
especially when this function is inlined.  We ended up restoring a
wrong context.  The result was mysterious infinite memory faults.

Rewrite in safer inline asm, so that gcc is not confused.

Many thanks to chs@ for his patience.
2020-12-09 04:02:20 +00:00
dholland
3818c9a287 arm bswap32: Improve the comments showing the byte flow.
It's confusing to use 1-4 for bytes 1-4 and then 0 for literal zero,
so use a-d for bytes 1-4.
2020-12-09 02:46:57 +00:00
rillig
de83a47b93 make(1): add more tests for combining -j1 and -n 2020-12-09 00:43:48 +00:00
rillig
32df21f05a make(1): add test for combining -j1 with -n 2020-12-09 00:25:00 +00:00
chs
ffc294f923 make rump's uvm_aio_aiodone_pages() look more like the kernel version.
fixes some more rumpy assertions.
2020-12-09 00:03:32 +00:00
rillig
c7f2a250c3 make(1): in jobs mode, invert local variable noSpecials to run 2020-12-08 21:34:49 +00:00
rillig
8fe50308d3 make(1): negate RunFlags.silent to become RunFlags.echo
This reduces the number of negations in the code.
2020-12-08 20:17:18 +00:00
rillig
e539c72b67 make(1): move flags errOff into RunFlags.ignerr 2020-12-08 20:10:24 +00:00
rillig
d79cfe4364 make(1): move flag runAlways into RunFlags 2020-12-08 20:04:17 +00:00
rillig
14ae239081 make(1): move flag shutUp into struct RunFlags
Running a command is controlled by several flags.  Instead of passing
them around individually, it's easier to have them grouped.
2020-12-08 19:58:20 +00:00
chs
a7b9f93047 the busypage test is buggy, expect it to fail. 2020-12-08 17:52:11 +00:00
christos
9d73d70e90 include gdbarch.h 2020-12-08 13:56:38 +00:00
yamaguchi
2ed09c7e02 Change the default interrupt-affinity of iavf(4) 2020-12-08 07:53:20 +00:00
thorpej
a21a9cd665 A couple of tweaks to the previous re-factor:
- Some of what was defined as "generic itimer" behavior turned out to be
  ptimer-specific.  As such, everything related to the "fired timer queue"
  is now specific to ptimers, and the queue and softint handle fields of
  itimer_ops are not needed.

- Split itimer_fini() into 2 parts: itimer_poision() marks the timer as
  dead and attempts to cancel it.  itimer_fini() is then just responsible
  for freeing itimer resources and releasing the lock.  They are split
  into two parts, as ptimers require an addition processing step between
  those two operations, but other kinds of itimers do not necessarily require
  that.

- Export a few more itimer-related symbols that other itimer types will
  need.

Riding previous kernel version bump since there are no external uses of
this code since the version bump that accompanied the original change.
2020-12-08 04:09:38 +00:00
rillig
0f9f7cf8c4 make(1): split JobPrintSpecials into manageable pieces 2020-12-08 00:50:04 +00:00
rillig
b6db76aec6 make(1): extract JobPrintSpecials from JobPrintCommand 2020-12-08 00:23:30 +00:00
rillig
ba0f4facab make(1): extract InitShellNameAndPath from Shell_Init
This gets rid of the ugly "else #endif".
2020-12-08 00:09:51 +00:00
rillig
2125e11bfd make(1): clean up debug logging 2020-12-07 23:59:59 +00:00
rillig
b75505322d make(1): replace signal handling macros with local functions 2020-12-07 23:53:09 +00:00
rillig
d96e3096f2 make(1): indent job.c with tabs instead of spaces 2020-12-07 23:48:04 +00:00
rillig
f411373c7b make(1): remove duplicate code for job output 2020-12-07 22:55:01 +00:00
rillig
affd50e454 make(1): replace macro MESSAGE with local function
The first parameter of the macro was always stdout, and there was no
apparent reason to pass anything else there.

Let the compiler decide whether to inline this or not, it's not
time-critical.
2020-12-07 22:47:03 +00:00
rillig
4d2ba079d3 make(1): remove duplicate code from bmake_strdup
Inlining is the job of the compiler, not of humans.
2020-12-07 22:37:18 +00:00
rillig
c8309d07f3 make(1): normalize output of test sh-dots for non-native mode 2020-12-07 22:27:56 +00:00
rillig
1e55774c0d make(1): add tests and tutorial for the ?= assignment operator 2020-12-07 21:35:43 +00:00
christos
16f88d4a62 make function static (fixes crossgdb build, reported by martin@) 2020-12-07 20:28:53 +00:00
jdc
fd3cc354e8 Add some debugging output to check sensor addition and refresh. 2020-12-07 13:24:15 +00:00
jmcneill
772dec48b4 acpicpu(4): Add support for Arm CPUs. 2020-12-07 10:59:26 +00:00
jmcneill
30d28f2000 acpicpu: Add support for ACPI P-states and T-states on Arm. 2020-12-07 10:57:41 +00:00
jmcneill
2f0b7cb5a1 ACPI Processor UID is 32-bits (ci_acpiid). 2020-12-07 10:56:12 +00:00
mrg
a63aaf55a5 micron SMART 202 is percent lifetime used not remaining.
almost gave myself a heart attack when my server said 7% remaining!
2020-12-07 10:36:19 +00:00
jmcneill
569b81e664 Fix 32-bit build. 2020-12-07 10:02:51 +00:00
rin
393045b225 mknative for aarch64eb. 2020-12-07 08:31:05 +00:00
rin
db812a1d3b Add elf32-aarch64.c to DPSRCS and CLEANFILES. 2020-12-07 08:24:09 +00:00
rillig
bcc992c684 make(1): add new unit test opt-keep-going-multiple.mk to file lists 2020-12-07 07:51:25 +00:00
christos
60235de0f1 fix the build; gcc does not always see that it can't happen. 2020-12-07 03:01:15 +00:00
rillig
ee5b8583e3 make(1): rename Var_Export1 to ExportVar
Since Var_Export1 is neither exported by the module nor does it belong
to the Var type, the previous function name was misleading.  The 1 in
the function name was not as expressive as possible.  The new name
aligns nicely with UnexportVar, which is a very young name as well.
2020-12-07 01:50:19 +00:00
rillig
ab66f2c17b make(1): fix wrong exit status for multiple failed main targets 2020-12-07 01:35:33 +00:00
rillig
42387fd8d5 make(1): add test for wrong exit status 0 after failed targets with -k 2020-12-07 01:32:04 +00:00
rillig
01c0fcab45 make(1): actually fix the use-after-free bug and the double-free
The use-after-free bug had been there since 2020-11-22, the double-free
bug since a few minutes.
2020-12-07 01:27:08 +00:00
rillig
dc1759932a make(1): fix use-after-free in -DDEBUG_SRC mode (since 2020-11-22) 2020-12-07 01:24:41 +00:00
rillig
e6b596f6c6 make(1): merge local variables in Compat_Run 2020-12-07 01:10:03 +00:00
rillig
8ec6d47a7d make(1): clean up Compat_Run
Now that errors in the main targets and in their dependencies have the
same effect on the .END node and its dependencies, the two variables can
be merged.
2020-12-07 01:07:13 +00:00
rillig
ea51e814f2 make(1): don't make .END if the main targets already failed
This only applies to -k mode.  By default, make exits earlier and skips
the .END node as well if an error occurs.
2020-12-07 01:04:06 +00:00
rillig
e48e1a2882 make(1): fix exit status in -k mode if a dependency fails
Whether in -k mode or not, the exit status tells whether all requested
targets were made or not.  If a dependency could not be made, the main
target was not made as well, therefore the exit status must be nonzero
in such a case.

This part of the code lacked proper unit tests until today.  The unit
test deptgt-end-fail.mk is compatible with make>=2003 at least, allowing
to compare the output over time.

In 2003, in the ok-ok-ok-ok case, "Making all from all-dep." was printed
twice in a row, for whatever reason  ... (40 minutes later) ... If I had
just made the two commands for 'all' and '.END' more distinguishable.
Back in 2003, the local variables for .END had not been initialized,
instead the .END node was run with the local variables of the last
preceding node.  In this case, that node was 'all', therefore ${.TARGET}
had obviously expanded to 'all'.

Somewhere in 2004, the shell commands were no longer run with the -e
flag, which resulted in the "exit status $?" line to be printed in cases
that had stopped early before.

Somewhere in 2005, the local variables for the .END node had been fixed.
The variable ${.TARGET} now had the value '.END', just as expected.  In
addition, the dependencies for the .END node were made, although without
getting their proper local variables.  This resulted in the output
"Making  out of nothing" instead of the expected "Making end-dep out of
nothing".

Still in 2005, in the test case "all=ok all-dep=ok end=ok end-dep=ERR",
the error code of the failed 'end-dep' was first reported as "*** Error
code 1 (continuing)".  To compensate for this improvement, a new bug had
been introduced.  The test case "all=ok all-dep=ok end=ERR end-dep=ERR"
had properly exited with status 1 on 2005-01-01, but on 2006-01-01 it
exited with status 0, thereby ignoring errors in the .END node.

Somewhere in 2008, some of the error messages (but not all) were
directed to stderr instead of stdout.  The actual output stayed the same
though.

Somewhere in 2011, the dependency of the .END node got its own local
variables, and ${.TARGET} now expanded to 'end-dep', as expected.

Somewhere in 2016, the two empty lines between the "*** Error code 1
(continuing)" and the "Stop." got compressed into a single empty line.

On 2020-12-07 (that is, today), the exit status 1 has been restored in
the error cases, after it had been wrong for at least 14 years.
2020-12-07 00:53:30 +00:00
rillig
4de25ee2cb make(1): refactor Compat_Run to show the error condition more clearly
This refactoring allows to gradually change the conditions for the
"Stop." error message, to demonstrate which cases are affected by each
tiny change.
2020-12-06 23:02:56 +00:00
rillig
2b76f94f3e make(1): refactor error handling in Compat_Run
This is in preparation for the upcoming bug fixes.
2020-12-06 22:49:40 +00:00
rillig
91dd52293d make(1): test all combinations of failed main and .END targets
Adding an individual test for each of the 16 combinations would have
been too much manual work, and it's not easy to come up with a good
naming scheme for all the tests, keeping them short and expressive at
the same time.
2020-12-06 22:36:58 +00:00
rillig
abd175cf7f make(1): add test for .END after failed main node 2020-12-06 21:22:04 +00:00
rillig
571df9215e make(1): document undefined behavior from 2014
Earlier versions of make didn't know the -v option to print the expanded
value of a variable.  To make the test runnable by older makes as well,
switch to -V instead, which has been available much longer.
2020-12-06 20:55:30 +00:00