From patchwork Wed Oct 18 13:30:53 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: 735052 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp993895wro; Wed, 18 Oct 2023 06:31:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOp0lR+LzsFU7Ff5u1plIAQ8cU2aHBw0gQyGG6kNJyKlxxH5Oixb8fb51Q94erTsevd+vx X-Received: by 2002:a05:6102:3d95:b0:457:cd1d:b877 with SMTP id h21-20020a0561023d9500b00457cd1db877mr3385345vsv.4.1697635891991; Wed, 18 Oct 2023 06:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697635891; cv=none; d=google.com; s=arc-20160816; b=ySMBWP5hzBkJ/nWCJoTedOnQIIor4qvspuZHJNnjM4pW8jsk1tLUPyu8pJUMcfUFl6 /hHlTh0kJ+XMhMS3RfDlXdaMNpfRdEMSO9GVmWetedLTA7Z+QMW1uJ/jDjnkWDSF7yX8 xwiIhA6jV6adUTWtki6znNhfA9Fgw7quCuGW/CGhwMLgMfPxLGpkmjkTm4lzhnlxbCGx JKnN1ncPYcp412MDfK9zQLVH3ubTAR/g8epcH7IXHR6mqZXvEvzYaXEKC7i2D0E+6p2Z rLAh7aORi4gz8k7Rw/NmqeojUXRmfUKGe9IQstYc8mv6M+OBHBXPANgtoKUmaOZ7aWNk YtPw== 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=y0+7hkc8r0bhom9dqxmO4lbR5mjdciNCOpFCqrOZhFo=; fh=i/WIozb1pGRSSAvN281CL0P9xvW88xHKKqLcdnHBUKw=; b=jdxuABtU00jlvAXy3GqoXum4Bf/8hO8ShtIBo+hgMAF1s+CY5pAk655OY2AGxka6Ak QiCdhTcQCpjxFiKFNlCbdLMoWRHQ6Nmm+TCifVek66amErOb1jay+5gfHNS0MZFyi425 iDugKxq8IWI0c//TJ50pW/veo72qRaXmbZc2NLyXc5OE5cgzlCbt283ZV7gJL4cIBk+j TUS2OdmSrkWSRVhmHNiqAWt9s2SUI8P8fBwm1kg3xi9tXzbX2tXXV+nuYH0mxb05u+kl Y+StUEWwDagER5He+6y+CIawHVhZWzGrQt1AISPhRxI+InjPpWTgRCi7XkV0s6SIDYCY k+qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Est7AZs6; 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 b9-20020ab030a9000000b007af8247cdccsi376590uam.127.2023.10.18.06.31.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Oct 2023 06:31:31 -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=Est7AZs6; 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 1qt6dj-0007en-Kn; Wed, 18 Oct 2023 09:31:12 -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 1qt6dg-0007eB-TS for qemu-devel@nongnu.org; Wed, 18 Oct 2023 09:31:08 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qt6dd-0004gS-9g for qemu-devel@nongnu.org; Wed, 18 Oct 2023 09:31:08 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32da7ac5c4fso3287228f8f.1 for ; Wed, 18 Oct 2023 06:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697635863; x=1698240663; 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=y0+7hkc8r0bhom9dqxmO4lbR5mjdciNCOpFCqrOZhFo=; b=Est7AZs68dQAIL1hGoQRx8trBpU5Zlxuy9UA78+6VSCGTij5RhXQOfSPvH7JYVBKkN VZCtd9Kgu+rFR0d0jPxlSJ/cda/61zswvCLB+cfBQlblNM78CGZMC0XyNS+eHKIYeps0 Y4SO52TICXKrTP/X5UocS+4z4OPaSPu9WYMJvV2N5mCdsIpF+YKA8UBQmkg9STC2k5Ei G96eCO8fmJdqZEcqDBqM9SN5b7biEQWACCZNeBWrPJ8XlDNp5KIu9bxSXziWbWGYzz7K wO/8/3DrpnuI42uXDr4XMKVTztp4mYBxQ10cR/LJMtLYZeNF3vB0CQUg3VZni02T/ycQ QTzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697635863; x=1698240663; 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=y0+7hkc8r0bhom9dqxmO4lbR5mjdciNCOpFCqrOZhFo=; b=pzgWflYZLonX0RlhKJw5cl/ulq9S6RC3Zisf/Xlu9p2o0dAWasz4FBuSc6lP30dwpj GXW/sieE1O4ZtnuHHqAO/3zwgE5IEsO9ojOvMLq+c360td2ui2tXmFhVVbDaQFKUgUkg IMVsVy7lSn7d7Jm8seg7gT+UkxZ85MP9agDKXt5h0XVwqiYtVpaUXoan3bSOKlT/DQCc gChAldPMIF5JoGaMdVB9JAteFnNVOCkEtyvuRHVROUrOc3AwiKmMKQ6sEF1xcRCs10d4 yo3GLKsiz9I8SvPuvheCWG5Q3OM9gXTb/wHVrWnkybv6FEr1lzV/eRbg1w3/BjLlmX8m vXLw== X-Gm-Message-State: AOJu0YxD+ndw6isQ48AB2DfGvBw7kRCNgfh0tgzUzmgyB7w03Izftw51 tbYNOtKp1iL5Svgy/gJdwN+gn9dBpbqYqvlwlN0= X-Received: by 2002:a5d:4a04:0:b0:320:bae:2dfd with SMTP id m4-20020a5d4a04000000b003200bae2dfdmr4400153wrq.5.1697635863253; Wed, 18 Oct 2023 06:31:03 -0700 (PDT) Received: from m1x-phil.lan (gyl59-h01-176-171-218-149.dsl.sta.abo.bbox.fr. [176.171.218.149]) by smtp.gmail.com with ESMTPSA id d8-20020a5d5388000000b0032da8fb0d05sm2096419wrv.110.2023.10.18.06.31.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 18 Oct 2023 06:31:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Gibson , =?utf-8?b?RnLDqWTDqXJpYyBC?= =?utf-8?b?YXJyYXQ=?= , =?utf-8?q?C=C3=A9dric_Le_Goat?= =?utf-8?q?er?= , Harsh Prateek Bora , Nicholas Piggin , Daniel Henrique Barboza , qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 0/6] hw/ppc: SysBus simplifications Date: Wed, 18 Oct 2023 15:30:53 +0200 Message-ID: <20231018133059.85765-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::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 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(). Philippe Mathieu-Daudé (6): 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 ++--- 4 files changed, 14 insertions(+), 31 deletions(-) Reviewed-by: Richard Henderson Reviewed-by: LIU Zhiwei