From patchwork Fri Nov 4 16:15:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 621378 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp360195pvb; Fri, 4 Nov 2022 09:18:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM723j2yLavpoB76cjbFU0WSQwB31McGSF/g1AFa8k1jDcTryIha8fwrQCZM6V17cSBHviw1 X-Received: by 2002:a05:6214:f25:b0:4bb:b5dc:63eb with SMTP id iw5-20020a0562140f2500b004bbb5dc63ebmr32901684qvb.55.1667578694590; Fri, 04 Nov 2022 09:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667578694; cv=none; d=google.com; s=arc-20160816; b=FcwrGObl9Y7JD+nCrmoLHrAhtz1iRD1h1asbl+Nty2jNAkgUwSxU4esDN70z4EQyoi gwgGCKKx8s8m+sBfzjSZOEjU1Yb51n+owNYP0pmS3d/IYlcclJRVZxmDgzz2V25EmsdB Z3TIJbqyWh2FTB+9xcV/L+9GMv+F7VuPEbVq4jC9mNd3BDJDTPjU/k4pydIhrvdGuKV5 gSpU8A4Wp4US0eNYyVIjkJzWhOL8l+UvpwWAma6RXdQZbegm21PfToeVzBatjXmerQ3v DAcFv5kwMzUwYc0zxzMWPCqeJG1h1kPAEKd8aDk5rwz8N8tipBu/NLr1lyrf5CKrigiJ /wQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender: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:cc:to :from:dkim-signature; bh=HvsbSFL9/X7+hG+QCwobd7oX/Vj9erH1J5f0aYS/jDg=; b=nzY2jrkRh62Px1y8TpqldOIdg7sqLJ/qHsz+wbjDDqt0NfZlO4lSJNFmYn4Nj4Y/zw GWOm9PgipKP5nas5S/TNUxP+zWQ5lMZnI1RL7BvAFAlajmFPEqP4FaE9d9hdbDQVzUV/ NlWDaZomAJsmURgpz6dq0IkRlKvlzhzZTgmrsjvAXAm/de52j9edvcukTDKwwAgdfvPG xrYohJdeA+LoNglsP7Hzysivn+PHTzNN/g4YbJ6IuLU0CTmVgsy2fj5y24kVuKJuwEGm UP40LKOzVhvqzdAXlV4VDHB27jTFJwd9RBaJskqZiqSILD+3P7hfcbBDhWN0JAXmncD7 hVCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mhw6Qbus; 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 q65-20020ae9dc44000000b006fa32a26439si2725597qkf.711.2022.11.04.09.18.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Nov 2022 09:18:14 -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=mhw6Qbus; 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 1oqzMt-0000km-57; Fri, 04 Nov 2022 12:16:31 -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 1oqzM6-0006lq-VV for qemu-devel@nongnu.org; Fri, 04 Nov 2022 12:15:43 -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 1oqzLt-0000i3-63 for qemu-devel@nongnu.org; Fri, 04 Nov 2022 12:15:42 -0400 Received: by mail-wm1-x32f.google.com with SMTP id fn7-20020a05600c688700b003b4fb113b86so3499150wmb.0 for ; Fri, 04 Nov 2022 09:15:28 -0700 (PDT) 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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HvsbSFL9/X7+hG+QCwobd7oX/Vj9erH1J5f0aYS/jDg=; b=mhw6QbusoIMNJKftAzbRjxbwF66YGlRfvYgnJWtAqu8XoAjznJ1Wx5eTqlXv10X2X3 bVoHZ+9sVlA6b3y9DRByq1HJHvuy17SzWSxSX64KQBMrt4ZaChS1QDgkNCTrR9fcYRoZ tGSM6IvPK5K2RJfUg+s2gS1QzvdM8u7jyFjL/Br2PAIzV5Bw8pw9f41CDhJQ46nIy5uR iSRZwRBXa4w2eIMZi9EnlUKSY9cg9diSlnSOvMpvMI4EogiW9u+UHQIK1aazOoQMYn/f s1mHpbjYs1g88fbt9oMWQJLKXRzmE1rZjVJYTmkjr2OB2TYtX0INHTrecPA8YiMZkE4P elXg== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HvsbSFL9/X7+hG+QCwobd7oX/Vj9erH1J5f0aYS/jDg=; b=vw/BF2gIcpTCyFq9cDFH6QyMNX02gaH7o/zMJb5lnYbo/bjatWrJAEfIP7tblhkai6 wAuaSZgQTJhquWuiTI1bvkcsJe5rHtldlaGhQ/yt1UO+sseVt+a8iBA6gbh7P4UbylUY E/yPaoCleF1jrEfvBEqDpkR6yVpUdjUqwrISw25l1jt8u3SruRjC3OrcSoISxfTsqib1 jp/7gxVQCIlUh1uI7Jyr9Cjsr8G9vPbxhtTaUbtnoMMre3Gabe6teKJuWo+KBeqbI2NP ifeVbIWScSkndzA1lZYlHH9njzNrooC0MCFPR0YM6izIJWbFuTkI2y81IwmnwAwmxg0B 4IKw== X-Gm-Message-State: ACrzQf0GnvfLEPT7p6V6opJaWKbUPTSwLLs5ESTB39r0F0kgmmigmZhl L5OZ0HsxmIFfcg5mZ9r08OzD4hMQwbZ+2g== X-Received: by 2002:a1c:25c1:0:b0:3cf:4dc4:5a97 with SMTP id l184-20020a1c25c1000000b003cf4dc45a97mr31960218wml.147.1667578527696; Fri, 04 Nov 2022 09:15:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ay5-20020a5d6f05000000b0022e57e66824sm4649645wrb.99.2022.11.04.09.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 09:15:27 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: "Maciej S. Szmigiero" , Gerd Hoffmann , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stefano Stabellini , Anthony Perard , Paul Durrant , Mark Cave-Ayland , Matthew Rosato , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, qemu-ppc@nongnu.org Subject: [PATCH for-8.0 8/9] qdev: Remove qdev_reset_all() and qbus_reset_all() Date: Fri, 4 Nov 2022 16:15:12 +0000 Message-Id: <20221104161513.2455862-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221104161513.2455862-1-peter.maydell@linaro.org> References: <20221104161513.2455862-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=peter.maydell@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: , Sender: "Qemu-devel" Errors-To: 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 Reviewed-by: Philippe Mathieu-Daudé --- include/hw/qdev-core.h | 26 -------------------- hw/core/qdev.c | 54 ------------------------------------------ hw/core/trace-events | 4 ---- 3 files changed, 84 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 0806d8fcaaa..3b0f04c5c6d 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -237,60 +237,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..d6ab5c74b90 100644 --- a/hw/core/trace-events +++ b/hw/core/trace-events @@ -3,11 +3,7 @@ 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