[Top] [All Lists]

Re: [PATCH] jump label: Add MIPS support.

To: Jason Baron <>
Subject: Re: [PATCH] jump label: Add MIPS support.
From: David Daney <>
Date: Mon, 04 Oct 2010 12:06:09 -0700
Cc: Rabin Vincent <>,,,,, David Miller <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100720 Fedora/3.0.6-1.fc12 Thunderbird/3.0.6
On 10/04/2010 10:50 AM, Jason Baron wrote:
On Mon, Oct 04, 2010 at 10:43:07AM -0700, David Daney wrote:
On 10/03/2010 11:15 AM, Rabin Vincent wrote:
On Tue, Sep 28, 2010 at 11:40 PM, David Daney<>   
+void arch_jump_label_text_poke_early(jump_label_t addr)
+       union mips_instruction *insn_p =
+               (union mips_instruction *)(unsigned long)addr;
+       insn_p->word = 0; /* nop */
+       flush_icache_range((unsigned long)insn_p,
+                          (unsigned long)insn_p + sizeof(*insn_p));

Can't this function be a no-op on MIPS?  This seems to be
used on x86 to patch in the optimal nop instruction, but
on MIPS the optimal/only nop instruction should already
be in place at build time.  Same thing for the SPARC

Yes, I think you are correct.

On MIPS the NOP is already optimal.  I will respin the MIPS patch to
make arch_jump_label_text_poke_early() be empty.

davem wasn't CCed on the original message, so I added him.  I would
defer to him on the SPARC version.

that's right, arch_jump_label_text_poke_early() can probably be a no-op
for most arches.

We can also look at adding an empty definition into the generic
header. So that arches don't have to provide an empty definition.

I just sent the patch that does that. It should be showing up in an In-Box near you soon.

David Daney

<Prev in Thread] Current Thread [Next in Thread>