All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Clean up huge vmap and ioremap code
@ 2018-09-12 10:26 Will Deacon
  2018-09-12 10:26 ` [PATCH 1/5] ioremap: Rework pXd_free_pYd_page() API Will Deacon
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Will Deacon @ 2018-09-12 10:26 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: cpandya, toshi.kani, tglx, mhocko, akpm, Will Deacon

Hi all,

The recent introduction of break-before-make on the huge vmap path in
b6bdb7517c3d ("mm/vmalloc: add interfaces to free unmapped page table")
introduced a pair of arch functions for freeing a child level of page
table before putting down a huge mapping at the parent level.

Whilst this works well, the semantics of the pXd_free_pYd_table() function
are slightly confusing, and this led to an over-eager VM_WARN_ON in the
arm64 code that we fixed in -rc3 [1]. Linus suggested that the interface
could be tidied up so that the pXd_present() checks are moved into the
caller, so I've implemented that and generally cleaned up the ioremap code
so that it's easier to follow. I also extended the break-before-make code
to cover the huge p4d case, although this remains unused by any architectures.

Feedback welcome.

Cheers,

Will

[1] https://lkml.org/lkml/2018/9/7/898

--->8

Will Deacon (5):
  ioremap: Rework pXd_free_pYd_page() API
  arm64: mmu: Drop pXd_present() checks from pXd_free_pYd_table()
  x86: pgtable: Drop pXd_none() checks from pXd_free_pYd_table()
  lib/ioremap: Ensure phys_addr actually corresponds to a physical
    address
  lib/ioremap: Ensure break-before-make is used for huge p4d mappings

 arch/arm64/mm/mmu.c           |  13 +++---
 arch/x86/mm/pgtable.c         |  14 +++---
 include/asm-generic/pgtable.h |   5 ++
 lib/ioremap.c                 | 103 +++++++++++++++++++++++++++++-------------
 4 files changed, 91 insertions(+), 44 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-09-17 18:55 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12 10:26 [PATCH 0/5] Clean up huge vmap and ioremap code Will Deacon
2018-09-12 10:26 ` [PATCH 1/5] ioremap: Rework pXd_free_pYd_page() API Will Deacon
2018-09-14 20:36   ` Kani, Toshi
2018-09-14 21:10     ` Kani, Toshi
2018-09-17 11:33       ` Will Deacon
2018-09-17 18:38         ` Kani, Toshi
2018-09-12 10:26 ` [PATCH 2/5] arm64: mmu: Drop pXd_present() checks from pXd_free_pYd_table() Will Deacon
2018-09-12 10:26 ` [PATCH 3/5] x86: pgtable: Drop pXd_none() " Will Deacon
2018-09-14 20:37   ` Kani, Toshi
2018-09-17 11:33     ` Will Deacon
2018-09-17 18:43       ` Kani, Toshi
2018-09-12 10:26 ` [PATCH 4/5] lib/ioremap: Ensure phys_addr actually corresponds to a physical address Will Deacon
2018-09-12 15:09   ` Sean Christopherson
2018-09-12 16:39     ` Will Deacon
2018-09-12 17:14       ` Sean Christopherson
2018-09-12 10:26 ` [PATCH 5/5] lib/ioremap: Ensure break-before-make is used for huge p4d mappings Will Deacon
2018-09-17 18:55   ` Kani, Toshi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.