Skip to contentSkip to conversation

powerpc: make _ASM_NOKPROBE_SYMBOL a noop when KPROBES not defined

PATCH Applied Nicholas Piggin 4 participants 5 messages Oct 13, 2016 – Nov 14, 2016 PowerPC

lore
Share & tools
lore

Nicholas Piggin

author reviewer
#0 lore raw

PATCH 1/1 powerpc: make _ASM_NOKPROBE_SYMBOL a noop when KPROBES not defined

---
The linker orphan sections error patch caught this

 arch/powerpc/include/asm/ppc_asm.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/powerpc/include/asm/ppc_asm.h +4 -0
index c73750b..ceec199 100644
@@ -265,10 +265,14 @@ GLUE(.,name):
  * latter is for those that incdentially must be excluded from probing
  * and allows them to be linked at more optimal location within text.
  */
+#ifdef CONFIG_KPROBES
 #define _ASM_NOKPROBE_SYMBOL(entry)			\
 	.pushsection "_kprobe_blacklist","aw";		\
 	PPC_LONG (entry) ;				\
 	.popsection
+#else
+#define _ASM_NOKPROBE_SYMBOL(entry)
+#endif
 
 #define FUNC_START(name)	_GLOBAL(name)
 #define FUNC_END(name)
Signature · 1 line
2.9.3
author reviewer
#3 lore raw
Quoted 7 lines · On Fri, 14 Oct 2016 11:48:35 +1100 Michael Ellerman <[email protected]> wrote:
Quoted 3 lines · Nicholas Piggin

---
The linker orphan sections error patch caught this

You mean with the orphan sections patch applied this breaks the build when KPROBES=n right?

Yes. The linker orphan patch got picked up by one of the CI tests after I posted it, and pointed this out (I obviously didn't test KPROBES=n case).

Thanks,
Nick