From patchwork Sun Jul 27 16:57:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 34340 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 32C6D21201 for ; Sun, 27 Jul 2014 16:57:37 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id ft15sf42666192pdb.10 for ; Sun, 27 Jul 2014 09:57:36 -0700 (PDT) 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:date :message-id:subject:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=2/qB79jByN2/3lN3DLrFxRI34uxAKPRwBAmuzRK0ZG8=; b=G45S6aZfQfl3nq43PiGjKQovOj7vTbXp5rG1aIHZYH8Fje4BWgDQpKDKIUH10Cv390 sqW/irqwQXmGgw9hqwCBzmpYDdsVYyXcblEUJoPKJdQIH4A8wDWDH1qzTlByOXr6F5iy FnMiHZmOUtnJeqFXan5RGTcU5sPH1sF9jjBYo7yQJzNlwq2l781vQjampbkihesCa2xG ui+6scEwzh1n/pd3K+Hko3iuyU+4oAZBSV6S7CzxD7WOzYF377EtaWI8gnZIZmi5IaAI r75fbkmvm5WvzRieR/tPZGzG7D1RpPWbfptTnhN+iFqO3FmhdATpUbqomOY8qR+MkoA+ 8YPA== X-Gm-Message-State: ALoCoQmnjhOltQVHWRlwMko6uFWhwqaqpaucwypq9HeMamR4OljPG+WFwMZSkkS16tuZrqO39qdI X-Received: by 10.66.182.130 with SMTP id ee2mr14739288pac.37.1406480256362; Sun, 27 Jul 2014 09:57:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.80 with SMTP id y74ls1770367qgd.0.gmail; Sun, 27 Jul 2014 09:57:36 -0700 (PDT) X-Received: by 10.224.46.8 with SMTP id h8mr43165307qaf.6.1406480256216; Sun, 27 Jul 2014 09:57:36 -0700 (PDT) Received: from mail-qg0-f48.google.com (mail-qg0-f48.google.com [209.85.192.48]) by mx.google.com with ESMTPS id 18si14738963qgn.94.2014.07.27.09.57.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 27 Jul 2014 09:57:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.192.48 as permitted sender) client-ip=209.85.192.48; Received: by mail-qg0-f48.google.com with SMTP id i50so7233089qgf.7 for ; Sun, 27 Jul 2014 09:57:36 -0700 (PDT) X-Received: by 10.224.15.197 with SMTP id l5mr34826246qaa.97.1406480256029; Sun, 27 Jul 2014 09:57:36 -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.96.16.166 with SMTP id h6csp166589qdd; Sun, 27 Jul 2014 09:57:35 -0700 (PDT) X-Received: by 10.70.96.130 with SMTP id ds2mr2959739pdb.145.1406480255203; Sun, 27 Jul 2014 09:57:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gi1si2386434pbd.100.2014.07.27.09.57.33 for ; Sun, 27 Jul 2014 09:57:35 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S1752315AbaG0Q5b (ORCPT + 19 others); Sun, 27 Jul 2014 12:57:31 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:58034 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751394AbaG0Q5a (ORCPT ); Sun, 27 Jul 2014 12:57:30 -0400 Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XBRkz-00024w-3n; Sun, 27 Jul 2014 16:57:13 +0000 Received: from broonie by debutante with local (Exim 4.83) (envelope-from ) id 1XBRkw-0006Pp-7A; Sun, 27 Jul 2014 17:57:06 +0100 From: Mark Brown To: Thomas Gleixner , Jason Cooper Cc: linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, Mark Brown Date: Sun, 27 Jul 2014 17:57:04 +0100 Message-Id: <1406480224-24628-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.1 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: [PATCH] irqchip: gic-v3: Only define gic_peek_irq() when building SMP X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.192.48 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: Mark Brown If building with CONFIG_SMP disbled (for example, with allnoconfig) then GCC complains that the static function gic_peek_irq() is defined but not used since the only reference is in the SMP initialisation code. Fix this by moving the function definition inside the ifdef. Signed-off-by: Mark Brown Acked-by: Marc Zyngier --- drivers/irqchip/irq-gic-v3.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 81519bae0453..30130f955151 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -200,19 +200,6 @@ static void gic_poke_irq(struct irq_data *d, u32 offset) rwp_wait(); } -static int gic_peek_irq(struct irq_data *d, u32 offset) -{ - u32 mask = 1 << (gic_irq(d) % 32); - void __iomem *base; - - if (gic_irq_in_rdist(d)) - base = gic_data_rdist_sgi_base(); - else - base = gic_data.dist_base; - - return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask); -} - static void gic_mask_irq(struct irq_data *d) { gic_poke_irq(d, GICD_ICENABLER); @@ -401,6 +388,19 @@ static void gic_cpu_init(void) } #ifdef CONFIG_SMP +static int gic_peek_irq(struct irq_data *d, u32 offset) +{ + u32 mask = 1 << (gic_irq(d) % 32); + void __iomem *base; + + if (gic_irq_in_rdist(d)) + base = gic_data_rdist_sgi_base(); + else + base = gic_data.dist_base; + + return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask); +} + static int gic_secondary_init(struct notifier_block *nfb, unsigned long action, void *hcpu) {