diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-12-13 18:32:52 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-12-13 18:32:52 -0500 |
commit | d526e85f60fce9aa2a1432cbd06e3cf20c1644c8 (patch) | |
tree | 8432d5f7f36254fcfea5a1c2d38a93a4fac42a8b | |
parent | 1a9bd45412665e73c72612b6f744378d860e02a8 (diff) |
powerpc+of: Rename and fix OF reconfig notifier error inject module
This module used to inject errors in the pSeries specific dynamic
reconfiguration notifiers. Those are gone however, replaced by
generic notifiers for changes to the device-tree. So let's update
the module to deal with these instead and rename it along the way.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Akinobu Mita <akinobu.mita@gmail.com>
-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 28e9d6c9894..c2d89f37004 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 artifical errors to | 1199 | This option provides the ability to inject artifical 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 821a1622911..7c009089537 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -94,8 +94,8 @@ obj-$(CONFIG_NOTIFIER_ERROR_INJECTION) += notifier-error-inject.o | |||
94 | obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o | 94 | obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o |
95 | obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o | 95 | obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o |
96 | obj-$(CONFIG_MEMORY_NOTIFIER_ERROR_INJECT) += memory-notifier-error-inject.o | 96 | obj-$(CONFIG_MEMORY_NOTIFIER_ERROR_INJECT) += memory-notifier-error-inject.o |
97 | obj-$(CONFIG_PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT) += \ | 97 | obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \ |
98 | pSeries-reconfig-notifier-error-inject.o | 98 | of-reconfig-notifier-error-inject.o |
99 | 99 | ||
100 | lib-$(CONFIG_GENERIC_BUG) += bug.o | 100 | lib-$(CONFIG_GENERIC_BUG) += bug.o |
101 | 101 | ||
diff --git a/lib/pSeries-reconfig-notifier-error-inject.c b/lib/of-reconfig-notifier-error-inject.c index 7f7c98dcd5c..8dc79861758 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>"); |