From patchwork Thu Feb 23 20:02:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shanker Donthineni X-Patchwork-Id: 9588921 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 9D80B60578 for ; Thu, 23 Feb 2017 20:03:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89639285BF for ; Thu, 23 Feb 2017 20:03:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C0B6288E0; Thu, 23 Feb 2017 20:03:03 +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 2BE16285BF for ; Thu, 23 Feb 2017 20:03:02 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=bsfK2xTp8/U7IY+y2kresgXqZo/7D6pQdxlF9/Chr9w=; b=tpc zg+NeeZjeTmatY/1+tTPhoPugHbEfAJ29SYPUvESUXHPpJG4vnFnAeuTZJX+mqSiTsFTtlisIv+4/ Usr7FdS2M+jcymHUutUlKplVlFeP9ZrtH1Fae4w4gho+4KtrwQxXqnfb2YwowiYQOZp9IGy7JnJ2U cyslJygQCbYhc+ZRq9/I8UX2wbW2vzJk+p7iCPbP5FCZBSdWaGCi/JWsf1izJWfh6kUaZIyb7Ei+z F2Qa87pX/6I2GY3e8Oj+sIJH4w+OglvqPjhBpws38XNdjY/1eol8qcaWxKnewcLrBDMN2+vzS5L5F IYIHzbrBPUDC1prI5HmR7bEqnd9Rvtw==; 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 1cgzbM-0005lC-Vf; Thu, 23 Feb 2017 20:02:56 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgzax-0005kG-T1 for linux-arm-kernel@lists.infradead.org; Thu, 23 Feb 2017 20:02:33 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8A60560BE2; Thu, 23 Feb 2017 20:02:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1487880131; bh=OCeIQbO/Z5hIYRzO/8lvMscYHewLtrhjmG+G+847zW4=; h=From:To:Cc:Subject:Date:From; b=X15T1AZIfROZbDBageb4DyMProvNiQQ/iTamb+2LV/3iWeQ+1TyC3wbTaQ+ooeaG1 dLc8X9NEqw/dqDIxJjLmM6VLLVU/W8wYVSC+66n/YmvtMuM0+TNBooTeGiuftAYTEZ hZTXBXu3bE+f9eMtGPqmtoWPTejtajisEDWGWD5s= Received: from shankerd-ubuntu.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: shankerd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9BFAF607A2; Thu, 23 Feb 2017 20:02:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1487880130; bh=OCeIQbO/Z5hIYRzO/8lvMscYHewLtrhjmG+G+847zW4=; h=From:To:Cc:Subject:Date:From; b=XIoijuFL+ko1ZNOugEmj2m5CjH1s9cMw7zGLcnllorSMuxlcsgUqbXbmKiPCWlGaU 4RK4pPKhH98kYrFAOpk0TUo0nUvtKGpAZUfG9ykPIEst0XcX+FMG04di8jc5nQydNF GbkvSkpiCilsZMrAHnumMj4KtU32VC5Ybpr6XWTU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9BFAF607A2 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=shankerd@codeaurora.org From: Shanker Donthineni To: Catalin Marinas Subject: [PATCH v2] arm64: Fix the kernel panic() on QDF2400 platform Date: Thu, 23 Feb 2017 14:02:05 -0600 Message-Id: <1487880125-1371-1-git-send-email-shankerd@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170223_120231_981137_EF5DFFDC X-CRM114-Status: GOOD ( 12.15 ) 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: Mark Rutland , Vikram Sethi , Timur Tabi , Will Deacon , linux-kernel , James Morse , Shanker Donthineni , linux-arm-kernel MIME-Version: 1.0 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 The commit 38fd94b0275c 'arm64: Work around Falkor erratum 1003' has been added to fix the hardware bug but causing a system crash. The value of the register x1 which contains 'struct mm_struct *' should be preserved inside macro pre_ttbr0_update_workaround. Macro pre_ttbr0_update_workaround expects 2nd and 3rd arguments are temporary registers. Don't clobber register x1, Otherwise the next load operation 'mmid x1 x1' access the invalid address. [] cpu_do_switch_mm+0x20/0x40 [] efi_virtmap_load+0x34/0x40 [] virt_efi_get_next_variable+0x64/0xc8 [] efivar_init+0x8c/0x348 [] efisubsys_init+0xd4/0x270 [] do_one_initcall+0x80/0x110 [] kernel_init_freeable+0x19c/0x240 [] kernel_init+0x10/0x100 [] ret_from_fork+0x10/0x50 Code: d5033fdf b340bc01 d5182001 d5033fdf (f9416821) ---[ end trace 15247ca922eb6bb7 ]--- note: swapper/0[1] exited with preempt_count 2 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b SMP: stopping secondary CPUs ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Signed-off-by: Shanker Donthineni Tested-by: Manoj Iyer --- v2: include 12 digit commit-id in commit description. arch/arm64/mm/proc.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index cd4d53d..877d42f 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -138,7 +138,7 @@ ENDPROC(cpu_do_resume) * - pgd_phys - physical address of new TTB */ ENTRY(cpu_do_switch_mm) - pre_ttbr0_update_workaround x0, x1, x2 + pre_ttbr0_update_workaround x0, x2, x3 mmid x1, x1 // get mm->context.id bfi x0, x1, #48, #16 // set the ASID msr ttbr0_el1, x0 // set TTBR0