diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/spinlock.h | 5 | ||||
-rw-r--r-- | arch/x86/mm/init.c | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b32ebf92b0ce..67e00740531c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -16,6 +16,7 @@ config X86_64 | |||
16 | def_bool y | 16 | def_bool y |
17 | depends on 64BIT | 17 | depends on 64BIT |
18 | select X86_DEV_DMA_OPS | 18 | select X86_DEV_DMA_OPS |
19 | select ARCH_USE_CMPXCHG_LOCKREF | ||
19 | 20 | ||
20 | ### Arch settings | 21 | ### Arch settings |
21 | config X86 | 22 | config X86 |
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index e3ddd7db723f..e0e668422c75 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h | |||
@@ -34,6 +34,11 @@ | |||
34 | # define UNLOCK_LOCK_PREFIX | 34 | # define UNLOCK_LOCK_PREFIX |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock) | ||
38 | { | ||
39 | return lock.tickets.head == lock.tickets.tail; | ||
40 | } | ||
41 | |||
37 | /* | 42 | /* |
38 | * Ticket locks are conceptually two parts, one indicating the current head of | 43 | * Ticket locks are conceptually two parts, one indicating the current head of |
39 | * the queue, and the other indicating the current tail. The lock is acquired | 44 | * the queue, and the other indicating the current tail. The lock is acquired |
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 2ec29ac78ae6..04664cdb7fda 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -78,8 +78,8 @@ __ref void *alloc_low_pages(unsigned int num) | |||
78 | return __va(pfn << PAGE_SHIFT); | 78 | return __va(pfn << PAGE_SHIFT); |
79 | } | 79 | } |
80 | 80 | ||
81 | /* need 4 4k for initial PMD_SIZE, 4k for 0-ISA_END_ADDRESS */ | 81 | /* need 3 4k for initial PMD_SIZE, 3 4k for 0-ISA_END_ADDRESS */ |
82 | #define INIT_PGT_BUF_SIZE (5 * PAGE_SIZE) | 82 | #define INIT_PGT_BUF_SIZE (6 * PAGE_SIZE) |
83 | RESERVE_BRK(early_pgt_alloc, INIT_PGT_BUF_SIZE); | 83 | RESERVE_BRK(early_pgt_alloc, INIT_PGT_BUF_SIZE); |
84 | void __init early_alloc_pgt_buf(void) | 84 | void __init early_alloc_pgt_buf(void) |
85 | { | 85 | { |