aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/utmisc.c')
-rw-r--r--drivers/acpi/acpica/utmisc.c58
1 files changed, 49 insertions, 9 deletions
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c
index 61f6315fce9f..32982e2ac384 100644
--- a/drivers/acpi/acpica/utmisc.c
+++ b/drivers/acpi/acpica/utmisc.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2008, Intel Corp. 8 * Copyright (C) 2000 - 2010, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -724,13 +724,12 @@ acpi_name acpi_ut_repair_name(char *name)
724 * 724 *
725 ******************************************************************************/ 725 ******************************************************************************/
726 726
727acpi_status 727acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 * ret_integer)
728acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
729{ 728{
730 u32 this_digit = 0; 729 u32 this_digit = 0;
731 acpi_integer return_value = 0; 730 u64 return_value = 0;
732 acpi_integer quotient; 731 u64 quotient;
733 acpi_integer dividend; 732 u64 dividend;
734 u32 to_integer_op = (base == ACPI_ANY_BASE); 733 u32 to_integer_op = (base == ACPI_ANY_BASE);
735 u32 mode32 = (acpi_gbl_integer_byte_width == 4); 734 u32 mode32 = (acpi_gbl_integer_byte_width == 4);
736 u8 valid_digits = 0; 735 u8 valid_digits = 0;
@@ -844,9 +843,8 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
844 843
845 /* Divide the digit into the correct position */ 844 /* Divide the digit into the correct position */
846 845
847 (void) 846 (void)acpi_ut_short_divide((dividend - (u64) this_digit),
848 acpi_ut_short_divide((dividend - (acpi_integer) this_digit), 847 base, &quotient, NULL);
849 base, &quotient, NULL);
850 848
851 if (return_value > quotient) { 849 if (return_value > quotient) {
852 if (to_integer_op) { 850 if (to_integer_op) {
@@ -1161,3 +1159,45 @@ acpi_ut_predefined_warning(const char *module_name,
1161 ACPI_COMMON_MSG_SUFFIX; 1159 ACPI_COMMON_MSG_SUFFIX;
1162 va_end(args); 1160 va_end(args);
1163} 1161}
1162
1163/*******************************************************************************
1164 *
1165 * FUNCTION: acpi_ut_predefined_info
1166 *
1167 * PARAMETERS: module_name - Caller's module name (for error output)
1168 * line_number - Caller's line number (for error output)
1169 * Pathname - Full pathname to the node
1170 * node_flags - From Namespace node for the method/object
1171 * Format - Printf format string + additional args
1172 *
1173 * RETURN: None
1174 *
1175 * DESCRIPTION: Info messages for the predefined validation module. Messages
1176 * are only emitted the first time a problem with a particular
1177 * method/object is detected. This prevents a flood of
1178 * messages for methods that are repeatedly evaluated.
1179 *
1180 ******************************************************************************/
1181
1182void ACPI_INTERNAL_VAR_XFACE
1183acpi_ut_predefined_info(const char *module_name,
1184 u32 line_number,
1185 char *pathname, u8 node_flags, const char *format, ...)
1186{
1187 va_list args;
1188
1189 /*
1190 * Warning messages for this method/object will be disabled after the
1191 * first time a validation fails or an object is successfully repaired.
1192 */
1193 if (node_flags & ANOBJ_EVALUATED) {
1194 return;
1195 }
1196
1197 acpi_os_printf("ACPI Info for %s: ", pathname);
1198
1199 va_start(args, format);
1200 acpi_os_vprintf(format, args);
1201 ACPI_COMMON_MSG_SUFFIX;
1202 va_end(args);
1203}