From patchwork Wed Feb 10 15:07:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102819 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2702013lbl; Wed, 10 Feb 2016 07:15:11 -0800 (PST) X-Received: by 10.98.67.92 with SMTP id q89mr17111149pfa.137.1455116891670; Wed, 10 Feb 2016 07:08:11 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id db2si5560803pad.210.2016.02.10.07.08.11; Wed, 10 Feb 2016 07:08:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbcBJPIJ (ORCPT + 30 others); Wed, 10 Feb 2016 10:08:09 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:57607 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbcBJPIG (ORCPT ); Wed, 10 Feb 2016 10:08:06 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0Lbezn-1Zig8v28J1-00lDpH; Wed, 10 Feb 2016 16:07:22 +0100 From: Arnd Bergmann To: Peter Zijlstra , Ingo Molnar Cc: linaro-kernel@lists.linaro.org, "Rafael J. Wysocki" , Mark Brown , "Gautham R. Shenoy" , kernel-build-reports@lists.linaro.org, Viresh Kumar , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , linux-next@vger.kernel.org, Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH] irq_work: unhide irq_work_queue_on declaration on non-SMP Date: Wed, 10 Feb 2016 16:07:20 +0100 Message-ID: <4447865.IoQjlk8ngP@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <20160210095252.GS13270@sirena.org.uk> MIME-Version: 1.0 X-Provags-ID: V03:K0:i2ifYHErFklJvp8YAuwoYYvTPqonaSxMZ5pow6yulG/HxFJqaZl LPUfYn0jubGg5nPSKmnaBD2BPjdecWk6MNkVIRhdc+FJj/nDrE0ETHl1QSlMTeq3iAYoJ5X eVBEzI48BhhAemik/0T1K6AVljRFwhLFGnqjXDIzquKavyTg7xgpk1kD3+3ama8V8YYZpyy Dlyyt3I9nhJUjZSP3J+4Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:V85eFvTALO0=:1NLQxlnvBFmfgOP5fgg+iG 6PdHGrQPDEkKbMIYD6X6GKnpHFVLpWsZPKJiq/+EECuLAvhB9mDy067eT4ttXW+3iWBnm2oCv itNv1hmRM83yPQNiUl2umrW7XpPaLRQvDT1l5pwIVLt11p+SjaSNavJxyWjACfma6eSoY0mjN 1k2Vzs7TMNZ84ofPf0cemLQ3wuKk9tG7v1YKDpNneWmlXahrDtjzvTuoPpfJFI3doz507jR6z ol8NX8EvHKhR/Z6R6quY4NDjmFRt1lpyyAhfoKw9XRBun3o6H2i2sbW1SkPscX/kqrb1+DNK6 QxNvn9tdI83b/qqM4z0gl/oKgvB9gQBOf003qRXDHCmd+T/A2ighmQf0olj9vIVGVu2AVNvcV DkH2JaLeq5Fx2ZqnJNZkC/oLxpyXCvqeGvqaN71z+NJbp2CxL0K6YhO7ZGGNvwCDqzn7oshUj PYKC7cxVOSNT2Iq8sx1rfjK9c2/+Y4I/SpXd32Sd7Xvr+27dM2Q9cMT0/yXMpnz67weBmU+D0 MNnnwhfujA3ZBMXjN+M6iCHMqJBPMulAu1XbGWPvFO4rentpsjSeRvxH7nUnWEbqB4NkmkWhI XLJV2TQUb+1kXGG0O8n7Tyt/wMlMBl4s+Y6C4/+LgHdsjpUbeUPwJixkdSbR6vtavXFULZ4h9 1z+yr4uNbMrWwI9aJniiUdkgZi2cX3zXk0YPVtCL0NjOZPmFXfP7seMpOC422NXypBKx4tC6Y ufXkPsPO45lfqohY Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The cpufreq code uses 'if (IS_ENABLED(CONFIG_SMP))' to check whether it should queue a task on the local CPU or a remote one, however the irq_work_queue_on() function is not declared when CONFIG_SMP is not set: drivers/cpufreq/cpufreq_governor.c: In function 'gov_queue_irq_work': drivers/cpufreq/cpufreq_governor.c:251:3: error: implicit declaration of function 'irq_work_queue_on' [-Werror=implicit-function-declaration] irq_work_queue_on(&policy_dbs->irq_work, smp_processor_id()); This changes the conditional declaration so that irq_work_queue_on just queues the irq work on the only available CPU when CONFIG_SMP is not set, which is presumably what most people need anyway. Signed-off-by: Arnd Bergmann Fixes: 0144fa03ef46 ("cpufreq: governor: Replace timers with utilization update callbacks") diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h index 47b9ebd4a74f..c9bde50ef317 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h @@ -33,9 +33,13 @@ void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) #define DEFINE_IRQ_WORK(name, _f) struct irq_work name = { .func = (_f), } bool irq_work_queue(struct irq_work *work); - #ifdef CONFIG_SMP bool irq_work_queue_on(struct irq_work *work, int cpu); +#else +static inline bool irq_work_queue_on(struct irq_work *work, int cpu) +{ + return irq_work_queue(work); +} #endif void irq_work_tick(void);