mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Jason Baron <jbaron@redhat.com>,
	ddaney@caviumnetworks.com, LKML <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	"David S. Miller" <davem@davemloft.net>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: jump label: mips alignment required?
Date: Wed, 16 Mar 2011 11:06:20 -0400	[thread overview]
Message-ID: <1300287980.16880.37.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20110316145739.GA18787@linux-mips.org>

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



           reply	other threads:[~2011-03-16 15:06 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20110316145739.GA18787@linux-mips.org>]

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=1300287980.16880.37.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=davem@davemloft.net \
    --cc=ddaney@caviumnetworks.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@elte.hu \
    --cc=ralf@linux-mips.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

all inboxes | Powered by JetHome®