Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (39m)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 10:10:38 UTC Now

2021-09-07 03:48:01 UTC MAIN commitmail json YAML

Sprinkle __predict_false() in the RX path.

(msaitoh)

2021-09-07 01:29:13 UTC MAIN commitmail json YAML

PR lib/56388

Regen addstr2.chk after fix for the line-hash bug in libcurses.

Now, all t_curses tests successfully pass on all platforms I have tried.

Thanks blymn@ for kind advice!

(rin)

2021-09-07 01:23:10 UTC MAIN commitmail json YAML

PR lib/56388

For __newwin() and __resizewin(), the line hash was calculated as if
HAVE_WCHAR is disabled.

Fix this bug by refactoring __hash_line() function, which calculates
the line hash by an appropriate method.

(rin)

2021-09-06 21:56:04 UTC MAIN commitmail json YAML

2021-09-06 21:18:55 UTC MAIN commitmail json YAML

tests/make: test modifier ':S' with replacement '&'

Before 2020-08-30, OpenBSD make incorrectly copied the anchors '^' and
'$' to the replacement string.  Just guard against this possible bug.

(rillig)

2021-09-06 20:55:08 UTC MAIN commitmail json YAML

fix typos in word "segment" and two additional typos in if_tl.c.

(andvar)

2021-09-06 19:38:30 UTC MAIN commitmail json YAML

2021-09-06 17:34:33 UTC MAIN commitmail json YAML

libldap: fix undefined behavior in ldap_int_tls_connect

The function isdigit must not be called with 'char' as argument.

https://bugs.openldap.org/show_bug.cgi?id=9668

(rillig)

2021-09-06 17:19:53 UTC MAIN commitmail json YAML

libipsec: fix undefined behavior when calling isprint

(rillig)

2021-09-06 15:17:25 UTC MAIN commitmail json YAML

Always autogen fileio.h.

Bump CURSES_LIB_MAJOR.CURSES_LIB_MINOR to 9.0 belatedly.

(rin)

2021-09-06 14:03:18 UTC MAIN commitmail json YAML

2021-09-06 13:11:34 UTC MAIN commitmail json YAML

2021-09-06 08:37:43 UTC MAIN commitmail json YAML

Clamp zfs nlinks at UINT32_MAX (nlink_t max) instead of (much) smaller
16-bit LINK_MAX until we bump LINK_MAX.  Fixes fts(3) problems with
"rm -rf" on zfs directories with > 32766 subdirectories.

Thanks mlelstv@ and mrg@ for helping debug this.

(simonb)

2021-09-06 07:45:48 UTC MAIN commitmail json YAML

2021-09-06 07:08:25 UTC MAIN commitmail json YAML

Unifdef DEBUG for CTRACE().

(rin)

2021-09-06 07:03:50 UTC MAIN commitmail json YAML

2021-09-06 02:50:43 UTC MAIN commitmail json YAML

Fix old-style definition: curses_version() --> curses_version(void)

(rin)

2021-09-06 02:48:54 UTC MAIN commitmail json YAML

Fix old-style definition: use_default_colors() --> use_default_colors(void)

(rin)

2021-09-06 02:43:37 UTC MAIN commitmail json YAML

2021-09-06 02:43:06 UTC MAIN commitmail json YAML

the CPU ident and AMD both say this is "R2 Graphics", not R3.

(mrg)

2021-09-05 22:34:07 UTC MAIN commitmail json YAML

tests/stdio: use standard ATF tools for verifying the test output

In case of a test failure, this outputs a diff between the actual and
expected files.

Even with the smaller buffer size LMAX, the fully buffered test fails.
It does so after printing numbers up to 12773, which together take 65532
bytes.  The next number, 12774, would cross the 65536 boundary, but
instead of that number, 12710730 was written.

(rillig)

2021-09-05 22:14:49 UTC MAIN commitmail json YAML

tests/stdio: wrap test command with atf_check

Previously, the test output was:

FAILED: Test case body returned a non-ok exit code, but this is
    not allowed

In many cases, the test now succeeds, but in some cases it fails:

h_testnumbers: bad line "1287185
", expected 12774

h_testnumbers: bad line "6186889
", expected 6154889

(rillig)

2021-09-05 21:57:57 UTC MAIN commitmail json YAML

tests/stdio: on test failure, print more details

On amd64, the test stdio_intr_iofbf fails:

stdout: numbers.in...iw.ir.ir. OK
stderr: h_testnumbers: bad line 3914889

This information is not enough to get a complete picture of the
situation, so provide more details.

(rillig)

2021-09-05 19:58:53 UTC MAIN commitmail json YAML

lint: remove source code references from internal error message

The additional strings that are provided with the error message are
distinctive enough.

(rillig)

2021-09-05 19:44:57 UTC MAIN commitmail json YAML

lint: extract function for reading a single line from a .ln file

No functional change.

(rillig)

2021-09-05 19:16:38 UTC MAIN commitmail json YAML

