From patchwork Thu Jun 12 11:53:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan R X-Patchwork-Id: 31814 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 87C0020AE6 for ; Thu, 12 Jun 2014 11:56:24 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rp16sf360061pbb.1 for ; Thu, 12 Jun 2014 04:56:23 -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=H7P3Jow1Oe+8xuFEhyGr4e9yQ4lY2BPyfR8/gj262Gw=; b=ikHo2X5dD7siy5BXVpn0pQMCuf3u9uvSv3VHyGnot6lzCvqjDOn/h3YfEXzl4UFS82 8LBK4rRnjJ7w7CrLYAuw7eYs7mTEbrUzMSeG0xl2H43daYUw58g+6HZ/GyiVuLTndRQP BUW6eNb/RWlEP18c/DZo9IEY+PJmpDVAuinPi1ESOhjO6nUMtD0KxhuOI8uqPLlnAqoS S3t07/9nXDOIuoHNqASuk9BKHekOHS07riJQK1NvAB3daC/qbSwAxK6fPr79kyLgXNfJ NLHjsBHaMVeFhpn7CQX4pZDBW5iqwPCMbANiB5Acfb6bSJkqiLbK2pL4qRFqrrwlI23e dd6g== X-Gm-Message-State: ALoCoQnPI9akDTYtVUIx/RVdzmehg+xhoU1M9Ihtn/jWw4RPUsoObhUgC4SrN6lZvdD9th7SPIqj X-Received: by 10.68.216.230 with SMTP id ot6mr2062048pbc.3.1402574183794; Thu, 12 Jun 2014 04:56:23 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.130 with SMTP id q2ls3194299qga.91.gmail; Thu, 12 Jun 2014 04:56:23 -0700 (PDT) X-Received: by 10.52.51.196 with SMTP id m4mr7543423vdo.26.1402574183651; Thu, 12 Jun 2014 04:56:23 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id 3si240020vds.38.2014.06.12.04.56.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 04:56:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db12so1633335veb.35 for ; Thu, 12 Jun 2014 04:56:23 -0700 (PDT) X-Received: by 10.220.92.193 with SMTP id s1mr439129vcm.34.1402574183520; Thu, 12 Jun 2014 04:56:23 -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.54.6 with SMTP id vs6csp397104vcb; Thu, 12 Jun 2014 04:56:23 -0700 (PDT) X-Received: by 10.68.97.37 with SMTP id dx5mr11828755pbb.119.1402574182782; Thu, 12 Jun 2014 04:56:22 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj1si41362013pbb.77.2014.06.12.04.56.21; Thu, 12 Jun 2014 04:56:21 -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 S933429AbaFLL4B (ORCPT + 8 others); Thu, 12 Jun 2014 07:56:01 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:58189 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755873AbaFLLzz (ORCPT ); Thu, 12 Jun 2014 07:55:55 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5CBtQA0008869; Thu, 12 Jun 2014 06:55:26 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5CBtQ0D022938; Thu, 12 Jun 2014 06:55:26 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Thu, 12 Jun 2014 06:55:26 -0500 Received: from uda0393807.india.ti.com. (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5CBtEbo008910; Thu, 12 Jun 2014 06:55:22 -0500 From: Sricharan R To: , , , CC: , , , , , , , Subject: [PATCH V2 01/19] irqchip: crossbar: dont use '0' to mark reserved interrupts Date: Thu, 12 Jun 2014 17:23:09 +0530 Message-ID: <1402574007-13987-2-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1402574007-13987-1-git-send-email-r.sricharan@ti.com> References: <1402574007-13987-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.128.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-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 Signed-off-by: Tony Lindgren --- 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;