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 (15m)  netbsd-8 (5d)  netbsd-10 (6d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 12:39:40 UTC Now

2022-01-06 09:01:16 UTC MAIN commitmail json YAML

Added more field definitions for ARMv8.x system registers

(ryo)

2022-01-06 08:46:43 UTC MAIN commitmail json YAML

2022-01-06 07:39:10 UTC MAIN commitmail json YAML

QEMU e1000's PHY code doesn't reflect the PSSR_LINK bit. Do workaround.

  IEEE 802.3 clause 22's PHY device has a link status bit in the BMCR
  register, but it's required to read twice to get the correct value.
  Almost all PHY devices have the vendor specific register which has
  the link status bit that it's not required to read twice. makphy(4)
  use the bit in the PSSR register to reduce the access cost.

  QEMU's e1000 provides the PHY specific status register at 0x11 but the
  link indication bit (PSSR_LINK.) is always 1 because
  e1000x_update_regs_on_link_{down,up}() modify MII_SR_LINK_STATUS
  (BMSR_LINK in NetBSD) but don't modify PSSR_LINK. It causes
  "virsh domif-setlink xxx yyy down" doesn't work.
  To avoid this problem, read the BMSR and check the BMSR_LINK bit. Add
  MAKPHY_QUIRK_PSSR_LINK bit for this quirk. Set it if MII_EXTSR doesn't
  exist because it's one of the case of QEMU.

  Found and tested by ozaki-r.

(msaitoh)

2022-01-06 06:18:13 UTC MAIN commitmail json YAML

Properly size and array to hold the larget return from wctomb.

(blymn)

2022-01-06 00:16:47 UTC MAIN commitmail json YAML

err.h: dead once is dead enough

Per joerg's advice keep the __dead in front position as it is where
_Noreturn would go.

(uwe)

2022-01-05 20:21:29 UTC MAIN commitmail json YAML

remove DIAGNOSTIC so that function is defined for KASSERTMSG. Hope that the
compiler removes it.

(christos)

2022-01-05 19:53:32 UTC MAIN commitmail json YAML

2022-01-05 16:01:54 UTC MAIN commitmail json YAML

2022-01-05 15:25:44 UTC MAIN commitmail json YAML

Use a volative local shadow of a field in an (on-stack) non-volatile struct
that is to be referenced after a return from setjmp() via longjmp().

This doesn't ever seem to have caused a problem, but I think using
volative vars is required here.

For reasons I never bothered to discover, even though this change
certainly requires a store into stack memory which wasn't required
before, earlier measurements showed the shell getting (slightly) smaller
with this change in place.

NFCI

(kre)

2022-01-05 01:46:28 UTC MAIN commitmail json YAML

Install the missing sh syntax element in the MKDEBUGKERNEL = no test, so
that "continue" is a command as intended, and not an invalid last arg to
the '[' command (the last arg is required to be ']').

Sometime the proverbial someone should go through this and remove all the
obsolete test -o and -a operators, and probably do something with test's
usage of ! as well.  Not today, or not by me anyway.

(kre)

2022-01-04 22:10:09 UTC MAIN commitmail json YAML

s/compnent/component/

(andvar)

2022-01-04 20:01:52 UTC MAIN commitmail json YAML

exec(3): execlpe() first argument should be named "file"

"path" arguments are names used as-is, "file" arguments to "p"
functions are used to construct the pathname using $PATH if necessary.

(uwe)

2022-01-04 19:52:02 UTC MAIN commitmail json YAML

use a function "runit" to echo and execute avoiding set -x.

(christos)

2022-01-04 19:36:16 UTC MAIN commitmail json YAML

getopt_long(3): "index" is an argument, not a field.

(uwe)

2022-01-04 19:32:16 UTC MAIN commitmail json YAML

getopt_long(3): use NULL, not 0, for flag in the example.

(uwe)

2022-01-04 14:32:22 UTC MAIN commitmail json YAML

put back the nfs ramdisk kernel for emips.

(christos)

2022-01-04 10:38:05 UTC MAIN commitmail json YAML

2022-01-04 06:08:14 UTC MAIN commitmail json YAML

2022-01-04 05:55:45 UTC MAIN commitmail json YAML

2022-01-04 05:39:12 UTC MAIN commitmail json YAML

2022-01-03 17:21:13 UTC MAIN commitmail json YAML

mcommphy(4): Add driver for Motorcomm YT8511 GbE PHY.
eqos(4): Add driver for DesignWare Ethernet Quality-of-Service controller.

(jmcneill)

2022-01-03 17:19:41 UTC MAIN commitmail json YAML

2022-01-03 17:18:12 UTC MAIN commitmail json YAML

Add driver for Motorcomm YT8511 GbE PHY

(jmcneill)

2022-01-03 16:44:49 UTC MAIN commitmail json YAML

the nfs kernel is only for pmax

(christos)

2022-01-03 16:43:32 UTC MAIN commitmail json YAML

move the kernels for earmv5{,eb} in the ad.arm file so that they don't
override it

(christos)

2022-01-03 12:10:17 UTC MAIN commitmail json YAML

2022-01-03 11:44:03 UTC MAIN commitmail json YAML

Now that (semi-)manual entropy setup may happen outside of the main
install/upgrade path, we need to (re-)write the entropy seed file
afterwards - the earlier written one would not have an entropy estimate
if we get here.

(martin)

2022-01-03 08:44:11 UTC MAIN commitmail json YAML

2022-01-02 23:46:21 UTC MAIN commitmail json YAML

wsemul_vt100.c - make static everything that can be static

Externally, wsdisplay only needs wsemul_vt100_ops.  Internally (as
vt100 emulation is split into several files) wsemul_vt100_subr.c needs
wsemul_vt100_reset().

(uwe)

2022-01-02 23:10:37 UTC MAIN commitmail json YAML

2022-01-02 20:28:53 UTC MAIN commitmail json YAML

2022-01-02 20:09:03 UTC MAIN commitmail json YAML

Create empty files for the "extra" kernels. Grr I should fix this properly
(run checkflists after building the kernels)

(christos)

2022-01-02 16:42:10 UTC MAIN commitmail json YAML

2022-01-02 16:40:46 UTC MAIN commitmail json YAML

2022-01-02 16:38:36 UTC MAIN commitmail json YAML

2022-01-02 16:03:46 UTC MAIN commitmail json YAML

2022-01-02 16:03:30 UTC MAIN commitmail json YAML

fix KASSERTMSG issue

(christos)

2022-01-02 11:20:03 UTC MAIN commitmail json YAML

arm: Remove #ifdef DIAGNOSTIC now wrong after KASSERT change.

Objects in question aren't volatile here so access is flushable.

(riastradh)

2022-01-02 11:17:39 UTC MAIN commitmail json YAML

arm: No #if DIAGNOSTIC needed any more.

Compiler can (and gcc does) flush call to strlen when the result is
unused, so no performance impact here.

(riastradh)

2022-01-02 03:46:40 UTC MAIN commitmail json YAML

ptsname(3): fix equivalence example

The buffer is static, don't make it appear that we are returning a
pointer to a local variable.

(uwe)

2022-01-02 03:23:55 UTC MAIN commitmail json YAML

2022-01-02 02:57:39 UTC MAIN commitmail json YAML

make: clean up nitpicks

In ParseWord, the expressions '*p' and 'ch' are the same.

In ParseDependencyTargetWord, clean up a wordy comment and join two
conditions.

In the test cond-token-number, clarify that make doesn't convert from
hex to decimal but only from hex to internal representation.

No functional change.

(rillig)

2022-01-02 02:39:55 UTC MAIN commitmail json YAML

make: clean up parsing of makefiles

Remove redundant comments.

Rename IFile.first_lineno to forBodyLineno since it only contains a
useful value in .for loops but not in .include files.  Also clarify that
this line number is the start of the loop body, since in PrintStackTrace
this line is used as a human-readable line number.  For a .for loop in
which the loop head spans multiple lines, this line number is wrong
anyway.

No functional change.

(rillig)

2022-01-02 02:16:12 UTC MAIN commitmail json YAML

make: remove redundant IFile.fromForLoop

No functional change.

(rillig)

2022-01-02 01:54:43 UTC MAIN commitmail json YAML

make: clean up handling of .for loops and .include directives

No functional change.

(rillig)

2022-01-02 01:35:32 UTC MAIN commitmail json YAML

2022-01-02 00:12:47 UTC MAIN commitmail json YAML

make: in .for loops, pass the body to be filled as parameter

This is a preparation for cleaning up the code for loading and parsing
files, especially the part for including other files and for .for loops.

No functional change.

(rillig)

2022-01-02 00:07:20 UTC MAIN commitmail json YAML

make: fix line number in error message about open conditionals

(rillig)

2022-01-01 22:01:19 UTC MAIN commitmail json YAML

2022-01-01 21:50:29 UTC MAIN commitmail json YAML

make: remove unused parameter from Parse_PushInput

The parameter readMore was never NULL.

No functional change.

(rillig)

2022-01-01 21:41:51 UTC MAIN commitmail json YAML

make: fix error message when reading more than 1 GB from stdin

Previously, the error message was:
make: (null): file too large
Now it is:
make: (stdin): file too large

(rillig)

2022-01-01 21:19:37 UTC MAIN commitmail json YAML

make: clean up loadfile

Do not reserve extra space "just in case a makefile does not end in
'\n'" since that doesn't happen often.

The assertion for 'buf.len <= buf.cap' was redundant.

No functional change.

(rillig)

2022-01-01 21:07:14 UTC MAIN commitmail json YAML

2022-01-01 21:04:15 UTC MAIN commitmail json YAML

make: convert do-while into while in FindKeyword

GCC generates more efficient code; previously it wasn't aware that (end
- start) was always positive, thus allowing to omit the code for
dividing a negative number by 2.

