From patchwork Mon Jun 24 23:04:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18077 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f199.google.com (mail-gh0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1ACB825CFE for ; Mon, 24 Jun 2013 23:04:50 +0000 (UTC) Received: by mail-gh0-f199.google.com with SMTP id g14sf12136413ghb.2 for ; Mon, 24 Jun 2013 16:04:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=wYHY9Ueh6ZzX8NWlBZtMTqUUhTDqAlN70j47E7w3RPY=; b=QuH1Tf8cosQZEmasg7qdzffYYUXmV4x57ws81tSEKJbI9PBsgyV9L1Qq2ug/fBvXVK 8E+69oPv/7PvGC0NkAMft8gdKWloY+3P2RCzRiqNQnNKRVuBJqZxSg+OphZP2KAfzUR4 PhZjJR89mDA02BpHuZsJZ9haVKjwGZZoXYQcr/+QCKx37lFOs0LXYwfchw+zyUSdkLp9 Ug4ltvnDmWVqw5/oq5QzwsNvhJEJ69zOSShg6AOzgIEwP7QNXj2aL/yvl5v6bRKgVoV3 u7N0UHwJT7PPR9Qv7YGeaPl2C7rYd4qQ5Z/cJVf3bzjuQaY0L+zNBtg6udBQmFfJJ/PE l40A== X-Received: by 10.236.79.67 with SMTP id h43mr4693234yhe.46.1372115089891; Mon, 24 Jun 2013 16:04:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.98 with SMTP id n2ls362574qed.22.gmail; Mon, 24 Jun 2013 16:04:49 -0700 (PDT) X-Received: by 10.52.94.211 with SMTP id de19mr10789449vdb.59.1372115089735; Mon, 24 Jun 2013 16:04:49 -0700 (PDT) Received: from mail-ve0-x229.google.com (mail-ve0-x229.google.com [2607:f8b0:400c:c01::229]) by mx.google.com with ESMTPS id i15si5490351vep.130.2013.06.24.16.04.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 16:04:49 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::229; Received: by mail-ve0-f169.google.com with SMTP id m1so9530006ves.0 for ; Mon, 24 Jun 2013 16:04:49 -0700 (PDT) X-Received: by 10.58.29.228 with SMTP id n4mr1574046veh.50.1372115089645; Mon, 24 Jun 2013 16:04:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp45684veb; Mon, 24 Jun 2013 16:04:49 -0700 (PDT) X-Received: by 10.180.92.226 with SMTP id cp2mr7456252wib.9.1372115088539; Mon, 24 Jun 2013 16:04:48 -0700 (PDT) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [2a00:1450:400c:c05::234]) by mx.google.com with ESMTPS id oy3si6937066wjb.127.2013.06.24.16.04.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 16:04:48 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::234 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c05::234; Received: by mail-wi0-f180.google.com with SMTP id c10so166404wiw.1 for ; Mon, 24 Jun 2013 16:04:47 -0700 (PDT) X-Received: by 10.180.98.233 with SMTP id el9mr7292494wib.54.1372115087582; Mon, 24 Jun 2013 16:04:47 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id m3sm508537wij.5.2013.06.24.16.04.46 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 16:04:46 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, Stefano.Stabellini@eu.citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH 1/5] xen/arm: Physical IRQ is not always equal to virtual IRQ Date: Tue, 25 Jun 2013 00:04:22 +0100 Message-Id: <1372115067-17071-2-git-send-email-julien.grall@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1372115067-17071-1-git-send-email-julien.grall@citrix.com> References: <1372115067-17071-1-git-send-email-julien.grall@citrix.com> X-Gm-Message-State: ALoCoQlFbU9hcBISUWUrFwlpOKaz5jefgEthCQ9heT13ABuHbOebp3D9AKCqR7mJA5RxerfTKkKU X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Julien Grall When Xen needs to EOI a physical IRQ, we must use the IRQ number in irq_desc instead of the virtual IRQ. Signed-off-by: Julien Grall --- xen/arch/arm/gic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 177560e..0fee3f2 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -810,7 +810,7 @@ static void gic_irq_eoi(void *info) static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs) { - int i = 0, virq; + int i = 0, virq, pirq; uint32_t lr; struct vcpu *v = current; uint64_t eisr = GICH[GICH_EISR0] | (((uint64_t) GICH[GICH_EISR1]) << 32); @@ -846,6 +846,7 @@ static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *r /* Assume only one pcpu needs to EOI the irq */ cpu = p->desc->arch.eoi_cpu; eoi = 1; + pirq = p->desc->irq; } list_del_init(&p->inflight); spin_unlock_irq(&v->arch.vgic.lock); @@ -854,10 +855,10 @@ static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *r /* this is not racy because we can't receive another irq of the * same type until we EOI it. */ if ( cpu == smp_processor_id() ) - gic_irq_eoi((void*)(uintptr_t)virq); + gic_irq_eoi((void*)(uintptr_t)pirq); else on_selected_cpus(cpumask_of(cpu), - gic_irq_eoi, (void*)(uintptr_t)virq, 0); + gic_irq_eoi, (void*)(uintptr_t)pirq, 0); } i++;