From patchwork Thu Feb 15 17:57:17 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: 772965 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966184wre; Thu, 15 Feb 2024 10:03:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUjTYBBe9IjQPCGjMX76ojEo11tYOj5XBf2Hv+yCJ3HD5/j4uUeRuj7ce1r8RZIzoRglL1CeElvg27snd9dp43R X-Google-Smtp-Source: AGHT+IEQEa7N+0OUkBwq7cnAacSM93cdt0YEds0j4QUlBlnDJeqYGnUt+ImU9ZPUpKxaMI+ZGvaf X-Received: by 2002:a05:620a:572:b0:785:c7e6:3be5 with SMTP id p18-20020a05620a057200b00785c7e63be5mr2406756qkp.53.1708020236270; Thu, 15 Feb 2024 10:03:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020236; cv=none; d=google.com; s=arc-20160816; b=TUjXk8DbS8ElXPhSiDMpNcOQACPmPAKotfZS2AtBamfiIhbj0biqSFrdqvUcnI9OB4 duvNT1vceZtev7+p41AvTd0yGfCdgix7xXemQUjvrjHUYpI9yRzZN3ckaLbNSQed7cgI qLY9p/7rEuDqNOO3yzjFfhgRO1FcWyE+sQ0C5R76qyRuckDGbMTuaC11OYVmIiwzHxuP y4+N+nrA0aa12kMdWXsY/8aRdHBf5h0M4u8MD36SDqWuwRPLM7iIaI0xoCjw6mO0hBjk X2Thcn4APtLeWgbO70nNT/mFNgF3/sqK4ADa/AYUb8kuUT93s/8hp1GZhR+tvLkRS2+G vPZQ== 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=xZUd6/1kYGen5lB4knuCMVyKmswwesM/uAr4O9mJTQg=; fh=uhqcddVP/QtwGuF7loBHzLylvHL3XamZwGBLUgsC7tI=; b=D4eQ3reY1nr++MzmgAaxm4qZsNSFkeckdojIbBCcYMNGYmo0V1V98+XWJhTSVUf0zP R6hKiiOlDNKy47NG/GFXXNJbElX9iW4oRyu97V3KtJ/+2ZZdAYDoqSlFnlHVjvrZSGPO C01BK9S1b0rJetPgvz4sYMf9aMGKhcVyl2eo8DpVBWTX0lkm91pg68yMw3zD8OYymqUD L83KCN2GpeVmMS4gPVITUyRl2uzbLsTUI3IKXHaw/xbuGhwZfURTREIc9Od9WR5LY2Lj /HhjvxUJf12o6VA7Tumt/7qqBuIigaAjvrK2LR3j9jazWonfZW+cAMIOCXQoaf723FRx 2fUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SA8G65Y5; 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 d6-20020a67ec06000000b0046b34ae6114si324865vso.795.2024.02.15.10.03.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:03:55 -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=SA8G65Y5; 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 1rag2W-0001Xh-GK; Thu, 15 Feb 2024 13:00:52 -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 1rag2N-0000NS-Fq for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:43 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag28-0002GS-9K for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:42 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-55ee686b5d5so1531361a12.0 for ; Thu, 15 Feb 2024 10:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020026; x=1708624826; 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=xZUd6/1kYGen5lB4knuCMVyKmswwesM/uAr4O9mJTQg=; b=SA8G65Y56wRAXmO8A3ICXug6xEnHY33sCFEVViJl38c0ble3TU4JxypZw23y6zocIX 4WIttb148q42pR/nJ+J4Vmi11lLEqdDU++ZypVvkpMdb0IC6qWrRXNALRnJOsTjLVrUH sMxTDw0XPkTYOOGt9KHlhrxf+jgZQk15wqZ5ojyuf3x0v39EzlL7fqkPv2Lps8FABWRS 1slz8/7wxgZXXf0fw/qSUe+0q85d9Y5NDM8TnA+r9BzXRElOcsKgRLrJ0UYO7rmm6Kwj YYN3vz0xpSEykW2rc77yTGiiBuEFgbARdNHP5Mc9M15yC/7wWmDMFWf9PifAmfAegSmo hb+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020026; x=1708624826; 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=xZUd6/1kYGen5lB4knuCMVyKmswwesM/uAr4O9mJTQg=; b=kL/JYaC2CScRyercQZsYf8GMQlC7Rtna2YjsQvxCVPFM7bRjJMpFAjttdo8gaJoEZv y6to4ny5+ZLc3pWCZ3Q1bfCiRyeOmLaiEWZNTvJkOvuoGLd3hZbLYS1mh+Ftv+O2py65 uEbdT4BeM10HLPFfEWrOe7fVH3/vJkXz6ZtBsQ1sXrKVHmI+FuWQ+K1mrtUZ1F1qB8Fj IlQE7PPYF65u0Chhb80sEdIqPdzJoJ6lFpvTWRwK4zR1ApiKguHM7jYv6xvptMz1Jfxy WlGVt6DiChjPgMdoz52dMsdoor3ScW8wx68QWVRrnEFIvg5Bsiaz7ctOPCZVhq7zafXE 7P5g== X-Gm-Message-State: AOJu0YyumqnziS/iEP4PbIJTUrive/F5MBVHmhnnMloF65uztgEVLTW2 esYXHE8TAvpkiuJUotHuBCaj+eR17kJVEndvSAdhyfEtsJWO9bD5TkOecd22Q4ObePEOR04PrLt 4L8k= X-Received: by 2002:a17:906:eb4a:b0:a3d:302e:268 with SMTP id mc10-20020a170906eb4a00b00a3d302e0268mr2001781ejb.45.1708020026223; Thu, 15 Feb 2024 10:00:26 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id t21-20020a1709060c5500b00a3d29f0afeasm782742ejf.2.2024.02.15.10.00.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:25 -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 , Mark Cave-Ayland , Richard Henderson , =?utf-8?q?Herv=C3=A9_Pous?= =?utf-8?q?sineau?= Subject: [PULL 23/56] hw/ppc/prep: Realize ISA bridge before accessing it Date: Thu, 15 Feb 2024 18:57:17 +0100 Message-ID: <20240215175752.82828-24-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::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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, 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: Mark Cave-Ayland Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-6-philmd@linaro.org> --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 1a6cd05c61..4eb5477069 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -278,9 +278,9 @@ static void ibm_40p_init(MachineState *machine) /* PCI -> ISA bridge */ i82378_dev = DEVICE(pci_new(PCI_DEVFN(11, 0), "i82378")); + qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); qdev_connect_gpio_out(i82378_dev, 0, qdev_get_gpio_in(DEVICE(cpu), PPC6xx_INPUT_INT)); - qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(i82378_dev, 15)); isa_bus = ISA_BUS(qdev_get_child_bus(i82378_dev, "isa.0"));