From nobody Mon Feb 9 23:03:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1603355206; cv=none; d=zohomail.com; s=zohoarc; b=c/9T13fL1AlVtkD7btkEXM5P9xbLZTMj+QfHNjKAyCfcbv66k72vJyLxMOXpw/CfnDOEyursqwAkKXe0mDTe4K0Gtx/kGrku8yXjuCUOFNz2FJ2wwdDjVxMn/xGdGjiKw+1QxWRjo2nljJb75GYI3EnXwZiqbcAMu3Yq1bv7MHg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603355206; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hCQdChAQCcyhN8Dlzatt/sr54/BTy2eCSaPSjnCiuAk=; b=ANqxB/uVESiuOcqhdsfZn5nNgRq0ieFB+9d8B54XHbReiEU/g8Z3vWkNaJmrMxfi+CEQgvfsbTXNHtDvXv7kboklgRRa5vlGfKAAbtd3SQiytR8F5e8NtNRCdO48IOUO6/D2mnNNsg0NqzP6jx7HjnQ/zXKxx/VhKuYR7sryQdg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603355206595756.0818685561175; Thu, 22 Oct 2020 01:26:46 -0700 (PDT) Received: from localhost ([::1]:58210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVVvn-0005ot-S6 for importer@patchew.org; Thu, 22 Oct 2020 04:26:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVVuf-0004L7-4R; Thu, 22 Oct 2020 04:25:33 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:53572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVVub-00069t-JD; Thu, 22 Oct 2020 04:25:32 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09M8OvPr168283; Thu, 22 Oct 2020 08:25:25 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 349jrpvpry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Oct 2020 08:25:25 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09M8G8NX094828; Thu, 22 Oct 2020 08:25:25 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 348a6qbcp6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Oct 2020 08:25:25 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 09M8PN0x000463; Thu, 22 Oct 2020 08:25:23 GMT Received: from mihai.localdomain (/10.153.73.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 22 Oct 2020 01:25:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=hCQdChAQCcyhN8Dlzatt/sr54/BTy2eCSaPSjnCiuAk=; b=brlWcWcPrOamM6i6Cn/T859qreXgf4XVvMYWowMyNEtzzkN1QDWNirW77EvguQiKYX/4 XPsvMak4a3l+vfnf+8I5F4soshQ/eVVyu1FmmQ7c9XnmE4D1CYXvTXO2NRnO0rncCzQB KX78y3jle0ptePKyKOU3ndXxv5LvJ53uLAqbRT6LTGtVVCNPzocsLnD2Hx/XV/4VIDCR ydSgqEkfeNg9RWvYosBLXRzkoxRVtHsjlypUP/C9LCU/43YRoy0B1vcRiEXqvMxCrdR2 R1kLPqKTi5UHPTkERSxuduAwRkGyg+sxfBRTP6jLlj5CJj9gGw4vZcxdnXKFh4rbYegB nQ== From: Mihai Carabas To: peter.maydell@linaro.org, shannon.zhaosl@gmail.com, mst@redhat.com, imammedo@redhat.com Subject: [PATCH 2/8] hw/misc/pvpanic: Cosmetic renaming Date: Thu, 22 Oct 2020 10:42:50 +0300 Message-Id: <1603352576-21671-3-git-send-email-mihai.carabas@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1603352576-21671-1-git-send-email-mihai.carabas@oracle.com> References: <1603352576-21671-1-git-send-email-mihai.carabas@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9781 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 adultscore=0 suspectscore=1 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010220055 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9781 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 spamscore=0 suspectscore=1 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010220056 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=141.146.126.78; envelope-from=mihai.carabas@oracle.com; helo=aserp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/22 04:25:28 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Mihai Carabas , Peng Hao , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 To ease the MMIO device addition in the next patch, rename: - ISA_PVPANIC_DEVICE -> PVPANIC_ISA_DEVICE. - PVPanicState -> PVPanicISAState. - TYPE_PVPANIC -> TYPE_PVPANIC_ISA. - MemoryRegion io -> mr. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- hw/misc/pvpanic.c | 28 ++++++++++++++++------------ include/hw/misc/pvpanic.h | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index 598d547..2e085f4 100644 --- a/hw/misc/pvpanic.c +++ b/hw/misc/pvpanic.c @@ -30,9 +30,9 @@ #define PVPANIC_PANICKED (1 << PVPANIC_F_PANICKED) #define PVPANIC_CRASHLOADED (1 << PVPANIC_F_CRASHLOADED) =20 -typedef struct PVPanicState PVPanicState; -DECLARE_INSTANCE_CHECKER(PVPanicState, ISA_PVPANIC_DEVICE, - TYPE_PVPANIC) +typedef struct PVPanicISAState PVPanicISAState; +DECLARE_INSTANCE_CHECKER(PVPanicISAState, PVPANIC_ISA_DEVICE, + TYPE_PVPANIC_ISA) =20 static void handle_event(int event) { @@ -56,10 +56,14 @@ static void handle_event(int event) =20 #include "hw/isa/isa.h" =20 -struct PVPanicState { +/* + * PVPanicISAState for ISA device and + * use ioport. + */ +struct PVPanicISAState { ISADevice parent_obj; =20 - MemoryRegion io; + MemoryRegion mr; uint16_t ioport; }; =20 @@ -86,15 +90,15 @@ static const MemoryRegionOps pvpanic_ops =3D { =20 static void pvpanic_isa_initfn(Object *obj) { - PVPanicState *s =3D ISA_PVPANIC_DEVICE(obj); + PVPanicISAState *s =3D PVPANIC_ISA_DEVICE(obj); =20 - memory_region_init_io(&s->io, OBJECT(s), &pvpanic_ops, s, "pvpanic", 1= ); + memory_region_init_io(&s->mr, OBJECT(s), &pvpanic_ops, s, "pvpanic", 1= ); } =20 static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp) { ISADevice *d =3D ISA_DEVICE(dev); - PVPanicState *s =3D ISA_PVPANIC_DEVICE(dev); + PVPanicISAState *s =3D PVPANIC_ISA_DEVICE(dev); FWCfgState *fw_cfg =3D fw_cfg_find(); uint16_t *pvpanic_port; =20 @@ -107,11 +111,11 @@ static void pvpanic_isa_realizefn(DeviceState *dev, E= rror **errp) fw_cfg_add_file(fw_cfg, "etc/pvpanic-port", pvpanic_port, sizeof(*pvpanic_port)); =20 - isa_register_ioport(d, &s->io, s->ioport); + isa_register_ioport(d, &s->mr, s->ioport); } =20 static Property pvpanic_isa_properties[] =3D { - DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicState, ioport, 0x505), + DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicISAState, ioport, 0x505= ), DEFINE_PROP_END_OF_LIST(), }; =20 @@ -125,9 +129,9 @@ static void pvpanic_isa_class_init(ObjectClass *klass, = void *data) } =20 static TypeInfo pvpanic_isa_info =3D { - .name =3D TYPE_PVPANIC, + .name =3D TYPE_PVPANIC_ISA, .parent =3D TYPE_ISA_DEVICE, - .instance_size =3D sizeof(PVPanicState), + .instance_size =3D sizeof(PVPanicISAState), .instance_init =3D pvpanic_isa_initfn, .class_init =3D pvpanic_isa_class_init, }; diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h index ae0c818..30e9f8f 100644 --- a/include/hw/misc/pvpanic.h +++ b/include/hw/misc/pvpanic.h @@ -17,7 +17,7 @@ =20 #include "qom/object.h" =20 -#define TYPE_PVPANIC "pvpanic" +#define TYPE_PVPANIC_ISA "pvpanic" =20 #define PVPANIC_IOPORT_PROP "ioport" =20 --=20 1.8.3.1