Skip to content

Commit 20feaab

Browse files
author
Russell King
committed
ARM: Fix build error for SMP=n builds
Unfortunately, the module fixups cause the kernel to fail to build when SMP is not enabled. Fix this by removing the reference to fixup_smp on non-SMP fixup kernels, but ensuring that if we do have the SMP fixup section, we refuse to load the module. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent a9e4e6e commit 20feaab

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/arm/kernel/module.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,11 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
323323
#endif
324324
s = find_mod_section(hdr, sechdrs, ".alt.smp.init");
325325
if (s && !is_smp())
326+
#ifdef CONFIG_SMP_ON_UP
326327
fixup_smp((void *)s->sh_addr, s->sh_size);
328+
#else
329+
return -EINVAL;
330+
#endif
327331
return 0;
328332
}
329333

0 commit comments

Comments
 (0)