mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 01:51:39 +00:00
lockref: use BLOATED_SPINLOCKS to avoid explicit config dependencies
Avoid the fragile Kconfig construct guestimating spinlock_t sizes; use a friendly compile-time test to determine this. [kirill.shutemov@linux.intel.com: drop CONFIG_CMPXCHG_LOCKREF] Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ea1e7ed337
commit
57f4257eae
3 changed files with 7 additions and 9 deletions
|
@ -15,10 +15,15 @@
|
|||
*/
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <generated/bounds.h>
|
||||
|
||||
#define USE_CMPXCHG_LOCKREF \
|
||||
(IS_ENABLED(CONFIG_ARCH_USE_CMPXCHG_LOCKREF) && \
|
||||
IS_ENABLED(CONFIG_SMP) && !BLOATED_SPINLOCKS)
|
||||
|
||||
struct lockref {
|
||||
union {
|
||||
#ifdef CONFIG_CMPXCHG_LOCKREF
|
||||
#if USE_CMPXCHG_LOCKREF
|
||||
aligned_u64 lock_count;
|
||||
#endif
|
||||
struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue