Message ID | 1495154170-854693-7-git-send-email-babu.moger@oracle.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
From: Babu Moger <babu.moger@oracle.com> Date: Thu, 18 May 2017 18:36:10 -0600 > @@ -83,6 +83,7 @@ config SPARC64 > select ARCH_SUPPORTS_ATOMIC_RMW > select HAVE_NMI > select ARCH_USE_QUEUED_RWLOCKS > + select ARCH_USE_QUEUED_SPINLOCKS > > config ARCH_DEFCONFIG > string Like the queued spinlock enabling patch, if this will be on all the time for SPARC64 then: > diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h > index 562dbd8..e2044e3 100644 > --- a/arch/sparc/include/asm/spinlock_64.h > +++ b/arch/sparc/include/asm/spinlock_64.h > @@ -11,6 +11,9 @@ > #include <asm/processor.h> > #include <asm/barrier.h> > > +#ifdef CONFIG_QUEUED_SPINLOCKS > +#include <asm/qspinlock.h> > +#else This ifdef doesn't make any sense, by definition it will always be on. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 5/18/2017 9:32 PM, David Miller wrote: > From: Babu Moger <babu.moger@oracle.com> > Date: Thu, 18 May 2017 18:36:10 -0600 > >> @@ -83,6 +83,7 @@ config SPARC64 >> select ARCH_SUPPORTS_ATOMIC_RMW >> select HAVE_NMI >> select ARCH_USE_QUEUED_RWLOCKS >> + select ARCH_USE_QUEUED_SPINLOCKS >> >> config ARCH_DEFCONFIG >> string > Like the queued spinlock enabling patch, if this will be on > all the time for SPARC64 then: > >> diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h >> index 562dbd8..e2044e3 100644 >> --- a/arch/sparc/include/asm/spinlock_64.h >> +++ b/arch/sparc/include/asm/spinlock_64.h >> @@ -11,6 +11,9 @@ >> #include <asm/processor.h> >> #include <asm/barrier.h> >> >> +#ifdef CONFIG_QUEUED_SPINLOCKS >> +#include <asm/qspinlock.h> >> +#else > This ifdef doesn't make any sense, by definition it will always be on. Ok. Will do. thanks -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index caeda1c..785bf3e 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -83,6 +83,7 @@ config SPARC64 select ARCH_SUPPORTS_ATOMIC_RMW select HAVE_NMI select ARCH_USE_QUEUED_RWLOCKS + select ARCH_USE_QUEUED_SPINLOCKS config ARCH_DEFCONFIG string diff --git a/arch/sparc/include/asm/qspinlock.h b/arch/sparc/include/asm/qspinlock.h new file mode 100644 index 0000000..5ae9a28 --- /dev/null +++ b/arch/sparc/include/asm/qspinlock.h @@ -0,0 +1,7 @@ +#ifndef _ASM_SPARC_QSPINLOCK_H +#define _ASM_SPARC_QSPINLOCK_H + +#include <asm-generic/qspinlock_types.h> +#include <asm-generic/qspinlock.h> + +#endif /* _ASM_SPARC_QSPINLOCK_H */ diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h index 562dbd8..e2044e3 100644 --- a/arch/sparc/include/asm/spinlock_64.h +++ b/arch/sparc/include/asm/spinlock_64.h @@ -11,6 +11,9 @@ #include <asm/processor.h> #include <asm/barrier.h> +#ifdef CONFIG_QUEUED_SPINLOCKS +#include <asm/qspinlock.h> +#else /* To get debugging spinlocks which detect and catch * deadlock situations, set CONFIG_DEBUG_SPINLOCK * and rebuild your kernel. @@ -93,6 +96,7 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long fla : "r"(lock), "r"(flags) : "memory"); } +#endif /*ifdef CONFIG_QUEUED_SPINLOCKS */ #ifndef CONFIG_QUEUED_RWLOCKS /* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */ diff --git a/arch/sparc/include/asm/spinlock_types.h b/arch/sparc/include/asm/spinlock_types.h index e052d28..93c8c5a 100644 --- a/arch/sparc/include/asm/spinlock_types.h +++ b/arch/sparc/include/asm/spinlock_types.h @@ -5,11 +5,16 @@ # error "please don't include this file directly" #endif +#ifdef CONFIG_QUEUED_SPINLOCKS +#include <asm-generic/qspinlock_types.h> +#else + typedef struct { volatile unsigned char lock; } arch_spinlock_t; #define __ARCH_SPIN_LOCK_UNLOCKED { 0 } +#endif /* CONFIG_QUEUED_SPINLOCKS */ #ifdef CONFIG_QUEUED_RWLOCKS #include <asm-generic/qrwlock_types.h>