Skip to content
Commit 334b2cea authored by Linus Torvalds's avatar Linus Torvalds Committed by Ingo Molnar
Browse files

x86/mm: Add prot_sethuge() helper to abstract out _PAGE_PSE handling



We still have some historic cases of direct fiddling of page
attributes with (dangerous & fragile) type casting and address shifting.

Add the prot_sethuge() helper instead that gets the types right and
doesn't have to transform addresses.

( Also add a debug check to make sure this doesn't get applied
  to _PAGE_BIT_PAT/_PAGE_BIT_PAT_LARGE pages. )

Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarDave Hansen <dave.hansen@intel.com>
parent a3d3163f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment