sys/arch/x86/x86/pmap.c: revision 1.414
return after calling xen_pagezero(), don't fall back to the legacy
pmap_zero_page() method.
This should only affect performances.
usr.sbin/quotaon/quotaon.c: revision 1.31
lib/libquota/quota_oldfiles.c: revision 1.10
sys/ufs/ufs/ufs_quota1.c: revision 1.25
Fix default quota file names, both user and group quota used the
same default name "QUOTAFILENAME, names[USRQUOTA])" resulting in
diagnostic assertion and possibly corrupted quota data.
Keep flag "UFS_QUOTA" set until the last quota is closed.
Prevents a live lock when dqrele() finds a struct with "dq_cnt == 1"
and flag "DQ_MOD" and cannot sync as flag UFS_QUOTA is unset.
As the quota type comes from the kernel and is only valid when
quota is on get the type before quota_off and after quota_on.
sys/fs/udf/udf_allocation.c: revision 1.46
Revere modification of initializer; it can lead to race conditions where two
allocation would pick the `empty' space causing a panic later on.
sys/dev/ata/ata.c: revision 1.167
Avoid an unaccounted extra channel freeze, if a reset is requested
more than once before the thread services the request. Closes PR#56745.
requested by reinoud in ticket #1432:
sys/fs/udf/udf_vfsops.c: revision 1.83
sys/fs/udf/udf_allocation.c: revision 1.45
sys/fs/udf/udf_subr.c: revision 1.160
sys/fs/udf/udf_subr.c: revision 1.161
While searching the VAT on recordable media, search the last sector too!
This fixes Win10 formatted discs from being mounted incorrectly.
Make sysctl udf.verbose dependent on UDF_DEBUG instead of DEBUG
Fix serious issue with recordable media formatted with Win10. When closing it
after modification the VAT was written out corrupted making the disc
unreadable anymore on remount. Thanks for ig@ for spotting it in the wild!
On freeing a virtual address in the VAT, use the correct value; this might
confuse other implementations who can reject the VAT on this.
sys/fs/udf/udf_strat_sequential.c: revision 1.16
sys/fs/udf/udf_subr.c: revision 1.167
On switching from writing to reading explicitly synchronize the caches. It
isn't strictly needed but some devices in the wild will otherwise bluntly
ignore all reading commands resulting in a kernel and device lockup.
For bug-compatibility with Windows, the last VAT sector must be a multiple of
16/32 from the start of the track. To allow for scratches, write out at least
a 32 pieces.
sys/dev/usb/uhidev.c: revision 1.82
Do not explicitly set the HID Report Protocol upon attach, some devices
don't like it and should be in Report Protocol after enumeration/reset
anyway.
May address PR kern/55019.
sys/dev/ata/ata_recovery.c: revision 1.3
sys/dev/ata/ata_subr.c: revision 1.9
stop xfer timeouts during recovery, all xfers will be requeued anyway
this avoids race with the timeout routine when processing the xfers
for requeueing
should fix PR kern/54790 by Izumi Tsutsui
sys/dev/pci/ixgbe/ix_txrx.c 1.95
sys/dev/pci/ixgbe/ixgbe.c 1.305 via patch
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.19
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.15-1.16
sys/dev/pci/ixgbe/ixv.c 1.178 via patch
Use atomic_{load,store}_relaxed() for event counters.
sys/dev/pci/ixgbe/ixgbe.c 1.264,1.269,1.272,
1.306 via patch
Four INTx related fixes:
- Fix a bug that the all interrupt sources are enabled when the
interface is UP and the INTx line is shared with other devices.
- Fix a bug that it might incorrectly enable interrupt when
IFF_RUNNING is not set.
- Don't process TX/RX if a queue interrupt isn't occurred.
- Increment legacy interrupt counter after checking INTx sharing.
sys/arch/x86/x86/procfs_machdep.c: revision 1.43
sys/arch/x86/x86/procfs_machdep.c: revision 1.44
Update for cpuid flags:
- The table 11 was changed from CPUID 0x0f leaf 0 %edx to a Linux mapping.
- The table 12 was changed from CPUID 0x0f leaf 1 %edx to CPUID 0x07 leaf 1
%edx. Print avx_vnni and avx512_bf16.
- Print cppc, enqcmd and arch_lbr.
- Modify linux mapping. No used on NetBSD.
Fix procfs_machdep.c rev. 1.143. Print CPUID 0x00000007:1 %eax correctly.
in ticket #1417:
sys/arch/x86/include/specialreg.h 1.179-1.188
- Add CPUID definitions of Last Branch Record, Thread Director,
AVX version of VNNI, Fast short REP MOV, HRESET, PPIN, Architectural
LBR, Linear Address Masking and Hybrid Information from the latest
Intel SDM.
- Add CPUID definitions of AddrMaskExt, INT_WBINVD, IbrsSameMode,
EferLmsleUnsupported, PSFD and SecureTSC from AMD APM.
- Print CLFSH instead of CLFLUSH because both Intel and AMD documents
say so.
- Modify comment. Add comment. Fix typo. Use __BIT(). KNF. Sort lines.
No functional change.
sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.19
sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.31
sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.23
sys/dev/pci/ixgbe/if_sriov.c: revision 1.17
sys/dev/pci/ixgbe/ixv.c: revision 1.172
sys/dev/pci/ixgbe/ixv.c: revision 1.173
sys/dev/pci/ixgbe/ixgbe.c: revision 1.301
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.55
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.29
sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.16
sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.17
sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.18
Add code to support API version 1.5. No functional change.
- This change adds almost all code to support API 1.5 except real negotiation
and upgrade mailbox functions.
- From ix-3.3.18, ix-3.3.22 and ixv-1.5.24.
Enable mailbox API 1.5 support. Tested on ESXi with ixgben 1.10.3.0.
Don't clear mailbox related counters in ixgbe_upgrade_mbx_params_vf().
Don't clear mailbox related counters in ixgbe_upgrade_mbx_params_pf().
sys/dev/usb/usbnet.c: revision 1.44 (via patch)
usbnet: Defer hardware multicast filter updates to USB task.
Breaks deadlock:
- usbnet_detach holds usbnet lock, awaits kpause in ure_reset
- callout holds softclock `lock' (sequential softints, blocks kpause
wakeup), awaits softnet_lock in tcp_timer_keep, frag6_fasttimo, &c.
- soclose holds softnet_lock, awaits usbnet lock in SIOCDELMULTI
This change breaks the deadlock by not passing the SIOCADDMULTI or
SIOCDELMULTI ioctl synchronously to the driver, which typically takes
the usbnet lock.
With this change, the ethernet layer still maintains the list of
multicast addresses synchronously, but we defer the driver logic that
updates the hardware multicast filter to an asynchronous USB task
without softnet_lock held.
This doesn't cause exactly the same ioctl to be sent to the driver --
usbnet just sends SIOCDELMULTI with an all-zero struct ifreq, and
might drop some ioctls if issued in quick succession. This is OK
because none of the drivers actually distinguish between SIOCADDMULTI
and SIOCDELMULTI, or examine the argument; the drivers just commit
whatever multicast addresses are listed in the ethercom.
Other than the different ioctl submitted, there is no change to the
ABI or locking scheme of usbnet, so this is safe to pull up to
netbsd-9. This means we unfortunately can't guarantee that if a
process issues SIOCADDMULTI and then sendto, the multicast filter
update will be done by the time of the sendto -- and, more
importantly, the packets received in reply to it. But failing to
guarantee that is better than deadlocking! Later changes on HEAD
will restore the synchronous multicast filter updates with much more
extensive ABI changes and API simplifications in usbnet(9).
Proposed on tech-net:
https://mail-index.netbsd.org/tech-net/2021/12/30/msg008164.html
XXX pullup-9
sys/dev/pci/pci_subr.c 1.232-1.239 via patch
sys/dev/pci/pcireg.h 1.62-1.63
- Decode link control2's Compliance Preset/De-emphasis more.
- Decode Physical Layer 16.0 GT/s extended capability.
- Decode Lane Margining at the Receiver extended capability.
- Print "reserved" instead of "unknown" when printing equalization
preset. One of them is known to be the default value.
- Fix typo.
sys/net/ppp_tty.c: revision 1.68
sys/net/ppp_tty.c: revision 1.69
Use unsigned to avoid undefined behavior in pppasyncstart().
Use unsigned to avoid undefined behavior. Found by kUBSan.
in ticket #1410:
sys/dev/mii/makphy.c 1.67,1.69-1.72
sys/dev/mii/makphyvar.h 1.3-1.4
- Add I347-AT4 support.
- Add three workarounds for QEMU e1000:
- QEMU sets BMSR_EXTSTAT but the access to register 15 fails.
Set EXTSR_1000TFDX and EXTSR_1000THDX if the access failed in the
attach function. It's just a cosmetic change.
- Marvell 88E1[01]11 have the Fiber/Copper auto selection feature,
but QEMU doesn't implement it. If the register access failed,
the media is regarded as copper only. It's just a cosmetic change.
- QEMU provides the PHY specific status register at 0x11 but the
link indication bit (PSSR_LINK) is always 1. 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.
- Reduce the number of 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.
sys/dev/mii/igphy.c: revision 1.37
sys/dev/mii/ihphy.c: revision 1.19
sys/dev/mii/makphy.c: revision 1.68
Fix a bug that "ifconfig xx0 media none" set LINK_STATE_UNKNOWN instead of
LINK_STATE_DOWN.
XXX We should check for other PHY drivers, too.
sys/dev/acpi/acpi_display.c: revision 1.21
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.
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...)
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.
usr.sbin/cpuctl/arch/i386.c 1.118-1.119, 1.121-1.122
usr.sbin/cpuctl/arch/cpuctl_i386.h 1.6
sys/arch/x86/x86/identcpu_subr.c 1.8-1.9
sys/arch/x86/x86/identcpu.c 1.123
sys/arch/x86/include/cacheinfo.h 1.30
sys/arch/x86/include/cpu.h 1.132
- Fix a bug that some TLB related lines were not printed.
- Fix a bug that STLB is printed as DTLB.
- If a TLB is variable sized, print the max size instead of error message.
- Cosmetic changes to improve readability.
sys/dev/raidframe/rf_diskqueue.c: revision 1.63 (patch)
call buf_destroy() after buf_init(). hopefully fixes the lockdebug
problem shown here:
http://mail-index.netbsd.org/tech-kern/2021/12/10/msg027851.html
but seems unlikely to fix the original problem.
tested on i386/anita. ok oster@
XXX: pullup-9 (netbsd-8 uses old APIs.)
sys/dev/ipmi.c: revision 1.6
sys/dev/ipmi.c: revision 1.7
sys/dev/ipmi.c: revision 1.8
sys/dev/ipmi.c: revision 1.9
Fail open when ipmi device was found.
Clear sc_envsys on failure to prevent double-free.
ipmi(4): Use config_pending_incr/decr.
Don't abuse autoconf's private (and incoherent) dv_flags.
ipmi(4): Notify config_pending_decr when ready, not when dying.
Should fix hang at boot.
ipmi(4): Tidy up ipmi_thread a little.
- Join on detach -- don't free anything until thread has exited; thread
may still be using stuff.
- Nix dead error branch -- malloc(M_WAITOK) cannot fail.
- x = malloc(sizeof(x[0]) * n), not x = malloc(sizeof(type_t) * n)
sys/arch/x86/x86/identcpu.c: revision 1.103
sys/arch/x86/x86/identcpu.c: revision 1.104
sys/arch/x86/x86/identcpu.c: revision 1.105
Add EX2 for Vortex86 SoCs (Andrius V)
use __arraycount, and fix comparison
flip the comparison again
sys/dev/usb/ehci.c: revision 1.287
ehci: Replace bogus polling during suspend by taking bus lock.
The system is not at high IPL or limited to a single CPU at this
point; it is running essentially normally, just with some devices
suspended. Other threads might be trying to touch EHCI registers,
which might have bad outcomes while we're suspending stuff. Enabling
polling only makes sense if there is a single thread and single CPU
running, such as when we enter ddb on crash.
sys/dev/pci/pcireg.h 1.152-1.154, 1.156-1.161
sys/dev/pci/pci_subr.c 1.222, 1.227-1.232 via patch
sys/dev/pci/nvme_pci.c 1.31
sys/dev/pci/pci.c 1.158, 1.163
sys/dev/pci/ppb.c 1.74
- When parsing Enhanced Allocation entries, use the correct calculation
for finding the next entry.
- Add 32.0GT/s to the list of pcie speeds (PCIe 5.x.).
- Add Some PCI config information:
- Lane Margining at the Receiver
- NVME admin interface
- UFSHCI
- InfiniBand
- Host fabric
- HDA 1.0 with vendor ext
- USB4 HCI
- MIPI I3C
- Cellular controller/modem (+ Ethernet)
- Change PCI_VENDOR_MASK and PCI_PRODUCT_MASK to unsigned values, to
prevent sign extension of product ID when shifted up into place in
PCI_ID_CODE(). Fixes PR kern/56176.
- Add LCAP & LCAP2 definitions.
- Use PCI-SIG official acronyms for some macros.
- Fix typo in some messages.
- Fix typo in comments.
- Whitespace fixes.
in ticket #1383:
sys/dev/sdmmc/sdhc.c 1.110, 1.112
sys/dev/sdmmc/sdmmc_mem.c 1.74
sys/dev/pci/sdhc_pci.c 1.18
- Support 64bit BAR.
- Use unsigned to avoid undefined behavior in hwrite[12]() and
sdmmc_mem_sd_switch().
- Fix typo in comment.
sys/dev/pci/ichsmb.c 1.69, 1.71, 1.73-1.75 via patch
- Add Intel 400, 495, and 500 series support.
- Add Intel Jasper Lake and Elkhart Lake support.
- Ignore the SMBALERT# interrupt. Same as other OSes.
usr.sbin/cpuctl/arch/i386.c: revision 1.123
sys/arch/x86/x86/cpu_topology.c: revision 1.20
decode SMT parts for AMD family >= 0x17, not just 0x17.
now zen3 systems are properly identified by cpu topology for the
scheduler and cpuctl identify.
sys/dev/pci/ixgbe/ixgbe.h 1.81-1.83
sys/dev/pci/ixgbe/ixgbe.c 1.291-1.292 via patch
sys/dev/pci/ixgbe/ixgbe_type.h 1.50
sys/dev/pci/ixgbe/ixv.c 1.167-1.168 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.94
- Fix a bug that a near 64KB TSO segment can't send.
- Reduce bus_dmamap_sync() cost.
- Use macro. Fix typos in comment.
sys/dev/pci/if_wm.c 1.716-1.718 via patch
sys/dev/pci/if_wmreg.h 1.121
sys/dev/mii/ihphy.c 1.20
- Fix a bug that device timeout still happens when the link is down
on ICH/PCH. Fixes PR kern/56478.
- Add some sysctl info for debugging.
- ihphy(4): Don't power down the PHY when the interface goes down.
- Use macro. Fix comment.
sys/conf/files: revision 1.1288
sys/kern/uipc_mbuf.c: revision 1.244
share/man/man4/options.4: revision 1.520
Fix a bug that NMBCLUSTERS(kern.mbuf.nmbclusters) can't be changed by sysctl.
Update the description of the NMBCLUSTERS. Add NMBCLUSTERS_MAX.
defparam NMBCLUSTERS_MAX.
share/man/man4/wm.4 1.42
sys/dev/pci/files.pci 1.434
sys/dev/pci/if_wm.c 1.690,1.692-1.693,1.697-1.704,
1.706-1.715 via patch
- Add missing drain for pcq in wm_stop_locked().
- Add support for I219V 15-19 and I219LM 16-19.
- Fix Tx stall.
- Use wm_flush_desc_rings() workaround more on I219.
- Change DMA physical address in wm_flush_desc_rings() to match other
OSes.
- Check return value correctly in wm_lv_jumbo_workaround_ich8lan().
- Add new sysctl hw.wmN.debug_flags. This sysctl can be used if
WM_DEBUG is set.
- Add some sysctl values for debugging TX/RX queues.
- Use atomic_{load,store}_relaxed for evcnt 64 bit counter.
- WM_EVENT_COUNTER is enabled by default on 64 bit architectures.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxq->rxq_ptr updating.
- Stop legacy interrupts before calling softint.
- Disable printf()s in wm_flush_desc_rings() because the code is
verified.
- Print I219's version number.
- Uniform INTx/MSI handler's Tx/Rx behavior to MSI-X's one.
- Fix return value of interrupt handler.
- Only print an error about missing I/O BARs for chips that need it.
- Do not return a void value from a void function.
- Fix comment.
- Whitespace fixes. No functional change.
sys/dev/raidframe/rf_netbsd.h: revision 1.36 (via patch)
sys/dev/raidframe/rf_diskqueue.c: revision 1.58
sys/dev/raidframe/rf_diskqueue.c: revision 1.59
remove unnnecessary splbio() in rf_FreeDiskQueueData()
getiobuf() can return NULL if there are no IO buffers available.
RAIDframe can't deal with that, so create a dedicated pool of buffers
to use for IO. PR_WAITOK is fine here, as we pre-allocate more than
we need to guarantee IO can make progress. Tuning of pool still to
come.
sys/arch/amiga/dev/amidisplaycc.c: revision 1.33
share/man/man4/man4.amiga/amidisplaycc.4: revision 1.14
sys/arch/amiga/dev/amidisplaycc.c: revision 1.35
sys/arch/amiga/dev/amidisplaycc.c: revision 1.36
Implement the WSDISPLAYIO_GET_FBINFO ioctl, needed by X wsfb driver.
Add support for WSDISPLAYIO_MODE_DUMBFB to WSDISPLAYIO_SMODE.
Remove parentheses from return. No functional changes.
Update documentation to mention current status of X11
sys/kern/sys_pipe.c: revision 1.157
Fix a deadlock where one thread writes to a pipe, has more data
and no space in the pipe and waits on "pipe_wcv" while the reader
is closing the pipe and waits on "pipe_draincv".
Swap the test for "PIPE_EOF" and the "cv_wait_sig()" in "pipe_write()".
PR bin/56422 "zgrep -l sometimes hangs"
sys/miscfs/fifofs/fifo_vnops.c: revision 1.90
tests/kernel/kqueue/write/t_fifo.c: revision 1.5
- Add a new EVFILT_WRITE test case for FIFOs that correctly validates
the writability thresholds.
- Fix a bug in fifo_kqfilter() exposed by the new test case; in the
EVFILT_WRITE case, we were attaching the wrong end of the socket
pair to the knote!
- In filt_fiforead(), use ">= so->so_rcv.sb_lowat" rather than "> 0"
for consistency with fifo_poll(). NFC.
sys/miscfs/fifofs/fifo_vnops.c: revision 1.88
sys/kern/uipc_syscalls.c: revision 1.201
tests/lib/libc/sys/t_poll.c: revision 1.6
tests/lib/libc/sys/t_poll.c: revision 1.7
tests/lib/libc/sys/t_poll.c: revision 1.8
- Strenghen the poll(2) fifo_inout test to ensure that once the reader
has read enough that exactly PIPE_BUF space is available that the FIFO
becomes writable again.
- When creating a FIFO, ensure that the receive low water mark is 1
(a FIFO must be readable when at least 1 byte is available); this
was already the case implicitly, but this makes it explicit.
- Similarly, set the send low water mark to PIPE_BUF to ensure that
the pipe is writable when at least PIPE_BUF bytes of space are available
in the send buffer. Without this change, the strengthened test case
above does not pass (the default send low water mark is larger than
PIPE_BUF; see soreserve()).
- Make the same low water mark changes to the PIPE_SOCKETPAIR case.
In the fifo_hup1 test, also ensure that POLLHUP is de-asserted when a
new writer appears.
Add a fifo_inout test case that validates the expected POLLIN / POLLOUT
behavior for FIFOs:
- A FIFO is readable so long as at least 1 byte is available.
- A FIFO is writable so long as at least PIPE_BUF (obtained with _PC_PIPE_BUF)
space is avaiable.
This will be cloned for a forthcoming kevent test case.
sys/kern/uipc_socket2.c: revision 1.140
tests/lib/libc/sys/t_poll.c: revision 1.5
sys/miscfs/fifofs/fifo_vnops.c: revision 1.87
- fifo_poll(): If the last writer has disappeared, detect this and return
POLLHUP, per POSIX.
- fifo_close(): Use the new fifo_socantrcvmore(), which is like the
garden-variety socantrcvmore(), except it specifies POLL_HUP rather
than POLL_IN (so the correct code for SIGIO is sent).
- sowakeup(): Allow POLL_HUP as a code (notifies poll'ers with POLLHUP).
- Add test cases for correct POLLHUP behavior with FIFOs.
Fixes PR kern/56429.
sys/dev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.68-1.93
sys/dev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch
sys/dev/pci/ixgbe/if_bypass.c 1.7-1.9
sys/dev/pci/ixgbe/if_fdir.c 1.4-1.5
sys/dev/pci/ixgbe/if_sriov.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_82598.c 1.16
sys/dev/pci/ixgbe/ixgbe_82599.c 1.23
sys/dev/pci/ixgbe/ixgbe_api.c 1.25
sys/dev/pci/ixgbe/ixgbe_bypass.h 1.2
sys/dev/pci/ixgbe/ixgbe_common.c 1.30-1.33
sys/dev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_dcb.h 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.7
sys/dev/pci/ixgbe/ixgbe_fdir.h 1.3
sys/dev/pci/ixgbe/ixgbe_features.h 1.3
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.12
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.13, 1.16-1.17
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14
sys/dev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4
sys/dev/pci/ixgbe/ixgbe_netmap.h 1.2
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.7
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30
sys/dev/pci/ixgbe/ixgbe_phy.c 1.24
sys/dev/pci/ixgbe/ixgbe_rss.h 1.5
sys/dev/pci/ixgbe/ixgbe_sriov.h 1.4
sys/dev/pci/ixgbe/ixgbe_type.h 1.49
sys/dev/pci/ixgbe/ixgbe_vf.c 1.27
sys/dev/pci/ixgbe/ixgbe_x540.c 1.18-1.19
sys/dev/pci/ixgbe/ixgbe_x540.h 1.9
sys/dev/pci/ixgbe/ixgbe_x550.c 1.19-1.20
sys/dev/pci/ixgbe/ixgbe_x550.h 1.6
sys/dev/pci/files.pci 1.438
share/man/man4/ixg.4 1.15
share/man/man4/ixv.4 1.8
- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
Before this commit, resource shortage was easily occurred because
the total number of the clusters is small.
- Improve performance:
- Use m_adj(ETHER_ALIGN) more.
- Sprinkle __predict_false() in the RX path.
- Don't pre-allocate a cluster for RXCOPY case to improve short
packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
DMA buffer. Also, when the buffer is already freed, do not call
bus_dmamap_unload(9) (no resource leaks with this change). This
change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
address. At least, this change is required for macppc
(sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
panic.
- Save the discard_multidesc state to not to forget the state by
exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.
share/man/man7/sysctl.7: revision 1.153
sys/kern/vfs_lockf.c: revision 1.74
lib/libc/sys/fcntl.2: revision 1.46
lib/libc/sys/flock.2: revision 1.23
Tie the maximum file lock per unprivilegied uid to kern.maxfiles
This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
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
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
sys/compat/common/vfs_syscalls_43.c: revision 1.67
sys/compat/common/vfs_syscalls_50.c: revision 1.26
sys/compat/common/vfs_syscalls_30.c: revision 1.42
- memset struct stat to avoid kernel memory disclosure of padded fields
(thanks Trend Micro for the report)
- use do_fhstat
- consistency in argument order of compat functions
sys/netinet6/in6_src.c: revision 1.88
PR kern/56348
MTU discovery fails with IPv6 sockets bound to IPv4 mapped address
pick up the IPv4 route for IPv4 mapped IPv6 address to get the correct
MTU and not any unrelated/inappropriate MTU from IPv6 routes. IPv4 mapped
IPv6 addresses are always handled by the IPv4 stack and MTU discovery
is solely handled with the IPv4 routing table.
lib/libc/arch/arm/gen/swapcontext.S: revision 1.18
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S: revision 1.3
lib/libc/arch/arm/sys/__clone.S: revision 1.10
lib/libc/arch/arm/sys/__clone.S: revision 1.11
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S: revision 1.2
lib/libc/arch/arm/sys/__clone.S: revision 1.12
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S: revision 1.3
lib/libc/arch/arm/sys/__clone.S: revision 1.13
lib/libc/arch/arm/sys/__clone.S: revision 1.14
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S: revision 1.3
lib/libc/arch/arm/gen/swapcontext.S: revision 1.16
lib/libc/arch/arm/gen/swapcontext.S: revision 1.17
Align sp to 8-byte boundary as required by EABI.
This is especially important for non-leaf functions; GCC optimizes codes
based on assumption that sp is aligned properly.
Mostly fix broken earmv5 userland compiled by GCC10 due to alignment
faults in ld.elf_so, where {ld,st}rd are used for [sp, #8x].
No regression for ATF is observed for earmv[67]{,hf}{,eb}.
Align sp to 8-byte boundary as required by EABI.
IIUC, this change only affects libc compiled for ``Thumb-mode userland'',
which we've not officially supported yet.
Fix previous. For Thumb-1:
- sp cannot be manipulated directly
- {add,sub}s should be used instead of {add,sub}
Trailing whitespace
The _INVOKE_CERROR macro deals with thumb so simplify the code (at the
expense of a couple more instructions).
Do previous differently by pushing even number of registers and remove
strange r7 usage.
Do previous differtly by pushing two registers in the same way as the
_INVOKE_CERROR macro
sys/external/bsd/compiler_rt/dist/lib/builtins/negsf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/muldf3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfhf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/negsf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/muldf3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfhf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.4
sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.5
sys/external/bsd/compiler_rt/dist/lib/builtins/divdf3.c: revision 1.2
sys/external/bsd/compiler_rt/abi.mk: revision 1.1
sys/external/bsd/compiler_rt/dist/lib/builtins/divdf3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsisf.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/comparesf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsisf.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/comparesf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.4
sys/external/bsd/compiler_rt/dist/lib/builtins/ashrdi3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/ashldi3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfsf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/subdf3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.5
sys/external/bsd/compiler_rt/dist/lib/builtins/ashrdi3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/ashldi3.c: revision 1.3
sys/lib/libkern/Makefile.compiler-rt: revision 1.13
sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfsf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/subdf3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.6
sys/external/bsd/compiler_rt/dist/lib/builtins/lshrdi3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/floatsisf.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/extendhfsf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/lshrdi3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/floatsisf.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/extendhfsf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsidf.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsidf.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfsi.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfsi.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_frsub.c: revision 1.2
lib/libm/compiler_rt/Makefile.inc: revision 1.11
sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfsi.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/floatsidf.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfsi.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/divsi3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/floatsidf.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/divsi3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_div0.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/mulsf3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/mulsf3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfdi.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfdi.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/divsf3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/negdf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfdi.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/divsf3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/negdf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfdi.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/extendsfdf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/subsf3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/extendsfdf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/subsf3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/comparedf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/comparedf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/floatundisf.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/floatundisf.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfsi.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_drsub.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfsi.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/muldi3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfsi.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/muldi3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfsi.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/floatdisf.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/floatdisf.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/addsf3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/addsf3.c: revision 1.3
lib/libc/compiler_rt/Makefile.inc: revision 1.40
sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfdi.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfdi.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/udivsi3.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/truncsfhf2.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfdi.c: revision 1.2
sys/external/bsd/compiler_rt/dist/lib/builtins/udivsi3.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/truncsfhf2.c: revision 1.3
sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c: revision 1.4
sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfdi.c: revision 1.3
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 266891:
28e1b977d4 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] builtins: remove use of __attribute__((pcs("aapcs"))) on
Windows
Windows does not honour the __attribute__((pcs)) on ARM. Although this will
result in ABI mismatches, compiler-rt should largely be unneeded for resolving
dependencies as we generate MS ABI compliant library calls now for the most
part.
llvm-svn: 266891
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 298974 for lib/builtins/int_lib.h.
d8ca74176e (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[Builtin] Unxfail tests for armhf
Summary:
Originally, a few tests fail for armhf target due to:
1) COMPILER_RT_ARMHF_TARGET was not set when building the lib
2) COMPILER_RT_ABI should not be defined as `__attribute__((pcs("aapcs")))` for armhf when building for both lib and tests
This addresshttps://bugs.llvm.org//show_bug.cgi?id=32261
mulsc3_test.c is a newly exposed issue, which will be addressed separately.
Reviewers: rengolin, compnerd
Reviewed By: compnerd
Subscribers: aemerson, llvm-commits, mgorny
Differential Revision:https://reviews.llvm.org/D31448
llvm-svn: 298974
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 303138:
44c45717b9 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] builtins: use reserved spelling (NFC)
llvm-svn: 303138
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 303188:
36ac5ddff7 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] builtins: expand out the AEABI function stubs
These actually may change calling conventions. We cannot simply provide
function aliases as the aliased function may have a different calling
convention. Provide a forwarding function instead to permit the
compiler to synthesize the calling convention adjustment thunk.
Remove the `ARM_EABI_FNALIAS` macro as that is not safe to use.
Resolves PR33030!
llvm-svn: 303188
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 303207:
4a45838d10 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] builtins: fix guard __AEABI__ -> __ARM_EABI__
llvm-svn: 303207
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 314851:
0d586d06a7 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] [compiler-rt] Add back ARM EABI aliases where legal.
r303188 removed all the uses of aliases for EABI functions from
compiler-rt, because some of them had mismatched calling conventions.
Obviously, we can't use aliases for functions which don't have the same
calling convention, but that's only an issue for floating-point
functions with the hardfloat ABI. In other cases, the stubs increase
size and reduce performance for no benefit.
This patch adds back the aliases, with appropriate checks to make sure
they're only used in cases where the calling convention matches.
llvm-svn: 314851
PR port-arm/55897
Fix ABI mismatch for armhf runtime routines for floating-point arithmetics;
For hard-float arm variants, provide
(1) generic runtime routines with correct calling convention, and
(2) EABI runtime routines at the same time.
I've confirmed that no binary changes for kernels.
LGTM by skrll
sys/external/bsd/drm2/linux/linux_reservation.c: revision 1.13
sys/external/bsd/drm2/linux/linux_reservation.c: revision 1.14
drm: Release fence if we're about to return too.
Should fix another fence leak.
XXX pullup-9
-
drm: Plug another fence leak.
XXX pullup-9
sys/arch/hp300/dev/rd.c: revision 1.109
sys/arch/hp300/stand/Makefile.buildboot: revision 1.37
sys/arch/hp300/stand/common/ct.c: revision 1.8
sys/arch/hp300/dev/hpibvar.h: revision 1.22
sys/arch/hp300/dev/ct.c: revision 1.62
sys/arch/hp300/dev/hpibvar.h: revision 1.23
sys/arch/hp300/dev/ct.c: revision 1.63
sys/arch/hp300/dev/hpibvar.h: revision 1.24
sys/arch/hp300/dev/mt.c: revision 1.55
sys/arch/hp300/dev/rdreg.h: revision 1.14
sys/arch/hp300/dev/hpib.c: revision 1.43 (via patch)
sys/arch/hp300/dev/rdreg.h: revision 1.15
sys/arch/hp300/dev/rdreg.h: revision 1.16
sys/arch/hp300/dev/rdreg.h: revision 1.17
etc/etc.hp300/MAKEDEV.conf: revision 1.15
sys/arch/hp300/stand/common/hpibvar.h: revision 1.6
sys/arch/hp300/stand/common/rd.c: revision 1.11
sys/arch/hp300/dev/ctreg.h: revision 1.11
sys/arch/hp300/dev/rdvar.h: revision 1.24
sys/arch/hp300/dev/rdvar.h: revision 1.25
sys/arch/hp300/dev/rdvar.h: revision 1.26
sys/arch/hp300/dev/rd.c: revision 1.103
sys/arch/hp300/dev/rd.c: revision 1.104
sys/arch/hp300/dev/rd.c: revision 1.105
sys/arch/hp300/dev/rd.c: revision 1.106
sys/arch/hp300/dev/rd.c: revision 1.107
sys/arch/hp300/dev/rd.c: revision 1.108
Consistently use #define<tab> here.
Consistently use #define<tab> as rdreg.h.
No need to bother to use aprint_debug(9) inside #ifdef DEBUG block.
Pull HP-IB probe fixes from OpenBSD/hp300.
https://marc.info/?l=openbsd-cvs&m=113217630426615&w=2
Overhaul the way HP-IB devices are probed. We will now do an exhaustive
probe of the (slave, punit) tuple space, since this is the only way we
can get a dual disk or dual tape enclosure to attach two devices of the
same kind.
This allows using multiple rd(4) disk images on the same slave emulated
by HPDisk (and probably the real 9122D with dual floppy disk drives).
Thanks to Miod Vallat for suggesting this fix.
Move attach messages from common rdident() to explicit rdattach().
Cleanup duplicated CS/80 indentify structures. From OpenBSD.
https://marc.info/?l=openbsd-cvs&m=113227249626888&w=2
Define the CS/80 identify structure only once and correctly, instead of
duplicating it in every CS/80 driver and using an hardcoded number for
its size.
No functional change.
https://marc.info/?l=openbsd-cvs&m=113273001020159&w=2
Pick HP-IB describe structures changes from main kernel code here as well.
Add support of multiple rd(4) disks on all punits for HPDisk.
Special thanks to Anders Gustafsson, the author of "HPDisk"
(GPIB disk emulator) http://www.dalton.ax/hpdisk/
for providing bare boards and improving firmwares for NetBSD/hp300.
Specify -fno-unwind-tables to shrink binaries.
Before:
text data bss dec hex filename
77902 4328 137120 219350 358d6 uboot
After:
text data bss dec hex filename
64186 4328 137120 205634 32342 uboot
Create rd3 device nodes, for HPDisk.
Add Device and drive info of 2202A, 7908A, 7911A, and 7941A.
Geometries and description info are taken from hpdrive.ini.sample
in HPDrive. Briefly tested on HPDisk.
Print rd(4) capacity and geometry info as sd(4) and wd(4) do.
Before:
rd0 at hpibbus1 slave 0 punit 0: 7937H
rd0: 698 cylinders, 13 heads, 1116102 blocks, 512 bytes/block
After:
rd0 at hpibbus1 slave 0 punit 0: 7937H
rd0: 544 MB, 698 cyl, 13 head, 123 sec, 512 bytes/block x 1116102 blocks
sys/arch/hppa/dev/sti_sgc.c: revision 1.3
Fix silent freeze on probing sti(4) framebuffer on 712/60. PR/52162
Ok'ed by skrll@.
Should be pulled up to netbsd-9 and netbsd-8.
(requested by riastradh in ticket #1317):
sys/uvm/uvm_page.c: revision 1.248
sys/uvm/uvm_anon.c: revision 1.80
sys/rump/librump/rumpvfs/vm_vfs.c: revision 1.40
sys/rump/librump/rumpvfs/vm_vfs.c: revision 1.41
sys/rump/librump/rumpkern/vm.c: revision 1.191
sys/uvm/uvm_pager.c: revision 1.130
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.71
tests/rump/rumpkern/t_vm.c: revision 1.5
tests/rump/rumpkern/t_vm.c: revision 1.6
sys/rump/librump/rumpvfs/vm_vfs.c: revision 1.39
Move the handling of PG_PAGEOUT from uvm_aio_aiodone_pages() to
uvm_page_unbusy() so that all callers of uvm_page_unbusy() don't need to
handle this flag separately. Split out the pages part of uvm_aio_aiodone()
into uvm_aio_aiodone_pages() in rump just like in the real kernel.
In ZFS functions that can fail to copy data between the ARC and VM pages,
use uvm_aio_aiodone_pages() rather than uvm_page_unbusy() so that we can
handle these "I/O" errors. Fixes PR 55702.
fix an incorrect assertion in the previous commit.
Handle PG_PAGEOUT in uvm_anon_release() too.
Commit the ZFS file that I forgot in this previous commit:
Move the handling of PG_PAGEOUT from uvm_aio_aiodone_pages() to
uvm_page_unbusy() so that all callers of uvm_page_unbusy() don't need to
handle this flag separately. Split out the pages part of uvm_aio_aiodone()
into uvm_aio_aiodone_pages() in rump just like in the real kernel.
In ZFS functions that can fail to copy data between the ARC and VM pages,
use uvm_aio_aiodone_pages() rather than uvm_page_unbusy() so that we can
handle these "I/O" errors. Fixes PR 55702.
update the rump copy of uvm_page_unbusy() to match the real version,
in particular handle PG_PAGEOUT. fixes a few atf tests.
the busypage test is buggy, expect it to fail.
make rump's uvm_aio_aiodone_pages() look more like the kernel version.
fixes some more rumpy assertions.
for the busypage test, replace atf_tc_expect_fail() with atf_tc_skip()
because atf apparently has no way to expect a test program to crash.
fixes PR 55945.
sys/miscfs/kernfs/kernfs_vnops.c: revision 1.169
sys/miscfs/kernfs/kernfs_vnops.c: revision 1.170
Add missing VOP_KQFILTER to kernfs.
Not sure if lack of it can be used for local DoS or not, but best to
fix.
-
Fix perms on /kern/{r,}rootdev.
sys/dev/ic/dp8390.c: revision 1.99
sys/dev/ic/dl10019.c: revision 1.17
sys/dev/ic/ax88190.c: revision 1.18
Make sure the media / mii members in struct ethercom are initialized
so that the media-related ioctls work. Problem reported by Björn Johannesson
on current-users@.
XXX pullup-9
sys/arch/amd64/conf/GENERIC: revision 1.581
Enable tpm @ acpi (now that it can match TPM 1.2 devices, which are not,
as the comment implies, experimental).
sys/arch/amd64/amd64/db_disasm.c: revision 1.28
sys/arch/i386/i386/db_disasm.c: revision 1.49
ddb/amd64: Don't go out of the way to detect invalid addresses.
db_disasm had logic to detect invalid addresses before trying to
disassemble them. But when disassembling a null instruction address,
the logic to detect invalid addresses itself tried to dereference an
invalid address.
db_get_value can already handle this situation gracefully, so there is
no need for this faulty fault-avoidance logic.
Fixes double-fault in ddb on calling null function pointers. With
any luck, this should make diagnosing such bugs easier in the future!
ddb/i386: Don't go out of the way to detect invalid addresses.
db_read_bytes already does this better (but didn't at the time this
check was originally added back in 1998). Not sure if this code had
the same mistake as the amd64 code causing it to trip over its own
shoelaces, but there should be no need for it here.
sys/dev/usb/umass.c: revision 1.185
sys/dev/usb/umass_scsipi.c: revision 1.68
umass(4): Use an empty function callback, not null pointer.
This stupid bug, with an `XXX Broken!' comment right above, has been
preventing NetBSD from suspend/resume with a USB drive plugged in for
longer than I want to even think about admitting. *sigh*
umass(4): Assert that we got a cb up front.
Avoids jump to zero waaaaaaay down the line where we've forgotten why
we wanted to jump into oblivion.
sys/dev/ic/nvmevar.h: revision 1.22
sys/dev/ic/nvme.c: revision 1.56
sys/dev/ic/nvme.c: revision 1.57
sys/dev/pci/nvme_pci.c: revision 1.30
nvme(4): Add suspend/resume, derived from OpenBSD.
nvme(4): Move disestablishment of admin q interrupt to nvme_detach.
Nothing re-established this after suspend/resume, so attempting
suspend/resume/suspend would crash, and presumably we would miss
interrupts after resume. This keeps the establish/disestablish more
symmetric in attach/detach.
sys/dev/ldvar.h: revision 1.35
sys/dev/ld.c: revision 1.112
ld(4): Block requests while suspended until resumed.
Otherwise nothing stops us from continuing to feed I/O to the disk
controller when it expects that the queues are quiesced as it pokes
registers to change its power states. Fixes resume during disk
activity on my T480 with nvme.
sys/dev/usb/xhci.c: revision 1.140
sys/dev/usb/xhci.c: revision 1.141
sys/dev/usb/xhci.c: revision 1.143
sys/dev/usb/xhcivar.h: revision 1.18
sys/dev/usb/xhcivar.h: revision 1.19
sys/dev/usb/xhcireg.h: revision 1.19
sys/dev/usb/xhci.c: revision 1.139
xhci(4): Draft suspend/resume.
Work almost entirely done and tested by maya@ based on xhci 1.2 spec;
tidied up and tweaked by me.
Not sure about issuing Stop Endpoint commands or ensuring the Command
Ring is in the Stopped or Idle state, but this seems to work as is,
so it's already an improvement over what we had before which was no
xhci suspend/resume at all.
In particular, it's not clear to us:
- if we don't have any pending USB activity whether we need to issue
the Stop Endpoints or quiesce the command ring; but
- if we do have any pending USB activity whether issuing Stop
Endpoint is enough or whether we also need to do anything to
synchronize with other software logic to quiesce it too.
xhci(4): Block commands and issue Stop Endpoint on suspend.
xhci: Fix logic in waiting for command queue access.
_Either_ an existing command in progress, _or_ an existing suspend in
progress that is not done by us, should block us; the logic I wrote
previously erroneously blocked only if both conditions happened at
the same time.
Should fix issue reported by Andrius V in the PR kern/56050 followup
discussion.
xhci(4): Wait USB_RESUME_WAIT ms, not 20 ms.
Better to use the named constant, and although the spec says 20 ms is
enough, apparently for some devices it's not.
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h: revision 1.33 (patch)
i915drmkms: Fix LOCKDEBUG panic and potential deadlock.
This path is taken with a spin lock held, and possibly even in
interrupt context, where taking vmobjlock is not kosher, but we are
guaranteed to have the queue populated and unchanging.
XXX pullup-9
sys/kern/kern_ksyms.c: revision 1.90
sys/kern/kern_ksyms.c: revision 1.91
sys/kern/kern_ksyms.c: revision 1.92
sys/kern/kern_ksyms.c: revision 1.93
sys/kern/kern_ksyms.c: revision 1.94
sys/kern/kern_ksyms.c: revision 1.95
sys/kern/kern_ksyms.c: revision 1.96
sys/kern/kern_ksyms.c: revision 1.97
ksyms(4): Fix ksymsread synchronization.
Fixes crash on concurrent update and read of /dev/ksyms.
XXX Unclear why we have to skip sd_gone entries here -- it seems like
they should be preserved until ksymsclose.
ksyms(4): Modify ksyms_symtabs only at IPL_HIGH.
This limits the opportunities for ddb to witness an inconsistent
state of the symbol table list.
ksyms(4): Don't skip symbol tables that are soon to be freed.
They will not actually be freed until /dev/ksyms is closed, so
continued access to them remains kosher.
Revert "ksyms(4): Don't skip symbol tables that are soon to be freed."
Apparently the equality kassert this restored doesn't work; to be
analyzed.
Fix regression introduced in rev 1.90
in which the last element of ksyms_symtabs is skipped by mistake.
ksyms(4): Fix race in ksymsread iteration.
TAILQ_NEXT(ksyms_last_snapshot) might change while we are iterating,
but ksyms_last_snapshot itself cannot, so invert the loop structure.
Discussed with rin@.
ksyms(4): Don't skip symbol tables that are soon to be freed, take 2.
They will not actually be freed until /dev/ksyms is closed, so
continued access to them remains kosher.
The previous change was busted because of an off-by-one error in a
previous previous change's iteration over the symtabs; that error has
since been corrected.
ksyms(4): Allow multiple concurrent opens of /dev/ksyms.
First one takes a snapshot; others all agree with the snapshot.
Previously this code path was just broken (could fail horribly if
modules were unloaded after one of the opens is closed), so I just
blocked it off in an earlier commit, but that broke crash(8). So
let's continue allowing multiple opens seeing the same snapshot, but
without the horrible bugs.
sys/sys/namei.src: revision 1.59 (via patch)
sys/kern/vfs_vnops.c: revision 1.215
sys/kern/vfs_lookup.c: revision 1.226
Add a new namei flag NONEXCLHACK for open with O_CREAT and not O_EXCL.
This case needs to be distinguished from the other CREATE operations
because it is supposed to successfully return (and open) the target if
it exists. In the case where that target is the root, or a mount
point, such that there's no parent dir, "real" CREATE operations fail,
but O_CREAT without O_EXCL needs to succeed.
So (a) add the flag, (b) test for it in namei in the situation
described above, (c) set it in open under the appropriate
circumstances, and (d) because this can result in namei returning
ni_dvp of NULL, cope with that case.
Should get into -9 and maybe even -8, because it was prompted by
issues with 3rd-party code. The use of a flag (vs. adding an
additional nameiop, which would be more appropriate) was deliberate to
make the patch small and noninvasive.
sys/arch/hp300/conf/INSTALL: revision 1.67
sys/arch/hp300/conf/INSTALL: revision 1.68
Add missed 'nhpib at intio' for internal HP-IB. Found on testing HPDisk.
Also fix comments for HP-IB devices.
Should be pulled up to netbsd-8 and netbsd-9.
Reduce maxusers to 8 as GENERIC.
Should be pulled up to netbsd-9 and netbsd-8.
sys/arch/arm/arm32/arm32_boot.c: revision 1.42
sys/arch/arm/arm32/arm32_boot.c: revision 1.43
G/C
-
Mirror the changes around passing pages to UVM in aarch64_machdep.c:
Two fixes for loading free pages into UVM
- Only consider a boot_physmem (inner loop) range that has its end
(bp_end) after the bootconfig.dram (outer loop) range start (start).
This was harmless as a later condition correctly checks there is only
something to do if start < bp_end.
- Stop processing boot_physmem ranges if all the bootconfig.dram range has
been passed to UVM. This fixes a boot problem for simon@
Copy a comment over and do the VPRINTF before the uvm_page_physload in
the same way as aarch64_machdep.c as well.
sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.50
sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.60
sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.61
G/C
-
More debug
-
Two fixes for loading free pages into UVM
- Only consider a boot_physmem (inner loop) range that has its end
(bp_end) after the bootconfig.dram (outer loop) range start (start).
This was harmless as a later condition correctly checks there is only
something to do if start < bp_end.
- Stop processing boot_physmem ranges if all the bootconfig.dram range has
been passed to UVM. This fixes a boot problem for simon@
sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.18
Fix conversion between aarch64 and aarch32 fpreg's; in aarch32 mode,
d0-d31 are packed into v0-v15 (== q0-q15).
This fixes crashes in VFP-optimized codes running on COMPAT_NETBSD32.
OK ryo
sys/fs/ntfs/ntfs_subr.c: revision 1.64
ntfs_loadntnode(): Use bread() when ntm_sysvn[NTFS_MFTINO] is NULL.
May happen when loading node 0 (MFT) during mount and some
attributes are stored in another ntnode.
PR kern/56160 (Mount ntfs usb disk)
sys/dev/pci/siisata_pci.c: revision 1.21
disable MSI for SiI3124 - interrupts don't seem to work on this old board
when MSI is enabled, maybe because it's behind a PCI bridge
PR kern/55115 by John D. Baker
sys/dev/audio/audio.c: revision 1.95
audio: Only score hardware formats by channel count at count<=2
Scoring by channel count makes sense when you are using hardware that
supports mono and stereo formats. However, if your hardware also supports
surround formats, defaulting to those might be confusing. So, don't
prefer them.
Problem reported and fix tested by tcmart14 with a 2015 model Macbook Pro.
sys/miscfs/fdesc/fdesc_vnops.c: revision 1.135
Make sure fdesc_lookup() never returns VNON vnodes.
Should fix PR kern/56130 (fdescfs create nodes with wrong major number)
sys/arch/arm/include/lock.h: revision 1.38
common/lib/libc/arch/arm/atomic/membar_ops.S: revision 1.7
common/lib/libc/arch/arm/atomic/atomic_swap_16.S: revision 1.5
common/lib/libc/arch/arm/atomic/atomic_swap_64.S: revision 1.12
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.17
Add the appropriate memory barrier before the lock is cleared in
__sync_lock_release_{1,2,4,8}. That is, all reads and write for the
inner shareability domain before the lock clear store.
Improve the membar_ops barriers - no need to use dsb and wait for
completion. Also, we only to act on the inner shareability domain.
Fix the barrier confusion. From Riastradh - thanks!.
sys/arch/mac68k/mac68k/machdep.c: revision 1.361
sys/arch/mac68k/mac68k/machdep.c: revision 1.362
Make mac68k_set_io_offsets() a little bit cleaner:
- Via1Base is always ``base'' for all supported models.
- Set sccA and SCSIBase for each model of MACH_CLASSQ class.
- Some style fixes.
No functional changes intended.
Change sccA address for Quadra 800 from base + 0xc000 to 0xc020.
The H/W partially decodes its address, and sccA is available at
offsets 0xc000, 0xc020, .... The functionality is same, but Mac
toolbox ROM routines use 0xc020, and QEMU for Quadra 800 only
supports this address.
sys/arch/mac68k/mac68k/machdep.c: revision 1.360
sys/arch/mac68k/conf/GENERIC: revision 1.234
sys/arch/mac68k/conf/files.mac68k: revision 1.131
Add MAC68K_MEMSIZE option to hard-code memory size in MB, instead of
that given by Booter. Work around Booter bug by which max memory is
restricted to 255MB.
sys/arch/mac68k/mac68k/locore.s: revision 1.174
Fix DJMEMCMAX option for Quadra/Centris 650/800.
- Use jeq instead of jra for conditional branch.
- Use cmpl instead of cmp (= cmpw) for int variables.
Now, my Quadra 800 recognizes full 520MB memory!
sys/dev/audio/audiobell.c: revision 1.4
Fix and improve the buffer length calculation to avoid zero length
even if blk_ms is small.
This fixes PR kern/56059.
sys/arch/sparc/sparc/trap.c: revision 1.199
PR port-sparc/55573: remove kernel message about disabled coprocessor
instructions - it is triggered by userland trying to detect availability
of sparcv9 VIS instructions.
sys/arch/arm/cortex/gic.c: revision 1.47
Only target the boot cpu for real with SPI interrupts. I tried to do
this back in 2014, but somehow I missed a spot.
This is a quick-and-dirty fix for the USB stack which expects transfer
completions to be in-order. If interrupts happen across the CPUs then
this isn't guaranteed (yet).
kern/55243 panic at usb_transfer_complete() on raspberry pi 4
sys/dev/usb/usbdevs: revision 1.793
correct usb device id for BELKIN F5D7050E
matches freebsd / openbsd (sources of urtw driver), various online
sources
PR kern/56056
all via patch:
sys/dev/usb/if_urtwn.c: revision 1.93
sys/dev/usb/if_urtwn.c: revision 1.95
sys/dev/usb/if_urtwn.c: revision 1.96
if_urtwn.c: Plug a few leaks
Can be a cause of PR/55968
Also free assocated mbufs.
Opps....Remove irrelavent debug code and don't free_m before IFQ_DEQUEUE().
Identified and reported by Patrick Welche and remedy found by Martin Husemann.
sys/dev/pci/ixgbe/ixgbe.c 1.259, 1.278-1.279
sys/dev/pci/ixgbe/ixgbe.h 1.75
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.12
sys/dev/pci/ixgbe/ixgbe_vf.c 1.24-1.26
sys/dev/pci/ixgbe/ixgbe_x550.c 1.17
sys/dev/pci/ixgbe/ixv.c 1.155-1.156
sys/dev/pci/ixgbe/ix_txrx.c 1.64-67
sys/dev/pci/files.pci 1.436
share/man/man4/ixg.4 1.13-1.14
share/man/man4/ixv.4 1.6-1.7
- Fix a problem that the RX path stalled when the mbuf cluster is
exhausted.
- Modify some parameters to reduce packet dropping. See also the
manual's OPTIONS section for the detail.
- ixv(4): The max number of queue(pair) is not 7 but 8. Correctly
reset the hardware.
- Add "TX " to "Queue No Descriptor Available" evcnt(9) name to make
it more understandable.
- Fix a bug that some advertise speeds can't be set with
hw.ixgN.advertise_speed if both 2.5G and 5G are set. Fix the error
message, too.
- Fix typo in comment or debug message.
sys/netinet/tcp_subr.c: revision 1.286
sys/netinet/tcp_timer.c: revision 1.96
sys/netinet/in_var.h: revision 1.102
sys/netinet/in_var.h: revision 1.99
Don't increment the iss sequence on each connection because it exposes
information (Amit Klein)
Add some randomness to the iss offset
Use a random IPv4 ID because the shuffling algorithm used before could expose
information (Amit Klein)
mv <sys/cprng.h> include to the kernel portion
sys/dev/ic/mb89352.c: revision 1.58
Fix a possible race condition in spc_msgin() in NO_MANUAL_XFER case.
To avoid the race, check SSTS and INTS after XFR command as
spc_pio_datain() does.
Reported from isaki@, observed on nono emulator.
sys/netinet6/ip6_id.c: revision 1.19-1.21
sys/netinet6/ip6_var.h: revision 1.88
sys/netinet/ip_input.c: revision 1.400
sys/netinet/tcp_subr.c: revision 1.285
sys/netinet/ip6.h: revision 1.30
netinet: Enable random IP fragment ids by default (from riastradh)
netinet: Enable RFC 1948 pseudorandom TCP ISS selection by default.
(from riastradh)
netinet6: Mark randomid unused.
Will make merging and bisection easier if anything goes wrong with
flow label or fragment id randomization changes.
(from riastradh)
netinet/netinet6: Add necessary includes to make these standalone.
(from riastradh)
Replace randomid() by cprng_fast32()
sys/dev/audio/audio.c: revision 1.89
sys/dev/audio/audio.c: revision 1.90
sys/dev/audio/audio.c: revision 1.91
Change the lock conditions to call audio_unlink().
This can remove a different copy of audio_exlock_enter() in audio_unlink()
and can use normal one. Also, in audiodetach(), this can set the exlock
at more natual order (before calling audio_unlink()).
No noticeable functional changes are intended.
Thanks for comments, riastradh@.
Protect also audioopen() and audiobellopen() from audiodetach() with
psref(9), as well as others(audioread, audiowrite, etc..).
- Rename audio_file_enter to audio_sc_acquire_fromfile, audio_file_exit
to audio_sc_release, for clarify. These are the reference counter for
this sc.
- Introduce audio_sc_acquire_foropen for audio{,bell}open.
- audio_open needs to examine sc_dying again before inserting it into
sc_files, in order to keep sc_files consistency.
The race between audiodetach and audioopen is pointed out by riastradh@.
Thank you for many advices.
Add missing curlwp_bindx() corresponding to curlwp_bind().
Pointed out by riastradh@.
sys/dev/audio/audio.c: revision 1.46
sys/dev/audio/audio.c: revision 1.82
sys/dev/audio/audio.c: revision 1.85
sys/dev/audio/audio.c: revision 1.87
sys/dev/audio/audio.c: revision 1.88
Change two aprint_error_dev() to device_printf() (and improve messages).
This is also called from other than boot.
Add missing newline.
Revise comments.
Change (harmless) zero-length debug messages.
sys/modules is compiled with -Wzero-length-format and this
makes sys/modules compilable even if AUDIO_DEBUG is defined.
Improve error messages.
- prefix MD device name if it's considered to be related to the MD driver.
- revise some messages.
sys/arch/hppa/gsc/harmony.c: revision 1.8
sys/arch/hppa/gsc/harmony.c: revision 1.9
sys/arch/hppa/gsc/harmony.c: revision 1.10
Fix locking against myself.
trigger_output will be called with sc_intr_lock held.
From source code review, not tested.
Fix my mistakes in rev1.6.
- I had to merge the channel bit and the speed bits.
Reported by macallan@.
- I also fix my indent, while I'm here.
Simplify harmony_speed_bits().
It no longer needs to write back the speed value.
sys/arch/m68k/m68k/reenter_syscall.s: revision 1.5
sys/arch/m68k/m68k/reenter_syscall.s: revision 1.6
sys/arch/m68k/m68k/reenter_syscall.s: revision 1.7
Replace magic numbers with proper macros prepared in assym.h.
No binary changes.
Note this is a preparation for a possible fix of PR port-m68k/55990.
Consistently use motorola style. No binary changes.
Seems missed in rev 1.3:
https://mail-index.netbsd.org/source-changes/2013/08/01/msg046378.html
Plug kernel stack leaks in reenter_syscall() for setcontext(2).
This fixes long standing kernel crashes (MMU fault, address error,
and silent freeze by a double bus fault etc. seen for ~10 years)
caused by kernel stack overflow, especially on x68k and sun3 running
Xorg based servers. See PR/55990 for more details.
"This change seems perfectly reasonable" from thorpej@ and
jklos@ also reported this also solved freeze of his mac68k system
with 10 megabyes of memory.
Should be pulled up to netbsd-9 and netbsd-8.
Do not panic Dom0 when hypervisor grant_table_op(GNTTABOP_copy) fails
in xennet(4) backend driver, that can be triggered by malicious or buggy
DomU via bad grant reference.
Part of fixes for XSA-362.
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.92 (via patch)
remove support for legacy rx-flip mode for xennet(4)/xvif(4), making
rx-copy (first shipped in NetBSD 6.0 in 2012) the only supported
mode
this is mostly to simplify maintenance and future development
rx-flip is not supported by Linux Dom0/DomU, and NetBSD Dom0/DomU
defaults to rx-copy for over 8 years now too, so there is little
need to keep the support for compatibility
besides compatibility there is no other reason to keep rx-flip -
page transfer is generally slower than copy due to necessary MMU/TLB
manipulation, especially on MP systems
sys/arch/xen/x86/xen_shm_machdep.c: revision 1.17 (via patch)
in xen_shm_map(), make sure to unmap any successfully mapped pages
before returning failure if there is partial failure
fix detection of partial failure - GNTTABOP_map_grant_ref can actually re=
turn
zero for partial failure, so we need to always check all the entries
to detect it
previously, kernel triggered panic() for partial failure, leading to
Dom0 page fault later; since the mapping failure can be triggered by
malicious DomU via bad grant reference, it's important to expect
the calls to fail, and handle it gracefully without crashing Dom0
part of fixes for XSA-362
sys/arch/x86/x86/intr.c: revision 1.154 (via patch)
Fix x86's pci_intr_disestablish clean up routine. Pointed out by t-kusaba@IIJ, thanks.
Fix panic on x86 by the following code.
====================
sc_ih = pci_intr_establish_xname(sc_pc, ...);
pci_intr_disestablish(sc_pc, sc_ih);
sc_ih = pci_intr_establish(sc_pc, ...);
====================
ena(4) do such processing when ifconfig down/up.
XXX pullup-8,9
sys/dev/raidframe/rf_reconstruct.c: revision 1.125
Fix a long long-standing off-by-one error in computing lastPSID.
SUsPerPU is only really supported for a value of 1, and since the
first PSID is 0, the last will be numStripe-1. Also update the
setting of pending_writes to reflect the change to lastPSID.
Needs pullups to -8 and -9.
sys/arch/x68k/x68k/machdep.c: revision 1.204
Restore fixes for PR/51663 lost in r1.195 (uvm_hotplug(9) merge).
The kernel crashdump and savecore(8) on NetBSD/x68k have been broken
(even without EXTNEDED_MEMORY) since NetBSD 8.0. Oops.
Should be pulled up to netbsd-9 and netbsd-8.
sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.136
Enable to mount Raspberry Pi Pico's USB mass storage partition
Fix PR kern/55985.
O.k. by thorpej@.
Pull-up to netbsd-8 and netbsd-9.
sys/dev/scsipi/cd.c: revision 1.350
sys/dev/scsipi/sd.c: revision 1.331
PR 55986: Ryo Onodera: DK_BUSY must have mask as second argument. Make cd.c
consistent by also using __BIT()
sys/dev/usb/if_urtwn.c: revision 1.89,1.90
sys/dev/usb/usbdevs: revision 1.788,1.789
urtwn(4): add TPLINK WN821N to the list of USB device ids
reported by kfmut on the unitedbsd forums.
add another TPLINK RTL8192EU variant
to avoid confusion use TP-Link's names for these variants, matching
FreeBSD
sys/dev/usb/uhid.c: revision 1.115
sys/dev/usb/uhidev.h: revision 1.21
sys/dev/usb/uhidev.c: revision 1.79
(all via patch)
usb: Overhaul uhid(4) and uhidev(4) locking.
- uhidev API rules:
1. Call uhidev_open when you want exclusive use of a report id.
After it succeeds, you will get interrupts.
2. Call uhidev_close when done with exclusive use of a report id.
After it returns, you will no longer get interrupts.
=> uhidev_open/close do not nest.
3. uhidev_write no longer requires the caller to have exclusive
access -- if there is a write in progress, it will block
interruptibly until done. This way drivers for individual
report ids need not work separately to coordinate their writes.
4. You must uhidev_stop to abort any pending writes on the same
report id. (uhidev_stop no longer does anything else -- to
ensure no more interrupts, just use uhidev_close.)
- Fix uhidev_open/close locking -- uhidev now has an interruptible
config lock held only on first open and last close by any report id
in the device, to serialize the transition between zero and nonzero
numbers of references which requires opening/closing pipes and
allocating/freeing buffers.
- Make /dev/uhidN selnotify(POLLHUP) when the device is yanked.
- Factor uhid device lookup and reference counting and dying
detection and so on into uhid_enter/exit.
- Nix struct uhid_softc::sc_access_lock. This served no purpose but
to confuse me when trying to understand the logic of this beast
(and to ensure uhidev_write exclusion, but it was uninterruptible,
which is wrong for something that implements userland operations,
and didn't actually work because uhidev_write did nothing to
coordinate between different report ids).
- Fix locking in select/poll.
- Use atomics to manage UHID_IMMED to keep it simple. (sc_lock would
be fine too but it makes the code more verbose.)
- Omit needless UHID_ASLP -- cv_broadcast already has this
micro-optimization.
With these changes, my Pinebook survives
for i in `jot 100`; do
echo '###' $i
for j in `jot 16`; do
usbhidctl -rf /dev/uhid$j >/dev/null &
done
wait
done
while plugging and unplugging uhid(4) devices (U2F keys), and the U2F
keys still work as U2F keys.
ok nick, mrg
XXX pullup-9
XXX pullup-8?
Note on ABI and pullups: This changes the layout of struct
uhidev_softc, but with the sole exception of ucycom(4) -- which at
the moment is completely broken and unusable -- the only members that
USB HID drivers use are sc_udev and sc_iface, which haven't changed.
The layout of struct uhidev, which is allocated by each USB HID
driver in its own softc structure, is unchanged.
sys/kern/kern_event.c r1.110-1.115 (via patch)
fix a race in kqueue_scan() - when multiple threads check the same
kqueue, it could happen other thread seen empty kqueue while kevent
was being checked for re-firing and re-queued
make sure to keep retrying if there are outstanding kevents even
if no kevent is found on first pass through the queue, and only
kq_count when actually completely done with the kevent
PR kern/50094 by Christof Meerwal
Also fixes timer latency in Go, as reported in
https://github.com/golang/go/issues/42515 by Michael Pratt
sys/kern/kern_threadpool.c: revision 1.23
threadpool(9): Fix synchronization between cancel and dispatch.
- threadpool_cancel_job_async tried to prevent
threadpool_dispatcher_thread from taking the job by setting
job->job_thread = NULL and then removing the job from the queue.
- But threadpool_cancel_job_async didn't notice job->job_thread is
null until after it also removes the job from the queue =>
double-remove, *boom*.
The solution is to teach threadpool_dispatcher_thread to wait until
it has acquired the job lock to test whether job->job_thread is still
valid before it decides to remove the job from the queue.
Fixes PR kern/55948.
XXX pullup-9
sys/kern/core_elf32.c: revision 1.67
Use <compat/netbsd32/netbsd32.h> instead of <machine/netbsd32_machdep.h>,
which is not intended for standalone use.
Compile tested for all ports with their own COMPAT_NETBSD32 codes:
aarch64, amd64, arm, mips64, sparc64, and algor64.
Should fix build failure for mips64 in netbsd-9, where netbsd32.h is not
included by other header files.
sys/arch/aarch64/aarch64/trap.c: revision 1.28,1.31,1.32 (patch)
- add support conditionally execution for A32 instruction emulation
- separated the processing of ARM and THUMB emul clearly. do not confuse the Thumb-32bit instruction with the ARM instruction.
- use far_el1 instead of tf_pc to return correct fault address when instruction emulation
sys/arch/aarch64/aarch64/vm_machdep.c: revision 1.9 (patch)
Fix clone(2) for COMPAT_NETBSD32.
(1) Set r13 (sp for arm32 processes) appropriately when stack is
specified to fork1().
(2) For arm32 processes, align stack to 8-byte boundary, instead of
16-byte for native aarch64 processes, to match our 32-bit ABI:
https://nxr.netbsd.org/xref/src/sys/arch/arm/arm32/vm_machdep.c#150
Note that sp alignment checking is disabled in aarch32 mode, and
this works fine with AARCH64_EL0_STACK_ALIGNMENT_CHECK option.
OK ryo
sys/kern/core_elf32.c: revision 1.65 (patch)
Use correct note types for register storage in 32-bit core files for
architecture on which 64- and 32-bit ABIs use different values for
PT_GET{,FP}REGS, i.e., aarch64{,eb}.
Now, 32-bit GDB works fine for core files generated by aarch64{,eb}
kernel.
Should be no functional changes for ports other than aarch64{,eb}.
sys/arch/aarch64/aarch64/trap.c: revision 1.30
sys/arch/aarch64/include/ptrace.h: revision 1.10
sys/arch/aarch64/include/netbsd32_machdep.h: revision 1.4 (patch)
sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.14
sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.15
Add support of ptrace(2) for COMPAT_NETBSD32.
Now, GDB for arm32 is usable for debugging 32bit applications.
OK ryo@
For rev 1.14 and before, netbsd32_process_write_regs() returns EINVAL
if non-modifiable bits are set in CPSR.
Instead, mask out non-modifiable bits and make this function success
regardless of value in CPSR. New behavior matches that of arm:
https://nxr.netbsd.org/xref/src/sys/arch/arm/arm/process_machdep.c#187
This fixes lib/libc/sys/t_ptrace_wait*:access_regs6 tests, in which
register contents retrieved by PT_GETREGS are set back by PT_SETREGS.
No new regression is observed in full ATF run.
OK ryo
sys/arch/aarch64/aarch64/pmap.c: revision 1.82
sys/arch/aarch64/aarch64/pmap.c: revision 1.83
pmap_procwr(): sync icache even if p != curproc. This fixes applications
like GDB for arm32, that rewrite text of other process.
Thanks to ryo@ for discussion.
Use tlen for temporary length variable instead of l, which is usually
used for struct lwp *.
No binary changes.
sys/arch/aarch64/aarch64/cpufunc.c: revision 1.22 (patch)
sys/arch/aarch64/aarch64/cpufunc.c: revision 1.23 (patch)
sys/arch/aarch64/aarch64/pmap.c: revision 1.81
Set uvmexp.ncolors appropriately, which is required for some CPU
models with VIPT icache.
Otherwise, alias in virtual address results in inconsistent results,
at least for applications that rewrite text of other process, e.g.,
GDB for arm32.
Also, this hopefully fixes other unexpected failures due to alias.
Confirmed that there's no observable regression in performance;
difference in ``time make -j8'' for GENERIC64 kernel on BCM2837
with and without setting uvmexp.ncolors is within 0.1%.
Thanks to ryo@ for discussion.
Fix uvmexp.ncolors for some big.LITTLE configuration; it is uncertain
which CPU is used as primary, and as a result, secondary CPUs can
require larger number of colors.
In order to solve this problem, update uvmexp.ncolors via
uvm_page_recolor(9) when secondary CPUs are attached, as done for
other ports like x86.
Pointed out by jmcneill@, and discussed on port-arm@:
http://mail-index.netbsd.org/port-arm/2020/07/03/msg006837.html
Tested and OK'd by ryo@.
Fix previous; add missing <uvm/uvm.h> include.
sys/arch/aarch64/aarch64/trap.c: revision 1.21
sys/arch/aarch64/aarch64/trap.c: revision 1.26
PR port-arm/54702
Add support for earmv6hf binaries on COMPAT_NETBSD32 for aarch64:
- Emulate ARMv6 instructions with cache operations register (c7), that
are deprecated since ARMv7, and disabled on ARMv8 with LP64 kernel.
Many thanks to ryo@ for helping me to add support of Thumb-mode,
as well as providing exhaustive test cases:
https://github.com/ryo/mcr_test/
We've confirmed:
- Emulation works in Thumb-mode.
- T32 16-bit length illegal instruction results in SIGILL, even if
it is located nearby a boundary b/w mapped and unmapped pages.
- T32 32-bit instruction results in SIGSEGV if it is located across
a boundary b/w mapped and unmapped pages.
When emulating obsoleted arm32 instructions, use ufetch(9) rather than
dereference tf_pc directly to retrieve an instruction.
Even if tf_pc is valid when processor decodes the instruction, someone
can unmap its page before tf_pc is read in the exception handler.
Now, SIGSEGV is delivered correctly to the process in this case, rather
than kernel panic.
Pointed out by maxv.
Discussed with ryo and skrll.
sys/dev/ic/ahcisata_core.c: revision 1.84
sys/dev/ic/ahcisata_core.c: revision 1.85
sys/dev/ic/ahcisata_core.c: revision 1.88
sys/dev/ic/ahcisata_core.c: revision 1.89
sys/arch/arm/nvidia/tegra_ahcisata.c: revision 1.13
sys/dev/ic/ahcisatavar.h: revision 1.26
sys/dev/ic/ahcisata_core.c: revision 1.90
sys/dev/ic/ahcisata_core.c: revision 1.91
sys/dev/ic/ahcisata_core.c: revision 1.92
sys/dev/ata/satareg.h: revision 1.6
ahci_exec_fis: wait for the correct amount of time when AT_WAIT is set
Retry clearing WDCTL_RST a few times before giving up. Makes SATA work in
Solidrun Honeycomb LX2K.
AHCI 1.3.1 specification says that it is good practice for system software
to 'zero-out' the memory allocated and referenced by PxCLB and PxFB.
ahci_intr: use ffs in the port bitmask instead of looping over all 32 bits
AHCI 1.3.1 section 5.5.3 "Processing Completed Commands" says that we
should clear PxIS before IS.IPS.
Add G3 and DevSleep definitions. This changes the mask used by
SControl_IPM_NONE from 0x3 to 0x7.
Make sure to ack IS after PxIS when polling and when using multiple MSI-X
messages.
Remove the AHCI_QUIRK_SKIP_RESET quirk now that the underlying issue is
fixed.
sys/dev/hdaudio/hdaudio.c: revision 1.13
If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.
sys/dev/ic/stivar.h: revision 1.11
sys/dev/ic/sti.c: revision 1.23
sys/dev/ic/sti.c: revision 1.24
sys/dev/ic/sti.c: revision 1.25
sys/arch/hp300/dev/sti_sgc.c: revision 1.4
Pull the latest OpenBSD sti(4) changes for bitmap framebuffer support.
- bitmap and colormap ops based on old HP ngle X11 driver:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/ic/sti.c#rev1.76
> Work-in-progress support for non-accelerated X11 on *some* sti(4)
> frame buffers; based upon the old HP ngle X11 driver.
> Currently limited to CRX (720/735/750), Timber (710, old 715),
> Artist (712, 715) and EG (B-series), however the
> colormap isn't set up correctly on Timber and EG yet.
>
> Joint work with Artem Falcon, now in good enough shape to be worked further
> in the tree.
- misc other cosmetic changes to reduce diffs
No particular comments on port-hp300@ and port-hppa@:
https://mail-index.netbsd.org/port-hp300/2020/12/19/msg000184.htmlhttps://mail-index.netbsd.org/port-hp300/2020/12/20/msg000185.html
The MD hp300 attachment for SGC CRX (A1659-66001) will be committed
separately.
Add bitmap access ops support for SGC CRX (A1659-66001) framebuffer.
Also modify existing 425e EVRX attachment to use updated MI sti(4) ops
more efficiently.
The Xorg server and mlterm-wscons (that support wsdisplay bitmap) work
fine on SGC hp425t.
No particular comments on port-hp300@ and port-hppa@:
https://mail-index.netbsd.org/port-hp300/2020/12/19/msg000184.htmlhttps://mail-index.netbsd.org/port-hp300/2020/12/20/msg000185.html
Special thanks to Miod Vallat again, for contributing the SGC CRX
framebuffer with the SGC connector and flexible cable for HP9000/425t.
He also contributed DIO-II "Hyperion" monochrome framebuffer and
1 plane grayscale SGC GRX (A1924-66001), and I've confirmed hyper(4)
just works even with Xorg server. I will try GRX as the next project.
Handle WSSCREEN_REVERSE properly. Based on OpenBSD's sti(4).
Also remove WSSCREEN_UNDERLINE from capabilities that is not handled
by sti(4) ROM routines.
Tested on HP9000/425t with CRX.
Ignore WSDISPLAYIO_PUTCMAP in WSDISPLAYIO_MODE_EMUL, i.e. text mode.
The hardware palette settings are handled by the STI ROM in STI_TEXTMODE
and changing cmap could cause mangled text colors at least on CRX on 425t.
Updating CMAP in EMUL mode isn't expected anyway.
Fixes "red or invisible text" after exiting mlterm-wscons on A1659 CRX.
sys/arch/hp300/dev/dnkbd.c: revision 1.11
sys/arch/hp300/dev/hil_intio.c: revision 1.4
Fix a longstanding bug in hilkbd (and dnkbd) console attachment.
cn_tab->cn_dev is initialized in wsdisplay_emul_attach()
(but not in wsdiaplay_cnattach()) so it cannot be used
when hil(4) is attached before wsdisplay(4) is attached.
Instead, use exported wsdisplay_cnputc() that is actually
set in early wsdisplay_cnattach().
Now we can use ddb and RB_ASKNAME via HIL keyboard console.
Should be pulleld up to netbsd-8 and netbsd-9.
sys/dev/usb/ohci.c: revision 1.314
sys/external/bsd/dwc2/dwc2.c: revision 1.75
sys/dev/usb/ehci.c: revision 1.284
sys/dev/usb/uhci.c: revision 1.305
sys/dev/usb/xhci.c: revision 1.136
usb: Omit bogus assertions about struct usbd_pipe::up_intrxfer.
These assertions were only valid for pipes at UE_IN_DIR, UE_INTERRUPT
endpoints created with usbd_open_pipe_intr, which uses up_intrxfer to
pass the struct usbd_xfer object to usbd_close_pipe to free later.
In contrast, for pipes at UE_OUT_DIR, UE_INTERRUPT endpoints,
up_intrxfer is never initialized, so the assertion cannot be right.
In principle we might even have more than one outstanding interrupt
transfer at a time, rendering the point of the assertion moot anyway.
Found by interrupting a uhidev write to a u2f device.
ok nick
sys/dev/audio/audio.c: revision 1.83
Avoid a dead lock in audiodetach, since rev 1.63.
audio_unlink() must be called without exlock held (and
audio_mixer_destroy() must be called with exlock held).
This makes unplugging during playing/recording work (again).
Reported by Julian Coleman on current-users:
http://mail-index.netbsd.org/current-users/2020/12/10/msg040050.html
sys/dev/audio/audio.c: revision 1.80
sys/dev/audio/audio.c: revision 1.81
Fix that audio_open() didn't halt the recording mixer correctly
if fd_allocfile() failed, since rev 1.65.
Will fix PR kern/55848.
-
Rewrite error handling on audio_open().
This also fixes a few resource leaks on error case.
sys/arch/hp300/conf/RAMDISK: revision 1.16
sys/arch/hp300/conf/INSTALL: revision 1.66
Remove options (NVNODE, NBUF, and BUFPAGES) for small RAM machines.
These options make extracting binary sets much slower even on miniroot.
Instead, use "options BUFCACHE=5" (use 5% of memory for buffercache) and
also specify "-fno-unwind-tables" for COPTS to shrink INSTALL kernel.
Worth to pullup to netbsd-9.
sys/dev/usb/ohci.c: revision 1.311
sys/dev/usb/ohci.c: revision 1.312
sys/dev/usb/ohcivar.h: revision 1.62
Restructure the abort code for TD based transfers (ctrl, bulk, intr).
In PR kern/22646 some TDs can be on the done queue when the abort start
and, if this is the case, they need to processed after the WDH interrupt.
Instead of waiting for WDH we release TDs that have been touched by the
HC and replace them with new ones. Once WDH happens the floating TDs
will be returned to the free list.
Also addresses the issue seen in PR kern/55835
Thanks to both Andreas Gustafsson and Edgar Fu=C3=9F for testing. Apologi=
es to
Andreas Gustafsson for not committing this to HEAD for 4y6m.w
Remove leading space that crept in in the last change
sys/dev/fdt/pwm_backlight.c: revision 1.7
save the new current level when set by the user.
stops PBP display from going back to default brightness after
dpms, etc.
ok jmcneill.
sys/dev/ic/nvme.c: revision 1.53
PR kern/55839:
handle multiple nvme_rescan()s correctly by doing the
name-space identify only once per nsid.
fixes issue where modloading triggers multiple
rescans.
sys/netinet/ip_mroute.c: revision 1.164
PR kern/55779:
restore non-desctructive guarantee of ip_mforward() mbuf
argument. This avoids generation invalid UDP checksums
on multicast packets in ip_output().
XXX the root cause of the misguided fix in 2008 should be
XXX investigated
sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c: revision 1.11
Match linux here and wait without interrupts.
From David H. Gutteridge in PR port-amd64/55555
There's a second part to the patch, but "make our code behave the way
the upstream code does" is very welcome.
Also PR kern/54515 and possibly others.
sys/dev/pci/if_wm.c: revision 1.696
Fix little-endian dependence in wm_rxeof(), by which packets cannot be
received by 82574 and successors on big-endian machines.
Tested by aarch64eb with I210-T1 on ROCKPro64.
Thanks msaitoh for discussion!
XXX
pullup to netbsd-9 and netbsd-8
sys/sys/param.h: revision 1.679
sys/conf/param.c: revision 1.69
sys/kern/init_main.c: revision 1.533
Set a better default for MAXFILES on larger RAM machines if not
otherwise specified the kernel config file. Arbitary numbers are
20,000 files for 16GB RAM or more and 10,000 files for 1GB RAM or
more.
TODO: Adjust this and other values totally dynamically.
sys/coda/coda_vnops.c: revision 1.114 (patch)
sys/coda/coda.h: revision 1.21 (patch)
Rewrite coda_readdir() to directly process the container file.
Passing this operation down to the file system holding the container
cannot work for anything but UFS and UFS doesn't allow reading
directory from a plain file since ~2015.
Fixes PR kern/55775 Coda client, its in-kernel part, opens wrong files ...
sys/compat/linux/common/linux_socket.c: revision 1.151
Fix compat with Linux programs that use longer namelen for sockets
Linux is less strict than NetBSD and permits namelen to be larger
than valid struct sockaddr_in*. If this is the case, truncate the value
to the correct size, so that NetBSD networking does not return an error.
Reviewed by kamil
sys/dev/pci/if_wm.c: revision 1.694
sys/dev/pci/if_wm.c: revision 1.695 (via patch)
sys/dev/pci/if_wmvar.h: revision 1.47
Add WMPHY_I350. Not used yet.
Workaround for ihphy and atphy(ICH*/PCH*, 82580 and I350).
These phys stop DMA while link is down which causes device timeout.
Fix PR/kern 40981
Reviewed and tested by msaitoh@n.o, thanks.
XXX pullup-[89]
sys/kern/kern_time.c: revision 1.206
kern_time: prevent the system clock from being set too low or high
currently doing this will drive KUBSAN haywire and possibly cause
system lock-ups, so more testing should probably be performed before
we let the clock be set too many thousands of years into the future.
ditto for negative values, which were being passed by chrony for
some reason while my internet connection was being unreliable.
this also triggered some interesting KUBSAN reports.