From patchwork Fri Jan 29 16:53:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 8165031 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9ADC39F440 for ; Fri, 29 Jan 2016 16:57:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 056C320328 for ; Fri, 29 Jan 2016 16:57:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60D1820253 for ; Fri, 29 Jan 2016 16:57:49 +0000 (UTC) Received: from localhost ([::1]:35335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPCMm-0007zE-P4 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 29 Jan 2016 11:57:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPCJC-0001j5-6D for qemu-devel@nongnu.org; Fri, 29 Jan 2016 11:54:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPCJB-0003x3-D3 for qemu-devel@nongnu.org; Fri, 29 Jan 2016 11:54:06 -0500 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:36616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPCJB-0003wm-6W for qemu-devel@nongnu.org; Fri, 29 Jan 2016 11:54:05 -0500 Received: by mail-wm0-x22c.google.com with SMTP id p63so76823202wmp.1 for ; Fri, 29 Jan 2016 08:54:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kEW56HVBFvuQTMjsJ+gLpiZFhLSeIYnrHPa0qOfsN0A=; b=ONp3u6Bjrjg2J9AwxVh/qdPq0FZy17LqZg3WtQQF9tZmtxEYyrHCpPdcxdySUVN3EJ v2DhLg6IxWRs8x/mYlpi+RWJzebSf42EIjcQylkvOVwNBLfE1DbDaJkhUuD1DidE55Cc u0U8U7dsAKqA5/xdQO/Aql9YRZ+HJISZtz4Lg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kEW56HVBFvuQTMjsJ+gLpiZFhLSeIYnrHPa0qOfsN0A=; b=B/JknCaT6sbN8WqCGRxO/sltvQTWRlb8sbBJQZuOg0P8RPp4m0QrXg6+Wqu5anCCTo u4d46I1c+ood0oPRrDNcroDNfrDAJmT8p65bqlJkzWIbx+H/1nH4wkoSM76dTKDHLItg knIFZiS3E08ePEt1vCXF6ZDFJek/p+lQBMlQ0mnTFY2yGkzDYTP9FPG/aZpPuqMAlh6p asrZrqdUEvQ8V19FkE68Ai29rzBQ2SK43gGLsXCO2sFGJjJuagTbcdTB3jVkiM1wbcMk wuWGDUNHFcVEioHI2fnNPyRPQ/z7KjANdpjPJOUybuF4JoUsTlAlFugBVZDc5qnkEApK VELw== X-Gm-Message-State: AG10YOTbalodkL2rD8SEt6D+ZNqC/ARKKWOkjYRKbCydtW3imw6jTgrm2MsNTDKTnt8QKxBE X-Received: by 10.28.158.194 with SMTP id h185mr10805113wme.48.1454086444549; Fri, 29 Jan 2016 08:54:04 -0800 (PST) Received: from new-host-12.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id ei9sm16415530wjd.40.2016.01.29.08.54.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 08:54:03 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org, alex.williamson@redhat.com, pranav.sawargaonkar@gmail.com, p.fedin@samsung.com, pbonzini@redhat.com, agraf@suse.de Date: Fri, 29 Jan 2016 16:53:44 +0000 Message-Id: <1454086429-4373-4-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454086429-4373-1-git-send-email-eric.auger@linaro.org> References: <1454086429-4373-1-git-send-email-eric.auger@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22c Cc: Bharat.Bhushan@freescale.com, suravee.suthikulpanit@amd.com, christoffer.dall@linaro.org Subject: [Qemu-devel] [RFC v2 3/8] Generic PCIe host bridge INTx determination for INTx routing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch stores information about assigned legacy interrupt numbers in GPEX host structure. This is used during GPEX INTx number determination from a pin during INTx routing. Signed-off-by: Pranavkumar Sawargaonkar Signed-off-by: Tushar Jagad --- hw/arm/virt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 15658f4..3839c68 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -826,6 +826,7 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic, char *nodename; int i; PCIHostState *pci; + GPEXHost *s; dev = qdev_create(NULL, TYPE_GPEX_HOST); qdev_init_nofail(dev); @@ -861,8 +862,11 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic, /* Map IO port space */ sysbus_mmio_map(SYS_BUS_DEVICE(dev), 2, base_pio); + s = GPEX_HOST(dev); + for (i = 0; i < GPEX_NUM_IRQS; i++) { sysbus_connect_irq(SYS_BUS_DEVICE(dev), i, pic[irq + i]); + s->irq_num[i] = irq + i; } pci = PCI_HOST_BRIDGE(dev);