]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agosmbfs: Remove unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
smbfs: Remove unused variable.

2 years agosmbfs_rename: Move all references to flags under #ifdef notnow.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
smbfs_rename: Move all references to flags under #ifdef notnow.

2 years agosgx: Remove unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
sgx: Remove unused variable.

2 years agosfxge: Remove unused variables.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
sfxge: Remove unused variables.

2 years agortwn: Restore RF_ENV control type after initializing RF.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
rtwn: Restore RF_ENV control type after initializing RF.

Both rwlwifi in Linux and rtwn in OpenBSD restore this register,
and the existing code was saving the value and not using it.

Reported by: -Wunused-but-set-variable
Reviewed by: imp
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D34838

2 years agokrping: Remove unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
krping: Remove unused variable.

2 years agoqlxge: Remove unused variables.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
qlxge: Remove unused variables.

2 years agoqlxgbe: Remove unused variables.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
qlxgbe: Remove unused variables.

2 years agoqlxgbe: Use select_value_count variable.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
qlxgbe: Use select_value_count variable.

2 years agoqlxgb: Remove unused variables.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
qlxgb: Remove unused variables.

2 years agoqlnx: Disable unused by set warnings for ecore_ll2.c.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
qlnx: Disable unused by set warnings for ecore_ll2.c.

The OSAL_SPIN_LOCK_IRQSAVE macros take a flags argument that is unused
on FreeBSD (but used on other platforms).

2 years agoqlnx: Mark variables only used in debug traces as unused.
John Baldwin [Fri, 8 Apr 2022 00:01:28 +0000 (17:01 -0700)]
qlnx: Mark variables only used in debug traces as unused.

2 years agoqlnx: Return error from qlnxr_mod_load if it fails.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
qlnx: Return error from qlnxr_mod_load if it fails.

Fix qlnx_rdma_register_if return ENXIO rather than -1 on error and
propagate that error to the caller in qlnxr_mod_load.

2 years agoqlnx: Comment out remaining references to tx_data_bd.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
qlnx: Comment out remaining references to tx_data_bd.

2 years agoqlnx: Move all references to total_rx_count under #ifdef QLNX_SOFT_LRO.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
qlnx: Move all references to total_rx_count under #ifdef QLNX_SOFT_LRO.

2 years agoqlnx: Remove unused variables.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
qlnx: Remove unused variables.

2 years agootus: Return computed error value instead of ENXIO from otus_raw_xmit.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
otus: Return computed error value instead of ENXIO from otus_raw_xmit.

2 years agoocs: Remove unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
ocs: Remove unused variable.

2 years agooce: Remove unused variables.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
oce: Remove unused variables.

2 years agonvdimm: Remove unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
nvdimm: Remove unused variable.

2 years agong_tag: Move totlen fully under #ifdef NG_TAG_DEBUG.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
ng_tag: Move totlen fully under #ifdef NG_TAG_DEBUG.

2 years agong_ppp: Remove unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
ng_ppp: Remove unused variable.

2 years agong_netflow: Remove unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
ng_netflow: Remove unused variable.

2 years agong_lmi: Move all of highest_dlci under #if 0.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
ng_lmi: Move all of highest_dlci under #if 0.

2 years agong_ksocket: Remove unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:27 +0000 (17:01 -0700)]
ng_ksocket: Remove unused variable.

2 years agong_bt: Remove an unused variable.
John Baldwin [Fri, 8 Apr 2022 00:01:26 +0000 (17:01 -0700)]
ng_bt: Remove an unused variable.

Leave a comment describing the field in the packet it represented.

2 years agongatm: Expand #if 0 to cover all lines involving mlen.
John Baldwin [Fri, 8 Apr 2022 00:01:26 +0000 (17:01 -0700)]
ngatm: Expand #if 0 to cover all lines involving mlen.

2 years agomxgbe: Remove a dummy variable used to force a register read.
John Baldwin [Fri, 8 Apr 2022 00:01:26 +0000 (17:01 -0700)]
mxgbe: Remove a dummy variable used to force a register read.

Keep the register read by casting the result of the pointer indirect
to void.

