[Top] [All Lists]

Re: unaligned access

Subject: Re: unaligned access
From: Atsushi Nemoto <>
Date: Fri, 23 Feb 2007 12:36:30 +0900 (JST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <01fc01c75693$195858b0$10eca8c0@grendel> <>
On Fri, 23 Feb 2007 03:06:45 +0000, Ralf Baechle <> wrote:
> There used to be a configuration option to allow logging which was a
> leftover from the times when I implemented the unaligned emulation.  I
> did never find it useful later on, so I removed that in almost 9 years
> ago and nobody missed it since :-)
> But I don't mind putting it back, controllable by sysctl if there is any
> demand for it.

Sometimes I want to know a value of unaligned_instructions variable,
to make sure nobody is causing such exceptions.  I just wanted to know
the statistics and did not want to control it, but showing name of the
process and PC would help to find out who is guilty.  I wonder if
anybody really want to handle the exception manually.

So how about this interface?

1. echo show > /sys/kernel/unaligned_action

Show register dump and processor name at each unaligned exception,
using show_regs() or someting.

2. echo quiet > /sys/kernel/unaligned_action

Siliently fixup unaligned exceptions.

3. cat /sys/kernel/unaligned_instructions

Print unaligned_instructions variable.

Creating files in /sys/kernel is fairly simple:

        subsys_create_file(&kernel_subsys, &foo_attr);

Any comments?
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>