All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>,
	Ingo Molnar <mingo@elte.hu>, x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [git-pull -tip] x86: declaration patches
Date: Fri, 10 Apr 2009 21:45:24 +0400	[thread overview]
Message-ID: <20090410174524.GC8204@lenovo> (raw)
In-Reply-To: <20090410172925.GA24446@uranus.ravnborg.org>

[Sam Ravnborg - Fri, Apr 10, 2009 at 07:29:25PM +0200]
| Hi Jaswinder.
| 
| > diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
| > index 7309c0a..2f35e81 100644
| > --- a/arch/x86/include/asm/hw_irq.h
| > +++ b/arch/x86/include/asm/hw_irq.h
| > @@ -81,6 +81,11 @@ extern void eisa_set_level_irq(unsigned int irq);
| >  /* SMP */
| >  extern void smp_apic_timer_interrupt(struct pt_regs *);
| >  extern void smp_spurious_interrupt(struct pt_regs *);
| > +#ifdef CONFIG_X86_32
| > +extern void smp_generic_interrupt(struct pt_regs *);
| > +#else
| > +extern asmlinkage void smp_generic_interrupt(struct pt_regs *);
| > +#endif
| >  extern void smp_error_interrupt(struct pt_regs *);
| >  #ifdef CONFIG_SMP
| >  extern void smp_reschedule_interrupt(struct pt_regs *);
| > @@ -93,6 +98,15 @@ extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *);
| >  #endif
| >  #endif
| >  
| > +#ifdef CONFIG_X86_IO_APIC
| > +#ifdef CONFIG_X86_32
| > +extern void smp_irq_move_cleanup_interrupt(void);
| > +#else
| > +extern asmlinkage void smp_irq_move_cleanup_interrupt(void);
| > +#endif
| > +#endif
| 
| The above is a lot ifdefs just to:
| 1) use asmlinkage only on 64 bit
| 2) hide the prototype if do not implement the function
| 
| Is there any relevant cost associated with asmlinkage or could we just make it
| always asmlinkage?

Hi,

as far as I see asmlinkage is just (on X86-64 after
all substitution) nothing, ie:

#define asmlinkage

(until we pass __cplusplus, do we ever?)

Which means we could safely pass asmlinkage on X86-64
in case if X86-32 requires it.

Like

| > +#ifdef CONFIG_X86_32
| > +extern void smp_generic_interrupt(struct pt_regs *);
| > +#else
| > +extern asmlinkage void smp_generic_interrupt(struct pt_regs *);
| > +#endif

could be just written as
	extern void smp_generic_interrupt(struct pt_regs *);
for both.

        Cyrill

  reply	other threads:[~2009-04-10 17:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-10 16:33 [git-pull -tip] x86: declaration patches Jaswinder Singh Rajput
2009-04-10 16:51 ` Thomas Gleixner
2009-04-10 17:21   ` Jaswinder Singh Rajput
2009-04-10 18:11     ` Thomas Gleixner
2009-04-10 17:29 ` Sam Ravnborg
2009-04-10 17:45   ` Cyrill Gorcunov [this message]
2009-04-10 18:33   ` Jaswinder Singh Rajput
2009-04-12 13:21     ` Ingo Molnar

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=20090410174524.GC8204@lenovo \
    --to=gorcunov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=jaswinder@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sam@ravnborg.org \
    --cc=x86@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 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.