From patchwork Wed Jan 22 13:31:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 23518 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 7B86B218CB for ; Wed, 22 Jan 2014 13:31:26 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id ii20sf564261qab.9 for ; Wed, 22 Jan 2014 05:31:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=mO1XbHVczngyb5I9OGspA5zu2voT3vhB0Hzt6QubvvE=; b=ip5GT5cnTc73UT4mm+ydgZdj3owaFZcKTL7oj2wUFBMgCPgvVLhNWZWJ3o98/QzFYK m+6Vyi3BWw9wANb/ZvYHJNtdPmNYkYlBQDrdr4hnYh3xWgfFBAPT5r7x4lOB1pFqxWqS YOnyBUce9qM0e8Y26xr9w+Nc/r6Af/icVZcfR6NYJyzs9OZSnN50i8KN/8/LTn5tfyoy LTTmH0/ISr6Coayyd+Ezw20EpTPKCaKtWs/M3SHsmue/FYbzpG4WVw74p0oVNTxeUoja +3GxFKi2iyyQvgO+HKUE/UGGDNHRUZr4Dd5x9+YM+D8E0gNjEC9za387jBuoYfFqt0b+ vRWA== X-Gm-Message-State: ALoCoQkd8qziGdHCwH8KRTGvaKzp+bhk8ti/O0YtN+eyOu7taZHaT4puRXFLbunYXO41i9ujNZAg X-Received: by 10.58.186.202 with SMTP id fm10mr492391vec.37.1390397485716; Wed, 22 Jan 2014 05:31:25 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.198 with SMTP id d64ls73293qgd.39.gmail; Wed, 22 Jan 2014 05:31:25 -0800 (PST) X-Received: by 10.220.103.141 with SMTP id k13mr894722vco.25.1390397485575; Wed, 22 Jan 2014 05:31:25 -0800 (PST) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id b20si4538565veu.60.2014.01.22.05.31.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 05:31:25 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id cz12so224376veb.1 for ; Wed, 22 Jan 2014 05:31:25 -0800 (PST) X-Received: by 10.220.193.70 with SMTP id dt6mr906615vcb.17.1390397485506; Wed, 22 Jan 2014 05:31:25 -0800 (PST) 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.220.174.196 with SMTP id u4csp184734vcz; Wed, 22 Jan 2014 05:31:25 -0800 (PST) X-Received: by 10.180.187.16 with SMTP id fo16mr12351275wic.26.1390397484654; Wed, 22 Jan 2014 05:31:24 -0800 (PST) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by mx.google.com with ESMTPS id nj17si6796908wic.3.2014.01.22.05.31.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 05:31:24 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.45 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.45; Received: by mail-wg0-f45.google.com with SMTP id n12so313956wgh.0 for ; Wed, 22 Jan 2014 05:31:24 -0800 (PST) X-Received: by 10.194.92.109 with SMTP id cl13mr1782718wjb.13.1390397484147; Wed, 22 Jan 2014 05:31:24 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id po3sm14898693wjc.3.2014.01.22.05.31.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jan 2014 05:31:23 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Cc: Linus Walleij , Thomas Gleixner Subject: [PATCH 1/5] irqchip: vic: update the base IRQ member correctly Date: Wed, 22 Jan 2014 14:31:07 +0100 Message-Id: <1390397471-6802-2-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1390397471-6802-1-git-send-email-linus.walleij@linaro.org> References: <1390397471-6802-1-git-send-email-linus.walleij@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 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: , When passing 0 as the irq base the VIC driver will dynamically allocate a number of consecutive interrupt descriptors at some available number range. Make sure this number is recorded in the state container rather than the passed-in zero argument in this case. Cc: Thomas Gleixner Signed-off-by: Linus Walleij --- tglx: if you're happy with this pls ACK it so I can take this through the ARM SoC tree. --- drivers/irqchip/irq-vic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c index 8e21ae0bab46..70108c1491bc 100644 --- a/drivers/irqchip/irq-vic.c +++ b/drivers/irqchip/irq-vic.c @@ -273,7 +273,6 @@ static void __init vic_register(void __iomem *base, unsigned int irq, v->base = base; v->valid_sources = valid_sources; v->resume_sources = resume_sources; - v->irq = irq; set_handle_irq(vic_handle_irq); vic_id++; v->domain = irq_domain_add_simple(node, fls(valid_sources), irq, @@ -282,6 +281,11 @@ static void __init vic_register(void __iomem *base, unsigned int irq, for (i = 0; i < fls(valid_sources); i++) if (valid_sources & (1 << i)) irq_create_mapping(v->domain, i); + /* If no base IRQ was passed, figure out our allocated base */ + if (irq) + v->irq = irq; + else + v->irq = irq_find_mapping(v->domain, 0); } static void vic_ack_irq(struct irq_data *d)