aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/debug.c')
-rw-r--r--drivers/acpi/debug.c104
1 files changed, 0 insertions, 104 deletions
diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c
index 22476eab2b08..f82240dbbba3 100644
--- a/drivers/acpi/debug.c
+++ b/drivers/acpi/debug.c
@@ -94,110 +94,6 @@ static const struct acpi_dlevel acpi_debug_levels[] = {
94}; 94};
95 95
96/* -------------------------------------------------------------------------- 96/* --------------------------------------------------------------------------
97 FS Interface (/sys)
98 -------------------------------------------------------------------------- */
99static int param_get_debug_layer(char *buffer, struct kernel_param *kp) {
100 int result = 0;
101 int i;
102
103 result = sprintf(buffer, "%-25s\tHex SET\n", "Description");
104
105 for(i = 0; i <ARRAY_SIZE(acpi_debug_layers); i++) {
106 result += sprintf(buffer+result, "%-25s\t0x%08lX [%c]\n",
107 acpi_debug_layers[i].name,
108 acpi_debug_layers[i].value,
109 (acpi_dbg_layer & acpi_debug_layers[i].value) ? '*' : ' ');
110 }
111 result += sprintf(buffer+result, "%-25s\t0x%08X [%c]\n", "ACPI_ALL_DRIVERS",
112 ACPI_ALL_DRIVERS,
113 (acpi_dbg_layer & ACPI_ALL_DRIVERS) ==
114 ACPI_ALL_DRIVERS ? '*' : (acpi_dbg_layer &
115 ACPI_ALL_DRIVERS) == 0 ? ' ' : '-');
116 result += sprintf(buffer+result, "--\ndebug_layer = 0x%08X ( * = enabled)\n", acpi_dbg_layer);
117
118 return result;
119}
120
121static int param_get_debug_level(char *buffer, struct kernel_param *kp) {
122 int result = 0;
123 int i;
124
125 result = sprintf(buffer, "%-25s\tHex SET\n", "Description");
126
127 for (i = 0; i < ARRAY_SIZE(acpi_debug_levels); i++) {
128 result += sprintf(buffer+result, "%-25s\t0x%08lX [%c]\n",
129 acpi_debug_levels[i].name,
130 acpi_debug_levels[i].value,
131 (acpi_dbg_level & acpi_debug_levels[i].
132 value) ? '*' : ' ');
133 }
134 result += sprintf(buffer+result, "--\ndebug_level = 0x%08X (* = enabled)\n",
135 acpi_dbg_level);
136
137 return result;
138}
139
140module_param_call(debug_layer, param_set_uint, param_get_debug_layer, &acpi_dbg_layer, 0644);
141module_param_call(debug_level, param_set_uint, param_get_debug_level, &acpi_dbg_level, 0644);
142
143static char trace_method_name[6];
144module_param_string(trace_method_name, trace_method_name, 6, 0644);
145static unsigned int trace_debug_layer;
146module_param(trace_debug_layer, uint, 0644);
147static unsigned int trace_debug_level;
148module_param(trace_debug_level, uint, 0644);
149
150static int param_set_trace_state(const char *val, struct kernel_param *kp)
151{
152 int result = 0;
153
154 if (!strncmp(val, "enable", strlen("enable") - 1)) {
155 result = acpi_debug_trace(trace_method_name, trace_debug_level,
156 trace_debug_layer, 0);
157 if (result)
158 result = -EBUSY;
159 goto exit;
160 }
161
162 if (!strncmp(val, "disable", strlen("disable") - 1)) {
163 int name = 0;
164 result = acpi_debug_trace((char *)&name, trace_debug_level,
165 trace_debug_layer, 0);
166 if (result)
167 result = -EBUSY;
168 goto exit;
169 }
170
171 if (!strncmp(val, "1", 1)) {
172 result = acpi_debug_trace(trace_method_name, trace_debug_level,
173 trace_debug_layer, 1);
174 if (result)
175 result = -EBUSY;
176 goto exit;
177 }
178
179 result = -EINVAL;
180exit:
181 return result;
182}
183
184static int param_get_trace_state(char *buffer, struct kernel_param *kp)
185{
186 if (!acpi_gbl_trace_method_name)
187 return sprintf(buffer, "disable");
188 else {
189 if (acpi_gbl_trace_flags & 1)
190 return sprintf(buffer, "1");
191 else
192 return sprintf(buffer, "enable");
193 }
194 return 0;
195}
196
197module_param_call(trace_state, param_set_trace_state, param_get_trace_state,
198 NULL, 0644);
199
200/* --------------------------------------------------------------------------
201 FS Interface (/proc) 97 FS Interface (/proc)
202 -------------------------------------------------------------------------- */ 98 -------------------------------------------------------------------------- */
203#ifdef CONFIG_ACPI_PROCFS 99#ifdef CONFIG_ACPI_PROCFS