Commit Graph

287159 Commits

Author SHA1 Message Date
bouyer
7757c8ea03 Make pat_init() a NOOP on XENPV; it causes a trap with Xen 4.15 2021-04-17 18:03:21 +00:00
rillig
c322b8c5b5 lint: do not warn about alignment when casting from incomplete struct
This removes a bunch of technically correct but practically useless
warnings from the regular NetBSD build.
2021-04-17 16:58:04 +00:00
rillig
814d2d428a tests/lint: add test for pointer cast from incomplete struct 2021-04-17 16:52:09 +00:00
rin
99c90d24bb Sync MAXfoo params with oea:
MAXTSIZ: 512MB -> 128MB
  MAXDSIZ: 3.25GB -> 1GB

There should be no particular reasons for having different values.
2021-04-17 13:25:57 +00:00
rin
8a733105ca PR port-powerpc/56107
Decrease MAXSSIZ from ~256MB to 32MB (same as oea).

This fixes tests in /usr/tests/usr.bin/make, that run with "ulimit -v 200000",
fail with "Cannot map anonymous memory".

Although I'm not fully convinced whether this limit is reasonable or not,
old MAXSSIZ of ~256MB is too much anyway.
2021-04-17 13:23:24 +00:00
rillig
3737a339ac tests/make: remove ATF descr
The description of the tests is not going to be added anytime soon, as
that would either create redundancy or additional run-time cost.
Parsing and evaluating unit-tests/Makefile is already O(n^2) with regard
to the number of tests, and there are quite a few tests.  Therefore don't
add any overhead for now.
2021-04-17 11:36:34 +00:00
rillig
11173f1b80 tests/make: indent consistently 2021-04-17 11:31:25 +00:00
rillig
eefa5d1cf5 tests/make: simplify selection of the files to be copied
No functional change.
2021-04-17 11:21:17 +00:00
rillig
3c425c406d lint1: remove redundant dependency
This is already handled by "make depend".
2021-04-17 11:01:34 +00:00
mrg
cab9e0888f add support for arm64 lse.S.
arm64 userland much happier now.  /usr/bin/gcc as gcc 10 on arm64
is fine, build is complete, though i did not test xsrc yet.
2021-04-17 10:54:46 +00:00
mrg
d44b5d46ab remove double arm64 netbsd target. add t-lse, though we don't
pull this out with mknative currently.
2021-04-17 10:53:18 +00:00
mrg
edc6087d66 port the -mnative support in GCC 10 to netbsd. (much simpler than 8->9!) 2021-04-17 10:19:09 +00:00
wiz
c2f08324c4 tmux 3.2 out. 2021-04-17 10:13:09 +00:00
mlelstv
34c5ec62b8 Use GCC10 for all amd64 including XEN kernels. 2021-04-17 09:39:33 +00:00
rin
b1edf0312b Adjust TABs. No functional changes. 2021-04-17 09:22:28 +00:00
maya
266b57cd8b Remove SCCS workaround. No binary change. 2021-04-17 08:35:33 +00:00
maya
5858bd6b8c Remove SCCS workarounds. No binary change. 2021-04-17 08:34:27 +00:00
simonb
c47d88974b Use __register_t instead of uregister_t - this is available to all ports
and both userland and kernel.
2021-04-17 08:06:58 +00:00
maya
d8cc1107df Remove SCCS workarounds. No binary change. 2021-04-17 06:14:15 +00:00
simonb
e857cfe928 Cast the fill value to unsigned char so that the "fill" value used for
full-word fills isn't garbage.
2021-04-17 06:02:35 +00:00
simonb
4e9c90673d Disable the larger/faster code path. While the optimised code path was
indeed quicker, it nonetheless failed to actually fill all the requested
memory with the specified value much of the time if a non-aligned start
address was used.
2021-04-17 05:57:11 +00:00
mrg
e221c5c54b note GCC 10 and the ports that switched. 2021-04-17 04:11:52 +00:00
mrg
8ee87df871 add a note about potential GCC 9->10 build failures 2021-04-17 04:08:32 +00:00
mrg
2c7f7c1589 switch alpha, ia64, sparc*, riscv*, amd64 and vax to GCC 10 default. 2021-04-17 04:07:16 +00:00
simonb
a90ebf65fd Compile in compat32 syscall names all the time, as we do for native
syscall names.  Needed for dtrace.
2021-04-17 03:57:42 +00:00
mrg
ddd88a608a various updates, thanks to those who provided feedback.
- powerpc ports work
- m68k ports work, x68k has a new caveat
- hppa works
- mips64eb vs UVMHIST has been fix
- i386 reboot problem fixed (cardbus issue, not GCC related)
2021-04-17 01:59:41 +00:00
mrg
f405a45af6 remove KERNHIST_INIT_STATIC(). it stradles the line between usable
early in boot and broken early in boot by requiring a partly static
structure with another structure that must be present by the time
any uses are performed.  theoretically platform code could allocate
a chunk while seting up memory and assign it here, giving a dynamic
sizing for the entry list, but the reality is that all users have
a statically allocated entry list as well.

