linux-mips
[Top] [All Lists]

Re: unaligned access

To: ralf@linux-mips.org
Subject: Re: unaligned access
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Fri, 23 Feb 2007 12:36:30 +0900 (JST)
Cc: kevink@mips.com, sathesh_edara2003@yahoo.co.in, rajat.noida.india@gmail.com, linux-mips@linux-mips.org
In-reply-to: <20070223030645.GA1349@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <80178.32924.qm@web7903.mail.in.yahoo.com> <01fc01c75693$195858b0$10eca8c0@grendel> <20070223030645.GA1349@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Fri, 23 Feb 2007 03:06:45 +0000, Ralf Baechle <ralf@linux-mips.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:

        subsys_create_file(&kernel_subsys, &foo_attr);

Any comments?
---
Atsushi Nemoto

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