From patchwork Mon Jun 5 07:43:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 9765663 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 65934602BF for ; Mon, 5 Jun 2017 07:44:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56C5427CF9 for ; Mon, 5 Jun 2017 07:44:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AE9627DCD; Mon, 5 Jun 2017 07:44:11 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable 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 36E1F27CF9 for ; Mon, 5 Jun 2017 07:44:09 +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:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3039aaKkNR1lzMj+1FGwgZUUZks22FTKDuJFyTtT+v0=; b=AmkbEW4iXlGoHO OpH2TDc1Bf21rAir3dMJe2iuVapVvLrmZjxA4VPfvYSBdWMC9c3OE/AJ0SezojEnmel179FX29Te1 vNkLTyk1qRlIVFsQuxLKgmTMRao/3AK1CmGt1Y01Bp6Pz0cb4PvVfiaJQdksKBtISGkudLekb7Y8c S9X6EBlCOumqzmvCox5Ssre7apqEQiUA1fcy7MsvgORI+c7M80OQLT46ztYAvFQc97MyX/Bxn2Ghr TJypYkvF+35jPHNV3tJMlj3dnS/AoNMwcYV7vBlhFYQ7ucY/kwVAXOyr7N7GajWMnhBMNZ65LPrN/ Wtl4cwuUDGaXJ9dJN+zg==; 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 1dHmgL-0000Yk-2n; Mon, 05 Jun 2017 07:44:09 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dHmgH-0000Vf-SY for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2017 07:44:07 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C0407344; Mon, 5 Jun 2017 00:43:44 -0700 (PDT) Received: from [10.1.207.16] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5F9033F589; Mon, 5 Jun 2017 00:43:43 -0700 (PDT) Subject: Re: Vexpress TC2 no longer booting on v4.12-rc1 To: Mathieu Poirier , Russell King - ARM Linux References: <20170602222449.GB4902@n2100.armlinux.org.uk> From: Marc Zyngier Organization: ARM Ltd Message-ID: <39e524be-188a-afcb-dca2-7e2a37bfcbb6@arm.com> Date: Mon, 5 Jun 2017 08:43:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170605_004405_927723_12F18A23 X-CRM114-Status: GOOD ( 15.47 ) 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: Christoffer Dall , kvm@vger.kernel.org, Ard Biesheuvel , Catalin Marinas , kvmarm@lists.cs.columbia.edu, "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 Mathieu, On 05/06/17 02:47, Mathieu Poirier wrote: > On 2 June 2017 at 16:24, Russell King - ARM Linux wrote: >> On Fri, Jun 02, 2017 at 04:16:59PM -0600, Mathieu Poirier wrote: >>> Good afternoon Russell and friends, >>> >>> I noticed that my vexpress-TC2 platform stopped booting when moving to >>> kernel v4.12-rc1 (same with -rc2 and 3). The last time things worked >>> properly was on v4.11. I did a bisect between v4.11 and v4.12-rc1 and >>> ended up on [1], hence this email. >>> >>> Since CONFIG_ARM_VIRT_EXT is selected by default I removed the >>> "#ifdef CONFIG_ARM_VIRT_EXT" section in the last hunk of the patch and >>> the system sprung up to life again. >> >> Hmm, this doesn't make much sense. The code in last hunk of the patch >> you refer to should only get run during system shutdown, not during >> system boot, so I think something else is going on... >> >> Please could you test again, this time rather than removing the #ifdef, >> add two "mov r0, r0" there? (So replacing the two instructions that >> removing the ifdef would have exposed.) > > That works - by replacing the original code with a couple of "mov r0, > r0" the system is able to boot again. That's quite peculiar. It would tend to indicate that something resets a CPU behind our back, leading to all kind of ugly things. Grepping around, my bet is on MCPM, which seems to do all kind of horrible things. Can you give the following hack a go? Can you let me know if that helps? If it does, we can then think of cleaning up the dangerous duplication of functionality... Thanks, M. diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c index cf062472e07b..d8b6b688e938 100644 --- a/arch/arm/common/mcpm_entry.c +++ b/arch/arm/common/mcpm_entry.c @@ -300,7 +300,7 @@ void mcpm_cpu_power_down(void) * on the CPU. */ phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset); - phys_reset(__pa_symbol(mcpm_entry_point)); + phys_reset(__pa_symbol(mcpm_entry_point), is_hyp_mode_available()); /* should never get here */ BUG(); @@ -389,7 +389,7 @@ static int __init nocache_trampoline(unsigned long _arg) __mcpm_cpu_down(cpu, cluster); phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset); - phys_reset(__pa_symbol(mcpm_entry_point)); + phys_reset(__pa_symbol(mcpm_entry_point), is_hyp_mode_available()); BUG(); }