From patchwork Tue Jan 19 06:23:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 366129 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp474021jam; Mon, 18 Jan 2021 22:33:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwh7dN9XFxllJXFkSaW3Ad0UFrNPo9dlio0p4G9AAaqheEdtOpe0QNODZG7XPU2VmwCMNz2 X-Received: by 2002:a25:3d7:: with SMTP id 206mr4170141ybd.31.1611037993570; Mon, 18 Jan 2021 22:33:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611037993; cv=none; d=google.com; s=arc-20160816; b=nJ2mQF9pz3Dnlyavxyn6mu0+7Rd9JFzFvEGCAwyC+26RNXPSij1HXyuRtrG3a+Ezp0 Uzi5cFcFnvuIr4BtXjmIUOpdyhaclf2S6qh+h8mShDrv1im84FhNcPcXvGZJ3QI81DtS MqyHj6q5xbxJ+ZHFQWi9gHD2dCuwQXUFZBLQQwsN0xUOBWpQr24XPN237UFTowjTdOw9 FAvIKdpApOKXS8pp3L/c1dQs8xeO6Rxu2e5hLtrHqIaRPosQik5YKQL6XITxfMPp2qNx B8LG4unw5cQ9eDZeS5ATYu32LgqDl8uRFspf16pOByqYHbrM2/+S3d+DWoC5D+lrNjxf hgFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=m7RpXjXTfWsqDJRZ2CS9T409ZIPMKaSpCXaanMojTuE=; b=b3W7fGiCSVvH0ZyVc9vw+aJR30QNhiE/+Qfj6+n/iAeZA11UxsMAOsXND7o+p4oCBi iQZbdTS888sGAy/1ihhzbBPW0g2BG9tLLsVrpZIY5zC+O170giufrZsTtIhgjNxTyuEW TKF2BEskP2vP1GH43+HV+aQLzBS5Eyz7KDhBiAG+rffj+N9+M9w1VtLyQqEHciDYihGy UNGqxt/LavGRkJSUXtYFAxaxi2DVQi8H2w/PioXq1DAgChEnTI2CPkElFX/dRuwEMJBR qh4bmwwqfNLokwA0NLRUc5jFU3WPzIp6e6Bmh0iLMuDvcxReHmnLwhG18xBMyEzEpifR rPKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gibson.dropbear.id.au header.s=201602 header.b=oDiooSZL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t1si19750489ybo.308.2021.01.18.22.33.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jan 2021 22:33:13 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gibson.dropbear.id.au header.s=201602 header.b=oDiooSZL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:56444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1kZl-00046v-1C for patch@linaro.org; Tue, 19 Jan 2021 01:33:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1kQh-0001OZ-Pa; Tue, 19 Jan 2021 01:23:51 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:34789 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1kQe-0000Si-JK; Tue, 19 Jan 2021 01:23:51 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 4DKdrW5Dhvz9sWY; Tue, 19 Jan 2021 17:23:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1611037403; bh=0gvNDW/viLsiaGew9ibOeqS0VFKvWCy1PNxkmx6DF5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oDiooSZLqQSSoUay+10tlB/Yia+rUNl1CxoyFDPsBgbCelToXRqkMKQ2gmMvkrxdZ AsvSARQwuc3/oPCZyz9SL32TQI7Px8L6DKjRDIN+ORcweYDWHWo44ByW/OFEfJNdhe o2zi6AmxsvFnzLHtV85pBxaUZ+QSkrDmurXwJb2o= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 05/13] hw/ppc: Remove unused ppcuic_init() Date: Tue, 19 Jan 2021 17:23:10 +1100 Message-Id: <20210119062318.13857-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210119062318.13857-1-david@gibson.dropbear.id.au> References: <20210119062318.13857-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E . Iglesias" , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Now we've converted all the callsites to directly create the QOM UIC device themselves, the ppcuic_init() function is unused and can be removed. The enum defining PPCUIC symbolic constants can be moved to the ppc-uic.h header where it more naturally belongs. Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Tested-by: Edgar E. Iglesias Message-Id: <20210108171212.16500-5-peter.maydell@linaro.org> Signed-off-by: David Gibson --- hw/ppc/ppc4xx_devs.c | 38 -------------------------------------- include/hw/intc/ppc-uic.h | 7 +++++++ include/hw/ppc/ppc4xx.h | 9 --------- 3 files changed, 7 insertions(+), 47 deletions(-) -- 2.29.2 diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c index ffe4cf43e8..fe9d4f7155 100644 --- a/hw/ppc/ppc4xx_devs.c +++ b/hw/ppc/ppc4xx_devs.c @@ -77,44 +77,6 @@ PowerPCCPU *ppc4xx_init(const char *cpu_type, return cpu; } -/*****************************************************************************/ -/* "Universal" Interrupt controller */ - -qemu_irq *ppcuic_init (CPUPPCState *env, qemu_irq *irqs, - uint32_t dcr_base, int has_ssr, int has_vr) -{ - DeviceState *uicdev = qdev_new(TYPE_PPC_UIC); - SysBusDevice *uicsbd = SYS_BUS_DEVICE(uicdev); - qemu_irq *uic_irqs; - int i; - - qdev_prop_set_uint32(uicdev, "dcr-base", dcr_base); - qdev_prop_set_bit(uicdev, "use-vectors", has_vr); - object_property_set_link(OBJECT(uicdev), "cpu", OBJECT(env_cpu(env)), - &error_fatal); - sysbus_realize_and_unref(uicsbd, &error_fatal); - - sysbus_connect_irq(uicsbd, PPCUIC_OUTPUT_INT, irqs[PPCUIC_OUTPUT_INT]); - sysbus_connect_irq(uicsbd, PPCUIC_OUTPUT_CINT, irqs[PPCUIC_OUTPUT_CINT]); - - /* - * Return an allocated array of the UIC's input IRQ lines. - * This is an ugly temporary API to retain compatibility with - * the ppcuic_init() interface from the pre-QOM-conversion UIC. - * None of the callers free this array, so it is leaked -- but - * so was the array allocated by qemu_allocate_irqs() in the - * old code. - * - * The callers should just instantiate the UIC and wire it up - * themselves rather than passing qemu_irq* in and out of this function. - */ - uic_irqs = g_new0(qemu_irq, UIC_MAX_IRQ); - for (i = 0; i < UIC_MAX_IRQ; i++) { - uic_irqs[i] = qdev_get_gpio_in(uicdev, i); - } - return uic_irqs; -} - /*****************************************************************************/ /* SDRAM controller */ typedef struct ppc4xx_sdram_t ppc4xx_sdram_t; diff --git a/include/hw/intc/ppc-uic.h b/include/hw/intc/ppc-uic.h index e614e2ffd8..22dd5e5ac2 100644 --- a/include/hw/intc/ppc-uic.h +++ b/include/hw/intc/ppc-uic.h @@ -47,6 +47,13 @@ OBJECT_DECLARE_SIMPLE_TYPE(PPCUIC, PPC_UIC) #define UIC_MAX_IRQ 32 +/* Symbolic constants for the sysbus IRQ outputs */ +enum { + PPCUIC_OUTPUT_INT = 0, + PPCUIC_OUTPUT_CINT = 1, + PPCUIC_OUTPUT_NB, +}; + struct PPCUIC { /*< private >*/ SysBusDevice parent_obj; diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h index cc19c8da5b..980f964b5a 100644 --- a/include/hw/ppc/ppc4xx.h +++ b/include/hw/ppc/ppc4xx.h @@ -33,15 +33,6 @@ PowerPCCPU *ppc4xx_init(const char *cpu_model, clk_setup_t *cpu_clk, clk_setup_t *tb_clk, uint32_t sysclk); -/* PowerPC 4xx universal interrupt controller */ -enum { - PPCUIC_OUTPUT_INT = 0, - PPCUIC_OUTPUT_CINT = 1, - PPCUIC_OUTPUT_NB, -}; -qemu_irq *ppcuic_init (CPUPPCState *env, qemu_irq *irqs, - uint32_t dcr_base, int has_ssr, int has_vr); - void ppc4xx_sdram_banks(MemoryRegion *ram, int nr_banks, MemoryRegion ram_memories[], hwaddr ram_bases[], hwaddr ram_sizes[],