On Fri, 23 Feb 2007 03:06:45 +0000, Ralf Baechle <firstname.lastname@example.org> 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: