mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael S. Zick" <lkml@morethan.org>
To: linux-kernel@vger.kernel.org
Subject: [RFC] Uni-processor interrupt state preservation.
Date: Thu, 30 Jul 2009 11:37:18 -0500	[thread overview]
Message-ID: <200907301137.22035.lkml@morethan.org> (raw)

In kernel/up.c - -

int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
                                int wait)
{
        unsigned long flags;

        WARN_ON(cpu != 0);

        local_irq_save(flags);
        (func)(info);
        local_irq_restore(flags);

        return 0;
}

It **looks** reasonable - - 
but:

.L2:
#APP
        # ul native_save_fl(void)
        pushf ; pop %ebx
        # native_irq_disable(void)
        cli
#NO_APP
#(insn:TI 29 27 30 (set (reg:SI 0 ax [ info ])
#        (reg/v/f:SI 4 si [orig:62 info ] [62])) 34 {*movsi_1} (insn_list:REG_DEP_TRUE 27 (nil))
#    (expr_list:REG_DEAD (reg/v/f:SI 4 si [orig:62 info ] [62])
#        (nil)))
        movl    %esi, %eax      # 29    *movsi_1/1      [length = 2]
#(call_insn:TI 30 29 43 (call (mem:QI (reg/v/f:SI 5 di [orig:61 func ] [61]) [0 S1 A8])
#        (const_int 0 [0x0])) 386 {*call_1} (insn_list:REG_DEP_TRUE 29 (insn_list:REG_DEP_TRUE 27 (nil)))
#    (expr_list:REG_DEAD (reg:SI 0 ax [ info ])
#        (expr_list:REG_DEAD (reg/v/f:SI 5 di [orig:61 func ] [61])
#            (nil)))
#    (expr_list:REG_DEP_TRUE (use (reg:SI 0 ax [ info ]))
#        (nil)))
        call    *%edi   # 30    *call_1 [length = 2]
#APP
        # native_restore_fl(ul flags)
        push %ebx ; popf
#NO_APP

Just how is the interrupt state (in ebx) supposed to be preserved across the function call?
(assembly comments where added in macros, just to clarify where this is coming from.)

Mike

             reply	other threads:[~2009-07-30 16:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 16:37 Michael S. Zick [this message]
2009-07-30 16:55 ` Roland Dreier
2009-07-30 17:01   ` Michael S. Zick
2009-07-30 17:14     ` Roland Dreier
2009-07-30 17:51       ` Michael S. Zick

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=200907301137.22035.lkml@morethan.org \
    --to=lkml@morethan.org \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome