All of lore.kernel.org
 help / color / mirror / Atom feed
* unwind.c fix for spinlock-debug compilation
@ 2003-09-09  3:48 Peter Chubb
  0 siblings, 0 replies; only message in thread
From: Peter Chubb @ 2003-09-09  3:48 UTC (permalink / raw)
  To: linux-ia64


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-09  3:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-09  3:48 unwind.c fix for spinlock-debug compilation Peter Chubb

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.