Commit Graph

279481 Commits

Author SHA1 Message Date
rillig 6910f1eeb2 make(1): allow optional compilation with GCC 10, use gcov from GCC 2020-08-12 18:48:36 +00:00
rillig ee1eefc8ec make(1): remove unnecessary test from bmake_strndup
The passed memory is never NULL.
2020-08-12 18:47:21 +00:00
skrll 243e94f8fd Whack-a-mole 2020-08-12 18:30:46 +00:00
skrll 0a3d29f4ed Part IV of ad's performance improvements for aarch64
- Implement pmap_growkernel(), and update kernel pmap's stats with atomics.

- Then, pmap_kenter_pa() and pmap_kremove() no longer need to allocate
  memory nor take pm_lock, because they only modify L3 PTEs.

- Then, pm_lock and pp_lock can be adaptive mutexes at IPL_NONE which are
  cheaper than spin mutexes.

- Take the pmap's lock in pmap_extract() if not the kernel's pmap, otherwise
  pmap_extract() might see inconsistent state.
2020-08-12 13:36:36 +00:00
skrll 739b4cc834 Part III of ad's performance improvements for aarch64
- Assembly language stubs for mutex_enter() and mutex_exit().
2020-08-12 13:28:46 +00:00
skrll 9f2441fc32 Part II of ad's aarch64 performance improvements (cpu_switch.S bugs are
all mine)

- Use tpidr_el1 to hold curlwp and not curcpu, because curlwp is accessed
  much more often by MI code.  It also makes curlwp preemption safe and
  allows aarch64_curlwp() to be a const function (curcpu must be volatile).

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
  can see spurious ASTs (which doesn't cause a problem, it just means some
  time may be wasted).

- Use plain stores to set/clear ASTs.  Make sure ASTs are always set on the
  same CPU as the target LWP, and delivered via IPI if posted from a remote
  CPU so that they are resolved quickly.

- Add some cache line padding to struct cpu_info, to match x86.

- Add a memory barrier in a couple of places where ci_curlwp is set.  This
  is needed whenever an LWP that is resuming on the CPU could hold an
  adaptive mutex.  The barrier needs to drain the CPU's store buffer, so
  that the update to ci_curlwp becomes globally visible before the LWP can
  resume and call mutex_exit().  By my reading of the ARM docs it looks like
  the instruction I used will do the right thing, but I'm not 100% sure.
2020-08-12 13:19:35 +00:00
skrll e16659bb50 Part I of ad@'s performance improvements for aarch64
- Remove memory barriers from the atomic ops.  I don't understand why those
  are there.  Is it some architectural thing, or for a CPU bug, or just
  over-caution maybe?  They're not needed for correctness.

- Have unlikely conditional branches go forwards to help the static branch
  predictor.
2020-08-12 12:59:57 +00:00
jmcneill 54695ccbd8 Add CEC clock 2020-08-12 10:21:00 +00:00
msaitoh 38bc295884 Fix checking return value of atomic_cas_uint().
This change fixes a bug that extra delay() is called only once even if
atomic_cas_uint() isn't failed or delay() isn't called when atomic_cas_uint()
failed.

The reason of this bug was that I simply converted FreeBSD' atomic_cmpset_int()
to atomic_cas_uint(). The return value's semantics is different.
2020-08-12 09:13:46 +00:00
skrll 97e085086c No need for MIPS_EBASE_CPUNUM now that asm.h supports __BITS 2020-08-12 08:57:03 +00:00
skrll a294f34ae4 Provide assmebler versions of BITS(3) macros. These are only good for
32 bit masks
2020-08-12 08:56:37 +00:00
mrg 5e4a6425f4 mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version.  update it and mark it for GCC 7.5.
2020-08-12 08:53:20 +00:00
skrll 9b5aba56ba Don't include mips/asm.h from a C file 2020-08-12 07:37:39 +00:00
mrg 2d54d631d9 20200811:
GCC updates may require cleaning the objdir.
2020-08-12 06:48:50 +00:00
mrg f3b893878b delete this file; it needs to be newer than the .l file or
else sys.mk will attempt to write it to the source tree,
which may be r/o and fail.

XXX may cause updates builds to fail because a file listed
in .depend won't exist anymore.
2020-08-12 06:42:53 +00:00
rillig 0fc5d0f74a make(1): in bmake_strndup, only scan the relevant part of the string
Just in case the given str is not really a string.

