From nobody Sat Apr 20 14:47:37 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=1565172723; cv=none; d=zoho.com; s=zohoarc; b=m8XOLKXKLcenGB92gvoXwu7AVSmwqNdom3flz0R9PCoKyeZSHvkaqAccxQtHvmkPqJ291pamFFQnAXAajBfe+B9PBP9MCWojltz33YN8gbzFXwiQVd6BGnT5Q8cQfciOBab3+xmysVV4qo7xKGU+/wprM6R5w2sWHYE9V0IJDEk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565172723; 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=3IP84i1FEYiiSnyEl/FmF80ic8Vj1zZLTF+j3hM8vfI=; b=J4sLhipzAwGx5GjvFmOgf8cInIWHiNX4QV3Tl798FkmoJIVfFbRjYbe3A3z0hTdx73NM+dy066kiOB0yzkX/NbQtqK5cq2SRzJRygMQUdBL67y4sxlhwADazJFehDTpzOrQnAiW1wDbVdoqz5uhORjMN+77+rQShn/TzkRs5tmA= 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 1565172723334439.0032711322651; Wed, 7 Aug 2019 03:12: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 1hvIu1-00034i-S0; Wed, 07 Aug 2019 10:10:41 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hvIu0-00034X-4i for xen-devel@lists.xenproject.org; Wed, 07 Aug 2019 10:10:40 +0000 Received: from mail-lf1-x144.google.com (unknown [2a00:1450:4864:20::144]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 9a86d2e8-b8fb-11e9-8980-bc764e045a96; Wed, 07 Aug 2019 10:10:38 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id c9so63545038lfh.4 for ; Wed, 07 Aug 2019 03:10:38 -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 n24sm18384408ljc.25.2019.08.07.03.10.36 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 07 Aug 2019 03:10:36 -0700 (PDT) X-Inumbo-ID: 9a86d2e8-b8fb-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=lGDiRJRji0vbjMC2OsRWlZM/pXyQ4/dod5m8XUfYBw0=; b=AgqPkTcHFqqSVS7qnZ+T45cXpIciANXih3qmZ49UuASQuMZQJMYmm1n05XtEZE0KFW KMkS7IBq4D0ClxznGIUKEbZE1mdIrQnU7BCfpYC1mkSeQF/76A4x1kW+/rP4cHT4mhFP EwvKg1fQvyl87wwZNr16Ipsyd1b2/AniTuAkKDg4EH8h/DE+Zk/Dmxb5IyLZFsL0eiTI SCb7kY//Lve3rXO1YMgcD9ImKbuhK1iV8EKio9Jz8oM1cwQ9KK73jbHLau7b8wNpH4i9 c+Ra+byeFdNAjjGG+uADmrDra84lL0fSGb8/MveToPHfGWcvy794Y0kSQIqv+HNObl8d jD7w== 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=lGDiRJRji0vbjMC2OsRWlZM/pXyQ4/dod5m8XUfYBw0=; b=qHQXb4iI5RWmqMmmDbJaqFt1unoi9YuyYwjylfcFiS2MZNhSDx89c3ufQejQ6wtwvh zNbZuhGoOh9OXnHc68ITxGRHzTcRUKEdvVLMlp0bWkwjrhKmDU2DRk/OWiUiEOZxTmjP zFEY65/v3TYVSzlCHSvW9RIR2cG9KFoL3TNk+HohpPh6Cx6EL9+9EB8GwV3JIY2258rK 1rPFph77vkojV0aSbhN4QXgFMiGVBHOSMHdHqk0n9pS3iX57/U29QrG7NeVxvf4Tx8Ia 3c3T1MEtg7qABKlBgShH4tmw/9tbksI/oWFo+dPnZRoL/gToUv+yMnmQ5hHIg6HEfD3t TL+g== X-Gm-Message-State: APjAAAUGEa1cM4p9wejA9bA3BSZlKZAFBCTE8MkyHSMriOXpmmpMVwXt QsORFKdMeyCQ6K/thE6NHvKt/znV X-Google-Smtp-Source: APXvYqwrsomBwEUJKV/puVPWMk/qCTKW1/dU9/XqkKUiNwdG02HZ1PzIZRvZVRuHTVfzIzF1B9oBhg== X-Received: by 2002:a19:5f46:: with SMTP id a6mr5611891lfj.142.1565172637358; Wed, 07 Aug 2019 03:10:37 -0700 (PDT) From: Viktor Mitin To: xen-devel@lists.xenproject.org Date: Wed, 7 Aug 2019 13:10:27 +0300 Message-Id: <20190807101028.28778-2-viktor.mitin.19@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190807101028.28778-1-viktor.mitin.19@gmail.com> References: <20190807101028.28778-1-viktor.mitin.19@gmail.com> Subject: [Xen-devel] [PATCH v7 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 Reviewed-by: Volodymyr Babchuk --- v7: removed extra space after sizeof in fdt_property_interrupts() --- 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..26cd0ae12c 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 Apr 20 14:47:37 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=1565172708; cv=none; d=zoho.com; s=zohoarc; b=TrRShbbB06UjCRqR+yVW4MybOh/T62VjUhhbjKwl2Q8iLOVN7+q0M7z4xnrSJU7rssXpRauYwr8UtGhQeB2QSIi97ywE7wBoZlpctyy508QBTsiOLVY4dbiC+uxAU5W78IlxZEKdBXsDRdTyhkW13twBRkmgcsZ7UV2i9Or5dbg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565172708; 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=qAngLAu2CrhYpAf86khcvEwBOlneUlF5SOXQl8gg9Xc=; b=AGOvw9AzTTlS97FAOVQtA4wSYm21h2BBWbKM3OLP5h01vRbQEUwkrBSkAbaCvv6Xn3xbQ+yACauaidaH57XjjcicTHyaDZNd0ji897cnKBz40EWDLSqM0ExREB+UIxgMvfXiTtFaz2Wb45tgbRd9YhVSXs6BRW9iYFGM8RDORGw= 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 156517270827478.76776114373308; Wed, 7 Aug 2019 03:11:48 -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 1hvIu3-000350-5y; Wed, 07 Aug 2019 10:10:43 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hvIu2-00034u-Bp for xen-devel@lists.xenproject.org; Wed, 07 Aug 2019 10:10:42 +0000 Received: from mail-lf1-x142.google.com (unknown [2a00:1450:4864:20::142]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 9b9cc65f-b8fb-11e9-8980-bc764e045a96; Wed, 07 Aug 2019 10:10:40 +0000 (UTC) Received: by mail-lf1-x142.google.com with SMTP id b29so56363626lfq.1 for ; Wed, 07 Aug 2019 03:10:40 -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 n24sm18384408ljc.25.2019.08.07.03.10.38 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 07 Aug 2019 03:10:38 -0700 (PDT) X-Inumbo-ID: 9b9cc65f-b8fb-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=fvY9Ceur4pxLuvFTM18duk4S2k9mNCWc0F++06kEHmM=; b=rj5oHiRjVbmx7RCju40IE39hJDZxptbYHt70L4jaCXv9MFu6aqiQi9gQuukE+iPlBs JTAHPA7AG+ObgBYP+SpGEtB0yh8beRgarKEausTt2a5ATbELxx5TxXRWDGdDl0X7cVlv vV94E2WpENeOyvGmbrvye5M6hGO94XXfxp3tyaK9kr7fyuuCWhfJ5GxSFchCLqQSjlhu /al3+QZTQzNTpKI1kfm/CtZ7snhm1DHcAd1BwOCkUyOeF5hZ6oHH2q/l92td6YbB1jOD /k7f+vSHjYz/8Qs/dVp7EyKr5jWrMbNWOvDfzuOnZOcLDSkBACmr4KAdYFwBXe80I+rR /p1w== 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=fvY9Ceur4pxLuvFTM18duk4S2k9mNCWc0F++06kEHmM=; b=XiLVDjkVtzK8eLQ4joTZcTls0DTuyikKpAo7x3nIbjfAz3vKIMMPUvufglC/tFHMT+ DAoNGDHyosS+6cQLgAr5LZPHyY3959yx1yMWhHoG8Z3uq2ZBvSMxANqr7FPD82UMbexu xXfpPLgA3+x0Y+BuxlyFwFCyAVNJDZRwbt3bb3kiOXa41wuHsuYHKkyaQGDO2me+9KJT fhutTu3dSE5log7ZmogMY9/qryKhgsvZh3ofCB3oDKDYwRo6wdwkW4ho7ImLh0EtLaG8 svOsgaVY5fVMqR/xfjb0ThI3aJ5sYV+KOiLNGN0mFNZ3GbhTVkql0HRZc8giun4DW08B o47g== X-Gm-Message-State: APjAAAW7gVCUD6b77qKxvQM2RND+Xm0zdN4XNR+Lhzzl6IVPvigwhrDY dSPkNYgMDffdEhmSCivk+xv2mqpt X-Google-Smtp-Source: APXvYqwwfWIFZq2Ig8Z10qJqGL/oE+msNGaM5ImV6BR9ebCae6FsqptD2kDn8hOVbFFR5HLwu6JFDQ== X-Received: by 2002:ac2:46ea:: with SMTP id q10mr5344496lfo.118.1565172639142; Wed, 07 Aug 2019 03:10:39 -0700 (PDT) From: Viktor Mitin To: xen-devel@lists.xenproject.org Date: Wed, 7 Aug 2019 13:10:28 +0300 Message-Id: <20190807101028.28778-3-viktor.mitin.19@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190807101028.28778-1-viktor.mitin.19@gmail.com> References: <20190807101028.28778-1-viktor.mitin.19@gmail.com> Subject: [Xen-devel] [PATCH v7 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 v7 updates: - removed extra braces according to Coding style rule: Braces should be omitted for blocks with a single statement. --- xen/arch/arm/domain_build.c | 96 ++++++++++++------------------------- 1 file changed, 31 insertions(+), 65 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 26cd0ae12c..4e51e22927 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,43 @@ 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 +1609,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 +1714,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