2021-09-05 18:39:58 UTC MAIN commitmail json YAML

tests/lint: clean up test for misplaced lint comments

A varargs comment that appears in the function body is already covered
by varargs_bad_body.  Cleaning up this test makes sure that the warning
is indeed triggered by the comment in the parameters declaration.

(rillig)

2021-09-05 18:34:50 UTC MAIN commitmail json YAML

lint: reduce number of ifdef names

No functional change.

(rillig)

2021-09-05 18:17:15 UTC MAIN commitmail json YAML

2021-09-05 17:49:55 UTC MAIN commitmail json YAML

lint: do not warn about comparison 'unsigned <= 0'

Seen in scanners generated by Flex, and about 50 occurrences in the
NetBSD src and xsrc tree, all of which are not suspicious of being bugs.

(rillig)

2021-09-05 17:29:27 UTC MAIN commitmail json YAML

2021-09-05 16:47:24 UTC MAIN commitmail json YAML

2021-09-05 16:36:56 UTC MAIN commitmail json YAML

lint: suppress remaining lint warnings in generated scan.c

Warning 162 about 'unsigned <= 0' feels too ambitious, it may be
restricted to the clearly wrong 'unsigned < 0' in the future.

Warnings 192 and 214 are a result of the strict bool check, but the
error messages are suppressed, which makes it hard to see why lint says
the local variable were unused and the function would not return a
value.

Warning 307 about unused static variables is OK for generated code.

(rillig)

2021-09-05 16:15:06 UTC MAIN commitmail json YAML

lint: fix some more lint warnings

The only remaining warnings are in scan.c, which is a generated Flex
scanner.

No functional change.

(rillig)

2021-09-05 16:03:55 UTC MAIN commitmail json YAML

2021-09-05 15:15:58 UTC MAIN commitmail json YAML

lint: clean up CPPFLAGS for xlint

In 1995, the file mem.c was in ../lint1.  In 2002, these files were
moved to ../common instead.

(rillig)

2021-09-05 13:46:31 UTC MAIN commitmail json YAML

2021-09-05 13:20:34 UTC MAIN commitmail json YAML

2021-09-05 13:19:39 UTC MAIN commitmail json YAML

lint.7: document removed messages

Having just an empty string as the message was confusing.

(rillig)

2021-09-05 12:47:10 UTC MAIN commitmail json YAML

Now, ctx_flush() never fails. So, make this function void.

(rin)

2021-09-05 12:45:44 UTC MAIN commitmail json YAML

README: use https for man.NetBSD.org

(rillig)

2021-09-05 12:28:44 UTC MAIN commitmail json YAML

pmap_enter_pv(): At the moment, this function is always called with
pmap_initialized. So, convert test for this condition to KASSERT.

(rin)

2021-09-05 12:23:40 UTC MAIN commitmail json YAML

pmap_enter_pv(): No need to initialize npv to NULL.

No functional changes intended.

(rin)

2021-09-05 12:05:05 UTC MAIN commitmail json YAML

pmap_testout(): Use pmap_{protect,remove}() for va to (va + PAGE_SIZE),
instead of (va + 1).

No functional changes for the current implementation. Also, this affects
only when the function is manually called from DDB on DEBUG kernel.

(rin)

2021-09-05 11:43:22 UTC MAIN commitmail json YAML

Don't use __FBSDID, similar to kern/kobj.c, kern/misc.c, kern/sysevent.c

(mlelstv)

2021-09-05 11:42:33 UTC MAIN commitmail json YAML

tests/lint: document the fixed assertion failure for struct

The change to cgram.y 1.328 from 2021-07-15 didn't fix the crash on
purpose, it was merely a side effect.  The grammar rule that probably
fixed this was that the error handling now skips to the next T_SEMI,
which it didn't do before.

(rillig)

2021-09-05 10:49:51 UTC netbsd-9 commitmail json YAML

2021-09-05 10:48:48 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by tsutsui in ticket #1342):

sys/arch/mips/mips/trap.c: revision 1.250
sys/arch/mips/mips/trap.c: revision 1.251

Add missing newline to a diagnostic printf.

Comment out the diagnostic message in the TLB_MOD handler that's logged if
pmap_tlb_update_addr() indicates that the VA+ASID was not found in the TLB.

It's a harmless race condition that can happen for legitimate reasons (e.g.
a TLB miss in an interrupt handler that evicts the entry from the TLB).

See discussion:
    http://mail-index.netbsd.org/port-mips/2020/03/07/msg000927.html

(martin)

2021-09-05 10:18:31 UTC MAIN commitmail json YAML

osnet: fix lint warning about empty declaration

proc_bkpt.c(32): warning: empty declaration [0]

Use the same definition as in libarchive.

(rillig)

2021-09-05 09:57:43 UTC MAIN commitmail json YAML

if (cond) panic() or Debugger() in #ifdef DIAGNOSTIC ---> KASSERT(!cond)