The POSIX 2018 documentation on strndup does not specify as clearly as
possible whether s has to be a string or whether raw memory is
acceptable as well.  It only indirectly calls the s parameter of strndup
a string.
2020-08-12 03:27:29 +00:00
rillig 6abaf3bbe5 make(1): make Dir_MakeFlags simpler
This avoids unnecessary string allocations, especially for long lists.

There is no unit test to cover this code.  Since this is an obscure,
undocumented part of make, I wasn't able to come up with a unit test.
Therefore I resorted to write a separate testing program to verify the
expected results.

$ cat <<'EOF' >dir_test.c
#include <stdio.h>

#include "make.h"
#include "dir.h"

int main(int argc, char **argv)
{
    int i;
    Lst lst;
    char *flags;

    lst = Lst_Init(FALSE);
    for (i = 1; i < argc; i++)
    	Dir_AddDir(lst, argv[i]);
    flags = Dir_MakeFlags("-I", lst);

    printf("%s\n", flags);
    free(flags);
    return 0;
}
EOF

# Needs some trivial patches to Makefile and main.c
$ make PROG=dir_test EXTRA_SRCS=dir_test.c EXTRA_CPPFLAGS=-DNO_MAIN \
       COPTS.main.c=-Wno-unused-function NOMAN=1

$ ./dir_test a b c

$ mkdir a b c
$ ./dir_test a b c
 -Ia -Ib -Ic
$ rmdir a b c
2020-08-12 03:05:57 +00:00
skrll 28c2c643ec Improve a comment 2020-08-11 19:46:56 +00:00
rillig f271e31bca make(1): replace snprintf/malloc in ReadMakefile with str_concat3 2020-08-11 18:52:03 +00:00
rillig 431c892530 make(1): convert Suff.flags from #define to enum
This increases debugging support since the debugger can now display
symbolic names instead of an integer bit mask.
2020-08-11 18:44:52 +00:00
rillig 499d5689cb make(1): add str_concat4 to make the other code simpler
There's no need for arch.c to call strlen when there is a high-level API
for the same purpose.
2020-08-11 18:41:46 +00:00
maxv 57f445a8f5 Micro-optimize: use pushq instead of pushw. To avoid LCP stalls and
unaligned stack accesses.
2020-08-11 15:48:42 +00:00
maxv cccc70bfe0 sync 2020-08-11 15:35:17 +00:00
maxv 6ba5a95520 Improve the CPUID emulation on nvmm-intel:
- Limit the highest extended leaf.
 - Limit 0x00000007 to ECX=0, for future-proofness.