2 years agomthca: Mark a variable used only in debug traces as unused.
John Baldwin [Fri, 8 Apr 2022 00:01:26 +0000 (17:01 -0700)]
mthca: Mark a variable used only in debug traces as unused.

2 years agonfs: do not panic on bootpc_init when no interfaces are found
Alfredo Dal'Ava Junior [Thu, 7 Apr 2022 22:33:26 +0000 (19:33 -0300)]
nfs: do not panic on bootpc_init when no interfaces are found

Replaces panic with a warning message to allow kernel continue
when no bootp eligible network interfaces are found.

This avoids having to build a custom kernel when using a local root
file system on targets like powerpcspe that expects bootp/NFS by
default.

Reviewed by: rmacklem
MFC after: 2 weeks
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D34567

2 years agoLinuxKPI: skbuff: handle dev_alloc_skb() correctly
Bjoern A. Zeeb [Thu, 7 Apr 2022 18:06:55 +0000 (18:06 +0000)]
LinuxKPI: skbuff: handle dev_alloc_skb() correctly

dev_alloc_skb() comapred to alloc_skb() reserves some headroom
at the beginning of the skb which is used by drivers.
Split the code for the two cases and reserve NET_SKB_PAD space,
which should at least be 32 octets.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agonet80211: improve error handling from ieee80211_parse_beacon()
Bjoern A. Zeeb [Thu, 7 Apr 2022 20:50:39 +0000 (20:50 +0000)]
net80211: improve error handling from ieee80211_parse_beacon()

Following up on fb8c87b4f3bfdfac014f9d894fe75fbad0391b24, which was
supposed to go into all supported branches, increase ieee80211_scanparams
status field from 8bit to 32bit (enum size) and add a dedicated error
code for Mesh ID.

Sponsored by: The FreeBSD Foundation

2 years agomlx5: Pass the correct data pointer to the add_dst_cb instead of NULL.
John Baldwin [Thu, 7 Apr 2022 17:46:48 +0000 (10:46 -0700)]
mlx5: Pass the correct data pointer to the add_dst_cb instead of NULL.

Reported by: -Wunused-but-set-variable
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34812

2 years agobnhd: Write out updated resource dependencies from the table.
John Baldwin [Thu, 7 Apr 2022 17:46:19 +0000 (10:46 -0700)]
bnhd: Write out updated resource dependencies from the table.

The driver parsed the table to update the relevant resource map
registers, but failed to write the new register value after computing
it.

Reported by: -Wunused-but-set-variable
Reviewed by: landonf, imp
Differential Revision: https://reviews.freebsd.org/D34814

2 years agosctp: remove a mutex not used anymore
Michael Tuexen [Thu, 7 Apr 2022 15:54:57 +0000 (17:54 +0200)]
sctp: remove a mutex not used anymore

MFC after: 3 days

2 years agosctp: use variable names in a consistent way
Michael Tuexen [Thu, 7 Apr 2022 15:51:31 +0000 (17:51 +0200)]
sctp: use variable names in a consistent way

No functional change intended.

MFC after: 3 days

2 years agoriscv: eliminate physmap global
Mitchell Horne [Thu, 7 Apr 2022 15:13:19 +0000 (12:13 -0300)]
riscv: eliminate physmap global

Since physical memory management is now handled by subr_physmem.c, the
need to keep this global array has diminished. It is not referenced
outside of early boot-time, and is populated by physmem_avail() in
pmap_bootstrap(). Just allocate the array on the stack for the duration
of its lifetime.

The check against physmap[0] in initriscv() can be dropped altogether,
as there is no consequence for excluding a memory range twice.

Reviewed by: markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34778

2 years agoHave stpncpy tests ask the kernel for the page size
Andrew Turner [Thu, 7 Apr 2022 15:05:57 +0000 (16:05 +0100)]
Have stpncpy tests ask the kernel for the page size

It may be dynamic so we can't rely on PAGE_SIZE being present or
correct.

2 years agoHave path_test ask the kernel for the page size
Andrew Turner [Thu, 7 Apr 2022 14:59:38 +0000 (15:59 +0100)]
Have path_test ask the kernel for the page size

It may be dynamic so we can't rely on PAGE_SIZE being present or
correct.

Sponsored by: The FreeBSD Foundation

