FreeBSD Bugzilla – Attachment 203627 Details for
Bug 233863
Various PowerMac G5 models may require kern.smp.disabled=1 and must set usefdt=1 which causes net interface reorder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for investigatory narrowing of slb race on AIM powerpc64: aim/mp_cpudep.c and aim/slb.c (hack that avoids a mis-handled slb-miss)
file_233863.txt (text/plain), 1.72 KB, created by
Mark Millard
on 2019-04-12 22:57:58 UTC
(
hide
)
Description:
Patches for investigatory narrowing of slb race on AIM powerpc64: aim/mp_cpudep.c and aim/slb.c (hack that avoids a mis-handled slb-miss)
Filename:
MIME Type:
Creator:
Mark Millard
Created:
2019-04-12 22:57:58 UTC
Size:
1.72 KB
patch
obsolete
>Index: /usr/src/sys/powerpc/aim/mp_cpudep.c >=================================================================== >--- /usr/src/sys/powerpc/aim/mp_cpudep.c (revision 345758) >+++ /usr/src/sys/powerpc/aim/mp_cpudep.c (working copy) >@@ -107,6 +107,10 @@ > powerpc_sync(); > } > >+#ifdef __powerpc64__ >+extern void hack_into_slb_if_needed(void* vap); // HACK!!! >+#endif >+ > uintptr_t > cpudep_ap_bootstrap(void) > { >@@ -116,12 +120,19 @@ > mtmsr(msr); > > pcpup->pc_curthread = pcpup->pc_idlethread; >+ > #ifdef __powerpc64__ > __asm __volatile("mr 13,%0" :: "r"(pcpup->pc_curthread)); > #else > __asm __volatile("mr 2,%0" :: "r"(pcpup->pc_curthread)); > #endif >+ > pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb; >+ >+#ifdef __powerpc64__ >+ hack_into_slb_if_needed(pcpup->pc_curpcb); // HACK!!! >+#endif >+ > sp = pcpup->pc_curpcb->pcb_sp; > > return (sp); >Index: /usr/src/sys/powerpc/aim/slb.c >=================================================================== >--- /usr/src/sys/powerpc/aim/slb.c (revision 345758) >+++ /usr/src/sys/powerpc/aim/slb.c (working copy) >@@ -464,6 +464,28 @@ > critical_exit(); > } > >+void hack_into_slb_if_needed(void* vap); // HACK!!! >+void hack_into_slb_if_needed(void* vap) // HACK!!! >+{ // HACK!!! >+ struct slb *cache= PCPU_GET(aim.slb); >+ vm_offset_t va= (vm_offset_t)vap; >+ uint64_t slbv= kernel_va_to_slbv(va); >+ uint64_t esid= va>>ADDR_SR_SHFT; >+ uint64_t slbe= (esid<<SLBE_ESID_SHIFT) | SLBE_VALID; >+ int i; >+ >+ for (i = 0; i < n_slbs; i++) { >+ if (i == USER_SLB_SLOT) >+ continue; >+ if (cache[i].slbe == (slbe | i)) >+ break; >+ } >+ >+ if (i==n_slbs) >+ slb_insert_kernel(slbe,slbv); >+} // HACK!!! >+ >+ > void > slb_insert_user(pmap_t pm, struct slb *slb) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233863
:
199947
|
203622
|
203627
|
203652
|
203683
|
203812
|
203814
|
203844
|
203845
|
203889
|
203980
|
203981
|
203983
|
204307
|
204368
|
204369
|
223108