From patchwork Fri Feb 3 14:55:21 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: 650068 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp862696pva; Fri, 3 Feb 2023 06:56:29 -0800 (PST) X-Google-Smtp-Source: AK7set/v5iSsaUXRuKS+l3M9+23vgEIEhIPUfU0Edwb39nERf2IEBaeKJEahqWHvRgDmMry/04ZR X-Received: by 2002:ac8:58d1:0:b0:3b9:a5d8:2c50 with SMTP id u17-20020ac858d1000000b003b9a5d82c50mr18382590qta.38.1675436189427; Fri, 03 Feb 2023 06:56:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675436189; cv=none; d=google.com; s=arc-20160816; b=pxZAQmHCyaDLzbzvx2d5/saQuW8sSiTv4jXvnXbZ+NCtXmgwtGKYviTo+001oxct9x JC6jjRI6SAwLuWxaZg44uohU77JapW9mk/LhMCgbIspAgZlDZdLkhcvlL2KmEhkgdG9Q 32FoDQnkD4scP162jDD0VbCBw47qY1UFCD1X8pE8rm5vO2Gh3MYCK5umw9YhmB1vpr7A KoXmb0uB900HS53ELgkQ3cbSaEyEEqv87/9nU9wPGmXXbMwKovNDQpI2bE9HeLv/xnJy h8obBP9CGf2hiThAitokjEjDZZ9B05woij7rAaczNf6q8XMfsJztbiJny6yNbZVW9kYc SKoQ== 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=U1UtAD1cxyxTdrK64YRV25P2sKPgBwmLWBAD4nN05ls=; b=tuNj7oFN1nuwkbI65KbM8eTmPbRJ6YYI9/rBSc8o5+A1DomPo/l6dVQNFUYiv8EaiP fkcW5lF6hl103vLiDLkPeGjKhhtbRh7Eho3q9Ici3f+jlHhZcmvPMA1K47yqUISqONt+ eCcAV7KAXFFFEJGgXB/JHkE1FsdHQ/3GR/+aoPqfdEQYudSvE9EOzFFYL68ogaUiE9Hz WXmHQqz6vORXhw0ZrYF3Be5ca0o9PwSKXqfb5M8T6zlsQskHmU9ziqXsTejjs07tlbNc 8kt0ulsUb0aRS9PipQJkkycs1rnlBTwDrr5RLnk0ec+eDQ9//pMH4m6SHKbdrQ1wVAGk DdpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q4O+smZK; 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 h63-20020a376c42000000b0071e06147ad1si2096144qkc.353.2023.02.03.06.56.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Feb 2023 06:56:29 -0800 (PST) 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=q4O+smZK; 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 1pNxTd-0001f5-93; Fri, 03 Feb 2023 09:55:45 -0500 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 1pNxTa-0001ZL-NG for qemu-devel@nongnu.org; Fri, 03 Feb 2023 09:55:43 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNxTY-0005qu-OD for qemu-devel@nongnu.org; Fri, 03 Feb 2023 09:55:42 -0500 Received: by mail-wr1-x429.google.com with SMTP id h16so4856207wrz.12 for ; Fri, 03 Feb 2023 06:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=U1UtAD1cxyxTdrK64YRV25P2sKPgBwmLWBAD4nN05ls=; b=q4O+smZKeQby8HBGS4pYTaumSRPE1EGF5VbFbCDCCGDcSImm4HEe4VQiNk4M1PodFN YlwZXv55pW2ueGjoJLN6hUxi+u2IFqQpQzpPbcalTiXRXvyVCWLpLyLk5nSM/jSU3ikn GfzlzUxz+t8g0g4nuk8CUMO5UWrgk6dnzA+TcJKEEO/KFk2ohJsTLPW0z9zeOEQocKwE clU/7+xEIL/6jxdTcKhdtGE0d4bUE8wYDyH5D9FmGQrdLhSnaOe72HGZQLu0SGfyIWj4 KYbU79eWEsWjaIr5VvTGm5ndw3ZL12ivsHmHdfHavfdPcCmNsCe68xu3xdli3Z/2NmB6 yUNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=U1UtAD1cxyxTdrK64YRV25P2sKPgBwmLWBAD4nN05ls=; b=o2sqis+ETWCjdbfoNr4R51Nftw/T0OZA8HEDl4Pzg1IzkTz5syTcYISlSF0EtcWk1c kCYQg3XdV+sxmlyM32DW57EUZiekakpQvnL8du8Dk1EC2ylUEiHih3wzEpReEccPCGIj SdFcC4BUigpu2569OMS/5TnWVZv7UxiShiLID/naoAXT099CEN512atJm/3oCTp6B2Pp cixWVYpzAh0hLZukwhe0xIFkYfmpzh3BgXt2GnG+JrVvnzrqLonFpqiH6xiQArtbbVfK gAbcO5fLAFdRSkX+57QtHNvfYJ2c3yHGtnUEFYiyNP8WQmcbNFhNF1dMFuvFCxcERjUo Rw6w== X-Gm-Message-State: AO0yUKVXBQPvjkaM/wri0I8n/cIrrVYnxc+2GxF8GNk5QFtZ27FMJCYL Xl63Y1aHVQaXjpQS61/ei3mtbwPzOaRE2Ai0 X-Received: by 2002:a5d:420d:0:b0:2c3:ba99:44bc with SMTP id n13-20020a5d420d000000b002c3ba9944bcmr7819727wrq.68.1675436138396; Fri, 03 Feb 2023 06:55:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z16-20020a5d4d10000000b002bbed1388a5sm2170114wrt.15.2023.02.03.06.55.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Feb 2023 06:55:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 00/15] hw: Use QOM alias properties and few QOM/QDev cleanups Date: Fri, 3 Feb 2023 15:55:21 +0100 Message-Id: <20230203145536.17585-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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 Since v1: - Addressed Markus & Zoltan review comments - Introduce/use qdev_unrealize_and_unref() These patches are extracted from a QOM/QDev refactor series, so they are preliminary cleanups noticed while working on it: - Use correct type when calling qdev_prop_set_xxx() - Unify some qdev properties in MIPS models - Replace intermediate properties by link properties - Remove DEFINE_PROP_DMAADDR() macro which is used one time - Use qdev_realize_and_unref() instead of open-coding it Philippe Mathieu-Daudé (15): hw/pci/pcie_sriov: Replace fprintf(error_pretty) -> warn_reportf_err() hw/qdev: Introduce qdev_unrealize_and_unref() linux-user/syscall: Do not open-code qdev_unrealize_and_unref() hw/pci/pcie_sriov: Do not open-code qdev_unrealize_and_unref() hw/i386/sgx: Do not open-code qdev_realize_and_unref() hw/ppc/sam460ex: Correctly set MAL properties hw/arm/nrf51: Alias 'flash-size' QOM property in SoC object hw/arm/fsl-imx: Alias 'phy-num' QOM property in SoC object hw/usb/hcd-ohci: Include missing 'sysbus.h' header hw/display/sm501: Embed OHCI QOM child in chipset hw/display/sm501: Alias 'dma-offset' QOM property in chipset object hw/display/sm501: Unify common QOM properties hw/qdev: Remove DEFINE_PROP_DMAADDR() and 'hw/qdev-dma.h' hw/mips: Declare all length properties as unsigned hw/mips/itu: Pass SAAR using QOM link property hw/arm/fsl-imx25.c | 3 +-- hw/arm/fsl-imx6.c | 3 +-- hw/arm/fsl-imx6ul.c | 8 ++++---- hw/arm/fsl-imx7.c | 12 ++++++------ hw/arm/microbit.c | 5 ++++- hw/arm/nrf51_soc.c | 10 +--------- hw/core/qdev.c | 9 +++++++++ hw/display/sm501.c | 33 ++++++++++++++------------------- hw/i386/sgx.c | 14 ++++++-------- hw/intc/mips_gic.c | 4 ++-- hw/mips/boston.c | 2 +- hw/mips/cps.c | 35 ++++++++++++----------------------- hw/mips/malta.c | 2 +- hw/misc/mips_cmgcr.c | 2 +- hw/misc/mips_itu.c | 30 ++++++++++++++++++++---------- hw/nvram/nrf51_nvm.c | 6 +++++- hw/pci/pcie_sriov.c | 11 ++++------- hw/ppc/sam460ex.c | 4 ++-- hw/sh4/r2d.c | 2 +- hw/usb/hcd-ohci-pci.c | 1 - hw/usb/hcd-ohci.c | 3 +-- hw/usb/hcd-ohci.h | 1 + include/hw/arm/fsl-imx25.h | 1 - include/hw/arm/fsl-imx6.h | 1 - include/hw/arm/fsl-imx6ul.h | 2 -- include/hw/arm/fsl-imx7.h | 1 - include/hw/arm/nrf51_soc.h | 1 - include/hw/intc/mips_gic.h | 4 ++-- include/hw/misc/mips_cmgcr.h | 2 +- include/hw/misc/mips_itu.h | 9 ++++----- include/hw/qdev-core.h | 20 ++++++++++++++++++++ include/hw/qdev-dma.h | 16 ---------------- linux-user/syscall.c | 3 +-- 33 files changed, 125 insertions(+), 135 deletions(-) delete mode 100644 include/hw/qdev-dma.h