From patchwork Thu Oct 19 13:16:46 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: 735560 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1511043wro; Thu, 19 Oct 2023 06:18:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSHDvkZny+MQiJHQQw6FC8O8dpUUve+5TecYVXec6N4CCJYD2kkAVnmOhH7u4yTd/+GpsU X-Received: by 2002:a05:6512:1289:b0:507:a229:f53e with SMTP id u9-20020a056512128900b00507a229f53emr1972651lfs.24.1697721529877; Thu, 19 Oct 2023 06:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697721529; cv=none; d=google.com; s=arc-20160816; b=oOKMEXLcMIGWhrVf+/3iQ+LeIRDbUYv8QbcplR2diLqFUZwjSQcviz4HTrd+89KCKK 1gdjxL1UY6RLccmmifpIlw733v9PQUGRQRg3LROhCEqwlZ6KqnANPuW9ZcjhTWQsNLqB TwjOMlrhl4Me7SwSnQyG32s4btfde1r8xONRXc5Jn/nkgRyUdtljbhS8TN4eOxWPxtsu gzHKSIQiry8ZZMveaNt3dZkqSE6aiMxi42pQgXFO/ybt/+gJEsaxEPqaBcs07fl3Ff7T rznOQjBVnXeg4bveqxIs5VTD5c0baqyPvIhMwDiE6g4KJA1SJIFb+R0XtmoHqnNA3kd2 YdTA== 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=rHeFYfdIBBKOOSS9mUZgtP4QchBVe5KtMSS+2FE2cG0=; b=A29A7xmxnk0Fbiin/4JsTMn5Ls9gU466j17xyzbQ9Cz2f4EyNqdmkCD/5mWFWdwpGY 0y818emx4IfsDTGUyy6uYNeGn7L9FBDrl5WGaoVb0On8hLPl2rCubvY839eINNHQ52XZ QaUAUEXZ4u+SjhrOIhU2mXf4bI+LH6B00t2XEIlyJxtOU+MbKrhzCo96AcHXDhoNH/jk Xirg+RErz27NrXTvgrBpOc0sKnYQZERM+LAbYgfQdjIAbFreco041j5dK8Y6dUuNvMsM G/u2EDcHtzjusDzLncJaQ6W2FR48+pMDfY6yUzrjq3PMilx5YCFfCpAyNVs01rHdU7rz nOMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XpjDc0mc; 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 dl10-20020a0560000b8a00b0032ddfd22041si343211wrb.588.2023.10.19.06.18.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 06:18:49 -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=XpjDc0mc; 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 1qtSuM-0000lW-66; Thu, 19 Oct 2023 09:17:50 -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 1qtSuB-0000Nk-4l for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:17:40 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtSu6-0003pV-VF for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:17:38 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-504a7f9204eso10651483e87.3 for ; Thu, 19 Oct 2023 06:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697721452; x=1698326252; 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=XpjDc0mcnutTh+jA7QGjo+csB14uTgnW2FpOTyWMRnA2xuGlbZfhnb9GaNeEc5G6+Y pCz0/WtyuHxQDQz0SFJvZTo+oBAVH0bCayuWqEGmdH1LeZMLV2OaHQGcpFeMeIB0fls4 RF6e0P47JOLrxQ6ZmLxkMYrMhc9U+RSDtdFhtXN/kDpuQiVnCT14rHdTGPD6eU7eu0xk cc9xKzHuRGosPwY1fxF6WqpGrlikJRT1SQP0C4tbelPWIEY97865jp2yZT54/FH92t1N Y5ZBwEYj/elT+TzhdJoZ1+zh5RrioEWboV+OcXoOkuyVK7e7uOqtM6CuoqRH9XxxApcn ZfUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721452; x=1698326252; 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=GmSzIVq31pplNB9mVn049tKzPZEUWm+int3f06iBKyA4nIHOMLBzi7UvRySRy9ILIF +iWeTMIusNWh5cOam6K8GzxXFhYC22K5avW3oXNm1e2gAFHJIT22011bBISiweT0/lSe vuHcj5KmpK5O1W5mkIl7K+q5Ylp4GJqZPi6Fw6FKSvd38A7kiH26nVKXw0+Pdhn/7Jx6 i2yOtkDSy263RAGUc6FLI0un+jWKPqfDnOYg5tc5BAMuewCBv4b3cv9oAwuuNRl7ogIk Ko0Ukrb2SIAaTfuHNiIjaK1BprgFXWuD8q1C+xrrNKc2e0MU0UfZzJTXZltALlNvFos9 C65A== X-Gm-Message-State: AOJu0YxxrgPYdNN0MNvGuxvpMPqIhj8+/e8M9sttkQDsdhtMdd0VtUdB ZRhfp1cg3wnHR5iaB0EMSLkjXzuwCMLkegsS3UNRWQ== X-Received: by 2002:a05:6512:32ac:b0:502:f2a8:d391 with SMTP id q12-20020a05651232ac00b00502f2a8d391mr1450014lfe.45.1697721452136; Thu, 19 Oct 2023 06:17:32 -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 bt6-20020a0564020a4600b0053e3839fc79sm4359878edb.96.2023.10.19.06.17.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 06:17:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , LIU Zhiwei , Nicholas Piggin , qemu-ppc@nongnu.org, David Gibson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Daniel Henrique Barboza , Harsh Prateek Bora , Thomas Huth , =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 6/7] hw/intc/spapr_xive: Move sysbus_init_mmio() calls around Date: Thu, 19 Oct 2023 15:16:46 +0200 Message-ID: <20231019131647.19690-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019131647.19690-1-philmd@linaro.org> References: <20231019131647.19690-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=philmd@linaro.org; helo=mail-lf1-x130.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=ham 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); }