No functional change.

(rillig)

2022-01-01 21:01:21 UTC MAIN commitmail json YAML

zero out the tzh structure to fix reproducibile builds.

(christos)

2022-01-01 19:53:41 UTC MAIN commitmail json YAML

make: reduce indentation in Main_SetObjdir

No functional change.

(rillig)

2022-01-01 19:44:05 UTC MAIN commitmail json YAML

make: remove redundant comments from ParseDependencySourceSpecial

(rillig)

2022-01-01 15:10:53 UTC MAIN commitmail json YAML

Always declare function used in KASSERT

(christos)

2022-01-01 15:09:01 UTC MAIN commitmail json YAML

KASSERT now always uses the expression, so don't protect with DIAGNOSTIC

(christos)

2022-01-01 13:47:20 UTC MAIN commitmail json YAML

2022-01-01 13:18:43 UTC MAIN commitmail json YAML

2022-01-01 12:00:02 UTC MAIN commitmail json YAML

s/happends/happens/ in comment.

(msaitoh)

2022-01-01 11:58:03 UTC MAIN commitmail json YAML

s/sensitve/sensitive/

(msaitoh)

2022-01-01 11:57:44 UTC MAIN commitmail json YAML

Protect KASSERT() with "#ifdef DIAGNOSTIC" as its expression is
undefined otherwise.

(hannken)

2022-01-01 11:56:15 UTC MAIN commitmail json YAML

Remove an "#ifdef DIAGNOSTIC", KASSERT() always conumes its expression.

(hannken)

2022-01-01 11:45:37 UTC MAIN commitmail json YAML

2022-01-01 10:54:21 UTC MAIN commitmail json YAML

s/aquire/acquire/ in comment.

(msaitoh)

2022-01-01 10:36:17 UTC MAIN commitmail json YAML

2022-01-01 10:32:29 UTC MAIN commitmail json YAML

