Commit Graph

287106 Commits

Author SHA1 Message Date
yamaguchi 87f753dafa commonize error handling in pppoe_clone_create() 2021-04-16 01:24:35 +00:00
mrg 5375303359 restore gcc-8 subdirs and mark as obsolete. oops.
noted by pgoyette.
2021-04-16 01:14:38 +00:00
mrg 73171c26e4 check the result value of pmap_extract() and panic if it fails.
this is a "should never fail" case, and GCC 10 noticed that it
allows an uninitialised variable use.

tested by rin@ on amiga and mac68k.
2021-04-16 00:13:48 +00:00
rillig 87e1399e00 make: remove type name for the abort status in job handling 2021-04-15 19:06:42 +00:00
rillig b089333f2a tests/make: demonstrate handling of null bytes 2021-04-15 19:02:29 +00:00
rillig b1928e38b6 make: rename PrintOutput to PrintFilteredOutput to avoid confusion
In the default configuration, the function PrintOutput did nothing.
Only if the shell has defined an output filter, something happens at
all.
2021-04-15 18:36:17 +00:00
rillig d11aa0ae3d make: document two previously unknown bugs in job mode 2021-04-15 18:21:27 +00:00
christos 0f62dc0eb2 fix reversed comment 2021-04-15 17:31:15 +00:00
christos 4ddba2f693 - Define NEED_ISYSTEM here
- include <bsd.init.mk> now that we can do it, because we need Makefile.rump
  to be included first, so that NOLINT gets defined, so that we don't end up
  building lint modules just for this.
2021-04-15 17:28:09 +00:00
christos 06788510d9 - Don't define NEED_ISYSTEM. This is a rump thing and should be only exposed
there.
2021-04-15 17:26:22 +00:00
christos e3e40d48f1 - Don't include <bsd.own.mk> It should be done by the enclosing Makefile
- Don't define NEED_ISYSTEM. This is a rump thing and should be only exposed
  there.
2021-04-15 17:26:07 +00:00
tsutsui 669338939e Fix two problems on old topcat(4) framebuffers found on HP332/340.
- Fix panic on monochrome framebuffers. They don't have palette registers.
  The problem was reported from Anders Gustafsson and also Andrew Gillham
  back in 2013:
   https://mail-index.netbsd.org/port-hp300/2013/09/27/msg000086.html
   https://mail-index.netbsd.org/port-hp300/2013/09/28/msg000087.html
- Fix incorrect framebuffer width of 98542/98544 framebuffers on HP332.
  Reported from Andrew Gillham (98542) as above and Chris Hanson (98543):
   https://mail-index.netbsd.org/port-hp300/2013/09/27/msg000083.html
   https://mail-index.netbsd.org/port-hp300/2020/05/01/msg000164.html

Worth to pullup to netbsd-9.
2021-04-15 14:43:19 +00:00
ryo 117e65d3d3 mtu for revision B0 and B1 is supported up to 16338 bytes 2021-04-15 09:05:24 +00:00
ryo acf609b610 fixed the problem of instability when changing mtu in IFF_UP state 2021-04-15 09:04:42 +00:00
ryo ff3bc245ed add support hardware tcp/udp rx checksum offloading 2021-04-15 09:04:08 +00:00
rin 0bb52ad971 Fix fallout from alpha/interrupt.c rev 1.93:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/alpha/alpha/interrupt.c#rev1.93

by which interrupts *seem* to occupy 100% CPU time.

Now, we bump ci_intrdepth for clock interrupt. Therefore, if ci_intrdepth > 1
is observed in statclock(), CPU is actually occupied by interrupts.

Thanks jklos and thorpej for notice!
2021-04-15 08:23:24 +00:00
christos 8ffea519f1 avoid second typedef for boolean_t in kernel code originally defined in
<sys/types.h>
2021-04-15 07:00:50 +00:00
christos 2cb1b4dc1d remove extra typedef for vnode_t done in <sys/vnode.h> 2021-04-15 06:59:57 +00:00
mrg 8842784405 document various gcc warnings that occur frequently enough to
inspire the GCC_NO_* series of variables, and explain some
about what the issues may be for each, hopefully providing some
direction on how to fix new warnings in this space.

christos asked me for this last year, and it's finally complete
enough to commit.  :-)
2021-04-15 05:15:04 +00:00
mrg f83306c1b9 feedback from rin@: alpha and m68k work well, powerpc not so much
but fixes are known.

thanks!
2021-04-15 05:12:57 +00:00
mrg 5cf114ea09 i've test-built all platforms. everything except arm64, x68k and sun2
builds.  many of them work as well.  most mips are (minimally) tested.
2021-04-15 01:59:51 +00:00
mrg 667f151ae6 convert 'extern phys_ram_seg_t mem_clusters[0];' to the '[]' form
so that when this code accesses mem_clustes[0] and mem_clusters[1]
it does't reach out of bounds.

XXX: should be in a header, but it's ugly to fix and i stopped
     when bus_dma.c wouldn't build.
2021-04-15 01:57:11 +00:00
mrg 90cb3f8f93 vax vs gcc: fsdb.c loses. also build this with -O0. 2021-04-15 01:56:00 +00:00
mrg e6d9bbbe8f one port complains about string overflow here that i can't see. 2021-04-15 01:55:21 +00:00
mrg 5def991c6d more -fcommon for boot programs. 2021-04-15 01:54:38 +00:00
rin faefc63d20 intrcnt[] is changed from long to u_int. Use sizeof(var) instead of
sizeof(type) to catch up with this change.

