qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] pcie: add trace-point for power indicator transitions


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 4/4] pcie: add trace-point for power indicator transitions
Date: Tue, 7 Feb 2023 13:39:03 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

Thanks for reviewing!

On 05.02.23 13:56, Philippe Mathieu-Daudé wrote:
On 4/2/23 18:47, Vladimir Sementsov-Ogievskiy wrote:
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
  hw/pci/pcie.c       | 20 ++++++++++++++++++++
  hw/pci/trace-events |  3 +++
  2 files changed, 23 insertions(+)

+static const char *pcie_sltctl_pic_str(uint16_t sltctl)
+{
+    switch (sltctl & PCI_EXP_SLTCTL_PIC) {
+    case PCI_EXP_SLTCTL_PWR_IND_ON:
+        return "on";
+    case PCI_EXP_SLTCTL_PWR_IND_BLINK:
+        return "blink";
+    case PCI_EXP_SLTCTL_PWR_IND_OFF:
+        return "off";
+    default:
+        return "?";

Maybe "illegal"?

I just was unsure about it.

For SHPC, 0 is correct, and means that this command don't change the led state.

But with PCI-e hotplug we don't have such commands but change the led directly, so it must be one of 
"on"/"blink"/"off", and zero is really wrong, right?


Also, I'm now looking at /* TODO: send event to monitor */ in shpc code, and 
working on it. So, I think, I'll soon send patches with such event for both 
SHPC and PCI-e, and probably that trace point becomes not needed.


Otherwise:

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

+    }
+}


--
Best regards,
Vladimir




reply via email to

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