2022-01-01 09:53:32 UTC MAIN commitmail json YAML

2022-01-01 08:34:35 UTC MAIN commitmail json YAML

2022-01-01 06:14:28 UTC MAIN commitmail json YAML

Welcome to 2022!

(jnemeth)

2022-01-01 03:27:53 UTC MAIN commitmail json YAML

Print Physical Layer 16.0 GT/s and Lane Margining at the Receiver extended cap.

- Decode Physical Layer 16.0 GT/s extended capability.
- Decode Lane Margining at the Receiver extended capability.
- Rename pcie_link_compliance_preset_deemphasis to
  pcie_link_preset_preshoot_deemphasis because the table is referenced from
  multiple places.
- Print "reserved" instead of "unknown" when printing equalization preset.
  One of them is known to be the default value.
- Rename PCI_EXTCAP_PYSLAY_16GT to PCI_EXTCAP_PL16G.

(msaitoh)

2022-01-01 01:15:12 UTC MAIN commitmail json YAML

more KASSERT vs. DIAGNOSTIC fallout

(macallan)

2022-01-01 01:03:50 UTC MAIN commitmail json YAML

make this compile again by moving a KASSERT into the #ifdef DIAGNOSTIC block
it depends on

(macallan)

2021-12-31 20:38:08 UTC MAIN commitmail json YAML

s/interrups/interrupts/

(andvar)

2021-12-31 20:22:49 UTC MAIN commitmail json YAML

2021-12-31 17:51:14 UTC MAIN commitmail json YAML

2021-12-31 17:22:45 UTC MAIN commitmail json YAML

drm: Reduce default debug level to driver-specific messages.

Let's make a liiiiittle less log spew by default with `boot -x'.

(riastradh)

2021-12-31 17:22:35 UTC MAIN commitmail json YAML

thinkpad(4): Omit workaround for acpiec_bus_read.

acpiec_bus_read now initializes the whole ACPI_INTEGER like its
signature suggests, so we don't need to pick out the low bits of the
result or carefully avoid undefined behaviour from uninitialized
stack garbage.

(riastradh)

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

acpiec(4): Make sure to fully initialize an ACPI_INTEGER on read.

Write as essay about what this is supposed to do, as far as I can
tell from reading acpica and the commit history and the relevant PR.

(riastradh)

2021-12-31 17:22:15 UTC MAIN commitmail json YAML

acpi(9): Return full 64-bit object to caller in PCI config read.

The value of the object will be as small as requested, but the whole
uint64_t object will be written as the caller of a space handler
expects, instead of just part of it.

(riastradh)

2021-12-31 16:43:04 UTC MAIN commitmail json YAML

2021-12-31 16:40:59 UTC MAIN commitmail json YAML

2021-12-31 16:15:58 UTC MAIN commitmail json YAML

2021-12-31 16:14:44 UTC MAIN commitmail json YAML

change CONFIG to @CONFIG@ to indicate substitution is going to happen.

(christos)

2021-12-31 15:43:35 UTC MAIN commitmail json YAML

Don't try to install netbsd-CONFIG.debug files build with kernel=

(christos)

2021-12-31 14:44:50 UTC MAIN commitmail json YAML

sysmon(9): Document lock order.

(riastradh)

2021-12-31 14:30:20 UTC MAIN commitmail json YAML

drm: Convert noisy flush_workqueue message to dtrace probe.

(riastradh)

2021-12-31 14:30:04 UTC MAIN commitmail json YAML

sysmon(9): Fix callout/thread synchronization.

Callout may ONLY take sme_work_mtx, at IPL_SOFTCLOCK; MUST NOT touch
sme_mtx at IPL_NONE.  All state the callout needs is serialized by
sme_work_mtx now:

- calls to sme_schedule_callout
- calls to sme_schedule_halt
- struct sysmon_envsys::sme_events_timeout
- struct sysmon_envsys::sme_events_list
- struct sysmon_envsys::sme_callout_state
- struct envsys_data::flags
  => yes, this is a little silly -- used for ENVSYS_FNEED_REFRESH
  => should maybe separate the static driver-defined features from
    the state flags needed by sysmon_envsys but not important now

Sleeping under sme_work_mtx (except on other adaptive locks at
IPL_SOFTCLOCK) is forbidden.  Calling out to the driver under
sme_work_mtx is forbidden.

This should properly fix:

https://mail-index.netbsd.org/tech-kern/2015/10/14/msg019511.html
PR kern/56592

(riastradh)

2021-12-31 14:29:14 UTC MAIN commitmail json YAML

sysmon(9): Fix mistake in sysmon_task_queue_barrier.

Need to allocate the task structure with malloc(9), not on the stack;
the task thread will free it with free(9).  Forgot to squash this
into previous commit.

(riastradh)

2021-12-31 14:26:29 UTC MAIN commitmail json YAML

sys/net: Document if_mcast_op with comment and refuse other commands.

Meant only for multicast addition/deletion operations, nothing else.

(riastradh)

2021-12-31 14:26:19 UTC MAIN commitmail json YAML

sys/net: Document if_flags_set with a comment.

(riastradh)

2021-12-31 14:26:09 UTC MAIN commitmail json YAML

ethersubr(9): Assert IFNET_LOCKED in ether_ioctl_reinit.

Changes to if_flags are nontrivial configuration changes that require
the long-term ioctl lock.

(riastradh)

2021-12-31 14:25:59 UTC MAIN commitmail json YAML

sys/net: Assert IFNET_LOCKED in if_ioctl, if_init, and if_stop.

Exception: Not for SIOCADDMULTI/SIOCDELMULTI, for which it is the
driver's responsibility to take internal locks.  Typically this is
already done via struct ethercom::ec_lock.

(riastradh)

2021-12-31 14:25:47 UTC MAIN commitmail json YAML

altq(9): Fix missing IFNET_LOCK around if_ioctl.

