#
fdafd315 |
|
24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting 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
|
#
685dc743 |
|
16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
|
10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 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
|
#
429ba161 |
|
25-Feb-2023 |
Piotr Kubaj <pkubaj@FreeBSD.org> |
powerpc: fix warning: a function declaration without a prototype is deprecated in all versions of C Reviewers: #powerpc Approved by: alfredo Subscribers: imp, jhibbits Differential Revision: https://reviews.freebsd.org/D38787
|
#
1c311640 |
|
13-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
powerpc: Use __diagused for variables only used in KASSERT().
|
#
4a66b808 |
|
02-Jun-2021 |
Leandro Lupori <luporl@FreeBSD.org> |
powerpc: fix boot on pseries without hugepages Commit 49c894ddced5 introduced an issue that prevented pseries boot, when hugepages were not available to the guest. Now large page info must be available before moea64_install is called, so this change moves the code that scans large page sizes before the call. Reviewed by: jhibbits (IRC) Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
|
#
49c894dd |
|
05-May-2021 |
Justin Hibbits <jhibbits@FreeBSD.org> |
powerpc64: Split out DMAP and non-DMAP implementations of some methods Summary: Some methods are split between DMAP and non-DMAP, conditional on hw_direct_map variable. Rather than checking this variable every time, use it to install different functions via IFUNCs. Reviewed By: luporl Differential Revision: https://reviews.freebsd.org/D30071
|
#
e2d6c417 |
|
06-Nov-2020 |
Leandro Lupori <luporl@FreeBSD.org> |
Implement superpages for PowerPC64 (HPT) This change adds support for transparent superpages for PowerPC64 systems using Hashed Page Tables (HPT). All pmap operations are supported. The changes were inspired by RISC-V implementation of superpages, by @markj (r344106), but heavily adapted to fit PPC64 HPT architecture and existing MMU OEA64 code. While these changes are not better tested, superpages support is disabled by default. To enable it, use vm.pmap.superpages_enabled=1. In this initial implementation, when superpages are disabled, system performance stays at the same level as without these changes. When superpages are enabled, buildworld time increases a bit (~2%). However, for workloads that put a heavy pressure on the TLB the performance boost is much bigger (see HPC Challenge and pgbench on D25237). Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D25237
|
#
45b69dd6 |
|
26-May-2020 |
Justin Hibbits <jhibbits@FreeBSD.org> |
powerpc/mmu: Convert PowerPC pmap drivers to ifunc from kobj With IFUNC support in the kernel, we can finally get rid of our poor-man's ifunc for pmap, utilizing kobj. Since moea64 uses a second tier kobj as well, for its own private methods, this adds a second pmap install function (pmap_mmu_init()) to perform pmap 'post-install pre-bootstrap' initialization, before the IFUNCs get initialized. Reviewed by: bdragon
|
#
0ecc478b |
|
14-Oct-2019 |
Leandro Lupori <luporl@FreeBSD.org> |
[PPC64] Initial kernel minidump implementation Based on POWER9BSD implementation, with all POWER9 specific code removed and addition of new methods in PPC64 MMU interface, to isolate platform specific code. Currently, the new methods are implemented on pseries and PowerNV (D21643). Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D21551
|
#
7c382eea |
|
24-Jul-2019 |
Justin Hibbits <jhibbits@FreeBSD.org> |
powerpc/pmap64: Make moea64 statistics optional Summary: It turns out statistics accounting is very expensive in the pmap driver, and doesn't seem necessary in the common case. Make this optional behind a MOEA64_STATS #define, which one can set if they really need statistics. This saves ~7-8% on buildworld time on a POWER9. Found by bdragon. Reviewed by: luporl Differential Revision: https://reviews.freebsd.org/D20903
|
#
b934fc74 |
|
07-Jun-2019 |
Leandro Lupori <luporl@FreeBSD.org> |
[PPC64] Support QEMU/KVM pseries without hugepages This set of changes make it possible to run FreeBSD for PowerPC64/pseries, under QEMU/KVM, without requiring the host to make hugepages available to the guest. While there was already this possibility, by means of setting hw_direct_map to 0, on PowerPC64 there were a couple of issues/wrong assumptions that prevented this from working, before this changelist. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20522
|
#
89200436 |
|
23-Apr-2019 |
Leandro Lupori <luporl@FreeBSD.org> |
[PPC64] Fix wrong KASSERT in mphyp_pte_insert() As mphyp_pte_unset() can also remove PTE entries, and as this can happen in parallel with PTEs evicted by mphyp_pte_insert(), there is a (rare) chance the PTE being evicted gets removed before mphyp_pte_insert() is able to do so. Thus, the KASSERT should check wether the result is H_SUCCESS or H_NOT_FOUND, to avoid panics if the situation described above occurs. More details about this issue can be found in PR 237470. PR: 237470 Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20012
|
#
10d0cdfc |
|
05-May-2018 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Add support for powernv POWER9 MMU initialization The POWER9 MMU (PowerISA 3.0) is slightly different from current configurations, using a partition table even for hypervisor mode, and dropping the SDR1 register. Key off the newly early-enabled CPU features flags for the new architecture, and configure the MMU appropriately. The POWER9 MMU ignores the "PSIZ" field in the PTCR, and expects a 64kB table. As we are enabled for powernv (hypervisor mode, no VMs), only initialize partition table entry 0, and zero out the rest. The actual contents of the register are identical to SDR1 from previous architectures. Along with this, fix a bug in the page table allocation with very large memory. The table can be allocated on any 256k boundary. The bootstrap_alloc alignment argument is an int, and with large amounts of memory passing the size of the table as the alignment will overflow an integer. Hard-code the alignment at 256k as wider alignment is not necessary. Reviewed by: nwhitehorn Tested by: Breno Leitao Relnotes: Yes
|
#
bce6d88b |
|
17-Feb-2018 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Merge AIM and Book-E PCPU fields This is part of a long-term goal of merging Book-E and AIM into a single GENERIC kernel. As more work is done, the struct may be optimized further. Reviewed by: nwhitehorn
|
#
71e3c308 |
|
27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/powerpc: further adoption of SPDX licensing ID tags. Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
|
#
b78f74e5 |
|
25-Nov-2017 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Remove another extern int n_slbs made redundant by declaring this in mmu_oea64.h. MFC after: 3 weeks
|
#
509142e1 |
|
17-Nov-2015 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Where appropriate, use the endian-flipping OF_getencprop() instead of OF_getprop() to get encode-int encoded values from the OF tree. This is a no-op at present, since all existing PowerPC ports are big-endian, but it is a correctness improvement and will be required if we have a little-endian kernel at some future point. Where it is totally impossible for the code ever to be used on a little-endian system (much of powerpc/powermac, for instance), I have not necessarily made the appropriate changes. MFC after: 1 month
|
#
ad7ea69d |
|
16-Mar-2015 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Convert PTE eviction lock from an RW lock to a RM lock. It is held for writing approximately never (< 0.00000001% under heavy VM load, and it can go for months without ever being acquired in normal operation). This provides a 10% (2-minute) improvement in wall clock time for make -j32 buildworld on a 4-core 32-thread POWER8.
|
#
1cd30eb6 |
|
12-Mar-2015 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Deallocate any leftover page table entries in the LPAR at boot. This prevents contamination from a previous kernel (e.g. after shutdown -r).
|
#
827cc9b9 |
|
24-Feb-2015 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
New pmap implementation for 64-bit PowerPC processors. The main focus of this change is to improve concurrency: - Drop global state stored in the shadow overflow page table (and all other global state) - Remove all global locks - Use per-PTE lock bits to allow parallel page insertion - Reconstruct state when requested for evicted PTEs instead of buffering it during overflow This drops total wall time for make buildworld on a 32-thread POWER8 system by a factor of two and system time by a factor of three, providing performance 20% better than similarly clocked Core i7 Xeons per-core. Performance on smaller SMP systems, where PMAP lock contention was not as much of an issue, is nearly unchanged. Tested on: POWER8, POWER5+, G5 UP, G5 SMP (64-bit and 32-bit kernels) Merged from: user/nwhitehorn/ppc64-pmap-rework Looked over by: jhibbits, andreast MFC after: 3 months Relnotes: yes Sponsored by: FreeBSD Foundation
|
#
3b336798 |
|
09-Feb-2015 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Mark invalid page table entries correctly for PMAP as well as for the hypervisor. This prevents an infinite loop where processes with evicted pages would page fault forever when PMAP decided the evicted pages on which the process was faulting was actually present and did not need to be restored. Found while building LLVM with make -j32. Sponsored by: FreeBSD Foundation
|
#
07e765cd |
|
09-Feb-2015 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Fix typo in PTE insertion overflow handling: use the page we're actually returning, not the one we just looked at.
|
#
a840d2f5 |
|
08-Feb-2015 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Add some error checking on the supplied page size list. This makes sure that we (a) get the correct large page size to provide to pmap and (b) we can alert the user if running under incorrectly-configured PowerKVM on POWER7 and POWER8 systems. MFC after: 1 week
|
#
4af7c894 |
|
23-Nov-2013 |
Andreas Tobler <andreast@FreeBSD.org> |
Limit the large page size to 16MB for now. MFC after: 1 week
|
#
12e7de22 |
|
31-Oct-2013 |
Andreas Tobler <andreast@FreeBSD.org> |
Ouch, do the shift properly. An uin64_t needs the right postfix when shifting.
|
#
91a01b91 |
|
27-Sep-2013 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Make sure that ref and changed bits propagate back to the VM layer whenever pages are unmapped. The old code had several races that could allow these to become stale. Approved by: re (kib)
|
#
7a8d25c0 |
|
17-Sep-2013 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Merge in support for PAPR-compliant (Power Architecture Platform Requirements) systems from the projects/pseries branch. This in principle includes all IBM POWER hardware released in the last 15 years with the exception of POWER3-based systems when run in 64-bit mode. The main development target, however, has been the PAPR logical partition support that is the default target in KVM on POWER and QEMU -- mileage may vary on actual hardware at present. Much of the heavy lifting here was done by Andreas Tobler. Approved by: re (kib)
|