qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/4] Define and use PRI*PLX format specifier mac


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 0/4] Define and use PRI*PLX format specifier macros for target_phys_addr_t
Date: Mon, 25 Jun 2012 15:48:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0

Am 25.06.2012 14:45, schrieb Peter Maydell:
> This patchset defines a set of macros for use in printf format strings
> for handling target_phys_addr_t values, as suggested by Andreas Färber
> (http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg01547.html)

What is the X for again? I assume PL = Physical Long, X as in
hexadecimal would then contradict the d/u and duplicate x/X.

Thus I would suggest TARGET_PRIdPHYSADDR, also addressing Eric's
comment. Judging from patches 2-4 it's not used to frequently unlike its
user TARGET_FMT_plx, so we don't have to badly shorten it for usability.

Andreas

> We can then use them in some places which were previously either
> making assumptions about the width of target_phys_addr_t or had
> an ifdef to handle the 32 and 64 bit cases separately. Patches 2-4
> cover the format-string related parts of Anthony's original "make
> target_phys_addr_t 64 bits in all cases" patch:
> http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg01523.html
> 
> Peter Maydell (4):
>   targphys.h: Define PRI*PLX format specifier macros
>   hw/omap.h: Use PRIxPLX to define OMAP_FMT_plx
>   hw/sh_serial: Use PRIxPLX rather than %x for physaddr
>   monitor: Use PRI*PLX to avoid TARGET_PHYS_ADDR_BITS ifdef
> 
>  hw/omap.h      |    8 +-------
>  hw/sh_serial.c |    5 +++--
>  monitor.c      |   29 ++++-------------------------
>  targphys.h     |   16 ++++++++++++++++
>  4 files changed, 24 insertions(+), 34 deletions(-)

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]