2020-08-11 15:31:51 +00:00
maxv cdb3ed2a3d Improve emulation of MSR_IA32_ARCH_CAPABILITIES: publish only the *_NO
bits. Initially they were the only ones there, but Intel then added other
bits we aren't interested in, and they must be filtered out.
2020-08-11 15:27:46 +00:00
maxv f4588bfb74 Hide OSPKE. NFC since the host never uses PKU, but still. 2020-08-11 15:23:10 +00:00
christos c9979bce58 new openldap.h 2020-08-11 13:19:15 +00:00
christos ad41e17ca5 new openldap 2020-08-11 13:18:04 +00:00
christos 956cbeb4ba merge conflicts 2020-08-11 13:15:33 +00:00
christos 255afcfe79 OpenLDAP 2.4.50 Release (2020/04/28)
Fixed client benign typos (ITS#8890)
    Fixed libldap type cast (ITS#9175)
    Fixed libldap retry loop in ldap_int_tls_connect (ITS#8650)
    Fixed libldap_r race on Windows mutex initialization (ITS#9181)
    Fixed liblunicode memory leak (ITS#9198)
    Fixed slapd benign typos (ITS#8890)
    Fixed slapd to limit depth of nested filters (ITS#9202)
    Fixed slapd-mdb memory leak in dnSuperiorMatch (ITS#9214)
    Fixed slapo-pcache database initialization (ITS#9182)
    Fixed slapo-ppolicy callback (ITS#9171)
    Build
	Fix olcDatabaseDummy initialization for windows (ITS#7074)
	Fix detection for ws2tcpip.h for windows (ITS#8383)
	Fix back-mdb types for windows (ITS#7878)
    Contrib
	Update ldapc++ config.guess and config.sub to support newer
	    architectures (ITS#7855)
	Added pw-argon2 module (ITS#9233, ITS#8575, ITS#9203, ITS#9206)
    Documentation
	slapd-ldap(5) - Clarify idassert-authzfrom behavior (ITS#9003)
	slapd-meta(5) - Remove client-pr option (ITS#8683)
	slapdinex(8) - Fix truncate option information for back-mdb (ITS#9230)

OpenLDAP 2.4.49 Release (2020/01/30)
    Added slapd-monitor database entry count for slapd-mdb (ITS#9154)
    Fixed client tools to not add controls on cancel/abandon (ITS#9145)
    Fixed client tools SyncInfo message to be LDIF compliant (ITS#8116)
    Fixed libldap to correctly free sb (ITS#9081, ITS#8755)
    Fixed libldap descriptor leak if ldaps fails (ITS#9147)
    Fixed libldap remove unnecessary global mutex for GnuTLS (ITS#9069)
    Fixed slapd syntax evaluation of preferredDeliveryMethod (ITS#9067)
    Fixed slapd to relax domainScope control check (ITS#9100)
    Fixed slapd to have cleaner error handling during connection setup
	 (ITS#9112)
    Fixed slapd data check when processing cancel exop (ITS#9124)
    Fixed slapd attribute description processing (ITS#9128)
    Fixed slapd-ldap to set oldctrls correctly (ITS#9076)
    Fixed slapd-mdb to honor unchecked limit with alias deref (ITS#7657)
    Fixed slapd-mdb missing final commit with slapindex (ITS#9095)
    Fixed slapd-mdb drop attr mappings added in an aborted txn (ITS#9091)
    Fixed slapd-mdb nosync FLAG configuration handling (ITS#9150)
    Fixed slapd-monitor global operation counter reporting (ITS#9119)
    Fixed slapo-ppolicy when used with slapauth (ITS#8629)
    Fixed slapo-ppolicy to add a missed normalised copy of pwdChangedTime
	(ITS#9126)
    Fixed slapo-syncprov fix sessionlog init (ITS#9146)
    Fixed slapo-unique loop termination (ITS#9077)
    Build Environment
	Fix mkdep to honor TMPDIR if set (ITS#9062)
	Remove ICU library detection (ITS#9144)
	Update config.guess and config.sub to support newer architectures
	    (ITS#7855)
	Disable ITS8521 regression test as it is no longer valid (ITS#9015)
    Documentation
	admin24 - Fix inconsistent whitespace in replication section (ITS#9153)
	slapd-config(5)/slapd.conf(5) - Fix missing bold tag for keyword
	    (ITS#9063)
	slapd-ldap(5) - Document "tls none" option (ITS#9071)
	slapo-ppolicy(5) - Correctly document pwdGraceAuthnLimit (ITS#9065)
2020-08-11 13:12:00 +00:00
uwe 7dbbb5b019 DEV_VERBOSE_DEFINE - use MODULE_CLASS_DRIVER to match the definition.
Catch up with previous to unbreak autoloading of verbose modules.
PR kern/55535

CVS: ----------------------------------------------------------------------
CVS: CVSROOT  cvs.NetBSD.org:/cvsroot
CVS: please use "PR category/123" to have the commitmsg appended to PR 123
CVS:
CVS: Please evaluate your changes and consider the following.
CVS: Abort checkin if you answer no.
CVS: => For all changes:
CVS: Do the changed files compile?
CVS: Has the change been tested?
CVS: => If you are not completely familiar with the changed components:
CVS: Has the change been posted for review?
CVS: Have you allowed enough time for feedback?
CVS: => If the change is major:
CVS: => If the change adds files to, or removes files from $DESTDIR:
CVS: => If you are changing a library or kernel interface:
CVS: Have you successfully run "./build.sh release"?
2020-08-11 12:10:10 +00:00
mrg 1956332deb update GCC 7 version to nb4 20200810, and fix the unknown GCC version
error assignment from "=?" to "?=" so it works as designed.
2020-08-11 09:51:57 +00:00
mrg a05ac97e64 merge GCC 7.5.0 into gcc.old. .. just in time to be obsolete? :) 2020-08-11 08:45:54 +00:00
skrll 46de5abef9 s/pmaphist/maphist/ 2020-08-11 07:03:33 +00:00
skrll 221a897233 s/pmaphist/maphist/ for now 2020-08-11 06:54:14 +00:00
skrll a9bc40de8f More UVMHIST_LOG. Remove some commented output printfs. 2020-08-11 06:09:44 +00:00
skrll 37a00c7c5d Fix a comment 2020-08-11 05:43:45 +00:00
mrg a3e9eb183f re-import GCC 8.4.0. 2020-08-11 05:30:02 +00:00
mrg 8b6133e5b3 import GCC 7.5.0. doing this here so that the vendor branch has
the code we'll merge into gcc.old and the netbsd-9 tree gcc tree.
GCC 8.4.0 will be imported immediately on top of this again,
restoring the current status.

these PRs in the GCC bugzilla are fixed with this update:

89869 80693 89795 84272 85593 86669 87148 87647 87895 88103 88107 88563
88870 88976 89002 89187 89195 89234 89303 89314 89354 89361 89403 89412
89512 89520 89590 89621 89663 89679 89704 89734 89872 89933 90090 90208
87075 85870 89009 89242 88167 80864 81933 85890 86608 87145 88857 89024
89119 89214 89511 89612 89705 89400 81740 82186 84552 86554 87609 88105
88149 88415 88739 88903 89135 89223 89296 89505 89572 89677 89698 89710
90006 90020 90071 90328 90474 91126 91162 91812 91887 90075 88998 89945
87047 87506 88074 88656 88740 91137 89008 84010 89349 91136 91347 91995
89397 87030 60702 78884 85594 87649 87725 88181 88470 88553 88568 88588
88620 88644 88906 88949 89246 89587 89726 89768 89796 89998 90108 90756
90950 91704 88825 88983 86538 51333 89446 90220 91308 92143 89392 90213
90278 91131 91200 91510 89037 91481 87673 88418 88938 88948 90547 27221
58321 61250 67183 67958 77583 83531 86215 88648 88720 88726 89091 89466
89629 90105 90329 90585 90760 90924 91087 89222 81956 71861 35031 69455
81849 82993 85798 88138 88155 88169 88205 88206 88228 88249 88269 88376
77703 80260 82077 86248 88393 90786 57048 66089 66695 67679 68009 71723
72714 84394 85544 87734 88298 90937 91557 63891 64132 65342 68649 68717
71066 71860 71935 77746 78421 78645 78865 78983 79485 79540 85953 88326
89651 90744
2020-08-11 05:10:28 +00:00
christos 14e6a323b7 - fix lcall test
- refactor all the TRAP_SIGDEBUG printfs and use hexdump like we did on
  amd64
2020-08-11 04:30:16 +00:00
rillig aa47b3293b make(1): replace snprintf with concat3
This makes the code more predictable for long strings, since the main
action is never skipped.

The code also becomes simpler since there is no %s anymore, and the 3
arguments just appear in the same order as in the result.
2020-08-10 20:07:14 +00:00
rillig 644e5ad76b make(1): replace str_concat with str_concat2 and str_concat3
The new functions have a simpler interface, and str_concat3 is even more
general-purpose, since the middle string is no longer required to be
exactly of length 1.
2020-08-10 19:53:19 +00:00
rillig 21107e4e40 make(1): fix parameter name of str_concat
The previous documentation mentioned Str_Concat, but str_concat has been
written in lowercase for years.  The "flags" are not flags since they
cannot be combined, not even when they are written in hex.
2020-08-10 19:30:30 +00:00
rjs 31047c8f55 NetBSD 9.99.70 - changes to video(4). 2020-08-10 19:29:13 +00:00
rjs 5d3121f64a Add some extra V4L ioctl() requests to latest V4L userland to work.
Import sys/videoio.h from OpenBSD, this is just the Linux headers
concatenated together.
2020-08-10 19:27:27 +00:00
rillig 6ae45ff07e make(1): fix integer type in str_concat 2020-08-10 19:20:33 +00:00
rillig fb967d0eb7 make(1): make gcov command line configurable
Some useful options are -a or -f.
2020-08-10 18:40:24 +00:00
rillig 731db6505d make(1): clean up coverage files even if USE_COVERAGE is not set 2020-08-10 18:20:28 +00:00
rillig fcf37ea816 make(1): clean up temporary files after posix1.mk test 2020-08-10 18:19:58 +00:00
skrll 76b3785162 More SYNC centralisation 2020-08-10 14:37:38 +00:00