From patchwork Thu Oct 19 13:12:58 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: 1851676 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ieurfPqS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB7TZ37T3z20Zj for ; Fri, 20 Oct 2023 00:14:10 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtSqY-0007nA-C0; Thu, 19 Oct 2023 09:13:55 -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 1qtSpt-0007Dw-SC for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:13:19 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtSpr-0002RL-17 for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:13:13 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40839652b97so18075615e9.3 for ; Thu, 19 Oct 2023 06:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697721189; x=1698325989; 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=4X88wOUQa6zr6g57q8/o5tsEiz+eiENj+Rc3sNCEBhE=; b=ieurfPqSPhbeU3IyU695RebG5w6isZgt/UTfLoYS5adu5rFIJLbGaqg/HqvQor7MrA c9nb1nOssdZjVY+Y5Ig25eVmZmmSLg7oL58qF5nVE24r/kpQZVg9/fUmJrlIMEV69UTJ 7ollaqiNqDv+bPYt3L3GN/TrR0t9Np8wZis0vCCGp95wURO0rfmcQ7++r9LPyMxQZD+w Ew5NhKYqZGjffImtM4bPHzFvcnCcbNvgQIUljUzhhCTNtVSGSUADNjUPJxh42fR01A9E 5WikemkVE20eknXIQJIi5TxEQQKkTnYNGbNsOnj0dLUduD9NNN//HSoBWhnxOMWIKfS1 h30g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721189; x=1698325989; 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=4X88wOUQa6zr6g57q8/o5tsEiz+eiENj+Rc3sNCEBhE=; b=j+l5rlKr0NhI3oH3lPMfo/r//rtIbQ2YLZJiyXCmrofmz4hMTph9da1Tdw1aykcawH n49Zy5eqBLGczkCWbA2yHPVLRGIvYpB38pkV8y1KJgyFlzfdgHsLuvOlRD4Z9NNpMRbY xzSk1qemQ7ZCr5TFs7mnfLgejV06f8fNeMQdHQ48CUopPUiIE2FG/WjxoWhcyw1e0bMg jnfRDNj4EmomUNzXZn8tHaijNAbhG+2l+uABcgZx5RY46r7bSBEBi9q1OjMU6BFgBpxu YMS5xdhbrLXvJ1rtJ4goFugXVzfSWQf4nc474+nYilyiku+jnoNy2AzTX4hAZhIMtEWV Qh5g== X-Gm-Message-State: AOJu0Yw7c4mYeEy5Boa5QeaxRQ6N1HarkmzcX68gaSj6fVHRRNdkY+tX jIJjfxWBRkMBc9S0utuAaTbbUzf2KmIuxva6OILceg== X-Google-Smtp-Source: AGHT+IG44x5FteodFPQp+nUpsm5JrRtMGgUWoBgj5d4HEaodCALiECrtFdkdrQZqHmT4A/BCrJAv6Q== X-Received: by 2002:a05:600c:3309:b0:401:b652:b6cf with SMTP id q9-20020a05600c330900b00401b652b6cfmr1725138wmp.13.1697721189006; Thu, 19 Oct 2023 06:13:09 -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 i6-20020adfe486000000b0032415213a6fsm4444972wrm.87.2023.10.19.06.13.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 06:13:08 -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 0/7] hw/ppc: SysBus simplifications Date: Thu, 19 Oct 2023 15:12:58 +0200 Message-ID: <20231019131305.19157-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::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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(-)