All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: adeos-main <adeos-main@gna.org>
Subject: Re: [Adeos-main] [PATCH 3/3] i386: Cleanup root IRQ trampolines
Date: Thu, 27 Dec 2007 10:48:18 +0100	[thread overview]
Message-ID: <477374E2.3020403@domain.hid> (raw)
In-Reply-To: <4772EF89.4040101@domain.hid>

Jan Kiszka wrote:
> Philippe Gerum wrote:
>> Jan Kiszka wrote:
>>> Simplifies xirq trampoline and applies the xirq refactorings to
>>> virq_handler too.
>>>
>> --- linux-2.6.23.12-xeno.orig/include/asm-i386/ipipe.h
>> +++ linux-2.6.23.12-xeno/include/asm-i386/ipipe.h
>> @@ -141,11 +141,7 @@ __ipipe_call_root_xirq_handler(unsigned
>>  		"pushl %%ds\n\t"
>>  		"pushl %%eax\n\t"
>>  		"pushl %%ebp\n\t"
>> -		"pushl %%edi\n\t"
>> -		"pushl %%esi\n\t"
>> -		"pushl %%edx\n\t"
>> -		"pushl %%ecx\n\t"
>> -		"pushl %%ebx\n\t"
>> +		"subl  $5*4,%%esp	# rest can remain unsaved\n\t"
>>
>> This won't work. We actually want to save our regs, so that they are
>> restored when going back to xirq_end through the iret path. If we don't
>> save them, the registers will remain terminally clobbered.
> 
> General purpose registers aren't stable across functions calls. But it
> is a valid question what the compiler assumes due to the function
> inlining here. So declaring those five clobbered should be safe enough -
> but if you prefer to add a few extra cycles for safety, keep it as
> explicit as it was :->.
> 

Declaring clobbers would duplicate what entry.S already does when
restoring args from the interrupt frame.

-- 
Philippe.


      parent reply	other threads:[~2007-12-27  9:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-26 15:40 [Adeos-main] [PATCH 3/3] i386: Cleanup root IRQ trampolines Jan Kiszka
2007-12-26 22:11 ` Philippe Gerum
2007-12-27  0:19   ` Jan Kiszka
2007-12-27  8:49     ` Philippe Gerum
2007-12-27  9:48     ` Philippe Gerum [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=477374E2.3020403@domain.hid \
    --to=rpm@xenomai.org \
    --cc=adeos-main@gna.org \
    --cc=jan.kiszka@domain.hid \
    /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.