From 1ce961d4ae4d23f33caae3141cb28811ce166b1d Mon Sep 17 00:00:00 2001 From: Peter Michael Green Date: Wed, 20 Dec 2023 21:29:26 +0000 Subject: [PATCH] replace dmb instruction with coprocessor barrier instruction. --- debian/changelog | 5 ++++- rts/include/stg/SMP.h | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index b3a905e4..31eda797 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,7 +9,10 @@ ghc (9.4.7-2+rpi1) trixie-staging; urgency=medium [changes brought forward from 9.0.2-4+rpi3 by Peter Michael Green at Wed, 05 Oct 2022 13:33:13 +0000] * Add build conflicts on libnuma1 - -- Raspbian forward porter Tue, 19 Dec 2023 10:20:21 +0000 + [changes introduced in 9.4.7-2+rpi1 by Peter Michael Green] + * replace dmb instruction with coprocessor barrier instruction. + + -- Peter Michael Green Fri, 22 Dec 2023 05:25:33 +0000 ghc (9.4.7-2) unstable; urgency=medium diff --git a/rts/include/stg/SMP.h b/rts/include/stg/SMP.h index 41cfc2c4..76ed1805 100644 --- a/rts/include/stg/SMP.h +++ b/rts/include/stg/SMP.h @@ -409,7 +409,7 @@ write_barrier(void) { #elif defined(s390x_HOST_ARCH) __asm__ __volatile__ ("" : : : "memory"); #elif defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH) - __asm__ __volatile__ ("dmb st" : : : "memory"); + __asm__ __volatile__ ("mcr p15, #0, r0, c7, c10, #5" : : : "memory"); #elif defined(riscv64_HOST_ARCH) __asm__ __volatile__ ("fence w,w" : : : "memory"); #else @@ -431,7 +431,7 @@ store_load_barrier(void) { #elif defined(s390x_HOST_ARCH) __asm__ __volatile__ ("bcr 14,0" : : : "memory"); #elif defined(arm_HOST_ARCH) - __asm__ __volatile__ ("dmb" : : : "memory"); + __asm__ __volatile__ ("mcr p15, #0, r0, c7, c10, #5" : : : "memory"); #elif defined(aarch64_HOST_ARCH) __asm__ __volatile__ ("dmb sy" : : : "memory"); #elif defined(riscv64_HOST_ARCH) @@ -455,7 +455,7 @@ load_load_barrier(void) { #elif defined(s390x_HOST_ARCH) __asm__ __volatile__ ("" : : : "memory"); #elif defined(arm_HOST_ARCH) - __asm__ __volatile__ ("dmb" : : : "memory"); + __asm__ __volatile__ ("mcr p15, #0, r0, c7, c10, #5" : : : "memory"); #elif defined(aarch64_HOST_ARCH) __asm__ __volatile__ ("dmb ld" : : : "memory"); #elif defined(riscv64_HOST_ARCH) -- 2.30.2