diff options
author | Peter Zijlstra <peterz@infradead.org> | 2018-12-03 18:03:48 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-12-17 18:54:25 +0100 |
commit | 5fe26b7a8f4693d532c7a3c3632e47e7d7016238 (patch) | |
tree | 42b84cd93f6a5297c38aeaddbde6c5b48a4c3ffe /arch/x86/mm/pageattr-test.c | |
parent | 98bfc9b038cde1ce108f69a50720e394fe774cb7 (diff) | |
download | talos-op-linux-5fe26b7a8f4693d532c7a3c3632e47e7d7016238.tar.gz talos-op-linux-5fe26b7a8f4693d532c7a3c3632e47e7d7016238.zip |
x86/mm/cpa: Simplify the code after making cpa->vaddr invariant
Since cpa->vaddr is invariant, this means we can remove all
workarounds that deal with it changing.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
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: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom.StDenis@amd.com
Cc: dave.hansen@intel.com
Link: http://lkml.kernel.org/r/20181203171043.366619025@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm/pageattr-test.c')
-rw-r--r-- | arch/x86/mm/pageattr-test.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c index b6b6468530f1..facce271e8b9 100644 --- a/arch/x86/mm/pageattr-test.c +++ b/arch/x86/mm/pageattr-test.c @@ -124,7 +124,6 @@ static int pageattr_test(void) unsigned int level; int i, k; int err; - unsigned long test_addr; if (print) printk(KERN_INFO "CPA self-test:\n"); @@ -181,8 +180,7 @@ static int pageattr_test(void) switch (i % 3) { case 0: - test_addr = addr[i]; - err = change_page_attr_set(&test_addr, len[i], PAGE_CPA_TEST, 0); + err = change_page_attr_set(&addr[i], len[i], PAGE_CPA_TEST, 0); break; case 1: @@ -226,8 +224,7 @@ static int pageattr_test(void) failed++; continue; } - test_addr = addr[i]; - err = change_page_attr_clear(&test_addr, len[i], PAGE_CPA_TEST, 0); + err = change_page_attr_clear(&addr[i], len[i], PAGE_CPA_TEST, 0); if (err < 0) { printk(KERN_ERR "CPA reverting failed: %d\n", err); failed++; |