From patchwork Tue Mar 20 09:01:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 10296697 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 8B9FF602C2 for ; Tue, 20 Mar 2018 09:02:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AD1A295B0 for ; Tue, 20 Mar 2018 09:02:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F93E295B2; Tue, 20 Mar 2018 09:02:04 +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 [198.137.202.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 CEE70295B0 for ; Tue, 20 Mar 2018 09:02:03 +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=YK76GFBk60GR20IrXe6xc9bKmB0gsLzyHD+v9dQQlG4=; b=YXVTHh5/811ZjM InGCENMadSj1gGSgjp7mZOeLIHkcUoPyNiiUFKJtk3BKT3ytPo4DosX/BlKkrE/qub4mlpOyNX4r2 voeDQRYu10DZp1LhmTTsS9tTpH5l6tVMzAmsUP1mTsYlJF0H/aQdu9IsmEqtTiiyEbfNoVlYs2Ydb xE0A4IK9vSx67/EyFyLKxCvQtEld7P40Ki04OWSA6yrrcxUF952f4CeJKnBDhTrBPA5BEVYRlgcwG qHVKD11d+XESHqsQj9HhfRZebQtggRodZICKA+ZJwvgkURUsydxfOaa5cf9GlQFJcN2NKMRnOUn3U P/Pg3UlTe88XERnT19xg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyD9c-0000NW-M1; Tue, 20 Mar 2018 09:02:00 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyD9A-00006R-Fo; Tue, 20 Mar 2018 09:01:35 +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 1BE891435; Tue, 20 Mar 2018 02:01:20 -0700 (PDT) Received: from [10.1.206.75] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2CB5D3F487; Tue, 20 Mar 2018 02:01:19 -0700 (PDT) Subject: Re: Failed to boot ARM64 boards for recent linux-next To: Shawn Lin References: From: Marc Zyngier Organization: ARM Ltd Message-ID: <077cecdd-7982-dd33-454f-e38cc571366c@arm.com> Date: Tue, 20 Mar 2018 09:01:17 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180320_020132_736853_D8F9F44D X-CRM114-Status: GOOD ( 21.73 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:ARM/Rockchip SoC..." , Jeffy Chen , Robin Murphy , "linux-arm-kernel@lists.infradead.org" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Shawn, On 20/03/18 08:48, Shawn Lin wrote: > Hi Marc, > > I was able to boot my RK3399 board with in linux-next-20180314, > but not today. My bisect robot shows me it was introduced by > > commit d6062a6d62c643a06c393745d032da3e6441d4bd > Author: Marc Zyngier > Date: Fri Mar 9 14:53:19 2018 +0000 > > irqchip/gic-v3: Reset APgRn registers at boot time > > Booting a crash kernel while in an interrupt handler is likely > to leave the Active Priority Registers with some state that > is not relevant to the new kernel, and is likely to lead > to erratic behaviours such as interrupts not firing as their > priority is already active. > > As a sanity measure, wipe the APRs clean on startup. We make > sure to wipe both group 0 and 1 registers in order to avoid > any surprise. > > > The panic log is here: > https://paste.ubuntu.com/p/7WrJJDG6JQ/ > > Is it a known issue or is there a coming patch for that? Interesting. No, that wasn't the intention, but I may have missed a key detail (group 0 access traps to EL3 if SCR_EL3.FIQ==1). Can you have a go at the following hack, just to narrow it down: Let me know if that helps. Thanks, M. Tested-by: John Garry Tested-by: Shawn Lin diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 5bb7bb22f1c1..f8ff43b1d4f8 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -570,16 +570,12 @@ static void gic_cpu_sys_reg_init(void) switch(val + 1) { case 8: case 7: - write_gicreg(0, ICC_AP0R3_EL1); write_gicreg(0, ICC_AP1R3_EL1); - write_gicreg(0, ICC_AP0R2_EL1); write_gicreg(0, ICC_AP1R2_EL1); case 6: - write_gicreg(0, ICC_AP0R1_EL1); write_gicreg(0, ICC_AP1R1_EL1); case 5: case 4: - write_gicreg(0, ICC_AP0R0_EL1); write_gicreg(0, ICC_AP1R0_EL1); }