mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
acpi/pcihp: Convert debug printf()s to trace events
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190402161900.7374-3-armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
b37d56ece9
commit
df93b19476
2 changed files with 17 additions and 17 deletions
|
|
@ -37,14 +37,7 @@
|
|||
#include "hw/pci/pci_bus.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qom/qom-qobject.h"
|
||||
|
||||
//#define DEBUG
|
||||
|
||||
#ifdef DEBUG
|
||||
# define ACPI_PCIHP_DPRINTF(format, ...) printf(format, ## __VA_ARGS__)
|
||||
#else
|
||||
# define ACPI_PCIHP_DPRINTF(format, ...) do { } while (0)
|
||||
#endif
|
||||
#include "trace.h"
|
||||
|
||||
#define ACPI_PCIHP_ADDR 0xae00
|
||||
#define ACPI_PCIHP_SIZE 0x0014
|
||||
|
|
@ -306,23 +299,23 @@ static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size)
|
|||
if (!s->legacy_piix) {
|
||||
s->acpi_pcihp_pci_status[bsel].up = 0;
|
||||
}
|
||||
ACPI_PCIHP_DPRINTF("pci_up_read %" PRIu32 "\n", val);
|
||||
trace_acpi_pci_up_read(val);
|
||||
break;
|
||||
case PCI_DOWN_BASE:
|
||||
val = s->acpi_pcihp_pci_status[bsel].down;
|
||||
ACPI_PCIHP_DPRINTF("pci_down_read %" PRIu32 "\n", val);
|
||||
trace_acpi_pci_down_read(val);
|
||||
break;
|
||||
case PCI_EJ_BASE:
|
||||
/* No feature defined yet */
|
||||
ACPI_PCIHP_DPRINTF("pci_features_read %" PRIu32 "\n", val);
|
||||
trace_acpi_pci_features_read(val);
|
||||
break;
|
||||
case PCI_RMV_BASE:
|
||||
val = s->acpi_pcihp_pci_status[bsel].hotplug_enable;
|
||||
ACPI_PCIHP_DPRINTF("pci_rmv_read %" PRIu32 "\n", val);
|
||||
trace_acpi_pci_rmv_read(val);
|
||||
break;
|
||||
case PCI_SEL_BASE:
|
||||
val = s->hotplug_select;
|
||||
ACPI_PCIHP_DPRINTF("pci_sel_read %" PRIu32 "\n", val);
|
||||
trace_acpi_pci_sel_read(val);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -340,13 +333,11 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data,
|
|||
break;
|
||||
}
|
||||
acpi_pcihp_eject_slot(s, s->hotplug_select, data);
|
||||
ACPI_PCIHP_DPRINTF("pciej write %" HWADDR_PRIx " <== %" PRIu64 "\n",
|
||||
addr, data);
|
||||
trace_acpi_pci_ej_write(addr, data);
|
||||
break;
|
||||
case PCI_SEL_BASE:
|
||||
s->hotplug_select = s->legacy_piix ? ACPI_PCIHP_BSEL_DEFAULT : data;
|
||||
ACPI_PCIHP_DPRINTF("pcisel write %" HWADDR_PRIx " <== %" PRIu64 "\n",
|
||||
addr, data);
|
||||
trace_acpi_pci_sel_write(addr, data);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue