aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug10
-rw-r--r--lib/Makefile4
-rw-r--r--lib/of-reconfig-notifier-error-inject.c (renamed from lib/pSeries-reconfig-notifier-error-inject.c)22
3 files changed, 18 insertions, 18 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e458782f3c52..3a353091a903 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1192,14 +1192,14 @@ config MEMORY_NOTIFIER_ERROR_INJECT
1192 1192
1193 If unsure, say N. 1193 If unsure, say N.
1194 1194
1195config PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT 1195config OF_RECONFIG_NOTIFIER_ERROR_INJECT
1196 tristate "pSeries reconfig notifier error injection module" 1196 tristate "OF reconfig notifier error injection module"
1197 depends on PPC_PSERIES && NOTIFIER_ERROR_INJECTION 1197 depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
1198 help 1198 help
1199 This option provides the ability to inject artificial errors to 1199 This option provides the ability to inject artificial errors to
1200 pSeries reconfig notifier chain callbacks. It is controlled 1200 OF reconfig notifier chain callbacks. It is controlled
1201 through debugfs interface under 1201 through debugfs interface under
1202 /sys/kernel/debug/notifier-error-inject/pSeries-reconfig/ 1202 /sys/kernel/debug/notifier-error-inject/OF-reconfig/
1203 1203
1204 If the notifier call chain should be failed with some events 1204 If the notifier call chain should be failed with some events
1205 notified, write the error code to "actions/<notifier event>/error". 1205 notified, write the error code to "actions/<notifier event>/error".
diff --git a/lib/Makefile b/lib/Makefile
index 5558e35170cd..02ed6c04cd7d 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -95,8 +95,8 @@ obj-$(CONFIG_NOTIFIER_ERROR_INJECTION) += notifier-error-inject.o
95obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o 95obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o
96obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o 96obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o
97obj-$(CONFIG_MEMORY_NOTIFIER_ERROR_INJECT) += memory-notifier-error-inject.o 97obj-$(CONFIG_MEMORY_NOTIFIER_ERROR_INJECT) += memory-notifier-error-inject.o
98obj-$(CONFIG_PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT) += \ 98obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \
99 pSeries-reconfig-notifier-error-inject.o 99 of-reconfig-notifier-error-inject.o
100 100
101lib-$(CONFIG_GENERIC_BUG) += bug.o 101lib-$(CONFIG_GENERIC_BUG) += bug.o
102 102
diff --git a/lib/pSeries-reconfig-notifier-error-inject.c b/lib/of-reconfig-notifier-error-inject.c
index 7f7c98dcd5c4..8dc79861758a 100644
--- a/lib/pSeries-reconfig-notifier-error-inject.c
+++ b/lib/of-reconfig-notifier-error-inject.c
@@ -1,20 +1,20 @@
1#include <linux/kernel.h> 1#include <linux/kernel.h>
2#include <linux/module.h> 2#include <linux/module.h>
3 3#include <linux/of.h>
4#include <asm/pSeries_reconfig.h>
5 4
6#include "notifier-error-inject.h" 5#include "notifier-error-inject.h"
7 6
8static int priority; 7static int priority;
9module_param(priority, int, 0); 8module_param(priority, int, 0);
10MODULE_PARM_DESC(priority, "specify pSeries reconfig notifier priority"); 9MODULE_PARM_DESC(priority, "specify OF reconfig notifier priority");
11 10
12static struct notifier_err_inject reconfig_err_inject = { 11static struct notifier_err_inject reconfig_err_inject = {
13 .actions = { 12 .actions = {
14 { NOTIFIER_ERR_INJECT_ACTION(PSERIES_RECONFIG_ADD) }, 13 { NOTIFIER_ERR_INJECT_ACTION(OF_RECONFIG_ATTACH_NODE) },
15 { NOTIFIER_ERR_INJECT_ACTION(PSERIES_RECONFIG_REMOVE) }, 14 { NOTIFIER_ERR_INJECT_ACTION(OF_RECONFIG_DETACH_NODE) },
16 { NOTIFIER_ERR_INJECT_ACTION(PSERIES_DRCONF_MEM_ADD) }, 15 { NOTIFIER_ERR_INJECT_ACTION(OF_RECONFIG_ADD_PROPERTY) },
17 { NOTIFIER_ERR_INJECT_ACTION(PSERIES_DRCONF_MEM_REMOVE) }, 16 { NOTIFIER_ERR_INJECT_ACTION(OF_RECONFIG_REMOVE_PROPERTY) },
17 { NOTIFIER_ERR_INJECT_ACTION(OF_RECONFIG_UPDATE_PROPERTY) },
18 {} 18 {}
19 } 19 }
20}; 20};
@@ -25,12 +25,12 @@ static int err_inject_init(void)
25{ 25{
26 int err; 26 int err;
27 27
28 dir = notifier_err_inject_init("pSeries-reconfig", 28 dir = notifier_err_inject_init("OF-reconfig",
29 notifier_err_inject_dir, &reconfig_err_inject, priority); 29 notifier_err_inject_dir, &reconfig_err_inject, priority);
30 if (IS_ERR(dir)) 30 if (IS_ERR(dir))
31 return PTR_ERR(dir); 31 return PTR_ERR(dir);
32 32
33 err = pSeries_reconfig_notifier_register(&reconfig_err_inject.nb); 33 err = of_reconfig_notifier_register(&reconfig_err_inject.nb);
34 if (err) 34 if (err)
35 debugfs_remove_recursive(dir); 35 debugfs_remove_recursive(dir);
36 36
@@ -39,13 +39,13 @@ static int err_inject_init(void)
39 39
40static void err_inject_exit(void) 40static void err_inject_exit(void)
41{ 41{
42 pSeries_reconfig_notifier_unregister(&reconfig_err_inject.nb); 42 of_reconfig_notifier_unregister(&reconfig_err_inject.nb);
43 debugfs_remove_recursive(dir); 43 debugfs_remove_recursive(dir);
44} 44}
45 45
46module_init(err_inject_init); 46module_init(err_inject_init);
47module_exit(err_inject_exit); 47module_exit(err_inject_exit);
48 48
49MODULE_DESCRIPTION("pSeries reconfig notifier error injection module"); 49MODULE_DESCRIPTION("OF reconfig notifier error injection module");
50MODULE_LICENSE("GPL"); 50MODULE_LICENSE("GPL");
51MODULE_AUTHOR("Akinobu Mita <akinobu.mita@gmail.com>"); 51MODULE_AUTHOR("Akinobu Mita <akinobu.mita@gmail.com>");