From patchwork Thu May 21 01:22:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 6451221 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@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 640D29F318 for ; Thu, 21 May 2015 01:20:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EBDC20429 for ; Thu, 21 May 2015 01:20:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57805203EC for ; Thu, 21 May 2015 01:20:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754106AbbEUBUM (ORCPT ); Wed, 20 May 2015 21:20:12 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34072 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753055AbbEUBUL (ORCPT ); Wed, 20 May 2015 21:20:11 -0400 Received: by pabru16 with SMTP id ru16so86574386pab.1; Wed, 20 May 2015 18:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=8ttQi/4TwM+NMme6kU9RgX6IWAeOQhllJnh5h2lC7dI=; b=I/XGFykqRD0m0Ktti0db2Rw/+u80p89loEv/BpxTVPC1N0P4FEx+I0l1n2boRZstZG LnXcREIkd+V8z+te5V3Gc+4jCbnC7D5At91Lfpa6GuSN2a1Mcx0viShhL+CIipkEVILT iP/kgfm+cvcJLfswQxFIWW5ovEmMNdO7jfvVWfAqTRyRjOrbSu1FU63sjCCwK9ep4WDe y8pZ9G+9nwlr7iQoePt2cfd3op3XXMIQRQ715glfY/UBHv1zhqz2oOWDrIr+HLup9pwc iHTzsPNTXVYiJVfTHeW8bP5msk2fKO5Lw3GpXNlursiKGQZQ6Wwldq10vhIkg0XAhfQA xD1w== X-Received: by 10.68.238.228 with SMTP id vn4mr396724pbc.166.1432171210680; Wed, 20 May 2015 18:20:10 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id gs7sm17323579pbc.6.2015.05.20.18.20.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 18:20:09 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com, keita.kobayashi.ym@renesas.com, horms@verge.net.au, Magnus Damm Date: Thu, 21 May 2015 10:22:21 +0900 Message-Id: <20150521012221.25972.69124.sendpatchset@little-apple> In-Reply-To: <20150521012138.25972.91336.sendpatchset@little-apple> References: <20150521012138.25972.91336.sendpatchset@little-apple> Subject: [PATCH 04/04] ARM: shmobile: Remove r8a7791 non-DT APMU override Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 From: Magnus Damm Adjust the r8a7791 SoC support code to not configure any non-DT SMP code in case the DT-based enable-method has been installed already. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/r8a7791.h | 2 +- arch/arm/mach-shmobile/setup-r8a7791.c | 2 +- arch/arm/mach-shmobile/smp-r8a7791.c | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/arm/mach-shmobile/r8a7791.h +++ work/arch/arm/mach-shmobile/r8a7791.h 2015-05-20 22:52:00.602366518 +0900 @@ -1,6 +1,6 @@ #ifndef __ASM_R8A7791_H__ #define __ASM_R8A7791_H__ -extern struct smp_operations r8a7791_smp_ops; +bool r8a7791_smp_init(void); #endif /* __ASM_R8A7791_H__ */ --- 0001/arch/arm/mach-shmobile/setup-r8a7791.c +++ work/arch/arm/mach-shmobile/setup-r8a7791.c 2015-05-20 22:55:48.172366518 +0900 @@ -29,7 +29,7 @@ static const char *r8a7791_boards_compat }; DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)") - .smp = smp_ops(r8a7791_smp_ops), + .smp_init = r8a7791_smp_init, .init_early = shmobile_init_delay, .init_time = rcar_gen2_timer_init, .init_late = shmobile_init_late, --- 0001/arch/arm/mach-shmobile/smp-r8a7791.c +++ work/arch/arm/mach-shmobile/smp-r8a7791.c 2015-05-20 22:57:53.502366518 +0900 @@ -54,7 +54,7 @@ static int r8a7791_smp_boot_secondary(un return shmobile_smp_apmu_boot_secondary(cpu, idle); } -struct smp_operations r8a7791_smp_ops __initdata = { +static struct smp_operations r8a7791_smp_ops __initdata = { .smp_prepare_cpus = r8a7791_smp_prepare_cpus, .smp_boot_secondary = r8a7791_smp_boot_secondary, #ifdef CONFIG_HOTPLUG_CPU @@ -63,3 +63,12 @@ struct smp_operations r8a7791_smp_ops __ .cpu_kill = shmobile_smp_apmu_cpu_kill, #endif }; + +bool __init r8a7791_smp_init(void) +{ + /* only setup when no other DT based method is detected */ + if (!platform_can_secondary_boot()) + smp_set_ops(&r8a7791_smp_ops); + + return true; +}