Skip to content
Commit 1996d47a authored by Will Deacon's avatar Will Deacon Committed by David S. Miller
Browse files

sparc32: mm: Only call ctor()/dtor() functions for first and last user



The SRMMU page-table allocator allocates multiple PTE tables per page,
since they are only 1K in size. However, this means that calls to
pgtable_pte_page_{ctor,dtor}() must be serialised and performed only by
the first and last page-table allocation for the page respectively.

Use the page reference count to track how many PTE tables we have
allocated for a given page returned by the SRMMU allocator and only
call the ctor()/dtor() functions for the first and last user respectively.

Cc: David S. Miller <davem@davemloft.net>
Fixes: 8c8f3156 ("sparc32: mm: Reduce allocation size for PMD and PTE tables")
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 60bccaa6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment