From patchwork Thu Oct 30 22:12:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 39959 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D0AE82405B for ; Fri, 31 Oct 2014 18:42:25 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id n15sf4464794lbi.2 for ; Fri, 31 Oct 2014 11:42:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=ii/PiHVQH5afnKFCG1SHefTytyo4wPZ1X85oC7P/2Bc=; b=RfKr07ciTyMp/Da2a5xX6qScOMRLirkRCml7V0Yz/h/dP2RNaOSr6nDxXCBmmv1Hx3 GKUp84YUt87wo/455dCWJ04QRGQPWaemPC5ttVlBY4O8oB0/7GyB9nuysGFn3mqt8E4H OAFOAeCbcFq0T3QH8GREGRQ6Tb5/HrA8YDrQ8Aqk/16HjN0kBsfnE3uEFcaO0+q/aZSu XdGCdX9s84NcHM3oDDKJ42Xu8IDiMMcA4LZgl1hgZKNQ/hyVZ0ltJygZaKWz4XLcQuZn tTBj4ZP5rhgtHfZgklA7LAEYs6+zy2ZARXaPx2tvjvGFRqDpFQNq/dldzqriQzhmvzF2 IUxg== X-Gm-Message-State: ALoCoQlcWgoqMD/aULfgIRTzaYT62yuUXt0JdAB5AdV9hfP2XsaEs5fIRxzAZTgAkob4+GwL15e6 X-Received: by 10.180.72.141 with SMTP id d13mr914114wiv.6.1414780944656; Fri, 31 Oct 2014 11:42:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.80 with SMTP id be16ls508721lab.107.gmail; Fri, 31 Oct 2014 11:42:24 -0700 (PDT) X-Received: by 10.112.201.201 with SMTP id kc9mr29241765lbc.76.1414780944498; Fri, 31 Oct 2014 11:42:24 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id ms6si18215139lbb.19.2014.10.31.11.42.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 11:42:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id z11so4671710lbi.33 for ; Fri, 31 Oct 2014 11:42:24 -0700 (PDT) X-Received: by 10.152.116.102 with SMTP id jv6mr28559266lab.40.1414780944367; Fri, 31 Oct 2014 11:42:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp244953lbz; Fri, 31 Oct 2014 11:42:21 -0700 (PDT) X-Received: by 10.229.83.134 with SMTP id f6mr39249467qcl.22.1414780941241; Fri, 31 Oct 2014 11:42:21 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j11si18452964qge.38.2014.10.31.11.42.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 31 Oct 2014 11:42:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:41002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkH9Q-0007bP-CP for patch@linaro.org; Fri, 31 Oct 2014 14:42:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkE4v-00026K-LX for qemu-devel@nongnu.org; Fri, 31 Oct 2014 11:26:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xjxxk-0006KI-Ro for qemu-devel@nongnu.org; Thu, 30 Oct 2014 18:13:06 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:43530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjxxk-0006Jb-Mi for qemu-devel@nongnu.org; Thu, 30 Oct 2014 18:13:00 -0400 Received: by mail-pa0-f49.google.com with SMTP id lj1so6318867pab.36 for ; Thu, 30 Oct 2014 15:13:00 -0700 (PDT) X-Received: by 10.68.65.68 with SMTP id v4mr15534505pbs.52.1414707180115; Thu, 30 Oct 2014 15:13:00 -0700 (PDT) Received: from gbellows-linaro.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com. [67.52.129.61]) by mx.google.com with ESMTPSA id h3sm7270163pdl.22.2014.10.30.15.12.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Oct 2014 15:12:59 -0700 (PDT) From: Greg Bellows To: qemu-devel@nongnu.org, peter.maydell@linaro.org, serge.fdrv@gmail.com, edgar.iglesias@gmail.com, aggelerf@ethz.ch, christoffer.dall@linaro.org Date: Thu, 30 Oct 2014 17:12:11 -0500 Message-Id: <1414707132-24588-16-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1414707132-24588-1-git-send-email-greg.bellows@linaro.org> References: <1414707132-24588-1-git-send-email-greg.bellows@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.49 Cc: daniel.thompson@linaro.org Subject: [Qemu-devel] [PATCH v2 15/16] hw/intc/arm_gic: Break out gic_update() function 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: greg.bellows@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Fabian Aggeler Prepare to split gic_update() in two functions, one for GICs with interrupt grouping and one without grouping (existing). Signed-off-by: Fabian Aggeler --- hw/intc/arm_gic.c | 11 ++++++++--- hw/intc/gic_internal.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index e01cfdc..808aa18 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -52,9 +52,7 @@ static inline bool ns_access(void) return true; } -/* TODO: Many places that call this routine could be optimized. */ -/* Update interrupt status after enabled or pending bits have been changed. */ -void gic_update(GICState *s) +inline void gic_update_no_grouping(GICState *s) { int best_irq; int best_prio; @@ -93,6 +91,13 @@ void gic_update(GICState *s) } } +/* TODO: Many places that call this routine could be optimized. */ +/* Update interrupt status after enabled or pending bits have been changed. */ +void gic_update(GICState *s) +{ + gic_update_no_grouping(s); +} + void gic_set_pending_private(GICState *s, int cpu, int irq) { int cm = 1 << cpu; diff --git a/hw/intc/gic_internal.h b/hw/intc/gic_internal.h index 13fe5a6..e16a7e5 100644 --- a/hw/intc/gic_internal.h +++ b/hw/intc/gic_internal.h @@ -73,6 +73,7 @@ void gic_set_pending_private(GICState *s, int cpu, int irq); uint32_t gic_acknowledge_irq(GICState *s, int cpu); void gic_complete_irq(GICState *s, int cpu, int irq); +inline void gic_update_no_grouping(GICState *s); void gic_update(GICState *s); void gic_init_irqs_and_distributor(GICState *s); void gic_set_priority(GICState *s, int cpu, int irq, uint8_t val);