Commit Graph

275095 Commits

Author SHA1 Message Date
John Baldwin
7707822db5 dpms: Remove unused devclass argument to DRIVER_MODULE. 2022-05-09 12:22:01 -07:00
John Baldwin
ea7e37731f dcons: Remove unused devclass argument to DRIVER_MODULE. 2022-05-09 12:22:01 -07:00
John Baldwin
478c66fd8e ccr: Remove unused devclass argument to DRIVER_MODULE. 2022-05-09 12:22:01 -07:00
John Baldwin
c54f3323e5 cxgb: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 12:22:01 -07:00
John Baldwin
b3ed7cc5e6 coretemp: Remove unused devclass argument to DRIVER_MODULE. 2022-05-09 12:22:01 -07:00
John Baldwin
950143eccf chromebook_platform: Remove unused devclass argument to DRIVER_MODULE. 2022-05-09 12:22:01 -07:00
John Baldwin
84c5f982ef gpio: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 12:22:01 -07:00
John Baldwin
d885615a4f Remove unused gpioc_devclass. 2022-05-09 12:22:01 -07:00
John Baldwin
e8590c9702 Remove unused ofwgpiobus_devclass. 2022-05-09 12:22:00 -07:00
John Baldwin
5f31d14a92 Remove unused spibus_devclass and ofw_spibus_devclass. 2022-05-09 12:22:00 -07:00
John Baldwin
b338e3ea3c bwi/bwn: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 12:22:00 -07:00
John Baldwin
64d3221c61 bnxt: Remove unused devclass argument to DRIVER_MODULE. 2022-05-09 12:22:00 -07:00
John Baldwin
162c26ad77 bhnd: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 12:22:00 -07:00
John Baldwin
05bdf34a9d Remove unused bhndb_devclass. 2022-05-09 12:22:00 -07:00
John Baldwin
817be43174 Remove unused cfi_devclass. 2022-05-09 12:22:00 -07:00
John Baldwin
867864a2fb asmc: Remove unused devclass argument to DRIVER_MODULE. 2022-05-09 12:22:00 -07:00
John Baldwin
83a273efce dev/amd*: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 12:22:00 -07:00
Ruslan Bukin
b7fca06bbf Split-out SID-getting code to a separate functions.
Also ensure we are dealing with PCI-class devices.

Sponsored by:	UKRI
2022-05-09 20:13:57 +01:00
Dmitry Chagin
7b76c79b0b linux(4): Regen for prctl fix.
MFC after:		2 weeks
2022-05-09 21:48:15 +03:00
Dmitry Chagin
bfae7fbaa2 linux(4): Fix 039e98e6.
The patch was about an year in my local queue and I still screwed up...

MFC after:		2 weeks
2022-05-09 21:45:51 +03:00
Dmitry Chagin
109c2bd212 linux(4); Style.
MFC after:		2 weeks
2022-05-09 21:16:48 +03:00
Dmitry Chagin
07d108932a linux(4): Return native error from futex_atomic_op to avoid conversion by the caller.
MFC after:		2 weeks
2022-05-09 21:16:31 +03:00
Dmitry Chagin
b17446281d linux(4): Fixed offset miscalculation in the preadv/pwritev syscalls.
MFC after:		2 weeks
2022-05-09 21:11:37 +03:00
Dmitry Chagin
e768576718 linux(4): Regen for prctl syscall.
MFC after:		2 weeks
2022-05-09 21:10:48 +03:00
Dmitry Chagin
039e98e60c linux(4): Change prctl syscall definition to match Linux actual one.
Otherwise argX conversion leads to an unexpected behaviour.

MFC after:		2 weeks
2022-05-09 21:09:39 +03:00
Dmitry Chagin
5eec19c8eb linux(4): The futex_wait operation should restart.
It's ok from the futex_wait perspective as umtxq_sleep method uses
absolute sleep timeout.

MFC after:		2 weeks
2022-05-09 21:08:59 +03:00
Gleb Smirnoff
9c328531f0 domains: undocument dom_destroy() and fix .Dd
Fixes:	24e1c6ae7d
2022-05-09 10:53:10 -07:00
Gleb Smirnoff
7db54446c6 sockbufs: make sbrelease_internal() private 2022-05-09 10:43:01 -07:00
Gleb Smirnoff
a982ce0442 sockets: remove the socket-on-stack hack from sorflush()
The hack can be tracked down to 4.4BSD, where copy was performed
under splimp() and then after splx() dom_dispose was called.
Stevens has a chapter on this function, but he doesn't answer why
this trick is necessary.  Why can't we call into dom_dispose under
splimp()?  Anyway, with multithreaded kernel the hack seems to be
necessary to avoid LORs between socket buffer lock and different
filesystem locks, especially network file systems.

The new socket buffers KPI sbcut() from 1d2df300e9 allow us to get
rid of the hack.

Reviewed by:		markj
Differential revision:	https://reviews.freebsd.org/D35125
2022-05-09 10:43:01 -07:00
Gleb Smirnoff
42f2fa9953 sockets: don't call dom_dispose() on a listening socket
sorflush() already did the right thing, so only sofree() needed
a fix.  Turn check into assertion in our only dom_dispose method.

Reviewed by:		markj
Differential revision:	https://reviews.freebsd.org/D35124
2022-05-09 10:42:57 -07:00
Gleb Smirnoff
c17418a0ba sockets: assert that any protocol with PR_RIGHTS has dom_dispose()
Through the entire history only PF_UNIX has this feature.

