From: Torsten Duwe <duwe@suse.de>
Subject: Use up spare in struct module for livepatch
Patch-mainline: Never, kabi
References: FATE#322421

SLES12 GA didn't have LIVEPATCH / KGRAFT configured
for ppc64le, but we want to do this now. Move those
flags to the place of the spare pointer and use it.
While at it, prepare aarch64 as well.

Signed-off-by: Torsten Duwe <duwe@suse.de>

--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -464,6 +464,7 @@ struct module {
 	unsigned long *ftrace_callsites;
 #endif
 
+#if !defined(__PPC64__) && !defined(__aarch64__)
 #ifdef CONFIG_LIVEPATCH
 	bool klp_alive;
 #endif
@@ -471,6 +472,7 @@ struct module {
 #ifdef CONFIG_KGRAFT
 	bool kgr_alive;
 #endif
+#endif
 
 #ifdef CONFIG_MODULE_UNLOAD
 	/* What modules depend on me? */
@@ -489,7 +491,18 @@ struct module {
 	ctor_fn_t *ctors;
 	unsigned int num_ctors;
 #endif
+
+#if defined(__PPC64__) || defined(__aarch64__)
+#if !defined(__GENKSYMS__) && (defined(CONFIG_LIVEPATCH) || defined(CONFIG_KGRAFT) )
+	bool klp_alive;
+	bool kgr_alive;
+	char suse_kabi_padding6[6];
+#else
 	void *suse_kabi_padding;
+#endif
+#else
+	void *suse_kabi_padding;
+#endif
 } ____cacheline_aligned;
 #ifndef MODULE_ARCH_INIT
 #define MODULE_ARCH_INIT {}
