Commit Graph

281198 Commits

Author SHA1 Message Date
rillig
791df18439 make(1): inline Targ_FindNodeImpl
The 3 callers of this function passed different flags, and these flags
led to code paths that almost did not overlap.

It's a bit strange that GCC 5 didn't get that, and even marking the
function as inline did not produce much smaller code, even though the
conditions inside that function were obviously constant.  Clang 9 did a
better job here.

But even for human readers, inlining the function and then throwing away
the dead code leads to much easier code.

This pattern of squeezing completely different code into a single
function has already occurred in a different part of make, though I
don't remember where exactly.
2020-09-26 16:18:44 +00:00
rillig
cf5349557c make(1): clean up API for finding and creating GNodes
The previous API had complicated rules for the cases in which the single
function returned NULL or what it did.  The flags for that function were
confusing since passing TARG_NOHASH would create a new node even though
TARG_CREATE was not included in that bit mask.

Splitting the function into 3 separate functions avoids this confusion.
It also reveals several places where the complicated API led to
unreachable code.  Such code has been removed.
2020-09-26 16:00:12 +00:00
rillig
e58755b1f7 make(1): add test for '::' dependency operator with .ALLTARGETS 2020-09-26 15:41:53 +00:00
rillig
fa7e96862b make(1): replace Hash_FindEntry with Hash_FindValue in Targ_FindNode 2020-09-26 14:59:21 +00:00
rillig
5e8e948275 make(1): add Hash_FindValue, for direct access to hash table data 2020-09-26 14:48:31 +00:00
skrll
0589cefe2f RCSId police 2020-09-26 14:18:06 +00:00
skrll
767a889238 Define isb(), dsb(option), and dmb(option)
Catch up with vchiq upstream to allow this.
2020-09-26 12:58:22 +00:00
roy
a00afd3a07 net: Fix the setting of if_link_state
Link state changes are not dependant on the interface being up, but we also
need to guard against more link state changes being scheduled when the
interface is being detached.

We do this by clearing the link queue but keeping if_link_sheduled = true.
We can check for this in both if_link_state_change() and
if_link_state_change_work() to abort early as there is no point in doing
anything if the interface is being detached because if_down() is called
in if_detach() after the workqueue has been drained to the same overall
effect.
2020-09-26 11:57:05 +00:00
mlelstv
16a709a022 Moving pointers could fail if realloc() allocates a new memory region
where the difference between old and new address exceeds an int. Use
ptrdiff_t for calculations instead.
2020-09-26 11:39:17 +00:00
skrll
b97b06c97c Trailing whitespace 2020-09-26 10:56:37 +00:00
skrll
584896eb82 G/C arm/atomic.h 2020-09-26 10:06:25 +00:00
simonb
d18339fbcc Expose the atomicvec vectors via EXPORT_OBJECT so ksyms(4) address
lookups can find them.
2020-09-26 08:21:27 +00:00
simonb
9368b7f265 Use EXPORT for start and EXPORT_OBJECT for kernel_text instead of
by-hand exporting.  Using EXPORT_OBJECT for kernel_text also fixes
"bt/a" from DDB.
2020-09-26 08:21:10 +00:00
simonb
0b612fd0d5 Add EXPORT_OBJECT - export definition of symbol of symbol type Object,
visible to ksyms(4) address search.
2020-09-26 08:19:11 +00:00
mrg
12d8f9c554 note mpfr needs a cleaning. 2020-09-26 08:02:35 +00:00
mrg
fd8131476e note mpc (1.2.0) and mpfr (4.1.0) have new versions and are also
updated to them.  note gmp has a new release (6.2.0).
2020-09-26 07:59:18 +00:00
mrg
4874f8c7fe updates for mpc 1.2.0. 2020-09-26 07:57:56 +00:00
mrg
90a8ff2142 initial import of mpc 1.2.0. main changes are:
New functions:
  mpc_sum
  mpc_dot

Several functions are more robust with a reduced exponent range (for
example corresponding to IEEE 754 binary formats).
2020-09-26 07:54:54 +00:00
mrg
555a5a053b updates for mpfr 4.0.1. 2020-09-26 07:50:41 +00:00
mrg
2b532294c7 empty PATCHES is needed. revert a local change that is wrong now. 2020-09-26 07:40:50 +00:00
mrg
76abf2fb07 merge mpfr 4.1.0 2020-09-26 07:29:57 +00:00
mrg
2ba2404b55 GNU mpfr 4.1.0. main changes from 4.0:
Changed __float128 to the type _Float128 specified in ISO/IEC TS 18661.
__float128 is used as a fallback if _Float128 is not supported.
New function mpfr_get_str_ndigits about conversion to a string of digits.
New function mpfr_dot for the dot product (incomplete, experimental).
New functions mpfr_get_decimal128 and mpfr_set_decimal128 (available
only when MPFR has been built with decimal float support).
New function mpfr_cmpabs_ui.
New function mpfr_total_order_p for the IEEE 754 totalOrder predicate.
The mpfr_out_str function now accepts bases from -2 to -36, in order to
follow mpfr_get_str and GMP's mpf_out_str functions (these cases gave an
assertion failure, as with other invalid bases).
Shared caches: cleanup; really detect lock failures (abort in this case).
Improved mpfr_add and mpfr_sub when all operands have a precision
equal to twice the number of bits per word, e.g., 128 bits on a 64-bit
platform.
Optimized the tuning parameters for various architectures.
2020-09-26 07:25:38 +00:00
mrg
e7604a0c6a we don't have a patch version for a while now. 2020-09-26 07:01:39 +00:00
skrll
881d1fbd4f Use 'lr' instead of 'x30' in an instruction for clarity 2020-09-26 06:09:33 +00:00
skrll
76cacfc279 Fix a comment 2020-09-26 06:08:41 +00:00
simonb
69daa02dcb Whitespace consistency nit. 2020-09-26 04:31:53 +00:00
simonb
0db7486e0e Including <ddb/db_access.h> once should be sufficient. 2020-09-26 04:11:48 +00:00
thorpej
294a04e192 Support CPU interrupt affinity on Tsunami systems. 2020-09-26 02:50:41 +00:00
thorpej
075f15a7dc Add support for CPU interrupt affinity for PCI interrupts:
- Keep a bitmap of eligible interrupt-handling CPUs in the pci_chipset_tag_t.
  If this bitmap is 0, then we assume that all PCI interrupts should be
  routed to the primary CPU.