(riastradh)

2021-12-31 14:25:24 UTC MAIN commitmail json YAML

2021-12-31 14:24:51 UTC MAIN commitmail json YAML

2021-12-31 14:24:38 UTC MAIN commitmail json YAML

sys: Use if_stop wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.

(riastradh)

2021-12-31 14:24:26 UTC MAIN commitmail json YAML

sys/net: New functions if_ioctl, if_init, and if_stop.

These are wrappers, suitable for inserting appropriate kasserts
regarding the API's locking contract, for the corresponding functions
in struct ifnet.

Since these are intended to commit configuration changes to the
interface, which may involve resetting the device, the caller should
hold IFNET_LOCK.  However, I can't straightforwardly prove that all
callers do yet, so the assertion is disabled for now.

(riastradh)

2021-12-31 14:24:16 UTC MAIN commitmail json YAML

umass(4): Omit needless reference counting.

autoconf never detaches before attach has completed, so there is no
longer any need for this mechanism.

(riastradh)

2021-12-31 14:24:06 UTC MAIN commitmail json YAML

ukbd(4): Avoid races in LED setting on attach.

- Don't reuse sc_delay for LED task -- a keyboard interrupt shortly
  after attach might reset sc_delay so that the LEDs never get turned
  back off.

- Don't turn the LEDs back off after attach if something else has
  already changed them by the time the callout fires.

(And make sure to callout_halt before done this time!)

(riastradh)

2021-12-31 14:22:42 UTC MAIN commitmail json YAML

acpi(9): Fix memory ordering and completion bugs in notifiers.

1. Guarantee everything which happened before acpi_register_notify
  has also happened before the notifier is actually called.

2. On acpi_deregister_notify, don't return until the notifier is
  definitely not running any more on any CPU, using
  AcpiOsWaitEventsComplete.

(riastradh)

2021-12-31 14:22:26 UTC MAIN commitmail json YAML

acpi(9): Implement AcpiOsWaitEventsComplete.

(riastradh)

2021-12-31 14:22:11 UTC MAIN commitmail json YAML

sysmon(9): New sysmon_task_queue_barrier(pri) function.

This waits for the completion of all tasks at priority pri or lower
that are currently queued at the time of the call.

(riastradh)

2021-12-31 14:20:56 UTC MAIN commitmail json YAML

acpibat(4): Print ACPI error when _STA fails.

(riastradh)

2021-12-31 14:20:40 UTC MAIN commitmail json YAML

acpibat(4): Delete excessive blank lines.

Makes it hard to follow when there is a big gap between everything
even when there is a tight logical coupling, like setting and testing
an error code.

(riastradh)

2021-12-31 14:20:24 UTC MAIN commitmail json YAML

acpibat(4): Fix attach and detach ordering.

On attach: Don't register acpibat_resume handler with pmf or
acpibat_notify_handler with acpi until it is safe to call
acpibat_update_info and acpibat_update_status.
=> This requires the sc->sc_sensor array to be allocated, so allocate
  that first.
=> This requires sc->sc_sme to be created, so defer them to
  config_interrupts after sysmon_envsys_register.
=> Make sure to register the notify handler before initially polling
  the info and status.

On detach: Deregister pmf handler and acpi notifier before we destroy
anything.

(riastradh)

2021-12-31 14:19:57 UTC MAIN commitmail json YAML

libkern: Make KASSERT verify expression is valid if !DIAGNOSTIC.

This way it is no longer necessary to mark variables __diagused if
they are used in KASSERT conditions.

