From patchwork Thu Jun 30 12:25:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9207413 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 DD84D60752 for ; Thu, 30 Jun 2016 12:24:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF0A3284AC for ; Thu, 30 Jun 2016 12:24:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C39A02867D; Thu, 30 Jun 2016 12:24:43 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 04773284AC for ; Thu, 30 Jun 2016 12:24:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752017AbcF3MYS (ORCPT ); Thu, 30 Jun 2016 08:24:18 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:64619 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbcF3MYQ (ORCPT ); Thu, 30 Jun 2016 08:24:16 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0M89c9-1bVk7b1o0H-00vk3Z; Thu, 30 Jun 2016 14:22:46 +0200 From: Arnd Bergmann To: Simon Horman , Magnus Damm Cc: Arnd Bergmann , linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: shmobile: don't call platform_can_secondary_boot on UP Date: Thu, 30 Jun 2016 14:25:19 +0200 Message-Id: <20160630122529.4031024-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:3xslXzkS9ey3TIPF+OuarfrzwNdomsEKaHb5P/vDiqoqkY6y7M2 tctKX4IfLbGcnFnQrZHFmlG1o6WYAlI+lsyLTOoT1qKfvB59jPHLhOBigptSdVycak3i07K 7tJWApDKuGZ7CT59QV+bOpeJMDM8d0mgKBwNJfV9GtsSPVkd3xalQ6PEdDCMyC0BHuJRZQ7 1F003EPWH6igmVp7aKUsA== X-UI-Out-Filterresults: notjunk:1; V01:K0:UaYKAQ4mW2c=:EIe2PDzO9PSQo8Ne53riGa ap2u+msJjtH5bI3TogR+b3GJ2uAknEHV0n4Q0X42ps8eOm2h9+h7fW52qr3T7CNycgYucsctS DGJPK+tQc8ch954ItEK0hacr9zPnlpDsPfRbOcG4J9j3S2mMla2K6jIjCelVyzaJPt+N+QAp6 nUOBNUyl72Pt19aNcQXCjvfO/ZPr7T7vRkr0j4KlIOVgvYC1sLu8nljtzLO/EwmhFFOZUSv75 IvgeuDKiOQ0WhgxkB8ielU7FZnRc1z72vhxVw98OnNXkC7TSa9g0fxgZKzLAiHFQk06IXUDrY X2GkzwpsxkFlsgKsVzEyCPhI/p/a20e3dWqGcj0QK5bWJGvPrAKQrEl7O/P2GCFPEOehGNf28 aqkDYggym6CPKKzGLrLchiLjFKOqPpYQPorFY9n/smxRV1ABKxIbsOAM4j/xA/MjPcScbvTET T23/Y85XyT5xqi5bGtcy/4q4hB44ehkVs3XTNqYPvDKjrwHcqokTqJfYmB2upl2Ukl9x4BPW3 Upirr9Cm5lKe8FICakLUTAzslEBU3lQmdXfeuTKQsUz8FRDn0PMApA8qvfH0NphWn61AoE4im uJcBPd9zAe7Ow+l9Q0+6JGHWIO2QUeyTKXcJiZnp4jkxIX0GYE1oXiZGfaJlMKiVKQkpfUJzy xONjXRniJpwRRnI1DfZc1lxdVQhXHShNVAQ46IcLwKBUd0OtA+ud4SD3QrxepdflaedE= 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 For rcar-gen2, we build the SMP files even for UP configurations, and that just broke: arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_init_fallback_ops': pm-rcar-gen2.c:(.init.text+0x40c): undefined reference to `platform_can_secondary_boot' This adds an compile-time check before the call to platform_can_secondary_boot, turning the function into an empty stub for UP configurations. Signed-off-by: Arnd Bergmann Fixes: c21af444eace ("ARM: shmobile: smp: Add function to prioritize DT SMP") Acked-by: Geert Uytterhoeven --- arch/arm/mach-shmobile/platsmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c index f3dba6f356e2..02e21bceb085 100644 --- a/arch/arm/mach-shmobile/platsmp.c +++ b/arch/arm/mach-shmobile/platsmp.c @@ -40,5 +40,8 @@ bool shmobile_smp_cpu_can_disable(unsigned int cpu) bool __init shmobile_smp_init_fallback_ops(void) { /* fallback on PSCI/smp_ops if no other DT based method is detected */ + if (!IS_ENABLED(CONFIG_SMP)) + return false; + return platform_can_secondary_boot() ? true : false; }