2 years agoHave the coredump_phnum test ask for the page size
Andrew Turner [Thu, 7 Apr 2022 14:59:32 +0000 (15:59 +0100)]
Have the coredump_phnum test ask for the page size

The page size may be dynamically selected on boot. Have the
coredump_phnum test helper ask the kernel for the correct value.

Sponsored by: The FreeBSD Foundation

2 years agopf syncookies: fix memory leak
Kristof Provost [Thu, 7 Apr 2022 06:41:37 +0000 (08:41 +0200)]
pf syncookies: fix memory leak

We forgot to free the nvlist (and packed nvlist) on success.
While here start using the ERROUT macro to clean up error handling, and
to add SDTs for better debugging.

Reported by: Coverity
CID: 1473150

2 years agopf: fix memory leak
Kristof Provost [Thu, 7 Apr 2022 06:35:12 +0000 (08:35 +0200)]
pf: fix memory leak

The nvlist is allocated in pf_keth_rule_to_nveth_rule(). There's no need
to allocate one in the calling function. Especially not as we overwrite
the pointer to the new nvlist with the one allocated by
pf_keth_rule_to_nveth_rule(), leaking memory.

Reported by: Coverity
CID: 1476128
Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoHave rtld query the page size from the kernel
Andrew Turner [Mon, 4 Apr 2022 15:05:40 +0000 (16:05 +0100)]
Have rtld query the page size from the kernel

To allow for a dynamic page size on arm64 have the runtime linker
query the kernel for the currentl page size.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34765

2 years agoEnable the kcov tests on supported architectures
Andrew Turner [Thu, 7 Apr 2022 13:31:32 +0000 (14:31 +0100)]
Enable the kcov tests on supported architectures

i386 and 32-bit powerpc lack support for the needed atomic operations
in userspace.

Sponsored by: The FreeBSD Foundation

2 years agoEnable subr_physmem_test on supported architectures
Andrew Turner [Thu, 7 Apr 2022 13:29:25 +0000 (14:29 +0100)]
Enable subr_physmem_test on supported architectures

Only build where it's supported.

While here add support for amd64 to help with testing.

Sponsored by: The FreeBSD Foundation

2 years agoman pages: Fix typo
Christian Weisgerber [Wed, 6 Apr 2022 14:46:39 +0000 (16:46 +0200)]
man pages: Fix typo

s/the the/the/

Approved by: ygy (doc)

2 years agosiftr: expose t_flags2 in siftr output
Tom Jones [Thu, 7 Apr 2022 09:12:33 +0000 (10:12 +0100)]
siftr: expose t_flags2 in siftr output

Replace the old snd_bwnd field which was kept for compatibility with the
t_flags2 field from the tcpcb. This exposes in siftr logs interesting
things such as ECN, PLPMTUD, Accurate ECN and if first bytes are
complete.

Reviewed by: rscheff (transport), chengc_netapp.com,  debdrup (manpages)
Sponsored by:   NetApp, Inc.
Sponsored by:   Klara, Inc.
X-NetApp-PR:    #73
Differential Revision: https://reviews.freebsd.org/D34672

2 years agovidcontrol: disable p, P, and H when vt(4) is in use
Ed Maste [Thu, 7 Apr 2022 00:19:54 +0000 (20:19 -0400)]
vidcontrol: disable p, P, and H when vt(4) is in use

These options use the CONS_SCRSHOT ioctl to capture the contents of the
current console, which is not yet supported by vt(4).  Disable the
options when vt(4) is in use rather than emitting a possibly confusing
error message.

This change should be reverted if CONS_SCRSHOT is implemented for vt(4).

PR: 263099
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

2 years agolio: Quiet set but unused warnings.
John Baldwin [Wed, 6 Apr 2022 23:45:29 +0000 (16:45 -0700)]
lio: Quiet set but unused warnings.

- Remove unused variables.

- Mark a value only used in debug traces as unused.

- Remove variables only used for device register reads with
  side-effects with void casts on the read.

2 years agolibalias: Remove unused variables.
John Baldwin [Wed, 6 Apr 2022 23:45:29 +0000 (16:45 -0700)]
libalias: Remove unused variables.

