From patchwork Sun May 17 20:04:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parth Dixit X-Patchwork-Id: 48661 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 515FA21411 for ; Sun, 17 May 2015 20:07:49 +0000 (UTC) Received: by wixv7 with SMTP id v7sf15391540wix.0 for ; Sun, 17 May 2015 13:07:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=RSqotnPmVMGkr35KoE1BujEaamIyAPrpKX59yJ3/nis=; b=g71mc3yG/FMIh1nGndLKkAg3nMHopkdGomjrdBJylUtdOH0wZ6VyqoFn6vi92a0dM0 GFsZmZE2hOvAq7O2dkyUw+ZbdtgUEi6mXFyuxDlUxRtR0CL+hHcqa6Mn6j1AdxsD6uCi +qmJHUOBXi4pmso/UrnzEZufOi6sppn4VLNRqhzeHIR0Tibhh1gzedaHLE4H9a5qyMG+ rfhMudGYogjUq5T6RE7IAm7+g9a39D3OjJj4YFJ76AQWh1ormeeNHlB0c1BiRKTAStAI 5Rldtn549H89HE/3MicS9g8h5Gt7p7mkkxhOwCp1P2tvTYEBVng+Q02Vc0OdiEgZgnxM BlwA== X-Gm-Message-State: ALoCoQkYeTZcUcMNTxT/U+0goCkSbaXlnOeqIb6cnLh1Q0kVpNEnrvbiRwOMv6lfZcfp9Iv3xyoi X-Received: by 10.112.26.5 with SMTP id h5mr15319845lbg.4.1431893268685; Sun, 17 May 2015 13:07:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.194 with SMTP id v2ls767718lag.59.gmail; Sun, 17 May 2015 13:07:48 -0700 (PDT) X-Received: by 10.152.9.66 with SMTP id x2mr14806817laa.36.1431893268579; Sun, 17 May 2015 13:07:48 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id dk9si5314758lad.162.2015.05.17.13.07.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 May 2015 13:07:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by labbd9 with SMTP id bd9so191545642lab.2 for ; Sun, 17 May 2015 13:07:48 -0700 (PDT) X-Received: by 10.152.27.1 with SMTP id p1mr14493663lag.112.1431893268308; Sun, 17 May 2015 13:07:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3508457lbb; Sun, 17 May 2015 13:07:47 -0700 (PDT) X-Received: by 10.52.77.69 with SMTP id q5mr17671193vdw.29.1431893266883; Sun, 17 May 2015 13:07:46 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id kg5si3846316vdb.107.2015.05.17.13.07.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 17 May 2015 13:07:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yu4q6-0004c5-WE; Sun, 17 May 2015 20:07:11 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yu4q6-0004Zq-As for xen-devel@lists.xen.org; Sun, 17 May 2015 20:07:10 +0000 Received: from [193.109.254.147] by server-13.bemta-14.messagelabs.com id FE/44-02669-DE4F8555; Sun, 17 May 2015 20:07:09 +0000 X-Env-Sender: parth.dixit@linaro.org X-Msg-Ref: server-7.tower-27.messagelabs.com!1431893226!18222644!1 X-Originating-IP: [209.85.192.178] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17129 invoked from network); 17 May 2015 20:07:07 -0000 Received: from mail-pd0-f178.google.com (HELO mail-pd0-f178.google.com) (209.85.192.178) by server-7.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 May 2015 20:07:07 -0000 Received: by pdea3 with SMTP id a3so116302447pde.2 for ; Sun, 17 May 2015 13:07:06 -0700 (PDT) X-Received: by 10.68.69.16 with SMTP id a16mr30242937pbu.138.1431893226214; Sun, 17 May 2015 13:07:06 -0700 (PDT) Received: from localhost.localdomain ([117.247.24.139]) by mx.google.com with ESMTPSA id j9sm7838401pdm.53.2015.05.17.13.07.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 May 2015 13:07:05 -0700 (PDT) From: Parth Dixit To: xen-devel@lists.xen.org Date: Mon, 18 May 2015 01:34:08 +0530 Message-Id: <1431893048-5214-42-git-send-email-parth.dixit@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, jbeulich@suse.com, parth.dixit@linaro.org, christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH v2 41/41] arm : acpi route irq's at time of boot X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: parth.dixit@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: NOTE: This is a wrokaround to be fixed later. Route all the irq's to Dom0 at the time of booting. Trigger and polarity will be set dyanmaically when Dom0 request's for it. Signed-off-by: Parth Dixit --- xen/arch/arm/domain_build.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 2ce30bf..cdad86b 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1481,6 +1481,26 @@ static int prepare_acpi(struct domain *d, struct kernel_info *kinfo, struct memb acpi_os_unmap_memory(rsdp_tbl, sizeof(struct acpi_table_rsdp) ); prepare_efi_table(d, kinfo, tbl_add); + + /* configure interrupts gicv2 only */ + for( i = 32 ; i < 255 ; i++ ) + { + struct irq_desc *desc; + desc = irq_to_desc(i); + if( desc->action != NULL) + continue; + + vgic_reserve_virq(d, i); + set_irq_type(i, ACPI_IRQ_TYPE_NONE); + res = route_irq_to_guest(d, i, i, NULL); + if ( res ) + { + printk(XENLOG_ERR "Unable to route IRQ %u to domain %u\n", + i, d->domain_id); + continue; + } + } + /* map rsdp table */ size = sizeof(struct acpi_table_rsdp);