From patchwork Thu Feb 23 03:10:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shanker Donthineni X-Patchwork-Id: 9587675 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 D93AB604A2 for ; Thu, 23 Feb 2017 03:11:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6FB0286B2 for ; Thu, 23 Feb 2017 03:11:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB5C7286D1; Thu, 23 Feb 2017 03:11:42 +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=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 E6139286B2 for ; Thu, 23 Feb 2017 03:11:41 +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=kkZC462OrpxTwz4ndXasIEpK6qyIjzGsyKrwT16IqNE=; b=Hcu 4gjXaVcLPaVaoFyuu9jRe9ROmPs7hEsdpevNluG/LRoPhQzeHFIQxdBtWqGYPCnNdYJLnr+O04gNu h+B4FgCwlgrwWM39Tbg5lV96rKDXvs3vTURQAGXkdV705s8St6fyFdgGSs/xrX3Bh/94Fr8rI9rTX aOPqfBKV6bxvzztMxDTEyqMXcBF0UP21no/G7OZCyWTs6bmzMqE6yzr/DfD/gBuY67c2u4NSq8KAn ukk9ymNMYHmqh8RPKb4ccOl9bOQmkDK3sRoXPWRhupbO7+lDHU8U+47BX1q3VZruHSGIpowWdE+QL 3Q6c8NuOmM7hECnPvdNN/peXZi/AXPg==; 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 1cgjoV-0001Kl-90; Thu, 23 Feb 2017 03:11:27 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgjoQ-0001Jr-Td for linux-arm-kernel@lists.infradead.org; Thu, 23 Feb 2017 03:11:25 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0698B60C92; Thu, 23 Feb 2017 03:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1487819462; bh=/Yy1Goi4WlhiqazYW0J92+IEbdpK3iEGf5v9i/jCKfo=; h=From:To:Cc:Subject:Date:From; b=MbTYql5vyflc/9BpGzltn4y2QuB8rSM77s3ReVCMvEehlfEH+s4UsShhZjCZmaxpa nVt2LfXFV11vaANdnSYz1udLI9BALCIuJWk29OW8X4guJGXwtkdYnHMm8XUJZKZ/J0 vgWVliwv5gUCRAraLTVmNviJyQ7/AuIvXfqXATdw= 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 2029E60C92; Thu, 23 Feb 2017 03:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1487819460; bh=/Yy1Goi4WlhiqazYW0J92+IEbdpK3iEGf5v9i/jCKfo=; h=From:To:Cc:Subject:Date:From; b=L46ECVxwjlpcOqRo49ItqS1E94r5xvRUrs/jLBaXyAc4d7vxwDzgu8Al4hYi6l51s GnaDDtb6XKRTmktICEY5Vz2jReWNwvv2EXLk680P4g+4xLKYKv2vPzrzDmgKdTNCKZ H4jwSzd8yBHJBcU9RFkIh2Q9RAzzfJofNB2LKBHE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2029E60C92 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 , Will Deacon Subject: [PATCH] arm64: Fix the kernel panic() on QDF2400 platform Date: Wed, 22 Feb 2017 21:10:48 -0600 Message-Id: <1487819448-8715-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-20170222_191123_022035_A34BE54B X-CRM114-Status: GOOD ( 12.22 ) 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 , 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 38fd94b0 '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 --- 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