From patchwork Wed Jan 15 12:36:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Damien Hedde X-Patchwork-Id: 1223453 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=greensocs.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=greensocs.com header.i=@greensocs.com header.a=rsa-sha256 header.s=mail header.b=x/tu4lda; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47yS0h08xsz9sR0 for ; Wed, 15 Jan 2020 23:52:52 +1100 (AEDT) Received: from localhost ([::1]:53354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iriAD-0005fA-O0 for incoming@patchwork.ozlabs.org; Wed, 15 Jan 2020 07:52:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49948) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irhv6-0002dh-8Y for qemu-devel@nongnu.org; Wed, 15 Jan 2020 07:37:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irhv4-0003UE-VJ for qemu-devel@nongnu.org; Wed, 15 Jan 2020 07:37:11 -0500 Received: from beetle.greensocs.com ([5.135.226.135]:53642) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1irhv4-00039e-Kc; Wed, 15 Jan 2020 07:37:10 -0500 Received: from crumble.bar.greensocs.com (crumble.bar.greensocs.com [172.16.11.102]) by beetle.greensocs.com (Postfix) with ESMTPS id F272A96F5A; Wed, 15 Jan 2020 12:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greensocs.com; s=mail; t=1579091809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A200JO54MkQoOmODnSQmBmwrO6FBHxiDZCez46fi7Ok=; b=x/tu4ldajJWG58Z6tZ+0OLLjuUuQlgkfY4jCLCu3D0TrCatAtDVCLLg0DSXes9mUJi23gm MNd9TcYUr6Hynzbdq0kcZg6HW/Dp4NUfEXbY8SAYM9djMJz3GkhBKvlJmcbwbrUbrxMZql QdN6ckUx4kEKl1jYXCp85/O/q3Jlavg= From: Damien Hedde To: qemu-devel@nongnu.org Subject: [PATCH v7 11/11] hw/s390x/ipl: replace deprecated qdev_reset_all registration Date: Wed, 15 Jan 2020 13:36:20 +0100 Message-Id: <20200115123620.250132-12-damien.hedde@greensocs.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200115123620.250132-1-damien.hedde@greensocs.com> References: <20200115123620.250132-1-damien.hedde@greensocs.com> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=greensocs.com; s=mail; t=1579091809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A200JO54MkQoOmODnSQmBmwrO6FBHxiDZCez46fi7Ok=; b=JkQ1sl83yadXvhL60HLz80osbb9HZz4ghFLgPiE5SbHICuC1nP3omyjUr+Us5rmsQbulka ZroS2WI63V6RPqlvqTT3DCAAFXX/NIQtx73Ahm5TrxcAR0gQx6LSU2tKPucXbzyvD50C7j r7Gl+TR39A7Z/FDqaysBzIAUWGS/RJY= ARC-Seal: i=1; s=mail; d=greensocs.com; t=1579091809; a=rsa-sha256; cv=none; b=lveSePYfu5IazCZo/1ximFuR4YJDe4UcmQAAD4lQlHr/5GJzA76wsJ9s8RU1SGCUPUddA4 WW+7nH4Jrz/fs9pJOjDlG8nDlQ7mr5fluq06INkLF4WZCzkMMG2b1ASM3X4sY+Fsz/2RJg +rYI2tbswU1gzau992s6VEhn5X/+6aI= ARC-Authentication-Results: i=1; beetle.greensocs.com; none X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 5.135.226.135 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , peter.maydell@linaro.org, Thomas Huth , berrange@redhat.com, ehabkost@redhat.com, Richard Henderson , cohuck@redhat.com, mark.burton@greensocs.com, qemu-s390x@nongnu.org, Christian Borntraeger , edgari@xilinx.com, pbonzini@redhat.com, philmd@redhat.com, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Replace deprecated qdev_reset_all by resettable_cold_reset_fn for the ipl registration in the main reset handlers. This does not impact the behavior for the following reasons: + at this point resettable just call the old reset methods of devices and buses in the same order than qdev/qbus. + resettable handlers registered with qemu_register_reset are serialized; there is no interleaving. + eventual explicit calls to legacy reset API (device_reset or qdev/qbus_reset) inside this reset handler will not be masked out by resettable mechanism; they do not go through resettable api. Signed-off-by: Damien Hedde Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Cornelia Huck Reviewed-by: Richard Henderson --- Cc: qemu-s390x@nongnu.org Cc: Christian Borntraeger Cc: Thomas Huth --- hw/s390x/ipl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index ca544d64c5..2689f7a017 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -237,7 +237,15 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp) */ ipl->compat_start_addr = ipl->start_addr; ipl->compat_bios_start_addr = ipl->bios_start_addr; - qemu_register_reset(qdev_reset_all_fn, dev); + /* + * Because this Device is not on any bus in the qbus tree (it is + * not a sysbus device and it's not on some other bus like a PCI + * bus) it will not be automatically reset by the 'reset the + * sysbus' hook registered by vl.c like most devices. So we must + * manually register a reset hook for it. + * TODO: there should be a better way to do this. + */ + qemu_register_reset(resettable_cold_reset_fn, dev); error: error_propagate(errp, err); }