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: 8272581 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 981DA9F6DA for ; Wed, 10 Feb 2016 15:08:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CCE8820373 for ; Wed, 10 Feb 2016 15:08:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7EE320166 for ; Wed, 10 Feb 2016 15:08:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752300AbcBJPII (ORCPT ); Wed, 10 Feb 2016 10:08:08 -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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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") --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);