From patchwork Thu Apr 21 11:18:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 564328 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp350538map; Thu, 21 Apr 2022 04:34:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzy7Vd4o8Y5Y8bWBlxI9plbDF28fjWCSlAujqSiBn/AObnoiu3ZqD1YO+c/H9Yo2bDDdRbj X-Received: by 2002:a37:9203:0:b0:69b:f993:dbe8 with SMTP id u3-20020a379203000000b0069bf993dbe8mr15358639qkd.94.1650540872004; Thu, 21 Apr 2022 04:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650540872; cv=none; d=google.com; s=arc-20160816; b=AhLIzbiCJfLb7ndCwDYGdFrZ6OOip2zPdD1y+e7YwJKbUjxF/z9m6zUK1ELGq5zO05 obvMUeqFJ4Dmaqv4bifUQ7bBIFSfoIHBO/rji2WumIQU7U+1KgK5/Rn587oWrpfnl3dl uXB0NXDLE80Ydj6VDckYQ1pmYCPyUUMRbvrb7dkshRapMR6HmNL0EdLQyR+VOCzTJ9RR QKXsoVA5LzW6hgDXK5I2uAi3Irrxn/cbh6VL7v7GTvs79Ff0Gc4Ueoewg5/6TPKMeHPC be81hKFFetoRqC1R1Eas9BAzgvsAHt+WGQkYExA/VuQnLHi4JZq1Y6c/2XV2ZzqXtBYY n7HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=f6gs5lG3WvFi/GkMdFvvztB0m3oPJAErdAfbpm6CH1E=; b=D5huuIwtwYB8gz4LZA9MSV1wWPeHELXWStGK9QoS/TQKpdz2HQHcXVhnClv4KWQSl1 7s/OoORTpAHLJmXmoAtRiB/77skWthIQWfwdy7t66IGmXI6R6h6NPs0KwRjU0qEVs9L2 TfBvQp1V9erE/tOuhDOvkbnjTA/Wgc4RATj4qZMjRfXlC4sL16C9SWy5fVIu7EQWTp2+ VseZ7dAaqjURB938DXF7wToC0RcW0vq5UNbZRZ0c8JYeTedvY9VT0hFcINm5vE2nnB/l JsfUeUV3Diu85DCY5BPYoA3ktIum09Xx+LRSKmEhNOImTVQ1VyPrBPpbmoK7FZkGe/Fa Itiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A1oBjf+N; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ey5-20020a0562140b6500b004444e3b0d82si1429050qvb.40.2022.04.21.04.34.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Apr 2022 04:34:31 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=A1oBjf+N; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhV4x-0007dy-EA for patch@linaro.org; Thu, 21 Apr 2022 07:34:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhUpx-000314-Jc for qemu-devel@nongnu.org; Thu, 21 Apr 2022 07:19:01 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:38789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhUpv-0003Tf-Kj for qemu-devel@nongnu.org; Thu, 21 Apr 2022 07:19:01 -0400 Received: by mail-wr1-x42a.google.com with SMTP id p18so6213873wru.5 for ; Thu, 21 Apr 2022 04:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=f6gs5lG3WvFi/GkMdFvvztB0m3oPJAErdAfbpm6CH1E=; b=A1oBjf+NwbvPyCzVI+knnD1KV5tPL1S0fAOZzBtYJRbVPwUtOZ6ZqSnSWS6SXWvs6f w1u5X1ypjyQwfVkvIM5iCof95Q5TzqeqaYSnRTtuwLqJQ3QswtPNGiTHfQU2ciuVh2fV q/a8Hanodlu5hAIiX8N+RN/RK07OkMk0C+ttDyihSd6YInHnoptaJrfs20E2EBsMxdIK 6xwmVl97rP+Q3PX2q4ACS8Tzr5IxNGo5LfcfkIrf6Rui/xgTWm6QyVkxzcDA3ma7PLWE ttn4Wb9nxkwZeoyOVhcLimxZtqO/56HS9HBV/aukOFqZyM1/m3sSpQBRkf6Yi0rHI0Td OR5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f6gs5lG3WvFi/GkMdFvvztB0m3oPJAErdAfbpm6CH1E=; b=uJZazpUE/tOX5HRmT7v3838cjO+NBvO0+48l0j/kXEc7+iEP396kelOSLX4/tvpVVB ZZOw6Ac59PWLm/a+9ZYOJNFjSNee1p6fxqn3knNo0C07YY3COVAze0gFgheJaEYwmGuU 0YhgpXjIJkdLNXLmNmfCdKTvyVxLW1VRFcYffuCcaE+xUa16jFv2WlDBj9iVJd2ILSAP 25AX6JGKx5r9nHA3dukoMnl3WDrrkMbj8acWMNCdjgmuVQ8lwGhsWGFDQyIw0wKCWUNb AKmcWF8cAx2kvWdRSvJGT2JhHRsyoMDT9HC9PsUSZToUqjmtYjuBRbT5bcw4gNHL3wfd jVoQ== X-Gm-Message-State: AOAM531MUewyuI+1YCmMdvRuy0iZu/tLOtOqztSLn63fZuQoFga76ULC R6HizXfTOzOiG/BgFgct9cUxA2BMxvxFmA== X-Received: by 2002:a5d:64a3:0:b0:20a:7931:5b84 with SMTP id m3-20020a5d64a3000000b0020a79315b84mr19822561wrp.407.1650539938191; Thu, 21 Apr 2022 04:18:58 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e4-20020a5d6d04000000b0020a8bbbb72bsm2597694wrq.97.2022.04.21.04.18.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 04:18:57 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/31] hw/arm/exynos4210: Drop int_gic_irq[] from Exynos4210Irq struct Date: Thu, 21 Apr 2022 12:18:26 +0100 Message-Id: <20220421111846.2011565-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220421111846.2011565-1-peter.maydell@linaro.org> References: <20220421111846.2011565-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" The only time we use the int_gic_irq[] array in the Exynos4210Irq struct is in the exynos4210_realize() function: we initialize it with the GPIO inputs of the a9mpcore device, and then a bit later on we connect those to the outputs of the internal combiner. Now that the a9mpcore object is easily accessible as s->a9mpcore we can make the connection directly from one device to the other without going via this array. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220404154658.565020-5-peter.maydell@linaro.org --- include/hw/arm/exynos4210.h | 1 - hw/arm/exynos4210.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/hw/arm/exynos4210.h b/include/hw/arm/exynos4210.h index 215c039b414..923ce987627 100644 --- a/include/hw/arm/exynos4210.h +++ b/include/hw/arm/exynos4210.h @@ -82,7 +82,6 @@ typedef struct Exynos4210Irq { qemu_irq int_combiner_irq[EXYNOS4210_MAX_INT_COMBINER_IN_IRQ]; qemu_irq ext_combiner_irq[EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ]; - qemu_irq int_gic_irq[EXYNOS4210_INT_GIC_NIRQ]; qemu_irq ext_gic_irq[EXYNOS4210_EXT_GIC_NIRQ]; qemu_irq board_irqs[EXYNOS4210_MAX_INT_COMBINER_IN_IRQ]; } Exynos4210Irq; diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index ef4d646eb91..60fc5a2ffe7 100644 --- a/hw/arm/exynos4210.c +++ b/hw/arm/exynos4210.c @@ -252,9 +252,6 @@ static void exynos4210_realize(DeviceState *socdev, Error **errp) sysbus_connect_irq(busdev, n, qdev_get_gpio_in(DEVICE(&s->cpu_irq_orgate[n]), 0)); } - for (n = 0; n < EXYNOS4210_INT_GIC_NIRQ; n++) { - s->irqs.int_gic_irq[n] = qdev_get_gpio_in(DEVICE(&s->a9mpcore), n); - } /* Cache controller */ sysbus_create_simple("l2x0", EXYNOS4210_L2X0_BASE_ADDR, NULL); @@ -281,7 +278,8 @@ static void exynos4210_realize(DeviceState *socdev, Error **errp) busdev = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(busdev, &error_fatal); for (n = 0; n < EXYNOS4210_MAX_INT_COMBINER_OUT_IRQ; n++) { - sysbus_connect_irq(busdev, n, s->irqs.int_gic_irq[n]); + sysbus_connect_irq(busdev, n, + qdev_get_gpio_in(DEVICE(&s->a9mpcore), n)); } exynos4210_combiner_get_gpioin(&s->irqs, dev, 0); sysbus_mmio_map(busdev, 0, EXYNOS4210_INT_COMBINER_BASE_ADDR);