From patchwork Tue Aug 22 16:50:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 9915733 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 6020B603FA for ; Tue, 22 Aug 2017 16:51:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6663426AE3 for ; Tue, 22 Aug 2017 16:51:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 592D2288F1; Tue, 22 Aug 2017 16:51:46 +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 9784726AE3 for ; Tue, 22 Aug 2017 16:51:44 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Subject:References: In-Reply-To:Message-ID:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jI+sEA0gx4EyOT0Pw1CuVFpe8htpmLypAPInGFET93c=; b=Lba2taNhqBMDQA D/44DnX5e/Mah+2EQdO4NUSbO1ULflCtKAOkZudI3wKAdglaAOqhvnjLpccHgTC25uUWWykj04Xfu D6n+yyaw2dZ+RzPX/Lxb2Adm3z9DPEvl2DQ/5fWp1cSIpHBxq2OgCOIjcufJCc0YYnF5zOcveduvf yqVc+TRGHMfn5lnQU4BR2uv+9Tn62FStaCCAp6RJeznjcmZQJb3NZmdYMSmpCSMahGGxW0DiutvX7 N58x4vEmfC5GfNfQHBPOw6EhKcxb1kOqCaujq2UOfkrCQbmVTfYz3iRI6XKXxMxk0qIxzBHDFNaCy EGifCLzxMPWXIF8i3F0Q==; 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 1dkCOy-0003g6-MH; Tue, 22 Aug 2017 16:51:40 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dkCOX-0003A1-Ef for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2017 16:51:18 +0000 Received: from oxbaltgw06.schlund.de ([172.19.246.12]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.183]) with ESMTPSA (Nemesis) id 0M4Hw3-1dTUoS0Gtn-00rlkq; Tue, 22 Aug 2017 18:50:35 +0200 Date: Tue, 22 Aug 2017 18:50:33 +0200 (CEST) From: Stefan Wahren To: Phil Elwell , Eric Anholt , arm@kernel.org, arnd@arndb.de, Florian Fainelli Message-ID: <843914385.20451.1503420633158@email.1und1.de> In-Reply-To: References: <20170817183748.1450-1-f.fainelli@gmail.com> <20170817183748.1450-2-f.fainelli@gmail.com> Subject: Re: [GIT PULL 1/6] Broadcom soc changes for 4.14 MIME-Version: 1.0 X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.3-Rev30 X-Originating-Client: open-xchange-appsuite X-Provags-ID: V03:K0:VgM7GIUEkgedPPRbX2VVOHLIi5tIbaGQlbxgqh/TkLpeioPIGEJ 0paHgOPQMsswvdxNtIX+48nxDIpUBQZ3FXsRfCt88yM20sqwePbopv6ZC+9rWCBOWkFLZk4 d1BXnRmk4XcvYuV2kXilhzdPsp37sljl6xU+7iu9ZzbLpwN11RD5zemoyq3jhTBYnKkTgHN 7hpYeIxfJv/00jVa3qZdQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:btt2I+YZBbA=:rKoyRbsNMYPRje7LY1nHOI m1Wmr2DMvbOhEHrXF+tYszJLix3WJmegVkb44zbAENdc/y7cB8roV6KuQRh1QDqSb6CuFvxBI negn+LBx2G8QJ19G3Qjo18zMmJeza5/6gmMJUcVRYvX5PGTR7WwN777NqXfGpUKcKi+lkKzng TrdX031emw33mBu7Bs5V+k0JR/4/HadU+wL7cAku9NApwnaPiCHWMVJzYALNaMyUAACVRfBbE 8hc0lKnPstOy+2Q+jfMtAcZtpwqvkgMI1SefeV2qKKFUzvnWbO03fwo7HoLaU+IKmyd5ylu/w yigR3TR2Ys16NPYdX9zpO/836Jlw6D8/mUMBGKb3mFV2DJ05j3QOJ4O7gzVaiQe/Pa2fvTbi9 D8qWFH/4e0VFvZqUlETSKsSIiTr+QaRFFHZVCetwTMDLdn4Xa7bRUlLxymJn5+fcrLlDKZMT4 Nx1FUUHHqVuD3NMEguV/Y+hAHgT8Xgt7datNUDKIG304tgv22fSeGs0bI2h9UXVoBi2c0f2WD EddRWViDtvsmBYhAkjVVma3qWtVLtPRN6t36ba2xpiA8ivUVtWvgnzwHKYyMSA1TD5XijM9uq KVAuL86XSqE188zh2d09S8kHQMRHgTtLYHu5lCHAQUVUS5CCQPVtL3N7LSM66zgpW+6dRAWEW VxhQYxqPjAW9D97YaNUjxTamZDt5zDpzhG7OnwJPcPdypSGRLDZ8/sFAKbRALVuQJcunarNVR MUbnxVq8zL1cLKd20gnZRSx1XumuFK/CdB330u9PhOa9kPZcsZhELzB6Eko= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170822_095114_343650_98DB370D X-CRM114-Status: GOOD ( 23.42 ) 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: Rob Herring , khilman@kernel.org, Marc Zyngier , Stephen Boyd , Danilo Krummrich , Jon Mason , olof@lixom.net, bcm-kernel-feedback-list@broadcom.com, =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , 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 Hi, > Florian Fainelli hat am 22. August 2017 um 00:16 geschrieben: > > > On 08/17/2017 11:37 AM, Florian Fainelli wrote: > > Copying what Arnd was writing on IRC this morning, Eric, Stefan, can you > implement what Arnd recommends and I will pull again or cherry-pick > (whatever you prefer) thanks! Arnd, how quickly should we give you a new > PR with those changes? > > 10:07 < arnd> [florian], anholt, maz: I looked at the > arm-soc/for-4.14/soc pull request again now, and wonder if we can do a > little better than that > > 10:08 < arnd> it seems you have pulled in the DT branch before the move > of the bcm2836_smp_ops from drivers/irqchip to arch/arm/mach-bcm, to > hide an incompatible DT binding change: in the old code, no > enable-method was needed, but now it is > > 10:09 < arnd> clearly we want the enable-method to be there, but it > would be good if old dts files could keep working, in particular as > there are probably lots of people that hack their dts files to add > random peripherals, and we don't want to force them to update their > dtb with every kernel change > > 10:11 < arnd> how about we add a .smp_init handler to > DT_MACHINE_START(BCM2835, ...) to keep it working with the old DT? > > 10:12 < arnd> that would also get rid of the branch dependency as an > added bonus, but avoiding the boot breakage is more important of course i already had a discussion with Eric about the case the dts changes are missing and i wasn't able see a boot breakage ("only" a SMP breakage which is still a regression). > > 10:13 < arnd> Stefan Wahren did the patch, but he's either not on this > channel, or I don't know his nick > > 10:30 < arnd> on a related note, I see that the match table for the > machine descriptor doesn't list bcm2837, and the bcm2837.dtsi file > doesn't list itself as compatible with bcm2836, so that would have to be > added too to make it actually work > sorry i don't have much time today and i'm not sure how to implement the smp_init. Here is my draft (untested) which has a linker error (arch/arm/mach-bcm/board_bcm2835.o:(.arch.info.init+0x34): Undefined reference on `bcm2836_smp_ops). Does it goes in the right direction? > -- > Florian diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c index 24af33f..4f90f1f 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -19,16 +19,21 @@ #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), + .smp_init = smp_init_ops(bcm2836_smp_init_ops), MACHINE_END diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c index 7811160..c47c79a 100644 --- a/arch/arm/mach-bcm/platsmp.c +++ b/arch/arm/mach-bcm/platsmp.c @@ -343,3 +343,8 @@ static 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); + +bool __init bcm2836_smp_init_ops(void) { + smp_set_ops(&bcm2836_smp_ops); + return true; +} diff --git a/arch/arm/mach-bcm/platsmp.h b/arch/arm/mach-bcm/platsmp.h new file mode 100644 index 0000000..50c0ad3 --- /dev/null +++ b/arch/arm/mach-bcm/platsmp.h @@ -0,0 +1,4 @@ + +bool bcm2836_smp_init_ops(void); + +extern const struct smp_operations bcm2836_smp_ops;