There is no regression observed during a full ATF run.

(rin)

2021-09-05 03:57:27 UTC MAIN commitmail json YAML

avoid xnack, and -fp32-denormals, and +fp64-denormals options for
amdgpu / radeonsi driver.  these options don't work with llvm 13,
and generate warnings for all GL apps.

mesa 21 has entirely different code here.

(mrg)

2021-09-05 03:47:24 UTC MAIN commitmail json YAML

make sure PCI_IOC_DRVNAMEONBUS doesn't access NULL pointers.

hopefully fixes PR#55744.  it's not entirely clear why this does
not affect most systems, as there's usually some PCI devices that
do not have attached drivers, eg:

006:00:0: AMD Family17h/7xh Reserved SPP (non-essential instrumentation, subclass 0x00)

on my system i'm testing on.

XXX: pullup-8, pullup-9.

(mrg)

2021-09-04 21:20:44 UTC MAIN commitmail json YAML

tests/lint: provide more background information on signed '>>'

(rillig)

2021-09-04 20:39:18 UTC MAIN commitmail json YAML

tests/lint: test error handling when reading .ln files

(rillig)

2021-09-04 19:27:43 UTC MAIN commitmail json YAML

re(4): misc chip revision support changes
* remove impossible-to-match chip revision cases
* bring support for modern chips in line with FreeBSD and OpenBSD
  * adds support for RTL8168GU

Addresses PR kern/56312.

(jakllsch)

2021-09-04 19:16:38 UTC MAIN commitmail json YAML

lint: reduce complexity of reading a function call

No functional change.

(rillig)

2021-09-04 18:58:57 UTC MAIN commitmail json YAML

lint: inline local variables in outtype

No functional change.

(rillig)

2021-09-04 18:49:33 UTC MAIN commitmail json YAML

lint: condense code for writing to a lint library

Same as in lint1.

No functional change.

(rillig)

2021-09-04 18:38:03 UTC MAIN commitmail json YAML

Ignore mouse packets properly even if wsmouse(4) isn't configured.

The internal state of wskbd(4) could be mangled if mouse (which was
connected behind keyboard) was enabled by unexpected keyboard reset.
This could happen on the INSTALL kernel (no wsmouse(4) on it).

Based on a patch from moveccr, with several tweaks by me.

(tsutsui)

2021-09-04 18:34:17 UTC MAIN commitmail json YAML

tests/lint: test old-style functions in a lint library

To really qualify as old-style, a function must not declare a return
type in its definition.

(rillig)

2021-09-04 18:26:36 UTC MAIN commitmail json YAML

tests/lint: test writing of a lint library

The code for that is almost the same as in lint1, but only almost.

(rillig)

2021-09-04 15:39:41 UTC MAIN commitmail json YAML

lint: make initialization of the basic types table simpler

No functional change.

(rillig)

2021-09-04 15:13:00 UTC MAIN commitmail json YAML

2021-09-04 14:58:42 UTC MAIN commitmail json YAML

lint: clean up outfstrg, which writes format strings

Most characters don't need outqchar, a simple outchar is often enough.

Since '\0' is not a digit, there is no need to check for that.

No functional change.

(rillig)

2021-09-04 14:48:27 UTC MAIN commitmail json YAML

2021-09-04 14:42:30 UTC MAIN commitmail json YAML

lint: trim down the code for writing the output files

The output buffer is only needed in a single file, so unexport it.

When calling outname, the chances for the name being null are close to
zero, therefore omit the caller information.

(rillig)

2021-09-04 14:31:04 UTC MAIN commitmail json YAML

Style. No binary changes.

Also, remove old #if-0'ed code block copied from oea (and therefore
will never be enabled).

(rin)

2021-09-04 14:26:32 UTC MAIN commitmail json YAML

2021-09-04 14:07:51 UTC MAIN commitmail json YAML

lint: remove _Complex from tspec_name

That type is only used in the parser; the expression trees use FCOMPLEX,
DCOMPLEX or LCOMPLEX instead.

Sort the typeinfo definitions according to their order in tspec_t.  Do
not add _Complex there since it is not needed.  This means that NOTSPEC
and COMPLEX would both trigger an internal error.

(rillig)

2021-09-04 13:53:20 UTC MAIN commitmail json YAML

lint: remove duplicate code in tspec_name

No functional change.

(rillig)

2021-09-04 13:45:37 UTC MAIN commitmail json YAML

2021-09-04 13:36:07 UTC MAIN commitmail json YAML

2021-09-04 13:27:59 UTC MAIN commitmail json YAML

lint: use unsigned integers for size calculations

No change for type definitions that are smaller than 128 MB.  For larger
types, integer overflow might occur, just like before.

(rillig)

2021-09-04 12:54:19 UTC MAIN commitmail json YAML

Fix several styles and formats.

(tsutsui)

2021-09-04 12:44:23 UTC MAIN commitmail json YAML

Use C99 designated initializer.

