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: 9236871 X-Patchwork-Delegate: horms@verge.net.au 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 AF2DA602F0 for ; Tue, 19 Jul 2016 11:57:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E5C9205A4 for ; Tue, 19 Jul 2016 11:57:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93512205AF; Tue, 19 Jul 2016 11:57:19 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A23FA205A4 for ; Tue, 19 Jul 2016 11:57:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbcGSL5R (ORCPT ); Tue, 19 Jul 2016 07:57:17 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:37956 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752364AbcGSL5R (ORCPT ); Tue, 19 Jul 2016 07:57:17 -0400 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 Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.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) Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.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