Commit Graph

135568 Commits

Author SHA1 Message Date
Kyle Evans
9be9771c87 efidev: remove EFIIOC_GET_TABLE ioctl
This ioctl would instantly induce a panic, likely since near inception, up
until 0861c7d3e0. Lack of previous interest in fixing it combined with
the problematic interface (exports a pointer, really a physical address)
brings us to the natural conclusion: remove it until a useful consumer
forward.

If it eventually gets resurrected, the interface should definitely not
return in this exact form and likely needs to be reimagined.

The associated KPI, efi_get_table, is left intact for the time being.

Reviewed by:	imp, jrtc27
Also discussed with:	brooks, jhb
Differential Revision:	https://reviews.freebsd.org/D28030
2021-01-08 10:41:50 -06:00
Andrew Turner
6815909abd Move the PMC overflow count to make it per-CPU
Virtual PMCs could be running on multiple CPUs so this needs to be
a per-CPU value.

Submitted by:	rwatson (earlier version)
Reviewed by:	gnn
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D27973
2021-01-08 14:24:43 +00:00
Andrew Turner
90a6e9ef63 Update hwpmc on armv7 to handle overflow better
When testing hwpmc on arm64 we found the counter could overflow while
reading the event count. Handle this case in the armv7 code by also
checking if the overflow bit is set and incrementing the overflow
cound as needed.

Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D27969
2021-01-08 14:24:43 +00:00
Mateusz Guzik
8ddea0b127 cache: just assign ni_resflags = NIRES_ABS
It is guaranteed to be 0 on entry.
2021-01-08 13:57:10 +00:00
Mateusz Guzik
77589de8aa mac: cheaper check for mac_vnode_check_readlink 2021-01-08 13:57:10 +00:00
Hans Petter Selasky
f8f5b459d2 Update user access region, UAR, APIs in the core in mlx5core.
This change include several changes as listed below all related to UAR.
UAR is a special PCI memory area where the so-called doorbell register and
blue flame register live. Blue flame is a feature for sending small packets
more efficiently via a PCI memory page, instead of using PCI DMA.

- All structures and functions named xxx_uuars were renamed into xxx_bfreg.
- Remove partially implemented Blueflame support from mlx5en(4) and mlx5ib.
- Implement blue flame register allocator.
- Use blue flame register allocator in mlx5ib.
- A common UAR page is now allocated by the core to support doorbell register
  writes for all of mlx5en and mlx5ib, instead of allocating one UAR per
  sendqueue.
- Add support for DEVX query UAR.
- Add support for 4K UAR for libmlx5.

Linux commits:
7c043e908a74ae0a935037cdd984d0cb89b2b970
2f5ff26478adaff5ed9b7ad4079d6a710b5f27e7
0b80c14f009758cefeed0edff4f9141957964211
30aa60b3bd12bd79b5324b7b595bd3446ab24b52
5fe9dec0d045437e48f112b8fa705197bd7bc3c0
0118717583cda6f4f36092853ad0345e8150b286
a6d51b68611e98f05042ada662aed5dbe3279c1e

MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 13:33:46 +01:00
Hans Petter Selasky
3764792007 Fix whitespace in mlx5en(4).
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 13:33:46 +01:00
Hans Petter Selasky
9a47ae044b Bump driver versions for mlx5en(4) and mlx4en(4).
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:55 +01:00
Hans Petter Selasky
376e130b47 Fix memory leaks in error paths in krping.
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:55 +01:00
Hans Petter Selasky
89c0b4fa11 Bump some copyrights in mlx5en(4).
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:55 +01:00
Hans Petter Selasky
a00718e1df Implement SIOCGIFRSSKEY and SIOCGIFRSSHASH and mlx5en(4).
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:55 +01:00
Hans Petter Selasky
480570dbb3 Fixes for SRIOV in mlx5core.
- call pci_iov_detach() on detaching from PCI device to take care of hang
  on destroying VFs after PF is down.

- disable eswitch SRIOV support right after pci_iov_detach(),
  else the eswitch cleanup sometimes occur while the SRIOV flow table
  is still present.

Submitted by: kib@
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:55 +01:00
Hans Petter Selasky
98140747ca Update the PCI ID list in mlx5core.
- Add descriptions for new devices.
- Add support for Bluefield.

MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:54 +01:00
Hans Petter Selasky
82c7abe778 The "unsigned" type is the same like "unsigned int".
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:54 +01:00
Hans Petter Selasky
87b3c8cc99 Fix spelling in mlx5core.
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:54 +01:00
Hans Petter Selasky
daa150aaa3 Properly handle case where firmware dump returns more registers on second pass
in mlx5core.