- Add an optional PCI chipset callback for setting the CPU affinity of
  an interrupt.
- When an establishing an interrupt handler, select the CPU that will
  handle this irq using the following algorithm:
  ==> If the irq already has a CPU assignment, keep it.
  ==> Otherwise, find the CPU with the fewest registered handlers that
      is eligible from both a hardware (based on the pci_chipset_tag_t)
      and software (based on cpu_info::ci_schedstate.spc_flags) perspectives.
  ==> Fall back to the primary CPU failing all else.
2020-09-26 02:46:27 +00:00
thorpej
ec971bedf3 - Fix some bugs in previous, mainly related to indexing the correct
interrupt queue.
- Make sure to update cpu_info::ci_nintrhand if an irq moves from
  one CPU to another.
2020-09-26 02:35:31 +00:00
rillig
47974f53da make(1): replace a few Lst_ForEachUntil with simpler Lst_ForEach 2020-09-26 00:03:29 +00:00
rillig
6513361416 make(1): fix grammar and style in test dep-colon-bug-cross-file 2020-09-25 23:42:43 +00:00
rillig
6686652d07 make(1): remove redundant variable inLine from parse.c
This variable has served at least 27 years bringing unnecessary
redundancy to the code.  It was already redundant at 1993-03-21, when
the code was imported to NetBSD.
2020-09-25 23:39:51 +00:00
rillig
f500f93435 make(1): rename ParseFinishLine to FinishDependencyGroup
Even after 27 or more years, it's not too late to fix bad function
names.  This one for example does not finish a line but a dependency
group.
2020-09-25 23:35:25 +00:00
rillig
37aa92d20a make(1): fix missing check for duplicate commands in Parse_File 2020-09-25 23:30:16 +00:00
rillig
6c4e4cfc20 make(1): add test for harmless bug in Parse_File
When there is a dependency group at the end of a top-level makefile,
this dependency group is not finished properly.  This allows to add
further commands to the targets of this dependency group, which was not
intended.
2020-09-25 23:24:49 +00:00
rillig
68badaed50 make(1): fix undefined behavior for .MAKEFLAGS: -f file
Since at least 1993-03-21, adding other makefiles in a .MAKEFILES
dependency has invoked undefined behavior because the command line
arguments were copied directly into the global makefiles variable,
without a proper strdup.  Shortly after that, the word list created by
Str_Words (formerly brk_string) was freed.

This applies to both the -f and the -v and -V options.  Luckily it is an
edge case to use these options in .MAKEFLAGS at all.

The -T option had already been fixed at 2000-12-30, but not the other
options.
2020-09-25 23:18:59 +00:00
rillig
0ba7433aaf make(1): inline Lst_ForEachUntil in ParseLine_ShellCommand 2020-09-25 21:13:44 +00:00
rillig
31142950da make(1): extract ParseLine_ShellCommand from Parse_File
Parsing a single shell command from a line does not belong in
Parse_File, its proper place is in Parse_Line.  Having the whole
detailed code inline in Parse_File is even more confusing.
2020-09-25 20:57:22 +00:00
rillig
ba0ed6616b make(1): rename variables cp2 to be more expressive 2020-09-25 20:48:23 +00:00
rillig
922e04669b make(1): add test for make() function in conditions 2020-09-25 20:11:06 +00:00
rillig
abab61aa26 make(1): declare strings for suff.c constant 2020-09-25 19:50:04 +00:00
rillig
628f6ff857 make(1): extract parsing of the -dF option into separate function 2020-09-25 19:40:23 +00:00
rillig
489634a883 make(1): extract InitVarTarget from main 2020-09-25 19:24:56 +00:00
rillig
3d82cec1cd make(1): in FindSuffByName, return the suffix instead of a list node
None of the callers was interested in the list node.
2020-09-25 18:58:12 +00:00
rillig
b4b854cf1c make(1): add test for deleting the suffixes during parsing 2020-09-25 18:18:25 +00:00
rillig
ee4bd6beb7 make(1): migrate suff.c from Lst_ForEachUntil to Lst_ForEach 2020-09-25 17:55:19 +00:00
rillig
2db477ba0f make(1): convert int to size_t for string lengths
Just for formal reasons.  There is no practical scenario in which any
filename suffix would grow larger than a few kilocharacters.
2020-09-25 17:14:32 +00:00
rillig
14b8b0f106 make(1): don't use reserved names in type names 2020-09-25 16:28:29 +00:00
rillig
aae3c7b59c make(1): replace Lst_Find with FindSuffByName 2020-09-25 16:27:15 +00:00