(tsutsui)

2021-09-04 12:38:13 UTC MAIN commitmail json YAML

Use proper macro for device register addresses.

(tsutsui)

2021-09-04 12:37:46 UTC MAIN commitmail json YAML

2021-09-04 12:35:31 UTC MAIN commitmail json YAML

Use fdt_iommu instead of calling appledart directly from applepcie

(jmcneill)

2021-09-04 12:34:39 UTC MAIN commitmail json YAML

2021-09-04 12:30:46 UTC MAIN commitmail json YAML

2021-09-04 12:05:54 UTC MAIN commitmail json YAML

lint: split declare_local into smaller functions

(rillig)

2021-09-04 10:26:44 UTC MAIN commitmail json YAML

lint: remove unnecessary includes

The type definitions used to depend on the host's platform
characteristics once, which required <limits.h>.

(rillig)

2021-09-04 10:09:19 UTC MAIN commitmail json YAML

lint: sort operators in typeok_op according to ops.def

Well, except for INIT, FARG, RETURN.  These are listed at the very
bottom of the operators table but still behave much like ASSIGN.

No functional change.

(rillig)

2021-09-04 09:45:27 UTC MAIN commitmail json YAML

lint: extract typeok_point and typeok_arrow from typeok_op

No functional change.

(rillig)

2021-09-04 09:26:22 UTC MAIN commitmail json YAML

lint: clean up switch statement in typeok_op

In the old times where typeok_op was inlined into typeok, it was
necessary to write the complicated if-not-return-break.  Not anymore.

No functional change.

(rillig)

2021-09-04 09:18:25 UTC MAIN commitmail json YAML

lint: make typeok_quest simpler

No functional change.

(rillig)

2021-09-04 05:47:31 UTC MAIN commitmail json YAML

Fix typo to correctly initialize call_once2_pic_profile.

(rin)

2021-09-04 02:24:27 UTC MAIN commitmail json YAML

Use MI subr_disk_mbr.c for proper MBR and bi-endian supprot.

No special MD handling in previous.  Briefly tested on gxemul 0.6.3.

(tsutsui)

2021-09-04 02:19:56 UTC MAIN commitmail json YAML

Use C99 designated initializer.

(tsutsui)

2021-09-04 01:47:47 UTC MAIN commitmail json YAML

Fix inverted logic in OpenSSH SSHFP DNS record verification

(ryoon)

2021-09-04 01:34:32 UTC MAIN commitmail json YAML

Cosmetic fixes. No functional changes intended.
- Reorganize logic to reduce indent levels significantly.
- Use ``for'' rather than ``while''.

(rin)

2021-09-04 00:33:10 UTC MAIN commitmail json YAML

Fix typos in comments and add missing KERNEL_RCSID

(gutteridge)

2021-09-03 22:48:49 UTC MAIN commitmail json YAML

lint: set the return type of __builtin_*_overflow to bool, not int

Needed for inetd.c in strict bool mode.

(rillig)

2021-09-03 22:44:09 UTC MAIN commitmail json YAML

2021-09-03 22:33:19 UTC MAIN commitmail json YAML

2021-09-03 22:27:32 UTC MAIN commitmail json YAML

lint: extract build_name_call from build_name

This reduces the indentation, providing enough space to write out the
full diagnostic in the code.  It also prepares for supporting GCC
builtins like __builtin_add_overflow, which return _Bool instead of int.

No functional change.

(rillig)

2021-09-03 21:58:36 UTC MAIN commitmail json YAML

2021-09-03 21:55:01 UTC MAIN commitmail json YAML

2021-09-03 21:02:04 UTC MAIN commitmail json YAML

inetd: remove redundant tests before calling isspace

(rillig)

2021-09-03 20:44:23 UTC MAIN commitmail json YAML

Only define ACPI_QUIET_BOOT for kernel builds

(jmcneill)

2021-09-03 20:41:19 UTC MAIN commitmail json YAML

inetd: remove redundant null check before free

No functional change.

(rillig)

2021-09-03 20:24:28 UTC MAIN commitmail json YAML

inetd: prepare for lint's strict bool mode

Lint's strict bool mode considers bool incompatible with the other
scalar types.  This makes the type of expressions more visible in the
code.  In particular, conditions of the form '!strcmp(...)' are no
longer allowed, they have to be written as 'strcmp(...) == 0'.

The operator '!' cannot be used with sep->se_wait since that has type
pid_t, not bool.

No change to the resulting binary.

(rillig)

2021-09-03 19:33:51 UTC MAIN commitmail json YAML

inetd: normalize indentation and alignment in comments

(rillig)

2021-09-03 17:18:40 UTC MAIN commitmail json YAML

2021-09-03 16:21:15 UTC MAIN commitmail json YAML

Ignore mouse packets to avoid unexpected data handled as keyboard input.

Patch from moveccr.

(tsutsui)

2021-09-03 12:20:38 UTC MAIN commitmail json YAML

