Message ID | 20250217194421.601813-4-andrew.cooper3@citrix.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | xen/console: Fix truncation of panic() messages | expand |
On 17.02.2025 20:44, Andrew Cooper wrote: > Now that Xen has a real vprintk(), there's no need to opencode it locally with > vsnprintf(). Redirect the debug routines to the real {v,}printk() and drop > the local acpi_os_{v,}printf() implementations. > > Amongst other things, this removes one arbitrary limit on message size, as > well as removing a 512 byte static buffer that ought to have been in > __initdata given that is private to an __init function. > > No functional change. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff --git a/xen/drivers/acpi/osl.c b/xen/drivers/acpi/osl.c index ab80d6b2a92a..7f233bab4269 100644 --- a/xen/drivers/acpi/osl.c +++ b/xen/drivers/acpi/osl.c @@ -45,23 +45,6 @@ ACPI_MODULE_NAME("osl") #include CONFIG_ACPI_CUSTOM_DSDT_FILE #endif -void __init acpi_os_printf(const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - acpi_os_vprintf(fmt, args); - va_end(args); -} - -void __init acpi_os_vprintf(const char *fmt, va_list args) -{ - static char buffer[512]; - - vsnprintf(buffer, sizeof(buffer), fmt, args); - - printk("%s", buffer); -} - acpi_physical_address __initdata rsdp_hint; acpi_physical_address __init acpi_os_get_root_pointer(void) diff --git a/xen/include/acpi/acpiosxf.h b/xen/include/acpi/acpiosxf.h index de83ea38c40f..2da318962f0d 100644 --- a/xen/include/acpi/acpiosxf.h +++ b/xen/include/acpi/acpiosxf.h @@ -82,8 +82,7 @@ acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); /* * Debug print routines */ -void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...); - -void acpi_os_vprintf(const char *format, va_list args); +#define acpi_os_printf printk +#define acpi_os_vprintf vprintk #endif /* __ACPIOSXF_H__ */
Now that Xen has a real vprintk(), there's no need to opencode it locally with vsnprintf(). Redirect the debug routines to the real {v,}printk() and drop the local acpi_os_{v,}printf() implementations. Amongst other things, this removes one arbitrary limit on message size, as well as removing a 512 byte static buffer that ought to have been in __initdata given that is private to an __init function. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> --- CC: Jan Beulich <JBeulich@suse.com> CC: Roger Pau Monné <roger.pau@citrix.com> CC: Stefano Stabellini <sstabellini@kernel.org> CC: Julien Grall <julien@xen.org> CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com> CC: Bertrand Marquis <bertrand.marquis@arm.com> CC: Michal Orzel <michal.orzel@amd.com> CC: Ayan Kumar Halder <ayan.kumar.halder@amd.com> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com> --- xen/drivers/acpi/osl.c | 17 ----------------- xen/include/acpi/acpiosxf.h | 5 ++--- 2 files changed, 2 insertions(+), 20 deletions(-)