aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc/include
Commit message (Collapse)AuthorAgeFilesLines
* pcb.h: mark struct pcb to be preservedMinsoo Choo5 hours1-0/+5
| | | | | | | | | | There are programs that depend on this structure (e.g. kernel debuggers) that breaks when the ABI changes. Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55149
* powerpc/pmap: Use a constant for HPT superpage shiftJustin Hibbits6 days1-2/+3
| | | | | | | | There are no plans to allow multiple sizes of HPT superpages, so just use a constant for it. MFC after: 3 weeks Fixes: 1bc75d77e9 ("powerpc/pmap/oea64: Make PV_LOCK superpage sized")
* powerpc: Add ISA 2.06 sub-word atomic set/clearJustin Hibbits2026-01-171-26/+56
| | | | | | | Add atomic_set/clear_short/char for doing 8-bit and 16-bit operations more efficiently on "newer" architectures (POWER7 and later). Piggybacks on b31abc95eb.
* Remove all code under __SPE__Minsoo Choo2026-01-121-8/+0
| | | | | | Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1957
* param.h: remove powerpcspeMinsoo Choo2026-01-091-4/+0
| | | | | | | Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1914 (cherry picked from commit 1bfae8b50814697ac12bc8879ad8013e7ffd77b2)
* Add sys/_align.h replacing machine/_align.hBrooks Davis2025-12-102-52/+1
| | | | | | | | | | | | | | | | Define _ALIGNBYTES using sizeof(void *) (no functional change on any existing architecture) which will allow it to work with CHERI were we must align things up to capability alignment. In _ALIGN, replace integer manipulation which does not preserve pointer provenance with a type and provenance preserving builtin. This requires modest changes in code which assumes _ALIGN returns an integer, but those are relatively rare. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53947
* powerpc/_stdint.h: fix SIG_ATOMIC_{MIN,MAX,WIDTH}Robert Clausecker2025-12-021-10/+5
| | | | | | | | | | | | | On powerpc/powerpc64, sig_atomic_t is an int, but was treated as if it was a long by <machine/_stdint.h>. This was finally caught by the unit test added with 4a1c752 / D53831. Reported by: kib Reviewed by: kib, imp Approved by: markj (mentor) Fixes: c3e289e1ce8c9af8d14e9f727632e22b3bf901f9 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54026
* sys/stdint.h: add C23 _WIDTH macrosRobert Clausecker2025-11-301-0/+33
| | | | | | | | | | | | | | The platform-dependent macros are added to the various _stdint.h headers, those that are always the same are added directly to _stdint.h. We may want to move the definitions for WCHAR_* and WINT_* out of the platform header files as those are always the same. Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53830
* sys/limits.h: add C23 _WIDTH macrosRobert Clausecker2025-11-301-0/+3
| | | | | | | | | | | | For compliance with IOS/IEC 9899:2024 ("C23"). These macros define the width in bits of the basic integer types. Another new macro, BITINT_MAXWIDTH, is not yet included as I do not understand what it should be set to. Perhaps it is compiler-specific. Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53825
* intr/powerpc: create openpic_class kobjElliott Mitchell2025-10-301-6/+3
| | | | | | | | | | | | Using kobj allows implementing most PIC functions merely by inheriting from the parent class. As there are multiple OpenPIC implementations, this ensures all common hooks go through by default. Note, this adds the suspend/resume functions to other PICs. This should be harmless as suspend/resume isn't working on the devices anyway. Reviewed by: jhibbits MFC after: 2 weeks
* kexec: Add dummy headers for arm, i386, powerpc, and riscvJustin Hibbits2025-10-271-0/+38
| | | | | | | | kexec hasn't been ported to these architectures, yet, so appease the build with dummy headers. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D51625
* arm, powerpc, riscv: implement atomic_set/clear_16Konstantin Belousov2025-09-201-1/+32
| | | | | | | Reviewed by: jrtc27, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52626
* powerpc: Fix multiple issues with FP/VSX save/restoreTimothy Pearson2025-07-132-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple issues existed within the powerpc FP/VSX save/restore functionality, leading to register corruption and loss of register contents in specific scenarios involving high signal load and use of both floating point and VSX instructions. Issue #1 On little endian systems the PCB used the wrong location for the shadowed FP register within the larger VSX register. This appears to have been an attempt to correct issue #2 without understanding how the vector load/store instructions actually operate. Issue #2 On little endian systems, the VSX state save/restore routines swapped 32-bit words within the 64-bit aliased double word for the associated floating point register. This was due to the use of a word-oriented load/store vs. doubleword oriented load/store. Issue #3 The FPU was turned off in the PCB but not in hardware, leading to a potential race condition if the same thread was scheduled immediately after sigreturn. The triggering codebase for this is Go, which makes heavy use of signals and and generates an unusual mix of floating point and VSX assembler. As a result, when combined with th powerpc lazy FPU restore, a condition was repeatedly hit whereby the thread was interrupted in FP+VSX mode, then restored in FP only mode, thus reliably triggering the issues above. Also clean up the associated asm() style issue flagged by GitHub Actions. Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1756
* pmap_growkernel(): do not panic immediately, optionally return the errorKonstantin Belousov2025-06-191-2/+2
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47935
* runq: Deduce most parameters, remove machine headersOlivier Certner2025-06-181-55/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'runq' machinery now depends on only two settable parameters, RQ_MAX_PRIO, the maximum priority number that can be accepted, the minimum being 0, and RQ_PPQ, the number of priorities per queue (to reduce the number of queues). All other parameters are deduced from these ones. Also, all architectures automatically get a runq word that is their natural word. RQB_FFS() always was 'ffsl() - 1' except for amd64 where it was 'bsfq()'. Now that all these finally call compiler builtins, the resulting assembly code is the same, so there is no cost to removing this special case. After all these changes, <machine/runq.h> headers have no more purpose, so remove them. While here, fix potentially confusing parameter name for RQB_WORD() and RQB_BIT(). While here, include all necessary headers so that <sys/runq.h> can be included standalone. No functional change (intended). Reviewed by: kib MFC after: 1 month Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45387
* vm: retire vm_page_lock()Alan Cox2025-06-111-6/+0
| | | | | | | | | | | vm_page_lock() and its underlying array of locks, pa_lock[], have been replaced throughout the virtual memory system by either atomics or busy-style, per-page synchronization. The Linux KPI support contained the only remaining use cases. Eliminate or update them as appropriate to each case. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D50767
* Revert "powernv: Add RF_BIGENDIAN resource flag"Justin Hibbits2025-05-141-1/+0
| | | | | | | | | | | After further thinking, the nexus bus mappings are for the immediate peripherals, not downstream. Given this, and that historically PowerPC platforms have been big-endian by default, it makes sense to default mappings to BE always. If this changes in the future, the platform devices can explicitly mark their mappings with the RF_LITTLEENDIAN flag instead. This reverts commit 86d20eaadfd1a03e19d8bc8333c689b820299d52.
* powernv: Add RF_BIGENDIAN resource flagJustin Hibbits2025-05-131-0/+1
| | | | | | | | | | | | | The big-endian analogue to the RF_LITTLEENDIAN flag, if this flag is set on a memory resource it's always mapped big endian. This is needed by the PowerNV OPAL resources (XIVE and PCI), as these top-level peripherals are always big-endian. Tested by: pkubaj Fixes: c4921a0f("powerpc: Always use BE tag in nexus_map_resource") MFC after: 1 day X-MFC-with: c4921a0f
* powernv: Explicitly enable the facilities we supportJustin Hibbits2025-03-191-0/+5
| | | | | | | | | | Thus far we've relied on the firmware setting HFSCR correctly, enabling all facilities. However, it appears some recent firmwares do not. Linux explicitly enables all facilities it supports (including transactional memory, which new firmwares apparently do not enable), so do the same here, explicitly enable all the facilities FreeBSD supports. MFC after: 1 week
* sys: Add cpu_update_pcb hookJohn Baldwin2025-01-311-5/+0
| | | | | | | | | | | | | This MD function is invoked before dumping register set notes when writing out a core dump to ensure that the PCB for a given thread is up to date. This provides a centralized place to update the PCB with values of the current thread for each arch rather than doing this work in each register set's get method. Discussed with: jrtc27 Reviewed by: kib, markj Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D44910
* pci: cleanup __PCI_REROUTE_INTERRUPTSMitchell Horne2025-01-231-3/+0
| | | | | | | | This flag was used as a transition for differing pcib implementations. Today it is defined for all supported architectures, and can be removed. Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D48485
* Centralize and simpify implemention of some VM macrosBrooks Davis2025-01-141-7/+0
| | | | | | | | | | | | | These macros have substantially identical implementations on each platform. Use roundup2/rounddown2 for round_page/trunc_page. This version standardizes on not using explicit casts and instead preserving the original type. A couple of tweaks were required to make this work. Reviewed by: brooks, kib, markj Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D48450
* atomics: Constify loadsOlivier Certner2024-12-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | In order to match reality, allow using these functions with pointers on const objects, and bring us closer to C11. Remove the '+' modifier in the atomic_load_acq_64_i586()'s inline asm statement's constraint for '*p' (the value to load). CMPXCHG8B always writes back some value, even when the value exchange does not happen in which case what was read is written back. atomic_load_acq_64_i586() further takes care of the operation atomically writing back the same value that was read in any case. All in all, this makes the inline asm's write back undetectable by any other code, whether executing on other CPUs or code on the same CPU before and after the call to atomic_load_acq_64_i586(), except for the fact that CMPXCHG8B will trigger a #GP(0) if the memory address is part of a read-only mapping. This unfortunate property is however out of scope of the C abstract machine, and in particular independent of whether the 'uint64_t' pointed to is declared 'const' or not. Approved by: markj (mentor) MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46887
* atomic(9): Implement atomic_testand(clear|set)_ptrJohn Baldwin2024-11-191-0/+10
| | | | | | | | | | For current architectures, these are just aliases for the existing operation on the relevant scalar integer. Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47631
* atomic(9): Remove fcmpset-based fallback for atomic_testand(clear|set)John Baldwin2024-11-191-6/+0
| | | | | | | | All architectures implement a MD version Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47629
* sys: Avoid relying on pollution from refcount.hMark Johnston2024-11-051-0/+2
| | | | | | | | | | Fix up headers which previously assumed that refcount.h includes systm.h, and make them more self-contained. Then, replace the systm.h include in refcount with kassert.h. Reviewed by: imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47450
* powerpc: Add nominal support for POWER10 and POWER11Justin Hibbits2024-10-112-0/+4
|
* ofw: convert boolean_t to boolMitchell Horne2024-06-261-1/+1
| | | | | | | | | | | Most of these already treat it as a proper bool, i.e. using true/false. Also fix-up callers of OF_install(). No functional change intended. Reviewed by: andrew, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45733
* sdt: Implement SDT probes using hot-patchingMark Johnston2024-06-191-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is to avoid a memory access and conditional branch per probe site. Instead, the probe is represented by an "unreachable" unconditional function call. asm goto is used to store the address of the probe site (represented by a no-op sled) and the address of the function call into a tracepoint record. Each SDT probe carries a list of tracepoints. When the probe is enabled, the no-op sled corresponding to each tracepoint is overwritten with a jmp to the corresponding label. The implementation uses smp_rendezvous() to park all other CPUs while the instruction is being overwritten, as this can't be done atomically in general. The compiler moves argument marshalling code and the sdt_probe() function call out-of-line, i.e., to the end of the function. Per gallatin@ in D43504, this approach has less overhead when probes are disabled. To make the implementation a bit simpler, I removed support for probes with 7 arguments; nothing makes use of this except a regression test case. It could be re-added later if need be. The approach taken in this patch enables some more improvements: 1. We can now automatically fill out the "function" field of SDT probe names. The SDT macros let the programmer specify the function and module names, but this is really a bug and shouldn't have been allowed. The intent was to be able to have the same probe in multiple functions and to let the user restrict which probes actually get enabled by specifying a function name or glob. 2. We can avoid branching on SDT_PROBES_ENABLED() by adding the ability to include blocks of code in the out-of-line path. For example: if (SDT_PROBES_ENABLED()) { int reason = CLD_EXITED; if (WCOREDUMP(signo)) reason = CLD_DUMPED; else if (WIFSIGNALED(signo)) reason = CLD_KILLED; SDT_PROBE1(proc, , , exit, reason); } could be written SDT_PROBE1_EXT(proc, , , exit, reason, int reason; reason = CLD_EXITED; if (WCOREDUMP(signo)) reason = CLD_DUMPED; else if (WIFSIGNALED(signo)) reason = CLD_KILLED; ); In the future I would like to use this mechanism more generally, e.g., to remove branches and marshalling code used by hwpmc, and generally to make it easier to add new tracepoint consumers without having to add more conditional branches to hot code paths. Reviewed by: Domagoj Stolfa, avg MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D44483
* vm: Simplify startup page dumping conditionalBojan Novković2024-05-251-0/+2
| | | | | | | | | | This commit introduces the MINIDUMP_STARTUP_PAGE_TRACKING symbol and uses it to simplify several instances of a complex preprocessor conditional for adding pages allocated when bootstraping the kernel to minidumps. Reviewed by: markj, mhorne Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45085
* uma: Deduplicate uma_small_allocBojan Novković2024-05-251-2/+4
| | | | | | | | | | | | | | | | | This commit refactors the UMA small alloc code and removes most UMA machine-dependent code. The existing machine-dependent uma_small_alloc code is almost identical across all architectures, except for powerpc where using the direct map addresses involved extra steps in some cases. The MI/MD split was replaced by a default uma_small_alloc implementation that can be overridden by architecture-specific code by defining the UMA_MD_SMALL_ALLOC symbol. Furthermore, UMA_USE_DMAP was introduced to replace most UMA_MD_SMALL_ALLOC uses. Reviewed by: markj, kib Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45084
* pmap: Convert boolean_t to bool.John Baldwin2024-01-312-7/+7
| | | | | Reviewed by: kib (older version) Differential Revision: https://reviews.freebsd.org/D39921
* powerpc: Add RF_LITTLEENDIAN resource flagJohn Baldwin2024-01-231-0/+7
| | | | | | | | | | | If this powerpc-specific flag is set on a resource, then the little-endian bus tag is always used when mapping that resource. Make use of this flag in the mpc85xx/fsl_sata driver to avoid setting the SATA BAR's bus tag after bus_alloc_resource. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D43553
* powerpc: Fix bus_space_unmapJohn Baldwin2024-01-231-1/+1
| | | | | | | | | Previously it failed to compile since the macro passed too many arguments to the function. Fix by adding the bus handle to the function and adding an implementation that calls pmap_unmapdev. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D43440
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-272-2/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove ancient SCCS tags.Warner Losh2023-11-2710-20/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* _bus.h: Use standard licnese textWarner Losh2023-11-131-24/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of these used the 'immediately at beginning' variation of the BSD-2-Clause license. This wasn't intentional, just what I copied from from a random file in the tree back in 2005. It was not an intentional decision. The different arch bus.h files are a mix of BSD-2-Clause and BSD-4-Clause that have various copyright holders (Charles M. Hannum, Christopher G. Demetriou, The NetBSD Foundation and KATO Takenori), and some of the content of these files were likely copied from there. However, apart from the uncopyrightable interface lines, there are very few comments. It's unclear if these comments are 'original material' here to copyright, but to the extent that there is, license it under the standard BSD-2-Clause copyright that's the norm for the project today. In any event, the standard BSD-2-Clause is also closer to those originals. In addition, FreeBSD uses different type definitions than the original NetBSD code in part. The comments that were copied have been copied a lot, but appear in NetBSD's bus.h files in NetBSD 1.3. While I'm here, assign the copyright, to the extent any exists from me, to the FreeBSD Foundation. I just cut and pasted these into _bus.h from the different machine files and those files have a rich history of modification from the original imports from NetBSD over more than 25 years so it's tricky to say who, exactly, wrote each bit. Given the size of the files, this seems like the best compromise. Also add an acknowledgement to the NetBSD 1.3 bus.h files and their authors (there were no additional FreeBSD authors listed in the various sys/*/include/bus.h files). Finally, use the SPDX identifier instead of multiple copies of the text. Differential Revision: https://reviews.freebsd.org/D42532 Sponsored by: Netflix
* powerpc: Implement fpu_kern_enter/fpu_kern_leaveShawn Anastasio2023-09-173-2/+27
| | | | | | | | | | | | | | | | | Summary: Provide an implementation of fpu_kern_enter/fpu_kern_leave for PPC to enable FPU, VSX, and Altivec usage in-kernel. The functions currently only support FPU_KERN_NOCTX, but this is sufficient for ossl(1) and many other users of the API. This patchset has been tested on powerpc64le using a modified version of the in-tree tools/tools/crypto/cryptocheck.c tool to check for FPU/Vec register clobbering along with a follow-up patch to enable ossl(4) on powerpc64*. Reviewed by: jhibbits MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41540
* Revert "powerpc: Implement fpu_kern_enter/fpu_kern_leave"Justin Hibbits2023-09-173-27/+2
| | | | | | This reverts commit 6a47fa697ace42851b44498a53446b29b2593316. Need to correct authorship.
* powerpc: Implement fpu_kern_enter/fpu_kern_leaveJustin Hibbits2023-09-173-2/+27
| | | | | | | | | | | | | | | | | Summary: Provide an implementation of fpu_kern_enter/fpu_kern_leave for PPC to enable FPU, VSX, and Altivec usage in-kernel. The functions currently only support FPU_KERN_NOCTX, but this is sufficient for ossl(1) and many other users of the API. This patchset has been tested on powerpc64le using a modified version of the in-tree tools/tools/crypto/cryptocheck.c tool to check for FPU/Vec register clobbering along with a follow-up patch to enable ossl(4) on powerpc64*. Reviewed by: jhibbits MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41540
* powerpc_pmap: include proper vm_radix fileDoug Moore2023-09-121-1/+1
| | | | | | | | Like the pmap.h files for amd64, arm64, i386 and riscv, the one for powerpc should #include vm/_vm_radix.h, not vm/vm_radix.h, to get a definition for struct vm_radix. Fixes a problem introduced with 429c871ddddac4bbf6abf1eb9e2e6603f87c2ef5.
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-164-4/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* sys: Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-1634-34/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1644-88/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Consistently provide ffs/fls using builtinsMitchell Horne2023-07-061-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of compiler builtin ffs/ctz functions will result in optimized instruction sequences when possible, and fall back to calling a function provided by the compiler run-time library. We have slowly shifted our platforms to take advantage of these builtins in 60645781d613 (arm64), 1c76d3a9fbef (arm), 9e319462a03a (powerpc, partial). Some platforms still rely on the libkern implementations of these functions provided by libkern, namely riscv, powerpc (ffs*, flsll), and i386 (ffsll and flsll). These routines are slow, as they perform a linear search for the bit in question. Even on platforms lacking dedicated bit-search instructions, such as riscv, the compiler library will provide better-optimized routines, e.g. by using binary search. Consolidate all definitions of these functions (whether currently using builtins or not) to libkern.h. This should result in equivalent or better performing routines in all cases. One wart in all of this is the existing HAVE_INLINE_F*** macros, which we use in a few places to conditionally avoid the slow libkern routines. These aren't easily removed in one commit. For now, provide these defines unconditionally, but marked for removal after subsequent cleanup. Removal of the now unused libkern routines will follow in the next commit. Reviewed by: dougm, imp (previous version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40698
* smp: Dynamically allocate the stoppcbs arrayMark Johnston2023-05-252-4/+0
| | | | | | | | | | | | | | This avoids bloating the kernel image when MAXCPU is large. A follow-up patch for kgdb and other kernel debuggers is needed since the stoppcbs symbol is now a pointer. Bump __FreeBSD_version so that debuggers can use osreldate to figure out how to handle stoppcbs. PR: 269572 MFC after: never Reviewed by: mjg, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39806
* spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSDWarner Losh2023-05-122-2/+2
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1232-32/+32
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* amd64: fix PKRU and swapout interactionKonstantin Belousov2023-04-141-0/+1
| | | | | | | | | | | | | | | | When vm_map_remove() is called from vm_swapout_map_deactivate_pages() due to swapout, PKRU attributes for the removed range must be kept intact. Provide a variant of pmap_remove(), pmap_map_delete(), to allow pmap to distinguish between real removes of the UVA mappings and any other internal removes, e.g. swapout. For non-amd64, pmap_map_delete() is stubbed by define to pmap_remove(). Reported by: andrew Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39556
* powerpc: Drop old workaround for old gccWarner Losh2023-02-141-12/+0
| | | | | | | | | | | | | | | | | | | Very old versions of gcc defined _BIG_ENDIAN and _LITTLE_ENDIAN. So to work around that, we undefined them here. However, that causes problems for programs that do: (and many other variations on that theme). Since this often is the result of weirdly nested includes in the ports world that are hard to unwind, drop this workaround to help more ports build out of the box. If there's still an issue here (and my testing hasn't shown it), we'll fix the issue in a brand-new way once I have a reproducer. This fixes the mesa-devel build, and others Sponsored by: Netflix Tested by: pkubaj MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D38564