Commit Graph

148338 Commits

Author SHA1 Message Date
Warner Losh
8c99d94c90 sys: Remove $FreeBSD$: two-line lua tag
Remove /^--\n--\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:27 -06:00
Warner Losh
2063df1471 sys: Remove $FreeBSD$: one-line catalog
Remove /^\s*\$\s*\$FreeBSD\$$\n/
2023-08-16 11:55:22 -06:00
Warner Losh
78d146160d sys: Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/
2023-08-16 11:55:17 -06:00
Warner Losh
9e78921256 sys: Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:06 -06:00
Warner Losh
031beb4e23 sys: Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:58 -06:00
Warner Losh
d4bf8003ee sys: Remove $FreeBSD$: one-line .S pattern
Remove /^\s\.(asciz|ident)\s+\"\$FreeBSD\$\".*\n/
2023-08-16 11:54:54 -06:00
Warner Losh
685dc743dc sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:36 -06:00
Warner Losh
dfc016587a sys: Remove $FreeBSD$: two-line .c pattern
Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/
2023-08-16 11:54:30 -06:00
Warner Losh
71625ec9ad sys: Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
2023-08-16 11:54:24 -06:00
Warner Losh
2ff63af9b8 sys: Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:18 -06:00
Warner Losh
95ee2897e9 sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:11 -06:00
Warner Losh
82a265ad9b sys: Remove $FreeBSD$: sound driver version
Remove /SND_DECLARE_FILE\("\$FreeBSD\$"\);/
2023-08-16 11:53:59 -06:00
John Baldwin
41582f28dd sys: Add a deprecation warning for 32-bit kernels.
Per recent discussions on arch@ and at the BSDCan developer summit, we
are considering removing support for 32-bit platforms (in some form)
for 15.0 (at the earliest).  A final decision on what will ship in
15.0 will be made closer to the release of 15.0.  However, we should
communicate the potential deprecation in 14.0 to provide notice to
users.

This commit adds a warning during boot on 32-bit kernels that they are
deprecated and may be removed in 15.0.  More details will be included
in a followup commit to RELNOTES.

Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41163
2023-08-16 09:48:51 -07:00
Navdeep Parhar
8a2e880ab0 cxgbe(4): Update firmwares to 1.27.4.0
This is the list of changes since last release, taken from the release
notes of Chelsio Unified Wire 3.18.0.1.

Version : 1.27.4.0
Date    : 07/05/2023
=======================================
Fixes
-----

BASE:
- Handle 40G to 100G cable change.
- Avoid unnecessary i2c read.
=======================================

Obtained from:	Chelsio Communications
Sponsored by:	Chelsio Communications
MFC after:	1 week
2023-08-16 08:43:43 -07:00
Warner Losh
77a999ef2f powerpc/ata: Remove non-standard __FBSDID()
This one has an extra '* ' at the front, so isn't picked up by the
scripts

Sponsored by:		Netflix
2023-08-16 01:46:47 -06:00
Warner Losh
19fae0f660 cursor.bdf: Remove $FreeBSD$ tag
Remove $FreeBSD$ tag COMMENT

Sponsored by:		Netflix
2023-08-16 01:36:00 -06:00
Warner Losh
fba400ef51 ps3: Don't add $FreeBSD$ to generated file
Sponsored by:		Netflix
2023-08-16 01:30:34 -06:00
Warner Losh
750a49b606 vnode_if: Don't add $FreeBSD$ to the output
Sponsored by:		Netflix
2023-08-16 00:23:39 -06:00
Warner Losh
fa12e8fe51 fw_stub: Don't add $FreeBSD$ to generated file
Sponsored by:		Netflix
2023-08-16 00:23:37 -06:00
Warner Losh
021c4fa6b0 miidevs2h: Ignore the first line
The first line hasn't contained version information in years. Ignore it
entirely.

Sponsored by:		Netflix
2023-08-15 23:34:19 -06:00
Warner Losh
94b73d30ef usbdevs2h: Ignore First Line and stop generating $FreeBSD$
Just ignore the first line of the usbdevs file. And stop recording what
the usbdevs* files were generated from. It's said '$FreeBSD$' for years
now...

Sponsored by:		Netflix
2023-08-15 23:34:18 -06:00
Kevin Bowling
eac761e967 e1000: Fix off by one ipcse
This has been off by one in the FreeBSD drivers as far back as I've
looked.  Emperically HW and SW emulations I have available don't seem to
mind.  Noticed while debugging other issues.

