| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | #ifndef _ASM_POWERPC_MODULE_H |
|---|
| 2 | 3 | #define _ASM_POWERPC_MODULE_H |
|---|
| 3 | 4 | #ifdef __KERNEL__ |
|---|
| 4 | 5 | |
|---|
| 5 | | -/* |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * as published by the Free Software Foundation; either version |
|---|
| 9 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 10 | | - */ |
|---|
| 11 | | - |
|---|
| 12 | 6 | #include <linux/list.h> |
|---|
| 13 | 7 | #include <asm/bug.h> |
|---|
| 14 | 8 | #include <asm-generic/module.h> |
|---|
| 15 | | - |
|---|
| 16 | | - |
|---|
| 17 | | -#ifdef CONFIG_MPROFILE_KERNEL |
|---|
| 18 | | -#define MODULE_ARCH_VERMAGIC_FTRACE "mprofile-kernel " |
|---|
| 19 | | -#else |
|---|
| 20 | | -#define MODULE_ARCH_VERMAGIC_FTRACE "" |
|---|
| 21 | | -#endif |
|---|
| 22 | | - |
|---|
| 23 | | -#ifdef CONFIG_RELOCATABLE |
|---|
| 24 | | -#define MODULE_ARCH_VERMAGIC_RELOCATABLE "relocatable " |
|---|
| 25 | | -#else |
|---|
| 26 | | -#define MODULE_ARCH_VERMAGIC_RELOCATABLE "" |
|---|
| 27 | | -#endif |
|---|
| 28 | | - |
|---|
| 29 | | -#define MODULE_ARCH_VERMAGIC MODULE_ARCH_VERMAGIC_FTRACE MODULE_ARCH_VERMAGIC_RELOCATABLE |
|---|
| 30 | 9 | |
|---|
| 31 | 10 | #ifndef __powerpc64__ |
|---|
| 32 | 11 | /* |
|---|
| .. | .. |
|---|
| 93 | 72 | # ifdef MODULE |
|---|
| 94 | 73 | asm(".section .ftrace.tramp,\"ax\",@nobits; .align 3; .previous"); |
|---|
| 95 | 74 | # endif /* MODULE */ |
|---|
| 96 | | -#endif |
|---|
| 97 | 75 | |
|---|
| 98 | 76 | int module_trampoline_target(struct module *mod, unsigned long trampoline, |
|---|
| 99 | 77 | unsigned long *target); |
|---|
| 100 | | - |
|---|
| 101 | | -#ifdef CONFIG_DYNAMIC_FTRACE |
|---|
| 102 | 78 | int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs); |
|---|
| 103 | 79 | #else |
|---|
| 104 | 80 | static inline int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs) |
|---|