aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/param.h
Commit message (Collapse)AuthorAgeFilesLines
* Bump __FreeBSD_version after f2583be110caMitchell Horne2021-02-171-1/+1
| | | | | | Provide a compatibility point around the ABI-breaking change. Sponsored by: The FreeBSD Foundation
* lockmgr: shrink struct lock by 8 bytes on LP64Mateusz Guzik2021-02-151-3/+4
| | | | | | | | | | | | | | | | | | Currently the struct has a 4 byte padding stemming from 3 ints. 1. prio comfortably fits in short, unfortunately there is no dedicated type for it and plumbing it throughout the codebase is not worth it right now, instead an assert is added which covers also flags for safety 2. lk_exslpfail can in principle exceed u_short, but the count is already not considered reliable and it only ever gets modified straight to 0. In other words it can be incrementing with an upper bound of USHRT_MAX With these in place struct lock shrinks from 48 to 40 bytes. Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D28680
* opencrypto: Introduce crypto_dispatch_async()Mark Johnston2021-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, OpenCrypto consumers can request asynchronous dispatch by setting a flag in the cryptop. (Currently only IPSec may do this.) I think this is a bit confusing: we (conditionally) set cryptop flags to request async dispatch, and then crypto_dispatch() immediately examines those flags to see if the consumer wants async dispatch. The flag names are also confusing since they don't specify what "async" applies to: dispatch or completion. Add a new KPI, crypto_dispatch_async(), rather than encoding the requested dispatch type in each cryptop. crypto_dispatch_async() falls back to crypto_dispatch() if the session's driver provides asynchronous dispatch. Get rid of CRYPTOP_ASYNC() and CRYPTOP_ASYNC_KEEPORDER(). Similarly, add crypto_dispatch_batch() to request processing of a tailq of cryptops, rather than encoding the scheduling policy using cryptop flags. Convert GELI, the only user of this interface (disabled by default) to use the new interface. Add CRYPTO_SESS_SYNC(), which can be used by consumers to determine whether crypto requests will be dispatched synchronously. This is just a helper macro. Use it instead of looking at cap flags directly. Fix style in crypto_done(). Also get rid of CRYPTO_RETW_EMPTY() and just check the relevant queues directly. This could result in some unnecessary wakeups but I think it's very uncommon to be using more than one queue per worker in a given workload, so checking all three queues is a waste of cycles. Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28194
* Expose clang's alignment builtins and use them for roundup2/rounddown2Alex Richardson2021-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes roundup2/rounddown2 type- and const-preserving and allows using it on pointer types without casting to uintptr_t first. Not performing pointer-to-integer conversions also helps the compiler's optimization passes and can therefore result in better code generation. When using it with integer values there should be no change other than the compiler checking that the alignment value is a valid power-of-two. I originally implemented these builtins for CHERI a few years ago and they have been very useful for CheriBSD. However, they are also useful for non-CHERI code so I was able to upstream them for Clang 10.0. Rationale from the clang documentation: Clang provides builtins to support checking and adjusting alignment of pointers and integers. These builtins can be used to avoid relying on implementation-defined behavior of arithmetic on integers derived from pointers. Additionally, these builtins retain type information and, unlike bitwise arithmetic, they can perform semantic checking on the alignment value. There is also a feature request for GCC, so GCC may also support it in the future: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641 Reviewed By: brooks, jhb, imp Differential Revision: https://reviews.freebsd.org/D28332
* __FreeBSD_version: update the references to the doc treeBjoern A. Zeeb2021-01-291-1/+1
| | | | | Update the reference of which file to update in the doc tree when bumping __FreeBSD_version.
* Bump __FreeBSD_version for multiple LinuxKPI updates conflictingBjoern A. Zeeb2021-01-281-1/+1
| | | | with DRM. Be sure to update your drm-kmod port to after the update.
* Bump __FreeBSD_version after e63539f3059728ff58328ac0ecb2a7bf4e2f08e8Dimitry Andric2021-01-261-1/+1
| | | | | | | | This is to allow ports to detect the clang fix applied in the above commit. PR: 252892 MFC after: 3 days
* cache: add symlink support to lockless lookupMateusz Guzik2021-01-231-1/+1
| | | | | | Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488
* Bump CURRENT to 14.0Glen Barber2021-01-221-1/+1
| | | | | | | This one goes to 14. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate")
* Bump __FreeBSD_version after linuxkpi changesEmmanuel Vadot2021-01-171-1/+1
|
* Bump __FreeBSD_version after linuxkpi changesEmmanuel Vadot2021-01-121-1/+1
|
* hid: Add UPDATING entry and bump __FreeBSD_versionVladimir Kondratyev2021-01-071-1/+1
| | | | | Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D28019
* version bump for commit 665b1365fe8e24d618d63b0d57b0b4ad39e97824Rick Macklem2020-12-231-1/+1
| | | | | | The commit changed the internal API between the NFS and kernel RPC modules. Bump the version so that all modules get rebuilt from sources.
* Improve handling of alternate settings in the USB stack.Hans Petter Selasky2020-12-151-1/+1
| | | | | | | | | | | | | | | | | Allow setting the alternate interface number to fail when there is only one alternate setting present, to comply with the USB specification. Refactor how iface->num_altsetting is computed. Bump the __FreeBSD_version due to change of core USB structure. PR: 251856 MFC after: 1 week Submitted by: Ma, Horse <Shichun.Ma@dell.com> Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368659
* Bump __FreeBSD_version for removal of crypto fd's in r368005.John Baldwin2020-12-071-1/+1
| | | | | | | | Requested by: swills Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=368417
* Reduce MAXPHYS back to 128KB on 32bit architectures.Konstantin Belousov2020-11-291-2/+6
| | | | | | | | | | | | | | | Some of them have limited KVA, like arm, which prevents startup from allocating needed number of large pbufs. Other, for instance i386, are dis-balanced enough after 4/4 that blind bump is probably harmful because it allows for much more in-flight io than other tunables are ready for. Requested by: mmel Reviewed by: emaste, mmel Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=368162
* Make MAXPHYS tunable. Bump MAXPHYS to 1M.Konstantin Belousov2020-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys. Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value. Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work. Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav. Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225 Notes: svn path=/head/; revision=368124
* Split out cwd/root/jail, cmask state from filedesc tableConrad Meyer2020-11-171-1/+1
| | | | | | | | | | | | | | | | No functional change intended. Tracking these structures separately for each proc enables future work to correctly emulate clone(2) in linux(4). __FreeBSD_version is bumped (to 1300130) for consumption by, e.g., lsof. Reviewed by: kib Discussed with: markj, mjg Differential Revision: https://reviews.freebsd.org/D27037 Notes: svn path=/head/; revision=367777
* malloc: retire malloc_last_failMateusz Guzik2020-11-121-1/+1
| | | | | | | | | | | | | The routine does not serve any practical purpose. Memory can be allocated in many other ways and most consumers pass the M_WAITOK flag, making malloc not fail in the first place. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D27143 Notes: svn path=/head/; revision=367627
* Bump __FreeBSD_version after linuxkpi changesEmmanuel Vadot2020-11-091-1/+1
| | | | Notes: svn path=/head/; revision=367522
* malloc: move malloc_type_internal into malloc_typeMateusz Guzik2020-11-061-1/+1
| | | | | | | | | | | | | | | | According to code comments the original motivation was to allow for malloc_type_internal changes without ABI breakage. This can be trivially accomplished by providing spare fields and versioning the struct, as implemented in the patch below. The upshots are one less memory indirection on each alloc and disappearance of mt_zone. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D27104 Notes: svn path=/head/; revision=367432
* Rationalize per-cpu zones.Mateusz Guzik2020-11-051-1/+1
| | | | | | | | | | | | | The 2 provided zones had inconsistent naming between each other ("int" and "64") and other allocator zones (which use bytes). Follow malloc by naming them "pcpu-" + size in bytes. This is a step towards replacing ad-hoc per-cpu zones with general slabs. Notes: svn path=/head/; revision=367384
* Bump __FreeBSD_version after rms changesMateusz Guzik2020-11-041-1/+1
| | | | Notes: svn path=/head/; revision=367347
* cache: add cache_vop_mkdir and rename cache_rename to cache_vop_renameMateusz Guzik2020-10-301-1/+1
| | | | Notes: svn path=/head/; revision=367162
* Bump __FreeBSD_version after VOP VPTOCNP and INACTIVE changesMateusz Guzik2020-10-201-1/+1
| | | | Notes: svn path=/head/; revision=366871
* Bump __FreeBSD_version after ptsname_r addition.Xin LI2020-10-171-1/+1
| | | | Notes: svn path=/head/; revision=366782
* Bump __FreeBSD_version after addition of VOP_EAGAINMateusz Guzik2020-10-151-1/+1
| | | | Notes: svn path=/head/; revision=366719
* Bump __FreeBSD_version for the fix to arm64 write-only mappingsAndrew Turner2020-10-131-1/+1
| | | | | | | Sponsored by: Innovate UK Notes: svn path=/head/; revision=366666
* Populate the acquire context field of a ww_mutex in the LinuxKPI.Hans Petter Selasky2020-10-041-1/+1
| | | | | | | | | | | | Bump the FreeBSD version to force recompilation of external kernel modules. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26657 Submitted by: greg_unrelenting.technology (Greg V) Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=366432
* Bump __FreeBSD_version after latest linuxkpi changesEmmanuel Vadot2020-10-021-1/+1
| | | | Notes: svn path=/head/; revision=366374
* Bump __FreeBSD_version after cache_purgevfs changeMateusz Guzik2020-09-231-1/+1
| | | | Notes: svn path=/head/; revision=366072
* __FreeBSD_version bump for introduction of the powerpc64le arch.Brandon Bergren2020-09-231-1/+1
| | | | | | | | | Although this is technically not a breaking change, I believe it is best to have a fresh version to use to define where the starting point was here. Notes: svn path=/head/; revision=366062
* __FreeBSD_version bump for r365605 (crunchgen producing WARNS-clean)Kyle Evans2020-09-141-1/+1
| | | | | | | | | The change in D26397 will need a __FreeBSD_version to base off of for bootstrapping crunchgen, to avoid avoidable build failures just because the host has an outdated crunchgen. Notes: svn path=/head/; revision=365705
* arm64: fix incorrect HWCAP definitionsMitchell Horne2020-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD exports CPU features as bits in the AT_HWCAP and AT_HWCAP2 vectors via elf_aux_info(3). This interface is similar to getauxval(3) on Linux, and for simplicity to consumers we try to maintain an identical set of feature flags on arm64. The first batch of AT_HWCAP flags were added in r350166, corresponding to definitions that already existed in Linux. Unfortunately, one flag was missed, and a portion of the values are shifted one bit to the right as a result. Add the missing definition for HWCAP_ASIMDHP, and adjust the affected values to match their Linux counterparts. Although this is an ABI-breaking change, there is no plan to provide compat code for old binaries. An audit of our ports tree and other software via Debian code search indicates that there are not yet any consumers of this interface for FreeBSD/arm64. Bump __FreeBSD_version to be on the safe side, in case compat code needs to be added in the future. Reviewed by: emaste, manu MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26329 Notes: svn path=/head/; revision=365459
* Add atomic and bswap functions to libcompiler_rtDimitry Andric2020-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | There have been several mentions on our mailing lists about missing atomic functions in our system libraries (e.g. __atomic_load_8 and friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too. To address this, add implementations for the functions from compiler-rt to the system compiler support libraries, e.g. libcompiler_rt.a and and libgcc_s.so. This also needs a small fixup in compiler-rt's atomic.c, to ensure that 32-bit mips can build correctly. Bump __FreeBSD_version to make it easier for port maintainers to detect when these functions were added. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26159 Notes: svn path=/head/; revision=364753
* Bump __FreeBSD_version for OpenZFS switchoverMatt Macy2020-08-251-1/+1
| | | | Notes: svn path=/head/; revision=364747
* r364475 changed the internal API between the kernel RPC and NFS, so bump ↵Rick Macklem2020-08-221-1/+1
| | | | | | | version. Notes: svn path=/head/; revision=364476
* Bump __FreeBSD_version for r364330, since it changed the internal APIRick Macklem2020-08-181-1/+1
| | | | | | | | between the NFS modules such that they all need to be re-compiled from sources. Notes: svn path=/head/; revision=364331
* Bump __FreeBSD_version after vget() and HASBUF changeMateusz Guzik2020-08-161-1/+1
| | | | Notes: svn path=/head/; revision=364274
* Bump __FreeBSD_version after r364232Emmanuel Vadot2020-08-141-1/+1
| | | | | | | | We now have everything needed for DRM from Linux v5.4, let the ports tree know that. Notes: svn path=/head/; revision=364233
* Need to clone the task struct fields related to RCU aswell in theHans Petter Selasky2020-08-111-1/+1
| | | | | | | | | | | | | | | | LinuxKPI after r359727. This fixes a minor regression issue. Else the priority tracking won't work properly when both sleepable and non-sleepable RCU is in use on the same thread. Bump the __FreeBSD_version to force recompilation of external kernel modules. PR: 242272 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=364109
* Add an argument to newnfs_connect() that indicates use TLS for the connection.Rick Macklem2020-08-111-1/+1
| | | | | | | | | | | | | | | | | | For NFSv4.0, the server creates a server->client TCP connection for callbacks. If the client mount on the server is using TLS, enable TLS for this callback TCP connection. TLS connections from clients will not be supported until the kernel RPC changes are committed. Since this changes the internal ABI between the NFS kernel modules that will require a version bump, delete newnfs_trimtrailing(), which is no longer used. Since LCL_TLSCB is not yet set, these changes should not have any semantic affect at this time. Notes: svn path=/head/; revision=364092
* Bump __FreeBSD_version after vaccess() changeMateusz Guzik2020-08-051-1/+1
| | | | Notes: svn path=/head/; revision=363894
* Bump __FreeBSD_version after vnode layout changesMateusz Guzik2020-08-021-1/+1
| | | | Notes: svn path=/head/; revision=363783
* Bump __FreeBSD_version after making rights mandatory for NDINIT_ALLMateusz Guzik2020-08-011-1/+1
| | | | Notes: svn path=/head/; revision=363757
* Bump __FreeBSD_version after introduction of lockless lookup to the VFS layerMateusz Guzik2020-07-261-1/+1
| | | | Notes: svn path=/head/; revision=363562
* Implement the array_size() function in the LinuxKPI. This functionHans Petter Selasky2020-07-101-1/+1
| | | | | | | | | | | | | | | | basically multiplies its two arguments and returns SIZE_MAX if the result overflows the size_t type. Else the product of the two arguments is returned. Bump the FreeBSD_version to mitigate issues with existing implementation of array_size() in drm-devel-kmod. Discussed with: manu@ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=363077
* Bump the version since r362639 changed the internal API between the NFSRick Macklem2020-06-261-1/+1
| | | | | | | kernel modules so they must all be rebuilt. Notes: svn path=/head/; revision=362640
* Bump __FreeBSD_version after making liblzma to use libmd implementationXin LI2020-06-201-1/+1
| | | | | | | | | of SHA256. PR: 200142 Notes: svn path=/head/; revision=362453
* Version bump for r362158, since the arguments for vfs_checkexp() changed.Rick Macklem2020-06-141-1/+1
| | | | Notes: svn path=/head/; revision=362159