MFC after:	3 days
2023-08-15 14:39:35 -07:00
John Baldwin
081c22db85 nvme.h: Fix a comment typo in admin opcode enum
Sponsored by:	Chelsio Communications
2023-08-15 11:06:58 -07:00
Ed Maste
eb228f2b21 drm2: remove unused Alpha and MIPS #defines 2023-08-15 09:43:45 -04:00
Ed Maste
fe5d8f7a64 x86: include CPU ID in "Invalid CPU ID" panic
Sponsored by:	The FreeBSD Foundation
2023-08-15 09:38:29 -04:00
Ed Maste
e0c6e89108 arm64: increase MAXCPU to 1024, following amd64
As in commit 9051987e40 for amd64, support up to 1024 CPU cores.
arm64 hardware with more than 256 CPU cores is currently available and
will become increasingly common over FreeBSD 14's lifetime.

PR:		269572
Reviewed by:	andrew
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41319
2023-08-15 08:22:02 -04:00
Andrew Turner
9d09051e26 arm64: Add a driver for the Arm PL031 RTC
It is a simple RTC found in some Arm SoCs, e.g. the Arm Juno.

Reviewed by:	manu
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D41267
2023-08-15 13:13:39 +01:00
Emmanuel Vadot
81b41b2ef5 ofw_firmware: Return BUS_PROBE_GENERIC instead of 0
While here make it only probe if the node is directly under the root
one. If it's not it's likely a device node named 'firmware' and not the
firmware group we're interested in.

Suggested by:	jhb
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-08-15 08:45:22 +02:00
Kevin Bowling
797e480cba e1000: disable TSO on lem(4) and em(4)
Disable TSO on lem(4) and em(4) until a ring stall can be debugged.

I am not able to reproduce the issue on lem(4) but disabling there in
abundance of caution in case the issue is not specific to em(4).

Reported by:	grog
2023-08-14 17:25:39 -07:00
Warner Losh
33469f1011 nvme: use mtx_padaalign instead of mtx + alignment attribute
nvme driver predates, it seems, mtx_padalign. Modernize.

Sponsored by:		Netflix
2023-08-14 16:33:26 -06:00
Ed Maste
43e545e8e0 pci: return 0 for pci_remap_intr_method MSI-X non-error case
When remapping a MSI-X vector, we would always return ENOENT, even if
successful.  This didn't really matter, as the sole caller of
BUS_REMAP_INTR also didn't check for errors.

Return 0 if there's no error, so that we can start handling (or at least
warning about) actual failures.

Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41449
2023-08-14 17:56:15 -04:00
Ed Maste
a51f81c2e5 x86: move EARLY_AP_STARTUP into DEFAULTS
EARLY_AP_STARTUP was introduced in 2016 (commit fdce57a042) with note:

    As a transition aid, the new behavior is moved under a new
    kernel option (EARLY_AP_STARTUP). This will allow the option
    to be turned off if need be during initial testing. I hope to
    enable this on x86 by default in a followup commit ...

It was enabled by default, but became effectively mandatory (on x86)
some time later.  Move it to DEFAULTS to avoid an unbootable system if
the option is left out of a custom kernel configuration file.

Reported by:	wollman
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41352
2023-08-14 16:17:48 -04:00
Gleb Smirnoff
d29b95ecc0 sockets: on accept(2) don't copy all of so_options to new socket
As uncovered by e3ba0d6add we are copying lots of irrelevant options
from the listener to an accepted socket, even those that aren't relevant
to a non-listener, e.g. SO_REUSE*, SO_ACCEPTFILTER.  Stop doing that
and provide a fixed opt-in list for options to be inherited.  Ideally
we shall not inherit anything at all.  For compatibility inherit a set
of options that are meaningful for a non-listening socket of a protocol
that can listen(2).

Differential Revision:	https://reviews.freebsd.org/D41412
Fixes:			e3ba0d6add
2023-08-14 12:56:08 -07:00
Dmitry Chagin
f3e11927dc vm: Allow MAP_32BIT for all architectures
Reviewed by:		alc, kib, markj
Differential revision:	https://reviews.freebsd.org/D41435
2023-08-14 20:20:20 +03:00
Dmitry Chagin
0ddd32b617 vm: MAP_32BIT_MAX_ADDR defined in sys/mman.h
Reviewed by:		kib
Differential revision:	https://reviews.freebsd.org/D41434
2023-08-14 20:18:30 +03:00
Bartosz Sobczak
8e6654a6a5
ofed: fix roce gid insertion for vlan interfaces
When attempting to use vlan interface the correct GID
wasn't created due to incorrect ifp validation.

