From patchwork Tue Jul 19 11:57:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 9236877 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 760F5602F0 for ; Tue, 19 Jul 2016 11:59:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65820205A4 for ; Tue, 19 Jul 2016 11:59:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59C90205AF; Tue, 19 Jul 2016 11:59:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AD6BA205A4 for ; Tue, 19 Jul 2016 11:59:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPTem-0003uE-Iv; Tue, 19 Jul 2016 11:57:48 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPTej-0003sK-4p for linux-arm-kernel@lists.infradead.org; Tue, 19 Jul 2016 11:57:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date; bh=uBHueuZpiF9mVJSI5Runh3lTewcgBMMFoTE+4okVXo0=; b=ayybhKSoZqy5CG795BQhRS/9tSRNfLpLbSdNcUF/2vROup2AFDEfxzap0A2jIS0O6NQ3HyQAM3hQxglA/E1kEuzDDFVbAn9Q27lFJM2qNsdWNc7U3/fFwjCrWSSZscgKj9vdea/9IPFiEWvMvj0h4B2uU4NdUmsb+80RNHvz4ag=; Received: from n2100.armlinux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:48884) by pandora.armlinux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1bPTeA-0007FM-4I; Tue, 19 Jul 2016 12:57:10 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.76) (envelope-from ) id 1bPTe4-0005v5-PH; Tue, 19 Jul 2016 12:57:05 +0100 Date: Tue, 19 Jul 2016 12:57:03 +0100 From: Russell King - ARM Linux To: Simon Horman , Magnus Damm , arm@kernel.org Subject: [PATCH] Fix shmobile build with CONFIG_SMP=n Message-ID: <20160719115703.GJ1041@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160719_045745_655958_002D224F X-CRM114-Status: GOOD ( 10.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Shmobile currently fails to build when CONFIG_SMP is disabled: arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_init_fallback_ops': pm-rcar-gen2.c:(.init.text+0x744): undefined reference to `platform_can_secondary_boot' make[1]: *** [vmlinux] Error 1 Fix this by providing a stub for this function. Signed-off-by: Russell King --- Untested, please test. arch/arm/mach-shmobile/common.h | 7 +++++++ arch/arm/mach-shmobile/platsmp.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h index 1a8f7b3ab449..6badb3e41cfa 100644 --- a/arch/arm/mach-shmobile/common.h +++ b/arch/arm/mach-shmobile/common.h @@ -10,7 +10,14 @@ extern void shmobile_smp_sleep(void); extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn, unsigned long arg); extern bool shmobile_smp_cpu_can_disable(unsigned int cpu); +#ifdef CONFIG_SMP extern bool shmobile_smp_init_fallback_ops(void); +#else +static inline bool shmobile_smp_init_fallback_ops(void) +{ + return false; +} +#endif extern void shmobile_boot_scu(void); extern void shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys, unsigned int max_cpus); diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c index f3dba6f356e2..44d91f5624a3 100644 --- a/arch/arm/mach-shmobile/platsmp.c +++ b/arch/arm/mach-shmobile/platsmp.c @@ -37,8 +37,10 @@ bool shmobile_smp_cpu_can_disable(unsigned int cpu) } #endif +#ifdef CONFIG_SMP bool __init shmobile_smp_init_fallback_ops(void) { /* fallback on PSCI/smp_ops if no other DT based method is detected */ return platform_can_secondary_boot() ? true : false; } +#endif