Try to refactor this in order to correct some of the memory issues
reported by Christian Holler.

(christos)

2021-09-03 11:59:29 UTC MAIN commitmail json YAML

2021-09-03 10:30:33 UTC MAIN commitmail json YAML

2021-09-03 10:28:29 UTC netbsd-9 commitmail json YAML

2021-09-03 10:27:33 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by manu in ticket #1341):

sys/arch/x86/x86/pmap.c: revision 1.410

Make pat_init() a NOOP on XENPV; it causes a trap with Xen 4.15

(martin)

2021-09-03 10:25:36 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by mrg in ticket #1340):

sys/dev/usb/ehci.c: revision 1.286

add missing newline and fix conditional for askroot/single user
hand over delay message.  PR#56366.

(martin)

2021-09-03 10:24:10 UTC netbsd-8 commitmail json YAML

2021-09-03 10:23:18 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by andvar in ticket #1693):

sys/dev/pci/if_vte.c: revision 1.32

Restore original MDC speed control register value after MAC reset, if
it wasn't default. Fixes PR port-i386/53494.

ok riastradh

(martin)

2021-09-03 10:20:22 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by andvar in ticket #1339):

sys/dev/pci/if_vte.c: revision 1.32

Restore original MDC speed control register value after MAC reset, if
it wasn't default. Fixes PR port-i386/53494.

ok riastradh

(martin)

2021-09-03 08:57:58 UTC MAIN commitmail json YAML

Save the discard_multidesc state to not to forget the state by exiting rxeof().

(msaitoh)

2021-09-03 08:43:23 UTC MAIN commitmail json YAML

Rename variable. No functional change.

(msaitoh)

2021-09-03 01:23:33 UTC MAIN commitmail json YAML

revert "make ahcisata(4) work on rk3399 (rockpro64)" from 23-06-2021.

this problem is known to affect more than AHCI, and a more general
solution has been commited now.

(mrg)

2021-09-03 01:21:48 UTC MAIN commitmail json YAML

rk3399 pcie: pay attention to the "bus-scan-delay-ms" property.

