Commit message (Collapse)AuthorAgeFilesLines
* OpenZFS merge main-gf11b09Matt Macy2021-01-08471-6691/+34096
| | | | | | | | - add dRAID support - fix duplicate close handling - fix memory leak in prefetch - fix problem with SIMD benchmarking on FreeBSD boot ...
* ObsoleteFiles.inc: add newlines between some recent entriesEd Maste2021-01-081-0/+2
* aio_fsync(2): Support O_DSYNC.Thomas Munro2021-01-084-18/+61
| | | | | | | aio_fsync(O_DSYNC, ...) is the asynchronous version of fdatasync(2). Reviewed by: kib, asomers, jhb Differential Review: https://reviews.freebsd.org/D25071
* ffs: Support O_DSYNC.Thomas Munro2021-01-081-1/+3
| | | | | | | | | 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
* open(2): Add O_DSYNC flag.Thomas Munro2021-01-087-16/+49
| | | | | | | | | | | | | | | 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
* Set current date in to placeholders.Vladimir Kondratyev2021-01-081-1/+1
* BSD.usr.dist: remove aoutEd Maste2021-01-082-4/+4
| | | | | | Userland a.out support has been removed; kernel aout(5) is unchanged. Sponsored by: The FreeBSD Foundation
* ldd: Retire aout supportEd Maste2021-01-084-646/+0
| | | | | | | | | | | Userland aout support has not been required since FreeBSD 2.x. If someone needs to use FreeBSD 2 shared libraries they will be best served by using a FreeBSD 2 ldd, perhaps as part of a jail with a full FreeBSD 2.x install. Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27478
* pccard: remove pccbb_isaWarner Losh2021-01-081-257/+0
| | | | It was never used and quite stale.
* pccard: Move power_if.m from pccard to cardbusWarner Losh2021-01-082-1/+1
| | | | power_if.m is used by both pccard and cardbus. Move it into cardbus.
* Retire obsolete a.out rtldEd Maste2021-01-074-493/+0
| | | | | | | This was disconnected from the build in 2001 in commit 66422f5b7a1a with a comment that it was long overdue even then. Sponsored by: The FreeBSD Foundation
* fd: use seqc_read_notmodify when translating fdsMateusz Guzik2021-01-071-7/+3
* fd: make fd/fp mandatoryMateusz Guzik2021-01-071-7/+5
| | | | They are both always passed anyway.
* cache: stop checkpointing cn_flagsMateusz Guzik2021-01-071-16/+25
| | | | They are only modified, if ever, for the last component.
* cache: stop checkpointing cn_nameptrMateusz Guzik2021-01-071-3/+9
| | | | | For aborts cn_nameptr is the same as cn_pnbuf. For partial results the same cn_nameptr is to be used.
* cache: stop manipulating pathlenMateusz Guzik2021-01-071-20/+100
| | | | | It is a copy-pasto from regular lookup. Add debug to ensure the result is the same.
* loader: really use bold font for vga text modeToomas Soome2021-01-072-1/+7
| | | | | 8x16v turns out to be too thin and hard to read, use bold font instead.
* hid: Add UPDATING entry and bump __FreeBSD_versionVladimir Kondratyev2021-01-072-1/+7
| | | | | Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D28019
* hid: Import hidmap-based drivers written by Greg VVladimir Kondratyev2021-01-0713-1/+1036
| | | | | | | | | | | 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)
* hid: Import hidmap and bunch of drivers based on itVladimir Kondratyev2021-01-0718-1/+3652
| | | | | | | | | | | | | | 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
* evdev: Implement fuzz.Vladimir Kondratyev2021-01-071-1/+19
| | | | | | | Fuzz is used to filter noise from the event stream. Upcoming gamepad drivers use it. Reviewed by: hselasky (as part of D27993)
* hidraw(4): Add HIDRAW_MAKE_UHID_ALIAS kernel optionVladimir Kondratyev2021-01-077-4/+31
| | | | | | | | | | 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)
* hid: Import hidraw(4) - driver for access to raw HID device dataVladimir Kondratyev2021-01-079-4/+1325
| | | | | | | | | | | | 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
* hkbd(4): Split driver lock on interrupt and syscons locksVladimir Kondratyev2021-01-071-69/+95
| | | | | | | | 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)
* hid: Port ukbd to HID and attach to buildVladimir Kondratyev2021-01-077-801/+628
| | | | | Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27991
* hid: Copy ukbd(4) to HID subsystem.Vladimir Kondratyev2021-01-072-0/+2385
* hid: Port multitouch hmt(4) driver to hidbus and attach to buildVladimir Kondratyev2021-01-076-505/+383
| | | | | Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27990
* hid: Copy wmt(4) to HID subsystem as a base to upcoming hmt(4) driver.Vladimir Kondratyev2021-01-072-0/+1124
* hid: Import hconf(4) - digitizer configuration top-level collection support.Vladimir Kondratyev2021-01-077-0/+476
| | | | Reviewed by: hselasky (as part of D27990)
* hid: Import usbhid - USB transport backend for HID subsystem.Vladimir Kondratyev2021-01-0714-1/+897
| | | | | | | | | | | | | | | | This change implements hid_if.m methods for HID-over-USB protocol [1]. Also, this change adds USBHID_ENABLED kernel option which changes device_probe() priority and adds/removes PnP records to prefer usbhid over ums, ukbd, wmt and other USB HID device drivers and vice-versa. The module is based on uhid(4) driver. It is disabled by default for now due to conflicts with existing USB HID drivers. [1] https://www.usb.org/sites/default/files/hid1_11.pdf Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27893
* hid: Import iichid - I2C transport backend for HID subsystemVladimir Kondratyev2021-01-0710-0/+1368
| | | | | | | | | | | | | | | | | This implements hid_if.m methods for HID-over-I2C protocol [1]. Following kernel options are added: IICHID_SAMPLING - Enable support for a sampling mode as interrupt resource acquisition is not always possible in a case of GPIO interrupts. IICHID_DEBUG - Enable debug output. The module is based on prior Marc Priggemeyer work (D16698). [1] http://download.microsoft.com/download/7/d/d/7dd44bb7-2a7a-4505-ac1c-7227d3d96d5b/hid-over-i2c-protocol-spec-v1-0.docx Differential revision: https://reviews.freebsd.org/D27892
* hid: Import quirk subsystem.Vladimir Kondratyev2021-01-076-1/+618
| | | | | | | | hidquirk(4) is derived from usb_quirk(4) and inherits all its HID-related functionality. It does not support ioctl(2) interface yet. Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27890
* hid: Import hidbus(4)Vladimir Kondratyev2021-01-077-1/+1196
| | | | | | | | | | | | | | | This driver provides support for multiple HID driver attachments to single HID transport backend. This ability existed in Net/OpenBSD (uhidev and ihidev drivers) but has never been ported to FreeBSD. Unlike Net/OpenBSD we do not use report number alone to distinct report source but we follow MS way and use a top level collection (TLC) usage index that report belongs to as a location key. The driver performs child device autodiscovery based on HID report descriptor data, proxying of HID requests from child devices to parent transport backends and broadcasting of interrupts in backward direction. Differential revision: https://reviews.freebsd.org/D27888
* hid: Import HID transport method definitions and helper functions.Vladimir Kondratyev2021-01-075-1/+224
| | | | | | | | | | | | | | | | | | | | | | | | | Create an abstract HID interface that provides hardware independent access to HID capabilities and functions through the device tree. hid_if.m resembles existing USBHID KPI and consist of next methods: HID method USBHID variant ----------------------------------------------------------------------- hid_intr_setup usbd_transfer_setup (INTERRUPT IN xfer) hid_intr_unsetup usbd_transfer_unsetup (INTERRUPT IN xfer) hid_intr_start usbd_transfer_start (INTERRUPT IN xfer) hid_intr_stop usbd_transfer_drain (INTERRUPT IN xfer) hid_intr_poll usbd_transfer_poll (INTERRUPT IN xfer) hid_get_rdesc usbd_req_get_report_descriptor hid_read No direct analog. Not intended for common use. hid_write uhid(4) write() hid_get_report usbd_req_get_report hid_set_report usbd_req_set_report hid_set_idle usbd_req_set_idle hid_set_protocol usbd_req_set_protocol This change is part of D27888
* hid: Chase for HID function name changes in existing USB HID driversVladimir Kondratyev2021-01-0710-69/+49
| | | | | | | | | | Also hide shim code added in a previous commit under COMPAT_USBHID12. Note: it is enough to add -DCOMPAT_USBHID12 to CFLAGS to compile old code with new HID subsystem, but it is not enough to link it at runtime. HID dependency has to be added explicitly with MODULE_DEPEND macro. Reviewed by: manu, hselasky (as part of D27887)
* hid: Import functions and constants required by new subsystemVladimir Kondratyev2021-01-0719-48/+342
| | | | | | | | | | | | | | | | | | | | This does an import of quirk stubs, debugging macros from USB code and numerous usage constants used by dependent drivers. Besides, this change renames some functions to get a better matching with userland library and NetBSD/OpenBSD HID code. Namely: - Old hid_report_size() renamed to hid_report_size_max() - New hid_report_size() calculates size of given report rather than maximum size of all reports. - hid_get_data_unsigned() renamed to hid_get_udata() - hid_put_data_unsigned() renamed to hid_put_udata() Compat shim functions are provided in usbhid.h to make possible compile of legacy code unmodified after this change. Reviewed by: manu, hselasky Differential revision: https://reviews.freebsd.org/D27887
* Factor-out hardware-independent part of USB HID support to new moduleVladimir Kondratyev2021-01-0748-1478/+185
| | | | | | | | It will be used by the upcoming HID-over-i2C implementation. Should be no-op, except hid.ko module dependency is to be added to affected drivers. Reviewed by: hselasky, manu Differential revision: https://reviews.freebsd.org/D27867
* Copy HID over USB support files to new sys/dev/hid directoryVladimir Kondratyev2021-01-073-0/+1605
* libkern/strcasestr.c: Drop xlocale support and connect to build.Vladimir Kondratyev2021-01-073-14/+10
| | | | | Reviewed by: markj, hselasky Differential revision: https://reviews.freebsd.org/D27866
* Copy strcasestr.c from libc to libkern.Vladimir Kondratyev2021-01-071-0/+74
* evdev: Allow open() handler to be interrupted by a signalVladimir Kondratyev2021-01-072-5/+15
| | | | | | | It is possible that the client list lock is taken by other process for too long due to e.g. IO timeouts. Allow user to terminate open() in this case. Reviewed by: markj (as part of D27865)
* evdev: Make open(2) and close(3) handlers sleepable.Vladimir Kondratyev2021-01-074-67/+156
| | | | | | | | | | | | | | | | | | | | At the beginning of evdev there was a LOR between hardware driver's and evdev client list locks as they were taken in different order at driver's interrupt and evdev open()/close() handlers. The LOR was fixed with introduction of evdev_register_mtx() function which allowed to use a hardware driver's lock as evdev client list lock. While this works good with PS/2 and USB, this does not work with I2C. Unlike PS/2 and USB, I2C open()/close() handlers do unbound sleeps while waiting for I2C bus to release and while performing IO. This change uses epoch(9) for traversing evdev client list in interrupt handler to avoid the LOR thus making possible to convert evdev client list lock to sleepable sx. While here add brief locking protocol description. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D27865
* evdev: Remove useless "initial value" parameter from evdev_support_abs()Vladimir Kondratyev2021-01-0710-28/+25
| | | | | It can not be used for setting of state of multitouch events. If necessary, use evdev_push_event() instead of it.
* Allow HID report descriptor parser to return more then 1 usage per itemVladimir Kondratyev2021-01-072-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This handles parsing of following descriptor, containing array of usages: 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) 0x09, 0x80, // Usage (Sys Control) 0xA1, 0x01, // Collection (Application) 0x75, 0x02, // Report Size (2) 0x95, 0x01, // Report Count (1) 0x15, 0x01, // Logical Minimum (1) 0x25, 0x03, // Logical Maximum (3) 0x09, 0x82, // Usage (Sys Sleep) 0x09, 0x81, // Usage (Sys Power Down) 0x09, 0x83, // Usage (Sys Wake Up) 0x81, 0x60, // Input (Data,Array,Abs) 0x75, 0x06, // Report Size (6) 0x81, 0x03, // Input (Const,Var,Abs) 0xC0, // End Collection Our current parser returns only first usage (Sys Sleep) and loses next two. Set HID_ITEM_MAXUSAGE limit relatively low as existing code usually allocates hid_item on stack. Also tweak hid_locate() to support hid items with multiple usages. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D27748
* hid_locate: do not ignore constant items.Vladimir Kondratyev2021-01-071-1/+1
| | | | | | | | | | | | | | | | | | | hid_locate() currently ignores all HID items which tagged as constant, i.e. bit 0 of main item data is set to 1. See p. of hid1_11.pdf [1]. Such an items are unconditionally treated as byte-alignment padding. While that may be right decision for input and output reports that is wrong for features reports. Feature reports can contain constant capabilities e.g. 'Contact Count Maximum'. See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232040 Remove check for constant from hid_locate() to make possible parsing of such a reports. [1] https://www.usb.org/sites/default/files/documents/hid1_11.pdf Reviewed by: hselasky Obtained from: sysutils/iichid Differential Revision: https://reviews.freebsd.org/D27747
* Rewrite the disk I/O management system in fsck_ffs(8). Other thanKirk McKusick2021-01-0717-1384/+1215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | making fsck_ffs(8) run faster, there should be no functional change. The original fsck_ffs(8) had its own disk I/O management system. When gjournal(8) was added to FreeBSD 7, code was added to fsck_ffs(8) to do the necessary gjournal rollback. Rather than use the existing fsck_ffs(8) disk I/O system, it wrote its own from scratch. Similarly when journalled soft updates were added in FreeBSD 9, code was added to fsck_ffs(8) to do the necessary journal rollback. And once again, rather than using either of the existing fsck_ffs(8) disk I/O systems, it wrote its own from scratch. Lastly the fsdb(8) utility uses the fsck_ffs(8) disk I/O management system. In preparation for making the changes necessary to enable snapshots to be taken when using journalled soft updates, it was necessary to have a single disk I/O system used by all the various subsystems in fsck_ffs(8). This commit merges the functionality required by all the different subsystems into a single disk I/O system that supports all of their needs. In so doing it picks up optimizations from each of them with the results that each of the subsystems does fewer reads and writes than it did with its own customized I/O system. It also greatly simplifies making changes to fsck_ffs(8) since everything goes through a single place. For example the ginode() function fetches an inode from the disk. When inode check hashes were added, they previously had to be checked in the code implementing inode fetch in each of the three different disk I/O systems. Now they need only be checked in ginode(). Tested by: Peter Holm Sponsored by: Netflix
* du: tests: make H_flag tests more strict about output requirementsKyle Evans2021-01-071-4/+12
| | | | | | | | | | | | | | The current version of this test will effectively pass as long as one of the specified paths is in the output, and it could even be a subset of one of the paths. Strengthen up the test a little bit: * Specify beginning/end anchors for each path * Add egrep -v checks to make sure we don't have any *additional* paths * Ratchet down paths2 to exactly the two paths we expect to appear Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D27984
* du: tests: fix the H_flag test (primarily grep usage)Kyle Evans2021-01-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test attempts to use \t (tab intended) in a grep expression. With the former /usr/bin/grep (i.e. gnugrep), this was interpreted as a literal 't'. The expression would work anyways because the tr(1) usage would ultimately replace all of the spaces with a single newline, and they would match the paths whether they were correctly fromatted or not. Current /usr/bin/grep (i.e. bsdgrep) is less-tolerant of ordinary-escapes, a property of the underlying regex(3) engine, to make it easier to identify when stuff like this happens. In-fact, this expression broke after the switch happened. This revision does the bare basics to fix the usage by using a printf to get a literal tab character to insert into the expression. It also swaps out the manual insertion of the line prefix into the grep expression by pulling that part out of $sep and reusing it for the leading path. The secondary issue was the tr(1) usage, since tr would only replace the first character of string1 with the first character of string2. This has instead been replaced by a sed expression, which similary understands \n to be a newline on all supported versions of FreeBSD. Each path now gets prefixed with the appropriate context that should be there (i.e. numeric sequence followed by a tab). PR: 252446 Reviewed by: emaste, ngie Differential Revision: https://reviews.freebsd.org/D27983
* stand: remove bogus dependency from libsa32Kyle Evans2021-01-071-2/+0
| | | | libsa32 is independent of libsa, they can build in parallel if needed.
* stand: avoid adding fdt SUBDIR_DEPEND if WITHOUT_FDT is setKyle Evans2021-01-071-0/+2
| | | | | | This unbreaks the efi build if WITHOUT_FDT is set. Reported by: peterj