FreeBSD Bugzilla – Attachment 251202 Details for
Bug 271826
FreeBSD is disastrously slow on a PowerMac G5, freezing at every command
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
tbsync patch 1
tbsync.diff (text/plain), 1.62 KB, created by
ben
on 2024-06-03 18:20:23 UTC
(
hide
)
Description:
tbsync patch 1
Filename:
MIME Type:
Creator:
ben
Created:
2024-06-03 18:20:23 UTC
Size:
1.62 KB
patch
obsolete
>diff --git a/sys/powerpc/powermac/platform_powermac.c b/sys/powerpc/powermac/platform_powermac.c >index c63ef521ca8f..331969066ce3 100644 >--- a/sys/powerpc/powermac/platform_powermac.c >+++ b/sys/powerpc/powermac/platform_powermac.c >@@ -408,7 +408,7 @@ powermac_register_timebase(device_t dev, powermac_tb_disable_t cb) > static void > powermac_smp_timebase_sync(platform_t plat, u_long tb, int ap) > { >- static volatile bool tb_ready; >+ static volatile int tb_ready; > static volatile int cpu_done; > > /* >@@ -424,27 +424,27 @@ powermac_smp_timebase_sync(platform_t plat, u_long tb, int ap) > if (ap) { > /* APs. Hold off until we get a stable timebase. */ > critical_enter(); >- while (!tb_ready) >+ while (atomic_load_acq_int(&tb_ready) < 1) > atomic_thread_fence_seq_cst(); > mttb(tb); >- atomic_add_int(&cpu_done, 1); >- while (cpu_done < mp_ncpus) >+ atomic_add_rel_int(&cpu_done, 1); >+ while (atomic_load_acq_int(&cpu_done) < mp_ncpus) > atomic_thread_fence_seq_cst(); > critical_exit(); > } else { > /* BSP */ > critical_enter(); > /* Ensure cpu_done is zeroed so we can resync at runtime */ >- atomic_set_int(&cpu_done, 0); >+ atomic_set_rel_int(&cpu_done, 0); > freeze_timebase(powermac_tb_dev, true); >- tb_ready = true; >+ atomic_set_rel_int(&tb_ready, 1); > mttb(tb); >- atomic_add_int(&cpu_done, 1); >- while (cpu_done < mp_ncpus) >+ atomic_add_rel_int(&cpu_done, 1); >+ while (atomic_load_acq_int(&cpu_done) < mp_ncpus) > atomic_thread_fence_seq_cst(); > freeze_timebase(powermac_tb_dev, false); > /* Reset tb_ready so we can resync at runtime */ >- tb_ready = false; >+ atomic_set_rel_int(&tb_ready, 0); > critical_exit(); > } > }
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 271826
:
242607
|
242608
|
242609
|
242610
|
242611
|
251098
| 251202 |
251226