From patchwork Fri Aug 30 14:58:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 824011 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c1:0:b0:367:895a:4699 with SMTP id p1csp823816wrs; Fri, 30 Aug 2024 07:59:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUN+6WCGlvwk274CxDfMCaEvhL/uUJDhs6yaPSPpAkQfhLGhpc5/zOzyGjmZqrZBZL08WgqgA==@linaro.org X-Google-Smtp-Source: AGHT+IHnJLEJ6vtT3pFjSBzGs3cC9ornpDYlMUqJyyF5obLzB+v7jkxwaDQll+68CGFC4knnWSaE X-Received: by 2002:a05:620a:31a3:b0:7a7:ff18:11e9 with SMTP id af79cd13be357-7a80418295bmr871797085a.4.1725029989203; Fri, 30 Aug 2024 07:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725029989; cv=none; d=google.com; s=arc-20160816; b=M4B1hw4GvbcUUat9LekgNif+TUD1+FXZsF4ezR9gNFqgT+a+URSiQDQTXEi0B+uSkI cQN52b/5rFhSqhniDowc8k/WTrJUXG6mQsgRf5CKRkQACYSLx0s1B0rNUbq14lunjIbH t0tVnEfaM9I48CGHdPUlQWRgrGy/w+8v1DEMKADtfKMcgnrP+kQi2zd3D08u+JInBivv vgSMt0zfSDzvg4XUvQ+K3t/7iO/zi6RbsJGARmT+3i6NuTBaBOqSA9KEpkAoA+9wN8YC B++cEDMtuz99nHIN66Aik5pwAwDcCjhAFNuxIsyxDbaJj1hJ4229xhQJXmJGs0iCYxIF WPYw== 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=5m93k8r6P9crCpqy8j86ZMz12VwEi3ZCriS1fWHYtsA=; fh=aZP5QcqmVCTfLe93cJ47kfqkp9RGJPPxVVJ3kRoWYP4=; b=Jsy7HWSvhXCe3rGJyZt2PefihF91G7rhv6ITgMDeOa/4ZNbdkiPoZE9hWGia0FeRdE qftdu3nCvqZJ72XpFZGOnH5SexsM5DmzsiYEFlO6JHmA54JU3QteqAV1nVgZ1I/+jccH HSMHwQZwRTq3AX/i80iAYlv5+cZbuJ8VJuV/QdOJLqEkYl/4yAagt0Dd1ktYboqlBZP0 27q5suv4g2p0BH+8bklK7KHNv3yWByip1CCFxRlsCLh8DXhPi0v3cMDxNhgBzmeVdAqC kfTeU176eQWKnsyOqwA7A+/52MBuL9sjqjff4F5KJ0oBL32NCRkN7TrIQbPYuuEVy0JY Q6cA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CUEY7ju4; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-45682d3cf19si40454691cf.347.2024.08.30.07.59.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Aug 2024 07:59:49 -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=CUEY7ju4; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sk34u-0004r7-Vj; Fri, 30 Aug 2024 10:58:21 -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 1sk34t-0004mD-9D for qemu-devel@nongnu.org; Fri, 30 Aug 2024 10:58:19 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sk34q-0004Zm-8t for qemu-devel@nongnu.org; Fri, 30 Aug 2024 10:58:18 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-371a6fcd863so1283137f8f.1 for ; Fri, 30 Aug 2024 07:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725029894; x=1725634694; 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=5m93k8r6P9crCpqy8j86ZMz12VwEi3ZCriS1fWHYtsA=; b=CUEY7ju4/4W3lBadB916noG3on1jgBmwgRaCSx5bEitmjQwgpn0vqfdwwNv30qUOoL 5d1jr/eIedytQDWg9+7u8+ubp9CBchzGIW1QHd1Qi5DIfcjjQNrc/TWvHj1U6k1/9wF1 ZKcgodRNcdRGBVR5GwH8477HZQ9XZWQBCnyW2ZzuOY5R6TXjXbIJLxO3NqdOytMiiP59 agFHq18+WqELFrp3tkwod0LX0XWyRIG9uz+6lk/km8/sqi8kJjakGAP1nXB9pvhugrj8 10AsiO5bENnIJXcBgWY1DslzLZMcK5Ye7uML9zjlaWC6Kdc6YSftXYgSL6nH6KYZPuq8 E89w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725029894; x=1725634694; 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=5m93k8r6P9crCpqy8j86ZMz12VwEi3ZCriS1fWHYtsA=; b=bqJ8dLyzSek9JnAFKNYkkjEKp2ga3uRUpgjK4gX3KANXYPivl7pm7XrOwrZTmuIpko zogd6u8AAeSypsRuc8ShDDMzke8P14/YHEJPhwJKDN0pK/4xCFYddDmDJLSAs6FCak9i cGZlQeW+CAyowcXYBPickHoFIJjrQE8dYm6QkR/RqtVG1yT1WsyBb6M2bk4t2vqHWYYz Fjj/AWR4AppBSP26PW1yrS5GqkkyPmP+NBo4Y9dfNM1utlBI/KkLAbkCj3KnnW5ojEru TWPdD6TEzt7xN92bnOW62yf1wUWbk374VURzJ+b7cDzAYNLTXMAB8Fjd0TaLNkBqjJO/ qACw== X-Gm-Message-State: AOJu0YyJFhy9Vghd9gMURwS/6tDWQtD0cd48XvZpHEcNCAJbpS4ye4I9 uZHoGi3ECaIdVJdwBNsMEP7AHjXUaQngsC5UxRZ7wfyD0qt7OLaY3V9GrVI75js5XGG1zHssbB6 + X-Received: by 2002:a5d:598c:0:b0:371:899b:5c5 with SMTP id ffacd0b85a97d-3749b54d9dfmr4362703f8f.27.1725029894541; Fri, 30 Aug 2024 07:58:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6da24bbsm49022345e9.0.2024.08.30.07.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 07:58:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Thomas Huth , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , David Hildenbrand , Ilya Leoshkevich , Cornelia Huck , Halil Pasic , Eric Farman , Christian Borntraeger , Nico Boehr , Nina Schoetterl-Glausch Subject: [PATCH v2 01/11] hw/s390/ccw-device: Convert to three-phase reset Date: Fri, 30 Aug 2024 15:58:02 +0100 Message-Id: <20240830145812.1967042-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240830145812.1967042-1-peter.maydell@linaro.org> References: <20240830145812.1967042-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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=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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the TYPE_CCW_DEVICE to three-phase reset. This is a device class which is subclassed, so it needs to be three-phase before we can convert the subclass. Signed-off-by: Peter Maydell Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: Philippe Mathieu-Daudé Acked-by: Thomas Huth --- hw/s390x/ccw-device.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c index a7d682e5af9..14c24e38904 100644 --- a/hw/s390x/ccw-device.c +++ b/hw/s390x/ccw-device.c @@ -44,9 +44,9 @@ static Property ccw_device_properties[] = { DEFINE_PROP_END_OF_LIST(), }; -static void ccw_device_reset(DeviceState *d) +static void ccw_device_reset_hold(Object *obj, ResetType type) { - CcwDevice *ccw_dev = CCW_DEVICE(d); + CcwDevice *ccw_dev = CCW_DEVICE(obj); css_reset_sch(ccw_dev->sch); } @@ -55,11 +55,12 @@ static void ccw_device_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); CCWDeviceClass *k = CCW_DEVICE_CLASS(klass); + ResettableClass *rc = RESETTABLE_CLASS(klass); k->realize = ccw_device_realize; k->refill_ids = ccw_device_refill_ids; device_class_set_props(dc, ccw_device_properties); - dc->reset = ccw_device_reset; + rc->phases.hold = ccw_device_reset_hold; dc->bus_type = TYPE_VIRTUAL_CSS_BUS; }