unwind.c fix for spinlock-debug compilation

From: Peter Chubb <peterc_at_gelato.unsw.edu.au>
Date: 2003-09-09 13:48:23
If you try to compile 2.6.0-test[45] with spinlock debugging on, then
unwind.c won't compile, because it uses a #define magic that hides
the variable in the spinlock debugging code (also called magic)

Suggested patch appended.

===== arch/ia64/kernel/unwind.c 1.32 vs edited =====
--- 1.32/arch/ia64/kernel/unwind.c	Sat Jul 26 11:42:20 2003
+++ edited/arch/ia64/kernel/unwind.c	Tue Sep  9 13:38:35 2003
@@ -1171,9 +1171,10 @@
 static inline unw_hash_index_t
 hash (unsigned long ip)
 {
-#	define magic	0x9e3779b97f4a7c16	/* based on (sqrt(5)/2-1)*2^64 */
+#	define hashmagic	0x9e3779b97f4a7c16	/* based on (sqrt(5)/2-1)*2^64 */
 
-	return (ip >> 4)*magic >> (64 - UNW_LOG_HASH_SIZE);
+	return (ip >> 4)*hashmagic >> (64 - UNW_LOG_HASH_SIZE);
+#undef hashmagic
 }
 
 static inline long

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Sep 8 23:52:19 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:17 EST