From patchwork Thu Oct 19 13:16:40 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: 735555 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1510227wro; Thu, 19 Oct 2023 06:17:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHB8LZWMUn3QwNuHvFXYiRAlLer4+n1bhoDGFnBBCqiqcZg/Hwz63RNWLNM6zUqlgRz7OAm X-Received: by 2002:adf:f2ce:0:b0:32d:baf4:e572 with SMTP id d14-20020adff2ce000000b0032dbaf4e572mr1403994wrp.23.1697721421330; Thu, 19 Oct 2023 06:17:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697721421; cv=none; d=google.com; s=arc-20160816; b=k+oWXwldfzgtAQ9HxIS4MWG9Qmm0y9dNYv81a9C8oir/jZk+9GNzjC8BLUvOeXgXGz bTnpzq7b0Vyd9yCrPih5XWTPKyb/UCJ9ek0CvWSFCUYvI++WZpWU+BSNF8aRLCITgGV2 aN5dG39aBJCwKjWV024O0b6ULPOHtB2VnYrDO2ryPKL/WVVCVcgah0M3j1zsDOU/0va7 Bm69Ew27Nm/geWQIolVGiuuWmDDBUD2Z61Jjgu9Xdn2+dkgH2Ued2HBqA35a5yCO1HDD W24STFsgDyFfW0uaIS+zmo+yy/heZ6K41U0fl7VR96Twj7q1ZXcbs8D4yGhnYmEKkqC4 c3tw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=xmqRe1DsnbyzHbWXs4yRpTSMSbCbrBRxEfRulLBf67k=; fh=rHeFYfdIBBKOOSS9mUZgtP4QchBVe5KtMSS+2FE2cG0=; b=hK41QBJRe7nexGIgkmEyE2GMyya8JXDUIUTxT5UlmZOsJoZV3IcJeOFQvMPh79lf2v uM18HkyMIBDev5bcLFPOJuTtfC/93ZXo+CtpL1HVHG1J7TrxlKWDZNOZqwuwbAqZStYD oyjzCF3oM+JH4rRLD7R+I5wpu8ImdgsHPgbXd75vLxaXMiEomjFmtWgGy6rYYesShyya BYq30Ie1g3QYa0M/rKx4uqaVNdvbJArcyq9DGQeQysXGXpeziM2+JHN8A9D0kwVH8e/F 3CXp1wcqzSJH2yZd0DfN1RBIg0ed7GpPNjDNuFEvQ0Xa9Ie0avHXu135C+dYJ89jOF3c 7BzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XR7dJMZq; 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 l7-20020adfe9c7000000b0032dbafc52a1si2507431wrn.649.2023.10.19.06.17.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 06:17:01 -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=XR7dJMZq; 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 1qtStV-0008Nn-34; Thu, 19 Oct 2023 09:16:57 -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 1qtStT-0008K9-9W for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:16:55 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtStR-0003jW-LC for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:16:55 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9a58dbd5daeso1282770066b.2 for ; Thu, 19 Oct 2023 06:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697721411; x=1698326211; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xmqRe1DsnbyzHbWXs4yRpTSMSbCbrBRxEfRulLBf67k=; b=XR7dJMZqSybe/lJRDCbCD6MxLmZuQn35Z6uo2i/U5SRwdU/V4N3oDgshZGmL48LEHs iFdPkC5YG8zdsaqK3eExf9kA4FVH21Bfi3xd8oY9QyolYNJnx4EJHOSyqGDGn73L9IlF 3Cl+DbgJT5ZcOQKzBxGgKTzFpldaEEwfHeSglqO9yml0WsFfxo25UTQTeFbht4EHEObz IHc3l7g1ADh4phZWidt/aHDNwA05S6F6hTJ1MlI43w3DaP/XuV+RNX5HpOsOG541jfyf 9A4yKgaw9bm/Xq3fqtkie3NGf59n9lr1Y+4ifohsUAFN/+aHpqtGtSBRT0718tslB+eN HOjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721411; x=1698326211; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xmqRe1DsnbyzHbWXs4yRpTSMSbCbrBRxEfRulLBf67k=; b=PAZw4GsghqyH+ZIiZ+CCtIrxZro03t1x8TRSVVk/Ts53qtk6rNjUff8PJ7/BmtdDmz ANhNgHZEtm/UPtExcz/r7J5YNWx7stvPODWJrO1upakUz4CEdaUs0G9x7i7In7wfgj5J E2UUtvPPJzbQREcH+6QmSOphL0FVG+BAeBjeRI1unrVnH5SEKKPIuhxVodkMvrbcyIf8 9tobgxIFOloXCeeuC2+rgKG1pz7xPz2L7eBIVOfVm2A+KSvWs8IFomFOG/hnwmSf2uii UPxtHbA5k0ND8K3SrH3QJZFRAC3z1YV7lZlvDndclw60py0Sd+7AgYnARPYa7xMtok/M LcZg== X-Gm-Message-State: AOJu0Yxx69n4X09RrfMgaM4B4jg6YKjiLVCiEdyhoiB8MyBMeaJrLb/n MsO89XMX2/Jb3/VeKjI4DSQ6zHm/WPU8x6jVz8nraQ== X-Received: by 2002:a17:907:60d2:b0:9b7:37de:6009 with SMTP id hv18-20020a17090760d200b009b737de6009mr1728189ejc.3.1697721411415; Thu, 19 Oct 2023 06:16:51 -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 o16-20020a1709061d5000b009b2f2451381sm3519296ejh.182.2023.10.19.06.16.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 06:16:50 -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 0/7] hw/ppc: SysBus simplifications Date: Thu, 19 Oct 2023 15:16:40 +0200 Message-ID: <20231019131647.19690-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.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 Hi, There is no point in exposing an internal MMIO region via SysBus and directly mapping it in the very same device. This series replaces a sequence of: - sysbus_init_mmio() - sysbus_mmio_map() by a single call to memory_region_add_subregion(). Since v2: - Mention coccinelle script in patch descriptions Since v1: - New "Realize SPAPR_VIO_BRIDGE device before accessing it" patch - Added R-b tags Philippe Mathieu-Daudé (7): hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before accessing it hw/ppc/pnv_xscom: Rename pnv_xscom_realize(Error **) -> pnv_xscom_init() hw/ppc/pnv_xscom: Move sysbus_mmio_map() call within pnv_xscom_init() hw/ppc/pnv_xscom: Do not use SysBus API to map local MMIO region hw/ppc/pnv: Do not use SysBus API to map local MMIO region hw/intc/spapr_xive: Move sysbus_init_mmio() calls around hw/intc/spapr_xive: Do not use SysBus API to map local MMIO region include/hw/ppc/pnv_xscom.h | 2 +- hw/intc/spapr_xive.c | 12 ++++++------ hw/ppc/pnv.c | 26 +++++--------------------- hw/ppc/pnv_xscom.c | 5 ++--- hw/ppc/spapr_vio.c | 3 ++- 5 files changed, 16 insertions(+), 32 deletions(-) Reviewed-by: Cédric Le Goater