From patchwork Fri Dec 16 21:42:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 634500 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1088637pvb; Fri, 16 Dec 2022 14:33:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf5phjZNjVELDFnEteY3ks+wWRYrr7+pZboWcE6Vha76E41V/svUnkXQRUfJVMk76h5glKfr X-Received: by 2002:a05:622a:5d91:b0:3a6:9b7f:9da7 with SMTP id fu17-20020a05622a5d9100b003a69b7f9da7mr41192866qtb.59.1671230003663; Fri, 16 Dec 2022 14:33:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671230003; cv=none; d=google.com; s=arc-20160816; b=iLsqeKgMKGFQyJLM1vImi1z6i713venhjSAvvzQagKOuCGCjZI54F2k9yi+7ahiPnI f6Hi8mUfOx89f4HQ+/rLlobLCGFHIeAIEhk0RakhnxTaiNQIDgDNHWzf49OxUIhyG5l4 QWZ1iQfC6IqsEf7Cup37aY0V2z7KQ7+BZz3Dj8qHE8b/yz1QSFp8hLxw8X2BQMTEQtPn UNmOq188YMzcep5cfAEWOPxJowJQTlnKzfB5kP+uE3yzAqV7E5577vQd3rf+BUSjSIJH RxIbZHMlrvuc8LfWRdjfsqeWrgZc19nEGtjyRl42OBrLH4xILEX89LppLw4P3gnJ0VBD bdzQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3rFihcTTz1hAU/VaIjhHsYjodDtMKZcW8ITB9PAuu1c=; b=Nal0y7b/gQ6WCy+BmSzJIKX6Glx0DNrT/syMPq3oqV9vaK62PEq7GnNs6aJ2oxwTV9 30hk0/d3Cwb1lGvpDH0pVzp3GdEDgVnaPYiK5ib5HqKMED8j8TxzpWk2oWGAYt61fOtm E5yz5rbzrfe1oFJ1nJlGx7yFqVxcUUoKDK+ejws4M3ixBFu+AuqBRTLFs+4i2Deaz6Ds DoxnG4IFhutlm4K+BWuz6icElzaknaczGm+F2pN+756+TS/44JF1y9/TyQgM4vGD69Ys UlBKONXwblVVneLTOmHVwmJfYONL+Muwy+DEnwJzB//z7iTqFxifoxaFm51KzG5P7QaW yJlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PFbu/AWx"; 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 h4-20020a05622a170400b0039cd73959fcsi1773560qtk.542.2022.12.16.14.33.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Dec 2022 14:33:23 -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="PFbu/AWx"; 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 1p6IU7-00063j-ON; Fri, 16 Dec 2022 16:43:15 -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 1p6ITp-0005wB-Rm for qemu-devel@nongnu.org; Fri, 16 Dec 2022 16:43:05 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6ITk-0000bF-4s for qemu-devel@nongnu.org; Fri, 16 Dec 2022 16:42:56 -0500 Received: by mail-wm1-x333.google.com with SMTP id bi26-20020a05600c3d9a00b003d3404a89faso1997399wmb.1 for ; Fri, 16 Dec 2022 13:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3rFihcTTz1hAU/VaIjhHsYjodDtMKZcW8ITB9PAuu1c=; b=PFbu/AWxefFZWrt3MHagX9W+kOp45Pnaov3xhECDCAJU0JAnW83gdL8kBtNx/7p+nT KtqfJf1p5f6S5CT+slh0cdnqII66FPZaQTFolIpiHvlOjrGV8sNCS3Fvmq9BEHbz24LL 3xDzT6BsUfRUbskfCeYNWUVmHtTFh8Ze0SMgzcVVQCd2EXZhCSMp2Sisqeg5iZ2ZrjUx 7PHw5lepF3xowz4vwpJlYPVhoCxjA4s2YikasLWFh2lXSCc5ic42oehQJMGex82QAlJ/ 8f442VVd4S3SwgeZUbPqrPXESvvYmrl0+L0cJlZJO4b/rCuSt3J2DyQY8oSQxQUS4V5p ZNhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3rFihcTTz1hAU/VaIjhHsYjodDtMKZcW8ITB9PAuu1c=; b=wKiZCite+EIoQae3PISdvvnh1TVev371b+0sacwwAP5fGyvVlfdb/uribC7hjLO1mb ww/u1fzb+mZ6m6SbmUjcjYMeHf02qTJYxt9Cl9EGTYdMW34SjdRdTGmPWqCIVYx/qT28 TTH5VlLaPug21Mh2GDT2ztKGxgnjURaKKwd6Ito3jkOhjADDFvomspr53xcmiKU3WLu+ Ew+Zhtzbc3h0WEE8pxDnezkTskN5OZlKoNoGK0d5xcD7Rx+AbbQwvxE4nvWFB6z8+j4A A8gBa3sa1BEkP0CyesyKF7skHA7QAE1/zrBOsh1XMwhiIhkUjt210uw3qSfpkklmzgU4 80Uw== X-Gm-Message-State: ANoB5plNZ8z/XoIHamK7nhAL1J9I0VK9hmsi3kB2tJ+As4OFVN18DkjC ujiUbPaEHA5nFpSoS3fTGXnXxJ0fvsjS2PXq X-Received: by 2002:a05:600c:4fd4:b0:3cf:75dc:12d3 with SMTP id o20-20020a05600c4fd400b003cf75dc12d3mr26962038wmq.23.1671226970864; Fri, 16 Dec 2022 13:42:50 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id y7-20020a05600c364700b003d33ab317dasm4135263wmq.14.2022.12.16.13.42.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 13:42:50 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/36] qdev: Remove qdev_reset_all() and qbus_reset_all() Date: Fri, 16 Dec 2022 21:42:13 +0000 Message-Id: <20221216214244.1391647-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221216214244.1391647-1-peter.maydell@linaro.org> References: <20221216214244.1391647-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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 Remove the qdev_reset_all() and qbus_reset_all() functions, now we have moved all the callers over to the new device_cold_reset() and bus_cold_reset() functions. Signed-off-by: Peter Maydell --- include/hw/qdev-core.h | 26 -------------------- hw/core/qdev.c | 54 ------------------------------------------ hw/core/trace-events | 5 ---- 3 files changed, 85 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 785dd5a56ef..c7eda169d78 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -743,32 +743,6 @@ int qdev_walk_children(DeviceState *dev, qdev_walkerfn *post_devfn, qbus_walkerfn *post_busfn, void *opaque); -/** - * @qdev_reset_all: - * Reset @dev. See @qbus_reset_all() for more details. - * - * Note: This function is deprecated and will be removed when it becomes unused. - * Please use device_cold_reset() now. - */ -void qdev_reset_all(DeviceState *dev); -void qdev_reset_all_fn(void *opaque); - -/** - * @qbus_reset_all: - * @bus: Bus to be reset. - * - * Reset @bus and perform a bus-level ("hard") reset of all devices connected - * to it, including recursive processing of all buses below @bus itself. A - * hard reset means that qbus_reset_all will reset all state of the device. - * For PCI devices, for example, this will include the base address registers - * or configuration space. - * - * Note: This function is deprecated and will be removed when it becomes unused. - * Please use bus_cold_reset() now. - */ -void qbus_reset_all(BusState *bus); -void qbus_reset_all_fn(void *opaque); - /** * device_cold_reset: * Reset device @dev and perform a recursive processing using the resettable diff --git a/hw/core/qdev.c b/hw/core/qdev.c index c0b77a62954..c5ea0adc713 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -250,60 +250,6 @@ void qdev_set_legacy_instance_id(DeviceState *dev, int alias_id, dev->alias_required_for_version = required_for_version; } -static int qdev_prereset(DeviceState *dev, void *opaque) -{ - trace_qdev_reset_tree(dev, object_get_typename(OBJECT(dev))); - return 0; -} - -static int qbus_prereset(BusState *bus, void *opaque) -{ - trace_qbus_reset_tree(bus, object_get_typename(OBJECT(bus))); - return 0; -} - -static int qdev_reset_one(DeviceState *dev, void *opaque) -{ - device_legacy_reset(dev); - - return 0; -} - -static int qbus_reset_one(BusState *bus, void *opaque) -{ - BusClass *bc = BUS_GET_CLASS(bus); - trace_qbus_reset(bus, object_get_typename(OBJECT(bus))); - if (bc->reset) { - bc->reset(bus); - } - return 0; -} - -void qdev_reset_all(DeviceState *dev) -{ - trace_qdev_reset_all(dev, object_get_typename(OBJECT(dev))); - qdev_walk_children(dev, qdev_prereset, qbus_prereset, - qdev_reset_one, qbus_reset_one, NULL); -} - -void qdev_reset_all_fn(void *opaque) -{ - qdev_reset_all(DEVICE(opaque)); -} - -void qbus_reset_all(BusState *bus) -{ - trace_qbus_reset_all(bus, object_get_typename(OBJECT(bus))); - qbus_walk_children(bus, qdev_prereset, qbus_prereset, - qdev_reset_one, qbus_reset_one, NULL); -} - -void qbus_reset_all_fn(void *opaque) -{ - BusState *bus = opaque; - qbus_reset_all(bus); -} - void device_cold_reset(DeviceState *dev) { resettable_reset(OBJECT(dev), RESET_TYPE_COLD); diff --git a/hw/core/trace-events b/hw/core/trace-events index 9b3ecce3b2f..6da317247f4 100644 --- a/hw/core/trace-events +++ b/hw/core/trace-events @@ -3,11 +3,6 @@ loader_write_rom(const char *name, uint64_t gpa, uint64_t size, bool isrom) "%s: # qdev.c qdev_reset(void *obj, const char *objtype) "obj=%p(%s)" -qdev_reset_all(void *obj, const char *objtype) "obj=%p(%s)" -qdev_reset_tree(void *obj, const char *objtype) "obj=%p(%s)" -qbus_reset(void *obj, const char *objtype) "obj=%p(%s)" -qbus_reset_all(void *obj, const char *objtype) "obj=%p(%s)" -qbus_reset_tree(void *obj, const char *objtype) "obj=%p(%s)" qdev_update_parent_bus(void *obj, const char *objtype, void *oldp, const char *oldptype, void *newp, const char *newptype) "obj=%p(%s) old_parent=%p(%s) new_parent=%p(%s)" # resettable.c