2 years agoalias_nbt: Move debug-only variable under #ifdef LIBALIAS_DEBUG.
John Baldwin [Wed, 6 Apr 2022 23:45:29 +0000 (16:45 -0700)]
alias_nbt: Move debug-only variable under #ifdef LIBALIAS_DEBUG.

2 years agokgssapi krb5: Remove unused variables.
John Baldwin [Wed, 6 Apr 2022 23:45:29 +0000 (16:45 -0700)]
kgssapi krb5: Remove unused variables.

2 years agoix: Mark variables only used in debug traces as unused.
John Baldwin [Wed, 6 Apr 2022 23:45:29 +0000 (16:45 -0700)]
ix: Mark variables only used in debug traces as unused.

2 years agoip6_mroute: Mark a variable only used in a debug trace as unused.
John Baldwin [Wed, 6 Apr 2022 23:45:29 +0000 (16:45 -0700)]
ip6_mroute: Mark a variable only used in a debug trace as unused.

2 years agoibcore: Disable set but unused warnings.
John Baldwin [Wed, 6 Apr 2022 23:45:29 +0000 (16:45 -0700)]
ibcore: Disable set but unused warnings.

2 years agoena: Remove unused variable.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
ena: Remove unused variable.

2 years agosc vga: Remove unused variables.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
sc vga: Remove unused variables.

Cast the return value of intentional dummy reads to void.

2 years agoixl: Remove unused variables.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
ixl: Remove unused variables.

2 years agoiavf: Quite set but not used warnings.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
iavf: Quite set but not used warnings.

Move declaration of dev in iavf_if_attach_post under #ifdef IXL_DEBUG.

Remove unused ifp in iavf_stop.

2 years agoaxgbe: Remove unused variable in axgbe_msix_que.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
axgbe: Remove unused variable in axgbe_msix_que.

Keep the register read just in case though it seems possible it is not
needed as the function later clears specific interrupts via a write to
the same register.

2 years agopowernow(4): Fix unused variable warnings by using the variables.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
powernow(4): Fix unused variable warnings by using the variables.

2 years agoisci: Disable set but unused warnings.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
isci: Disable set but unused warnings.

2 years agoisci: Propagate error from bus_dma_tag_create.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
isci: Propagate error from bus_dma_tag_create.

Return error from isci_controller_allocate_memory if bus_dma_tag_create
fails instead of ignoring the error.

2 years agohyperv storvsc: Remove unused variables.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
hyperv storvsc: Remove unused variables.

2 years agobxe: Quiet set but not used warnings.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
bxe: Quiet set but not used warnings.

Comment out other references to more_tx since the only use is commented out.

Remove unused is_parity variable.

2 years agopsm: Remove write-only variables.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
psm: Remove write-only variables.

2 years agomlx5: Remove write-only variables.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
mlx5: Remove write-only variables.

2 years agomulticast code: Quiet unused warnings for variables used for KTR traces.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
multicast code: Quiet unused warnings for variables used for KTR traces.

For nallow and nblock, move the variables under #ifdef KTR.

For return values from functions logged in KTR traces, mark the
variables as __unused rather than having to #ifdef the assignment of
the function return value.

2 years agochange_mpath_route: Remove write-only nh variable.
John Baldwin [Wed, 6 Apr 2022 23:45:28 +0000 (16:45 -0700)]
change_mpath_route: Remove write-only nh variable.

While here, cleanup the style of the function prologue by moving an
assignment out of the middle of two variable declaration blocks.

2 years agounlink_nhgrp: Remove write-only variable.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
unlink_nhgrp: Remove write-only variable.

Possibly one could assert that ret should always be 0 here (that is,
that there was always an index found in the bitmask).  That should be
true since a bitmask index is allocated before the nhgrp is inserted
in the ctl->gr_head list in link_nhgrp.

2 years agoxen netback: Remove write-only variables.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
xen netback: Remove write-only variables.

2 years agopvscsi_adapter_reset: Mark val as unused.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
pvscsi_adapter_reset: Mark val as unused.

This variable is unsed in a debug trace conditional on a private
debugging macro (so not eligible for __diagused).

2 years agouhci: Remove write-only variable.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
uhci: Remove write-only variable.

2 years agoac97_initmixer: Remove write-only variables.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
ac97_initmixer: Remove write-only variables.

