forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/acpi/acpica/utxferror.c
....@@ -187,6 +187,50 @@
187187
188188 /*******************************************************************************
189189 *
190
+ * FUNCTION: acpi_bios_exception
191
+ *
192
+ * PARAMETERS: module_name - Caller's module name (for error output)
193
+ * line_number - Caller's line number (for error output)
194
+ * status - Status value to be decoded/formatted
195
+ * format - Printf format string + additional args
196
+ *
197
+ * RETURN: None
198
+ *
199
+ * DESCRIPTION: Print an "ACPI Firmware Error" message with module/line/version
200
+ * info as well as decoded acpi_status.
201
+ *
202
+ ******************************************************************************/
203
+void ACPI_INTERNAL_VAR_XFACE
204
+acpi_bios_exception(const char *module_name,
205
+ u32 line_number,
206
+ acpi_status status, const char *format, ...)
207
+{
208
+ va_list arg_list;
209
+
210
+ ACPI_MSG_REDIRECT_BEGIN;
211
+
212
+ /* For AE_OK, just print the message */
213
+
214
+ if (ACPI_SUCCESS(status)) {
215
+ acpi_os_printf(ACPI_MSG_BIOS_ERROR);
216
+
217
+ } else {
218
+ acpi_os_printf(ACPI_MSG_BIOS_ERROR "%s, ",
219
+ acpi_format_exception(status));
220
+ }
221
+
222
+ va_start(arg_list, format);
223
+ acpi_os_vprintf(format, arg_list);
224
+ ACPI_MSG_SUFFIX;
225
+ va_end(arg_list);
226
+
227
+ ACPI_MSG_REDIRECT_END;
228
+}
229
+
230
+ACPI_EXPORT_SYMBOL(acpi_bios_exception)
231
+
232
+/*******************************************************************************
233
+ *
190234 * FUNCTION: acpi_bios_warning
191235 *
192236 * PARAMETERS: module_name - Caller's module name (for warning output)