the existing KERNHIST_LINK_STATIC() is used in conjunction with
KERNHIST_INITIALIZER() instead.

this stops a NULL pointer deref when the _LOG() macro is called
before the storage is linked in, which happens with GCC 10 on OCTEON
with UVMHIST enabled, crashing in very early kernel init.
2021-04-17 01:53:58 +00:00
mrg
856324edf9 convert cardslot event thread from wakeup/tsleep to mutex/condvar.
this avoids a strange hang at reboot i am seeing on an old pentium4-m
laptop, that was introduced with kern_mutex.c 1.91/92, though i can
not really explain why that matters (in the waiting thread, a pointer
that should be NULL remains non NULL.)  thanks to jmcneill@ for some
helpful review commentary here.

don't panic() if either "cardbus" or "pcmcia" didn't attach and a
card is inserted.  this can happen for various reasons, including
some regression in netbsd (-current, and -9, at least) that suggests
using PCI_BUS_FIXUP (though it still fails to attach the card i have.)

both found with GCC 10 testing, though both also occur with GCC 7 in
the netbsd-9 tree as well.
2021-04-17 01:19:48 +00:00
mrg
0e59457009 avoid an error in the recent sys/evcnt.h change to drop the 0
array size from evcnt_sysctl:ev_strings that clang does not like.

the previous "struct xevcnt_sysctl" was well defined as the
evcnt_sysctl with array length of 0 could be placed as the
anywhere in other structures, but with [] it must remain last
and xevcnt_sysctl then places a char array afterwards.

avoid this entirely by removing struct xevcnt_sysctl, combining
the string array + struct evcnt_sysctl size manually for the
allocation, and moving all "ev_string" accesses to be via the
new [] array.
2021-04-17 00:05:31 +00:00
christos
5f835dcadf appease gcc-9 2021-04-17 00:02:19 +00:00
christos
e598b150b9 PR/56112: Justin Parrott: Don't unlink a lock file without locking it, because
you can have races when multiple processes try to unlink it. Check the link
count to see if we have won the race.

While here:
- use snprintf
- use warn
- use size_t/ssize_t
- use loops instead of goto
- KNF
2021-04-16 22:41:12 +00:00
christos
4a8f7c3df0 make value an int to avoid all the casts and conversion warnings. 2021-04-16 18:31:28 +00:00
rillig
9e5a82eed4 make: use distinct wording for writing to the shell commands file
The word 'write' now means to write to the file that holds the shell
commands to be run later.

The word 'print' is now used exclusively for handling the output of the
child commands and printing them to make's stdout.

