Commit Graph

281369 Commits

Author SHA1 Message Date
roy
1f76477386 bridge: Calculate link state as the best link state of any member
If any member is LINK_STATE_UP then it's LINK_STATE_UP.
Otherwise if any member is LINK_STATE_UNKNOWN then it's LINK_STATE_UNKNOWN.
Otherwise it's LINK_STATE_DOWN.
2020-09-27 00:32:17 +00:00
mrg
bc89ad3318 mknative-gmp output for GMP 6.2.0. 2020-09-27 00:31:51 +00:00
mrg
41f3ac3e09 merge gmp 6.2.0. 2020-09-27 00:30:26 +00:00
mrg
72c7faa4db initial import of GMP 6.2.0. changes include:
- Bug fixes to gmp_snprintf, conversion to double, mpz_powm,
  and mpf_set_str.
- New functions for factorial, primorial, fibonacci, mpz_2fac_ui,
  and mpz_mfac_uiui.
- MIPS r6 cores are now supported.
- Various speeds ups.
2020-09-27 00:27:02 +00:00
roy
0fb7a2c416 rump: Try to fix build 2020-09-27 00:17:56 +00:00
roy
c054c3f155 ifconfig: We already have struct if_data in ifa_data.
So let's not bother with an ioctl we don't need.
2020-09-26 23:43:26 +00:00
thorpej
a639affe04 Implement cpu_intr_redistribute() for Tusnami/Titan systems. 2020-09-26 21:07:48 +00:00
mrg
3169bf0d27 update slightly to enable 'native-gmp' target from tools/gmp to work.
call the awk script on 'config.log', which has (almost) the same output
as the stdout of ./configure, and automatically store it as 'srcs.mk'.
2020-09-26 20:58:48 +00:00
mrg
4dfd2f9831 initial working version of native-gmp support.
does not use mknative.common yet, so always updates files and does
not mark them with NetBSD rcsid.  (not a regression from the manual
version at least.)
2020-09-26 20:56:53 +00:00
mrg
6feeeb58e1 redo much of rev 1.45 and make the _KERNEL path look like it
used to before.

while it uses less total lines of code and looks less ugly,
the merged crash+ddb code here is less correct and harder to
follow for the kernel path.
2020-09-26 20:38:27 +00:00
roy
8c2fc68b9f tap: Remove media from this virtual interface
It serves no purpose at all.
2020-09-26 19:38:45 +00:00
roy
c271800399 vlan: match the interface link state with that of the parent
Now addresses on a vlan will detach and undergo duplicate address
dectection on link state changes just as on a standard interface.
2020-09-26 18:38:09 +00:00
roy
13c88b88b0 net: Add a callback to ifnet to notify of link state changes 2020-09-26 18:35:12 +00:00
jmcneill
c9f4e317e7 Add HAVE_NVMM and use it to control the build of NVMM related components.
Defined to "yes" on amd64, "no" everywhere else.
2020-09-26 17:49:49 +00:00
rillig
d449168a6a make(1): revert migration from Lst_ForEachUntil to Lst_ForEach
There is a crucial difference between these functions, in that
Lst_ForEachUntil can cope with a few concurrent modifications while
iterating over the list.  This is something that Lst_ForEach doesn't do.

This difference led to a crash very early in NetBSD's build.sh.
2020-09-26 17:39:45 +00:00
rillig
073f669ad5 make(1): inline and remove LstNode_Prev and LstNode_Next
These functions made the code larger than necessary.  The prev and next
fields are published intentionally since navigating in a doubly-linked
list is simple to do and there is no need to wrap this in a layer of
function calls, not even syntactically.  (On the execution level, the
function calls had been inlined anyway.)
2020-09-26 17:15:20 +00:00
rillig
5a9725dde8 make(1): inline Lst_ForEach in Targ_PrintGraph 2020-09-26 17:02:11 +00:00
rillig
d8a580cdaf make(1): replace a few Lst_ForEachUntil with simpler Lst_ForEach 2020-09-26 16:55:58 +00:00
rillig
ab003311ea make(1): inline Lst_ForEachUntil in Compat_Make 2020-09-26 16:41:42 +00:00
rillig
1d9026bdfa make(1): clean up obsolete comments about TARG constants 2020-09-26 16:27:27 +00:00
rillig
bc119df081 make(1): remove useless comment from TargFreeGN
GNode.fname is a const char *, therefore it cannot be freed anyway.
2020-09-26 16:21:17 +00:00
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