Submitted by: kib@
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:54 +01:00
Hans Petter Selasky
50a9f8bbc1 Downgrade error about missing VSC to warning and make messages consistent
in mlx5core.

Submitted by: kib@
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-08 12:35:53 +01:00
Toomas Soome
742653ebd5 sysctl debug.dump_modinfo should recognize font module
Add MODINFOMD_FONT to dump list.
2021-01-08 09:24:49 +02:00
Thomas Munro
da3ef8e66a Fix conflicting value of O_DSYNC.
O_RESOLVE_BENEATH recently took value 0x00800000, but I failed to spot
that while rebasing.  Let's use 0x01000000 for the new O_DSYNC flag.

Reported by: kevans
2021-01-08 18:01:15 +13:00
Warner Losh
a21def4d56 pccard: Remove wi(4) driver
Remove wi(4). pccard is going away, and wi only supports PC Card
devices, though it has a minor amount of glue to also support
PCI cards. However, removing the one without removing the other
is hard, so the whole driver is being removed.

Relnotes: Yes
2021-01-07 20:41:06 -07:00
Warner Losh
23e124c78b pccard: Remove bt3c(4) driver
pccard is being removed, so remove bt3c driver since it only has PC
Card attachment. Also remove bt3cfw(8) since it's the firmware for this
driver.

Relnotes: Yes
2021-01-07 20:40:41 -07:00
Warner Losh
0d3a424a89 pccard: Remove cmx(4) driver
The only attachment of cmx was pccard, so remove the driver in
anticipation of PC Card support removal.

Relnotes: Yes
2021-01-07 20:23:18 -07:00
Warner Losh
31cafce9fd pccard: Remove ata(4) PC Card attachemnt
Remove ata PC Card attachment.

Relnotes: Yes
2021-01-07 20:23:14 -07:00
Warner Losh
ba29d48c7c pccard: Remove uart(4) PC Card attachment
pccard is going away, so remove uart's attachment.

Relnotes: Yes
2021-01-07 20:23:09 -07:00
Warner Losh
07263b02d8 pccard: Remove if_ndis(4) PC Card attachment
PC Card support is being removed, so remove its attachment here. ndis
is slated to be removed entirely for 13, but that's not been done yet.

Relnotes: Yes
2021-01-07 20:23:04 -07:00
Warner Losh
135021edfd pccard: Remove puc(4) PC Card attachment
Remove PUC's pccard attachment. This removes support for 16-bit PC
Cards.

Relnotes: Yes
2021-01-07 20:23:00 -07:00
Warner Losh
163b959a73 pccard: Remove fdc(4) PC Card attachment point
Remove PC Card attachemnt point for fdc.

Relnotes: Yes
2021-01-07 20:22:56 -07:00
Warner Losh
fbcdcec55b pccard: Remove an(4) PC Card attachment
Remove pccard attachment for an driver since pccard support is being
removed.

Relnotes: Yes
2021-01-07 20:22:42 -07:00
Alan Somers
20321e6225 Regenerate syscall files after reallocation of aio_writev/aio_readv 2021-01-07 19:50:32 -07:00
Alan Somers
b3286afae3 Reallocate syscall numbers for aio_writev and aio_readv
The originally chosen numbers interfere with downstream projects'
syscalls.  Move them to the end of the syscall table instead.

Reported by:	jrtc27
Reviewed by:	brooks
MFC-With:	022ca2fc7f
Differential Revision:	022ca2fc7f
2021-01-07 19:49:27 -07:00
Matt Macy
b363d3d52a OpenZFS: Fix issues caused by reversed commits + rebase 2021-01-07 17:42:10 -08:00
Matt Macy
7877fdebee OpenZFS merge main-gf11b09
- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...
2021-01-07 16:55:59 -08:00
Thomas Munro
801ac943ea aio_fsync(2): Support O_DSYNC.
aio_fsync(O_DSYNC, ...) is the asynchronous version of fdatasync(2).

Reviewed by: kib, asomers, jhb
Differential Review: https://reviews.freebsd.org/D25071
2021-01-08 13:15:56 +13:00
Thomas Munro
e7347be9e3 ffs: Support O_DSYNC.
Respect the new IO_DATASYNC flag when performing synchronous writes.
Compared to O_SYNC, O_DSYNC lets us skip updating the inode in some
cases, matching the behaviour of fdatasync(2).

Reviewed by: kib
Differential Review: https://reviews.freebsd.org/D25160
2021-01-08 13:15:56 +13:00
Thomas Munro
a5e284038e open(2): Add O_DSYNC flag.
POSIX O_DSYNC means that writes include an implicit fdatasync(2), just
as O_SYNC implies fsync(2).

VOP_WRITE() functions that understand the new IO_DATASYNC flag can act
accordingly, but we'll still pass down IO_SYNC so that file systems that
don't understand it will continue to provide the stronger O_SYNC
behaviour.

