From nobody Mon Nov 25 16:35:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=linux.ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716880057112946.5237095455329; Tue, 28 May 2024 00:07:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBqux-0007Ia-HF; Tue, 28 May 2024 03:06:44 -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 1sBqun-0007AJ-Ap; Tue, 28 May 2024 03:06:33 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBquc-0004lM-7l; Tue, 28 May 2024 03:06:26 -0400 Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44S61SK0014709; Tue, 28 May 2024 07:05:47 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yd8wsr8m2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 07:05:46 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 44S75kqT016012; Tue, 28 May 2024 07:05:46 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yd8wsr8kw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 07:05:46 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44S6ZREF032649; Tue, 28 May 2024 07:05:45 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3ybutm596u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 07:05:45 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44S75dmr34144982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 May 2024 07:05:41 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBA9220040; Tue, 28 May 2024 07:05:39 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A77CE2004B; Tue, 28 May 2024 07:05:37 +0000 (GMT) Received: from li-3c92a0cc-27cf-11b2-a85c-b804d9ca68fa.in.ibm.com (unknown [9.109.199.72]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 28 May 2024 07:05:37 +0000 (GMT) DKIM-Signature: =?UTF-8?Q?v=3D1; _a=3Drsa-sha256; _c=3Drelaxed/relaxed; _d=3Dibm.com; _h=3Dcc?= =?UTF-8?Q?:content-transfer-encoding:content-type:date:from:in-reply-to:m?= =?UTF-8?Q?essage-id:mime-version:references:subject:to;_s=3Dpp1;_bh=3DW8B?= =?UTF-8?Q?jaysw443IWw7kJD6fjTEldh3vld9SoWsblYEZLHo=3D;_b=3DUkI4fjoMLmC5gj?= =?UTF-8?Q?PcIw1qKbSc3wDInL9TAOeECq0XHUUMCcergvdp22DoQClYzV9PTAyq_Fv0g5H6j?= =?UTF-8?Q?7cjRA3P4tviwWaOk5xqzCFQXK7vOL/M92Bi1+ekrdpvSCXwN9Df3HbTuOIUU_uf?= =?UTF-8?Q?sFhBN4r1Og13JeXqejL5+Y2E8usoVEmH9NI82c6IMN7zmJxIPhkG3VsQXdt0eMS?= =?UTF-8?Q?GA/_UFkp7GVf+QUPqf+S+svTryOkMV4+BtKF5C7RxkCt3adb/yIuzgPXnqgVfpQ?= =?UTF-8?Q?HOUodjhXm_bz84ycDC2vsL3tqc9MI4XrHCr0rOT8ZPby8KQqZ5qsrWLdktLX972?= =?UTF-8?Q?WEYlC6bqCZNbxG0_Vg=3D=3D_?= From: Aditya Gupta To: Mahesh J Salgaonkar , Madhavan Srinivasan , Nicholas Piggin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Cc: , , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= Subject: [PATCH v4 09/11] ppc/pnv: Add a PSI bridge model for Power11 Date: Tue, 28 May 2024 12:35:13 +0530 Message-ID: <20240528070515.117160-10-adityag@linux.ibm.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240528070515.117160-1-adityag@linux.ibm.com> References: <20240528070515.117160-1-adityag@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: NC83sVBmM5blULUoC6kF32yGGSwnoPyi X-Proofpoint-GUID: D6ggQu5RHb-DTBwoKWNhNUG88Ze-htxR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-28_04,2024-05-27_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 mlxlogscore=986 lowpriorityscore=0 priorityscore=1501 suspectscore=0 phishscore=0 spamscore=0 adultscore=0 bulkscore=0 clxscore=1015 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405280050 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=148.163.158.5; envelope-from=adityag@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1716880057400100003 Power11 core is same as Power10, reuse PNV10_PSI initialisation, by declaring 'PNV11_PSI' as child class of 'PNV10_PSI' Cc: C=C3=A9dric Le Goater Cc: Fr=C3=A9d=C3=A9ric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Aditya Gupta --- hw/ppc/pnv_psi.c | 24 ++++++++++++++++++++++++ include/hw/ppc/pnv_psi.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index 26460d210deb..1f708b183a87 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -939,6 +939,29 @@ static const TypeInfo pnv_psi_power10_info =3D { .name =3D TYPE_PNV10_PSI, .parent =3D TYPE_PNV9_PSI, .class_init =3D pnv_psi_power10_class_init, + .class_base_init =3D pnv_psi_power10_class_init, +}; + +static void pnv_psi_power11_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + PnvPsiClass *ppc =3D PNV_PSI_CLASS(klass); + static const char compat[] =3D "ibm,power11-psihb-x\0ibm,psihb-x"; + + dc->desc =3D "PowerNV PSI Controller POWER11"; + + /* + * ppc->xscom_pbca and ppc->xscom_size will be set up by + * pnv_psi_power10_class_init + */ + ppc->compat =3D compat; + ppc->compat_size =3D sizeof(compat); +} + +static const TypeInfo pnv_psi_power11_info =3D { + .name =3D TYPE_PNV11_PSI, + .parent =3D TYPE_PNV10_PSI, + .class_init =3D pnv_psi_power11_class_init, }; =20 static void pnv_psi_class_init(ObjectClass *klass, void *data) @@ -973,6 +996,7 @@ static void pnv_psi_register_types(void) type_register_static(&pnv_psi_power8_info); type_register_static(&pnv_psi_power9_info); type_register_static(&pnv_psi_power10_info); + type_register_static(&pnv_psi_power11_info); } =20 type_init(pnv_psi_register_types); diff --git a/include/hw/ppc/pnv_psi.h b/include/hw/ppc/pnv_psi.h index 2a6f715350b6..9e1d31779204 100644 --- a/include/hw/ppc/pnv_psi.h +++ b/include/hw/ppc/pnv_psi.h @@ -70,6 +70,8 @@ struct Pnv9Psi { =20 #define TYPE_PNV10_PSI TYPE_PNV_PSI "-POWER10" =20 +#define TYPE_PNV11_PSI TYPE_PNV_PSI "-POWER11" + =20 struct PnvPsiClass { SysBusDeviceClass parent_class; --=20 2.45.1