diff options
author | Kyle McMartin <kyle@redhat.com> | 2009-03-01 20:41:41 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-02 06:04:01 -0500 |
commit | 3e8ebb5c433f016dff5824587436642d87fc2e6c (patch) | |
tree | cc6c7cef8faadc1e61f66cf1241863afca722ebb | |
parent | 778ef1e6cbb049c9bcbf405936ee6f2b6e451892 (diff) |
debug_objects: add boot-parameter toggle to turn object debugging off again
While trying to debug why my Atom netbook is falling over booting
rawhide debug-enabled kernels, I stumbled across the fact that we've
been enabling object debugging by default. However, once you default it
to on, you've got no way to turn it back off again at runtime.
Add a boolean toggle to turn it off. I would just make it an int
module_param, however people may already expect the boolean enable
behaviour, so just add an analogue for disabling.
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | Documentation/kernel-parameters.txt | 3 | ||||
-rw-r--r-- | lib/debugobjects.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 54f21a5c262b..1a328f33e1df 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -604,6 +604,9 @@ and is between 256 and 4096 characters. It is defined in the file | |||
604 | 604 | ||
605 | debug_objects [KNL] Enable object debugging | 605 | debug_objects [KNL] Enable object debugging |
606 | 606 | ||
607 | no_debug_objects | ||
608 | [KNL] Disable object debugging | ||
609 | |||
607 | debugpat [X86] Enable PAT debugging | 610 | debugpat [X86] Enable PAT debugging |
608 | 611 | ||
609 | decnet.addr= [HW,NET] | 612 | decnet.addr= [HW,NET] |
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 5d99be1fd988..90e46fa12721 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -55,7 +55,15 @@ static int __init enable_object_debug(char *str) | |||
55 | debug_objects_enabled = 1; | 55 | debug_objects_enabled = 1; |
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | |||
59 | static int __init disable_object_debug(char *str) | ||
60 | { | ||
61 | debug_objects_enabled = 0; | ||
62 | return 0; | ||
63 | } | ||
64 | |||
58 | early_param("debug_objects", enable_object_debug); | 65 | early_param("debug_objects", enable_object_debug); |
66 | early_param("no_debug_objects", disable_object_debug); | ||
59 | 67 | ||
60 | static const char *obj_states[ODEBUG_STATE_MAX] = { | 68 | static const char *obj_states[ODEBUG_STATE_MAX] = { |
61 | [ODEBUG_STATE_NONE] = "none", | 69 | [ODEBUG_STATE_NONE] = "none", |