diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-11-14 15:20:24 +0100 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-11-14 22:08:12 +0100 |
commit | 049a2c2d486e8cc82c5cd79fa479c5b105b109e9 (patch) | |
tree | 733a9f508b2700c9a41f9efec9283a48b68cb526 /arch/s390/kernel/module.c | |
parent | a6de0a91d93a47f812cf43b96ba6e639de6df6d5 (diff) | |
download | linux-stable-049a2c2d486e8cc82c5cd79fa479c5b105b109e9.tar.gz linux-stable-049a2c2d486e8cc82c5cd79fa479c5b105b109e9.tar.bz2 linux-stable-049a2c2d486e8cc82c5cd79fa479c5b105b109e9.zip |
s390: enable CPU alternatives unconditionally
Remove the CPU_ALTERNATIVES config option and enable the code
unconditionally. The config option was only added to avoid a conflict
with the named saved segment support. Since that code is gone there is
no reason to keep the CPU_ALTERNATIVES config option.
Just enable it unconditionally to also reduce the number of config
options and make it less likely that something breaks.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/module.c')
-rw-r--r-- | arch/s390/kernel/module.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index 6d9f73bb4142..7b87991416fd 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c @@ -433,16 +433,13 @@ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *s; char *secstrings; - if (IS_ENABLED(CONFIG_ALTERNATIVES)) { - secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; - for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { - if (!strcmp(".altinstructions", - secstrings + s->sh_name)) { - /* patch .altinstructions */ - void *aseg = (void *)s->sh_addr; + secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; + for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { + if (!strcmp(".altinstructions", secstrings + s->sh_name)) { + /* patch .altinstructions */ + void *aseg = (void *)s->sh_addr; - apply_alternatives(aseg, aseg + s->sh_size); - } + apply_alternatives(aseg, aseg + s->sh_size); } } |