Fix fallout from this by removing now-unnecessary and `#ifdef
DIAGNOSTIC'.

Don't do the same for KDASSERT if !DEBUG -- unlike KASSERT and
DIAGNOSTIC, variables needed by KDASSERT and DEBUG are likely to be
expensive to compute (and potentially difficult for a compiler to
prove flushable), so we don't want to require them under !DEBUG.

(riastradh)

2021-12-31 13:15:00 UTC MAIN commitmail json YAML

acpi: Support DT link compat string lists

A "compatible" DSD property may either be a string, or a package of
strings. Support both variants in acpi_compatible_match.

(jmcneill)

2021-12-31 12:42:24 UTC MAIN commitmail json YAML

s/totaled/totalled/

(andvar)

2021-12-31 12:41:50 UTC MAIN commitmail json YAML

s/quetion/question/

(andvar)

2021-12-31 12:00:18 UTC MAIN commitmail json YAML

usbd_do_request_len (and friends) return usbd_status so return one in
the usbd_create_xfer failure case.  Spotted by Riastradh.

(skrll)

2021-12-31 11:05:41 UTC MAIN commitmail json YAML

2021-12-31 04:59:16 UTC MAIN commitmail json YAML

2021-12-31 01:34:45 UTC MAIN commitmail json YAML

make: sync API documentation of parse.c with latest changes

(rillig)

2021-12-31 01:08:59 UTC MAIN commitmail json YAML

make: prevent out-of-bounds pointer in AdjustVarassignOp

It's a rather theoretical case that 'name' would point at the very end
of the address space and the string there would be "V=", but in that
case, the expression 'name + 3' would wrap around.

(rillig)

2021-12-31 00:57:12 UTC MAIN commitmail json YAML

doc: Update TODO.smpnet to reflect invention of ETHER_F_ALLMULTI.

(riastradh)

2021-12-31 00:45:21 UTC MAIN commitmail json YAML

make: merge duplicate code in Parse_IsVar

No functional change.

(rillig)

2021-12-31 00:37:50 UTC MAIN commitmail json YAML

make: eliminate type VarAssignParsed

No functional change.

(rillig)

2021-12-31 00:18:06 UTC MAIN commitmail json YAML

make: unexport types VarAssignOp and VarAssign

These types are only needed in the parsing module.

No functional change.

(rillig)

2021-12-31 00:01:03 UTC MAIN commitmail json YAML

make: list VarAssignOp in the same order as in the manual page

No functional change.

(rillig)

2021-12-30 23:56:35 UTC MAIN commitmail json YAML

make: condense code in ApplyModifier_Assign

List the assignment operators in the same order as in the manual page.

No functional change.

(rillig)

2021-12-30 23:03:44 UTC MAIN commitmail json YAML

s/bandwith/bandwidth/

(andvar)

2021-12-30 18:53:35 UTC MAIN commitmail json YAML

- With DEBUG=-g (which is also set when we build CTF) we build netbsd.gdb *and*
  netbsd-${KERNEL_CONFIG}.debug because it is not worth having two sets of
  rules (one that builds just netbsd.gdb and one that builds both netbsd.gdb
  and netbsd-${KERNEL_CONFIG}.debug. This maintains compatibility building
  netbsd.gdb when DEBUG=-g
- When either MKDEBUGKERNEL=yes or MKDEBUG=tes we set DEBUG=-g if DEBUG was
  not set.
- We only make a debuginstall rule to install netbsd-${KERNEL_CONFIG}.debug
  if MKDEBUG=yes

(christos)

2021-12-30 17:25:40 UTC MAIN commitmail json YAML

forgot one KERNEL_BUILD (Tobias Nygren)

(christos)

2021-12-30 17:16:32 UTC MAIN commitmail json YAML

Use the tail of KERNEL_BUILD since it can be a full path.

(christos)

2021-12-30 16:20:19 UTC MAIN commitmail json YAML

Make fdopendir visible according to POSIX.1 spec.

(nros)

2021-12-30 15:01:56 UTC MAIN commitmail json YAML

With recent changees to debug kernel stuff from Christos we are
once again pushing the size limit.  Bump it again.

(pgoyette)

2021-12-30 14:40:06 UTC MAIN commitmail json YAML

acpiout(4): Work around firmware that doesn't like some brightnesses.

Instead of just asking for cur - 5 or cur + 5, repeatedly ask for
that increment, check whether we actually made progress in that
direction, and if not keep going with another increment, until we hit
the bounds of brightness levels.

I can't find anything in the ACPI spec about this, but my laptop
seems to have trouble with certain levels: 15, 75, 85, 95.  It goes
in all other increments of 5 from 5 to 100, just not those ones --
acts as if the change just never happened, so with the old logic the
brightness up/down would get stuck unable to move in either
direction.

This should have no impact on machines where the first increment
actually takes.

(riastradh)

2021-12-30 12:41:43 UTC netbsd-8 commitmail json YAML

2021-12-30 12:40:53 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1722):

sys/dev/cgd.c: revision 1.142

cgd(4): Fix criterion for detach when wedgies are held.

The somewhat confusingly named DK_BUSY(dksc, pmask) answers the
following question:

        Suppose I hold either the character or the block device (but
        not both) of all of the partitions in pmask.  Is anyone else
        using the disk, rendering it unsafe to detach?

This is useful for ioctls like CGDIOCCLR and VNDIOCCLR, which must be
issued on open file descriptors for the disk, so the question cannot
simply be answered by testing whether dk_openmask != 0.
Instead, DK_BUSY breaks the question into the following criteria:

        1. Are there any _other_ partitions than those in pmask open
          at all?  If so, it must be someone else, since I only hold
          partitions in pmask -- hence the disk is busy.
        2. Are any of the partitions in pmask open _both_ as a block
          device _and_ as a character device?  If so, it must be
          someone else, since I only hold _either_ the character
          _or_ the block device open but not both -- hence the disk
          is busy.

When config_detach_all runs at shutdown time, it tries to detach
cgd(4), which has DVF_DETACH_SHUTDOWN; this is important so we submit
queued writes to the underlying disk and wait for them to complete
with dk_drain.

If cgd(4) has any dk wedges with file systems mounted still
configured on it, it isn't ready to detach yet.  But asking
DK_BUSY(dksc, 1 << RAW_PART) returns false, because the dk wedges
only hold RAW_PART open as a block device -- so if nobody has
RAW_PART open as a character device, or any other partitions open,
cgd_detach blithely goes on its way to forcibly detach the wedges.

Instead, ask DK_BUSY(dksc, 0), because the caller -- cgd_detach
issued by config_detach_all -- does not, in fact, hold any partitions
open, so it doesn't need to work around them like ioctl(CGDIOCCLR)
does.  Fixes hang in zfs on dk on cgd during shutdown (and probably
also zfs on cgd without any intervening dk but I haven't tested).

(This change might have the side effect that `drvctl -d cgdN' doesn't
work, but I don't care.)

XXX pullup-9
XXX pullup-8 (...-7, -6, -5...)

(martin)

2021-12-30 12:40:08 UTC netbsd-9 commitmail json YAML

2021-12-30 12:38:22 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1398):

sys/dev/cgd.c: revision 1.142

cgd(4): Fix criterion for detach when wedgies are held.

The somewhat confusingly named DK_BUSY(dksc, pmask) answers the
following question:

        Suppose I hold either the character or the block device (but
        not both) of all of the partitions in pmask.  Is anyone else
        using the disk, rendering it unsafe to detach?

This is useful for ioctls like CGDIOCCLR and VNDIOCCLR, which must be
issued on open file descriptors for the disk, so the question cannot
simply be answered by testing whether dk_openmask != 0.
Instead, DK_BUSY breaks the question into the following criteria:

        1. Are there any _other_ partitions than those in pmask open
          at all?  If so, it must be someone else, since I only hold
          partitions in pmask -- hence the disk is busy.
        2. Are any of the partitions in pmask open _both_ as a block
          device _and_ as a character device?  If so, it must be
          someone else, since I only hold _either_ the character
          _or_ the block device open but not both -- hence the disk
          is busy.

