Skip to content

Fix indentation in linux_open_ctty - #69

Open
henriquebritoM wants to merge 10000 commits into
NetBSD:trunkfrom
henriquebritoM:refactoring-compat-linux
Open

Fix indentation in linux_open_ctty#69
henriquebritoM wants to merge 10000 commits into
NetBSD:trunkfrom
henriquebritoM:refactoring-compat-linux

Conversation

@henriquebritoM

Copy link
Copy Markdown

Fixed out-of-style indentation to match the codebase and improve readability.

Changes are only aesthetic, no logic changes were made.

dhgutteridge and others added 30 commits January 30, 2026 23:51
Borrow the equivalent change from if_ure.c (r. 1.33). These re(4)
devices otherwise end up with an all zero MAC. Found (at least) on the
NanoPi R4S (non-"Enterprise" version, the other being distinguished by
including an EEPROM to set a consistent MAC address).

(Given this code is in two places now, it may make more sense to
centralize this if it grows any further.)
(Evidently there are several NIC drivers that have variations of the
"randomly generate a MAC address" approach already.)
This is useful for getting graphics on qemu-system-aarch64 without
firmware runtime video support (e.g. using the -kernel option). At the
moment it is only wired up for -device VGA and -device secondary-vga
so that it doesn't conflict with viogpu.

PR kern/59410
Heavily inspired by radeonfb(4).
PR lib/59953 by Artem Bunichev
PR kern/58378: Kernel error code origination lacks dtrace probes
1. Verify, don't just assert, that the packet length is below the
   buffer size.  Even if all the callers enforce the interface's MTU,
   I can't prove that the usbnet(9) tx buffer size is an upper bound
   enforced on the interface's MTU.

   We can remove the check later if we do enforce that upper bound at
   some point, which would probably be worth doing anyway since the
   MTU is checked earlier in the tx path.

2. Assert, don't check, that c->unc_xfer is nonnull.  We can only
   reach the tx path if we cross if_init=usbnet_init_rx_tx, and that
   (via usbnet_tx_list_init) is guaranteed to fail and back out
   unless all of the usbnet_chain unc_xfers get initialized.

3. If we can't fit the packet into a buffer, drop it -- don't leave
   it in the queue to try again when it still won't fit in the
   buffer.

4. If the transfer for this packet fails, drop it -- don't leave it
   in the queue to try again just in case it might work better the
   next time.

PR kern/59940: usbnet(9): uno_tx_prepare buffer overrun audit
PR kern/59943: usbnet(9) keeps failed packet in queue to retry indefinitely
This avoids the situation where another master gets the bus between our
register select (i.e. write) and the following read.
Add a delay after accessing our registers for the PIC implementation
of the PCF8584 (e.g. on the Sun Ultra 45).
Change swapregs to flags to handle multiple quirks and set the flags
appropriately in the Ebus frontend.
Switch the imx23-olinuxino over to device trees; remove the old non-devicetree implementation.
The current implementation relies on all register accesses being done 1)
before interrupts are enabled and secondaries have been started, or 2)
with KERNEL_LOCK held.

This change makes the driver switch from indirect accesses via the
Latte block to direct accesses through the GX frame at 0xc2000000 once
the FB driver attaches, removing the need for all register accesses to be
serialized.
When running make -dFlog, the stack trace was printed to stderr twice,
instead of once to log and once to stderr.
Previously took ~2.5sec on my laptop, now 0.03sec.

Previously took ~10sec on a wiiu, now ~0.5sec.

Output is meant to be byte-for-byte identical, except possibly in
cases that could have screwed up ctwm by quoting shenanigans which
are now escaped.  (I hope the escape sequences work, didn't actually
check how ctwm interprets them.)  Can maybe support Exec line with
`"' in them by deleting some code (marked XXX) but I didn't test that
it actually works that way.

PR bin/59958: ctwm: long delay during ctwm_app_menu
kre and others added 24 commits February 17, 2026 05:08
This is an attempt to fix 2/3 of the NetBSD builds (50 of 75) which are
all failing the same way, and the only way I can make any sense of the
compiler's error message, would be if the function names were exceeding
a limit for the length withing which they are required to be distinct.

That is, this code had makequietsignalling() makequietsignallingf() and
makequietsignallingl() and gcc is complaining that the parameters to
makequietsignalling() are of incorrect types, and then showing what is
very clearly a call to makequietsignallingl() for which the parame are
the correct types.

So, make those names shorter, and with any luck, this will all build
and work.   (It builds on amd64, but that was one of the 25 where it
did with the long names, do that's little help.)

Feel free to revert this if it doesn't work!
The issue seems to be the

	#define makequietsignallingl makequietsignalling

which happens when ! defined(__HAVE_LONG_DOUBLE)

That worked before as

	long double f = makequietsignalling(...);

(effectively) just did a type conversion from double to long double
(which might be a no-op, but is still a type conversion) and so was
OK.

But the new method

	makequietsignalling(&ldvar, ...)

doesn't work as a pointer to a long double is not the same as pointer
to a double, even if the types happen to be implemented identically.

So instead of the #define instead try implementing makequietsignallingl()
by having it simply call makequietsignalling() and then allowing the
compiler to a (hopefully benign) type conversion of the result from
double to long double, and then store that via the pointer passed in.

Once again feel free to revert this and fix the issue some other way.
In a typical

  -x   The -x option is used to cause swapctl to frob.

description the relevant bits of information are 1) "-x" and 2)
"frob", so just make it say:

  -x   Frob.

The pleonastic repetitions just get in the way.  The effect is
cumulative and by the second page it makes you want to bang your head
against the wall and not in a good way.
In particular, there is no need to say "using the swapctl(2)
system call", the SEE ALSO to that page should make that clear
enough to anyone who actually cares, which is not required of
a user of swapctl(8).

Minor other changes (a few grammar cleanups), and one new
BUGS entry added (should have been there for ages now).
While there, also link to a acpi(4) and pv(4) from virtio_mmio(4).

"Good catch" iMil@
Use formatbits(&f) rather than formatbits(f).  This serves two
purposes:

1. Type-checking.

   Can't accidentally pass a double where a float is needed -- a bug
   that previously appeared a few times in this code.

2. Reducing the chance that the data will pass through floating-point
   load/store instructions on x87.

   Floating-point load of binary32 (float) or binary64 (double)
   converts to x87 80-bit extended precision format internally, which
   preserves all floating-point _numbers_ and _infinities_ but has
   the side effect of changing signalling NaN to quiet NaN (and
   raising FE_INVALID).  This means that signalling NaNs were getting
   wrongly printed _as if_ they were quiet NaNs, which is frustrating
   for diagnostics!

   This change doesn't guarantee floating-point load instructions are
   prevented, but for the moment it seems to avoid them.
PR lib/60015: x87 makes testing signalling NaN difficult
OpenBSD removed it back in 2010.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.