From patchwork Tue Feb 13 13:03:36 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: 772311 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp242802wre; Tue, 13 Feb 2024 05:07:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXtgMSqRRby2KCGetSpGA0DVf2n2aV8WTD6Hs79/xAp3e36aQ1E6/NIDSHAV5d/zBaqAYekDi21MhblbhLTzZzs X-Google-Smtp-Source: AGHT+IFw7aAxT4YFMAf/jxbltzy5rI4sl50n7IgmRgekuE2m+5ZB2od9pEaMwP/wnXGaR1CVf8Ek X-Received: by 2002:a05:6871:1cd:b0:219:2d1a:90ab with SMTP id q13-20020a05687101cd00b002192d1a90abmr9445465oad.59.1707829647894; Tue, 13 Feb 2024 05:07:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707829647; cv=none; d=google.com; s=arc-20160816; b=heT4Hct9NUehjSooE51HPpNy3ZTYULZz3XJoBT9ou64IikvjrwlY19xMgWQbU+Jcxr lk6Tp/pUt8GBNfcvZHKiV/N+0uLB4CZ5hxv6WGtcCZC6kw1xSnbjTxTGtuMR6u8RjqUn r3ZQX5D1ptMapyFHa9lmM/sbNWnV7MYACLx4Yxlms4uWDi4fgem5sVExppORXPnxbCav CdWdYuRZs/w1xzuizF0ZQqbmbQw63ErTPGkiG6BkhSMPfEiAJ80Bl4tJQhkn1bupf3p8 wP0SJkYk/VFNy8fMDyY9pzhwV0PlD9Dby1aolcTrQ3teYs+3otQb1u8Hnyxn/S/Kaq8o YRWA== 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=XdX06BDUj7IHudTjK3BG6Cg14kAdsMYjZQRXHg7kqgI=; fh=cHFrOiRxhqmXvvXNqY78z5pSCD8F6gMwE3yuE1EJkQ4=; b=jDb5AJEiUM+2ZBXOWlq3V0tcfVNc5bRruInHQpv0LriRZVjIr9nJrYsL3XeiSjykIz 5H9Mzp3GrAi0kkp3jI2+8NvKeND8tQlTM+Zxxn/Q2HIs3Tstyy0QieM/SApIueWOj8ug nQ88bKLFG8w4szZT4ldye5NmZmPji6ZEUahKXq9jl62vg4GYDriZWSp707kR2pGDnc0S G8hVe2CV/RUBNsThFZcy8GSxPpE7fMaoxlTPWfFzvGNT38BX77So+iCwNLtw/0sE7bxd E09g0Q0DG0QyXHvag3JteMSTBynJgIr7Q+qDOpRq0rxh4mFH+Yr7L8AYmDj5N87ubt58 W8pA==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fZ2tdunO; 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 X-Forwarded-Encrypted: i=1; AJvYcCWwJSfEnBhDBA3RvT5aIi1hvHTQOK0p2NJZ06sgbao7a9+Io+RobRO3CdbgJua1f6GILhbUDpp0zfIXDAPfZqjd Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 99-20020a9f206c000000b007d305cc1cc3si1249894uam.207.2024.02.13.05.07.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2024 05:07:27 -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=fZ2tdunO; 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 1rZsUP-0004Jg-HT; Tue, 13 Feb 2024 08:06:22 -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 1rZsSh-00023h-U4 for qemu-devel@nongnu.org; Tue, 13 Feb 2024 08:04:39 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZsSf-00068I-P5 for qemu-devel@nongnu.org; Tue, 13 Feb 2024 08:04:35 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-411d231ea71so752435e9.1 for ; Tue, 13 Feb 2024 05:04:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707829472; x=1708434272; 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=XdX06BDUj7IHudTjK3BG6Cg14kAdsMYjZQRXHg7kqgI=; b=fZ2tdunO+hrdAHlDFES1xg7rcLOJX7jG9vCv3EDmmImiz9xK9HQ04muXiks1DD2TRB qlLT40mLaU6sxI740dpnWHwMowRr7EPEIowjljWj/05xQ1Vhg0C/QtuT5AxfZADi0vol 4bI8bx1B/8xDNYklTrpLzgcEms9ViIaSxkvmchhnyBp6Y2iN0RSc385SEi+vSzePljTv r9vEL1NlEjA8VDOS0k/VhB8U55TgOL3wwIsxY+AqMG2mA1JUSw+v4+DHt0TTqNy9TFYg 3yYZjIrz2+MHti1j4hz1jQTV9cZZODr8copSUzomUSdGW3pqnhHT0ogCF+16zAdJIoTZ HBEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707829472; x=1708434272; 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=XdX06BDUj7IHudTjK3BG6Cg14kAdsMYjZQRXHg7kqgI=; b=jDRnZuSovZCZEuNheisEykJM+Ob6h8B0RUrNs35phkKkMdt2vFe6sF/2DiYRiwO2nD 9jNzGQGqcpyVwsB3lDcyzlEkV4SNsiz7oH9w4lwZVfdKN9ndK7eEi7DQoUWIaC/ys45q 41/dW3V3AWShVtfaKyi+X5z7OifnlHkTO8Wu3F5yplIxpt8ptEjgJNLdkE8Mj1unYbKJ zHFnBGg8VbCTKMp/6zmjh3yW8xb6TmWc6SZ+Kv/MA5OeX1tTik/m/EoW5owOaXTwxtMV 9wsgkbk3VJQOBMzkVFTxY2s50iLvcnpW5nAMUFzsLiODY2YppboNZTM8wz90CL7TEoFd Nbnw== X-Gm-Message-State: AOJu0YyKuU/Ai3cai0+fDz4/yoGOtwKIuxjBPnzkNDFtVhvxqZInJK9h 53HQZB60w7OTMqjdUxuBwebnurulvxe0NGSSxCzadxg0tzKKiVT8Nmg+iPNgyY8nXykDF/Qzojc + X-Received: by 2002:a05:600c:5248:b0:40e:f2d6:9dc with SMTP id fc8-20020a05600c524800b0040ef2d609dcmr8400422wmb.33.1707829472135; Tue, 13 Feb 2024 05:04:32 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUmsggy1yIJOq36rY3HLkR7YiiALQSWYffVtLb3oeQTgBWNPByqA//REb0fwW0unXcGXBgO1gZ4uRQSpTlBmdmKwgvP7++Ba+zk2ICnbKNtFOvn/afpI5lzkL8/+Fmm/s5uadVYeujphWYJmC5gBHAfzDc/28HnVNtjz3gSk8DFp6X8U1OIH/DAaLTCYJv0imztbNK+9vO2CNW342PmVrlI0w/Pwb86ptWP6fy2s0OAnmIeKAzT6w8IxN/yyKgqhYXVVn1CEedN5thOZh7aBo2SvQtjvNIv4So2uacO5D1SkQ2rEfFBNaNHDeG0o1aQIjAilXaJrvwYeFnUdnRztwmshDZ5osB03ZgqXKpQOrFmv2ZQY6M3iRrCSLbvresstQt17desvwW/i2S+T+yibG7RJ2F5Z9Jcgs5ts1aP1LSgEAyr9Q== Received: from m1x-phil.lan ([176.176.128.243]) by smtp.gmail.com with ESMTPSA id o16-20020adfead0000000b0033b4ef142edsm9495466wrn.110.2024.02.13.05.04.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Feb 2024 05:04:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Bernhard Beschow , Paolo Bonzini , Mark Cave-Ayland , Richard Henderson , BALATON Zoltan , "Michael S. Tsirkin" , qemu-block@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell , Yoshinori Sato , Magnus Damm Subject: [PATCH v4 07/12] hw/sh4/r2d: Realize IDE controller before accessing it Date: Tue, 13 Feb 2024 14:03:36 +0100 Message-ID: <20240213130341.1793-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240213130341.1793-1-philmd@linaro.org> References: <20240213130341.1793-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 --- 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);