No binary changes as all ports with __HAVE_LEGACY_INTRCNT are ILP32, IIUC.
2021-04-15 00:37:31 +00:00
rin a68e817e60 dk_start(): retry device-dependent start() routine later, also when it
returns ENOMEM in addition to EAGAIN.

Device-dependent start() routine may allocate buffer directly, or via
bus_dma(9) API (some implementations for bus_dma(9) like alpha allocate
memory internally).

If these attempts fail with ENOMEM, this is not a disk error, therefore
we must retry later, as already done for EAGAIN.
2021-04-15 00:32:50 +00:00
rin 30e0d6e6fe Contrary to comment here, nowadays hardclock() and statclock() should be
called with cpu_intr_p() is turning on, if used from the interrupt context.

Otherwise, entropy_enter() is used instead of entropy_enter_intr(), which
results in KASSERT() failure.

Therefore, bump ci_intrdepth for clock interrupt. Remove stale comment also.
2021-04-15 00:19:52 +00:00
rin babb50b85b Fix inverted logic!!
vmem_xalloc(9) should be used with VM_NOSLEEP for BUS_DMA_NOWAIT.
2021-04-15 00:11:09 +00:00
rin 488a24ca8d sandpoint has its own module_init_md(). So, do not compile in
that function in powerpc_machdep.c.
2021-04-15 00:04:07 +00:00
rin b7d76f087c Use uvm_km_alloc(9) with UVM_KMF_NOWAIT flag in pte_enter(), in order not to
sleep in pmap_enter(9) and pmap_kenter_pa(9), which can result in dead lock.

In most cases, pmap_enter(9) is used with PMAP_CANFAIL flag. In this case,
if pte_enter() fails due to uvm_km_alloc(9), we can safely return ENOMEM.
UVM layer will take care of it.

uvm_km_alloc(9) fails for pmap_enter(9) without PMAP_CANFAIL or for
pmap_kenter_pa(9), we have no choice but to panic there.

However, my testbeds for 403 and 405 survive more than a week at least
without hitting this panic.
2021-04-15 00:00:46 +00:00
rin ca4c7ad410 Style fixes:
- Add "static inline" to pte_enter(), to match with its declaration.
- Remove parentheses from return.
- Use NULL instead of 0 for pointer initialization.

No binary changes.
2021-04-14 23:45:11 +00:00
rillig 507ed84ad7 lint: remove stray semicolon from grammar, make empty rule visible
No functional change.
2021-04-14 22:08:28 +00:00
rillig 63eed110a6 tests/lint: adjust test for C11 to the change in grammar and options 2021-04-14 22:06:38 +00:00
christos 674dc63d44 use an enum instead of constant variables so that they work in CTASSERT. 2021-04-14 21:29:57 +00:00
christos 4d60a3d6f9 there is also an optional type qualifier list in the array size 2021-04-14 21:20:21 +00:00
christos 268a84db7b gnu enables c11 extensions 2021-04-14 21:20:02 +00:00
rillig 9103e93ec9 lint: un-abbreviate code for passing options to cpp, lint1 and lint2
No functional change.
2021-04-14 20:35:31 +00:00
rillig 3874a90eb6 lint: add option to accept C11 features
The list of available letters for the command line options gets shorter
and shorter.  Most of the interesting letters are already used for some
warning categories.  Curiously, -A, -W and -E were all still available.

The option -A nicely matches the intention of the option, which is to
allow a certain set of language features.  To keep the option available
for further extensions, define -Ac11 as the currently only valid option
of that kind.  This allows straight-forward extension for C17 and future
language standards, as well as independent feature-sets.  The options -W
and -E may someday complement the -A option, using the allow/warn/error
categories.
2021-04-14 20:06:40 +00:00
rillig c58b6a91cc lint: arrange options in the usage messages
* lowercase the word 'usage'
* group the preprocessor flags on a line of their own
* add missing closing ']' for '-X'
* properly indent the lines
2021-04-14 19:25:48 +00:00
rillig 08565001cc lint: remove redundant condition in update_location 2021-04-14 18:38:06 +00:00
rillig 67509c5839 lint: add support for C11-isms such as int[static 3] 2021-04-14 18:35:40 +00:00
rillig 6aa88d9625 lint: add test for newly added message about static array size 2021-04-14 18:27:11 +00:00
rillig b40d5c12d2 make: let the compiler decide whether to inline string functions
On x86_64, this reduces the binary size by 2 kB.
2021-04-14 17:39:11 +00:00
rillig 56af7cb8e9 make: turn run-time string concatenation into compile-time
No functional change.
2021-04-14 17:24:48 +00:00
rillig d6aef06ed9 make: remove unnecessary modifier ':U' for certain fixed expressions
No functional change, since the expression is evaluated using
VARE_WANTRES, not using VARE_UNDEFERR.
2021-04-14 17:20:48 +00:00
rillig 278b3755f7 make: reduce memory allocations in the modifiers ':D' and ':U' 2021-04-14 16:59:34 +00:00
mlelstv 0e3291df0d Add DIOCGDISKINFO compat. 2021-04-14 16:26:23 +00:00
rillig e7ab8fe199 make: rename members of ModifyWord_LoopArgs
No functional change.
2021-04-14 16:12:26 +00:00
rillig be9afdd585 make: clean up pattern flags for the modifiers ':S' and ':C'
No special handling is necessary for C90 since none of the struct
members is a const_member.

The prefix 'Var' is not necessary since this type does not apply to a
variable but only to a modifier.

No functional change.
2021-04-14 15:41:08 +00:00