our existing pinebookpro DTS, but not the other rk3399 ones, have
this property set to "1000" (it's the same in linux 5.14 DTS.)

as there are already static 100ms + upto 1000ms, count how many
are done, and only delay more to complete one second.

this allows reverting this device-specific change:

  http://mail-index.netbsd.org/source-changes/2021/06/23/msg130402.html

and makes other sorts of storage cards more likely to work as well.

tested on rockpro64.

XXX:  consider moving dts setting into rk3399.dtsi.

ok jmcneill jak

inspired by https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/master/0013-rk3399-rp64-pcie-Reimplement-rockchip-PCIe-bus-scan-delay.patch

(mrg)

2021-09-03 00:45:34 UTC MAIN commitmail json YAML

2021-09-03 00:44:49 UTC MAIN commitmail json YAML

add a whole bunch of radeon devices.

now all the radeons i have are here (and dozens i don't :)

(mrg)

2021-09-02 20:57:57 UTC MAIN commitmail json YAML

apple: derive CPU speed from mpidr_el1

According to https://github.com/AsahiLinux/docs/wiki/HW%3AARM-System-Registers,
MPIDR_EL1 Aff2 determines whether a core is an efficiency or performance
core. Replace the compat data table with code that uses the aff2 value
for fake DMIPS/MHz value, to hopefully maintain compatibility with future
cores.

(jmcneill)

2021-09-02 20:10:17 UTC MAIN commitmail json YAML

lint: split check_expr_misc into separate functions

No functional change.

(rillig)

2021-09-02 19:19:18 UTC MAIN commitmail json YAML

lint: split check_assign_types_compatible into separate functions

No functional change.

(rillig)

2021-09-02 18:20:00 UTC MAIN commitmail json YAML

2021-09-02 17:55:27 UTC MAIN commitmail json YAML

2021-09-02 17:29:19 UTC MAIN commitmail json YAML

2021-09-02 17:26:43 UTC MAIN commitmail json YAML

tests/lint: demonstrate unintended prototype warning for signed char

(rillig)

2021-09-02 16:31:01 UTC MAIN commitmail json YAML

lint: move a condition into should_warn_about_prototype_conversion

No functional change.

(rillig)

2021-09-02 16:16:49 UTC MAIN commitmail json YAML

lint: clean up should_warn_about_prototype_conversion

(rillig)

2021-09-02 11:28:45 UTC MAIN commitmail json YAML

2021-09-02 11:27:19 UTC MAIN commitmail json YAML

2021-09-02 11:26:18 UTC MAIN commitmail json YAML

Merge our changes from OpenSSH-8.6 to OpenSSH-8.7

(christos)

2021-09-02 08:02:33 UTC MAIN commitmail json YAML

Add missing NULL check for __pmap_pv_alloc() (== pool_get() with
PR_NOWAIT) in __pmap_pv_enter().

Then, handle this failure in pmap_enter(); return ENOMEM if
PMAP_CANFAIL, and panic otherwise.

(rin)

2021-09-02 07:55:56 UTC MAIN commitmail json YAML

PR port-sh3/56381

pmap_enter() returns ENOMEM if __pmap_pte_alloc() fails and PMAP_CANFAIL
flag is specified. In this case, remove pv via __pmap_pv_remove() if it is
added to p-v map list via __pmap_pv_enter().

Otherwise, pmap becomes an inconsistent state, which results in an infinite
loop in pmap_page_protect(), as reported in the PR.

Also, KASSERT's are added for sure, in order to detect the infinite loops.

Great thanks to chs@ for finding out this bug!!

(rin)

2021-09-02 07:04:41 UTC MAIN commitmail json YAML

lint: fix typo in assertion

(rillig)

2021-09-02 07:02:08 UTC MAIN commitmail json YAML

make: rename for_var_len to ExprLen

The text ${VAR} is not a variable, it's a variable expression.

No functional change.

(rillig)

2021-09-02 06:29:56 UTC MAIN commitmail json YAML

make: inline strchr call, make ForLoop_SubstBody clearer

In ForLoop_SubstBody, GCC already merged the common subexpressions p[1]
and p[-1], but that was difficult to see for humans as well.

No functional change.

(rillig)

2021-09-01 23:07:41 UTC MAIN commitmail json YAML

make: remove optimization for single-letter .for variables

Most .for loops have a single iteration variable.  For these loops, the
difference between the optimized and the unoptimized versions of the
code is negligible.

Remove the optimization since the comment for explaining it was almost
larger than the code itself.

(rillig)

2021-09-01 23:05:03 UTC MAIN commitmail json YAML

Make the scheduler aware of the differences between efficiency and
performance cores.

(jmcneill)

2021-09-01 22:44:50 UTC MAIN commitmail json YAML

tests/make: fix test directive-for-if

The additional lines 'VAR1' and 'VAR3' were supposed to be there from
the beginning.  I somehow managed to commit an inconsistent state of the
.mk and the .exp file.

(rillig)

2021-09-01 22:11:35 UTC MAIN commitmail json YAML

Install IPI handler with non-NULL context.

A side effect of interrupt handlers with NULL context when using armpic
is that the interrupt handler is only called from interrupt context, not
when lowering spl!

(jmcneill)

2021-09-01 14:17:46 UTC MAIN commitmail json YAML

2021-09-01 13:44:02 UTC MAIN commitmail json YAML

2021-09-01 06:48:24 UTC MAIN commitmail json YAML

lint: remove array creation from expr_derive_type

It is only used for creating string types.  The creation of other array
types happens in add_array.

This is a preparation to make all stored types const.

No functional change.

(rillig)

2021-09-01 06:12:51 UTC MAIN commitmail json YAML

2021-09-01 06:10:06 UTC MAIN commitmail json YAML

conditional build fix.

(mlelstv)

2021-09-01 03:08:08 UTC MAIN commitmail json YAML

PR port-arm/56264

Register all PICs when bcmicu1 is attached, in order to avoid calling
pic_add() from cpu_hatch(), which blocks for aarch64 kernel on RPI3.
This prevented MP kernel to boot due to KASSERT failure as described
in the PR.

This is a kind of a workaround; the real fix should be to

(a) reorganize cpu_hatch() for aarch64 and arm:
http://mail-index.netbsd.org/port-arm/2021/06/21/msg007320.html

(b) or change MI abstraction of ``MP ready'':
http://mail-index.netbsd.org/port-arm/2021/06/22/msg007327.html

However, still, this fix does not bring about any penalty, and it is
not good to leave RPI3 broken for months...

Tested on RPI3 (aarch64 MP, armv7hf MP) as well as RPI1 (armv6hf UP).

(rin)

2021-08-31 23:49:22 UTC MAIN commitmail json YAML

lint: remove unnecessary switch statement

The switch statement covers only the few structural types, there is no
need to list all integer types as well.

No functional change.

(rillig)

2021-08-31 23:10:53 UTC MAIN commitmail json YAML

lint: reduce verbose switch statement to table lookup

No functional change.

(rillig)

2021-08-31 19:34:42 UTC MAIN commitmail json YAML

inetd: fix Clang build

error: implicit conversion changes signedness: 'service_type' to 'int'

(rillig)

2021-08-31 19:26:23 UTC MAIN commitmail json YAML

2021-08-31 19:17:46 UTC MAIN commitmail json YAML

lint: extract condition for message 259 into separate function

No functional change.

(rillig)

2021-08-31 18:59:26 UTC MAIN commitmail json YAML

tests/lint: add test for prototype conversions in C90

The purpose of warning 259 is to find function calls that differ in the
ABI.  The warning's original purpose was not to warn about lossy
conversions, that's just a side effect.

Warning 259 had been implemented before C99 was published, which is more
than 20 years ago.  In the meantime, almost all code has migrated to
using function prototypes.  With the default lint flags from NetBSD's
<sys.mk>, it would rather make sense to focus on lossy conversions now.

To prepare for potentially upcoming differences in lint's C90 and C99
modes, clone the test now as far as possible.  The test for C90 mode is
smaller than for C99 mode, since 'long long' was not available back
then.

(rillig)

2021-08-31 18:15:56 UTC MAIN commitmail json YAML

tests/lint: add missing test cases for integer conversions

While adding the missing test cases, I re-read the comments and
discarded several of them, since converting a signed value to an
unsigned type can be lossy as well, which warrants a warning.

(rillig)

2021-08-31 17:51:30 UTC MAIN commitmail json YAML

lint: remove unused function for generic messages

The function message_at is still used, for information about previous
occurrences of a symbol.

(rillig)

2021-08-31 17:22:25 UTC MAIN commitmail json YAML

lint: fix memory allocation (since 2021-08-28)

In mem1.c 1.50 and mem2.c 1.13 from 2021-08-28, I accidentally changed
the initialization of mblklen from round_up to round_down, trying to
avoid a division instruction.

On NetBSD x86_64 this resulted in a few more malloc calls, but on Cygwin
with its 64k pagesize, mblklen became 0.  Later, the function xalloc in
lint2 called xalloc(mblklen) and blindly assumed that the returned
memory would be large enough.  This in turn led to out-of-bounds memory
access and crashes.  Lint1 was not affected since it adjust mblklen
during runtime if it gets too small.

(rillig)

2021-08-31 11:16:00 UTC MAIN commitmail json YAML

2021-08-31 08:22:28 UTC MAIN commitmail json YAML

add missing newline and fix conditional for askroot/single user
hand over delay message.  PR#56366.

(mrg)

2021-08-30 23:27:13 UTC MAIN commitmail json YAML

evbarm: Add support for Apple M1.

(jmcneill)

2021-08-30 23:26:26 UTC MAIN commitmail json YAML

2021-08-30 23:20:00 UTC MAIN commitmail json YAML

2021-08-30 23:16:17 UTC MAIN commitmail json YAML

Inspect #address-cells to determine if the cpu-release-addr requires
a 32- or 64-bit write.

(jmcneill)

2021-08-30 23:14:14 UTC MAIN commitmail json YAML

tests/grep: fix typo in test description

(rillig)

2021-08-30 23:10:58 UTC MAIN commitmail json YAML

tests/grep: demonstrate word search bug in usr.bin/grep

By default, MKBSDGREP is "no", therefore GNU Grep is installed as
/usr/bin/grep instead of src/usr.bin/grep, and this bug does not occur
in practice.

(rillig)

2021-08-30 22:57:33 UTC MAIN commitmail json YAML

Identify Apple M1 "Icestorm" and "Firestorm" CPU types.

(jmcneill)

2021-08-30 22:56:26 UTC MAIN commitmail json YAML

Add storage for an iommu cookie in bus_dmamap_t and store untranslated CPU
address in bus_dma_segment_t.

(jmcneill)

2021-08-30 22:54:40 UTC MAIN commitmail json YAML

Interrupts may not be enabled yet when cpu_lwp_fork is called during boot,
so remove incorrect KASSERT.

(jmcneill)

2021-08-30 22:53:37 UTC MAIN commitmail json YAML

- Add an isb before cnt[pv]_ctl read
- cntk_ctl is 64-bits
- Do not toggle CNTCTL_IMASK in intr handler, as this may be needed
  elsewhere.

(jmcneill)

2021-08-30 22:49:42 UTC MAIN commitmail json YAML

Until we have proper FDT iommu support, refuse to attach when an iommu
is required.

(jmcneill)

2021-08-30 22:49:03 UTC MAIN commitmail json YAML

If an allocation cannot be satisfied by the prefetchable range, retry with
the non-prefetchable range.

(jmcneill)

2021-08-30 22:48:16 UTC MAIN commitmail json YAML

bge_txeof/bge_rxeof may be called with no pending descriptors, so skip
bus_dmamap_sync with len=0

(jmcneill)

2021-08-30 22:47:25 UTC MAIN commitmail json YAML

2021-08-30 22:32:06 UTC MAIN commitmail json YAML

Add definition for HCR_E2H bit

(jmcneill)

2021-08-30 22:31:20 UTC MAIN commitmail json YAML

If we start in EL2 mode and the CPU supports EL2 host mode, don't bother
dropping to EL1 and just run the kernel in EL2 instead.

(jmcneill)

2021-08-30 22:28:50 UTC MAIN commitmail json YAML

Ensure that all memory accesses prior to executing WFI have been completed
by adding a DSB SY before stopping execution and entering a low power
state. From the ARM Cortex-A Series Programmer's Guide for ARMv8-A:

"ARM recommends the use of a Data Synchronization Barrier (DSB) instruction
before WFI or WFE, to ensure that pending memory transactions complete before
changing state."

(jmcneill)

2021-08-30 22:24:39 UTC MAIN commitmail json YAML

Add instruction barrier after write to mair_el1

(jmcneill)

2021-08-30 22:17:32 UTC MAIN commitmail json YAML

tests/grep: test word search with UTF-8 locale

(rillig)

2021-08-30 21:35:23 UTC MAIN commitmail json YAML

lint: extract parse_function_attribute from decldef

No functional change.

(rillig)

2021-08-30 21:23:37 UTC MAIN commitmail json YAML

tests/lint: test writing and reading .ln files

The test case for reading varargs functions is no longer necessary, the
code is covered by the newly added tests as well.

Test inline function and return value usage.

(rillig)

2021-08-30 20:52:10 UTC MAIN commitmail json YAML

2021-08-30 20:51:27 UTC MAIN commitmail json YAML

add RDC R6022 PCI-Host bridge.

(andvar)

2021-08-30 20:22:52 UTC MAIN commitmail json YAML

The INSTALL kernel needs to be small too

(christos)

2021-08-30 20:20:20 UTC MAIN commitmail json YAML

lint: remove redundant call to strchr in decldef

This time, the branches for varargs, printflike and scanflike in the big
switch statement are covered by unit tests.  These tests would have
caught the previous "cleanup" that broke parsing of these function
attributes.  Furthermore, this second cleanup is closer to the original
code and conceptually simpler since it avoids having many 'continue'
statements in a 'switch' statement, which would have been unusual.

The branches for inline functions and used functions are still not
covered by the tests, but they are structurally equal to several other
branches.

No functional change.

(rillig)

2021-08-30 20:11:56 UTC MAIN commitmail json YAML

tests/lint: test reading of varargs, printflike, scanflike

(rillig)

2021-08-30 20:09:22 UTC MAIN commitmail json YAML

Restore original MDC speed control register value after MAC reset, if it wasn't default. Fixes PR port-i386/53494.
ok riastradh

(andvar)

2021-08-30 19:48:21 UTC MAIN commitmail json YAML

2021-08-30 19:07:57 UTC MAIN commitmail json YAML

lint: revert "remove redundant call to strchr" from yesterday

This "refactoring" broke the parsing code for varargs, printflike and
scanflike functions, and there were no tests for these.  Revert for now,
maybe try again later, after adding the corresponding tests.

(rillig)

2021-08-30 19:01:06 UTC MAIN commitmail json YAML

Only use the ldscript for the RAMDISK kernel for now.

(christos)

2021-08-30 18:59:57 UTC MAIN commitmail json YAML

use -ffunction-sections -fdata-sections --gc-sections with an ldscript
that keeps _start. This deletes all unused code and shrinks the RAMDISK
kernel enough to be able to boot again:

-rwxr-xr-x  1 root  src  2519436 Aug 30 06:38 RAMDISK.1/netbsd*
-rwxr-xr-x  1 root  src  2104440 Aug 30 07:41 RAMDISK/netbsd*

  text    data    bss    dec    hex filename
  1525412  686252  63552 2275216  22b790 RAMDISK.1/netbsd
  1098524  686400  67008 1851932  1c421c RAMDISK/netbsd

(christos)

2021-08-30 18:33:37 UTC MAIN commitmail json YAML

tests/lint: test passing sizeof(int) to parameter type 'unsigned int'

Seen in usr.sbin/inetd/inetd.c, which calls getnameinfo and passes
sizeof(buf).

(rillig)

2021-08-30 18:21:11 UTC MAIN commitmail json YAML

inetd: raise WARNS from 5 to 6

The necessary fixes include:
* explicit integer conversions, to get rid of mixed signedness
* function prototypes for parameterless functions

While here:
* add space after comma
* add space after 'if'
* place the '{' of a function definition on a separate line
* rename variables 'bits' and 'temp' to 'hi' and 'lo'
* in parse_quote, prefer expressions over assignments
* make hex_to_bits static

No functional change.

(rillig)

2021-08-30 18:03:52 UTC MAIN commitmail json YAML

Move the character one back so that we don't increment twice

(christos)

2021-08-30 17:32:23 UTC MAIN commitmail json YAML

2021-08-30 17:08:13 UTC MAIN commitmail json YAML

2021-08-30 16:10:34 UTC MAIN commitmail json YAML

Wording and formatting improvements.
New sentence, new line.

(wiz)

2021-08-30 14:57:04 UTC MAIN commitmail json YAML

Skip the current character before parsing the number of arguments.

(christos)

2021-08-30 13:12:16 UTC MAIN commitmail json YAML

Remove lint workarounds

(christos)

2021-08-30 12:52:32 UTC MAIN commitmail json YAML

2021-08-30 09:18:17 UTC MAIN commitmail json YAML

Add a changes file

(christos)

2021-08-30 08:53:47 UTC MAIN commitmail json YAML