sun4u_iommu: convert from IOMMU_DPRINTF to trace-events
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
This commit is contained in:
parent
4c9fbc38e3
commit
09ecbb785b
@ -30,16 +30,7 @@
|
|||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qemu/log.h"
|
#include "qemu/log.h"
|
||||||
|
#include "trace.h"
|
||||||
/* debug IOMMU */
|
|
||||||
//#define DEBUG_IOMMU
|
|
||||||
|
|
||||||
#ifdef DEBUG_IOMMU
|
|
||||||
#define IOMMU_DPRINTF(fmt, ...) \
|
|
||||||
do { printf("IOMMU: " fmt , ## __VA_ARGS__); } while (0)
|
|
||||||
#else
|
|
||||||
#define IOMMU_DPRINTF(fmt, ...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define IOMMU_PAGE_SIZE_8K (1ULL << 13)
|
#define IOMMU_PAGE_SIZE_8K (1ULL << 13)
|
||||||
@ -201,8 +192,7 @@ static void iommu_mem_write(void *opaque, hwaddr addr,
|
|||||||
{
|
{
|
||||||
IOMMUState *is = opaque;
|
IOMMUState *is = opaque;
|
||||||
|
|
||||||
IOMMU_DPRINTF("IOMMU config write: 0x%" HWADDR_PRIx " val: %" PRIx64
|
trace_sun4u_iommu_mem_write(addr, val, size);
|
||||||
" size: %d\n", addr, val, size);
|
|
||||||
|
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
case IOMMU_CTRL:
|
case IOMMU_CTRL:
|
||||||
@ -280,8 +270,7 @@ static uint64_t iommu_mem_read(void *opaque, hwaddr addr, unsigned size)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
IOMMU_DPRINTF("IOMMU config read: 0x%" HWADDR_PRIx " val: %" PRIx64
|
trace_sun4u_iommu_mem_read(addr, val, size);
|
||||||
" size: %d\n", addr, val, size);
|
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
@ -2,3 +2,7 @@
|
|||||||
|
|
||||||
# hw/sparc64/sun4u.c
|
# hw/sparc64/sun4u.c
|
||||||
ebus_isa_irq_handler(int n, int level) "Set ISA IRQ %d level %d"
|
ebus_isa_irq_handler(int n, int level) "Set ISA IRQ %d level %d"
|
||||||
|
|
||||||
|
# hw/sparc64/sun4u_iommu.c
|
||||||
|
sun4u_iommu_mem_read(uint64_t addr, uint64_t val, int size) "addr: 0x%"PRIx64" val: 0x%"PRIx64" size: %d"
|
||||||
|
sun4u_iommu_mem_write(uint64_t addr, uint64_t val, int size) "addr: 0x%"PRIx64" val: 0x%"PRIx64" size: %d"
|
||||||
|
Loading…
Reference in New Issue
Block a user