From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] arm64: Fix kernel panic() in cpu_do_switch_mm() on QDF2400
Date: Fri, 24 Feb 2017 10:58:53 +0000 [thread overview]
Message-ID: <20170224105852.GC20130@arm.com> (raw)
In-Reply-To: <1487887418-20195-1-git-send-email-shankerd@codeaurora.org>
On Thu, Feb 23, 2017 at 04:03:38PM -0600, Shanker Donthineni wrote:
> The commit 38fd94b0275c 'arm64: Work around Falkor erratum 1003' has
> been added to fix the hardware bug but causes 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.
>
> [<ffff0000080989a0>] cpu_do_switch_mm+0x20/0x40
> [<ffff000008b18614>] efi_virtmap_load+0x34/0x40
> [<ffff000008b1812c>] virt_efi_get_next_variable+0x64/0xc8
> [<ffff000008b16204>] efivar_init+0x8c/0x348
> [<ffff0000092b777c>] efisubsys_init+0xd4/0x270
> [<ffff000009270c74>] do_one_initcall+0x80/0x110
> [<ffff000009270ea0>] kernel_init_freeable+0x19c/0x240
> [<ffff000008d8cef0>] kernel_init+0x10/0x100
> [<ffff000008082ec0>] 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 <shankerd@codeaurora.org>
> Tested-by: Manoj Iyer <manoj.iyer@canonical.com>
> ---
> v2: include 12 digit commit-id in commit description.
> v3: modified the commit subject to more descriptive.
Thanks for the v3, but I actually already rewrote the commit log when I
applied the patch locally yesterday :)
I'll push out the branch later today once I've hoovered up any other fixes
kicking around.
Will
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Shanker Donthineni <shankerd@codeaurora.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Mark Rutland <mark.rutland@arm.com>,
James Morse <james.morse@arm.com>,
Timur Tabi <timur@codeaurora.org>,
Vikram Sethi <vikrams@codeaurora.org>
Subject: Re: [PATCH v3] arm64: Fix kernel panic() in cpu_do_switch_mm() on QDF2400
Date: Fri, 24 Feb 2017 10:58:53 +0000 [thread overview]
Message-ID: <20170224105852.GC20130@arm.com> (raw)
In-Reply-To: <1487887418-20195-1-git-send-email-shankerd@codeaurora.org>
On Thu, Feb 23, 2017 at 04:03:38PM -0600, Shanker Donthineni wrote:
> The commit 38fd94b0275c 'arm64: Work around Falkor erratum 1003' has
> been added to fix the hardware bug but causes 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.
>
> [<ffff0000080989a0>] cpu_do_switch_mm+0x20/0x40
> [<ffff000008b18614>] efi_virtmap_load+0x34/0x40
> [<ffff000008b1812c>] virt_efi_get_next_variable+0x64/0xc8
> [<ffff000008b16204>] efivar_init+0x8c/0x348
> [<ffff0000092b777c>] efisubsys_init+0xd4/0x270
> [<ffff000009270c74>] do_one_initcall+0x80/0x110
> [<ffff000009270ea0>] kernel_init_freeable+0x19c/0x240
> [<ffff000008d8cef0>] kernel_init+0x10/0x100
> [<ffff000008082ec0>] 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 <shankerd@codeaurora.org>
> Tested-by: Manoj Iyer <manoj.iyer@canonical.com>
> ---
> v2: include 12 digit commit-id in commit description.
> v3: modified the commit subject to more descriptive.
Thanks for the v3, but I actually already rewrote the commit log when I
applied the patch locally yesterday :)
I'll push out the branch later today once I've hoovered up any other fixes
kicking around.
Will
next prev parent reply other threads:[~2017-02-24 10:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 22:03 [PATCH v3] arm64: Fix kernel panic() in cpu_do_switch_mm() on QDF2400 Shanker Donthineni
2017-02-23 22:03 ` Shanker Donthineni
2017-02-24 10:58 ` Will Deacon [this message]
2017-02-24 10:58 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170224105852.GC20130@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.