The problem was introduced in
3e142e0767 ('ofed: Mechanically convert to IfAPI)

Signed-off-by: Bartosz Sobczak bartosz.sobczak@intel.com
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

PR:		273043
Sponsored by:	Intel Corporation
Reviewed by:	jhibbits@, erj@
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41426
2023-08-14 08:53:43 -07:00
Dmitry Chagin
2467ccddc0 linux(4): Fix MSG_CTRUNC handling in recvmsg()
The MSG_CTRUNC flag of the msg_flags member of the message header is
set uppon successful completition if the control data was truncated.
Upon return from a successful call msg_controllen should contain the
length of the control message sequence.

Fixes:		0eda2cea
MFC after:	1 week
2023-08-14 15:46:12 +03:00
Dmitry Chagin
9d0c9b6d6a linux(4): Add a comment explaining udata freeing on error
MFC after:	1 week
2023-08-14 15:46:12 +03:00
Dmitry Chagin
de20eb26d0 linux(4): Refactor recvmsg
As the amount of handled anxiliary messages grows move they handlers
into a separate functions.

MFC after:	1 week
2023-08-14 15:46:12 +03:00
Dmitry Chagin
bbaa5523c0 linux(4): Skip unsupported anxiliary message
Instead of returning error, skip unsupported anxiliary messages and
fail if no one handled.

MFC after:	1 week
2023-08-14 15:46:12 +03:00
Dmitry Chagin
a21238d843 linux(4): Improve readability of recvmsg control buffer copyout code
MFC after:	1 week
2023-08-14 15:46:12 +03:00
Dmitry Chagin
43c3beb741 linux(4): Drop bogus empty line in linux_socket.c
MFC after:	1 week
2023-08-14 15:46:12 +03:00
Dmitry Chagin
7d561928e6 linux(4): Fix control message size calculation again
It looks Linux recvmsg allows msg_controllen size less then CMSG_SPACE
buffer, at least for case with one cmsghdr. Glibc misc/tst-scm_rights
test succed on Ubuntu 23.04

Fixes:	 	67116c69 "linux(4): Fix control message size calculation"
MFC after:	1 week
2023-08-14 15:46:11 +03:00
Michael Tuexen
749a7fb588 sctp: cleanup
Do not put a variable in the stcb for passing it to a function.
Just use a parameter of the function. No functional change intended.

MFC after:	1 week
2023-08-14 12:27:39 +02:00
Michael Tuexen
e8eb0b7134 sctp: add an assert
This enforces a condition mentioned in a comment.

MFC after:	1 week
2023-08-13 22:47:43 +02:00
Michael Tuexen
6cb8b3b5cd sctp: use consistent names for locking macros
While there, add also a macro for an assert. Will be used shortly.
No functional change intended.

MFC after:	1 week
2023-08-13 22:35:53 +02:00
Kevin Bowling
bef7d49101 ixgbe: define IXGBE_LE32_TO_CPUS
Richard Lowe notes in PR 170267 IXGBE_LE32_TO_CPUS was previously
directly defined as le32dec() which is a pure function but the shared
code is expecting an in place conversion.

In SVN r282289 its assignment was removed altogether.

There was some deliberation in the PR on what to define this as, we
just need to do the update in place which is easy enough.

The uintptr_t casts in the shared code were from a DPDK sync and are
unwanted with our new ixgbe_osdep.h implementation.

PR:		170267
Reported by:	Richard Lowe <richlowe@richlowe.net>
MFC after:	1 week
2023-08-13 18:55:39 -07:00
Emmanuel Vadot
69f8cc60aa ofw_firmware: Only match if there is no compatible
If there is a compatible string it likely means that the firmware needs
a dedicated driver (like on RPI*).

PR:	273087
Tested-by:	Mark Millard <marklmi26-fbsd@yahoo.com>
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Fixes:		fdfd3a90b6 ("ofw: Add a ofw_firmware driver")
2023-08-13 11:19:44 +02:00
Konstantin Belousov
93626d5437 tc_fill_vdso_timehands32(): fix
On 64bit, there is a 4-byte hole in struct vdso_timekeep32 after
tk_current, if the structure is not packed.  This is due to the MD
th_x86_pvc_last_systime being 64bit.

Change amd64 VDSO_TIMEHANDS_MD32 to not use uint64_t, replace it with
pair of uint32_t, as it is done for all other members.

PR:	273085
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-13 01:34:08 +03:00
Kirk McKusick
220427da0e Set UFS/FFS file type to snapshot before changing its block pointers.
A UFS/FFS snapshot file is identified with the SF_SNAPSHOT
flag to identify it as a snapshot. This flag needs to be
set before setting some of its block pointers to the special
values BLK_SNAP and BLK_NOCOPY. If the snapshot creation fails
and we call VOP_REMOVE(), the SF_SNAPSHOT flag will let the
remove routine know that the special block pointer values need
to be rolled back before attempting deletion of the file.

Also ensure that an fsck is required after setting superblock
values in the ffs_checkcgintegrity() routine.

Reported-by:  Peter Holm
Tested-by:    Peter Holm
MFC-after:    1 week
Sponsored-by: The FreeBSD Foundation
2023-08-12 11:20:40 -07:00