Skip to contentSkip to conversation

PowerPC: add missing native dcr dcr_ind_lock spinlock

PATCH In review Valentine Barshak 1 participant 3 messages Feb 4, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PowerPC: add missing native dcr dcr_ind_lock spinlock

The include/asm-powerpc/dcr-native.h declares extern spinlock_t dcr_ind_lock, but it's actually isn't defined. This patch adds a missing dcr_ind_lock.

---
 arch/powerpc/sysdev/dcr.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/powerpc/sysdev/dcr.c +3 -2
diff -pruN linux-2.6.orig/arch/powerpc/sysdev/dcr.c linux-2.6/arch/powerpc/sysdev/dcr.c
@@ -137,5 +137,6 @@ void dcr_unmap(dcr_host_t host, unsigned
 	h.token = NULL;
 }
 EXPORT_SYMBOL_GPL(dcr_unmap);
-
-#endif /* !defined(CONFIG_PPC_DCR_NATIVE) */
+#else	/* defined(CONFIG_PPC_DCR_NATIVE) */
+spinlock_t dcr_ind_lock;
+#endif	/* !defined(CONFIG_PPC_DCR_NATIVE) */
#1 lore raw

Oops, sorry, please discard this one.
DEFINE_SPINLOCK should be used here.

Quoted 24 lines · Valentine Barshak

The include/asm-powerpc/dcr-native.h declares extern spinlock_t dcr_ind_lock, but it's actually isn't defined. This patch adds a missing dcr_ind_lock.

---
 arch/powerpc/sysdev/dcr.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -pruN linux-2.6.orig/arch/powerpc/sysdev/dcr.c linux-2.6/arch/powerpc/sysdev/dcr.c

arch/powerpc/sysdev/dcr.c +3 -2
@@ -137,5 +137,6 @@ void dcr_unmap(dcr_host_t host, unsigned
 	h.token = NULL;
 }
 EXPORT_SYMBOL_GPL(dcr_unmap);
-
-#endif /* !defined(CONFIG_PPC_DCR_NATIVE) */
+#else	/* defined(CONFIG_PPC_DCR_NATIVE) */
+spinlock_t dcr_ind_lock;
+#endif	/* !defined(CONFIG_PPC_DCR_NATIVE) */

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

#2 lore raw

PATCH 1/1 PowerPC: add missing native dcr dcr_ind_lock spinlock

The include/asm-powerpc/dcr-native.h declares extern spinlock_t dcr_ind_lock; but it's actually isn't defined. This patch adds a missing dcr_ind_lock.

---
 arch/powerpc/sysdev/dcr.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/powerpc/sysdev/dcr.c +3 -2
diff -pruN linux-2.6.orig/arch/powerpc/sysdev/dcr.c linux-2.6/arch/powerpc/sysdev/dcr.c
@@ -137,5 +137,6 @@ void dcr_unmap(dcr_host_t host, unsigned
 	h.token = NULL;
 }
 EXPORT_SYMBOL_GPL(dcr_unmap);
-
-#endif /* !defined(CONFIG_PPC_DCR_NATIVE) */
+#else	/* defined(CONFIG_PPC_DCR_NATIVE) */
+DEFINE_SPINLOCK(dcr_ind_lock);
+#endif	/* !defined(CONFIG_PPC_DCR_NATIVE) */