From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id 78454400D5 for ; Tue, 15 Oct 2002 11:40:03 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g9FFe3i17654 for axp-list@listman.redhat.com; Tue, 15 Oct 2002 11:40:03 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g9FFe2f17650 for ; Tue, 15 Oct 2002 11:40:02 -0400 Received: from handhelds.org ([192.58.209.91]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g9FFJWw11736 for ; Tue, 15 Oct 2002 11:19:32 -0400 Received: (qmail 6374 invoked from network); 15 Oct 2002 15:39:36 -0000 Received: from localhost (HELO shadowfax.middleearth) (127.0.0.1) by localhost with SMTP; 15 Oct 2002 15:39:36 -0000 From: George France To: axp-list@redhat.com, Uncle George Subject: Re: unaligned traps question Date: Tue, 15 Oct 2002 11:39:36 -0400 X-Mailer: KMail [version 1.1.99] Content-Type: text/plain; charset="us-ascii" References: <01da01c273e4$d5c57320$35de2b09@Viswanadha> <3DAB7754.F6F5D8B0@voicenet.com> In-Reply-To: <3DAB7754.F6F5D8B0@voicenet.com> MIME-Version: 1.0 Message-Id: <02101511393604.01593@shadowfax.middleearth> Content-Transfer-Encoding: 8bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On Monday 14 October 2002 22:03, Uncle George wrote: > I suppose one might say that all misalignments are trapped. The kernel then > figures out what to do. close enough. > If the misalignment is within the kernel, that also traps, but the kernel > gets a little peaved. This generally happens when a new device driver is > included ( ie never tested on a 64bit machine before.) > If misalignment is within user space, then there is a per-process flag ( i > think a dec-unix ( OSF?) flag ) to indicate that a user fault should > happen, or an automatic 'fixup' should happen ( and the user would be none > to the wiser.) I think with the 'user fault' category, then kernel can > either stop the task, or trap to the user task for the user to determine > what to do. Alignment traps are not a serious bug but will make the code run significantly slower. They are mostly really annoying. > > And Yes, gcc et al ( particularuly ) the runtime start-up code does set > this flag. I cannot tell you who deceides this ( ie kernel is set to trap, > but glibc tells the kernel to silently fix these things up. or the other > way around.) Please see: linux/arch/alpha/mm/fault.c and alignment.c (included as attachment in previous e-mail) for the exact details. > > I would like to see the unalignment faults, maybe then these things 'might' > get fixed. The theory, i suppose, is that maybe you can find the 'coder' > who in all likelyhood only thinks in intel, and probably has no time to > delve into the problem - ergo a lot of trap messages with no one to repair > same! Location and repair is usually trivial with 'alignment.c'. Used properly it will take you to the line of code that is causing the issue. There are occasions when the problem is severe and the program should just re-architect-ed. Best Regards, --George