From patchwork Fri Jan 19 16:35:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 763948 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a08:0:b0:337:62d3:c6d5 with SMTP id m8csp535330wrq; Fri, 19 Jan 2024 08:35:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwO5lsVndfRoNHkEaZTvTO46W3enB1Uu8Pmy55eNNh21T6s6j64ZmIuT75/B/ypB5OXXkZ X-Received: by 2002:ad4:5de1:0:b0:681:93fa:3a53 with SMTP id jn1-20020ad45de1000000b0068193fa3a53mr133414qvb.79.1705682141288; Fri, 19 Jan 2024 08:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705682141; cv=none; d=google.com; s=arc-20160816; b=QExxM7D7Xa3oPOb16qkj4fzx5KaMBy996hg7nLbaOC+B6zuixyH8Cjqy/5fyJG1RuZ 3l/Hxx7qqg5m+z9YY3Zn2Uajx7SU5PQVDWPNfLNJ3LxOYDrzE3zpYjUq6PbqgFv4fsxo kDtf1Xj9JalOIkWlWEY0weyLDduBmYB7GzB49k7Z/limfjCurnbrwXc8PaOJKIgl80Gq pXXopTmD3kr0U7fFoj4E9+SP+NRJJ61orZCUBml5xo6PKzMvI80b5rnkiq0ZwjU+HL1m 1El9DayNDetXKI3rTWm0yQlBEdUgdq5eBn5Psxxolr2C7DCaVgnZM84OBnZtTypwbGI3 YU6Q== 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=xeQ/bMA7W62y/SM3vuOP/JDUaEJLEfPl9aVZLxbSh4I=; fh=nxeo78RkLzeDKPAjNj8CYMf+h+JyAlKdAq+qj8OM6yk=; b=X4L6OoGHpr/824gCGO00Wg/EzJUCbZedHwpMHk07MHYdA7i6OE8DNZtHd3i2VOJ7MH pPV1zH+vGZCHwj7zjNL2NvC6xiAX0e80fL80MrW7zosTKL2b+1KEj08yZ2U1XMqQUt2m 0/lS82RXvxX6a5RWmS/Uo80eiTTuWl5Ajq0cbNrL6Y5t8NoE0MF3wSEGpUJ+y+euF+QQ pP/Fw+XR2jeNHBoqsnK6AyNaWwb5YpLTiYCHF6yukeLvFrpBgB76FCmh94ceunWn24HL jX3daqa2AZAHmi+IG3x3SSgW5xFsjLML2CqlIkYfrZE3f7DybnfaM0ZKj4IxkuHHrh13 4vOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pmcRm1uS; 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 x1-20020a0ca881000000b0067ef8e49371si16293019qva.297.2024.01.19.08.35.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jan 2024 08:35:41 -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=pmcRm1uS; 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 1rQrpy-0000nZ-RR; Fri, 19 Jan 2024 11:35:22 -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 1rQrpv-0000lU-Ot for qemu-devel@nongnu.org; Fri, 19 Jan 2024 11:35:19 -0500 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 1rQrpt-0004mP-W7 for qemu-devel@nongnu.org; Fri, 19 Jan 2024 11:35:19 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40e7065b692so9795165e9.3 for ; Fri, 19 Jan 2024 08:35:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705682116; x=1706286916; darn=nongnu.org; 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=xeQ/bMA7W62y/SM3vuOP/JDUaEJLEfPl9aVZLxbSh4I=; b=pmcRm1uSjNu/lfXaFBsMP+btolE9DO33WFu85pGE1RYbTZQZLFYy7hCjDucQqwUqA6 EIR93oD0vvwuc/IBPUaRHXwISEfGdcmZj0r0EKmVwAAanTGm0OtV9PEnRMx0HLhzbZMf 2X1ccdu0+TEEEyZhbg+Wr8t3mCYe2ve5QVDVvTqAMNU2w6ieZ0sNAaALdAwtES3w9X0L 0ylAfXiUuJaFtGaerc0jSEJWY3U7MIR813t6X/mFIVwpsjnygD4EFqZclgUjMUFnvNTJ 0KBwP5GpCV/ivi+IvG6txqi5MfTJe7fmetOHwZkPOVLm8Cxx5G+1hqJvk4/IsK0G3Ahq p6gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705682116; x=1706286916; 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=xeQ/bMA7W62y/SM3vuOP/JDUaEJLEfPl9aVZLxbSh4I=; b=WUuF5ETFqEa8OhqruYUDgOs65Zre3OovXXiIjveLrS/TbcGg+nDZk0t8dBeB1rb0ZI lfn6si2D4e5JrIX1EWXaKo9+n2VPW6Mq7cPHIaTsVul+cCS+iSKi9bFUi+QeZwbkgLKL wLBMbLj7ASgH3q/MAnH5trZGsgED4upv8Ly5XvwAkfF38KapkMc4rPpfeKCVJ7A3N9Om TsOqKJDL+GExy6m3EFpTBvS1nkQJKZ3WPf11isT6FBlLJuvFcKer9WnhXyYen6+njRoY iplFpJu4iiI+9U6C69WRu70k/CiLSSFoVK/1RKryy8++Pl2zzXwlhmWASMcXsn1iHy2u yOSA== X-Gm-Message-State: AOJu0YwTyN0LY38lfyBq+/Ma6Dz2cf6sndtTKzixmzHVhS9iHlf9TqCu 0W8XHEX0Ek2AmyQ1cceD+ApS1p9B8iTPde1sI9thCDXC9X4vPH2WuvuhcAinpn0t3hZxa/ZIrJl u X-Received: by 2002:a05:600c:2194:b0:40e:628f:96fb with SMTP id e20-20020a05600c219400b0040e628f96fbmr10369wme.168.1705682116376; Fri, 19 Jan 2024 08:35:16 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id fc11-20020a05600c524b00b0040e86fbd772sm10979260wmb.38.2024.01.19.08.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 08:35:16 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Cc: "Maciej S. Szmigiero" , Mark Cave-Ayland , "Michael S. Tsirkin" , Marcel Apfelbaum , Halil Pasic , Christian Borntraeger , Eric Farman , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 4/5] hw/s390x/css-bridge: switch virtual-css bus to 3-phase-reset Date: Fri, 19 Jan 2024 16:35:11 +0000 Message-Id: <20240119163512.3810301-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119163512.3810301-1-peter.maydell@linaro.org> References: <20240119163512.3810301-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, T_SCC_BODY_TEXT_LINE=-0.01 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 Switch the s390x virtual-css bus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell Reviewed-by: Halil Pasic Reviewed-by: Eric Farman Reviewed-by: Zhao Liu --- hw/s390x/css-bridge.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c index 15d26efc951..34639f21435 100644 --- a/hw/s390x/css-bridge.c +++ b/hw/s390x/css-bridge.c @@ -56,7 +56,7 @@ static void ccw_device_unplug(HotplugHandler *hotplug_dev, qdev_unrealize(dev); } -static void virtual_css_bus_reset(BusState *qbus) +static void virtual_css_bus_reset_hold(Object *obj) { /* This should actually be modelled via the generic css */ css_reset(); @@ -81,8 +81,9 @@ static char *virtual_css_bus_get_dev_path(DeviceState *dev) static void virtual_css_bus_class_init(ObjectClass *klass, void *data) { BusClass *k = BUS_CLASS(klass); + ResettableClass *rc = RESETTABLE_CLASS(klass); - k->reset = virtual_css_bus_reset; + rc->phases.hold = virtual_css_bus_reset_hold; k->get_dev_path = virtual_css_bus_get_dev_path; }