All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] Use of TARGET_FMT_plx in hw/tpm/trace-events
Date: Sun, 21 Jul 2019 09:22:44 +0200	[thread overview]
Message-ID: <663f4f5b-bf45-ed0d-1140-e7baa9cc5578@redhat.com> (raw)
In-Reply-To: <316ea157-4c44-5d75-e4f4-7977d2e13345@redhat.com>

On 20/07/2019 11.42, Philippe Mathieu-Daudé wrote:
> On 7/20/19 8:39 AM, Markus Armbruster wrote:
>> Consider hw/tpm/trace-events
>>
>>     # tpm_crb.c
>>     tpm_crb_mmio_read(uint64_t addr, unsigned size, uint32_t val) "CRB read 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32
>>     tpm_crb_mmio_write(uint64_t addr, unsigned size, uint32_t val) "CRB write 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32
>>
>> Format is TARGET_FMT_plx formats a hwaddr, but the parameter type is
>> uint64_t.  They happen to be the same.  Is this kosher?
>>
> 
> Missed when converting from DPRINTF() to trace-events:
> https://git.qemu.org/?p=qemu.git;a=commitdiff;h=ec427498;hp=8cb340c613
> 
> PRIx64 certainly makes sense here.
> 
> Since it is the single use, once updated we can remote this hunk from
> scripts/tracetool/format/log_stap.py:
> 
>     if macro == "TARGET_FMT_plx":
>         return "%016x"
> 
> I guess remember a thread with Thomas talking about TARGET_FMT_plx but I
> can't find it, maybe I dreamed about it...

That was:

 https://patchwork.kernel.org/patch/10930327/

... I think we should rename it to HWADDR_PRI0x or so.

 Thomas


  reply	other threads:[~2019-07-21  7:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-20  6:39 [Qemu-devel] Use of TARGET_FMT_plx in hw/tpm/trace-events Markus Armbruster
2019-07-20  9:42 ` Philippe Mathieu-Daudé
2019-07-21  7:22   ` Thomas Huth [this message]
2019-07-22 14:40     ` Markus Armbruster
2019-07-22 14:43   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=663f4f5b-bf45-ed0d-1140-e7baa9cc5578@redhat.com \
    --to=thuth@redhat.com \
    --cc=armbru@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.