From nobody Sat May 4 02:09:42 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564661210; cv=none; d=zoho.com; s=zohoarc; b=ZPg6bVahJUv57qAqwzD/CsghFENRsOsK8JHztv2LQhlyynmPGfFb48gvz96ptj/8fMDWd8EesixqM6NvgpDYuxVv3x5jN94tZnoZ8KdvLBDSopzRDy30uMvdCgIDVML0FGyhkODyJcWbCB/dbpr8roo0Cs4F9T6WbqlHVF+s3jE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564661210; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=8seAuNTGdZnfaOB0AjQDcbV760LCDFk785hFqtF6EhA=; b=H3a9rAqR1UTLS3xJNecgGNksLNHcD+n21w84eoZSbA7lHOj4BaG3+ySu/RuLSXJRZFeEqUinF4SKaXOI8hQbjVJQn31hjkC3QMaRoc6zWEaBdIeN/gxiKoOewnFqfZfcF1MWNjfXXjpuDGswS43wvqc5zEAl+igNA08VG2BiMVk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564661210975814.3490340966247; Thu, 1 Aug 2019 05:06:50 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ht9pt-0002Ka-Mb; Thu, 01 Aug 2019 12:05:33 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ht9ps-0002KT-N7 for xen-devel@lists.xenproject.org; Thu, 01 Aug 2019 12:05:32 +0000 Received: from mail-lf1-x144.google.com (unknown [2a00:1450:4864:20::144]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id a85e2090-b454-11e9-8980-bc764e045a96; Thu, 01 Aug 2019 12:05:31 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id c9so50003261lfh.4 for ; Thu, 01 Aug 2019 05:05:31 -0700 (PDT) Received: from 3489.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id u18sm12147150lfe.65.2019.08.01.05.05.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 05:05:29 -0700 (PDT) X-Inumbo-ID: a85e2090-b454-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lsh6Uzyr0dItLdqmqOxb7/3w2WzbhbJL6Ehl7l0MBko=; b=SJCtxtf5kNzEDFLfBRoOEhcyf7foNfHw41J9NeLTbEFGHv0J2OyAzw+eiPPpM0EgLh cU8LwlwpNteYofgi9xj+XKc0+BY08FnHaVqaOEG9B1mwMXfsOzubA12LuhAjm2Pzgk/Q 3Ot972HRyLrjLwhw5nZzBPTKpdAOlCLzjjTGmCCYt2/XSXMAE1CVyWsskQj0j/6y1IrQ 9ne4+5F8fDgC/tyCAT99A+0tadCU+4bbPzoTyAh4rJwHmTlOL3uAPY+6CAbsj+rGgoxv up1OChNBOOj5UTlviF/Wo9du3zNgFof0ZBXB4ZsU+uZ0EkOfOHP16Vg6zfkRA1gnOP4C c08A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lsh6Uzyr0dItLdqmqOxb7/3w2WzbhbJL6Ehl7l0MBko=; b=Cc84Kiqj2DjozcGr4nrvYv2aPlsdYRiBteYvkdaxf5xPT14cSofp7zEZ/gbipwfdqF UMm9aZFI+wlNetIByTMj6Mr3kS4h9L69qK/XWgkmwDbw/ZHAO+Qc75rA/V4o3noQOSj1 mouI7VV/Qib/Ci/hDSOAtoE2gFJ1QLM0NLehD2bg+OP/iWWifd/ixzcf+647TIECun02 JxZanMoWLecMHl/XScDSHEK2gdjSXFW4vn2dE6rfefChydxDRO7dNpbqCrt6b4XH190K n+ZgRwOawt0ihSlchPj++LYi5bnwXCtOLaLq25N9hfkwei4oxRtQ1TPDL4eduoz9SnPb x9gg== X-Gm-Message-State: APjAAAXnS6TxfS7eC5Q6PUB2gK0Elon0bjbQ69E2f2VFF4aL/eAgAuwZ FrPAX/uwDvkVLWPWCcjWV55e7UjW3sw= X-Google-Smtp-Source: APXvYqz2qz4hA1OV7wGwx2A/wZlH6ZAiE4PbbJp2Q7X0SMugVa9lugR67VQ5bsVWaKAtrWErigBIgQ== X-Received: by 2002:a19:8c57:: with SMTP id i23mr59581232lfj.192.1564661129949; Thu, 01 Aug 2019 05:05:29 -0700 (PDT) From: Viktor Mitin To: xen-devel@lists.xenproject.org Date: Thu, 1 Aug 2019 15:04:51 +0300 Message-Id: <20190801120452.6814-2-viktor.mitin.19@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190801120452.6814-1-viktor.mitin.19@gmail.com> References: <20190801120452.6814-1-viktor.mitin.19@gmail.com> Subject: [Xen-devel] [PATCH v5 1/2] xen/arm: extend fdt_property_interrupts to support DomU X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Viktor Mitin , Viktor Mitin MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Extend fdt_property_interrupts to deal with other domain than the hwdom. The prototype of fdt_property_interrupts() has been modified to support both hwdom and domU in one function. The new prototype of make_timer_node function is required since make_timer_node calls fdt_property_interrupts which uses kinfo: make_timer_node(const struct kernel_info *kinfo) This is a preparatory for the next patch which consolidates make_timer_node and make_timer_domU_node". Original goal is to consolidate make_timer functions. Suggested-by: Julien Grall Signed-off-by: Viktor Mitin --- xen/arch/arm/domain_build.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 4c8404155a..bc7d17dd2c 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -621,17 +621,20 @@ static void __init set_interrupt(gic_interrupt_t inte= rrupt, * "interrupts": contains the list of interrupts * "interrupt-parent": link to the GIC */ -static int __init fdt_property_interrupts(void *fdt, gic_interrupt_t *intr, +static int __init fdt_property_interrupts(const struct kernel_info *kinfo, + gic_interrupt_t *intr, unsigned num_irq) { int res; + uint32_t phandle =3D is_hardware_domain(kinfo->d) ? + dt_interrupt_controller->phandle : GUEST_PHANDLE_GI= C; - res =3D fdt_property(fdt, "interrupts", intr, sizeof (intr[0]) * num_i= rq); + res =3D fdt_property(kinfo->fdt, "interrupts", + intr, sizeof (intr[0]) * num_irq); if ( res ) return res; - res =3D fdt_property_cell(fdt, "interrupt-parent", - dt_interrupt_controller->phandle); + res =3D fdt_property_cell(kinfo->fdt, "interrupt-parent", phandle); return res; } @@ -733,7 +736,7 @@ static int __init make_hypervisor_node(struct domain *d, * TODO: Handle properly the cpumask; */ set_interrupt(intr, d->arch.evtchn_irq, 0xf, DT_IRQ_TYPE_LEVEL_LOW); - res =3D fdt_property_interrupts(fdt, &intr, 1); + res =3D fdt_property_interrupts(kinfo, &intr, 1); if ( res ) return res; @@ -960,8 +963,9 @@ static int __init make_gic_node(const struct domain *d,= void *fdt, return res; } -static int __init make_timer_node(const struct domain *d, void *fdt) +static int __init make_timer_node(const struct kernel_info *kinfo) { + void *fdt =3D kinfo->fdt; static const struct dt_device_match timer_ids[] __initconst =3D { DT_MATCH_COMPATIBLE("arm,armv7-timer"), @@ -1016,7 +1020,7 @@ static int __init make_timer_node(const struct domain= *d, void *fdt) dt_dprintk(" Virt interrupt %u\n", irq); set_interrupt(intrs[2], irq, 0xf, DT_IRQ_TYPE_LEVEL_LOW); - res =3D fdt_property_interrupts(fdt, intrs, 3); + res =3D fdt_property_interrupts(kinfo, intrs, 3); if ( res ) return res; @@ -1377,7 +1381,7 @@ static int __init handle_node(struct domain *d, struc= t kernel_info *kinfo, if ( device_get_class(node) =3D=3D DEVICE_GIC ) return make_gic_node(d, kinfo->fdt, node); if ( dt_match_node(timer_matches, node) ) - return make_timer_node(d, kinfo->fdt); + return make_timer_node(kinfo); /* Skip nodes used by Xen */ if ( dt_device_used_by(node) =3D=3D DOMID_XEN ) -- 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sat May 4 02:09:42 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564661219; cv=none; d=zoho.com; s=zohoarc; b=OOZMQc68JIIRKgeO/q5FN3PPXC9uDYs+6+0vXIQxETa5sxc/a5HCJUd5WuvpXOvNlx9H55z9R2N2BDfACqBnSHZuqyuKPDEl5H5LZ0SQUvCWB8tN79EVYjbZ0j1z3vmPD2Z6rjRaJ+J28O2aAHjT3saMNy5XcgPmRKf4SNCgG40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564661219; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ed0UebafeV3JwMIEEVWBn+KA/ooMEZahDPuwJBawgZM=; b=U1RUtmPCaNfVb4Kwc84ovb2aVpIgDpM7j/ACC/Qe5mfZhk5AGwcge+4AWCejgdPxTOPl6FOBMY1dQaseC5kvSDM0RWMV6UUIomgZ3nziUMDH7fNCOFsAC+WyMT/7/+eRG/utvzV9OO7quuAmoegluIdSBrtMiqWG07d4KlEhuU0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564661219519939.4800220137122; Thu, 1 Aug 2019 05:06:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ht9pz-0002LF-03; Thu, 01 Aug 2019 12:05:38 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ht9py-0002L7-16 for xen-devel@lists.xenproject.org; Thu, 01 Aug 2019 12:05:38 +0000 Received: from mail-lj1-x241.google.com (unknown [2a00:1450:4864:20::241]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id ab7185bd-b454-11e9-8980-bc764e045a96; Thu, 01 Aug 2019 12:05:36 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id v18so69065334ljh.6 for ; Thu, 01 Aug 2019 05:05:36 -0700 (PDT) Received: from 3489.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id u18sm12147150lfe.65.2019.08.01.05.05.34 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 05:05:34 -0700 (PDT) X-Inumbo-ID: ab7185bd-b454-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HuOjIzz1M8CEnJZd66BCEfSyypiUYI4PIF63pd0WSRw=; b=cfZ/g1qG4Qr0oprxD0SbN1DvE2YhkFbAqSzhpVXhwS98Dfmqn/3NtwPdkd+S71BWPr fCjWJ+qMGbLjg9vSeJswf3OiMJCxRw9u5YefHIT7uwUaY3TGqlttkzxDlLF0e8y+9FdQ jzu8abcFF+vm2G2IqyVgJrDEiphdxzvyBvr06Lq1ftK/CXG+Fy0w+o0emRO7W9Psk+RE EEoM66GEIcXoEsfdWJzrxqQCrmfNq3LUJGkmH4LYNGjLPF5diQQ1+sEWmuEAJqyDPFjY z8oxi1Gny4IlyMDIm1Bq0muK8K1Wwi+DmfxiwybQ6xejwMekfAguzfhkuHyjAMU53WsH /HpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HuOjIzz1M8CEnJZd66BCEfSyypiUYI4PIF63pd0WSRw=; b=nQcrdT2W0+7sBSXnOHfjH8/9dF1TMbYhzqphAXC+NtfsDWT7D0GGYRGv3DkEnZUy06 z1rH2S5g241WW4nPSEm21XMfD/iVpmEQzvtVxhAqoNgapzF5z88Y4k4WZdzhrFBSQI7g QOT84UvtvLdUfRBvZdm7Mlz53vTGv9prSLtikOTpsFyd39zszOnqbgTEW3whnnIULc8y F97tW2Fm9HhdW+xhWKfh/Yo9L4qjdXlC419vZrSLKoP6kWYUr4vYMhDWfA4wQo+gCrQx E5j7nCQS0XrnWc9tzplpxYL0slewckckg2cjj8wA9wdSFxiBj5J79AO/abCIuXMsLBuI FonQ== X-Gm-Message-State: APjAAAUNKt0/V0XBsPYuUbC2ihAqyulh+/049JbIEJPpWV9sSYl0tN99 AeR2yWP2M+3/zOSHAMkb2wBQpo7LXGU= X-Google-Smtp-Source: APXvYqyYcDYPRlVZEYU0m8x2hQZ3JSqNxDClQgL9fg9y94Hhf3Ib59jX/Hw9ihPDg2YT7TenLRnRpA== X-Received: by 2002:a2e:8ed2:: with SMTP id e18mr26301962ljl.235.1564661135137; Thu, 01 Aug 2019 05:05:35 -0700 (PDT) From: Viktor Mitin To: xen-devel@lists.xenproject.org Date: Thu, 1 Aug 2019 15:04:52 +0300 Message-Id: <20190801120452.6814-3-viktor.mitin.19@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190801120452.6814-1-viktor.mitin.19@gmail.com> References: <20190801120452.6814-1-viktor.mitin.19@gmail.com> Subject: [Xen-devel] [PATCH v5 2/2] xen/arm: consolidate make_timer_node and make_timer_domU_node X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Viktor Mitin , Viktor Mitin MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Functions make_timer_node and make_timer_domU_node are quite similar. So it is better to consolidate them to avoid discrepancy. The main difference between the functions is the timer interrupts used. Keep the domU version for the compatible as it is simpler. Mean do not copy platform's 'compatible' property into hwdom device tree, instead set either arm,armv7-timer or arm,armv8-timer, depending on the platform type. Keep the hw version for the clock as it is relevant for the both cases. The new function has changed prototype due to fdt_property_interrupts make_timer_node(const struct kernel_info *kinfo) Suggested-by: Julien Grall Signed-off-by: Viktor Mitin --- v4 updates: updated "Keep the domU version for the compatible as it is simpler" v5 updates: - changed 'kept' to 'keep', etc. - removed empty line - updated indentation of parameters in functions calls - fixed NITs - updated commit message --- xen/arch/arm/domain_build.c | 106 +++++++++++++----------------------- 1 file changed, 39 insertions(+), 67 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index bc7d17dd2c..58542130ca 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -973,10 +973,8 @@ static int __init make_timer_node(const struct kernel_= info *kinfo) { /* sentinel */ }, }; struct dt_device_node *dev; - u32 len; - const void *compatible; int res; - unsigned int irq; + unsigned int irq[MAX_TIMER_PPI]; gic_interrupt_t intrs[3]; u32 clock_frequency; bool clock_valid; @@ -990,35 +988,49 @@ static int __init make_timer_node(const struct kernel= _info *kinfo) return -FDT_ERR_XEN(ENOENT); } =20 - compatible =3D dt_get_property(dev, "compatible", &len); - if ( !compatible ) - { - dprintk(XENLOG_ERR, "Can't find compatible property for timer node= \n"); - return -FDT_ERR_XEN(ENOENT); - } - res =3D fdt_begin_node(fdt, "timer"); if ( res ) return res; =20 - res =3D fdt_property(fdt, "compatible", compatible, len); - if ( res ) - return res; - - /* The timer IRQ is emulated by Xen. It always exposes an active-low - * level-sensitive interrupt */ - - irq =3D timer_get_irq(TIMER_PHYS_SECURE_PPI); - dt_dprintk(" Secure interrupt %u\n", irq); - set_interrupt(intrs[0], irq, 0xf, DT_IRQ_TYPE_LEVEL_LOW); + if ( !is_64bit_domain(kinfo->d) ) + { + res =3D fdt_property_string(fdt, "compatible", "arm,armv7-timer"); + if ( res ) + return res; + } + else + { + res =3D fdt_property_string(fdt, "compatible", "arm,armv8-timer"); + if ( res ) + return res; + } =20 - irq =3D timer_get_irq(TIMER_PHYS_NONSECURE_PPI); - dt_dprintk(" Non secure interrupt %u\n", irq); - set_interrupt(intrs[1], irq, 0xf, DT_IRQ_TYPE_LEVEL_LOW); + /* + * The timer IRQ is emulated by Xen. + * It always exposes an active-low level-sensitive interrupt + */ =20 - irq =3D timer_get_irq(TIMER_VIRT_PPI); - dt_dprintk(" Virt interrupt %u\n", irq); - set_interrupt(intrs[2], irq, 0xf, DT_IRQ_TYPE_LEVEL_LOW); + if ( is_hardware_domain(kinfo->d) ) + { + irq[TIMER_PHYS_SECURE_PPI] =3D timer_get_irq(TIMER_PHYS_SECURE_PPI= ); + irq[TIMER_PHYS_NONSECURE_PPI] =3D + timer_get_irq(TIMER_PHYS_NONSECURE_PPI= ); + irq[TIMER_VIRT_PPI] =3D timer_get_irq(TIMER_VIRT_PPI); + } + else + { + irq[TIMER_PHYS_SECURE_PPI] =3D GUEST_TIMER_PHYS_S_PPI; + irq[TIMER_PHYS_NONSECURE_PPI] =3D GUEST_TIMER_PHYS_NS_PPI; + irq[TIMER_VIRT_PPI] =3D GUEST_TIMER_VIRT_PPI; + } + dt_dprintk(" Secure interrupt %u\n", irq[TIMER_PHYS_SECURE_PPI]); + set_interrupt(intrs[0], irq[TIMER_PHYS_SECURE_PPI], + 0xf, DT_IRQ_TYPE_LEVEL_LOW); + dt_dprintk(" Non secure interrupt %u\n", irq[TIMER_PHYS_NONSECURE_PPI= ]); + set_interrupt(intrs[1], irq[TIMER_PHYS_NONSECURE_PPI], + 0xf, DT_IRQ_TYPE_LEVEL_LOW); + dt_dprintk(" Virt interrupt %u\n", irq[TIMER_VIRT_PPI]); + set_interrupt(intrs[2], irq[TIMER_VIRT_PPI], 0xf, DT_IRQ_TYPE_LEVEL_LO= W); =20 res =3D fdt_property_interrupts(kinfo, intrs, 3); if ( res ) @@ -1603,46 +1615,6 @@ static int __init make_gic_domU_node(const struct do= main *d, void *fdt) } } =20 -static int __init make_timer_domU_node(const struct domain *d, void *fdt) -{ - int res; - gic_interrupt_t intrs[3]; - - res =3D fdt_begin_node(fdt, "timer"); - if ( res ) - return res; - - if ( !is_64bit_domain(d) ) - { - res =3D fdt_property_string(fdt, "compatible", "arm,armv7-timer"); - if ( res ) - return res; - } - else - { - res =3D fdt_property_string(fdt, "compatible", "arm,armv8-timer"); - if ( res ) - return res; - } - - set_interrupt(intrs[0], GUEST_TIMER_PHYS_S_PPI, 0xf, DT_IRQ_TYPE_LEVEL= _LOW); - set_interrupt(intrs[1], GUEST_TIMER_PHYS_NS_PPI, 0xf, DT_IRQ_TYPE_LEVE= L_LOW); - set_interrupt(intrs[2], GUEST_TIMER_VIRT_PPI, 0xf, DT_IRQ_TYPE_LEVEL_L= OW); - - res =3D fdt_property(fdt, "interrupts", intrs, sizeof (intrs[0]) * 3); - if ( res ) - return res; - - res =3D fdt_property_cell(fdt, "interrupt-parent", - GUEST_PHANDLE_GIC); - if (res) - return res; - - res =3D fdt_end_node(fdt); - - return res; -} - #ifdef CONFIG_SBSA_VUART_CONSOLE static int __init make_vpl011_uart_node(const struct domain *d, void *fdt) { @@ -1748,7 +1720,7 @@ static int __init prepare_dtb_domU(struct domain *d, = struct kernel_info *kinfo) if ( ret ) goto err; =20 - ret =3D make_timer_domU_node(d, kinfo->fdt); + ret =3D make_timer_node(kinfo); if ( ret ) goto err; =20 --=20 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel