From patchwork Tue Jun 19 09:31:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luc Michel X-Patchwork-Id: 931506 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=greensocs.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=greensocs.com header.i=@greensocs.com header.b="1LCmejfw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=greensocs.com header.i=@greensocs.com header.b="H34ZqZjm"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=greensocs.com header.i=@greensocs.com header.b="H34ZqZjm"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4192rX56m9z9s3M for ; Tue, 19 Jun 2018 19:35:40 +1000 (AEST) Received: from localhost ([::1]:40279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVD34-00080i-By for incoming@patchwork.ozlabs.org; Tue, 19 Jun 2018 05:35:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVCzI-0005QH-F5 for qemu-devel@nongnu.org; Tue, 19 Jun 2018 05:31:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVCzH-0006JX-DF for qemu-devel@nongnu.org; Tue, 19 Jun 2018 05:31:44 -0400 Received: from greensocs.com ([193.104.36.180]:42313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVCzA-0006Fh-Qc; Tue, 19 Jun 2018 05:31:37 -0400 Received: from localhost (localhost [127.0.0.1]) by greensocs.com (Postfix) with ESMTP id EE9ED44B87E; Tue, 19 Jun 2018 11:31:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1529400689; bh=QAiHdMUUGM+uZvt6osVtWsJ4ZkqGJwmAKC8OXgcBopk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1LCmejfwDBfo66Qc+EmB44APrOl0ap2G2vRg2ucpGAr0/Pk0z0n6vCzcdnzawny4v BtH7PSaRAMXW90WxA1v0ntCHmmZwmsnZaiCEbfnAC+w0o3BD3dfIHxQhKbd6ksgeaz gHmjk3V3MbI1JrzhwCQue/p4XRrpiGZlxfNOFWTw= X-Virus-Scanned: amavisd-new at greensocs.com Authentication-Results: gs-01.greensocs.com (amavisd-new); dkim=pass (1024-bit key) header.d=greensocs.com header.b=H34ZqZjm; dkim=pass (1024-bit key) header.d=greensocs.com header.b=H34ZqZjm Received: from greensocs.com ([127.0.0.1]) by localhost (gs-01.greensocs.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YIoNxRn9VUJ4; Tue, 19 Jun 2018 11:31:28 +0200 (CEST) Received: by greensocs.com (Postfix, from userid 998) id EE0F744B864; Tue, 19 Jun 2018 11:31:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1529400687; bh=QAiHdMUUGM+uZvt6osVtWsJ4ZkqGJwmAKC8OXgcBopk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=H34ZqZjmQ7qUK2iU6PySpU7XEtm18Ua8GZkhis2UNwX3vK4MvqSTuzEf/7Zx33C6i J8rQtROa/DZPvSasdAGuM20861plTKEHGevCahtpxk5IgY4Dzx5DCq2DcibLenN5Tv ZMuwTWNATux6yHR+GgNPVaLPijDI+oKnCsx+hUQs= Received: from michell-laptop.bar.greensocs.com (antfield.tima.u-ga.fr [147.171.129.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: luc.michel@greensocs.com) by greensocs.com (Postfix) with ESMTPSA id 9B49D44B873; Tue, 19 Jun 2018 11:31:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1529400687; bh=QAiHdMUUGM+uZvt6osVtWsJ4ZkqGJwmAKC8OXgcBopk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=H34ZqZjmQ7qUK2iU6PySpU7XEtm18Ua8GZkhis2UNwX3vK4MvqSTuzEf/7Zx33C6i J8rQtROa/DZPvSasdAGuM20861plTKEHGevCahtpxk5IgY4Dzx5DCq2DcibLenN5Tv ZMuwTWNATux6yHR+GgNPVaLPijDI+oKnCsx+hUQs= From: luc.michel@greensocs.com To: qemu-devel@nongnu.org Date: Tue, 19 Jun 2018 11:31:19 +0200 Message-Id: <20180619093124.24011-3-luc.michel@greensocs.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180619093124.24011-1-luc.michel@greensocs.com> References: <20180619093124.24011-1-luc.michel@greensocs.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 193.104.36.180 Subject: [Qemu-devel] [PATCH v2 2/7] intc/arm_gic: Remove some dead code and put some functions static X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , mark.burton@greensocs.com, saipava@xilinx.com, edgari@xilinx.com, qemu-arm@nongnu.org, Jan Kiszka , Luc MICHEL Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Luc MICHEL Some functions are now only used in arm_gic.c, put them static. Some of them where only used by the NVIC implementation and are not used anymore, so remove them. Signed-off-by: Luc MICHEL Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/intc/arm_gic.c | 23 ++--------------------- hw/intc/gic_internal.h | 4 ---- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 141f3e7a48..679b19fb94 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -71,7 +71,7 @@ static inline bool gic_has_groups(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) +static void gic_update(GICState *s) { int best_irq; int best_prio; @@ -137,19 +137,6 @@ void gic_update(GICState *s) } } -void gic_set_pending_private(GICState *s, int cpu, int irq) -{ - int cm = 1 << cpu; - - if (gic_test_pending(s, irq, cm)) { - return; - } - - DPRINTF("Set %d pending cpu %d\n", irq, cpu); - GIC_DIST_SET_PENDING(irq, cm); - gic_update(s); -} - static void gic_set_irq_11mpcore(GICState *s, int irq, int level, int cm, int target) { @@ -565,7 +552,7 @@ static void gic_deactivate_irq(GICState *s, int cpu, int irq, MemTxAttrs attrs) GIC_DIST_CLEAR_ACTIVE(irq, cm); } -void gic_complete_irq(GICState *s, int cpu, int irq, MemTxAttrs attrs) +static void gic_complete_irq(GICState *s, int cpu, int irq, MemTxAttrs attrs) { int cm = 1 << cpu; int group; @@ -1418,12 +1405,6 @@ static const MemoryRegionOps gic_cpu_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -/* This function is used by nvic model */ -void gic_init_irqs_and_distributor(GICState *s) -{ - gic_init_irqs_and_mmio(s, gic_set_irq, gic_ops); -} - static void arm_gic_realize(DeviceState *dev, Error **errp) { /* Device instance realize function for the GIC sysbus device */ diff --git a/hw/intc/gic_internal.h b/hw/intc/gic_internal.h index 6f8d242904..a2075a94db 100644 --- a/hw/intc/gic_internal.h +++ b/hw/intc/gic_internal.h @@ -75,11 +75,7 @@ /* The special cases for the revision property: */ #define REV_11MPCORE 0 -void gic_set_pending_private(GICState *s, int cpu, int irq); uint32_t gic_acknowledge_irq(GICState *s, int cpu, MemTxAttrs attrs); -void gic_complete_irq(GICState *s, int cpu, int irq, MemTxAttrs attrs); -void gic_update(GICState *s); -void gic_init_irqs_and_distributor(GICState *s); void gic_dist_set_priority(GICState *s, int cpu, int irq, uint8_t val, MemTxAttrs attrs);