Your message dated Thu, 9 Jan 2025 14:59:32 +0800
with message-id <[email protected]>
and subject line build success on loong64 now
has caused the Debian Bug report #1053651,
regarding ruby-pg-query: add loongarch spinlock support
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1053651: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053651
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ruby-pg-query
Version: 2.2.1-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: loongarch64
Dear ruby-pg-query maintainers,
Fixed a compilation error with ruby-pg-query due to lack of loongarch
spinlock support.
thanks,
Zang Ruochen
From 1e02735872612b4653f89ac0b0117ed9076d299f Mon Sep 17 00:00:00 2001
From: Zang Ruochen <[email protected]>
Date: Sun, 8 Oct 2023 02:07:14 +0000
Subject: [PATCH] add loongarch spinlock support.
---
ext/pg_query/include/storage/s_lock.h | 39 +++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/ext/pg_query/include/storage/s_lock.h
b/ext/pg_query/include/storage/s_lock.h
index 6b368a5..393f0ab 100644
--- a/ext/pg_query/include/storage/s_lock.h
+++ b/ext/pg_query/include/storage/s_lock.h
@@ -696,6 +696,45 @@ do \
#endif /* __mips__ && !__sgi */
+#if defined(__loongarch__) /* loongarch */
+#define HAS_TEST_AND_SET
+
+typedef unsigned int slock_t;
+
+#define TAS(lock) tas(lock)
+
+static __inline__ int
+tas(volatile slock_t *lock)
+{
+ register volatile slock_t *_l = lock;
+ register int _res;
+ register int _tmp;
+
+ __asm__ __volatile__(
+ " ll.w %0, %2 \n"
+ " ori %1, %0, 1 \n"
+ " sc.w %1, %2 \n"
+ " xori %1, %1, 1 \n"
+ " or %0, %0, %1 \n"
+ " dbar 0 \n"
+: "=&r" (_res), "=&r" (_tmp), "+ZC" (*_l)
+: /* no inputs */
+: "memory");
+ return _res;
+}
+
+#define S_UNLOCK(lock) \
+do \
+{ \
+ __asm__ __volatile__( \
+ " dbar 0 \n" \
+: /* no outputs */ \
+: /* no inputs */ \
+: "memory"); \
+ *((volatile slock_t *) (lock)) = 0; \
+} while (0)
+
+#endif /* __loongarch__ */
#if defined(__m32r__) && defined(HAVE_SYS_TAS_H) /* Renesas' M32R */
#define HAS_TEST_AND_SET
--
2.40.1
--- End Message ---
--- Begin Message ---
Version: 4.2.3-1
https://buildd.debian.org/status/fetch.php?pkg=ruby-pg-query&arch=loong64&ver=4.2.3-1&stamp=1701999434&raw=0
Thanks!
--
肖盛文 xiao sheng wen -- Debian Developer(atzlinux)
Debian QA page: https://qa.debian.org/developer.php?login=atzlinux%40debian.org
Debian salsa: https://salsa.debian.org/atzlinux-guest
GnuPG Public Key: 0x00186602339240CB
OpenPGP_0x00186602339240CB.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
--- End Message ---
_______________________________________________
Pkg-ruby-extras-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers