Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934852AbbEPJL1 (ORCPT ); Sat, 16 May 2015 05:11:27 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:34201 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934747AbbEPJLW (ORCPT ); Sat, 16 May 2015 05:11:22 -0400 MIME-Version: 1.0 In-Reply-To: <1431763769.23098.2.camel@mtksdaap41> References: <1430466210-22963-1-git-send-email-yingjoe.chen@mediatek.com> <1430896766.15346.13.camel@mtksdaap41> <1430899182.4930.2.camel@mtksdaap41> <1431763769.23098.2.camel@mtksdaap41> Date: Sat, 16 May 2015 11:11:20 +0200 Message-ID: Subject: Re: [PATCH 0/7] Add SMP bringup support for mt65xx socs From: Matthias Brugger To: Yingjoe Chen Cc: Mark Rutland , "devicetree@vger.kernel.org" , Lorenzo Pieralisi , Russell King , Arnd Bergmann , Pawel Moll , Ian Campbell , Catalin Marinas , Daniel Lezcano , "linux-kernel@vger.kernel.org" , Marc Carino , Rob Herring , linux-mediatek@lists.infradead.org, Sascha Hauer , Olof Johansson , Thomas Gleixner , srv_heupstream , "linux-arm-kernel@lists.infradead.org" , Jason Cooper Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2815 Lines: 81 2015-05-16 10:09 GMT+02:00 Yingjoe Chen : > On Wed, 2015-05-06 at 13:04 +0200, Matthias Brugger wrote: >> Hi Joe, >> >> 2015-05-06 10:29 GMT+02:00 Matthias Brugger : >> > 2015-05-06 9:59 GMT+02:00 Yingjoe Chen : >> >> On Wed, 2015-05-06 at 15:19 +0800, Yingjoe Chen wrote: >> >>> Hi Matthias, >> >> <...> >> >>> > I tried on the mt8135 eval board but it fails to bring up the CPU. >> >>> > >> >>> > When booting: >> >>> > [ 1.048588] CPU1: failed to come online >> >>> > [ 2.049914] CPU2: failed to come online >> >>> > [ 3.051245] CPU3: failed to come online >> >>> >> >>> >> >>> Thanks for testing, and the config file you provided. >> >>> It seems you are running THUMB2 kernel, unfortunately mt8135 trustzone >> >>> firmware doesn't support jump to THUMB2 code directly. >> >>> >> >>> I can workaround this with the following patch. I'll include it in my >> >>> next round. >> >>> >> >>> Joe.C >> >>> >> >>> -----8<---------------- >> >>> diff --git a/arch/arm/mach-mediatek/platsmp.c >> >>> b/arch/arm/mach-mediatek/platsmp.c >> >>> index e266b3d..5dea55a 100644 >> >>> --- a/arch/arm/mach-mediatek/platsmp.c >> >>> +++ b/arch/arm/mach-mediatek/platsmp.c >> >>> @@ -57,6 +57,18 @@ static const struct of_device_id mtk_smp_boot_infos[] >> >>> __initconst = { >> >>> static void __iomem *mtk_smp_base; >> >>> static const struct mtk_smp_boot_info *mtk_smp_info; >> >>> >> >>> +#ifdef CONFIG_THUMB2_KERNEL >> >>> +__asm__( >> >>> + ".arm\n" >> >>> + "mtk_secondary_startup_fixup:\n" >> >>> + " b secondary_startup\n" >> >>> + ".thumb\n" >> >>> +); >> >>> + >> >>> +void mtk_secondary_startup_fixup(void); >> >>> +#define secondary_startup mtk_secondary_startup_fixup >> >>> +#endif >> >> >> >> >> >> Replying myself. >> >> >> >> It seems kernel already have secondary_startup_arm which support this >> >> usage. I'll use that in my next version instead. >> > >> > With this I was able to get the board up and running. I will try mt6589 ASAP. >> >> I just realized, that your aforementioned patch for the THUMB2 kernel >> breaks SMP on mt6589. Strangely without this patch it works fine. >> > > Hi Matthias, > > Unfortunately I can't reproduce or figure out why this could happen. > I change to use common kernel code secondary_startup_arm in new series, > could you that a try? > Thanks. I just tried it on mt6589 and mt8135 and its works on both. Actually if you revert patch 1/9 SMP on mt6589 stops working. Thanks, Matthias -- motzblog.wordpress.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/