From patchwork Thu Oct 13 17:21:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 614756 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp369705pvb; Thu, 13 Oct 2022 10:22:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7UexV7GpdlfF/fqtZo5UB0jSAyF51d69ZURMNXasIt50bw7nvNx5aceH9v1rf//MjwxJmk X-Received: by 2002:a37:c11:0:b0:6ee:b25a:2573 with SMTP id 17-20020a370c11000000b006eeb25a2573mr735083qkm.297.1665681758803; Thu, 13 Oct 2022 10:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665681758; cv=none; d=google.com; s=arc-20160816; b=JgtU9ysKiiZ7YS71Cdv5l2kEWA7q2qQfcCiJujCxzMroaGYV/W/uSUri9OLxPYfIkW dZoSj0qons6LhEEZeqH7q0ThOoZ8J0QXqB7AzXKOB54csHkKBQTyIWgc1kkaSzv2i0P5 cEEDEzlzhNYYao6gkrCqyLJXnD6+wKgXR0xo9ZQAk7VPPZ8SDYgyNN2pE/lsytVYWM5j WKSNqT3/vRBIYbnnWpPcMxsTGgRnAjFEBEdn7Lgx7l+yogvjpP46RIulmWENebx2bBu3 rvjgZqYs/GnnigcwBb6pZhds2O2UEMm54447ypCCny6xMJrnEbtto49ICpNvIMK6bj43 Wr8g== 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=3u6OQz/fmCLbEozpuffG9tqPYh3I2Cp7JHnUU5CusZM=; b=F65iumkhpCZ0sP9rmiq/P7YO5K7yOYyeASHItgdrCyADLVaDC0OyJkLlDK7ta3WBxN alT9fP/82uPBfKgZGYSQxPfxQu92vBiav6H1k+2sEzuxdgqIVf4TfRz06LGYvaMdHe0U /6o7Wx/oNNB1wvYF++ct97HqTJgqrcarjzIv5SpsDWoiewA2tx6dCz0ry/m5b98mSGAW AFKEtVI0mpcHnWRGSaT2BwrAsz61ZebsOtPQ56ktsqsIXh07Ptt4PE2TJi7L0esksdAa owIgh8TqPnwmb8b8jJaRzc2/EeIfW2Apoo/4qk/YpA1PftUfiJv6gYwxAQP2oJcDEdgq FVyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RQPGnDP2; 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 iu11-20020ad45ccb000000b004b3fcfb64bfsi234050qvb.88.2022.10.13.10.22.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Oct 2022 10:22:38 -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=RQPGnDP2; 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]:57218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oj1uo-0001pI-9t for patch@linaro.org; Thu, 13 Oct 2022 13:22:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oj1tg-0001Tl-Mf for qemu-devel@nongnu.org; Thu, 13 Oct 2022 13:21:28 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:37804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oj1te-00069c-Vf for qemu-devel@nongnu.org; Thu, 13 Oct 2022 13:21:28 -0400 Received: by mail-wr1-x42c.google.com with SMTP id bv10so3878691wrb.4 for ; Thu, 13 Oct 2022 10:21:26 -0700 (PDT) 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=3u6OQz/fmCLbEozpuffG9tqPYh3I2Cp7JHnUU5CusZM=; b=RQPGnDP2Ivwp545rfrbw7SQp3ehq1EISfDIPL5LsqLhXKvmyrDsJbP8J+kuKN8/bIK 7N6Z+HZ1fwoKOKWVMrZPE2JWrokxU+wMyWf9U6GG3vVcqP64NSNkGzQO3okYWPgiVP7e SXVUYl2ceQh3W/r4ZfjuZAchE8cXvdFPsmMgjVLjTWrMozvOr4cvWTxIu51ABd9IXkAZ U3wbYMy4jGLt+ueQ8AbMhPkXXRhgtIRNM8ayScoppy5COPOiGe/JtTmWP3xy9jTmt89Z +tWAEdVY3D+qvWCUt+NloTLjWTe7hsUJB60wxbgmcMriL5zmNgjsWlHn5uFG8jSKqCB/ vuHA== 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=3u6OQz/fmCLbEozpuffG9tqPYh3I2Cp7JHnUU5CusZM=; b=WO8fl+v/o0szkDkfsY+t9UsG+CPwGW0/IH95WvNn5ezhMYoBhCIw4p00A1nAzSVs3m Fpv/Ft4VKXp07hAONz8YYSeDZis81P1PKJQAX0NSWCacBEllkym+Zw/N9qIGRmA73z6z Z/2EEzNJEJimvVJvEVfQd0CRlNlmkemu8GXQCIn7VmH6wen2HwsKDfHuDiGvRSY1E29P iUk2j+deuu5Nw38i+UqIjwqR5p9l5u4khVfrgGcrLYNV3cXfA37uDPC6WR4H2EMvVUEK LX1LXLYOCguIDYJhAtGEKiXK7YHKOt71O9KJDHBM2+hvpaNLCBx8Qpcc6ofKpgNx0f5a Wdyg== X-Gm-Message-State: ACrzQf0FG5l75FEOBYteikzsFTgG4m4Nx6OfZU8P3CJR2xWt1sWOVvbR dNiF3yBUaUJ7Zb8YzgsDuc8ZfDzxYc1BpQ== X-Received: by 2002:a05:6000:15c6:b0:22e:5c0c:13d6 with SMTP id y6-20020a05600015c600b0022e5c0c13d6mr659578wry.485.1665681685280; Thu, 13 Oct 2022 10:21:25 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id i188-20020a1c3bc5000000b003a682354f63sm5028915wma.11.2022.10.13.10.21.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 10:21:24 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Matthew Rosato , Eric Farman Subject: [PATCH] hw/s390x/s390-pci-inst.c: Use device_cold_reset() to reset PCI devices Date: Thu, 13 Oct 2022 18:21:23 +0100 Message-Id: <20221013172123.1448288-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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" The semantic difference between the deprecated device_legacy_reset() function and the newer device_cold_reset() function is that the new function resets both the device itself and any qbuses it owns, whereas the legacy function resets just the device itself and nothing else. In s390-pci-inst.c we use device_legacy_reset() to reset an S390PCIBusDevice. This device doesn't have any child qbuses, so the functions do the same thing and we can stop using the deprecated one. Signed-off-by: Peter Maydell Reviewed-by: Matthew Rosato --- NB: tested only with 'make check' and 'make check-avocado', which probably don't exercise this codepath. hw/s390x/s390-pci-inst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 20a9bcc7afb..16f5a3e81b4 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -272,7 +272,7 @@ int clp_service_call(S390CPU *cpu, uint8_t r2, uintptr_t ra) stw_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_FHOP); goto out; } - device_legacy_reset(DEVICE(pbdev)); + device_cold_reset(DEVICE(pbdev)); pbdev->fh &= ~FH_MASK_ENABLE; pbdev->state = ZPCI_FS_DISABLED; stl_p(&ressetpci->fh, pbdev->fh);