ARM: bugs: prepare processor bug infrastructure
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 10 May 2018 11:55:58 +0000 (12:55 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 31 May 2018 09:39:18 +0000 (10:39 +0100)
Prepare the processor bug infrastructure so that it can be expanded to
check for per-processor bugs.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/bugs.h
arch/arm/kernel/Makefile
arch/arm/kernel/bugs.c [new file with mode: 0644]

index a97f1ea708d19f339649a2ece287a69a5fe32a40..ed122d294f3f9aff11e09dc951b7f5e8ff9a1d2e 100644 (file)
 #ifndef __ASM_BUGS_H
 #define __ASM_BUGS_H
 
-#ifdef CONFIG_MMU
 extern void check_writebuffer_bugs(void);
 
-#define check_bugs() check_writebuffer_bugs()
+#ifdef CONFIG_MMU
+extern void check_bugs(void);
 #else
 #define check_bugs() do { } while (0)
 #endif
index b59ac4bf82b8a9d2c99a5c7ef062db9f62722adc..8cad59465af39ac44eafecc881e0ed9a6afc9893 100644 (file)
@@ -31,6 +31,7 @@ else
 obj-y          += entry-armv.o
 endif
 
+obj-$(CONFIG_MMU)              += bugs.o
 obj-$(CONFIG_CPU_IDLE)         += cpuidle.o
 obj-$(CONFIG_ISA_DMA_API)      += dma.o
 obj-$(CONFIG_FIQ)              += fiq.o fiqasm.o
diff --git a/arch/arm/kernel/bugs.c b/arch/arm/kernel/bugs.c
new file mode 100644 (file)
index 0000000..8802402
--- /dev/null
@@ -0,0 +1,9 @@
+// SPDX-Identifier: GPL-2.0
+#include <linux/init.h>
+#include <asm/bugs.h>
+#include <asm/proc-fns.h>
+
+void __init check_bugs(void)
+{
+       check_writebuffer_bugs();
+}