From: sshtylyov@mvista•com (Sergei Shtylyov)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 4/5] ARMv6K and ARMv7 use fault statuses 3 and 6 as Access Flag fault
Date: Mon, 19 Jul 2010 14:11:32 +0400 [thread overview]
Message-ID: <4C4424D4.3000002@ru.mvista.com> (raw)
In-Reply-To: <bfd71c480c8d137cc4cc6261a42f514f9024ee53.1279529223.git.kirill@shutemov.name>
Hello.
Kirill A. Shutsemov wrote:
> Statuses 3 (0b00011) and 6 (0x00110) of DFSR are Access Flags faults on
> ARMv6K and ARMv7. Let's patch fsr_info[] at runtime if we are on ARMv7
> or later.
> Unfortunately, we don't have runtime check for 'K' extension, so we
> can't check for it.
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov•name>
[...]
> diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
> index 77cfdbe..d073b64 100644
> --- a/arch/arm/mm/alignment.c
> +++ b/arch/arm/mm/alignment.c
> @@ -926,8 +926,18 @@ static int __init alignment_init(void)
>
> hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN,
> "alignment exception");
> - hook_fault_code(3, do_alignment, SIGBUS, BUS_ADRALN,
> - "alignment exception");
> +
> + /*
> + * ARMv6K and ARMv7 use fault status 3 (0b00011) as Access Flag section
> + * fault, not as alignment error.
> + *
> + * TODO: handle ARMv6K properly. Runtime check for 'K' extension is
> + * needed.
> + */
> + if (cpu_architecture() <= CPU_ARCH_ARMv6) {
> + hook_fault_code(3, do_alignment, SIGBUS, BUS_ADRALN,
> + "alignment exception");
> + }
Curly braces not neeed here. I assume you haven't run your patch thru
scripts/checkpatch.pl?
WBR, Sergei
next prev parent reply other threads:[~2010-07-19 10:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-19 8:53 [PATCH 0/5] ARM: fix exceptions handling Kirill A. Shutsemov
2010-07-19 8:53 ` [PATCH 1/5] Use SIGBUS for unalinged access instead of SIGILL Kirill A. Shutsemov
2010-07-19 8:53 ` [PATCH 2/5] Add 'code' parameter for hook_fault_code() Kirill A. Shutsemov
2010-07-27 9:35 ` Russell King - ARM Linux
2010-07-27 9:42 ` Kirill A. Shutemov
2010-07-19 8:53 ` [PATCH 3/5] Check arch version and modify fsr_info[] depends on it at runtime Kirill A. Shutsemov
2010-07-19 8:53 ` [PATCH 4/5] ARMv6K and ARMv7 use fault statuses 3 and 6 as Access Flag fault Kirill A. Shutsemov
2010-07-19 10:11 ` Sergei Shtylyov [this message]
2010-07-19 11:20 ` Kirill A. Shutemov
2010-07-19 13:51 ` Sergei Shtylyov
2010-07-19 8:53 ` [PATCH 5/5] Workaround infinity loop in handling of translation faults Kirill A. Shutsemov
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=4C4424D4.3000002@ru.mvista.com \
--to=sshtylyov@mvista$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox