From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 22 Feb 2007 07:11:53 +0000 (GMT) Received: from web7904.mail.in.yahoo.com ([202.86.4.80]:58512 "HELO web7904.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP id S20037641AbXBVHLr (ORCPT ); Thu, 22 Feb 2007 07:11:47 +0000 Received: (qmail 6800 invoked by uid 60001); 22 Feb 2007 07:10:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=GBnhDfOGtbKYLAZaV23gVctbDguKzn6FzKB5EU7whOk6DJ2kpRgIFlmeAMPzBvvDACAsTXO9f5xMvbpLU1252nl0Y4pcBLKDkMXyNAp1MvheBKiO0GO8/V4M6GE0I6eGVbdsPEHzQWdARfHxyFMdWaQlXaHukezrWIxlV6pv8o0=; X-YMail-OSG: GKEWKwIVM1m0B_WeMqmaGmzIuff9emUs_cBCxCEeawRhRmqTV4TOaPdSPK9m_re0nlvT9p3roNaQkavsvmdqrwFbe8WXo_5WVCe0UUgWnuteWlTuFY06PzfAmeiDONRpeYzwFadVU9CSj7n7SwHE2g-- Received: from [61.246.223.98] by web7904.mail.in.yahoo.com via HTTP; Thu, 22 Feb 2007 07:10:40 GMT Date: Thu, 22 Feb 2007 07:10:40 +0000 (GMT) From: sathesh babu Subject: unaligned access To: linux-mips@linux-mips.org, sathesh babu MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-314701750-1172128240=:6765" Content-Transfer-Encoding: 8bit Message-ID: <566085.6765.qm@web7904.mail.in.yahoo.com> Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14193 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: sathesh_edara2003@yahoo.co.in Precedence: bulk X-list: linux-mips --0-314701750-1172128240=:6765 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I have ported linux-2.6.12 kernel on MIPS processor.I would like to print the warning messges whenenver kernel or user code try to access unaligned address ( including proceor ID ). Is there any configuration option avaliable in the kernel to view the unaligned address? Thanks in advance. Regards, Sathesh --------------------------------- Here’s a new way to find what you're looking for - Yahoo! Answers --0-314701750-1172128240=:6765 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi,
    I have ported linux-2.6.12 kernel on MIPS processor.I would like to
print the warning messges whenenver kernel or user code  try to access
unaligned address ( including proceor ID ).
  Is there any configuration option  avaliable in the kernel to view
the unaligned address?
  
  Thanks in advance.
  
  Regards,
  Sathesh


Here’s a new way to find what you're looking for - Yahoo! Answers --0-314701750-1172128240=:6765-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 22 Feb 2007 07:54:31 +0000 (GMT) Received: from nf-out-0910.google.com ([64.233.182.185]:33897 "EHLO nf-out-0910.google.com") by ftp.linux-mips.org with ESMTP id S20037641AbXBVHy0 (ORCPT ); Thu, 22 Feb 2007 07:54:26 +0000 Received: by nf-out-0910.google.com with SMTP id l24so444238nfc for ; Wed, 21 Feb 2007 23:53:25 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=txr9r39RDfOq7shptOtrHZf4uNu7Qz+JeQP2a4B/XPV99fyL/iTHbolVcTEOcxiJg3t0tCwRV5H8s+mWFy/gEqFY2/lmjrppOLJMWD4qH3HwvW6gLRTq2JPUdd+WoQA013O4cNlZsvm2UMEEOarpF3vvDEGuqskbrjp2xgwAZXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=T1ymqHeHL0nP/gFZgplB10uTDG0LA1DUWCE7ykKrngAneYjiRis/96EosvUm41KmqZlUB8IWcWBRrp+BurQQK2cFIWbB6t1VODY01ye0DmsjfvkB7yti/4S9MjxeLx8auKK49xSbktxYNrPyGuFckw5J+SHmEvYeFMjdg0/nfSY= Received: by 10.82.187.16 with SMTP id k16mr65971buf.1172130805669; Wed, 21 Feb 2007 23:53:25 -0800 (PST) Received: by 10.82.179.4 with HTTP; Wed, 21 Feb 2007 23:53:25 -0800 (PST) Message-ID: Date: Thu, 22 Feb 2007 13:23:25 +0530 From: "Rajat Jain" To: "sathesh babu" Subject: Re: unaligned access Cc: linux-mips@linux-mips.org In-Reply-To: <566085.6765.qm@web7904.mail.in.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <566085.6765.qm@web7904.mail.in.yahoo.com> Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14194 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: rajat.noida.india@gmail.com Precedence: bulk X-list: linux-mips On 2/22/07, sathesh babu wrote: > Hi, > I have ported linux-2.6.12 kernel on MIPS processor.I would like to > print the warning messges whenenver kernel or user code try to access > unaligned address ( including proceor ID ). > Is there any configuration option avaliable in the kernel to view > the unaligned address? Ummm ... not sure about MIPS, but in i386, exception 17 is raised for every unaligned access. alignment_check() is invoked for every such access. Regards, Rajat From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 22 Feb 2007 09:19:56 +0000 (GMT) Received: from web7903.mail.in.yahoo.com ([202.86.4.79]:10942 "HELO web7903.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP id S20037794AbXBVJTu (ORCPT ); Thu, 22 Feb 2007 09:19:50 +0000 Received: (qmail 34443 invoked by uid 60001); 22 Feb 2007 09:18:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2bNMHyJH7qp38wz5WBPjMZuggn4Bi69QhuRVeEzPnQDVCl259Q1TCIJPZfCwafO68Rjc5smH+njOk12jAxzbq8c1pLj3pygpOjZ5sHHHQFyLW+n9vIj8nN409u063zuMetQcszHDcxYHEhoYI83bV6GWDqqCkPaxHB1hgXg9mKo=; X-YMail-OSG: ferJ.F0VM1k6WKUtSXTi1LluqKtceHsN.tFBDlS_WB6NMp9PW9zPw5jsR.2yKxinLfyE6oOOf5GvxTqe.1HBtUMlxA4hEpfmhBVlMOoqSEjnnu57p.LRux_8ANfVFzsFYOMvDwfHtYAkxsuBVf43io6SDg-- Received: from [61.246.223.98] by web7903.mail.in.yahoo.com via HTTP; Thu, 22 Feb 2007 09:18:44 GMT Date: Thu, 22 Feb 2007 09:18:44 +0000 (GMT) From: sathesh babu Subject: Re: unaligned access To: Rajat Jain Cc: linux-mips@linux-mips.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1274502747-1172135924=:32924" Content-Transfer-Encoding: 8bit Message-ID: <80178.32924.qm@web7903.mail.in.yahoo.com> Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14195 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: sathesh_edara2003@yahoo.co.in Precedence: bulk X-list: linux-mips --0-1274502747-1172135924=:32924 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Rajan. In case of arm processor, the alignment trap behavior can be changed by simply echo a number into /proc/sys/debug/alignment bit behavior when set --- ----------------- 0 A user process performing an unaligned memory access will cause the kernel to print a message indicating process name, pid, pc, instruction, address, and the fault code. 1 The kernel will attempt to fix up the user process performing the unaligned access. This is of course slow (think about the floating point emulator) and not recommended for production use. 2 The kernel will send a SIGBUS signal to the user process performing the unaligned access. I would like to know Is there similar type of implimentation avalilable for MIPS processor in linux-2.6.12 kernel to view or log the unaligned access addresses and corresponding processor ID. Regards, Sathesh Rajat Jain wrote: On 2/22/07, sathesh babu wrote: > Hi, > I have ported linux-2.6.12 kernel on MIPS processor.I would like to > print the warning messges whenenver kernel or user code try to access > unaligned address ( including proceor ID ). > Is there any configuration option avaliable in the kernel to view > the unaligned address? Ummm ... not sure about MIPS, but in i386, exception 17 is raised for every unaligned access. alignment_check() is invoked for every such access. Regards, Rajat --------------------------------- Here’s a new way to find what you're looking for - Yahoo! Answers --0-1274502747-1172135924=:32924 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Thanks Rajan.
 
In case of arm processor, the alignment trap behavior can be changed by simply echo a number into  /proc/sys/debug/alignment 
 
bit             behavior when set
---             -----------------
0               A user process performing an unaligned memory access
                will cause the kernel to print a message indicating
                process name, pid, pc, instruction, address, and the
                fault code.
1               The kernel will attempt to fix up the user process
                performing the unaligned access.  This is of course
                slow (think about the floating point emulator) and
                not recommended for production use.
2               The kernel will send a SIGBUS signal to the user process
                performing the unaligned access.

I would like to know  Is there similar type of implimentation avalilable for MIPS processor in linux-2.6.12 kernel to view or log the unaligned access addresses and corresponding processor ID.
 
Regards,
Sathesh
 

Rajat Jain <rajat.noida.india@gmail.com> wrote:
On 2/22/07, sathesh babu wrote:
> Hi,
> I have ported linux-2.6.12 kernel on MIPS processor.I would like to
> print the warning messges whenenver kernel or user code try to access
> unaligned address ( including proceor ID ).
> Is there any configuration option avaliable in the kernel to view
> the unaligned address?

Ummm ... not sure about MIPS, but in i386, exception 17 is raised for
every unaligned access. alignment_check() is invoked for every such
access.

Regards,

Rajat



Here’s a new way to find what you're looking for - Yahoo! Answers --0-1274502747-1172135924=:32924-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 22 Feb 2007 15:06:10 +0000 (GMT) Received: from mx.mips.com ([63.167.95.198]:23508 "EHLO dns0.mips.com") by ftp.linux-mips.org with ESMTP id S20038616AbXBVPGG (ORCPT ); Thu, 22 Feb 2007 15:06:06 +0000 Received: from mercury.mips.com (mercury [192.168.64.101]) by dns0.mips.com (8.12.11/8.12.11) with ESMTP id l1MExJJX029260; Thu, 22 Feb 2007 06:59:19 -0800 (PST) Received: from grendel (grendel [192.168.236.16]) by mercury.mips.com (8.13.5/8.13.5) with SMTP id l1MEwPCN014151; Thu, 22 Feb 2007 06:58:26 -0800 (PST) Message-ID: <01fc01c75693$195858b0$10eca8c0@grendel> From: "Kevin D. Kissell" To: "sathesh babu" , "Rajat Jain" Cc: References: <80178.32924.qm@web7903.mail.in.yahoo.com> Subject: Re: unaligned access Date: Thu, 22 Feb 2007 16:06:57 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01F9_01C7569B.7A225B20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14203 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: kevink@mips.com Precedence: bulk X-list: linux-mips This is a multi-part message in MIME format. ------=_NextPart_000_01F9_01C7569B.7A225B20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Default behavior in MIPS is to silently fix up and emulate. A = MIPS-specific system call (sys_sysmips with the command argument of MIPS_FIXADE and a parameter agument of zero) allows for this to be overridden, so = that=20 such accesses will be fatal. It looks as if there was once support to = log the events=20 to syslog, independently of whether or not they were fixed up, but it = doesn't look to me=20 as if that still works in 2.6.x kernels. Regards, Kevin K. ----- Original Message -----=20 From: sathesh babu=20 To: Rajat Jain=20 Cc: linux-mips@linux-mips.org=20 Sent: Thursday, February 22, 2007 10:18 AM Subject: Re: unaligned access Thanks Rajan. In case of arm processor, the alignment trap behavior can be changed = by simply echo a number into /proc/sys/debug/alignment=20 bit behavior when set --- ----------------- 0 A user process performing an unaligned memory access will cause the kernel to print a message indicating process name, pid, pc, instruction, address, and the fault code. 1 The kernel will attempt to fix up the user process performing the unaligned access. This is of course slow (think about the floating point emulator) and not recommended for production use. 2 The kernel will send a SIGBUS signal to the user = process performing the unaligned access. I would like to know Is there similar type of implimentation = avalilable for MIPS processor in linux-2.6.12 kernel to view or log the = unaligned access addresses and corresponding processor ID. Regards, Sathesh Rajat Jain wrote: On 2/22/07, sathesh babu wrote: > Hi, > I have ported linux-2.6.12 kernel on MIPS processor.I would like = to > print the warning messges whenenver kernel or user code try to = access > unaligned address ( including proceor ID ). > Is there any configuration option avaliable in the kernel to view > the unaligned address? Ummm ... not sure about MIPS, but in i386, exception 17 is raised = for every unaligned access. alignment_check() is invoked for every such access. Regards, Rajat -------------------------------------------------------------------------= ----- Here's a new way to find what you're looking for - Yahoo! Answers ------=_NextPart_000_01F9_01C7569B.7A225B20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Default behavior in MIPS is to silently = fix up and=20 emulate.  A MIPS-specific
system call (sys_sysmips with the = command argument=20 of MIPS_FIXADE
and a parameter agument of zero) = allows for this to be overridden, so = that 
such accesses will be fatal.  It = looks as=20 if there was once support to log the = events=20
to syslog, independently of whether = or not they were fixed up, but it doesn't look to = me=20
as if that still works in 2.6.x = kernels.
 
    =20        Regards,
 
       =20     Kevin K.
----- Original Message -----
From:=20 sathesh babu
Sent: Thursday, February 22, = 2007 10:18=20 AM
Subject: Re: unaligned = access

Thanks Rajan.
 
In case of arm processor, the alignment trap behavior can be = changed by=20 simply echo a number into  /proc/sys/debug/alignment 
 
=
bit           = ; =20 behavior when=20 = set
---          &nb= sp; =20 -----------------
=
0           &= nbsp;  =20 A user process performing an unaligned memory=20 = access
          &nb= sp;    =20 will cause the kernel to print a message=20 = indicating
          = ;     =20 process name, pid, pc, instruction, address, and=20 = the
           =     =20 fault code.
=
1           &= nbsp;  =20 The kernel will attempt to fix up the user=20 = process
          &n= bsp;    =20 performing the unaligned access.  This is of=20 = course
          &nb= sp;    =20 slow (think about the floating point emulator)=20 = and
           =     =20 not recommended for production use.
=
2           &= nbsp;  =20 The kernel will send a SIGBUS signal to the user=20 = process
          &n= bsp;    =20 performing the unaligned access.

I would like to know  Is = there=20 similar type of implimentation avalilable for MIPS processor in = linux-2.6.12=20 kernel to view or log the unaligned access addresses and corresponding = processor ID.
 
Regards,
Sathesh
 

Rajat Jain <rajat.noida.india@gmail.com>=20 wrote:
On=20 2/22/07, sathesh babu wrote:
>=20 Hi,
> I have ported linux-2.6.12 kernel on MIPS processor.I = would like=20 to
> print the warning messges whenenver kernel or user code = try to=20 access
> unaligned address ( including proceor ID ).
> = Is there=20 any configuration option avaliable in the kernel to view
> the = unaligned address?

Ummm ... not sure about MIPS, but in i386, = exception 17 is raised for
every unaligned access. = alignment_check() is=20 invoked for every=20 such
access.

Regards,

Rajat



Here=92s a new way to find what you're looking for - Yahoo!=20 Answers ------=_NextPart_000_01F9_01C7569B.7A225B20-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 23 Feb 2007 03:07:49 +0000 (GMT) Received: from localhost.localdomain ([127.0.0.1]:35979 "EHLO dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP id S20038841AbXBWDHr (ORCPT ); Fri, 23 Feb 2007 03:07:47 +0000 Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1]) by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l1N36lC3008196; Fri, 23 Feb 2007 03:06:47 GMT Received: (from ralf@localhost) by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l1N36jse008195; Fri, 23 Feb 2007 03:06:45 GMT Date: Fri, 23 Feb 2007 03:06:45 +0000 From: Ralf Baechle To: "Kevin D. Kissell" Cc: sathesh babu , Rajat Jain , linux-mips@linux-mips.org Subject: Re: unaligned access Message-ID: <20070223030645.GA1349@linux-mips.org> References: <80178.32924.qm@web7903.mail.in.yahoo.com> <01fc01c75693$195858b0$10eca8c0@grendel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01fc01c75693$195858b0$10eca8c0@grendel> User-Agent: Mutt/1.4.2.2i Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14214 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: ralf@linux-mips.org Precedence: bulk X-list: linux-mips On Thu, Feb 22, 2007 at 04:06:57PM +0100, Kevin D. Kissell wrote: > Default behavior in MIPS is to silently fix up and emulate. A MIPS-specific > system call (sys_sysmips with the command argument of MIPS_FIXADE > and a parameter agument of zero) allows for this to be overridden, so that > such accesses will be fatal. It looks as if there was once support to log the events > to syslog, independently of whether or not they were fixed up, but it doesn't look to me > as if that still works in 2.6.x kernels. 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. Ralf From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 23 Feb 2007 03:37:01 +0000 (GMT) Received: from topsns2.toshiba-tops.co.jp ([202.230.225.126]:36685 "EHLO topsns2.toshiba-tops.co.jp") by ftp.linux-mips.org with ESMTP id S20038865AbXBWDg4 (ORCPT ); Fri, 23 Feb 2007 03:36:56 +0000 Received: from topsms.toshiba-tops.co.jp by topsns2.toshiba-tops.co.jp via smtpd (for ftp.linux-mips.org [194.74.144.162]) with ESMTP; Fri, 23 Feb 2007 12:36:55 +0900 Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1]) by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id 841ED41ECF; Fri, 23 Feb 2007 12:36:31 +0900 (JST) Received: from srd2sd.toshiba-tops.co.jp (srd2sd.toshiba-tops.co.jp [172.17.28.2]) by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 70C5C20474; Fri, 23 Feb 2007 12:36:31 +0900 (JST) Received: from localhost (fragile [172.17.28.65]) by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id l1N3aUW0035256; Fri, 23 Feb 2007 12:36:31 +0900 (JST) (envelope-from anemo@mba.ocn.ne.jp) Date: Fri, 23 Feb 2007 12:36:30 +0900 (JST) Message-Id: <20070223.123630.92584856.nemoto@toshiba-tops.co.jp> To: ralf@linux-mips.org Cc: kevink@mips.com, sathesh_edara2003@yahoo.co.in, rajat.noida.india@gmail.com, linux-mips@linux-mips.org Subject: Re: unaligned access From: Atsushi Nemoto In-Reply-To: <20070223030645.GA1349@linux-mips.org> References: <80178.32924.qm@web7903.mail.in.yahoo.com> <01fc01c75693$195858b0$10eca8c0@grendel> <20070223030645.GA1349@linux-mips.org> X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A B746 CA77 FE94 2874 D52F X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14215 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: anemo@mba.ocn.ne.jp Precedence: bulk X-list: linux-mips 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 23 Feb 2007 09:49:52 +0000 (GMT) Received: from web7914.mail.in.yahoo.com ([202.86.4.90]:14739 "HELO web7914.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP id S20037707AbXBWJtr (ORCPT ); Fri, 23 Feb 2007 09:49:47 +0000 Received: (qmail 89556 invoked by uid 60001); 23 Feb 2007 09:48:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=n6RjLV+82WGXCwqqjudRDHRPudETAKusK09k1MRNnSfk0fK841s/nRjFzqQp6QzC9z0A2kcxw5FuyCcB+o4FP7nqZoFZBZP7ALOrpszPs7LM/chWKlcZyfxsg2jMd+7cGZ4GRnew/AH90CNxYFhai5UuEwAfH9zS2sBD3C9bm3U=; X-YMail-OSG: be7womkVM1ncZ5y.BN6Q9QCOh_GkYYTfKbq8S_YC.7jYJe9wMUWtFVwhANbtGGJqjOIFs7bRHeG2x1EXXjjsNAsFf6ljgr.wzOA__c7XntutQYdQRtAQZwq85RKVbwlG5uZdYz2J5tT8cIPUqzlsKQ-- Received: from [61.246.223.98] by web7914.mail.in.yahoo.com via HTTP; Fri, 23 Feb 2007 09:48:38 GMT Date: Fri, 23 Feb 2007 09:48:38 +0000 (GMT) From: sathesh babu Subject: Re: unaligned access To: Ralf Baechle , "Kevin D. Kissell" Cc: sathesh babu , Rajat Jain , linux-mips@linux-mips.org In-Reply-To: <20070223030645.GA1349@linux-mips.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1192634343-1172224118=:88566" Content-Transfer-Encoding: 8bit Message-ID: <623154.88566.qm@web7914.mail.in.yahoo.com> Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14216 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: sathesh_edara2003@yahoo.co.in Precedence: bulk X-list: linux-mips --0-1192634343-1172224118=:88566 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit It would be good idea to know which process hitting unaligned access and PC. So that we can try to fix unaligned access when it causes the performance bottleneck. Could you please share details about logging the unaligned accesses using sysctl. Thanks in advance Regards, Sathesh Ralf Baechle wrote: On Thu, Feb 22, 2007 at 04:06:57PM +0100, Kevin D. Kissell wrote: > Default behavior in MIPS is to silently fix up and emulate. A MIPS-specific > system call (sys_sysmips with the command argument of MIPS_FIXADE > and a parameter agument of zero) allows for this to be overridden, so that > such accesses will be fatal. It looks as if there was once support to log the events > to syslog, independently of whether or not they were fixed up, but it doesn't look to me > as if that still works in 2.6.x kernels. 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. Ralf --------------------------------- Here’s a new way to find what you're looking for - Yahoo! Answers --0-1192634343-1172224118=:88566 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
It would be good idea to know which process hitting unaligned access and PC.
So that we can try to fix unaligned access when it causes the  performance bottleneck.
 
Could you please share details about logging the unaligned accesses using sysctl.
 
Thanks in advance
 
Regards,
Sathesh

Ralf Baechle <ralf@linux-mips.org> wrote:
On Thu, Feb 22, 2007 at 04:06:57PM +0100, Kevin D. Kissell wrote:

> Default behavior in MIPS is to silently fix up and emulate. A MIPS-specific
> system call (sys_sysmips with the command argument of MIPS_FIXADE
> and a parameter agument of zero) allows for this to be overridden, so that
> such accesses will be fatal. It looks as if there was once support to log the events
> to syslog, independently of whether or not they were fixed up, but it doesn't look to me
> as if that still works in 2.6.x kernels.

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.

Ralf



Here’s a new way to find what you're looking for - Yahoo! Answers --0-1192634343-1172224118=:88566-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 23 Feb 2007 11:39:39 +0000 (GMT) Received: from mx.mips.com ([63.167.95.198]:50655 "EHLO dns0.mips.com") by ftp.linux-mips.org with ESMTP id S20037827AbXBWLjf (ORCPT ); Fri, 23 Feb 2007 11:39:35 +0000 Received: from mercury.mips.com (mercury [192.168.64.101]) by dns0.mips.com (8.12.11/8.12.11) with ESMTP id l1NBWlIp002076; Fri, 23 Feb 2007 03:32:47 -0800 (PST) Received: from grendel (grendel [192.168.236.16]) by mercury.mips.com (8.13.5/8.13.5) with SMTP id l1NBVrXB007736; Fri, 23 Feb 2007 03:31:54 -0800 (PST) Message-ID: <005701c7573f$6aca0890$10eca8c0@grendel> From: "Kevin D. Kissell" To: , "Atsushi Nemoto" Cc: , , References: <80178.32924.qm@web7903.mail.in.yahoo.com><01fc01c75693$195858b0$10eca8c0@grendel><20070223030645.GA1349@linux-mips.org> <20070223.123630.92584856.nemoto@toshiba-tops.co.jp> Subject: Re: unaligned access Date: Fri, 23 Feb 2007 09:18:59 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14217 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: kevink@mips.com Precedence: bulk X-list: linux-mips > 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? One thing about the current, system-call based interface that is kind-of cool, and different from both what you propose and what was described as being implemented for ARM, is that Ralf's scheme is per-thread. I don't know if that power really outweighs the ease-of-use aspect of being able to manipuate it from the shell command line, but it's not something to throw away lightly. I have no issues with moving the log data, should it be resurrected, from syslog to /sys/kernel/whatever, though. Regards, Kevin K. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 23 Feb 2007 15:14:19 +0000 (GMT) Received: from mba.ocn.ne.jp ([210.190.142.172]:64202 "HELO smtp.mba.ocn.ne.jp") by ftp.linux-mips.org with SMTP id S20038879AbXBWPOO (ORCPT ); Fri, 23 Feb 2007 15:14:14 +0000 Received: from localhost (p8193-ipad03funabasi.chiba.ocn.ne.jp [219.160.88.193]) by smtp.mba.ocn.ne.jp (Postfix) with ESMTP id 08AA4B792; Sat, 24 Feb 2007 00:12:50 +0900 (JST) Date: Sat, 24 Feb 2007 00:12:49 +0900 (JST) Message-Id: <20070224.001249.92583553.anemo@mba.ocn.ne.jp> To: kevink@mips.com Cc: ralf@linux-mips.org, sathesh_edara2003@yahoo.co.in, rajat.noida.india@gmail.com, linux-mips@linux-mips.org Subject: Re: unaligned access From: Atsushi Nemoto In-Reply-To: <005701c7573f$6aca0890$10eca8c0@grendel> References: <20070223030645.GA1349@linux-mips.org> <20070223.123630.92584856.nemoto@toshiba-tops.co.jp> <005701c7573f$6aca0890$10eca8c0@grendel> X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A B746 CA77 FE94 2874 D52F X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14218 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: anemo@mba.ocn.ne.jp Precedence: bulk X-list: linux-mips On Fri, 23 Feb 2007 09:18:59 +0100, "Kevin D. Kissell" wrote: > One thing about the current, system-call based interface that is kind-of > cool, and different from both what you propose and what was described > as being implemented for ARM, is that Ralf's scheme is per-thread. > I don't know if that power really outweighs the ease-of-use aspect > of being able to manipuate it from the shell command line, but it's > not something to throw away lightly. I have no issues with moving > the log data, should it be resurrected, from syslog to /sys/kernel/whatever, > though. Well, /sys/kernel method can coexist with per-thread FIXADE method. We can use /sys/kernel (or something) to change default action. And sysmips() or something can be used to override it. --- Atsushi Nemoto From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 23 Feb 2007 16:18:45 +0000 (GMT) Received: from localhost.localdomain ([127.0.0.1]:16797 "EHLO dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP id S20038959AbXBWQSo (ORCPT ); Fri, 23 Feb 2007 16:18:44 +0000 Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1]) by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l1NGIgJU025523; Fri, 23 Feb 2007 16:18:42 GMT Received: (from ralf@localhost) by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l1NGIe7p025522; Fri, 23 Feb 2007 16:18:40 GMT Date: Fri, 23 Feb 2007 16:18:40 +0000 From: Ralf Baechle To: "Kevin D. Kissell" Cc: Atsushi Nemoto , sathesh_edara2003@yahoo.co.in, rajat.noida.india@gmail.com, linux-mips@linux-mips.org Subject: Re: unaligned access Message-ID: <20070223161840.GA23178@linux-mips.org> References: <20070223.123630.92584856.nemoto@toshiba-tops.co.jp> <005701c7573f$6aca0890$10eca8c0@grendel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005701c7573f$6aca0890$10eca8c0@grendel> User-Agent: Mutt/1.4.2.2i Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14219 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: ralf@linux-mips.org Precedence: bulk X-list: linux-mips On Fri, Feb 23, 2007 at 09:18:59AM +0100, Kevin D. Kissell wrote: > One thing about the current, system-call based interface that is kind-of > cool, and different from both what you propose and what was described > as being implemented for ARM, is that Ralf's scheme is per-thread. > I don't know if that power really outweighs the ease-of-use aspect > of being able to manipuate it from the shell command line, but it's > not something to throw away lightly. I have no issues with moving > the log data, should it be resurrected, from syslog to /sys/kernel/whatever, > though. There are two different things here that need to be sorted out - but for years nobody noticed so this never really did show up on the radar: o sysmips is really a compatibility interface meant to support software that did originate on IRIX, RISC/os and maybe even MIPS/os. But sysmips(MIPS_FIXADE,...) is a new operation that I came up with for Linux. So I'd like this interface to die. o sysmips(MIPS_FIXADE, ...) does control only the fixup operation of the kernel on a per thread base. Loggin is not controlled by it; that was available in the dark past only as a compile time option. o The MIPS_FIXADE setting is inherited across clone and fork. I could almost bet no software relying on this feature is actually explicitly enabling it. Maybe the default should be off to make programmers aware of this kind of issue in their code? o The MIPS_FIXADE setting is valid for both kernel and user mode. So if for example the TCP stack is taking an unaligned exception to process an incoming packet, it will look at the setting of the process that just happens to be running on the CPU. o I think it would be handy to have a method to externally control the MIPS_FIXADE setting of a process. o Logging unaligned accesses is a dangerous thing; it can easily reach a DoS-like volume. Ralf From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 24 Feb 2007 03:21:35 +0000 (GMT) Received: from pollux.ds.pg.gda.pl ([153.19.208.7]:37134 "EHLO pollux.ds.pg.gda.pl") by ftp.linux-mips.org with ESMTP id S20039114AbXBXDVa (ORCPT ); Sat, 24 Feb 2007 03:21:30 +0000 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 67002E1F58; Sat, 24 Feb 2007 04:20:40 +0100 (CET) X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl Received: from pollux.ds.pg.gda.pl ([127.0.0.1]) by localhost (pollux.ds.pg.gda.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gWi5x8sYg3Y7; Sat, 24 Feb 2007 04:20:40 +0100 (CET) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 3261410DDE5; Fri, 23 Feb 2007 17:38:25 +0100 (CET) Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6]) by piorun.ds.pg.gda.pl (8.13.8/8.13.8) with ESMTP id l1NGTg2F030708; Fri, 23 Feb 2007 17:29:42 +0100 Date: Fri, 23 Feb 2007 16:29:37 +0000 (GMT) From: "Maciej W. Rozycki" To: Ralf Baechle cc: "Kevin D. Kissell" , Atsushi Nemoto , sathesh_edara2003@yahoo.co.in, rajat.noida.india@gmail.com, linux-mips@linux-mips.org Subject: Re: unaligned access In-Reply-To: <20070223161840.GA23178@linux-mips.org> Message-ID: References: <20070223.123630.92584856.nemoto@toshiba-tops.co.jp> <005701c7573f$6aca0890$10eca8c0@grendel> <20070223161840.GA23178@linux-mips.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: ClamAV 0.90/2631/Thu Feb 22 22:33:11 2007 on piorun.ds.pg.gda.pl X-Virus-Status: Clean Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 14237 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: macro@linux-mips.org Precedence: bulk X-list: linux-mips On Fri, 23 Feb 2007, Ralf Baechle wrote: > o Logging unaligned accesses is a dangerous thing; it can easily reach > a DoS-like volume. Providing a damn good incentive to fix your broken software? Maciej From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.mips.com ([63.167.95.198]:23508 "EHLO dns0.mips.com") by ftp.linux-mips.org with ESMTP id S20038616AbXBVPGG (ORCPT ); Thu, 22 Feb 2007 15:06:06 +0000 Message-ID: <01fc01c75693$195858b0$10eca8c0@grendel> From: "Kevin D. Kissell" References: <80178.32924.qm@web7903.mail.in.yahoo.com> Subject: Re: unaligned access Date: Thu, 22 Feb 2007 16:06:57 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01F9_01C7569B.7A225B20" Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org To: sathesh babu , Rajat Jain Cc: linux-mips@linux-mips.org Message-ID: <20070222150657.5AiLoRmGlaqnnpgUObuh231cs2zv6v1ReHKnWnKsI6k@z> This is a multi-part message in MIME format. ------=_NextPart_000_01F9_01C7569B.7A225B20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Default behavior in MIPS is to silently fix up and emulate. A = MIPS-specific system call (sys_sysmips with the command argument of MIPS_FIXADE and a parameter agument of zero) allows for this to be overridden, so = that=20 such accesses will be fatal. It looks as if there was once support to = log the events=20 to syslog, independently of whether or not they were fixed up, but it = doesn't look to me=20 as if that still works in 2.6.x kernels. Regards, Kevin K. ----- Original Message -----=20 From: sathesh babu=20 To: Rajat Jain=20 Cc: linux-mips@linux-mips.org=20 Sent: Thursday, February 22, 2007 10:18 AM Subject: Re: unaligned access Thanks Rajan. In case of arm processor, the alignment trap behavior can be changed = by simply echo a number into /proc/sys/debug/alignment=20 bit behavior when set --- ----------------- 0 A user process performing an unaligned memory access will cause the kernel to print a message indicating process name, pid, pc, instruction, address, and the fault code. 1 The kernel will attempt to fix up the user process performing the unaligned access. This is of course slow (think about the floating point emulator) and not recommended for production use. 2 The kernel will send a SIGBUS signal to the user = process performing the unaligned access. I would like to know Is there similar type of implimentation = avalilable for MIPS processor in linux-2.6.12 kernel to view or log the = unaligned access addresses and corresponding processor ID. Regards, Sathesh Rajat Jain wrote: On 2/22/07, sathesh babu wrote: > Hi, > I have ported linux-2.6.12 kernel on MIPS processor.I would like = to > print the warning messges whenenver kernel or user code try to = access > unaligned address ( including proceor ID ). > Is there any configuration option avaliable in the kernel to view > the unaligned address? Ummm ... not sure about MIPS, but in i386, exception 17 is raised = for every unaligned access. alignment_check() is invoked for every such access. Regards, Rajat -------------------------------------------------------------------------= ----- Here's a new way to find what you're looking for - Yahoo! Answers ------=_NextPart_000_01F9_01C7569B.7A225B20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Default behavior in MIPS is to silently = fix up and=20 emulate.  A MIPS-specific
system call (sys_sysmips with the = command argument=20 of MIPS_FIXADE
and a parameter agument of zero) = allows for this to be overridden, so = that 
such accesses will be fatal.  It = looks as=20 if there was once support to log the = events=20
to syslog, independently of whether = or not they were fixed up, but it doesn't look to = me=20
as if that still works in 2.6.x = kernels.
 
    =20        Regards,
 
       =20     Kevin K.
----- Original Message -----
From:=20 sathesh babu
Sent: Thursday, February 22, = 2007 10:18=20 AM
Subject: Re: unaligned = access

Thanks Rajan.
 
In case of arm processor, the alignment trap behavior can be = changed by=20 simply echo a number into  /proc/sys/debug/alignment 
 
=
bit           = ; =20 behavior when=20 = set
---          &nb= sp; =20 -----------------
=
0           &= nbsp;  =20 A user process performing an unaligned memory=20 = access
          &nb= sp;    =20 will cause the kernel to print a message=20 = indicating
          = ;     =20 process name, pid, pc, instruction, address, and=20 = the
           =     =20 fault code.
=
1           &= nbsp;  =20 The kernel will attempt to fix up the user=20 = process
          &n= bsp;    =20 performing the unaligned access.  This is of=20 = course
          &nb= sp;    =20 slow (think about the floating point emulator)=20 = and
           =     =20 not recommended for production use.
=
2           &= nbsp;  =20 The kernel will send a SIGBUS signal to the user=20 = process
          &n= bsp;    =20 performing the unaligned access.

I would like to know  Is = there=20 similar type of implimentation avalilable for MIPS processor in = linux-2.6.12=20 kernel to view or log the unaligned access addresses and corresponding = processor ID.
 
Regards,
Sathesh
 

Rajat Jain <rajat.noida.india@gmail.com>=20 wrote:
On=20 2/22/07, sathesh babu wrote:
>=20 Hi,
> I have ported linux-2.6.12 kernel on MIPS processor.I = would like=20 to
> print the warning messges whenenver kernel or user code = try to=20 access
> unaligned address ( including proceor ID ).
> = Is there=20 any configuration option avaliable in the kernel to view
> the = unaligned address?

Ummm ... not sure about MIPS, but in i386, = exception 17 is raised for
every unaligned access. = alignment_check() is=20 invoked for every=20 such
access.

Regards,

Rajat



Here=92s a new way to find what you're looking for - Yahoo!=20 Answers ------=_NextPart_000_01F9_01C7569B.7A225B20-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.mips.com ([63.167.95.198]:50655 "EHLO dns0.mips.com") by ftp.linux-mips.org with ESMTP id S20037827AbXBWLjf (ORCPT ); Fri, 23 Feb 2007 11:39:35 +0000 Message-ID: <005701c7573f$6aca0890$10eca8c0@grendel> From: "Kevin D. Kissell" References: <80178.32924.qm@web7903.mail.in.yahoo.com><01fc01c75693$195858b0$10eca8c0@grendel><20070223030645.GA1349@linux-mips.org> <20070223.123630.92584856.nemoto@toshiba-tops.co.jp> Subject: Re: unaligned access Date: Fri, 23 Feb 2007 09:18:59 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org To: ralf@linux-mips.org, Atsushi Nemoto Cc: sathesh_edara2003@yahoo.co.in, rajat.noida.india@gmail.com, linux-mips@linux-mips.org Message-ID: <20070223081859.r41k2KkUO7oikwYSfxw9xvxkRwVDD1gDRLd3szy2xJM@z> > 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? One thing about the current, system-call based interface that is kind-of cool, and different from both what you propose and what was described as being implemented for ARM, is that Ralf's scheme is per-thread. I don't know if that power really outweighs the ease-of-use aspect of being able to manipuate it from the shell command line, but it's not something to throw away lightly. I have no issues with moving the log data, should it be resurrected, from syslog to /sys/kernel/whatever, though. Regards, Kevin K.