Skip to contentSkip to conversation

collision: arch/sparc/include/asm/spinlock_64.h vs.

DISCUSSION Alexander Beregalov 2 participants 2 messages Jan 13, 2009 – Jan 14, 2009 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

Hi

__raw_{read,write}*() are defined in both places.

In file included from
/home/alexb/linux-2.6/arch/sparc/include/asm/spinlock.h:4,

                 from arch/sparc/kernel/sparc_ksyms_64.c:12:
/home/alexb/linux-2.6/arch/sparc/include/asm/spinlock_64.h:221:1:
error: "__raw_write_can_lock" redefined
In file included from include/linux/spinlock.h:90,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/stat.h:60,
                 from include/linux/module.h:10,
                 from arch/sparc/kernel/sparc_ksyms_64.c:8:

include/linux/spinlock_up.h:70:1: error: this is the location of the previous definition

maintainer
#1 lore raw

From: Alexander Beregalov <[email protected]>
Date: Tue, 13 Jan 2009 13:06:26 +0300

Quoted 1 line

__raw_{read,write}*() are defined in both places.

The best part is that we don't need to export any of these rwlock symbols from sparc_ksyms_64.c

All of those routines are inline functions.

Thanks for the report, both of you, I'll fix it like so:

arch/sparc/kernel/sparc_ksyms_64.c +0 -11
index da8f804..0f26066 100644
@@ -9,7 +9,6 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 
-#include <asm/spinlock.h>
 #include <asm/system.h>
 #include <asm/cpudata.h>
 #include <asm/uaccess.h>
@@ -23,16 +22,6 @@ struct poll {
 	short revents;
 };
 
-/* used by various drivers */
-#ifdef CONFIG_SMP
-/* Out of line rw-locking implementation. */
-EXPORT_SYMBOL(__read_lock);
-EXPORT_SYMBOL(__read_unlock);
-EXPORT_SYMBOL(__write_lock);
-EXPORT_SYMBOL(__write_unlock);
-EXPORT_SYMBOL(__write_trylock);
-#endif /* CONFIG_SMP */
-
 /* from helpers.S */
 EXPORT_SYMBOL(__flushw_user);
 EXPORT_SYMBOL_GPL(real_hard_smp_processor_id);