From patchwork Mon Jul 29 12:16:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 18631 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 26B9D248E5 for ; Mon, 29 Jul 2013 12:16:48 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id bv4sf3591148qab.8 for ; Mon, 29 Jul 2013 05:16:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=JxeALqFO2zuemOH1MOYGx/mmY6aFbBnoobLmHsgSyTI=; b=OAKFAlGaNiEVhkVi7sZSn/hUgaLvlN3sBYYoEgPlblrJhhEE9Z9XqidxblZuDp0nbJ T/cUZBiv9nCicSuQZ8vpEyPN924utKMmyUjUxSVNURNk0ZwM/YdoxDgXYc/rFeEgERBf ZFTVCQAtgN2Bf78G7szvCOKbHm4tZMIp5aMebw2KcQ/B9rxGbxHCoBgZ5hJK7vyJijo7 8/X4iWpmHEEhCm2llF9skwWYFB16miBH63HM5v1TnwGKxTRwa0JUh7ZdBHfGJs6It7Ai j2X5JUzXQuW3B+UQw6T4HjeK2CwHxNY4Df29nMHzVanWX+86/agVcrRLJae+3d2Oj+Pm k3Qw== X-Received: by 10.236.119.227 with SMTP id n63mr31142727yhh.38.1375100207906; Mon, 29 Jul 2013 05:16:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.101 with SMTP id t5ls1972715qen.16.gmail; Mon, 29 Jul 2013 05:16:47 -0700 (PDT) X-Received: by 10.220.159.208 with SMTP id k16mr8553721vcx.92.1375100207796; Mon, 29 Jul 2013 05:16:47 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id sj10si17562060vdc.118.2013.07.29.05.16.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 05:16:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id 15so205315vea.1 for ; Mon, 29 Jul 2013 05:16:47 -0700 (PDT) X-Received: by 10.221.47.193 with SMTP id ut1mr8325028vcb.8.1375100207691; Mon, 29 Jul 2013 05:16:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp113247vcb; Mon, 29 Jul 2013 05:16:47 -0700 (PDT) X-Received: by 10.14.105.195 with SMTP id k43mr19995735eeg.2.1375100205122; Mon, 29 Jul 2013 05:16:45 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id v7si52940908eew.216.2013.07.29.05.16.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Jul 2013 05:16:45 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1V3mNT-0003dP-Fq; Mon, 29 Jul 2013 13:16:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori , Alexander Graf , Kevin Wolf , Stefan Hajnoczi , Richard Henderson , Paolo Bonzini , qemu-ppc@nongnu.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH 3/4] target-ppc/kvm.c: Rename 'dprintf' to 'DPRINTF' Date: Mon, 29 Jul 2013 13:16:38 +0100 Message-Id: <1375100199-13934-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1375100199-13934-1-git-send-email-peter.maydell@linaro.org> References: <1375100199-13934-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQnxhdkOIyJtya6lL88g6/+wBPTym2XKoQcsz0yijjixPTtKjri+VXmXE/SUG/NlUCG4NDnl X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 'dprintf' is the name of a POSIX standard function so we should not be stealing it for our debug macro. Rename to 'DPRINTF' (in line with a number of other source files.) Signed-off-by: Peter Maydell --- target-ppc/kvm.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index b0099e1..7ba2224 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -40,10 +40,10 @@ //#define DEBUG_KVM #ifdef DEBUG_KVM -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) #else -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { } while (0) #endif @@ -548,7 +548,7 @@ static int kvm_put_fp(CPUState *cs) reg.addr = (uintptr_t)&fpscr; ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to set FPSCR to KVM: %s\n", strerror(errno)); + DPRINTF("Unable to set FPSCR to KVM: %s\n", strerror(errno)); return ret; } @@ -562,7 +562,7 @@ static int kvm_put_fp(CPUState *cs) ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to set %s%d to KVM: %s\n", vsx ? "VSR" : "FPR", + DPRINTF("Unable to set %s%d to KVM: %s\n", vsx ? "VSR" : "FPR", i, strerror(errno)); return ret; } @@ -574,7 +574,7 @@ static int kvm_put_fp(CPUState *cs) reg.addr = (uintptr_t)&env->vscr; ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to set VSCR to KVM: %s\n", strerror(errno)); + DPRINTF("Unable to set VSCR to KVM: %s\n", strerror(errno)); return ret; } @@ -583,7 +583,7 @@ static int kvm_put_fp(CPUState *cs) reg.addr = (uintptr_t)&env->avr[i]; ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to set VR%d to KVM: %s\n", i, strerror(errno)); + DPRINTF("Unable to set VR%d to KVM: %s\n", i, strerror(errno)); return ret; } } @@ -608,7 +608,7 @@ static int kvm_get_fp(CPUState *cs) reg.addr = (uintptr_t)&fpscr; ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to get FPSCR from KVM: %s\n", strerror(errno)); + DPRINTF("Unable to get FPSCR from KVM: %s\n", strerror(errno)); return ret; } else { env->fpscr = fpscr; @@ -622,7 +622,7 @@ static int kvm_get_fp(CPUState *cs) ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to get %s%d from KVM: %s\n", + DPRINTF("Unable to get %s%d from KVM: %s\n", vsx ? "VSR" : "FPR", i, strerror(errno)); return ret; } else { @@ -639,7 +639,7 @@ static int kvm_get_fp(CPUState *cs) reg.addr = (uintptr_t)&env->vscr; ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to get VSCR from KVM: %s\n", strerror(errno)); + DPRINTF("Unable to get VSCR from KVM: %s\n", strerror(errno)); return ret; } @@ -648,7 +648,7 @@ static int kvm_get_fp(CPUState *cs) reg.addr = (uintptr_t)&env->avr[i]; ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to get VR%d from KVM: %s\n", + DPRINTF("Unable to get VR%d from KVM: %s\n", i, strerror(errno)); return ret; } @@ -670,7 +670,7 @@ static int kvm_get_vpa(CPUState *cs) reg.addr = (uintptr_t)&env->vpa_addr; ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to get VPA address from KVM: %s\n", strerror(errno)); + DPRINTF("Unable to get VPA address from KVM: %s\n", strerror(errno)); return ret; } @@ -680,7 +680,7 @@ static int kvm_get_vpa(CPUState *cs) reg.addr = (uintptr_t)&env->slb_shadow_addr; ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to get SLB shadow state from KVM: %s\n", + DPRINTF("Unable to get SLB shadow state from KVM: %s\n", strerror(errno)); return ret; } @@ -690,7 +690,7 @@ static int kvm_get_vpa(CPUState *cs) reg.addr = (uintptr_t)&env->dtl_addr; ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to get dispatch trace log state from KVM: %s\n", + DPRINTF("Unable to get dispatch trace log state from KVM: %s\n", strerror(errno)); return ret; } @@ -716,7 +716,7 @@ static int kvm_put_vpa(CPUState *cs) reg.addr = (uintptr_t)&env->vpa_addr; ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to set VPA address to KVM: %s\n", strerror(errno)); + DPRINTF("Unable to set VPA address to KVM: %s\n", strerror(errno)); return ret; } } @@ -727,7 +727,7 @@ static int kvm_put_vpa(CPUState *cs) reg.addr = (uintptr_t)&env->slb_shadow_addr; ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to set SLB shadow state to KVM: %s\n", strerror(errno)); + DPRINTF("Unable to set SLB shadow state to KVM: %s\n", strerror(errno)); return ret; } @@ -736,7 +736,7 @@ static int kvm_put_vpa(CPUState *cs) reg.addr = (uintptr_t)&env->dtl_addr; ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to set dispatch trace log state to KVM: %s\n", + DPRINTF("Unable to set dispatch trace log state to KVM: %s\n", strerror(errno)); return ret; } @@ -746,7 +746,7 @@ static int kvm_put_vpa(CPUState *cs) reg.addr = (uintptr_t)&env->vpa_addr; ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret < 0) { - dprintf("Unable to set VPA address to KVM: %s\n", strerror(errno)); + DPRINTF("Unable to set VPA address to KVM: %s\n", strerror(errno)); return ret; } } @@ -864,7 +864,7 @@ int kvm_arch_put_registers(CPUState *cs, int level) #ifdef TARGET_PPC64 if (cap_papr) { if (kvm_put_vpa(cs) < 0) { - dprintf("Warning: Unable to set VPA information to KVM\n"); + DPRINTF("Warning: Unable to set VPA information to KVM\n"); } } #endif /* TARGET_PPC64 */ @@ -1073,7 +1073,7 @@ int kvm_arch_get_registers(CPUState *cs) #ifdef TARGET_PPC64 if (cap_papr) { if (kvm_get_vpa(cs) < 0) { - dprintf("Warning: Unable to get VPA information from KVM\n"); + DPRINTF("Warning: Unable to get VPA information from KVM\n"); } } #endif @@ -1127,7 +1127,7 @@ void kvm_arch_pre_run(CPUState *cs, struct kvm_run *run) */ irq = KVM_INTERRUPT_SET; - dprintf("injected interrupt %d\n", irq); + DPRINTF("injected interrupt %d\n", irq); r = kvm_vcpu_ioctl(cs, KVM_INTERRUPT, &irq); if (r < 0) { printf("cpu %d fail inject %x\n", cs->cpu_index, irq); @@ -1191,20 +1191,20 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run) switch (run->exit_reason) { case KVM_EXIT_DCR: if (run->dcr.is_write) { - dprintf("handle dcr write\n"); + DPRINTF("handle dcr write\n"); ret = kvmppc_handle_dcr_write(env, run->dcr.dcrn, run->dcr.data); } else { - dprintf("handle dcr read\n"); + DPRINTF("handle dcr read\n"); ret = kvmppc_handle_dcr_read(env, run->dcr.dcrn, &run->dcr.data); } break; case KVM_EXIT_HLT: - dprintf("handle halt\n"); + DPRINTF("handle halt\n"); ret = kvmppc_handle_halt(cpu); break; #if defined(TARGET_PPC64) case KVM_EXIT_PAPR_HCALL: - dprintf("handle PAPR hypercall\n"); + DPRINTF("handle PAPR hypercall\n"); run->papr_hcall.ret = spapr_hypercall(cpu, run->papr_hcall.nr, run->papr_hcall.args); @@ -1212,12 +1212,12 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run) break; #endif case KVM_EXIT_EPR: - dprintf("handle epr\n"); + DPRINTF("handle epr\n"); run->epr.epr = ldl_phys(env->mpic_iack); ret = 0; break; case KVM_EXIT_WATCHDOG: - dprintf("handle watchdog expiry\n"); + DPRINTF("handle watchdog expiry\n"); watchdog_perform_action(); ret = 0; break;