Flag also applies to fcntl(2).

Reviewed by: kib, delphij
Differential Revision: https://reviews.freebsd.org/D25090
2021-01-08 13:15:56 +13:00
Warner Losh
149c9220e6 pccard: remove pccbb_isa
It was never used and quite stale.
2021-01-07 17:05:30 -07:00
Warner Losh
cabbfa3e07 pccard: Move power_if.m from pccard to cardbus
power_if.m is used by both pccard and cardbus. Move it into cardbus.
2021-01-07 17:05:29 -07:00
Mateusz Guzik
71bd18d373 fd: use seqc_read_notmodify when translating fds 2021-01-07 23:30:04 +00:00
Mateusz Guzik
20ac5cda96 fd: make fd/fp mandatory
They are both always passed anyway.
2021-01-07 23:30:04 +00:00
Mateusz Guzik
fee405e057 cache: stop checkpointing cn_flags
They are only modified, if ever, for the last component.
2021-01-07 23:29:52 +00:00
Mateusz Guzik
ac7715471c cache: stop checkpointing cn_nameptr
For aborts cn_nameptr is the same as cn_pnbuf. For partial results
the same cn_nameptr is to be used.
2021-01-07 23:29:38 +00:00
Mateusz Guzik
0f1fc3a31f cache: stop manipulating pathlen
It is a copy-pasto from regular lookup. Add debug to ensure the result
is the same.
2021-01-07 23:26:53 +00:00
Vladimir Kondratyev
a84b0e94cd hid: Add UPDATING entry and bump __FreeBSD_version
Reviewed by:	hselasky
Differential revision:	https://reviews.freebsd.org/D28019
2021-01-08 02:18:44 +03:00
Vladimir Kondratyev
d97d5c0ce8 hid: Import hidmap-based drivers written by Greg V
This change includes:

hpen    - Generic / MS Windows compatible HID pen tablet driver.
hgame   - Generic game controller and joystick driver.
xb360gp - Xbox360-compatible game controller driver.

Submitted by:	Greg V <greg_unrelenting.technology>
Reviewed by:	hselasky (as part of D27993)
2021-01-08 02:18:44 +03:00
Vladimir Kondratyev
afd590d9e5 hid: Import hidmap and bunch of drivers based on it
hidmap is a kernel module that maps HID input usages to evdev events.

Following dependent drivers is included in the commit:

hms       - HID mouse driver.
hcons     - Consumer page AKA Multimedia keys driver.
hsctrl    - System Controls page (Power/Sleep keys) driver.
ps4dshock - Sony DualShock 4 gamepad driver.

Reviewed by:	hselasky
Differential revision:	https://reviews.freebsd.org/D27993
2021-01-08 02:18:44 +03:00
Vladimir Kondratyev
3b2175fdb6 evdev: Implement fuzz.
Fuzz is used to filter noise from the event stream.
Upcoming gamepad drivers use it.

Reviewed by:	hselasky (as part of D27993)
2021-01-08 02:18:44 +03:00
Vladimir Kondratyev
9be6b22da9 hidraw(4): Add HIDRAW_MAKE_UHID_ALIAS kernel option
which installs /dev/uhid# alias to hidraw character device for
compatibility with some existing uhid(4) users like Firefox.
As side effect it renames traditional uhid(4) driver to hidraw
to make possible using of common unit number allocator.

Requested by:	Greg V <greg_unrelenting.technology>
Reviewed by:	hselasky (as part of D27992)
2021-01-08 02:18:44 +03:00
Vladimir Kondratyev
9477390796 hid: Import hidraw(4) - driver for access to raw HID device data
This driver provides raw access to HID devices through uhid(4)-compatible
interface and is based on pre-8.x uhid(4) code. Unlike uhid(4) it does
not take devices in to monopoly ownership and allows parallel access
from other drivers.

hidraw supports Linux's hidraw-compatible interface as well.

Reviewed by:	hselasky
Differential revision:	https://reviews.freebsd.org/D27992
2021-01-08 02:18:43 +03:00
Vladimir Kondratyev
2775d1d5d1 hkbd(4): Split driver lock on interrupt and syscons locks
This allows to mark HID-device interrupt handlers as MP-SAFE.
Atomics-based lockless key event queue with swi_giant taskqueue is used
to pass key-press events into Giant-protected system console.

Reviewed by:	hselasky (as part of D27991)
2021-01-08 02:18:43 +03:00
Vladimir Kondratyev
b93f6bfca3 hid: Port ukbd to HID and attach to build
Reviewed by:	hselasky
Differential revision:  https://reviews.freebsd.org/D27991
2021-01-08 02:18:43 +03:00