Reviewed by:		markj
Differential revision:	https://reviews.freebsd.org/D35123
2022-05-09 10:42:48 -07:00
Gleb Smirnoff
2400c536b4 tests/unix_passfd: add test for shutdown(2) on a buffer with an fd
This has two goals:
- Exercize call to unp_dispose() via soshutdown() instead of sofree()
- Make sure that shutdown indeed dereferences the fd stored

Reviewed by:		markj
Differential revision:	https://reviews.freebsd.org/D35122
2022-05-09 10:42:48 -07:00
Gleb Smirnoff
7496792841 ng_socket: don't assign NULL in C99 sparse initializer 2022-05-09 10:42:48 -07:00
Gleb Smirnoff
607beb88af bluetooth: don't assign NULL in C99 sparse initializer 2022-05-09 10:42:48 -07:00
Gleb Smirnoff
24df85d29a unix/*: unp_internalize() can sleep, so allocate mbufs with M_WAITOK 2022-05-09 10:42:48 -07:00
Gleb Smirnoff
97f8198e95 sockets: make SO_SND/SO_RCV a enum
Not a functional change now. The enum will also be used for other socket
buffer related KPIs.
2022-05-09 10:42:47 -07:00
Alexander Motin
356155fe02 Fix bd82711aff serial number trailing spaces removal.
For devices returning 16 byte serial numbers with 8 leading spaces
this falsely removed everything due to looking at wrong offset.
2022-05-09 10:30:04 -04:00
Mike Karels
1de9aa4d4f genet: fix output packet corruption in uncommon case
The code for the "shift" block in the COPY macro set the pointer for
the next copy block to the wrong value.  In this case, the link-layer
header would be overwritten by the network-layer header.  This case is
difficult or impossible to exercise in the current driver without
changing the value of the hw.genet.tx_hdr_min sysctl.  Correct the
pointer.  While here, remove a line in the macro that was marked
"unneeded", which was actually wrong.

PR:		263824
Submitted by:	jiahali@blackberry.com
MFC after:	2 weeks
2022-05-09 08:46:06 -05:00
Adam S
dc484aed0a asmc: Update Mac Pro 6 sensor definitions
- Make descriptions a bit more human-friendly.
- Don't attempt to probe fan safe speeds, this model does not provide
  one.

PR:		260781
MFC after:	2 weeks
2022-05-09 08:56:39 -04:00
Ruslan Bukin
f224006fe1 Allocate resources selectively.
One of the SMMU interrupt lines (priq) is optional and may be ommited in FDT.

Tested on ARM Morello Board, which has three SMMU units: first two have four
interrupt lines, last one has three interrupt lines.

Sponsored by: UKRI
2022-05-09 13:30:37 +01:00
Ruslan Bukin
0a8e88fa73 Change __unused to __diagused.
Pointed out by:	jhb
Sponsored by:	UKRI
2022-05-09 11:24:47 +01:00
Dmitry Chagin
c6df217603 linux(4): Use the right function to get the bit index in vdso binuptime.
This is modeled after a1f93266 (by kib@).

MFC after:		2 weeks
2022-05-08 17:20:52 +03:00
Dmitry Chagin
5a6a4fb284 linux(4): Implement vdso getcpu for x86.
This is modeled after f2395455 (by kib@).

MFC after:		2 weeks
2022-05-08 17:20:52 +03:00
Dmitry Chagin
332eca05b5 linux(4): Refactor vdso_gettc_x86 includes.
Factor out includes from common vdso_gettc_x86 file to the corresponding
MD files.

MFC after:		2 weeks
2022-05-08 17:20:51 +03:00
Dmitry Chagin
707e567a40 linux(4): Add a helper intended for copying timespec's from the userspace.
There are many places where we copyin Linux timespec from the userspace
and then convert it to the kernel timespec. To avoid code duplication
add a tiny halper for doing this.

MFC after:		2 weeks
2022-05-08 16:16:47 +03:00
Dmitry Chagin
3dc2a06752 linux(4): Prevent time_t overflows on i386.
As native i386 time_t is still 32-bit, check that the user-provided 64-bit
tv_sec value fits to the kernel time_t, return EOVERFLOW if not.

MFC after:		2 weeks
2022-05-08 15:39:09 +03:00
Dmitry Chagin
1579b320f1 linux(4): Zero out high order bits of nanoseconds in the compat mode.
Assuming the kernel would use random data, the 64-bit Linux kernel ignores
upper 32 bits of tv_nsec of struct timespec64 for 32-bit binaries.

MFC after:		2 weeks
2022-05-08 15:38:19 +03:00
Dmitry Chagin
9a9482f874 linux(4): Add a helper intended for copying timespec's to the userspace.
There are many places where we convert natvie timespec and copyout it to
the userspace. To avoid code duplication add a tiny halper for doing this.

MFC after:		2 weeks
2022-05-08 15:37:27 +03:00
Dmitry Chagin
61f45f6733 linux(4): Regen for ppoll_time64 syscall.
MFC after:		2 weeks
2022-05-08 13:38:17 +03:00
Dmitry Chagin
94f5f150ef linux(4): Fix ppoll_time64 syscall definition.
Fixed my typo in ed61e0ce1d. Here tsp is a pointer to the 64-bit timespec.

MFC after:		2 weeks
2022-05-08 13:37:48 +03:00