From patchwork Thu Jan 30 18:24:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 860889 Delivered-To: patch@linaro.org Received: by 2002:adf:fb05:0:b0:385:e875:8a9e with SMTP id c5csp329442wrr; Thu, 30 Jan 2025 10:27:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUXyhpJB7xnvqxozGO33LGHqLfMD88XvdaragFuj1M7FEcJx77jiYu+QFau+ny0im2cxXACSw==@linaro.org X-Google-Smtp-Source: AGHT+IEyTvAZ71kCi2NIaujwvfFRtrf5qj7NknzuERzVjkU640Pemv/kSkLxaA3LlVp7tGBsmqTD X-Received: by 2002:a05:620a:bc5:b0:7b1:4a2a:9ae0 with SMTP id af79cd13be357-7c011da6371mr81561785a.9.1738261646321; Thu, 30 Jan 2025 10:27:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738261646; cv=none; d=google.com; s=arc-20240605; b=GjBRaI/qleAJwAeTPgh5WZLq9R2ZVl2tEVI2rs9b4xpx1xM54j8ATUPf5QEh+9wZB4 BMuWWzryxoEoAfZKRmf6rJpvaQdncme+wIO59wnZ4+IwE9qy2BwrNNuyxkSU4KXBMx58 RIS+2N/6+h8nKOwlxfZKOjswuP5vNNLCuFQVNkz5kYpPquhjSUtjprBirfQzye5QN15F w2jUsFTF5kTgvbQTYuyqFA7CLMfCh91xUmPxmjGQMIB1PtWui/cfa8Epz8PBI+ghD5pG DAqPG9dbokZtObdwmEbVRfvYHZMSlpBvRB9shiMF8WeoerhH22N8usIFesiCclqwp2U2 Pptw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:cc:to :from:dkim-signature; bh=DSiba+A4z/eFTmtOIndcY8wTtwzH+kBQH69a+P0DCPY=; fh=SthhPtpqdehNGJNgy7ndeFIc3MS4iW7BmkhpFgvGJVQ=; b=fumZpFZgkUswHypAbi3Juzyq+wly22CIQdP0Wg2qXazDekIuqk1wj1PW/qii+BdHI9 SymK6xR+Sp2DN4j/7XdU8SKbsLpJ9JUysIniNll1qRQilcBwTIuYG0NY4Nl3sT4/LJg8 G/OpvDmApxUUo8/J/+D/73giEdjSzh+8r2oVVWdOkHJKGoXEOK/No2s72/Dnibvu372A nx9YkhmRrMzBE7pM4MH0kTLbXC8h+YH4tqd8YR6VaN3yuMNXFmg+5v4ZKKt7eFx2rbtZ IsjWsTolKazNW8QFv3rNJpQmInOZ97O3iAC7T+zcebNzsPQlVO5ZSbwtNwb2X6HpAYqa rDlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Is6RaXYm; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c00a9040ddsi211672285a.267.2025.01.30.10.27.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Jan 2025 10:27:26 -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=pass header.i=@linaro.org header.s=google header.b=Is6RaXYm; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tdZFq-0004k5-VP; Thu, 30 Jan 2025 13:27:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tdZFk-0004JM-G9 for qemu-devel@nongnu.org; Thu, 30 Jan 2025 13:27:00 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tdZFi-0001Pl-Qu for qemu-devel@nongnu.org; Thu, 30 Jan 2025 13:27:00 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3863703258fso1477683f8f.1 for ; Thu, 30 Jan 2025 10:26:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738261617; x=1738866417; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DSiba+A4z/eFTmtOIndcY8wTtwzH+kBQH69a+P0DCPY=; b=Is6RaXYmMp71qie+yOf7R8BfthnVaaHJRNpYa1p0NjSuYDXlAHNDpNSjZVPfL8pN9W W8PphtdBgZ22aowP+qbgU16Klxvb4Q0hEyheN9wLgO5eq9PVxF1EGvV4SoOziK0kUjLJ LomGEjMmKE/epAGqUtC+0IukDaRb3Fb14Syd/3ghbGOQK0FEH85try86Q+ge5ODmCTzW ZRq1nrL1o5LNi7oHHzp2NyuFmDz0x4iZM529CR6lre12G+/mIOMi72MCOy/9en+9fmTX ONlsuHixJtzI1UkW23egAlw8seiIscKMO58rpCV/DL/nBNzW5r15IjSIhGM/L96HxkfC UG9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738261617; x=1738866417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DSiba+A4z/eFTmtOIndcY8wTtwzH+kBQH69a+P0DCPY=; b=APXC/LH6jU2W33ZDkKkpIl9jLDW58NC4cSVOkzTnmlre1CuYcLuvucltr/ZSdGOZqK 1tfnVWyXJoWd5kRL1M+3EwWAd7L3jGZ7zU4lk+TG/D8BjULCZR9hxe7NjFUj+g+boscc i9ijFdXxZQbww3zIPgC2Ff6KFo1ajCDkT73oNrq5/HcIoxw72zdXUTSoCsvJsBdDeyWv hHYdwrZYuuH4jNBghTjfSmkmUuDQJXZlZheDRJSZs4HZdoGX0ZDbzG6PfSiqUHBsZUpq fWmvy4JDL4Kz3+p+31hruFhJMXNhtV0hDVfRUe1sQogiW/KbCKB42MBAdWqs4QJR58/O Yn+w== X-Gm-Message-State: AOJu0YyW7J0JeRIpZiCHBovfSX+yIcRBoIlYpvS26bzYsUwIQUIePCGw ohS6PxSRYl01aqx8qwEvdo4evhvDdY361oyN409I4nL/+H3jMWei8avOSaap+JGp2AFoqDxwnT3 FM5I= X-Gm-Gg: ASbGncu9ZBOCAJ1It28DI9FXNvMX864WpN+QFMek4OsH7ZL73VX5Zk25cjbviwK705P KzxFTYBMM099AmxgR0E70C8agx+c1KMqYaElZSoKtqX2wbbdq87xPW4wHkr68yXcbvrRtG15Okq DQCMsjLRPb1KbjdqUnYhuf5X/DJPpcFX0gKFrDcIQt1CDMY/qo9H6nI7GHRF+P3xYeI8AUXSeoi 6pz653vAPJraOrs6f/ERmlt9+51BZA/puFokAC+mV/orFPfNTeJl/4xmgis6RrZbQKY7pwu1bMb vi+KBP24sR8ojiJPCHmJt7IM2d3G9evAJXjLChMRxp9kFEjaQcRpnXJkcKkePtVEIg== X-Received: by 2002:a5d:5984:0:b0:385:f64e:f177 with SMTP id ffacd0b85a97d-38c5a971e63mr3222499f8f.11.1738261617141; Thu, 30 Jan 2025 10:26:57 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c5c122539sm2730881f8f.46.2025.01.30.10.26.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Jan 2025 10:26:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Rob Herring , qemu-arm@nongnu.org, Peter Maydell , Alistair Francis , Igor Mitsyanko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 7/8] hw/arm/highbank: Explicit number of GIC external IRQs Date: Thu, 30 Jan 2025 19:24:40 +0100 Message-ID: <20250130182441.40480-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250130182441.40480-1-philmd@linaro.org> References: <20250130182441.40480-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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 autolearn=unavailable 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-bounces+patch=linaro.org@nongnu.org When not specified, Cortex-A9MP configures its GIC with 64 external IRQs, (see commit a32134aad89 "arm:make the number of GIC interrupts configurable"), and Cortex-15MP to 128 (see commit 528622421eb "hw/cpu/a15mpcore: Correct default value for num-irq"). The Caldexa Highbank board however expects a fixed set of 128 interrupts (see the fixed IRQ length when this board was added in commit 2488514cef2 ("arm: SoC model for Calxeda Highbank"). Add the GIC_EXT_IRQS definition (with a comment) to make that explicit. Except explicitly setting a property value to its same implicit value, there is no logical change intended. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/highbank.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index 495704d9726..d59f20b88e0 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -45,7 +45,14 @@ #define MVBAR_ADDR 0x200 #define BOARD_SETUP_ADDR (MVBAR_ADDR + 8 * sizeof(uint32_t)) -#define NIRQ_GIC 160 +/* + * The Cortex-A9MP/A15MP may have anything from 0 to 224 external interrupt + * IRQ lines (with another 32 internal). We default to 128+32, which + * is the number provided by the Cortex-A15MP test chip in the + * Versatile Express A15 development board. + * Other boards may differ and should set this property appropriately. + */ +#define GIC_EXT_IRQS 128 /* Board init. */ @@ -180,7 +187,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id) { DeviceState *dev = NULL; SysBusDevice *busdev; - qemu_irq pic[128]; + qemu_irq pic[GIC_EXT_IRQS]; int n; unsigned int smp_cpus = machine->smp.cpus; qemu_irq cpu_irq[4]; @@ -260,7 +267,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id) break; } qdev_prop_set_uint32(dev, "num-cpu", smp_cpus); - qdev_prop_set_uint32(dev, "num-irq", NIRQ_GIC); + qdev_prop_set_uint32(dev, "num-irq", GIC_EXT_IRQS + GIC_INTERNAL); busdev = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(busdev, &error_fatal); sysbus_mmio_map(busdev, 0, MPCORE_PERIPHBASE); @@ -271,7 +278,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id) sysbus_connect_irq(busdev, n + 3 * smp_cpus, cpu_vfiq[n]); } - for (n = 0; n < 128; n++) { + for (n = 0; n < GIC_EXT_IRQS; n++) { pic[n] = qdev_get_gpio_in(dev, n); }