ContiguousPTE[6/12] modify arch_get_smaller_page_size

Change-Id: I4fe8c36cf9561b3ee895f29b112f0ac6f2418f5e
This commit is contained in:
TOIDA,Suguru
2018-11-30 09:18:15 +09:00
committed by Masamichi Takagi
parent c4fbbb6027
commit 24d3da32ed

View File

@ -2591,14 +2591,28 @@ int arch_get_smaller_page_size(void *args, size_t cursize, size_t *newsizep,
/* dummy */
panic("not reached");
}
else if ((cursize > PTL3_SIZE) && CONFIG_ARM64_PGTABLE_LEVELS > 2) {
else if (CONFIG_ARM64_PGTABLE_LEVELS > 2 &&
cursize > PTL3_CONT_SIZE) {
newsize = PTL3_CONT_SIZE;
p2align = PTL3_CONT_SHIFT - PTL1_SHIFT;
}
else if (CONFIG_ARM64_PGTABLE_LEVELS > 2 &&
cursize > PTL3_SIZE) {
newsize = PTL3_SIZE;
p2align = PTL3_SHIFT - PTL1_SHIFT;
}
else if (cursize > PTL2_CONT_SIZE) {
newsize = PTL2_CONT_SIZE;
p2align = PTL2_CONT_SHIFT - PTL1_SHIFT;
}
else if (cursize > PTL2_SIZE) {
newsize = PTL2_SIZE;
p2align = PTL2_SHIFT - PTL1_SHIFT;
}
else if (cursize > PTL1_CONT_SIZE) {
newsize = PTL1_CONT_SIZE;
p2align = PTL1_CONT_SHIFT - PTL1_SHIFT;
}
else if (cursize > PTL1_SIZE) {
newsize = PTL1_SIZE;
p2align = PTL1_SHIFT - PTL1_SHIFT;