aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* DEFAULTS: move intrng to DEFAULTS for its platforms.Warner Losh2022-10-247-5/+3
| | | | | | Sponsored by: Netflix Reviewed by: manu, kevans Differential Revision: https://reviews.freebsd.org/D37107
* zfs: Fix a pair of bugs in zfs_fhtovp()Mark Johnston2022-10-241-1/+2
| | | | | | | | | | | | | | This cherry-picks upstream ed566bf1cd0bdbf85e8c63c1c119e3d2ef5db1f6 - Add a zfs_exit() call in an error path, otherwise a lock is leaked. - Remove the fid_gen > 1 check. That appears to be Linux-specific: zfsctl_snapdir_fid() sets fid_gen to 0 or 1 depending on whether the snapshot directory is mounted. On FreeBSD it fails, making snapshot dirs inaccessible via NFS. PR: 266236 MFC after: 3 days
* acpi_ged: fix build with ACPI_DEBUGGleb Smirnoff2022-10-241-1/+1
|
* cache: add cache_assert_no_entriesMateusz Guzik2022-10-242-0/+15
|
* acpi_ged: fix build, as module and non INTRNG case.Takanori Watanabe2022-10-242-2/+2
| | | | | | Reviewed-by: cy Differential Revision: https://reviews.freebsd.org/D37104
* acpi_ged: New driver to ACPI generic event deviceTakanori Watanabe2022-10-245-1/+281
| | | | | | | | | | | | | | | | New driver to ACPI generic event device, defined in ACPI spec. Some ACPI power button may not work without this. In qemu arm64 with "virt" machine, with ACPI firmware, enable devd check devd message by and invoke following command in qemu monitor (qemu) system_powerdown and make sure some power button input event appear. (setting sysctl hw.acpi.power_button_state=S5 is not work, because ACPI tree does not have \_S5 object.) Reviewed by: andrew, hrs Differential Revision: https://reviews.freebsd.org/D37032
* bridge: default to not filtering L3Kristof Provost2022-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Change the default for net.link.bridge.pfil_member and net.link.bridge.pfil_bridge to zero. That is, default to not calling layer 3 firewalls on the bridge or its member interfaces. With either of these enabled the bridge will, during L2 processing, remove the Ethernet header from packets, feed them to L3 firewalls, re-add the Ethernet header and send them out. Not only does this interact very poorly with firewalls which defer packets, or reassemble and refragment IPv6, it also causes considerable confusion for users, because the firewall gets called in unexpected ways. For example, a bridge which contains a bhyve tap and the host's LAN interface. We'd expect traffic between the LAN and bhyve VM to pass, no matter what (layer 3) firewall rules are set on the host. That's not the case as long as pfil_bridge or pfil_member are set. Reviewed by: Zhenlei Huang MFC: never Differential Revision: https://reviews.freebsd.org/D37009
* arm64: Hyper-V: fix couple more commit errors caused by duplicated linesWei Hu2022-10-242-288/+0
| | | | | | | | Remove those duplicated lines. Reported by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Fixes: 6cf00ef80c20148 Sponsored by: Microsoft
* if_ovpn: add sysctls for netisr_queue() and crypto_dispatch_async()Kristof Provost2022-10-241-3/+24
| | | | | | | | | Allow the choice between asynchronous and synchronous netisr and crypto calls. These have performance implications, but depend on the specific setup and OCF back-end. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D37017
* LinuxKPI: add MSEC_PER_SECBjoern A. Zeeb2022-10-231-0/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Reviewed by: imp, emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D37087
* LinuxKPI: 802.11: add MO tracingBjoern A. Zeeb2022-10-233-16/+62
| | | | | | | | | | | Add a macro to each implemented mac80211 operation. This currently turns into a printf if LINUXKPI_80211_DEBUG is defined but in the future could become a different probe as well. This is helpful for quick analysis and boot-time problem debugging when DTrace and other frameworks may be harder to use. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* time(3): Fix spelling.Hans Petter Selasky2022-10-231-2/+2
| | | | | | Noted by: Gary Jennejohn <garyj@gmx.de> MFC after: 1 week Sponsored by: NVIDIA Networking
* acpi: Create cppc_notify sysctl before it is checkedTom Jones2022-10-231-8/+8
| | | | | | Reported by: Henrix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D37081
* time(3): Optimize tvtohz() function.Hans Petter Selasky2022-10-233-46/+70
| | | | | | | | | | | | | List of changes: - Use integer multiplication instead of long multiplication, because the result is an integer. - Remove multiple if-statements and predict new if-statements. - Rename local variable name, "ticks" into "retval" to avoid shadowing the system "ticks" global variable. Reviewed by: kib@ and imp@ MFC after: 1 week Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D36859
* time(3): Declare the minimum and maximum hz values supported.Hans Petter Selasky2022-10-232-0/+18
| | | | | | | Reviewed by: kib@ and imp@ MFC after: 1 week Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D37072
* LinuxKPI: 802.11: add changes to support debugfs in iwlwifiBjoern A. Zeeb2022-10-221-11/+22
| | | | | | | | Add new fields (also have to move a struct up, no changes there) in order to make iwlwifi debugfs support compile. Sposnored by: The FreeBSD Foundation MFC after: 3 days
* iwlwifi: prepare to support debugfsBjoern A. Zeeb2022-10-227-6/+870
| | | | | | | | | | | | | Import two files left out initially from the driver needed for debugfs support [1]. Adjust the driver further to make it compile on FreeBSD. This is currently turned off and needs more LinuxKPI/lindebugfs work. Being in the tree will allow us to collaboratively work on it and then we can enable it for good. Obtained from: Linux wireless-testing (tag: wt-2022-10-19) [1] 2c9078b9abcb884e27360340aaa7dfd4c0de29b3 Sponsored by: The FreeBSD Foundation MFC after: 3 days
* iwlwifi: constify another argument of iwl_print_hex_dump()Bjoern A. Zeeb2022-10-222-0/+8
| | | | | | | | This is needed when enabling debugfs as it passes a const in which would otherwise be dropped. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* linprocfs: Add net/route.John Grafton2022-10-222-1/+80
| | | | | | | PR: 266482 Reviewed by: melifaro, me Differential revision: https://reviews.freebsd.org/D36949 MFC after: 1 week
* x86/busdma: Limit reserved pages if low nsegsColin Percival2022-10-221-0/+1
| | | | | | | | | | | | | | | | | | | When bus_dmamap_create is called, if bouncing might be required we reserve enough pages for a maximum-length request, subject to the MAX_BPAGES constraint (32 MB on amd64; 32 MB or 2 MB on i386 depending on the amount of RAM). Since pages used for bouncing are typically non-consecutive, each bounced page will typically constitute a busdma segment; as such, we are unlikely to ever successfully use more pages than the nsegments limit. Limit the number of pages reserved to nsegments. On FreeBSD/Firecracker, this reduces bounce page memory consumption from 32 MB to 512 kB, making VMs with 128 MB of RAM usable. Reviewed by: imp, mav Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D37082
* Increase the maximum size of the journaled soft-updates journal.Kirk McKusick2022-10-211-1/+0
| | | | | | | | | | | | | | The size of the journaled soft-updates journal should be big enough to hold two minutes of filesystem metadata-update activity. The maximum size of the soft updates journal was set in the 1990s. At the time it was assummed that disk arrays would top out at 16 drives and disk writes per drive would top out at 500 per second. Today's I/O subsystems are considerably bigger and faster than those limits. Thus this delta removes the hard upper limit and lets tunefs(8) and newfs(8) set the upper bound based on the size of the filesystem and its cylinder groups. Sponsored by: The FreeBSD Foundation
* arm64: Hyper-V: fix a commit error caused duplicated lines in vmbus_aarch64.cWei Hu2022-10-211-157/+0
| | | | | | | | Remove those duplicated lines. Reported by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Fixes: 6cf00ef80c20148 Sponsored by: Microsoft
* arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 2)Souradeep Chakrabarti2022-10-214-0/+670
| | | | | | | | | | | This is the second part of the ARM64 Hyper-V enablement. These changes here are mostly with Make, release changes and also changes required in vmbus.c hyperv.c and common files in hyperv. Reviewed by: whu Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D36467
* arm64: Hyper-V: vmbus: use the IRQ resource from vmbus_resSouradeep Chakrabarti2022-10-211-1/+3
| | | | | | | | | | In ARM64 gen2 Hyper-V, use IRQ resource from vmbus_res, which is owning the IRQ for current device tree. It allows the MMIO resource to be successfully allocated for vmbus from parent acpi_syscontainer. Reviewed by: whu Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D37064
* tcp: ECN preparations for ECN++, AccECN (tcp_respond)Richard Scheffenegger2022-10-208-17/+35
| | | | | | | | | | | | | tcp_respond is another function to build a tcp control packet quickly. With ECN++ and AccECN, both the IP ECN header, and the TCP ECN flags are supposed to reflect the correct state. Also ensure that on receiving multiple ECN SYN-ACKs, the responses triggered will reflect the latest state. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D36973
* xhci(4): Don't allocate an IRQ vector if hw.usb.xhci.use_polling=1 is set.Hans Petter Selasky2022-10-201-1/+1
| | | | | | | This is useful for debugging purposes. MFC after: 1 week Sponsored by: NVIDIA Networking
* arm: Remove unused ffs.SWarner Losh2022-10-201-58/+0
| | | | | | | | We've not used ffs.S since we retired armv[45] support. Remove it from the tree. Suggested by: andrew in D37069 Sponsored by: Netflix
* conf: Document why we have ARM64 and RISCV optionsWarner Losh2022-10-202-2/+2
| | | | | | | | These are needed for the 'cpu ARM64' and 'cpu RISCV' options in these architecture's config files. cpu lines are non-optional in config(8), so we must define them here. There's no other use for them in the tree. Sponsored by: Netflix
* arm: Fix name of config file in commentWarner Losh2022-10-201-1/+1
| | | | | | | This file was never named GENERICV6 in the FreeBSD tree. It entered the tree in b9413b551268 as GENERIC. Sponsored by: Netflix
* arm: Remove useless armv6/armv7 optionsWarner Losh2022-10-202-11/+1
| | | | | | | | | | | | | Cleanup another remnant of the armv4/armv5 support. Now that we always define armv6 or armv7, these lines can be deleted (execpt hwpmc_armv7.c which now needs just one line). Since we don't do anything different between armv6 and armv7 from a config file selection point of view, delete them from options.arm. We are extremely unlikely to grow anything new here during the remaining lifetime of 32-bit arm in FreeBSD. Sponsored by: Netflix Reviewed by: kevans, andrew Differential Revision: https://reviews.freebsd.org/D37069
* riscv: fix relocation handling for R_RISCV_64Mitchell Horne2022-10-201-3/+13
| | | | | | | | | | | It requires the addend. In practice this doesn't seem to be a problem, since relocations of this type are all with an addend of zero. Obviously, we still want to handle this correctly if that ever changes. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37039
* riscv: reject CPUs with mmu-type "riscv,none"Mitchell Horne2022-10-201-13/+15
| | | | | | | | | | | According to riscv/cpus.yaml in the device-tree docs, this property may exist but indicate that the CPU does not have an MMU. Detect this possibility. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36980
* riscv: drop a dead declarationMitchell Horne2022-10-201-2/+0
| | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation
* Add random VMware device IDs.Alexander Motin2022-10-208-0/+35
| | | | | | Just to make dmesg look nicer there. MFC after: 1 week
* inpcb: provide pcbinfo pointer argument to inp_apply_all()Gleb Smirnoff2022-10-193-4/+6
| | | | Allows to clear inpcb layer of TCP knowledge.
* inpcb: garbage collect so_sototcpcb()Gleb Smirnoff2022-10-192-8/+0
| | | | It had very little use and required inpcb layer to know tcpcb.
* cxgbe: include headers required to include t4_tom.hGleb Smirnoff2022-10-191-0/+2
| | | | | Before the change we would get struct tcpcb forward declaration only with help of pollution via in_pcb.h.
* cxgbe: use standard sototcpcb() accessor macro to get socket's tcpcbGleb Smirnoff2022-10-194-8/+8
| | | | | Reviewed by: np Differential revision: https://reviews.freebsd.org/D37041
* uma: Never pass cache zones to memguardMark Johnston2022-10-191-2/+4
| | | | | | | | | Items allocated from cache zones cannot usefully be protected by memguard. PR: 267151 Reported and tested by: pho MFC after: 1 week
* tmpfs: report minimal hole sizeKonstantin Belousov2022-10-191-0/+4
| | | | | | | | Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
* tmpfs: implement FIOSEEKDATA and FIOSEEKHOLEKonstantin Belousov2022-10-191-0/+130
| | | | | | | | | | providing the support for lseek(2) SEEK_DATA and SEEK_HOLE. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
* Add vm_page_any_valid()Konstantin Belousov2022-10-194-16/+24
| | | | | | | | | | Use it and several other vm_page_*_valid() functions in more places. Suggested and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
* swap_pager_find_least(): assert that the function is called on the right ↵Konstantin Belousov2022-10-191-0/+1
| | | | | | | | | | object type Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
* vn_bmap_seekhole: check that passed offset is non-negativeKonstantin Belousov2022-10-191-1/+1
| | | | | | | | Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
* tmpfs: order include files alphabeticallyKonstantin Belousov2022-10-191-1/+1
| | | | | | | | Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
* tmpfs: change return type of tmpfs_pages_check_avail() to boolKonstantin Belousov2022-10-191-6/+6
| | | | | | | | Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
* device_get_path(): take sbuf directlyKonstantin Belousov2022-10-191-38/+35
| | | | | | | | | | | | This allows to fix a bug where sbuf allocation done in the context of dev_wired_cache_match() must use non-sleepable allocations. Suggested by: jhb Reviewed by: jhb, takawata Discussed with: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36899
* device_get_path(): handle case when dev is rootKonstantin Belousov2022-10-191-1/+7
| | | | | | | | | | PR: 266862 Based on submission by: takawata Reviewed by: jhb, takawata Disscussed with: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36899
* device_get_path(): do not drop the error from BUS_GET_DEVICE_PATH()Konstantin Belousov2022-10-191-21/+28
| | | | | | | | | | | Later it would silently converted to ENOMEM always, because any error was reported as NULL return path. Reviewed by: jhb, takawata Discussed with: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36899
* subr_bus.c: some styleKonstantin Belousov2022-10-191-3/+5
| | | | | | | | | | Wrap long lines in devctl2_ioctl DEV_GET_PATH and dev_wired_cache_match() Reviewed by: jhb, takawata Discussed with: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36899