[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181005220220.770d9e18@vmware.local.home>
Date: Fri, 5 Oct 2018 22:02:20 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Matthew Helsley <mhelsley@...are.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
David Woodhouse <dwmw2@...radead.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Jason Baron <jbaron@...mai.com>, Jiri Kosina <jkosina@...e.cz>
Subject: Re: [POC][RFC][PATCH 1/2] jump_function: Addition of new feature
"jump_function"
On Fri, 05 Oct 2018 21:51:11 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> +#define arch_dynfunc_trampoline(name, def) \
> + asm volatile ( \
> + ".globl dynfunc_" #name "; \n\t" \
> + "dynfunc_" #name ": \n\t" \
> + "jmp " #def " \n\t" \
> + ".balign 8 \n \t" \
> + : : : "memory" )
> +
Note, the assembler can easily put in a two byte jump here. The .balign
was suppose to also have some padding (nop) incase that happens. It's
fine, because we can just replace it with a 5 byte jump, as long as we
have 3 bytes afterward if it is a two byte jump.
-- Steve
Powered by blists - more mailing lists