From patchwork Mon Jan 30 11:48:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 9544927 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 EFF1D60417 for ; Mon, 30 Jan 2017 11:50:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E762226E4E for ; Mon, 30 Jan 2017 11:50:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA7FA26E97; Mon, 30 Jan 2017 11:50:55 +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 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 4AE9126E4E for ; Mon, 30 Jan 2017 11:50:55 +0000 (UTC) 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 1cYATs-0001aH-KQ; Mon, 30 Jan 2017 11:50:44 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cYASh-0007vU-I1 for linux-arm-kernel@lists.infradead.org; Mon, 30 Jan 2017 11:49:32 +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 6BB4F15BF; Mon, 30 Jan 2017 03:49:11 -0800 (PST) Received: from [10.1.206.46] (melchizedek.cambridge.arm.com [10.1.206.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 985F13F24D; Mon, 30 Jan 2017 03:49:10 -0800 (PST) Message-ID: <588F27F1.6050907@arm.com> Date: Mon, 30 Jan 2017 11:48:01 +0000 From: James Morse User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Yury Norov Subject: Re: next-20170125 hangs on aarch64 References: <20170129101255.GA29415@yury-N73SV> <20170129122125.GA20269@yury-N73SV> In-Reply-To: <20170129122125.GA20269@yury-N73SV> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170130_034931_607691_B6B03A6B X-CRM114-Status: GOOD ( 10.28 ) 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: Andy Gross , linux-kernel@vger.kernel.org, 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 Yury, [CC: Andy Gross] On 29/01/17 12:21, Yury Norov wrote: > On Sun, Jan 29, 2017 at 03:42:55PM +0530, Yury Norov wrote: >> Hi all, >> >> I pulled next-20170125 kernel, and found it hanged on boot. The exact reason is >> panic on dereferencing of the 0xffffffc8 address, which is most probably the >> attempt to dereference the ENOSYS error code as the address. next-20170124 works >> fine, at least it boots. >> >> Does anyone have details on that? I hit this with next-20170130 too, in /arch/arm64/kernel/smccc-call.S aabde95fc543 changed the SMCCC macro to check for an optional quirk structure. A previous patch provided: > #define arm_smccc_smc(...) __arm_smccc_smc(__VA_ARGS__, NULL) to handle the 'no quirk' case, but this missed HVC calls. The following hunk fixes/hides it for me: ----------------------------%<---------------------------- ----------------------------%<---------------------------- Thanks, James diff --git a/arch/arm64/kernel/smccc-call.S b/arch/arm64/kernel/smccc-call.S index 72ecdca929b1..9e287a7d1822 100644 --- a/arch/arm64/kernel/smccc-call.S +++ b/arch/arm64/kernel/smccc-call.S @@ -15,18 +15,20 @@ #include #include - .macro SMCCC instr + .macro SMCCC instr, maybe_quirk = 0 .cfi_startproc \instr #0 ldr x4, [sp] stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS] stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS] ldr x4, [sp, #8] + .if \maybe_quirk != 0 cbz x4, 1f /* no quirk structure */ ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS] cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6 b.ne 1f str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS] + .endif 1: ret .cfi_endproc .endm @@ -38,7 +40,7 @@ * struct arm_smccc_quirk *quirk) */ ENTRY(__arm_smccc_smc) - SMCCC smc + SMCCC smc, 1 ENDPROC(__arm_smccc_smc) /*