arm64: hugetlb: set_huge_pte_at Add WARN_ON on !pte_present
authorSteve Capper <steve.capper@arm.com>
Tue, 22 Aug 2017 10:42:41 +0000 (11:42 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 22 Aug 2017 14:41:16 +0000 (15:41 +0100)
commitd3ea79527757ba65b3ee08e10c59a3c84f34e4bf
tree531347e4a1d9c7cd9acf94dcc08e4e57a9f48ea9
parenta88ce63b642cf8cd82cbc278429ccd9de4455a07
arm64: hugetlb: set_huge_pte_at Add WARN_ON on !pte_present

This patch adds a WARN_ON to set_huge_pte_at as the accessor assumes
that entries to be written down are all present. (There are separate
accessors to clear huge ptes).

We will need to handle the !pte_present case where memory offlining
is used on hugetlb pages. swap and migration entries will be supplied
to set_huge_pte_at in this case.

Cc: David Woods <dwoods@mellanox.com>
Signed-off-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/hugetlbpage.c