DM: use log macro/func to output log info

also add logs for some key entries.

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Minggui Cao
2019-04-26 11:27:36 +08:00
committed by wenlingz
parent 4e289341ff
commit c3d60297f2
4 changed files with 55 additions and 36 deletions

View File

@@ -45,6 +45,7 @@
#include "irq.h"
#include "lpc.h"
#include "sw_load.h"
#include "log.h"
#define CONF1_ADDR_PORT 0x0cf8
#define CONF1_DATA_PORT 0x0cfc
@@ -1231,10 +1232,14 @@ init_pci(struct vmctx *ctx)
continue;
ops = pci_emul_finddev(fi->fi_name);
assert(ops != NULL);
pr_notice("pci init %s\r\n", fi->fi_name);
error = pci_emul_init(ctx, ops, bus, slot,
func, fi);
if (error)
if (error) {
pr_err("pci %s init failed\n", fi->fi_name);
goto pci_emul_init_fail;
}
success_cnt++;
}
}
@@ -1406,6 +1411,8 @@ deinit_pci(struct vmctx *ctx)
continue;
ops = pci_emul_finddev(fi->fi_name);
assert(ops != NULL);
pr_notice("pci deinit %s\n", fi->fi_name);
pci_emul_deinit(ctx, ops, bus, slot,
func, fi);
}