]> git.baikalelectronics.ru Git - kernel.git/commit
mips: define pud_index() regardless of page table folding
authorMike Rapoport <rppt@linux.ibm.com>
Thu, 2 Apr 2020 08:16:14 +0000 (11:16 +0300)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 14 Apr 2020 10:54:43 +0000 (12:54 +0200)
commit445a11f766f656c844fa1931402bcd7fa0e6be59
treeeda39214dc6a797616b6d74285b5defffb724071
parent39710a5da83df032f7defc84716a5f989887e91d
mips: define pud_index() regardless of page table folding

Commit 6e30d7541abc ("mips: drop __pXd_offset() macros that duplicate
pXd_index() ones") is correct that pud_index() & __pud_offset() are the
same when pud_index() is actually provided, however it does not take into
account the __PAGETABLE_PUD_FOLDED case. This has broken MIPS KVM
compilation because it relied on availability of pud_index().

Define pud_index() regardless of page table folded. It will evaluate to
actual index for 4-level pagetables and to 0 for folded PUD level.

Link: https://lore.kernel.org/lkml/20200331154749.5457-1-pbonzini@redhat.com
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Tested-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/pgtable-64.h