No functional change.
2021-04-16 16:49:27 +00:00
rillig
32bd955566 make: align name of jobs_table_dump to the other functions 2021-04-16 16:10:01 +00:00
pgoyette
f9d5d6d2d4 Add a couple definitions for RPG 2021-04-16 15:53:55 +00:00
christos
f1d025f4e1 Change octal and hex parsing to not use strtoul so that they don't handle
'-'. From Martijn van Duren.
Also add a warning if the conversion fails (like the gnu printf does)
2021-04-16 15:10:18 +00:00
christos
9777eb9aeb go back to right-aligning the titles for CPU and WCPU. 2021-04-16 13:02:47 +00:00
reinoud
519a7d1514 Limit buffer size for device capabilities requests as a work-around for PR
kern/56109.
2021-04-16 12:58:54 +00:00
ryo
65707115ac fix typo 2021-04-16 08:09:40 +00:00
ryo
255ce3d45d when the packet size was just n*MCLBYTES, there was an inconsistency in the length of mbuf. 2021-04-16 08:07:02 +00:00
msaitoh
882c1780be - Remove obsolete cltom(9) and mtocl(9).
- Add missing manual page's link of m_adj.
2021-04-16 07:45:41 +00:00
skrll
b6f5691d57 spello in comment 2021-04-16 07:02:09 +00:00
rin
efb1d0a1d1 Restore our local change to remove GNU_STACK program header:
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c#rev1.13

This was removed accidentally when merging GCC10 into our tree.

Note that some firmwares, e.g., Explora, refuse to execute ELF
kernel image if this program header is present.

Now, GCC10 becomes just fine for all three powerpc sub-archs, i.e.,
oea, booke, and ibm4xx, as far as I can see. No regressions are
observed for ATF.

OK mrg
2021-04-16 02:33:28 +00:00
rin
3d5cb49cde Fix regression introduced to GCC10, where it wrongly recognizes 32-bit
processors as POWER9 if -misel flag is specified.

rs6000_machine_from_flags() assumes ISEL instructions are supported only
for POWER9 and successors. However, ISEL is also implemented for 32-bit
booke processors.

Since our kernel for booke is compiled with -misel, this regression
completely breaks it.

As a fix, check whether CPU is 64-bit capable or not, before checking
-misel flag.

The problem has been reported as 100108 to upstream:

	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100108

OK mrg
2021-04-16 02:26:43 +00:00
yamaguchi
db6b169977 Added missing locking order between sppp and IFNET_LOCK 2021-04-16 02:26:25 +00:00
yamaguchi
3955989b41 Stop and destroy timeout after sppp_detach and if_detach
for safety

The functions may use resources of pppoe(4) while detaching,
so the release should move after it.
2021-04-16 02:23:25 +00:00
rin
3467bd47be Fix regression introduced to GCC10, by which inline assembler codes for
403/405 are miscompiled.

Redundant .machine directive introduced by upstream commit
2d94f7dea9c73ef3c116a0ddc722724578a860fe:

	https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=2d94f7dea9c73ef3c116a0ddc722724578a860fe

clobbers CPU flags passed to assembler. This results in miscompile for
inline assembler codes specific to 403/405 processors, at least.

Therefore, revert this commit locally.

The problem has been reported as 100107 to upstream:

	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100107

OK mrg
2021-04-16 02:18:04 +00:00
yamaguchi
67c987e115 Remove unnecessaly lock holdings to avoid dead lock
The locks were held while callout_halt() and workqueue_wait()
without reason.
And the locks also were held at callout and workqueue handler
so that the handler kicked by those function couldn't acquire
the lock.

The reasons why those are unneccesary are:
 - Items of callout_t are protected by callout_lock
 - Items of struct workqueue and struct work are protected
   by q_mutex in struct workqueue
 - Items of struct sppp_work protected by atomic_cas(3)
 - struct pppoe_softc does not free before workqueue_wait() and
   callout_halt() even if the locks are not held
2021-04-16 02:12:00 +00:00
yamaguchi
d0255047d4 Fix not to put the wrong error message 2021-04-16 02:05:37 +00:00
yamaguchi
382b1e495e Stop ppp layer at first of destroying pppoe interface 2021-04-16 01:59:50 +00:00