All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: "FARINATI,LEANDRO (HP-Brazil,ex1)" <leandro.farinati@hp.com>
Cc: "Parisc-Linux List (E-mail)" <parisc-linux@lists.parisc-linux.org>
Subject: Re: [parisc-linux] fic problem
Date: Fri, 13 Dec 2002 12:45:18 +0000	[thread overview]
Message-ID: <20021213124518.A10991@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <9A0482A7BD2506488AD9417C93F3714FC27735@xsp01.brazil.hp.com>; from leandro.farinati@hp.com on Fri, Dec 13, 2002 at 04:27:13AM -0800

On Fri, Dec 13, 2002 at 04:27:13AM -0800, FARINATI,LEANDRO (HP-Brazil,ex1) wrote:
>                 __asm__ __volatile__("fdc (%0)" :: "r" (spot) );
>                 __asm__ __volatile__("sync" ::);
>                 __asm__ __volatile__("fic (%0)" :: "r" (spot) );
> (segmentation fault in this line)
>                 __asm__ __volatile__("sync" ::);

don't do it like this.  do it this way:

		__asm__ __volatile__("\n\
			fdc (%0)\n\
			sync\n\
			fic (%0)\n\
			sync\n"
			: : "r" (spot)
		);

that ensures that these 4 insns really are together.  you might want to
look at the generated assembly output for this function (objdump -dr
foo.o |less) and/or recompile the kernel with PRINT_USER_TRAPS turned
on so you get a register dump so you can debug this yourself.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

      reply	other threads:[~2002-12-13 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-13 12:27 [parisc-linux] fic problem FARINATI,LEANDRO (HP-Brazil,ex1)
2002-12-13 12:45 ` Matthew Wilcox [this message]

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=20021213124518.A10991@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=leandro.farinati@hp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.