2 years agocmi: Mark rsp as unused.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
cmi: Mark rsp as unused.

If the DEB macro is manually enabled to enable tracing then this
variable is used.  This doesn't use __diagused since it is dependent
on a non-standard debugging macro.

2 years agoppc: Fix set but not used warnings on !i386.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
ppc: Fix set but not used warnings on !i386.

Move fetch of SYS_RES_IOPORT resource and associated variables under
existing #ifdef __i386__.

2 years agoiwn: Remove write-only extra variable.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
iwn: Remove write-only extra variable.

extra is used in a commented-out expression to compute
scan_service_time.  Use #if 0 instead of a comment for the disabled
scan_service_time expression and move the unused computation of extra
under the same #if.

2 years agoiwi: Remove write-only status variable.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
iwi: Remove write-only status variable.

Skip over unused field from asresp frame header.

2 years agox86 bounce_bus_dma_tag_destroy: Silence set but unused warning.
John Baldwin [Wed, 6 Apr 2022 23:45:27 +0000 (16:45 -0700)]
x86 bounce_bus_dma_tag_destroy: Silence set but unused warning.

2 years agovidcontrol: be explicit that -p and -P are sc(4) only
Ed Maste [Wed, 6 Apr 2022 23:39:19 +0000 (19:39 -0400)]
vidcontrol: be explicit that -p and -P are sc(4) only

PR: 263099
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

2 years agofusefs: fix two bugs regarding VOP_RECLAIM of the root inode
Alan Somers [Sat, 2 Apr 2022 19:31:24 +0000 (13:31 -0600)]
fusefs: fix two bugs regarding VOP_RECLAIM of the root inode

* We never send FUSE_LOOKUP for the root inode, since its inode number
  is hard-coded to 1.  Therefore, we should not send FUSE_FORGET for it,
  lest the server see its lookup count fall below 0.

* During VOP_RECLAIM, if we are reclaiming the root inode, we must clear
  the file system's vroot pointer.  Otherwise it will be left pointing
  at a reclaimed vnode, which will cause future VOP_LOOKUP operations to
  fail.  Previously we only cleared that pointer during VFS_UMOUNT.  I
  don't know of any real-world way to trigger this bug.

MFC after: 2 weeks
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D34753

2 years agoAvoid dereferencing a possibly null pointer.
Kirk McKusick [Wed, 6 Apr 2022 21:25:11 +0000 (14:25 -0700)]
Avoid dereferencing a possibly null pointer.

Reported by: Coverity
CID:         1475868

2 years agocxgbe(4): Display the number of free PM pages and p-structs in meminfo.
Navdeep Parhar [Wed, 6 Apr 2022 00:15:31 +0000 (17:15 -0700)]
cxgbe(4): Display the number of free PM pages and p-structs in meminfo.

MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agocxgbe(4): meminfo should get the TLS region's limits from the hardware.
Navdeep Parhar [Tue, 5 Apr 2022 21:54:11 +0000 (14:54 -0700)]
cxgbe(4): meminfo should get the TLS region's limits from the hardware.

meminfo is meant for debugging and it should read hardware configuration
directly when possible instead of relying on values queried from the
firmware.  Rename the region to "TLSKey region" to match other drivers
while here.

MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agocxgbe(4): Fix the sorting order of the regions listed in meminfo.
Navdeep Parhar [Tue, 5 Apr 2022 21:13:11 +0000 (14:13 -0700)]
cxgbe(4): Fix the sorting order of the regions listed in meminfo.

MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agosmbfs: caution against use in the manpage
Ed Maste [Wed, 6 Apr 2022 18:25:37 +0000 (14:25 -0400)]
smbfs: caution against use in the manpage

It supports only the obsolete SMBv1 protocol, is known to be buggy, and
likely has security vulnerabilities.  It will either be updated or
removed in the future, but for now at least describe the current state
in the man page.

PR: 263043
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

2 years agopf: use ERROUT_IOCTL()
Kristof Provost [Wed, 6 Apr 2022 14:45:18 +0000 (16:45 +0200)]
pf: use ERROUT_IOCTL()

