mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
These macros will be used in a later patch, where all usages are expected to be optimized away without #ifdef CONFIG_TRANSPARENT_HUGEPAGE. But to detect unexpected usages, we convert the existing BUG() to BUILD_BUG(). [[email protected]: fix build in mm/pgtable-generic.c] Signed-off-by: Naoya Horiguchi <[email protected]> Acked-by: Hillf Danton <[email protected]> Reviewed-by: Andrea Arcangeli <[email protected]> Reviewed-by: KAMEZAWA Hiroyuki <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: Daisuke Nishimura <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8d32ff8440
commit
d8c37c4806
2 changed files with 9 additions and 7 deletions
|
|
@ -70,10 +70,11 @@ int pmdp_clear_flush_young(struct vm_area_struct *vma,
|
|||
unsigned long address, pmd_t *pmdp)
|
||||
{
|
||||
int young;
|
||||
#ifndef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
VM_BUG_ON(address & ~HPAGE_PMD_MASK);
|
||||
#else
|
||||
BUG();
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
VM_BUG_ON(address & ~HPAGE_PMD_MASK);
|
||||
young = pmdp_test_and_clear_young(vma, address, pmdp);
|
||||
if (young)
|
||||
flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue