Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177671741
D61644.1794997492.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61644.1794997492.diff
View Options
diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c
--- a/sys/powerpc/aim/mmu_radix.c
+++ b/sys/powerpc/aim/mmu_radix.c
@@ -188,6 +188,9 @@
* Invalidate a range of translations
*/
+static bool radix_tlbie_full_flush;
+static bool radix_tlbie_need_fixup;
+
static __always_inline void
radix_tlbie(uint8_t ric, uint8_t prs, uint16_t is, uint32_t pid, uint32_t lpid,
vm_offset_t va, uint16_t ap)
@@ -206,6 +209,9 @@
radix_tlbie_fixup(uint32_t pid, vm_offset_t va, int ap)
{
+ if (!radix_tlbie_need_fixup)
+ return;
+
__asm __volatile("ptesync" ::: "memory");
radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE,
TLBIEL_INVAL_PAGE, 0, 0, va, ap);
@@ -1125,10 +1131,18 @@
static void
pmap_invalidate_range(pmap_t pmap, vm_offset_t start, vm_offset_t end)
{
- if (((start - end) >> PAGE_SHIFT) > 8) {
+ if (start == end)
+ return;
+
+ /*
+ * Preserve POWER9's existing full-flush policy: enabling the current
+ * per-page invalidation loop has been reported to regress performance.
+ */
+ if (radix_tlbie_full_flush || ((end - start) >> PAGE_SHIFT) > 8) {
pmap_invalidate_all(pmap);
return;
}
+
ptesync();
if (pmap == kernel_pmap) {
while (start < end) {
@@ -2359,6 +2373,11 @@
mmu_radix_bootstrap(vm_offset_t start, vm_offset_t end)
{
uint64_t lpcr;
+ uint16_t vers;
+
+ vers = mfpvr() >> 16;
+ radix_tlbie_full_flush = vers == IBMPOWER9;
+ radix_tlbie_need_fixup = vers == IBMPOWER9;
if (bootverbose)
printf("%s\n", __func__);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 18, 10:24 AM (22 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41804641
Default Alt Text
D61644.1794997492.diff (1 KB)
Attached To
Mode
D61644: powerpc/radix_mmu: Restrict POWER9 errata
Attached
Detach File
Event Timeline