From patchwork Thu Jul 10 18:13:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 33446 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 21E09203C0 for ; Thu, 10 Jul 2014 18:15:51 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id o6sf18433505oag.5 for ; Thu, 10 Jul 2014 11:15:50 -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:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=kXJH2MCcbwzjBT0poJVjTBVZ0HJHdJJd4S4ApcVlpZU=; b=RMZiFO1VAmf009d3s3/HFyK9nh0QD4Lmp57TNPYO0Ek4DilJVULqsFY1gRbnGcAvPz kODs3/7HmGEPub0ScVsDidS9E344fzdGAT/XER0zb6BS4Z0EPKqrjd9SIraWgnmbm1VJ ts1O598ytxbRMVEOEOmRTJV7rXY+YMahhGUEW+ZS92k58Bg+/a37X0Q1Rel/VhIOH6mN 4tFW9C/wDoG0yvOVmYD/iXbionzpbYLJ6DEJyn0WNsev2N58NkSSKamt/Qo5QU7zj6G+ Nc3nBOndd24BX0jpZ2wMod9TaObJ7iNy1MZKDoJyLI2vS8Zj/E1l43PwZ3d+V8gZoBiQ 5URg== X-Gm-Message-State: ALoCoQlpXgzBZ4iJewr3vRXNlgLK82eIETsGgSnYH6lxqDPT2S0dbJDg9QoB6jP/HxbdmolQ8Dnt X-Received: by 10.182.91.79 with SMTP id cc15mr24872518obb.13.1405016149799; Thu, 10 Jul 2014 11:15:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.213 with SMTP id n79ls159261qgd.29.gmail; Thu, 10 Jul 2014 11:15:49 -0700 (PDT) X-Received: by 10.58.210.33 with SMTP id mr1mr1814391vec.63.1405016149715; Thu, 10 Jul 2014 11:15:49 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id zg9si11218578vdb.62.2014.07.10.11.15.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Jul 2014 11:15:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ik5so11171831vcb.7 for ; Thu, 10 Jul 2014 11:15:49 -0700 (PDT) X-Received: by 10.221.64.80 with SMTP id xh16mr2051736vcb.35.1405016149629; Thu, 10 Jul 2014 11:15:49 -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.221.37.5 with SMTP id tc5csp156617vcb; Thu, 10 Jul 2014 11:15:49 -0700 (PDT) X-Received: by 10.42.106.15 with SMTP id x15mr26569021ico.67.1405016148930; Thu, 10 Jul 2014 11:15:48 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id uh4si14463282igc.6.2014.07.10.11.15.47 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 10 Jul 2014 11:15:48 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) 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 1X5Ird-00005u-OW; Thu, 10 Jul 2014 18:14:37 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X5IrZ-0008Qn-Cg for xen-devel@lists.xensource.com; Thu, 10 Jul 2014 18:14:33 +0000 Received: from [85.158.143.35:41902] by server-2.bemta-4.messagelabs.com id 75/9F-18579-808DEB35; Thu, 10 Jul 2014 18:14:32 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-12.tower-21.messagelabs.com!1405016067!17166242!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16572 invoked from network); 10 Jul 2014 18:14:30 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-12.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 10 Jul 2014 18:14:30 -0000 X-IronPort-AV: E=Sophos;i="5.01,639,1400025600"; d="scan'208";a="151781402" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 10 Jul 2014 18:14:25 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Thu, 10 Jul 2014 14:14:24 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1X5IrL-00037s-1B; Thu, 10 Jul 2014 19:14:19 +0100 From: Stefano Stabellini To: Date: Thu, 10 Jul 2014 19:13:22 +0100 Message-ID: <1405016003-19131-9-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA1 Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com, Jan Beulich , Stefano Stabellini Subject: [Xen-devel] [PATCH v8 09/10] xen: introduce bit access macros for the IRQ line status flags 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: , 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: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 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: Signed-off-by: Stefano Stabellini CC: Jan Beulich --- xen/arch/arm/irq.c | 8 ++++---- xen/drivers/passthrough/arm/smmu.c | 4 ++-- xen/include/xen/irq.h | 27 ++++++++++++++++++--------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index 7150c7a..695c69f 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -297,21 +297,21 @@ void release_irq(unsigned int irq, const void *dev_id) static int __setup_irq(struct irq_desc *desc, unsigned int irqflags, struct irqaction *new) { - bool_t shared = !!(irqflags & IRQF_SHARED); + bool_t shared = !!(irqflags & IRQ_SHARED); ASSERT(new != NULL); /* Sanity checks: * - if the IRQ is marked as shared - * - dev_id is not NULL when IRQF_SHARED is set + * - dev_id is not NULL when IRQ_SHARED is set */ - if ( desc->action != NULL && (!(desc->status & IRQF_SHARED) || !shared) ) + if ( desc->action != NULL && (!(desc->status & IRQ_SHARED) || !shared) ) return -EINVAL; if ( shared && new->dev_id == NULL ) return -EINVAL; if ( shared ) - desc->status |= IRQF_SHARED; + desc->status |= IRQ_SHARED; new->next = desc->action; dsb(ish); diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers/passthrough/arm/smmu.c index f4eb2a2..f9b87d0 100644 --- a/xen/drivers/passthrough/arm/smmu.c +++ b/xen/drivers/passthrough/arm/smmu.c @@ -1060,7 +1060,7 @@ arm_smmu_alloc_domain_context(struct domain *d, cfg->irptndx = cfg->cbndx; irq = smmu->irqs[smmu->num_global_irqs + cfg->irptndx]; - ret = request_irq(irq, IRQF_SHARED, arm_smmu_context_fault, + ret = request_irq(irq, IRQ_SHARED, arm_smmu_context_fault, "arm-smmu-context-fault", cfg); if ( ret ) { @@ -1713,7 +1713,7 @@ static int __init smmu_init(struct dt_device_node *dev, for ( i = 0; i < smmu->num_global_irqs; ++i ) { smmu_dbg(smmu, "\t- global IRQ %u\n", smmu->irqs[i]); - res = request_irq(smmu->irqs[i], IRQF_SHARED, arm_smmu_global_fault, + res = request_irq(smmu->irqs[i], IRQ_SHARED, arm_smmu_global_fault, "arm-smmu global fault", smmu); if ( res ) { diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 40c0f3f..af5b247 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -22,15 +22,24 @@ struct irqaction { /* * IRQ line status. */ -#define IRQ_INPROGRESS (1u<<0) /* IRQ handler active - do not enter! */ -#define IRQ_DISABLED (1u<<1) /* IRQ disabled - do not enter! */ -#define IRQ_PENDING (1u<<2) /* IRQ pending - replay on enable */ -#define IRQ_REPLAY (1u<<3) /* IRQ has been replayed but not acked yet */ -#define IRQ_GUEST (1u<<4) /* IRQ is handled by guest OS(es) */ -#define IRQ_MOVE_PENDING (1u<<5) /* IRQ is migrating to another CPUs */ -#define IRQ_PER_CPU (1u<<6) /* IRQ is per CPU */ -#define IRQ_GUEST_EOI_PENDING (1u<<7) /* IRQ was disabled, pending a guest EOI */ -#define IRQF_SHARED (1<<8) /* IRQ is shared */ +#define _IRQ_INPROGRESS 0 /* IRQ handler active - do not enter! */ +#define _IRQ_DISABLED 1 /* IRQ disabled - do not enter! */ +#define _IRQ_PENDING 2 /* IRQ pending - replay on enable */ +#define _IRQ_REPLAY 3 /* IRQ has been replayed but not acked yet */ +#define _IRQ_GUEST 4 /* IRQ is handled by guest OS(es) */ +#define _IRQ_MOVE_PENDING 5 /* IRQ is migrating to another CPUs */ +#define _IRQ_PER_CPU 6 /* IRQ is per CPU */ +#define _IRQ_GUEST_EOI_PENDING 7 /* IRQ was disabled, pending a guest EOI */ +#define _IRQ_SHARED 8 /* IRQ is shared */ +#define IRQ_INPROGRESS (1u<<_IRQ_INPROGRESS) +#define IRQ_DISABLED (1u<<_IRQ_DISABLED) +#define IRQ_PENDING (1u<<_IRQ_PENDING) +#define IRQ_REPLAY (1u<<_IRQ_REPLAY) +#define IRQ_GUEST (1u<<_IRQ_GUEST) +#define IRQ_MOVE_PENDING (1u<<_IRQ_MOVE_PENDING) +#define IRQ_PER_CPU (1u<<_IRQ_PER_CPU) +#define IRQ_GUEST_EOI_PENDING (1u<<_IRQ_GUEST_EOI_PENDING) +#define IRQ_SHARED (1u<<_IRQ_SHARED) /* Special IRQ numbers. */ #define AUTO_ASSIGN_IRQ (-1)