Skip to content

Commit 60bccaa

Browse files
willdeacondavem330
authored andcommitted
sparc32: mm: Disable SPLIT_PTLOCK_CPUS
The SRMMU page-table allocator is not compatible with SPLIT_PTLOCK_CPUS for two major reasons: 1. Pages are allocated via memblock, and therefore the ptl is not cleared by prep_new_page(), which is expected by ptlock_init() 2. Multiple PTE tables can exist in a single page, causing them to share the same ptl and deadlock when attempting to take the same lock twice (e.g. as part of copy_page_range()). Ensure that SPLIT_PTLOCK_CPUS is not selected for SPARC32. Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 454b028 commit 60bccaa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎mm/Kconfig‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,17 @@ config MEMORY_HOTREMOVE
192192
# Default to 4 for wider testing, though 8 might be more appropriate.
193193
# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
194194
# PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
195+
# SPARC32 allocates multiple pte tables within a single page, and therefore
196+
# a per-page lock leads to problems when multiple tables need to be locked
197+
# at the same time (e.g. copy_page_range()).
195198
# DEBUG_SPINLOCK and DEBUG_LOCK_ALLOC spinlock_t also enlarge struct page.
196199
#
197200
config SPLIT_PTLOCK_CPUS
198201
int
199202
default "999999" if !MMU
200203
default "999999" if ARM && !CPU_CACHE_VIPT
201204
default "999999" if PARISC && !PA20
205+
default "999999" if SPARC32
202206
default "4"
203207

204208
config ARCH_ENABLE_SPLIT_PMD_PTLOCK

0 commit comments

Comments
 (0)