From nobody Sat May 4 04:57:41 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=1565005503; cv=none; d=zoho.com; s=zohoarc; b=IxRJcDx056Jfyarnh9YFTdH7SF3cKUEJZpvqanjYX2xz5KDbMp3bBRfr0XWDx1cqV/52Q3HLGBJtZvUWgp4oefgdNOM8M5atQRHBcy1b28YIK6XSU8SXbuR5rpjhDZJHtrtWUqJuzKh7c4DPvkUyuIrIH8zcSKPKdVBlPctN/LQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565005503; 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=eb0SDmVZSKTE5A6aOdo9zy3d7F2Ggz3HurzKsGF2/lQ=; b=cH/0hvgjzi3tQFFbIce3M5M565tcDG4rTSYuvF7QwS6WKeNgtbFb9evAiIyXQLwjAYxtqccYjugJBthoBk5J7lauRPQDs9nA2hbYT+neQUDul3IPet7AHc3qmGm6Q5sZZzCbElZNT6kxe2X2DmQ9jJpFZXKInNGVND0fkMePgq0= 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 1565005503756808.5122162632092; Mon, 5 Aug 2019 04:45:03 -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 1hubP4-0003qV-EZ; Mon, 05 Aug 2019 11:43:50 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hubP3-0003qF-5x for xen-devel@lists.xenproject.org; Mon, 05 Aug 2019 11:43:49 +0000 Received: from mail-lj1-x244.google.com (unknown [2a00:1450:4864:20::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 48be938d-b776-11e9-8980-bc764e045a96; Mon, 05 Aug 2019 11:43:47 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id v24so79167696ljg.13 for ; Mon, 05 Aug 2019 04:43:47 -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 b1sm17285057ljj.26.2019.08.05.04.43.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 05 Aug 2019 04:43:45 -0700 (PDT) X-Inumbo-ID: 48be938d-b776-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=8JuvpGQ3wx8Yo7D6k7rA2XzkzCzB1WWESXIUApcCbpc=; b=OXytcxTGZ85Q9fXekMiP9JXk07frLjSow4YCeQ6ORX1pHYexTvDlvjs+JY8Rjs9wWQ xUAuf/qpEXfdZzBVuKBVZuRZsiPVcdMxWoxOpj9/uKgb72zFSVaqFEj3OY9FGBE5rmFI WrD+wkLBz4yS11/tIS7byVVl5wSeQNirxQ7P2eqQpd7rKc4idPr9hvzqDe2VrTkRr2Na 9Marf5qF0rdLnS4IiQ85DYle++VzmFTSubjYEaH5TWyLyA3r8Yrn3mJ+XsVdpGPeNuLn BDViWjoBcQ+rs1bKySGfw/PkuksRL/IEh1T7rSPwWEPRvY7c6yLTuoSZ9w88Z6VuGFps bmxg== 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=8JuvpGQ3wx8Yo7D6k7rA2XzkzCzB1WWESXIUApcCbpc=; b=R6o/p89PpcImWYZmZhf18vOnk17pqoPmgLfcC9e9J3H4FJLTiwP8h7KWKpgfY5rz6+ BSbgX8YYa540Z0amUhC5lpjhBFVSRHYG4HTY0U/DTzLcpg9aMnUgcZmK0ghoJbv98/63 yM3osFyy8oXYx8wTk8dMhBsYhpQ0ke00WDH4HE+jLdwxAShzj52F/xtoWMSHvbTAXhJY eHRFIBKU/l944Or8dd+ed1po3r0K8j9BEma6bjd9uEmPsoFl+iimlsUMmC7NX8dxgI3h Ft1PM8qAdo1UofBZwfg7jovAnehuCSfcN+CCWX1mhCB4WmdkXeqjn235JNo8IFg6uX1a BU7w== X-Gm-Message-State: APjAAAWOzwbnxEjyQ9at1VqbTyhNi8KUdMgW04DnZW5LzOgHUJzvZR01 POaWLXA9qJ/gHpSYXTmMaCawyNVq X-Google-Smtp-Source: APXvYqxMQQvjlH8eQB3el0yNgkPHeja/iNbwW0eF+5OcRJe31Eo28zN0qOEq74uEusoF/ine1ZC33w== X-Received: by 2002:a05:651c:92:: with SMTP id 18mr70406302ljq.35.1565005425942; Mon, 05 Aug 2019 04:43:45 -0700 (PDT) From: Viktor Mitin To: xen-devel@lists.xenproject.org Date: Mon, 5 Aug 2019 14:43:30 +0300 Message-Id: <20190805114332.15329-2-viktor.mitin.19@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190805114332.15329-1-viktor.mitin.19@gmail.com> References: <20190805114332.15329-1-viktor.mitin.19@gmail.com> Subject: [Xen-devel] [PATCH v6 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. 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; =20 - 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; =20 - res =3D fdt_property_cell(fdt, "interrupt-parent", - dt_interrupt_controller->phandle); + res =3D fdt_property_cell(kinfo->fdt, "interrupt-parent", phandle); =20 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; =20 @@ -960,8 +963,9 @@ static int __init make_gic_node(const struct domain *d,= void *fdt, return res; } =20 -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); =20 - res =3D fdt_property_interrupts(fdt, intrs, 3); + res =3D fdt_property_interrupts(kinfo, intrs, 3); if ( res ) return res; =20 @@ -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); =20 /* Skip nodes used by Xen */ if ( dt_device_used_by(node) =3D=3D DOMID_XEN ) --=20 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 04:57:41 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=1565005510; cv=none; d=zoho.com; s=zohoarc; b=AeoPS5KITo5Nm+VQtSYH8z/rzV3J/rictkHIONLkZtnTXwG0Kw1B68wEoz0J3ebdz9d5z7jQzxqstZe9Qag4QvAmpSlcmhgYGRK77efvgN0bbbXmQdi1VGGvyBXPdQRYrLLD3Ync4mHghLOUe46yCfVvtw4J2X/HRK3RZmteZaM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565005510; 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=3gq2PWn2qYk/tKJbUMZ3tvOudEQqmWwjYyDWeaLlvwM=; b=VurQxnX9TIcQ0JZ0lc/jfyuQKzZKmZ10Suz8n/hIdXoGP+jZA8H88tjmwsqNRWq86mKD7zM1BnRJb05gUqNgM9SmGQ6h5+PyAEaI9TR+Ajt6cRxG1wNXFzdv8cr/flGwiPpglOVLWtNRyxyEzvW7Lu3OdYUYCrjBKy4DLaNS3HA= 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 1565005510768933.2404423388546; Mon, 5 Aug 2019 04:45:10 -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 1hubP7-0003ri-OP; Mon, 05 Aug 2019 11:43:53 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hubP6-0003rB-60 for xen-devel@lists.xenproject.org; Mon, 05 Aug 2019 11:43:52 +0000 Received: from mail-lf1-x143.google.com (unknown [2a00:1450:4864:20::143]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 4aec2633-b776-11e9-8980-bc764e045a96; Mon, 05 Aug 2019 11:43:51 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id c19so57681813lfm.10 for ; Mon, 05 Aug 2019 04:43:51 -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 b1sm17285057ljj.26.2019.08.05.04.43.48 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 05 Aug 2019 04:43:48 -0700 (PDT) X-Inumbo-ID: 4aec2633-b776-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=mq/9kgjMosUAIprB5ywg2Au7PHOWEW2H+vbX8ljPcm0=; b=rnfDX7DI8yc453cKCeLRdWtZ1FQ8je9zUz+tq92fqQ8lTI/MRfzrbp5HjhgmLHjJo1 7dTQXd3fl8ZucnJZhd0ydTaGCBoFHAdtMVLqz8CxZzzZ+/82VrFBfzqgUGinXMX1/q3i oMieOCtX4oFlCgEsID1xir/qicgvnOGdLEJx36D3Beiy0oeWNhQjoqQYO6vM6HtRpoGT 68I893+Fgt62mIKmt8jDIJj3Z3auDofuCQGagdemPnJ9Ob7gY0ER+6e0R5ArtVVOomqh XtrsUl4IG3QMwHNf9B/zeeCNYtjvwuytxs0ol/2HwQ9TMUI44TeHMNm/y5yOPPadxSZv uIVQ== 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=mq/9kgjMosUAIprB5ywg2Au7PHOWEW2H+vbX8ljPcm0=; b=Cx7qus+9rMrAkv3WMtMcxTiiY8x0YL33kbMpvjF9dRQOja5sf3Zm6SweU7YQbXbtbu EMlbjaqlwrS2VbrhuxFMfuBQbfdN3Ctd6CiCrz3YgJ2rjaFrr09IJ5eeCU+BWDd7gQOP OK9u6XdIcnErftNqkkHvR0BbJtGS8mZyPxACxYWUt6Zs9t8z3lZMypeRTy4Nb72Z2YJH 9jCNfwS9liAgPfxn+edb+Ulb23rLZ9PYe+6UnQXu++24fxGcw1zjMMoYf0zA+Lj86Kq9 F5wNJA3+WHOJjIEbfX38fv7HICsyXywFOAhgSzE1evsS9+kba7YzI0SodJHMrsstYJw/ 4rZw== X-Gm-Message-State: APjAAAVZCJnEk5bDqsCmrc4Jg575AN5MfEHqxGnxPqKshgc4ra7uaCd8 btUvZ7teuts7fQIeMT50Gk+ChoYZ X-Google-Smtp-Source: APXvYqwMGmMPKmUF7WivY2WtV8fQLYy50u3UmcyPRMp2UOmbjfxATC/fTTvoFdvzQNBiqrn2HhG9SA== X-Received: by 2002:a19:7006:: with SMTP id h6mr70138989lfc.5.1565005429279; Mon, 05 Aug 2019 04:43:49 -0700 (PDT) From: Viktor Mitin To: xen-devel@lists.xenproject.org Date: Mon, 5 Aug 2019 14:43:31 +0300 Message-Id: <20190805114332.15329-3-viktor.mitin.19@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190805114332.15329-1-viktor.mitin.19@gmail.com> References: <20190805114332.15329-1-viktor.mitin.19@gmail.com> Subject: [Xen-devel] [PATCH v6 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: 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. 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 v6 updates: - move if out of outer "if" - add full stop at the end of the last sentence - minor rephrase of commit message --- xen/arch/arm/domain_build.c | 100 +++++++++++++----------------------- 1 file changed, 35 insertions(+), 65 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index bc7d17dd2c..b9954d2c3c 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,47 @@ 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 ( !is_64bit_domain(kinfo->d) ) + { + res =3D fdt_property_string(fdt, "compatible", "arm,armv7-timer"); + } + else + { + res =3D fdt_property_string(fdt, "compatible", "arm,armv8-timer"); + } if ( res ) return res; =20 - /* 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); - - 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 +1613,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 +1718,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