| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Convert the oea64 mmu code to rwlocks.
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D54936
|
| |
|
|
|
|
|
|
| |
After discussion with jhibbits@, we pulled out what is supported here
and how it's supported.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55093
|
| |
|
|
|
|
|
|
| |
It's time to flip these on and see if anything happens in -HEAD.
It can be turned back off before 16.0-RELEASE if there are problems.
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D55071
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FreeBSD radix implementation piggybacks on the physical memory
allocation function from the HPT implementation, but did not share
the same state information for number of physical memory ranges.
This led to a situation where the HPT physical memory allocator
would attempt to shift the physical memory ranges in the shared
range table, but would use the wrong number of entries, thus
overwriting the large segment of low memory that should have been
available for e.g. 32-bit DMA.
Incorrect physical memory map:
real memory = 33997058048 (32422 MB)
available KVA = 34359619583 (32767 MB)
Physical memory chunk(s):
0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages)
0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages)
0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages)
0x0000000100000000 - 0x00000007a2042fff, 28487987200 bytes (6955075 pages)
0x00000007d0006000 - 0x00000007fc72dfff, 745701376 bytes (182056 pages)
0x00000007fdc00000 - 0x00000007ff79ffff, 28966912 bytes (7072 pages)
0x00000007ff7d1000 - 0x00000007ff7effff, 126976 bytes (31 pages)
avail memory = 29190103040 (27837 MB)
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
Correct physical memory map:
real memory = 33997058048 (32422 MB)
available KVA = 34359619583 (32767 MB)
Physical memory chunk(s):
0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages)
0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages)
0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages)
0x0000000002000000 - 0x000000000284ffff, 8716288 bytes (2128 pages)
0x0000000004627000 - 0x000000002fffffff, 731746304 bytes (178649 pages)
0x0000000034040000 - 0x00000000efffffff, 3153854464 bytes (769984 pages)
0x0000000100000000 - 0x00000007982ecfff, 28323008512 bytes (6914797 pages)
0x00000007cc20a000 - 0x00000007fc72dfff, 810696704 bytes (197924 pages)
0x00000007fdc00000 - 0x00000007ff79ffff, 28966912 bytes (7072 pages)
0x00000007ff7d1000 - 0x00000007ff7effff, 126976 bytes (31 pages)
avail memory = 32984436736 (31456 MB)
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Sponsored-by: Raptor Computing Systems, LLC
|
| |
|
|
|
|
|
|
|
|
|
| |
The only use of `tlbie %rN, 0` is now explicit and covered in the block
above. Since there's no need for an explicit `tlbie %rN, 0` now, drop
this convoluted piece and let the compiler decide.
While here, a trivial optimization of the old-style tlbie block, by
clearing tlbie_lock and returning, instead of going to the end which
checks again if the lock is needed. Since it's already known to be
needed, there's no need to check again.
|
| |
|
|
|
|
|
|
| |
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")
|
| |
|
|
|
|
|
|
|
| |
HPT superpages are 16MB, not 2MB. Taking 8 locks to lock a super page
almost defeats the purpose of using the super page. Expanding the
PV_LOCK scope to cover 16MB (24 bit shift) reduces this to a single
lock.
MFC after: 3 weeks
|
| |
|
|
|
|
|
|
|
|
| |
Add POWER10 and POWER11 to the list of lockless TLBIE capable CPUs.
According to Linux, anything POWER5 and later should be able to do this,
but that hasn't been tested with FreeBSD. POWER10 and POWER11, being
derived after the POWER9, implicitly have this capability per the ISA
spec.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
According to POWER8_UM_v1.3_16MAR2016 3.8.3 Translation Lookaside
Buffer (TLB), POWER8 supports lockless TLBIE operations.
Locally Tested:
* IBM POWER8 Revision 2.0, dual socket, 160 threads
Differential Revision: https://reviews.freebsd.org/D54855
Approved by: jhibbits
|
| |
|
|
|
|
|
| |
pmap_zero_page() may be called on uncached pages, so using the cache to
zero uncached pages may trigger a fault.
MFC after: 2 weeks
|
| |
|
|
| |
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For 32-bit arm, move the no-op test that was already in place at start
of the function so that it stays first even if the '#if 0' block around
the call to sf_buf_invalidate_cache() is uncommented at some point (if
ever).
Reviewed by: jeffpc_josefsipek.net, kib
MFC after: 10 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51253
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D47935
|
| |
|
|
|
|
|
|
|
|
|
| |
After the demise of vm_page_lock(), the only remaining uses of
pa_index() are in various pmap implementations. In many cases, e.g.,
amd64, the pmap implementations already provided their own definitions,
often identical to the machine-independent one. For those that didn't
provide one, this change adds it.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D50823
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Change architecture-specific code to use iterators rather than tailq
pointers.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49927
|
| |
|
|
|
|
|
|
| |
Function moea64_sp_demote_aligned() is only invoked if VM_NRESERVLEVEL
> 0. Add #if/#endif pairs around the declaration and definition of
that function to silence warnings about unused static functions.
Reviewed by: kib
|
| |
|
|
|
|
|
|
|
|
| |
Treat Hypervisor Facility Unavailable as an illegal instruction in user
space. This way programs that use facilities like transactional memory,
which will never be supported as it has been removed from the ISA, will
not crash the kernel.
Tested by: pkubaj
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
| |
In this case, the domain from which the memory to back the VM page array
is allocated does not matter, so just let vm_phys_early_alloc() choose
a suitable domain.
Reviewed by: jhibbits, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48888
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch modifies pmap_growkernel in all pmaps to use VM_ALLOC_NOFREE
when allocating new pagetable pages. This should help reduce longterm
fragmentation as these pages are never released after
they are allocated.
Differential Revision: https://reviews.freebsd.org/D45998
Reviewed by: alc, markj, kib, mhorne
Tested by: alc
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
0013741 fixed an edge case invloving mlock() and superpage creation
by creating and inserting a leaf pagetable page for mlock'd superpages.
However, the code does not properly release the reference to the
pagetable page in the error handling path.
This commit fixes the issue by adding calls to 'pmap_abort_ptp'
in the error handling path.
Reported by: alc
Approved by: markj (mentor)
Fixes: 0013741
Differential Revision: https://reviews.freebsd.org/D45582
|
| |
|
|
|
|
|
|
| |
This commit moves code for releasing pagetable page references
into a separate function. No functional change intended.
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D45581
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a simple heuristic to skip pointless promotion attempts by
pmap_enter_quick_locked() and moea64_enter(). Specifically, when
vm_fault() calls pmap_enter_quick() to map neighboring pages at the end
of a copy-on-write fault, there is no point in attempting promotion in
pmap_enter_quick_locked() and moea64_enter(). Promotion will fail
because the base pages have differing protection.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D45431
MFC after: 1 week
|
| |
|
|
|
| |
Reviewed by: kib (older version)
Differential Revision: https://reviews.freebsd.org/D39921
|
| |
|
|
|
|
|
|
|
|
| |
This applies the fix to powerpc's pmap as was done in commit aa3bcaad51076ceb
and d0941ed9b5c39d92 for amd64 and riscv pmaps, respectively.
Reported by: Jenkins
Reviewed by: bojan.novkovic_fer.hr, markj
Fixes: e4078494f344bcba8709216bd601efa3dd05f6b3
Differential Revision: https://reviews.freebsd.org/D43339
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 2d2bcba7ba70141388729ed49674b36fd01146c5 changed radix trie
implementation and made it necessary that radix tries be initialized
with vm_radix_init. @dbaio reports that in some configurations, there
is a powerpc boot panic and that this commit introduced the
problem. In powerpc/aim/mmu_radix.c, the radix trie in kernel_pmap is
initialized by zeroing all its fields.
Add a call to vm_radix_init to properly initialize
kernel_pmap->pm_radix.
Reported by: dbaio
Reviewed by: alc, jhibbits
Fixes: 2d2bcba7ba drop NULL check from radix trie search
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41846
|
| |
|
|
|
|
|
|
| |
Replacing _vm_radix.h with vm_radix.h in one header file leaves one
source file short of function definitions. Include vm_radix.h in that
source file.
Fixes a problem rooted in change 429c871ddddac4bbf6abf1eb9e2e6603f87c2ef5.
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D39733
|
| |
|
|
|
|
|
|
|
|
|
| |
While experimenting with changing boolean_t to another type, I noticed
that several powerpc pmap related functions returned the wrong type:
boolean_t instead of int.
Fix several declarations and definitions to match the actual pmap
function types: pmap_dev_direct_mapped_t and pmap_ts_referenced_t.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
It's apparently possible for pcpu->pc_curpmap to be NULL at some point,
leading to a panic. Account for this as is done with the other 64-bit
AIM pmap.
Reported by: pkubaj
Tested by: pkubaj
Fixes: 6f0b2a235a1 ("Add pmap_sync_icache() for radix pmap")
MFC after: 3 days
|
| |
|
|
|
|
|
| |
DTrace pid provider writes to user space to set breakpoints. Failing to
sync the icache can lead to SIGTRAP. Radix pmap is the only one missing
a pmap_sync_icache() method, so the pid provider would only potentially
crash a process on a POWER9 or later system.
|
| |
|
|
|
|
|
|
|
|
|
| |
deprecated in all versions of C
Reviewers: #powerpc
Approved by: alfredo
Subscribers: imp, jhibbits
Differential Revision: https://reviews.freebsd.org/D38787
|
| |
|
|
|
|
|
|
|
| |
Flags should be M_WAITOK | M_ZERO instead of just M_ZERO
Reviewed by: markj
MFC after: 2 days
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D36865
|
| |
|
|
|
|
| |
Reviewed by: kib, markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D36549
|
| |
|
|
|
|
|
|
| |
This matches the return type of pmap_mapdev/bios.
Reviewed by: kib, markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D36548
|
| |
|
|
|
|
|
|
|
|
| |
This applies one of the changes from
5567d6b4419b02a2099527228b1a51cc55a5b47d to other architectures
besides arm64.
Reviewed by: kib
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D36263
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With clang 15, the following -Werror warning is produced:
sys/powerpc/aim/moea64_native.c:306:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
moea64_install_native()
^
void
This is because moea64_install_native() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
With clang 15, the following -Werror warning is produced:
sys/powerpc/aim/mmu_radix.c:5409:22: error: variable 'freed' set but not used [-Werror,-Wunused-but-set-variable]
int allfree, field, freed, idx;
^
The 'freed' variable is only used when PV_STATS is defined. Ensure it is
only declared and set in that case.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With clang 15, the following -Werror warnings are produced:
sys/powerpc/aim/mmu_radix.c:786:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
mmu_radix_tlbie_all()
^
void
sys/powerpc/aim/mmu_radix.c:3615:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
mmu_radix_init()
^
void
sys/powerpc/aim/mmu_radix.c:6081:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
mmu_radix_scan_init()
^
void
This is because mmu_radix_tlbie_all(), mmu_radix_init(), and
mmu_radix_scan_init() are declared with (void) argument lists, but
defined with empty argument lists. Make the definitions match the
declarations.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With clang 15, the following -Werror warnings are produced:
sys/powerpc/aim/mmu_oea64.c:1947:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
moea64_init()
^
void
sys/powerpc/aim/mmu_oea64.c:3257:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
moea64_scan_init()
^
void
This is because moea64_init() and moea64_scan_init() are declared with
(void) argument lists, but defined with empty argument lists. Make the
definitions match the declarations.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With clang 15, the following -Werror warning is produced:
sys/powerpc/aim/aim_machdep.c:750:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
mpc745x_sleep()
^
void
This is because mpc745x_sleep() is declared with a (void) argument list,
but defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make most AST handlers dynamically registered. This allows to have
subsystem-specific handler source located in the subsystem files,
instead of making subr_trap.c aware of it. For instance, signal
delivery code on return to userspace is now moved to kern_sig.c.
Also, it allows to have some handlers designated as the cleanup (kclear)
type, which are called both at AST and on thread/process exit. For
instance, ast(), exit1(), and NFS server no longer need to be aware
about UFS softdep processing.
The dynamic registration also allows third-party modules to register AST
handlers if needed. There is one caveat with loadable modules: the
code does not make any effort to ensure that the module is not unloaded
before all threads processed through AST handler in it. In fact, this
is already present behavior for hwpmc.ko and ufs.ko. I do not think it
is worth the efforts and the runtime overhead to try to fix it.
Reviewed by: markj
Tested by: emaste (arm64), pho
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D35888
|
| | |
|
| | |
|
| | |
|