Skip to content
Commit 9157259d authored by Zi Yan's avatar Zi Yan Committed by David S. Miller
Browse files

mm: add pmd_t initializer __pmd() to work around a GCC bug.



THP migration is added but only supports x86_64 at the moment. For all
other architectures, swp_entry_to_pmd() only returns a zero pmd_t.

Due to a GCC zero initializer bug #53119, the standard (pmd_t){0}
initializer is not accepted by all GCC versions. __pmd() is a feasible
workaround. In addition, sparc32's pmd_t is an array instead of a single
value, so we need (pmd_t){ {0}, } instead of (pmd_t){0}. Thus,
a different __pmd() definition is needed in sparc32.

Signed-off-by: default avatarZi Yan <zi.yan@cs.rutgers.edu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 26273939
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment