aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-08-04 04:45:06 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-08-12 21:09:35 -0400
commitf173a7750eb188fd7d888d5950d58454bcfbd09b (patch)
tree673af041d61caf1a783647422c3b81069f50cfcf /tools
parente323c02dee59af7da65637852f6fa95551325d80 (diff)
ACPICA: Clib: Add -nostdinc support for EFI layer
ACPICA commit d261d40ea168f8e4c4e3986de720b8651c4aba1c This patch adds sprintf()/snprintf()/vsnprintf()/printf()/vfprintf() support for OSPMs that have ACPI_USE_SYSTEM_CLIBRARY defined but do not have ACPI_USE_STANDARD_HEADERS defined. -iwithprefix include is required to include <stdarg.h> which contains compiler specific implementation of vargs when -nostdinc is specified. -fno-builtin is required for GCC to avoid optimization performed printf(). This optimization cannot be automatically disabled by specifying -nostdlib. Please refer to the first link below for the details. However, the build option changes do not affect Linux kernel builds and are not included. Lv Zheng. Link: http://www.ciselant.de/projects/gcc_printf/gcc_printf.html Link: https://github.com/acpica/acpica/commit/d261d40e Link: https://bugs.acpica.org/show_bug.cgi?id=1302 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/power/acpi/tools/acpidump/apdump.c6
-rw-r--r--tools/power/acpi/tools/acpidump/apfiles.c3
2 files changed, 4 insertions, 5 deletions
diff --git a/tools/power/acpi/tools/acpidump/apdump.c b/tools/power/acpi/tools/acpidump/apdump.c
index fb8f1d9e3b1b..2a1507c89dbf 100644
--- a/tools/power/acpi/tools/acpidump/apdump.c
+++ b/tools/power/acpi/tools/acpidump/apdump.c
@@ -195,13 +195,13 @@ ap_dump_table_buffer(struct acpi_table_header *table,
195 * Note: simplest to just always emit a 64-bit address. acpi_xtract 195 * Note: simplest to just always emit a 64-bit address. acpi_xtract
196 * utility can handle this. 196 * utility can handle this.
197 */ 197 */
198 acpi_ut_file_printf(gbl_output_file, "%4.4s @ 0x%8.8X%8.8X\n", 198 fprintf(gbl_output_file, "%4.4s @ 0x%8.8X%8.8X\n",
199 table->signature, ACPI_FORMAT_UINT64(address)); 199 table->signature, ACPI_FORMAT_UINT64(address));
200 200
201 acpi_ut_dump_buffer_to_file(gbl_output_file, 201 acpi_ut_dump_buffer_to_file(gbl_output_file,
202 ACPI_CAST_PTR(u8, table), table_length, 202 ACPI_CAST_PTR(u8, table), table_length,
203 DB_BYTE_DISPLAY, 0); 203 DB_BYTE_DISPLAY, 0);
204 acpi_ut_file_printf(gbl_output_file, "\n"); 204 fprintf(gbl_output_file, "\n");
205 return (0); 205 return (0);
206} 206}
207 207
diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
index 44a0010d16c9..71edeb499096 100644
--- a/tools/power/acpi/tools/acpidump/apfiles.c
+++ b/tools/power/acpi/tools/acpidump/apfiles.c
@@ -157,8 +157,7 @@ int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance)
157 /* Handle multiple SSDts - create different filenames for each */ 157 /* Handle multiple SSDts - create different filenames for each */
158 158
159 if (instance > 0) { 159 if (instance > 0) {
160 acpi_ut_snprintf(instance_str, sizeof(instance_str), "%u", 160 snprintf(instance_str, sizeof(instance_str), "%u", instance);
161 instance);
162 strcat(filename, instance_str); 161 strcat(filename, instance_str);
163 } 162 }
164 163