mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: jump label: mips alignment required?
       [not found] ` <20110316145739.GA18787@linux-mips.org>
@ 2011-03-16 15:06   ` Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2011-03-16 15:06 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Jason Baron, ddaney, LKML, H. Peter Anvin, Frederic Weisbecker,
	Ingo Molnar, David S. Miller, Mathieu Desnoyers

On Wed, 2011-03-16 at 15:57 +0100, Ralf Baechle wrote:
> On Mon, Mar 14, 2011 at 11:02:20AM -0400, Jason Baron wrote:
> 
> > (off-list)

Added LKML back, as well as others. There was really no reason to take
this off list.

> 
> Adding Steve Rosted again.
> 
> > After last weeks discussion, I'm going to be re-posting the jump label
> > series. I'm adding the following to the x86 code. If you want to add
> > something similar for mips, I can include it in my posting (as coming
> > from you).
> > 
> > thanks,
> > 
> > -Jason
> > 
> > diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
> > index f217cee..a32b18c 100644
> > --- a/arch/x86/include/asm/jump_label.h
> > +++ b/arch/x86/include/asm/jump_label.h
> > @@ -16,6 +16,7 @@ static __always_inline bool arch_static_branch(struct jump_label_key *key)
> >  	asm goto("1:"
> >  		JUMP_LABEL_INITIAL_NOP
> >  		".pushsection __jump_table,  \"aw\" \n\t"
> > +		_ASM_ALIGN "\n\t"
> >  		_ASM_PTR "1b, %l[l_yes], %c0 \n\t"
> >  		".popsection \n\t"
> >  		: :  "i" (key) : : l_yes);
> 
> I don't think we'll need something like this on MIPS.  Gas is smart enough to
> set the __jump_table's section automatically to 64-bit if _ASM_PTR is emitting
> 64-bit pointers.  So no alignment magic needed nor do I think x86 would need this
> to work correct on both i386 and x86_64.

Yeah, I still have strong doubts that the linker would add holes into a
word aligned section. Such a linker IMNSHO would be broken. Why waste
space?

OK, Jason, I think it's fine if you repost the patches. You can keep the
alignment in x86_64 just to be paranoid^Wsafe.

-- Steve



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-16 15:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20110314150219.GA2568@redhat.com>
     [not found] ` <20110316145739.GA18787@linux-mips.org>
2011-03-16 15:06   ` jump label: mips alignment required? Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®