From patchwork Wed Mar 16 10:46:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8598151 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 81CF0C0553 for ; Wed, 16 Mar 2016 11:03:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DAEB82022A for ; Wed, 16 Mar 2016 11:03:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65227201EF for ; Wed, 16 Mar 2016 11:03:46 +0000 (UTC) Received: from localhost ([::1]:55070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9Ev-0007n5-Q0 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 Mar 2016 07:03:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag8zb-000423-Q6 for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ag8zW-0002Lv-5m for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:55 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:37059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag8zV-0002LS-V4 for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:50 -0400 Received: by mail-wm0-x22a.google.com with SMTP id p65so66057128wmp.0 for ; Wed, 16 Mar 2016 03:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=OYHliyTbi9o2gbZR4EEgDagl8KrfYnKjI7oeWZ8gCBo=; b=R9qBGZK6SNMuAe14kfG+pXAuoYZhGJD1JBphjrVzl9MHilNXrpxDX+CXswsclVcjY/ Lpc4ydMILNeFG+113I1+mF2Q9fReCJWBuYcwLKWzKY2Ir6d/crUmnMF/wZNtZctw+W6h BcS6InuiSfti230YORszGceuSHUt4kpGHeJHAwfq5mKXZMU3K5teCI46EIYOs6hnIVu5 GmBTYtyEZxbF5agzp/6dGfwtgG6Jj9zpp1XEs4s7D4wvdAXMSFeiAr9IgIHUBwR0PZZu xGp5ncM6mdfY/KP61nvGtD4YS43pp4LmM7k51B/r440ntmo5UY/bDnqY0Yu89I1RY7z2 nTqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=OYHliyTbi9o2gbZR4EEgDagl8KrfYnKjI7oeWZ8gCBo=; b=Ox0XxQl7jGsf4AiK0/RJA6YTlD/ofthxENDaZK8GA0rHGe1QFN9kVwWVjqZFN9vaEC ZK6NFJXToinG+E9RxbggShP4l3h/VuUZ8RZNq1alTCu4cFVHEfSWxKdUST6EolGaDTEg A9y4elfBPz/8/5rj6uoSUfKu6eervRHU09BpLAGCo4SkRHQ6ipkPWN3Vv9RqKag7vU9i Bi7kOUCmMCk4Gs6sk9lTFL0uVm9lwJqRlPD4WOhpdD+tlYXU5HfSW/495TdTKlsqamk6 akbrzW9nZ6Urv2Um0IP4YL9UtOHv8LIRByWiVsemOhI5criJtPYUecgV4pHgXnFUBMCk IK2A== X-Gm-Message-State: AD7BkJIBAafPmdwCMf/EBWskbZJTHdfLJ9j08X86BFqFyU1z04ndik2xAch4p5STcEeWrw== X-Received: by 10.28.226.212 with SMTP id z203mr3723341wmg.9.1458125269336; Wed, 16 Mar 2016 03:47:49 -0700 (PDT) Received: from 640k.lan (94-39-161-17.adsl-ull.clienti.tiscali.it. [94.39.161.17]) by smtp.gmail.com with ESMTPSA id wr2sm2418094wjc.49.2016.03.16.03.47.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Mar 2016 03:47:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 16 Mar 2016 11:46:53 +0100 Message-Id: <1458125219-131698-44-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1458125219-131698-1-git-send-email-pbonzini@redhat.com> References: <1458125219-131698-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22a Subject: [Qemu-devel] [PATCH 43/49] arm: move arm_log_exception into .c file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Avoid need for qemu/log.h inclusion. Signed-off-by: Paolo Bonzini --- target-arm/helper.c | 14 ++++++++++++++ target-arm/internals.h | 15 +-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index eaded41..f71a78f 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -5810,6 +5810,20 @@ static void do_v7m_exception_exit(CPUARMState *env) pointer. */ } +void arm_log_exception(int idx) +{ + if (qemu_loglevel_mask(CPU_LOG_INT)) { + const char *exc = NULL; + + if (idx >= 0 && idx < ARRAY_SIZE(excnames)) { + exc = excnames[idx]; + } + if (!exc) { + exc = "unknown"; + } + qemu_log_mask(CPU_LOG_INT, "Taking exception %d [%s]\n", idx, exc); + } +} void arm_v7m_cpu_do_interrupt(CPUState *cs) { ARMCPU *cpu = ARM_CPU(cs); diff --git a/target-arm/internals.h b/target-arm/internals.h index 2e70272..5c7d146 100644 --- a/target-arm/internals.h +++ b/target-arm/internals.h @@ -72,20 +72,7 @@ static const char * const excnames[] = { [EXCP_SEMIHOST] = "Semihosting call", }; -static inline void arm_log_exception(int idx) -{ - if (qemu_loglevel_mask(CPU_LOG_INT)) { - const char *exc = NULL; - - if (idx >= 0 && idx < ARRAY_SIZE(excnames)) { - exc = excnames[idx]; - } - if (!exc) { - exc = "unknown"; - } - qemu_log_mask(CPU_LOG_INT, "Taking exception %d [%s]\n", idx, exc); - } -} +void arm_log_exception(int idx); /* Scale factor for generic timers, ie number of ns per tick. * This gives a 62.5MHz timer.