]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86/ras: Move AMD MCE injector to arch/x86/ras/
authorBorislav Petkov <bp@suse.de>
Wed, 12 Aug 2015 16:29:45 +0000 (18:29 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 13 Aug 2015 08:12:54 +0000 (10:12 +0200)
This is an x86-specific module and would benefit from being
closer to the arch code. Move it there. Update copyright while
at it.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1439396985-12812-14-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/Makefile
arch/x86/ras/Kconfig [new file with mode: 0644]
arch/x86/ras/Makefile [new file with mode: 0644]
arch/x86/ras/mce_amd_inj.c [moved from drivers/edac/mce_amd_inj.c with 98% similarity]
drivers/edac/Kconfig
drivers/edac/Makefile
drivers/ras/Kconfig

index 118e6debc483ed6f6d6357209619216843ee670c..0f38418719ab8876c7c3ec7972122185c5e67006 100644 (file)
@@ -212,6 +212,8 @@ drivers-$(CONFIG_PM) += arch/x86/power/
 
 drivers-$(CONFIG_FB) += arch/x86/video/
 
+drivers-$(CONFIG_RAS) += arch/x86/ras/
+
 ####
 # boot loader support. Several targets are kept for legacy purposes
 
diff --git a/arch/x86/ras/Kconfig b/arch/x86/ras/Kconfig
new file mode 100644 (file)
index 0000000..10fea5f
--- /dev/null
@@ -0,0 +1,11 @@
+config AMD_MCE_INJ
+       tristate "Simple MCE injection interface for AMD processors"
+       depends on RAS && EDAC_DECODE_MCE && DEBUG_FS
+       default n
+       help
+         This is a simple debugfs interface to inject MCEs and test different
+         aspects of the MCE handling code.
+
+         WARNING: Do not even assume this interface is staying stable!
+
+
diff --git a/arch/x86/ras/Makefile b/arch/x86/ras/Makefile
new file mode 100644 (file)
index 0000000..dd2c98b
--- /dev/null
@@ -0,0 +1,2 @@
+obj-$(CONFIG_AMD_MCE_INJ)              += mce_amd_inj.o
+
similarity index 98%
rename from drivers/edac/mce_amd_inj.c
rename to arch/x86/ras/mce_amd_inj.c
index 4c73e4d03d465c14d206b5e66955cc22ddce2986..17e35b5bf7792a95a89472c3dd48c39bd81f0192 100644 (file)
@@ -6,7 +6,7 @@
  * This file may be distributed under the terms of the GNU General Public
  * License version 2.
  *
- * Copyright (c) 2010-14:  Borislav Petkov <bp@alien8.de>
+ * Copyright (c) 2010-15:  Borislav Petkov <bp@alien8.de>
  *                     Advanced Micro Devices Inc.
  */
 
@@ -19,7 +19,7 @@
 #include <linux/uaccess.h>
 #include <asm/mce.h>
 
-#include "mce_amd.h"
+#include "../kernel/cpu/mcheck/mce-internal.h"
 
 /*
  * Collect all the MCi_XXX settings
@@ -195,7 +195,7 @@ static void do_inject(void)
                i_mce.status |= MCI_STATUS_MISCV;
 
        if (inj_type == SW_INJ) {
-               amd_decode_mce(NULL, 0, &i_mce);
+               mce_inject_log(&i_mce);
                return;
        }
 
index 8677ead2a8e1dfb9843595721475e658c197b289..ef25000a5bc69845aa5234a451f80d27f259eb01 100644 (file)
@@ -61,16 +61,6 @@ config EDAC_DECODE_MCE
          which occur really early upon boot, before the module infrastructure
          has been initialized.
 
-config EDAC_MCE_INJ
-       tristate "Simple MCE injection interface"
-       depends on EDAC_DECODE_MCE && DEBUG_FS
-       default n
-       help
-         This is a simple debugfs interface to inject MCEs and test different
-         aspects of the MCE handling code.
-
-         WARNING: Do not even assume this interface is staying stable!
-
 config EDAC_MM_EDAC
        tristate "Main Memory EDAC (Error Detection And Correction) reporting"
        select RAS
index 28ef2a519f657a0272da8eaaaa681b18c79aaad6..ae3c5f3ce405829fabc9e18e790778b8a5dcf3ea 100644 (file)
@@ -17,7 +17,6 @@ edac_core-y   += edac_pci.o edac_pci_sysfs.o
 endif
 
 obj-$(CONFIG_EDAC_GHES)                        += ghes_edac.o
-obj-$(CONFIG_EDAC_MCE_INJ)             += mce_amd_inj.o
 
 edac_mce_amd-y                         := mce_amd.o
 obj-$(CONFIG_EDAC_DECODE_MCE)          += edac_mce_amd.o
index e5f0a43998d2b45ce298550665e978c0113cdd48..4c3c67d13254aff48b41d4748e7d7d55bd6f220f 100644 (file)
@@ -29,4 +29,7 @@ menuconfig RAS
          data corruption.
 
 if RAS
+
+source arch/x86/ras/Kconfig
+
 endif