From patchwork Tue Apr 1 08:03:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 27518 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B33FF20341 for ; Tue, 1 Apr 2014 08:08:15 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id hw13sf19783985qab.9 for ; Tue, 01 Apr 2014 01:08:15 -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:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=OwyBxOqam+ZM8E7Jjmyukihkms/ebeisHB3o6beFI48=; b=DU/raactx2+1EC3q6VX3LcelGfKetCiwi9ThCdXq+thGIPlviSS6lrVA2n+nj85TjA HLNsX2s2OG2kWC72s0/iqKsOkqcHCl7dgghvZc2SWtq5zcqVkwol4AYTgSA1NfJKHMnp 462aJTxw67pIv/xViH5b/utNS7ClhEbLNuiysOl6TWkNnxhjUBJBgtz1sngtt4x3NyLp 93YjCvBDjUjK/toVN7740EBmYSesDtWab5ik0iwOxRJDkGgzrtcMnmXJcXGti3vfQJYz 5gqy3s61qwUZ175sr7cul0LyYONMcSefD/81YBsXulAXDdvcPpdRrl6zVllLzy+wBf57 XcBw== X-Gm-Message-State: ALoCoQkK3dRre0HJVmbbGz/BSUmn3gZZkD8N1TsMuJQRi/ny1lR1wwkOMR6bKtXKJgTGM+IrZZhI X-Received: by 10.236.132.239 with SMTP id o75mr11453910yhi.19.1396339695534; Tue, 01 Apr 2014 01:08:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.66 with SMTP id h60ls2840759qge.54.gmail; Tue, 01 Apr 2014 01:08:15 -0700 (PDT) X-Received: by 10.220.225.5 with SMTP id iq5mr49038vcb.42.1396339695442; Tue, 01 Apr 2014 01:08:15 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id vd8si3441765vdc.178.2014.04.01.01.08.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Apr 2014 01:08:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if17so8980639vcb.8 for ; Tue, 01 Apr 2014 01:08:15 -0700 (PDT) X-Received: by 10.52.99.168 with SMTP id er8mr146648vdb.26.1396339695366; Tue, 01 Apr 2014 01:08:15 -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.220.12.8 with SMTP id v8csp214444vcv; Tue, 1 Apr 2014 01:08:14 -0700 (PDT) X-Received: by 10.180.37.12 with SMTP id u12mr18168605wij.0.1396339694569; Tue, 01 Apr 2014 01:08:14 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id wx5si4531362wjb.53.2014.04.01.01.08.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Apr 2014 01:08:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUth9-0000tU-Qc; Tue, 01 Apr 2014 08:05:20 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUtgs-00027U-7K; Tue, 01 Apr 2014 08:05:02 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUtgo-00024f-1w for linux-arm-kernel@lists.infradead.org; Tue, 01 Apr 2014 08:04:59 +0000 Received: by mail-pb0-f49.google.com with SMTP id jt11so9451426pbb.36 for ; Tue, 01 Apr 2014 01:04:36 -0700 (PDT) X-Received: by 10.66.176.143 with SMTP id ci15mr30086985pac.35.1396339476544; Tue, 01 Apr 2014 01:04:36 -0700 (PDT) Received: from localhost.localdomain ([140.206.182.114]) by mx.google.com with ESMTPSA id yo9sm52327508pab.16.2014.04.01.01.04.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Apr 2014 01:04:36 -0700 (PDT) From: Haojian Zhuang To: tglx@linutronix.de, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, arnd@arndb.de, olof@lixom.net, khilman@kernel.org, xuwei5@hisilicon.com Subject: [PATCH v1 3/8] irq: gic: use mask field in GICC_IAR Date: Tue, 1 Apr 2014 16:03:45 +0800 Message-Id: <1396339430-21084-4-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1396339430-21084-1-git-send-email-haojian.zhuang@linaro.org> References: <1396339430-21084-1-git-send-email-haojian.zhuang@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140401_040458_195997_89574FC8 X-CRM114-Status: GOOD ( 11.52 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Haojian Zhuang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: haojian.zhuang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.177 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Bit[9:0] is interrupt ID field in GICC_IAR. Bit[12:10] is CPU ID field, and others are reserved. So we should use GICC_IAR_INTID to get interrupt ID. It's not a good way to use ~0x1c00 (CPU ID field) to get interrupt ID. Signed-off-by: Haojian Zhuang --- drivers/irqchip/irq-gic.c | 2 +- include/linux/irqchip/arm-gic.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 4300b66..8fd27bf 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -287,7 +287,7 @@ static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) do { irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK); - irqnr = irqstat & ~0x1c00; + irqnr = irqstat & GICC_IAR_INTID; if (likely(irqnr > 15 && irqnr < 1021)) { irqnr = irq_find_mapping(gic->domain, irqnr); diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h index 7ed92d0..55933aa 100644 --- a/include/linux/irqchip/arm-gic.h +++ b/include/linux/irqchip/arm-gic.h @@ -21,6 +21,8 @@ #define GIC_CPU_ACTIVEPRIO 0xd0 #define GIC_CPU_IDENT 0xfc +#define GICC_IAR_INTID 0x3ff + #define GIC_DIST_CTRL 0x000 #define GIC_DIST_CTR 0x004 #define GIC_DIST_IGROUP 0x080