From patchwork Mon Jun 24 23:04:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18080 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7F5C625CFE for ; Mon, 24 Jun 2013 23:04:56 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id a12sf10388755wgh.1 for ; Mon, 24 Jun 2013 16:04:55 -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=w4lnkSBiVlbJm1LO1zb5Sc6+xpLZPGsizzoIHtBCWg8=; b=gIEqKX9rZ0xPXjFbE4OARYloO8jkY8gTwFmdP60lc5fJviZ+lP1I96tVIdkhyvT5Cg +MUMyYUTUGZtJ13tSw1g0JQ2Evb+i0sSq7vlNv3Ear/zbouD1YscUhcJYP6UrcFlaaGO ZfWJGZZv4Hzrj+rIc4eXY15+OE9JiAId1nWoCPwZj+nV729f/Q+qdwjdlybfeD5zSn0I rq5kouVkEpm3H4f1lX83ut4MH0aS4YdmoCXvUne5UAgHPA6SXu5e4xPFMnB+19b1mrko AeaUsjs69LbimYx4KXDs4CT0RrnDN7kP523szlniMuBTbPzUnfGDqRIKWaN55QkiQ+9R 8GIQ== X-Received: by 10.180.37.229 with SMTP id b5mr3798083wik.4.1372115095456; Mon, 24 Jun 2013 16:04:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.8.37 with SMTP id o5ls922564wia.50.gmail; Mon, 24 Jun 2013 16:04:55 -0700 (PDT) X-Received: by 10.180.206.77 with SMTP id lm13mr7305790wic.18.1372115095233; Mon, 24 Jun 2013 16:04:55 -0700 (PDT) Received: from mail-ve0-x22d.google.com (mail-ve0-x22d.google.com [2607:f8b0:400c:c01::22d]) by mx.google.com with ESMTPS id r7si131347wiz.70.2013.06.24.16.04.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 16:04:55 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22d 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::22d; Received: by mail-ve0-f173.google.com with SMTP id jw11so9292583veb.4 for ; Mon, 24 Jun 2013 16:04:54 -0700 (PDT) X-Received: by 10.220.67.10 with SMTP id p10mr12346494vci.85.1372115094158; Mon, 24 Jun 2013 16:04:54 -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 yu8csp45691veb; Mon, 24 Jun 2013 16:04:53 -0700 (PDT) X-Received: by 10.180.12.135 with SMTP id y7mr5817471wib.46.1372115092745; Mon, 24 Jun 2013 16:04:52 -0700 (PDT) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [2a00:1450:400c:c00::22f]) by mx.google.com with ESMTPS id dv7si133048wib.72.2013.06.24.16.04.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 16:04:52 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::22f is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c00::22f; Received: by mail-wg0-f47.google.com with SMTP id l18so8633118wgh.26 for ; Mon, 24 Jun 2013 16:04:52 -0700 (PDT) X-Received: by 10.194.9.101 with SMTP id y5mr17953205wja.86.1372115092150; Mon, 24 Jun 2013 16:04:52 -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.50 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 16:04:51 -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 4/5] xen/arm: Rename gic_irq_{startup, shutdown} to gic_irq_{mask, unmask} Date: Tue, 25 Jun 2013 00:04:25 +0100 Message-Id: <1372115067-17071-5-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: ALoCoQnCcGGdTo9BGxuOi72vk5TYLPEQQyqcxBZv4Kgz4jldTUJglrX3yAm7lk/x1AlkdAabj0Y5 X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22d 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: , Also implement enable/disable as mask/unmask irq. Signed-off-by: Julien Grall --- xen/arch/arm/gic.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index bf05716..b16ba8c 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -103,7 +103,7 @@ void gic_restore_state(struct vcpu *v) gic_restore_pending_irqs(v); } -static unsigned int gic_irq_startup(struct irq_desc *desc) +static void gic_irq_unmask(struct irq_desc *desc) { uint32_t enabler; int irq = desc->irq; @@ -111,11 +111,9 @@ static unsigned int gic_irq_startup(struct irq_desc *desc) /* Enable routing */ enabler = GICD[GICD_ISENABLER + irq / 32]; GICD[GICD_ISENABLER + irq / 32] = enabler | (1u << (irq % 32)); - - return 0; } -static void gic_irq_shutdown(struct irq_desc *desc) +static void gic_irq_mask(struct irq_desc *desc) { uint32_t enabler; int irq = desc->irq; @@ -125,14 +123,11 @@ static void gic_irq_shutdown(struct irq_desc *desc) GICD[GICD_ICENABLER + irq / 32] = enabler | (1u << (irq % 32)); } -static void gic_irq_enable(struct irq_desc *desc) -{ - -} - -static void gic_irq_disable(struct irq_desc *desc) +static unsigned int gic_irq_startup(struct irq_desc *desc) { + gic_irq_unmask(desc); + return 0; } static void gic_irq_ack(struct irq_desc *desc) @@ -166,9 +161,9 @@ static void gic_irq_set_affinity(struct irq_desc *desc, const cpumask_t *mask) static hw_irq_controller gic_host_irq_type = { .typename = "gic", .startup = gic_irq_startup, - .shutdown = gic_irq_shutdown, - .enable = gic_irq_enable, - .disable = gic_irq_disable, + .shutdown = gic_irq_mask, + .enable = gic_irq_unmask, + .disable = gic_irq_mask, .ack = gic_irq_ack, .end = gic_host_irq_end, .set_affinity = gic_irq_set_affinity, @@ -176,9 +171,9 @@ static hw_irq_controller gic_host_irq_type = { static hw_irq_controller gic_guest_irq_type = { .typename = "gic", .startup = gic_irq_startup, - .shutdown = gic_irq_shutdown, - .enable = gic_irq_enable, - .disable = gic_irq_disable, + .shutdown = gic_irq_mask, + .enable = gic_irq_unmask, + .disable = gic_irq_mask, .ack = gic_irq_ack, .end = gic_guest_irq_end, .set_affinity = gic_irq_set_affinity,