When config_detach_all runs at shutdown time, it tries to detach
cgd(4), which has DVF_DETACH_SHUTDOWN; this is important so we submit
queued writes to the underlying disk and wait for them to complete
with dk_drain.

If cgd(4) has any dk wedges with file systems mounted still
configured on it, it isn't ready to detach yet.  But asking
DK_BUSY(dksc, 1 << RAW_PART) returns false, because the dk wedges
only hold RAW_PART open as a block device -- so if nobody has
RAW_PART open as a character device, or any other partitions open,
cgd_detach blithely goes on its way to forcibly detach the wedges.

Instead, ask DK_BUSY(dksc, 0), because the caller -- cgd_detach
issued by config_detach_all -- does not, in fact, hold any partitions
open, so it doesn't need to work around them like ioctl(CGDIOCCLR)
does.  Fixes hang in zfs on dk on cgd during shutdown (and probably
also zfs on cgd without any intervening dk but I haven't tested).

(This change might have the side effect that `drvctl -d cgdN' doesn't
work, but I don't care.)

XXX pullup-9
XXX pullup-8 (...-7, -6, -5...)

(martin)

2021-12-30 12:28:56 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1397):

sys/dev/pckbport/synaptics.c: revision 1.71

synaptics(4): New sysctl knob for debug output.

Set hw.synaptics.debug=1 to re-enable it; the compile-time DIAGNOSTIC
option was inappropriate for this.

(martin)

2021-12-30 04:57:10 UTC MAIN commitmail json YAML

remove the NEED_OWN_INSTALL_TARGET conditional for setting the install
variables, suggested by phone@

(christos)

2021-12-30 04:19:23 UTC MAIN commitmail json YAML

convert the ehci device owner ship change message to display the ehciN as well.

(mrg)

2021-12-30 03:24:50 UTC MAIN commitmail json YAML

Add ${_MKTARGET_INSTALL}

(christos)

2021-12-30 03:23:05 UTC MAIN commitmail json YAML

use ${INSTALL_FILE} so that unpriv builds work.

(christos)

2021-12-30 02:30:53 UTC MAIN commitmail json YAML

don't match the empty pattern

(christos)

2021-12-30 02:14:55 UTC MAIN commitmail json YAML

2021-12-30 01:34:26 UTC MAIN commitmail json YAML

make: remove redundant code from CondParser_ComparisonOrLeaf

No functional change.

(rillig)

2021-12-30 01:30:33 UTC MAIN commitmail json YAML

make: split ParseWord into the actual ParseWord and ParseFuncArg

Combining two similar but fundamentally different parsing tasks in a
single function only increased the complexity, of the implementation as
well as the call sites.

The code makes it obvious now that a function argument is a bare word
surrounded by parentheses.

The special case of an empty word is only needed for the function
argument, it cannot occur in a bare word.  The code for that has been
moved to the caller.  Such an empty word not only occurs for 'defined()'
but also for 'defined(${:U})'.

No functional change.

(rillig)

2021-12-30 01:06:43 UTC MAIN commitmail json YAML

make: make ParseWord in condition parser simpler

Merge the two return values (bool, string) into a single return value.
As before, the caller cannot observe the difference between a parse
error and an empty word, both are handled in the same way.

In CondParser_ComparisonOrLeaf, the word cannot be empty since the
calling function CondParser_Token already handles all cases that could
lead to an empty word.

No functional change.

(rillig)

2021-12-30 00:22:20 UTC MAIN commitmail json YAML

make: internally return false for irrelevant leaves in conditions

The result of irrelevant leaves is effectively ignored by CondParser_And
and CondParser_Or.  Use the 'doEval &&' pattern to make the code
consistent with CondParser_Comparison and CondParser_FuncCall.

No functional change.

(rillig)

2021-12-29 23:59:38 UTC MAIN commitmail json YAML

drm: Restore hw.drm2.debug sysctl knob, previously lost in merge.

(riastradh)

2021-12-29 22:22:13 UTC MAIN commitmail json YAML

2021-12-29 18:13:43 UTC MAIN commitmail json YAML

2021-12-29 16:01:58 UTC MAIN commitmail json YAML

xinitrc: delay preprocessing of COLOR in xrdb input

Revert previous and fix it properly.  #ifdef COLOR is intended to be
processed by xrdb, but the script source itself is processed by the C
preprocessor at build time.  Spell that # as XHASH to protect the
conditional.

(uwe)

2021-12-29 12:53:38 UTC MAIN commitmail json YAML

Remove duplicate KASSERT

(skrll)

2021-12-29 08:23:40 UTC MAIN commitmail json YAML

make: in irrelevant function calls in conditions, return false

When a condition contains an irrelevant function call, it doesn't matter
whether the function call evaluates to true or to false, it will be
discarded anyway by either CondParser_And or CondParser_Or.

Returning false instead of true makes the code simpler, plus it is more
common to return false for irrelevant results.

No functional change.

(rillig)

2021-12-29 08:15:45 UTC MAIN commitmail json YAML

make: use simpler return type for ParseWord in conditions

No functional change.

(rillig)

2021-12-29 07:40:53 UTC MAIN commitmail json YAML

make: replace table for function lookup in conditions with simple code

The code for looking up the function from the table forced the compiler
to use a specific memory layout.  Replacing the table with explicit code
provides the compiler more opportunities to optimize the code.  Another
side effect is that there are fewer pointer operations.

Previously, is_token checked that the character after the word does not
continue the word, this is now done separately since for the function
lookup, this check was unnecessary.  The newly added skip_string
provides a higher abstraction level, it is no longer necessary to pass
the string length as a separate, redundant parameter.

No functional change.

(rillig)

2021-12-29 05:16:44 UTC MAIN commitmail json YAML

make: clean up condition parser

No functional change.

(rillig)

2021-12-29 05:05:21 UTC MAIN commitmail json YAML

make: merge duplicate types CondEvalResult and CondResult

No binary change.

(rillig)

2021-12-29 05:01:35 UTC MAIN commitmail json YAML

make: merge duplicate enum constants for CondEvalResult and CondResult

No binary change.

(rillig)

2021-12-29 04:50:56 UTC MAIN commitmail json YAML

make: remove redundant parameter for evaluating conditions

No functional change.

(rillig)

2021-12-29 04:41:38 UTC MAIN commitmail json YAML

make: merge types CondResult and CondEvalResult

No functional change.

(rillig)

2021-12-28 22:59:56 UTC MAIN commitmail json YAML

lint: do not output "Lint pass2:"

A colon at the end of a line requires at least 1 follow-up line, but
xlint cannot know whether lint2 will find anything to complain about.
Having a colon followed by nothing creates unnecessary confusion.

(rillig)

2021-12-28 22:54:08 UTC MAIN commitmail json YAML

tests/lint: extend documentation for omitted braces in initializer

(rillig)

2021-12-28 22:13:56 UTC MAIN commitmail json YAML

2021-12-28 21:56:13 UTC MAIN commitmail json YAML

make: fix double-free in CLEANUP mode (since 2021.12.27.23.11.55)

When make is run without the '-f' option, it searches for the files
'makefile' and 'Makefile' in the current directory.  The function
ReadFirstDefaultMakefile allocated memory for these filenames, added the
filenames to opts.makefiles and then freed the memory.  From that
moment, opts.makefiles contained dangling pointers.

The function main_CleanUp cleans the list, but only if make is compiled
with -DCLEANUP.  Since main.c 1.557 from 2021.12.27.23.11.55, the
strings in opts.makefiles are freed as well, before that, only the list
nodes were freed.  Freeing the strings led to the double-free.

Fix this bug by using a separate list for these short-lived strings.  At
the point where ReadFirstDefaultMakefile is called, opts.makefiles is
not used anymore, therefore there are no side effects.

To reproduce, run 'make test-coverage', which compiles with -DCLEANUP.
The test opt-chdir failed with a segmentation fault in main_Cleanup.
This test may be the only one that doesn't use the option '-f'.

(rillig)

2021-12-28 19:43:43 UTC MAIN commitmail json YAML

make: rename and constify SkipExtraTargets

No binary change.

(rillig)

2021-12-28 19:41:01 UTC MAIN commitmail json YAML

make: clean up function names in parse.c, remove redundant comments

No functional change.

(rillig)

2021-12-28 19:22:58 UTC MAIN commitmail json YAML

Open with non-blocking I/O and then reset the flags to avoid blocking for
FIFOs. This is a lot easier to do than adding another stat(2) to avoid open(2).

(christos)

2021-12-28 19:13:40 UTC MAIN commitmail json YAML

make: extract the non-parsing part from ParseDependencyTargets

No functional change.

(rillig)

2021-12-28 19:01:36 UTC MAIN commitmail json YAML

make: clean up ParseDependency

No functional change.

(rillig)

2021-12-28 17:58:41 UTC MAIN commitmail json YAML

make: remove redundant variable in ParseDependencyTargets

The idea of that variable was to work on constant strings as far as
possible.  For now it just blew up the code unnecessarily.

No binary change.

(rillig)

2021-12-28 17:51:23 UTC MAIN commitmail json YAML

zfs: Expose hostid to zfs, as in gethostid/sethostid(3).

If set to nonzero, the hostid is recorded in the metadata of a zpool,
and checked by `zpool import' when the pool has not been explicitly
exported.  After reboot, zpool import will not need `-f' to reimport
the pool.

Setting the hostid must be done explicitly through sysctl (or the
sethostid(3) library call) on all ports except acorn32, amiga,
mvme68k, newsmips, sparc, sparc64, sun2, and sun3.  So for most users
this change will have no immediate effect.  But you can obviate the
need for `zpool import -f' by adding `kern.hostid=123456789' to
/etc/sysctl.conf and importing the pool one last time with `-f'.

(riastradh)

2021-12-28 17:45:56 UTC MAIN commitmail json YAML

make: remove redundant parameter from ParseDependencyTargets

No functional change.

(rillig)

2021-12-28 17:39:04 UTC MAIN commitmail json YAML

make: remove redundant parameters in dependency parsing functions

Before 2020, there had been a huge function for parsing a dependency
line, with lots of local variables that were reused for different
purposes.  When that function was split up into smaller functions, that
was done mechanically, without eliminating redundant variables.

No functional change.

(rillig)

2021-12-28 17:30:11 UTC MAIN commitmail json YAML

make: remove redundant comments from ParseDependencyTargets

The large comment is already explained in the archive module.

(rillig)

2021-12-28 17:06:05 UTC MAIN commitmail json YAML

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

2021-12-28 17:05:23 UTC MAIN commitmail json YAML

2021-12-28 17:04:18 UTC MAIN commitmail json YAML

Commit a Makefile with tools support

(christos)

2021-12-28 16:59:09 UTC MAIN commitmail json YAML

make: reduce scope of the list of wildcard target names

The list is only used when a single target name is parsed, in case the
name contains wildcards.  There is no need to keep it any longer or
reuse it.

Clean up outdated and redundant comments.

No functional change.

(rillig)

2021-12-28 16:35:43 UTC MAIN commitmail json YAML

make: make ParseIsEscape simpler

No functional change.

(rillig)

2021-12-28 16:17:54 UTC MAIN commitmail json YAML

make: rename functions for handling dependency lines

The prefix 'Parse' was ambiguous since it was both the module name and a
verb.  Rename those functions that don't actually parse anything.

No functional change.

(rillig)

2021-12-28 16:11:01 UTC MAIN commitmail json YAML

make: make debug logging for .ORDER more human-friendly

The interesting part of the .ORDER constraint is what is made before
what, so reveal this information in the debug log.

The debug output from the test looks a bit strange since it forces
'three' to be made before 'one', but that's because the test exercises
the edge case of introducing a circular dependency.

(rillig)

2021-12-28 16:06:57 UTC MAIN commitmail json YAML

kern.hashstat takes too long and it is meaningless here.

(christos)

2021-12-28 15:49:00 UTC MAIN commitmail json YAML

make: make debug logging a bit more human-friendly

The previous log format "ParseReadLine (%d): '%s'" focused on the
implementation, it was not immediately obvious to a casual reader that
the number in parentheses was the line number.  Additionally, having
both a colon and quotes in a log message is uncommon.  The quotes have
been added in parse.c 1.127 from 2007-01-01.

The new log format "Parsing line %d: %s" is meant to be easier readable
by humans.  The quotes are not needed since ParseReadLine always strips
trailing whitespace, leaving no room for ambiguities.  The other log
messages follow common punctuation rules, which makes the beginning of
the line equally unambiguous.  Before var.c 1.911 from 2021-04-05,
variable assignments were logged with the format "%s:%s = %s", without a
space after the colon.

(rillig)

2021-12-28 15:03:10 UTC MAIN commitmail json YAML

make: clean up variable names for parsing dependency lines

Rename 'spec' to 'special', for consistency with the previous commits.

Rename 'tOp' to 'targetAttr' since it is not an dependency operator like
':', it's an attribute like '.SILENT'.

No binary change, except for the line number of the assertion in line
1618.

(rillig)

2021-12-28 14:59:02 UTC MAIN commitmail json YAML

PR/56584: Andreas Gustafsson: Skip FIFO's when -D

(christos)

2021-12-28 14:22:51 UTC MAIN commitmail json YAML

make: do not treat .USEBEFORE as candidate for the main target

A .USE target is not a candidate, so .USEBEFORE shouldn't either.

Since make.h 1.36 from 2001-07-03.  In that commit, OP_USEBEFORE should
have been added to OP_NOTARGET.

(rillig)

2021-12-28 14:06:43 UTC MAIN commitmail json YAML

make: extract OP_NOTARGET into separate function

No binary change, except for line numbers in assertions.

(rillig)

2021-12-28 13:41:12 UTC MAIN commitmail json YAML

acpi: sdhc: Ignore clkbase register if clock-frequency property is present

(jmcneill)

2021-12-28 13:28:24 UTC MAIN commitmail json YAML

kern: Show relevant variables for uidinfo counts in kasserts.

(riastradh)

2021-12-28 13:27:32 UTC MAIN commitmail json YAML

wd(4): Fix bugs in softbadsect handling.

- Don't copyout kernel virtual addresses (of SLIST entries) that
  userland won't use anyway.
  => The structure still has space for this pointer; it's just always
    null when userland gets it now.

- Don't copyout under a lock.

- Stop and return error if copyout fails (unless we've already copied
  some out).

- Don't kmem_free under a lock.

XXX Unclear whether anyone actually uses WD_SOFTBADSECT or why --
it's always been disabled by default.  Maybe we should just remove
it?

(riastradh)

2021-12-28 13:22:43 UTC MAIN commitmail json YAML

sys: Use preempt_point and preempt_needed, not open-coded versions.

(riastradh)

2021-12-28 12:00:48 UTC MAIN commitmail json YAML

mii(9): Fix callout race between mii_phy_down and mii_phy_detach.

(riastradh)

2021-12-28 11:48:52 UTC MAIN commitmail json YAML

COLOR is not a C preprocessor macro :|

(nia)

2021-12-28 10:47:00 UTC MAIN commitmail json YAML

2021-12-28 09:19:02 UTC MAIN commitmail json YAML

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

Decode link control2's Compliance Preset/De-emphasis more. Fix typo.

(msaitoh)

2021-12-28 06:36:30 UTC MAIN commitmail json YAML

Reduce the access of the ESSR register.

- makphyattach() have a code to detect the Fiber/Copper auto selection
  feature. Save the info to sc_flags to reduce the access
  to the ESSR register. One of the reason is that the register is not
  implemented on QEMU. Another reason is that it's not required to
  access the register if the device is in the copper only mode.

(msaitoh)

2021-12-28 06:35:37 UTC MAIN commitmail json YAML

QEMU e1000's PHY code doesn't implement register 16. Do workaround.

- Marvell 88E1[01]11 (and many other Marvell PHYs) have the Fiber/Copper
  auto selection feature. Our makphy(4) implement it but QEMU doesn't.
  If it fails, a garbage data is used in the attach function and unexpected
  media may be used. Fix this behavior by checking the return value of
  PHY_READ(MAKPHY_ESSR). If the access failed, the media is regarded
  as copper only. It's just a cosmetic change. It's not affected to the
  packet processing.

(msaitoh)

2021-12-28 06:34:40 UTC MAIN commitmail json YAML

QEMU e1000's PHY code doesn't implement page 0 register 15. Do workaround.

- The BMSR register bit 8 (BMSR_EXTSTAT) denote the existence of page 0
  register 15. qemu's e1000 sets BMSR_EXTSTAT but the access to register 15
  fails. It doesn't conforms to the IEEE standard. Our makphy automatically
  check the existence of 1000BASE-T or 1000BASE-SX by accessing the register
  15. If the access failed, neither 1000BASE-T nor 1000BASE-SX is set to
  the ability(mii_extcapabilities). Set EXTSR_1000TFDX and EXTSR_1000THDX
  if the access failed in the attach function. It's just a cosmetic change.
  It's not affected to the packet processing.

(msaitoh)

2021-12-28 01:27:37 UTC MAIN commitmail json YAML

make: remove redundant local variable

The variable name 'end' suggested pointing to the end of the string, but
instead it pointed to the last possible starting position of the word to
be searched.  Remove this possible misunderstanding.

No functional change.

(rillig)

2021-12-28 01:20:24 UTC MAIN commitmail json YAML

make: clean up stylistically

No binary change.

(rillig)