Page MenuHomeFreeBSD

D15581.diff
No OneTemporary

D15581.diff

Index: head/sys/powerpc/aim/moea64_native.c
===================================================================
--- head/sys/powerpc/aim/moea64_native.c
+++ head/sys/powerpc/aim/moea64_native.c
@@ -133,6 +133,8 @@
/* POWER9 only permits a 64k partition table size. */
#define PART_SIZE 0x10000
+static int moea64_crop_tlbie;
+
static __inline void
TLBIE(uint64_t vpn) {
#ifndef __powerpc64__
@@ -144,12 +146,14 @@
static volatile u_int tlbie_lock = 0;
vpn <<= ADDR_PIDX_SHFT;
- vpn &= ~(0xffffULL << 48);
/* Hobo spinlock: we need stronger guarantees than mutexes provide */
while (!atomic_cmpset_int(&tlbie_lock, 0, 1));
isync(); /* Flush instruction queue once lock acquired */
+ if (moea64_crop_tlbie)
+ vpn &= ~(0xffffULL << 48);
+
#ifdef __powerpc64__
__asm __volatile("tlbie %0" :: "r"(vpn) : "memory");
__asm __volatile("eieio; tlbsync; ptesync" ::: "memory");
@@ -428,6 +432,15 @@
moea64_early_bootstrap(mmup, kernelstart, kernelend);
+ switch (mfpvr() >> 16) {
+ case IBMPOWER4:
+ case IBMPOWER4PLUS:
+ case IBM970:
+ case IBM970FX:
+ case IBM970GX:
+ case IBM970MP:
+ moea64_crop_tlbie = true;
+ }
/*
* Allocate PTEG table.
*/

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 6:09 PM (6 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14807189
Default Alt Text
D15581.diff (1 KB)

Event Timeline