Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • asm-generic
  • pgtable.h
Find file BlameHistoryPermalink
  • Dan Williams's avatar
    generic/pgtable: Introduce set_pte_safe() · 4369deaa
    Dan Williams authored Dec 04, 2018
    Commit:
    
      f77084d9
    
     "x86/mm/pat: Disable preemption around __flush_tlb_all()"
    
    introduced a warning to capture cases __flush_tlb_all() is called without
    pre-emption disabled. It triggers a false positive warning in the memory
    hotplug path.
    
    On investigation it was found that the __flush_tlb_all() calls are not
    necessary. However, they are only "not necessary" in practice provided
    the ptes are being initially populated from the !present state.
    
    Introduce set_pte_safe() as a sanity check that the pte is being updated
    in a way that does not require a TLB flush.
    
    Forgive the macro, the availability of the various of set_pte() levels
    is hit and miss across architectures.
    
    [ mingo: Minor readability edits. ]
    
    Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
    Suggested-by: default avatarDave Hansen <dave.hansen@intel.com>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Rik van Riel <riel@surriel.com>
    Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lkml.kernel.org/r/279dadae-9148-465c-7ec6-3f37e026c6c9@intel.com
    
    
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    4369deaa
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7