treewide: Replace the use of mem_encrypt_active() with cc_platform_has()
[sfrench/cifs-2.6.git] / arch / powerpc / platforms / pseries / svm.c
index 87f001b4c4e4fa338adb323c141b9c4c0e04c02b..c083ecbbae4d6870da9cd084b56f17480419f42d 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <linux/mm.h>
 #include <linux/memblock.h>
+#include <linux/cc_platform.h>
 #include <asm/machdep.h>
 #include <asm/svm.h>
 #include <asm/swiotlb.h>
@@ -63,7 +64,7 @@ void __init svm_swiotlb_init(void)
 
 int set_memory_encrypted(unsigned long addr, int numpages)
 {
-       if (!mem_encrypt_active())
+       if (!cc_platform_has(CC_ATTR_MEM_ENCRYPT))
                return 0;
 
        if (!PAGE_ALIGNED(addr))
@@ -76,7 +77,7 @@ int set_memory_encrypted(unsigned long addr, int numpages)
 
 int set_memory_decrypted(unsigned long addr, int numpages)
 {
-       if (!mem_encrypt_active())
+       if (!cc_platform_has(CC_ATTR_MEM_ENCRYPT))
                return 0;
 
        if (!PAGE_ALIGNED(addr))