From nobody Wed Nov 27 16:53:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697725033; cv=none; d=zohomail.com; s=zohoarc; b=Au0wDPme9oAm7vaoZhElhs5iHMdR3PxBwZ8vSTJfxIVDYeSGns2Pof5ikitWHnVWC8Xf+gg2LJuyAey7XOadOXOeb+NwYjzF9yPGFCxER3mXFK9FJSrFL8EcYocEvGth3EC2UERsTehSjLPRN5wQUQJlTBpx/Cdql1PcQNE0/Lo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697725033; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=13jcJG8DaQUc9qe6s2Cd1zPqXFNLL5Z03Tjf5LEdf1E=; b=XZA0/Qs/wbQ9jXFO215uqszNjFy2BgNujBPJX7JWyTDmwYRW2FF22D7eQnWSB4sIUZo60uufJQCSfqj25XcVvOGyT5QYak/CvowFU1VLkzGcODRcij5GZhCNopf6X01SM0xYMomXD+n6S+iusQMlyQWSyhsZwqhfaeR4Me+7Tgc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697725033528334.21428253013323; Thu, 19 Oct 2023 07:17:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtSrE-0001Fw-VE; Thu, 19 Oct 2023 09:14:37 -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 1qtSqO-0007hq-RW for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:13:51 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtSqH-0002UW-ON for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:13:41 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40838915cecso18255755e9.2 for ; Thu, 19 Oct 2023 06:13:34 -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 f19-20020adfb613000000b003232380ffd7sm4431399wre.102.2023.10.19.06.13.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 06:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697721213; x=1698326013; 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=13jcJG8DaQUc9qe6s2Cd1zPqXFNLL5Z03Tjf5LEdf1E=; b=C32TxjN1j6CbvNORGeMxSIoO9Md93gPtxhCcAPz4M2QWKDhJJ8LcOdSK+cjtD7wOC6 M6jRaZQUgGzhU4HcvvSF1tQl9szimmWr4yUToMZ0JnmdwK2B0Cwml6wzQ7mtedJDUZ6Z Dhy8qjW8sgmJj9tUmtWVeBsCHM2G7QZfjBvxmnrAA9RI4Bt6k1jnD8OKW8JnL67Ks/M8 PpiGj4JBA7XsHqdhg8KtGh0a3eUAq4vab8jkqB0K1I/5XXuJUagLaiP92sBsiUtJClRN 7K/zHOezhfcnsozymJbi31lNHVyVtndsRNgF99JBBSRJmqw1M5/ONDNMdMNJP6Axn9vM vnvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721213; x=1698326013; 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=13jcJG8DaQUc9qe6s2Cd1zPqXFNLL5Z03Tjf5LEdf1E=; b=AVHwLCvVk22bVEun6KIMnDPukbWP54MNqefwGFOarn43R+aDseUW+3nKtjyRNS2OZc OLSoULhhFoPhAKdjJljYPIaOU2Npi+MDrznB48yIVS6qsRIzXk84Nhf+5+v3cWfpj3kw 3ZbxDpeOgN9au4fy2v7C5hU/EUbY8mslfZiwXGwID9Oh6FdJ3lUUZxP/VT9RXohj2/KU QJO0dLVyDz0O9/+rAXtuQZOe6ivg7Uxl/sN4L6Hcck2CVqGVrCCm/8DKQc+cS4h/25Wb 0RSlOqNxF8oTXkymPULDtYIIMKB2YelsZrRAZXtPSZLlm1OGPwihXf3da29sfNTZvx3V 2VqQ== X-Gm-Message-State: AOJu0Yx88DKf2c+SN7EuVYkVrEZuNj0C9+zYZq9HwseE5rcD+xgfpcT9 vEZFf/aKdi8yQO5aoCtg0vyBSceGbmXmZ5QINppKsg== X-Google-Smtp-Source: AGHT+IG9eVYMo9cIlVp8dtuBn5PwWJ70ufsiBi9q+ILLxm0wY1MvD+DqKgWH1nR32OHgoEjQPoYAyw== X-Received: by 2002:a05:6000:12d1:b0:32d:a2c3:19f3 with SMTP id l17-20020a05600012d100b0032da2c319f3mr1297196wrx.41.1697721212999; Thu, 19 Oct 2023 06:13:32 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Richard Henderson , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= , Harsh Prateek Bora , David Gibson , Nicholas Piggin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , LIU Zhiwei , Daniel Henrique Barboza , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 4/7] hw/ppc/pnv_xscom: Do not use SysBus API to map local MMIO region Date: Thu, 19 Oct 2023 15:13:02 +0200 Message-ID: <20231019131305.19157-5-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697725034993100001 There is no point in exposing an internal MMIO region via SysBus and directly mapping it in the very same device. Just map it without using the SysBus API. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: LIU Zhiwei --- hw/ppc/pnv_xscom.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index cf892c9fe8..805b1d0c87 100644 --- a/hw/ppc/pnv_xscom.c +++ b/hw/ppc/pnv_xscom.c @@ -223,14 +223,12 @@ const MemoryRegionOps pnv_xscom_ops =3D { =20 void pnv_xscom_init(PnvChip *chip, uint64_t size, hwaddr addr) { - SysBusDevice *sbd =3D SYS_BUS_DEVICE(chip); char *name; =20 name =3D g_strdup_printf("xscom-%x", chip->chip_id); memory_region_init_io(&chip->xscom_mmio, OBJECT(chip), &pnv_xscom_ops, chip, name, size); - sysbus_init_mmio(sbd, &chip->xscom_mmio); - sysbus_mmio_map(sbd, 0, addr); + memory_region_add_subregion(get_system_memory(), addr, &chip->xscom_mm= io); =20 memory_region_init(&chip->xscom, OBJECT(chip), name, size); address_space_init(&chip->xscom_as, &chip->xscom, name); --=20 2.41.0