Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Unaligned trap handler - comments appreciated
Date: Fri, 22 Jun 2001 23:54:43 -0700	[thread overview]
Message-ID: <20010622235443.I14564@tausq.org> (raw)
In-Reply-To: <20010618000128.G14564@tausq.org>; from randolph@tausq.org on Mon, Jun 18, 2001 at 12:01:29AM -0700

In reference to a message from Randolph Chung, dated Jun 18:
> I just checked in an arch/parisc/kernel/unaligned.c file into palinux
> cvs.

I've updated traps.c to call the unaligned handler now. Many thanks to
jsm for his help and advice.

I've only tested this for parisc64, would appreciate if someone can test
to make sure it works on a narrow kernel as well. My test case looks
something like this:


#include <stdio.h>

struct data_t {
        unsigned long a;
        unsigned long b;
};

int main(int argc, char **argv)
{
        struct data_t data;
        unsigned char *t;
        unsigned long l;
        int i;

        data.a = 0x12345678;
        data.b = 0x87654321;

        t = (unsigned char *)(&data)+1;
        l = *((unsigned long *)t);
        printf("l = 0x%08lx\n\n\n", l);

        printf("expected result is: 0x");
        for (i = 0; i < sizeof(unsigned long); i++)
                printf("%x", *(t+i));
        printf("\n");

        printf("testing store...\n");
        *((unsigned long *)t) = 0x13572468;

        l = *((unsigned long *)t);
        printf("l = 0x%08lx\n", l);

        return 0;
}

randolph
-- 
   @..@                                         http://www.TauSq.org/
  (----)
 ( >__< )
 ^^ ~~ ^^

  reply	other threads:[~2001-06-23  6:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-18  7:01 [parisc-linux] Unaligned trap handler - comments appreciated Randolph Chung
2001-06-23  6:54 ` Randolph Chung [this message]
2001-06-23 12:31   ` Helge Deller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010622235443.I14564@tausq.org \
    --to=randolph@tausq.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox