Commit 8ad33041 authored by Michael Ellerman's avatar Michael Ellerman

powerpc/64s: Move cpu_show_meltdown()

This landed in setup_64.c for no good reason other than we had nowhere
else to put it. Now that we have a security-related file, that is a
better place for it so move it.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 77addf6e
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
// Copyright 2018, Michael Ellerman, IBM Corporation. // Copyright 2018, Michael Ellerman, IBM Corporation.
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/device.h>
#include <asm/security_features.h> #include <asm/security_features.h>
...@@ -13,3 +15,12 @@ unsigned long powerpc_security_features __read_mostly = \ ...@@ -13,3 +15,12 @@ unsigned long powerpc_security_features __read_mostly = \
SEC_FTR_L1D_FLUSH_PR | \ SEC_FTR_L1D_FLUSH_PR | \
SEC_FTR_BNDS_CHK_SPEC_BAR | \ SEC_FTR_BNDS_CHK_SPEC_BAR | \
SEC_FTR_FAVOUR_SECURITY; SEC_FTR_FAVOUR_SECURITY;
ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf)
{
if (rfi_flush)
return sprintf(buf, "Mitigation: RFI Flush\n");
return sprintf(buf, "Vulnerable\n");
}
...@@ -934,12 +934,4 @@ static __init int rfi_flush_debugfs_init(void) ...@@ -934,12 +934,4 @@ static __init int rfi_flush_debugfs_init(void)
} }
device_initcall(rfi_flush_debugfs_init); device_initcall(rfi_flush_debugfs_init);
#endif #endif
ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf)
{
if (rfi_flush)
return sprintf(buf, "Mitigation: RFI Flush\n");
return sprintf(buf, "Vulnerable\n");
}
#endif /* CONFIG_PPC_BOOK3S_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment