diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 10 | ||||
-rw-r--r-- | lib/Makefile | 4 | ||||
-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 | ||
1195 | config PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT | 1195 | config 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 | |||
95 | obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o | 95 | obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o |
96 | obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o | 96 | obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o |
97 | obj-$(CONFIG_MEMORY_NOTIFIER_ERROR_INJECT) += memory-notifier-error-inject.o | 97 | obj-$(CONFIG_MEMORY_NOTIFIER_ERROR_INJECT) += memory-notifier-error-inject.o |
98 | obj-$(CONFIG_PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT) += \ | 98 | obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \ |
99 | pSeries-reconfig-notifier-error-inject.o | 99 | of-reconfig-notifier-error-inject.o |
100 | 100 | ||
101 | lib-$(CONFIG_GENERIC_BUG) += bug.o | 101 | lib-$(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 | ||
8 | static int priority; | 7 | static int priority; |
9 | module_param(priority, int, 0); | 8 | module_param(priority, int, 0); |
10 | MODULE_PARM_DESC(priority, "specify pSeries reconfig notifier priority"); | 9 | MODULE_PARM_DESC(priority, "specify OF reconfig notifier priority"); |
11 | 10 | ||
12 | static struct notifier_err_inject reconfig_err_inject = { | 11 | static 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 | ||
40 | static void err_inject_exit(void) | 40 | static 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 | ||
46 | module_init(err_inject_init); | 46 | module_init(err_inject_init); |
47 | module_exit(err_inject_exit); | 47 | module_exit(err_inject_exit); |
48 | 48 | ||
49 | MODULE_DESCRIPTION("pSeries reconfig notifier error injection module"); | 49 | MODULE_DESCRIPTION("OF reconfig notifier error injection module"); |
50 | MODULE_LICENSE("GPL"); | 50 | MODULE_LICENSE("GPL"); |
51 | MODULE_AUTHOR("Akinobu Mita <akinobu.mita@gmail.com>"); | 51 | MODULE_AUTHOR("Akinobu Mita <akinobu.mita@gmail.com>"); |