From patchwork Thu Jun 26 07:10:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan R X-Patchwork-Id: 32524 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 330C120E7A for ; Thu, 26 Jun 2014 07:13:20 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id j17sf17631332oag.0 for ; Thu, 26 Jun 2014 00:13:19 -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:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=tG2Mt6JBpPf3ZPg4zDE+LhTrWR2npgVy+ugu4aYzo2s=; b=SIM68UUsgxCgENSsMOmmeyQZQuhXJ+Ts2wlT1wBR7zNsam65aNongBKeXaSc/4ObVx 1XEYDgmeQy/hESdFOmL1wMGvVVyYR5SHaCPBxNaZTTs5zTCF0xyKShyZIC87HhihSzVf k3kRZzl4z5CIbtpmdNyQxCOvdlUYLlpCZazLiSxL/i4QdPSLAmDCDfUjoiirhxfz8VAW qMRlNeNVZuhHx0PD0KO0oF6riUQjaVyca1zIhwBNxy/xQVZej3h3MZFUsbXo7NOKxVm6 IIm5deBF0PUIOIyUkNxRgvg0/AMttCwzc1T0+1tUe/8a8ylVvJL3vFz7Q8TcryHGqKkM Pl7Q== X-Gm-Message-State: ALoCoQmpI2QL9ezZjk0OtY/snDQ7A3gFqQNuXH7lkNPVevb5NyLjQPi2BoGMyzjJmT+LYueQqgCS X-Received: by 10.50.170.162 with SMTP id an2mr1229167igc.4.1403766799388; Thu, 26 Jun 2014 00:13:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.1 with SMTP id p1ls97140qga.97.gmail; Thu, 26 Jun 2014 00:13:19 -0700 (PDT) X-Received: by 10.58.29.234 with SMTP id n10mr11813834veh.16.1403766799283; Thu, 26 Jun 2014 00:13:19 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id jg5si3828834vdb.70.2014.06.26.00.13.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 00:13:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ij19so3114835vcb.9 for ; Thu, 26 Jun 2014 00:13:19 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr353065vca.45.1403766799200; Thu, 26 Jun 2014 00:13:19 -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 tc5csp10217vcb; Thu, 26 Jun 2014 00:13:18 -0700 (PDT) X-Received: by 10.68.113.133 with SMTP id iy5mr18680216pbb.135.1403766798364; Thu, 26 Jun 2014 00:13:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pk4si8478362pbc.252.2014.06.26.00.13.17; Thu, 26 Jun 2014 00:13:17 -0700 (PDT) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753753AbaFZHNQ (ORCPT + 8 others); Thu, 26 Jun 2014 03:13:16 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:48736 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753358AbaFZHNO (ORCPT ); Thu, 26 Jun 2014 03:13:14 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5Q7CfMs027948; Thu, 26 Jun 2014 02:12:41 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5Q7Cf1x016146; Thu, 26 Jun 2014 02:12:41 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Thu, 26 Jun 2014 02:12:40 -0500 Received: from uda0393807.india.ti.com. (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5Q7CTSS000852; Thu, 26 Jun 2014 02:12:37 -0500 From: Sricharan R To: , , , CC: , , , , , , , , Subject: [PATCH V4 01/16] irqchip: crossbar: Dont use '0' to mark reserved interrupts Date: Thu, 26 Jun 2014 12:40:19 +0530 Message-ID: <1403766634-18543-2-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403766634-18543-1-git-send-email-r.sricharan@ti.com> References: <1403766634-18543-1-git-send-email-r.sricharan@ti.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: r.sricharan@ti.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.178 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-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Nishanth Menon Today '0' is actually reserved, but may not be the same in the future. So, use a flag to mark the GIC interrupts that are reserved. Signed-off-by: Nishanth Menon Signed-off-by: Sricharan R Acked-by: Santosh Shilimkar --- drivers/irqchip/irq-crossbar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index 3d15d16..20105bc 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c @@ -17,6 +17,7 @@ #include #define IRQ_FREE -1 +#define IRQ_RESERVED -2 #define GIC_IRQ_START 32 /* @@ -139,7 +140,7 @@ static int __init crossbar_of_init(struct device_node *node) pr_err("Invalid reserved entry\n"); goto err3; } - cb->irq_map[entry] = 0; + cb->irq_map[entry] = IRQ_RESERVED; } } @@ -170,7 +171,7 @@ static int __init crossbar_of_init(struct device_node *node) * reserved irqs. so find and store the offsets once. */ for (i = 0; i < max; i++) { - if (!cb->irq_map[i]) + if (cb->irq_map[i] == IRQ_RESERVED) continue; cb->register_offsets[i] = reserved;