From patchwork Wed Aug 23 19:08:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 9918181 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 B8117603FF for ; Wed, 23 Aug 2017 19:09:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5FDB2867D for ; Wed, 23 Aug 2017 19:09:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AA0728A0A; Wed, 23 Aug 2017 19:09:34 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 17A57289FC for ; Wed, 23 Aug 2017 19:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=jwH/18RRribY5BgWlRPLY+VhAcb6HvMuBpQ+ebj/ttY=; b=aSW N7SiZDuUUpzC7EafCGCaFZTdTZxJSzHPfZ+X2OCNJ1BmMt0Rl9sItNvS7KBtBntZGfCMCtRTXl3ti PcA3EmKlQ+S+IkgwJjU7oCJ8QbUYnFHNBmS72O/1RyrQKy0H7Z+v3Usfx1salzP0R9v49nG9l/90H jt0mcDjOpw/QiXBWmwedrTpVTvT/ufdH3JEo23TzM1Ng5MUwDvEVwBZtlADX/NfgVH21QI2JP+OrI zrZxbv7XKUAgsc6ONJlN6BEyPphgS6JBpeRQm0voDyk9c/o4gE59DSCeuQ6RdkGDBhLyXjDB/jvgY eLx1TLPTBBAv6sRrynvxW8TEykRiZIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dkb1n-00049M-4l; Wed, 23 Aug 2017 19:09:23 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dkb1j-00038K-EB; Wed, 23 Aug 2017 19:09:21 +0000 Received: from localhost.localdomain ([95.90.209.78]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.183]) with ESMTPSA (Nemesis) id 0LbPII-1dIRzY14hu-00kzGb; Wed, 23 Aug 2017 21:08:46 +0200 From: Stefan Wahren To: Eric Anholt , Marc Zyngier , Rob Herring , Florian Fainelli Subject: [PATCH] ARM: bcm283x: Fix SMP for old dtb files Date: Wed, 23 Aug 2017 21:08:34 +0200 Message-Id: <1503515314-16576-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K0:ofdnnA3hAsK2Ra8PI6at4ISp5hJ4pOUCPGud32OeRBbrU07rZ9m CpGpkNldEWfeGKn9j949gy/FIpEMAjxma44fMp27nZQjQesiCObQTH2GXJA5tD3VrvWkA8t ZLcj6ywfOjbemxLAD/OW/tRam3Cye8V16Pu4lDb5+RdJt3od9tM+Vg1P5o64Lz4Geg4pM/N kXMcXulLRpXmeSfUuz9jw== X-UI-Out-Filterresults: notjunk:1; V01:K0:6Ek6QlZwvYg=:xCvs69LJ3dFiAOoyyAcjeF oBWSe+vgqNfGaj1gXnEyc+wjOsDWjJzCSsENPDZJxxFFr9+NS0U904vGHHZ4dL6OX0LAlpjZ7 BS3Pz1F7770GNnprAMx76prQVUJo5nde1T3lcei3nhUGhGLbqU9L7Cmj3e35xXMet8x4WfLzo 7VrydLkfU1yO1Sz1W7N4v1K+97drZPnA5v7bp4E6+vSTWD5DPsBYZrYYepmFqWA0v602P3v9l PlperrSAqwtS8dbWbauk4aLOdeFPy6BdNFKGst9INWUhVkGqw8RcqTtF00go9uXRZRnL5pZxM W2/eisQYhakqEvRIGHXvUO+p76afl4L8JU//SifBHGyo50YBrKxfYxeVApZG/zCkPLp4oXCjG Gp4tX/Cu7O5DEqmK3D2kxmcjfTBrzyxWVWLR93jnFWK6dED2euZYXOxpmzBFkWbZETexJkgat NgXQSReo49zF9x9CnI7A9q199lLBSqG0HU8Pcs/ZixkEHsP0De1xYz/JP/dAIRaE1CYYAirji F3oT/np1Sf/l/XylY05XaGF5gREoDNEsmYsuUi8b9Xo9LaSJY/U1q7ea3Te4ZlHO3RWgDVgtw 6QPLTsNpwn8VQKTG/VsrW1Yk6MvJjsU47Ldm1tAFZq3try3yUwpxMsdQbRJXouvwfKSHctGle 1Nx1pCpPfT85S9iWlgCZahPJi+rG+X+2ga38ux7yKcYcE99fm17EN7kyflrj5dURzs6ieX8mk Q2Uo+QaV1h3FH+N8rCVDoDuXbqJGKphq3fsorQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170823_120919_841618_98996CAA X-CRM114-Status: GOOD ( 14.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , Arnd Bergmann , Phil Elwell , arm@kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Since "irqchip: bcm2836: Move SMP startup code to arch/arm" the SMP for BCM2836 and BCM2837 (32 bit) depends on commit "ARM: dts: bcm283x: Add 32-bit enable method for SMP". This patch fixes SMP for older dtb files. Reported-by: Arnd Bergmann Signed-off-by: Stefan Wahren Acked-by: Arnd Bergmann --- arch/arm/mach-bcm/board_bcm2835.c | 6 +++++- arch/arm/mach-bcm/platsmp.c | 2 +- arch/arm/mach-bcm/platsmp.h | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-bcm/platsmp.h diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c index 24af33f..8cff865 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -19,16 +19,20 @@ #include #include +#include "platsmp.h" + static const char * const bcm2835_compat[] = { #ifdef CONFIG_ARCH_MULTI_V6 "brcm,bcm2835", #endif #ifdef CONFIG_ARCH_MULTI_V7 "brcm,bcm2836", + "brcm,bcm2837", #endif NULL }; DT_MACHINE_START(BCM2835, "BCM2835") - .dt_compat = bcm2835_compat + .dt_compat = bcm2835_compat, + .smp = smp_ops(bcm2836_smp_ops), MACHINE_END diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c index 7811160..7d95483 100644 --- a/arch/arm/mach-bcm/platsmp.c +++ b/arch/arm/mach-bcm/platsmp.c @@ -339,7 +339,7 @@ static const struct smp_operations nsp_smp_ops __initconst = { }; CPU_METHOD_OF_DECLARE(bcm_smp_nsp, "brcm,bcm-nsp-smp", &nsp_smp_ops); -static const struct smp_operations bcm2836_smp_ops __initconst = { +const struct smp_operations bcm2836_smp_ops __initconst = { .smp_boot_secondary = bcm2836_boot_secondary, }; CPU_METHOD_OF_DECLARE(bcm_smp_bcm2836, "brcm,bcm2836-smp", &bcm2836_smp_ops); diff --git a/arch/arm/mach-bcm/platsmp.h b/arch/arm/mach-bcm/platsmp.h new file mode 100644 index 0000000..b8b8b3f --- /dev/null +++ b/arch/arm/mach-bcm/platsmp.h @@ -0,0 +1,10 @@ +/* + * Copyright (C) 2017 Stefan Wahren + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + */ + +extern const struct smp_operations bcm2836_smp_ops;