From patchwork Thu Oct 19 13:13:04 2023 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: 735548 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1508690wro; Thu, 19 Oct 2023 06:14:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeWx4lRFwj8CtbaBxdpgk9FSJdy4/UXeqJh2r/5XiGq9ZDiOU8ddkPsAgffm4PXMebqIyS X-Received: by 2002:a05:600c:1907:b0:406:84cb:b014 with SMTP id j7-20020a05600c190700b0040684cbb014mr1783638wmq.22.1697721259376; Thu, 19 Oct 2023 06:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697721259; cv=none; d=google.com; s=arc-20160816; b=t4q8hKFQUJzo+vtvETpIMtVAzPzs+raeUvQ9q8c6jQvzA0dGORuNMRo/8C+Xo7lHw/ QBx3+rsu9c0JJUEfNnC7dRGfuEBdcnoGCs4Tzdy2s+RMlgNMt4KR+DAaJ/l4r79hekDi rPJQcWoEf4gJ3FhkA0ZO8CEZO3mEx5ryIpS3j80SBojgNz7MgzgaNs6BRzaJCvHmnYRF Te4gdpghQXhS925DlkpDjpyla30xo/SoEr12K6ABvKEfe/kEyH3Wqw0mTHq6a33ObmW2 FitF4uZ+MAxl4zXQXtTj0C83HgSYqOxH3TvD6w2NfDFUBmyP1evFRc3SDf0IW4DJkMmN DVxQ== 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=MvrIYZ1SHVtY4jy7jskbyHF3SwQhysiF+69uIEKUTD0=; fh=pKSa3NIqn0GzXJAy/2EwD+riYoiBTvQWIw5svo/o4rg=; b=h7vkwoQLBFJ6db5MT5FnQFcmOyx3Td6kQyDy8GQBerSAbCDKBqfKxLrfRoVAonI0JE oM5wQCAZmo1hEQEoRChGyvSd9Utqj51bTDjTCYB5KSmtecZUJU5l/ZvT5QgTtz9lwQe7 zsTcwkXN8yD/biW5+Okhl5XBKNs7n49Y9VepsAmaqmUmfBvyFX4CkouA56dFwo+qKrRp UJkkaFM+Rmy5LH4l6CM9bf80tz45KtAhqERd2D4f0oh2pRo+IUYHSuPPUBqli1Zq/fjV g1VeFyqqKpSU/qmF3ue85fcBAbXkld8uvGmKEOl9rPT4yatqPmGawtgQkLk3CEVyBtgM gG1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j1IZgfB0; 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 15-20020a05600c020f00b003fe9eb22077si2426735wmi.110.2023.10.19.06.14.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 06:14:19 -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=j1IZgfB0; 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 1qtSqi-0008DW-KE; Thu, 19 Oct 2023 09:14:06 -0400 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 1qtSqU-0007pT-6F for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:13:52 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtSqS-0002Z8-7z for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:13:49 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2c5071165d5so2235741fa.0 for ; Thu, 19 Oct 2023 06:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697721225; x=1698326025; 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=MvrIYZ1SHVtY4jy7jskbyHF3SwQhysiF+69uIEKUTD0=; b=j1IZgfB0cbnIrIT4fOqb20s9nnxwsH2A6l8DkzY1txv6/lP8uuY7rLGaJnhcxPWh4z gwPZbb0KgCVRFAPqgVipcGW6NDxRMbhyFWa5o14+B4JLyldSgnsqILblsi1mi3GgKJ7O Rz3mOOQF3uckjhwgcLZCUmtXk1sz0qL/XwGQl+Gh2j9jNbhL7aW3yl+Noy4Ql8FxhhiH NpgewVDg6xJd0IWj6upseLThJY72CzbU8JRkw/SSGRUh9aROCodWnGa9dndtXENbW32O 6EBhWNr7klbaUonjsBAbd0IvxWFWgIkJdmHWuVGJfoPpcj11/H66Rc2sDwGk29lAwmPu jmYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721225; x=1698326025; 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=MvrIYZ1SHVtY4jy7jskbyHF3SwQhysiF+69uIEKUTD0=; b=N8ISWRTYEwMOOfa6NKULwwD57GrSyw4j9xxLGcaBCn36grVCeLuHSbE3xi58PkqbIj btrUVus0lYayH1iwYV1glgR2z5Hb81CY9p4RBSOqVz/5fkU6VPMUOXAJubyQ0N7f4BZg nTsx5+TVJHOoj76b3fuRgLPvIPrmFMVj2AkSwYCfpRpiZLf7xSrlwkR42p6GM8CJDOmO B6+S2EAbae0Xj8kQORxLRl0SgwpiyxNp1I+edVFz0nQRpBJ/t79QurJE8v+5l6Ql3bU4 ydKCRoCRT0EG3qIE7geutMqzNRaVqX5NPvbOHjCCLA13M76BFkpEyd50+Ds1NJjlFx+V DZ5g== X-Gm-Message-State: AOJu0YyFGoCTRuHp94SCmyI4yNAfKcI+J6y53ngIw8N9enwuHobr+o24 QN9FJYBlMBVfDZU2eN43cByQ738yrjUubXOzuzydqA== X-Received: by 2002:a2e:b601:0:b0:2c5:1a89:41c0 with SMTP id r1-20020a2eb601000000b002c51a8941c0mr1337177ljn.23.1697721225070; Thu, 19 Oct 2023 06:13:45 -0700 (PDT) Received: from m1x-phil.lan (176-131-216-177.abo.bbox.fr. [176.131.216.177]) by smtp.gmail.com with ESMTPSA id f7-20020a05600c4e8700b00403b63e87f2sm4506590wmq.32.2023.10.19.06.13.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 06:13:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Richard Henderson , =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= , Harsh Prateek Bora , David Gibson , Nicholas Piggin , =?utf-8?q?C=C3=A9dric_Le_Goater?= , LIU Zhiwei , Daniel Henrique Barboza , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 6/7] hw/intc/spapr_xive: Move sysbus_init_mmio() calls around Date: Thu, 19 Oct 2023 15:13:04 +0200 Message-ID: <20231019131305.19157-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019131305.19157-1-philmd@linaro.org> References: <20231019131305.19157-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=philmd@linaro.org; helo=mail-lj1-x22a.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 In order to make the next commit trivial, move sysbus_init_mmio() calls just before the corresponding sysbus_mmio_map() calls. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: LIU Zhiwei --- hw/intc/spapr_xive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 7f701d414b..12057ffe5b 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -316,7 +316,6 @@ static void spapr_xive_realize(DeviceState *dev, Error **errp) if (!qdev_realize(DEVICE(xsrc), NULL, errp)) { return; } - sysbus_init_mmio(SYS_BUS_DEVICE(xive), &xsrc->esb_mmio); /* * Initialize the END ESB source @@ -328,7 +327,6 @@ static void spapr_xive_realize(DeviceState *dev, Error **errp) if (!qdev_realize(DEVICE(end_xsrc), NULL, errp)) { return; } - sysbus_init_mmio(SYS_BUS_DEVICE(xive), &end_xsrc->esb_mmio); /* Set the mapping address of the END ESB pages after the source ESBs */ xive->end_base = xive->vc_base + xive_source_esb_len(xsrc); @@ -347,14 +345,16 @@ static void spapr_xive_realize(DeviceState *dev, Error **errp) /* TIMA initialization */ memory_region_init_io(&xive->tm_mmio, OBJECT(xive), &spapr_xive_tm_ops, xive, "xive.tima", 4ull << TM_SHIFT); - sysbus_init_mmio(SYS_BUS_DEVICE(xive), &xive->tm_mmio); /* * Map all regions. These will be enabled or disabled at reset and * can also be overridden by KVM memory regions if active */ + sysbus_init_mmio(SYS_BUS_DEVICE(xive), &xsrc->esb_mmio); sysbus_mmio_map(SYS_BUS_DEVICE(xive), 0, xive->vc_base); + sysbus_init_mmio(SYS_BUS_DEVICE(xive), &end_xsrc->esb_mmio); sysbus_mmio_map(SYS_BUS_DEVICE(xive), 1, xive->end_base); + sysbus_init_mmio(SYS_BUS_DEVICE(xive), &xive->tm_mmio); sysbus_mmio_map(SYS_BUS_DEVICE(xive), 2, xive->tm_base); }