Use ERROUT_IOCTL() rather than hand-rolling the macro. This adds DTrace
SDTs in the error path, making debugging ioctl errors easier.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agopass(4): Fix a typo in the manual page
Gordon Bergling [Wed, 6 Apr 2022 16:46:26 +0000 (18:46 +0200)]
pass(4): Fix a typo in the manual page

- s/modfied/modified/

MFC after: 3 days

2 years agomt(3): Fix a typo in the manual page
Gordon Bergling [Wed, 6 Apr 2022 16:41:08 +0000 (18:41 +0200)]
mt(3): Fix a typo in the manual page

- s/mulitple/multiple/

MFC after: 3 days

2 years agong_btsocket(4): Fix a typo in an error message
Gordon Bergling [Wed, 6 Apr 2022 16:27:29 +0000 (18:27 +0200)]
ng_btsocket(4): Fix a typo in an error message

- s/mulitplexor/multiplexor/

MFC after: 5 days

2 years agolinux(4): Fix a typo in itimerspec conversion routine.
Dmitry Chagin [Wed, 6 Apr 2022 14:40:00 +0000 (17:40 +0300)]
linux(4): Fix a typo in itimerspec conversion routine.

MFC after: 3 days

2 years agoDisable the physmem test for now
Andrew Turner [Wed, 6 Apr 2022 14:02:10 +0000 (15:02 +0100)]
Disable the physmem test for now

It fails to build on at least i386

2 years agoHandle non-page aligned/sized memory in physmem
Andrew Turner [Mon, 28 Mar 2022 11:37:09 +0000 (12:37 +0100)]
Handle non-page aligned/sized memory in physmem

In some configurations the firmware may pass memory regions that are
not page sized or aligned, e.g. when using 16k pages on arm64. If this
is the case we will calculate many small regions because the alignment
is applied before being inserted. As we round the start up and end down
this will leave a 1 page hole between what should have been a single
region.

Fix by keeping the original alignment until we are just about to insert
the region into the avail array.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34694

2 years agoPort subr_physmem to userspace and add tests
Andrew Turner [Mon, 28 Mar 2022 10:20:29 +0000 (11:20 +0100)]
Port subr_physmem to userspace and add tests

These give us some confidience we haven't broken anything in early
boot code that may be running before the console.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34691

2 years agoFix a coherent bus check in the arm64 busdma
Andrew Turner [Mon, 4 Apr 2022 09:28:59 +0000 (10:28 +0100)]
Fix a coherent bus check in the arm64 busdma

In the arm64 busdma we have an internal flag to signal when a tag is
for a cache-coherent device. In this case we don't need to adjust the
size and alignment of allocated buffers to be within a cache line.

The cache line adjustment was incorrectly using the coherent flag
passed in to bus_dma_tag_create and not the internal flag. Fix it to
use the latter to reduce the memory usage slightly.

Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34763

2 years agoMove the arm64 DMAP creation to C
Andrew Turner [Tue, 15 Mar 2022 17:05:48 +0000 (17:05 +0000)]
Move the arm64 DMAP creation to C

To simplify the creation of the direct map (DMAP) region on arm64 move
it from the pre-C code into pmap. This simplifies the DMAP creation
as we can use the notmal index macros, and should reduce the number
of pages needed to hold the level 1 tables to just those needed.

Reviewed by: alc, dch
Tested by: dch, kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34568

2 years agostress2: Add new write(2) test. Remove sctp.sh after problem fixed
Peter Holm [Wed, 6 Apr 2022 05:25:17 +0000 (07:25 +0200)]
stress2: Add new write(2) test. Remove sctp.sh after problem fixed

2 years agostress2: Added a write(2) fuzz test scenario
Peter Holm [Wed, 6 Apr 2022 05:24:42 +0000 (07:24 +0200)]
stress2: Added a write(2) fuzz test scenario

2 years agoneta: remove write only variable
Warner Losh [Wed, 6 Apr 2022 02:03:04 +0000 (20:03 -0600)]
neta: remove write only variable

Sponsored by: Netflix

2 years agomxge: Remove write only variables, mark ifp __unused
Warner Losh [Wed, 6 Apr 2022 02:02:39 +0000 (20:02 -0600)]
mxge: Remove write only variables, mark ifp __unused

Sponsored by: Netflix