From patchwork Thu Feb 15 17:57:19 2024 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: 772983 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967688wre; Thu, 15 Feb 2024 10:06:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXqXAOLdAhTrJ4zTtCK6ruajs4ClvJvyeNlWXv+FCGkZzu7o5HUlaWUp30W//qfPLr5TXjd9yJqUyuLoVyNTv/n X-Google-Smtp-Source: AGHT+IGuYwJlt/XIk0FvG3k274AKBmkR2Q+QDxXW9hvFYtcDlEiLVoGWPdDRbtRoA2WgplOhEr/K X-Received: by 2002:a05:6808:2f08:b0:3c1:3461:9bcf with SMTP id gu8-20020a0568082f0800b003c134619bcfmr5264228oib.4.1708020373334; Thu, 15 Feb 2024 10:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020373; cv=none; d=google.com; s=arc-20160816; b=ZA5VOb3R6fGV9xlyZvFuFMKlS0twAEAM2fa6rZiDN57L3raF/kLI545ytKs8+jMHiU cVzfzPnVHAAqANKwsaNYLzdfKwQVRNvFDQPr/22JgJ+sze0Bujdfemwc3H4MF36Fsv++ P6nlIXoh0RnGg3KKPFUaEltuUZ+T2rHeXOxO/ZZahAe34EQ+ksud6P3rsY3bA23Fekt7 DoLFqg8TbjhTpKvy3bpcXGogzV6KVmWs/QnI4oWew6c+t/IWbVrqKn7DWnJ/6y+P9Du+ hCwPqtCO1wGX8rp+xIq8MugVq0zBxGZTyrTn4vWOdvUxvgQ3L97kiRpmlQnNBPohtIb3 sxeg== 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:cc:to :from:dkim-signature; bh=MdETzWg8sMtllnYJcpe7xJU6Mgoke/FLcBGSchABTcY=; fh=/5Hu6zwp+Ls/CcPL0R55EtYtOnqbfBUbGGNMrqKF/C0=; b=EcAIbIdCmv88XtLAW9o0lhmQuyeFJM+J61I/I0HTWJGK59r2revPTb+EZweYSpidwt VjdhvOiPg4SD/NLC6j8zlJkGKyEHvUPRO8R6q3U0lGQMukZErORTXRyaW/1m4OkEDqtt p7yhSnTUlTwqB7/AzZ+eZeX7sd5oRLLCFg5F4trnve+kC8PWxUZX/GghRBHP32Lafx7E RfbxlNfPfQyObrPlv1GX3N7uLmPOkcQxio90oAD1tsvRNRdLX7Lii4W6fKokaauxtydI oR+bQRFnAt5WmD4PTXb0h+9PO0wJMQAweuENmimTdG1m7MNRX2di0O6/jDHrHqE+kn6Y SIPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CTLvtPi1; 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 il28-20020a056130601c00b007d911e5400asi423351uab.189.2024.02.15.10.06.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:06: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=pass header.i=@linaro.org header.s=google header.b=CTLvtPi1; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rag2U-0001Ed-Fb; Thu, 15 Feb 2024 13:00:50 -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 1rag2P-0000hA-8k for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:45 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag2N-0002Jx-If for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:44 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a2d7e2e7fe0so220771666b.1 for ; Thu, 15 Feb 2024 10:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020041; x=1708624841; 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=MdETzWg8sMtllnYJcpe7xJU6Mgoke/FLcBGSchABTcY=; b=CTLvtPi1TGn19RPnyO+PoX1Gsm1ioB9587tJsSDWrmc02ysB0ikZKow1xOyTAkGIem Cxdo9LdTFIujscwm57NCaYcOqm8fu1m68/wa5W6qe7WTfaaWCL/FUEhkCXNW8TooPtnr 6LncgT1wkksPYiwXNubkpAQNZkG9bwoyS05yi3HIf5Fygbms/kBXoGtOiLqs95ni5vmh Oxgb2SHoadUczkahuRBuNBpNr+j6Gft57tx1Ag8c/JRhhfvJhAC+Mi1tcAVBr4PfdKJP 1nt3xuwt2S0H0jUWn5JxuwtWqQ1CTxyV1Kj8V6F3ECDGIs+HzJ/0Oj6njscRmDScW3dc HKtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020041; x=1708624841; 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=MdETzWg8sMtllnYJcpe7xJU6Mgoke/FLcBGSchABTcY=; b=OpXIptzGoJbpL+MnKNuBD6YMiIjzQx37NBIZBH9FfZ5DRzUnwlWAk3LLNrTLY1XhhI CWLAW4U6ugUWjvKfhstXQDU2o9k1ij8sVDUq+Pd/EqmF64iQ3z1p8CPDsPIzmY+EsLXz VqhC8MwapuCV1ZjopVXGjrLW3KohipOhb1/MpLP649D40rc3TlNbGFWMS7U48euPDfhB gi6la5skiT0vJ9U1b1wKpU5rkJUqEx4xCfWhtIDhq4b5F8ohB8xniR8lKjd9ArbkGTQO rwkwW0ah8gcTAuHlPbg8r0URBKPhPVBKmpWQiGEWvmnFmbGIU4+c2FNI87uaCuksWkyq dwCA== X-Gm-Message-State: AOJu0YwQ4oud/0muAYka1pQ8xKdgeypyR9urKQDd5lIqDge7kIoDjKLN tRtu4A+2pfO6wwx03RHiYf8uoxgnYIpIB+RZ12pWPz5voVfi0cKjqKpa4VwtQrA4bYYxWeapoAp 6NRg= X-Received: by 2002:a17:907:6d0c:b0:a3d:37a4:809d with SMTP id sa12-20020a1709076d0c00b00a3d37a4809dmr6462232ejc.7.1708020041080; Thu, 15 Feb 2024 10:00:41 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id fj5-20020a1709069c8500b00a3d310a2684sm783255ejc.158.2024.02.15.10.00.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Yoshinori Sato , Richard Henderson , Magnus Damm Subject: [PULL 25/56] hw/sh4/r2d: Realize IDE controller before accessing it Date: Thu, 15 Feb 2024 18:57:19 +0100 Message-ID: <20240215175752.82828-26-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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=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 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-8-philmd@linaro.org> --- hw/sh4/r2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index e9f316a6ce..c73e8f49b8 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -285,9 +285,9 @@ static void r2d_init(MachineState *machine) dinfo = drive_get(IF_IDE, 0, 0); dev = qdev_new("mmio-ide"); busdev = SYS_BUS_DEVICE(dev); - sysbus_connect_irq(busdev, 0, irq[CF_IDE]); qdev_prop_set_uint32(dev, "shift", 1); sysbus_realize_and_unref(busdev, &error_fatal); + sysbus_connect_irq(busdev, 0, irq[CF_IDE]); sysbus_mmio_map(busdev, 0, 0x14001000); sysbus_mmio_map(busdev, 1, 0x1400080c); mmio_ide_init_drives(dev, dinfo, NULL);