From patchwork Mon Oct 17 19:19:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 615687 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2189230pvb; Mon, 17 Oct 2022 12:52:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+8WYN73Ac0bDd2PJRV5odiC5WMY7O2OKCzf96nxc3V1SVkHABo3MCkolhF6K7i9aKVopb X-Received: by 2002:a05:6214:5198:b0:4b1:c631:2ffa with SMTP id kl24-20020a056214519800b004b1c6312ffamr9866995qvb.86.1666036340835; Mon, 17 Oct 2022 12:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666036340; cv=none; d=google.com; s=arc-20160816; b=YDPM9gOJpfOXvONsAyPsWh+hufJNLk52lEqPawdPAcr4kOdc9/BoEIqNvWm+E3BoSV Nsk4EN4AoWRkQIKBqytt3a7GyckrdgCw9K5EoZJ0LngUkAIEIP8aONe03ZmuLirApBM+ GHVP3zhyuTVOMV3eFVYiD/nt2IU9CNZmruDdmD8MGjwZLAUwZU3TwmqnDdyG426U0XGv kFLK205uP2LEgAtpreYVyTyl6yZU7gJpO/BN0fEZz8j2cG1yY8wGltFFP4furUw0iR7B 9WVm6JamOMJWiwAkclKpd+4i7MFQt87eKXdjI0qBrSO9XPrCH6+xRJtTpdRBEqxH2k6N P2Cg== 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:cc:to :from:dkim-signature; bh=pnZp3+RtVWl+Up+vzDAkuOjXA76TOhGWF6jmK21fauw=; b=I9yPtaxQXzgmQGOB/ndlzDcE8Dm/m23V83W8peRufdaG7uQXWDYQO/TYznR70gJq8h MqZde3F1PwPMWCXcm+MIIUYlbWD24EtRn6HfGUztHaQl2dTVazEc2MuYAWOuoKUKhvmq 8FTGHryij5lEAvm0EAIVZv4NW8eLLYD91bluGhEm8ASDFq/EnxC1ATZ/3yRAwZyivwFO TNX1tTwAysncDXaW7w8H4gORre340ccNxuksYt6NLBlqhq02cC/pY822wepVN/FqFI8K f1h5+kVdFbbYYYX2nW6UqNmulCG0l9yKBpEE4aDEZhpYa8EgioLpKM09TeqtAgGgeROt /tDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cYzBEpa7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i9-20020a05620a248900b006ce08d4aa73si6439660qkn.611.2022.10.17.12.52.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Oct 2022 12:52:20 -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=@gmail.com header.s=20210112 header.b=cYzBEpa7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1]:39654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okW9s-00074H-BX for patch@linaro.org; Mon, 17 Oct 2022 15:52:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okVg6-0002vA-SP; Mon, 17 Oct 2022 15:21:34 -0400 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:40577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okVg5-0002z2-3f; Mon, 17 Oct 2022 15:21:34 -0400 Received: by mail-oi1-x235.google.com with SMTP id l5so13223031oif.7; Mon, 17 Oct 2022 12:21:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=pnZp3+RtVWl+Up+vzDAkuOjXA76TOhGWF6jmK21fauw=; b=cYzBEpa7KcXCw2a2qUjb1+t/XHQtMUlaC08HHe25Ixlu4VVFCIDbNRWKJ0Xk3UWUom 2+/0grOf3c40Vz1ie7i5w5SHzjUFOVB22goRkPxuUJwHWgXzmfeVa7AUcpZs/lA5/6pw RNwxhWu7nLKRHU3DePl1FlcFNO295W8ghKuvo7XQgZT0UA+G6B4hndOnKPZQf45JL3zf Ks7o3Dbc066ABXlKMp8l7HwIZ8rEzt3lc/+/AhCaqBQ1Ns4evylJ8j/e/PSPyCeuYd7+ 60FIQ3XKYWB8u5lzIqd3fa1BT03pvUemdv6tz0UjwQVERcO5tGpY9JBhEl2bJVrmHs9B Xc8w== 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=pnZp3+RtVWl+Up+vzDAkuOjXA76TOhGWF6jmK21fauw=; b=J9V3zJBVdLftNOF9cYU0vGhXzNKzNRa98IYZzE9b09jy9dK/uPdDaoCGDEEjaofpw6 vxxKrK4cTr79VW/qiBE6azCD3SEXyPFrpqMyAOUiK9dpokn+vQXBOz214oAESuIyJvqA 2Cr/UkFntYVqFd2vBqR8D9wTJjwaUAf2saBQqEkYhxgfvSxsKDPDEYO44wRHqpNc6K3Q g0f/+3ZWVZlUfU44yoFxeBaoUFQTNfREl0JwGv4cFqYk/GFYaTgmrK72M0WyATIV59dQ 8exhwHbL0QkbN/A3STK02Du2D88nEOuNLovn2aOffiYHQckfUGlBRYFXn2EgkKc26L6V poDQ== X-Gm-Message-State: ACrzQf1oSDHhRL10Pr8gsa4+1UKm5ohwChr/aJJ7Eww1gMoYsu98yzVP 3Z3LkbJ6aK2jei7CJljMqL7fmaQK3m8= X-Received: by 2002:a05:6808:11cb:b0:353:f841:e390 with SMTP id p11-20020a05680811cb00b00353f841e390mr5533863oiv.149.1666034491861; Mon, 17 Oct 2022 12:21:31 -0700 (PDT) Received: from balboa.COMFAST ([179.111.38.2]) by smtp.gmail.com with ESMTPSA id n132-20020aca408a000000b00342eade43d4sm4648005oia.13.2022.10.17.12.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 12:21:31 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, stefanha@redhat.com, Peter Maydell , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Daniel Henrique Barboza Subject: [PULL 28/38] hw/ppc/spapr_pci.c: Use device_cold_reset() rather than device_legacy_reset() Date: Mon, 17 Oct 2022 16:19:59 -0300 Message-Id: <20221017192009.92404-29-danielhb413@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221017192009.92404-1-danielhb413@gmail.com> References: <20221017192009.92404-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::235; envelope-from=danielhb413@gmail.com; helo=mail-oi1-x235.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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" From: Peter Maydell In spapr_phb_children_reset() we call device_legacy_reset() to reset any QOM children of the SPAPR PCI host bridge device. This will not reset any qbus such a child might own. Switch to device_cold_reset(), which will reset both the device and its buses. (If the child has no qbuses then there will be no change in behaviour.) Signed-off-by: Peter Maydell Reviewed-by: Cédric Le Goater Reviewed-by: Daniel Henrique Barboza Message-Id: <20221014142841.2092784-1-peter.maydell@linaro.org> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 57c8a4f085..7b7618d5da 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -2045,7 +2045,7 @@ static int spapr_phb_children_reset(Object *child, void *opaque) DeviceState *dev = (DeviceState *) object_dynamic_cast(child, TYPE_DEVICE); if (dev) { - device_legacy_reset(dev); + device_cold_reset(dev); } return 0;