Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20feaab0 authored by Russell King's avatar Russell King
Browse files

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent a9e4e6e1
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -323,7 +323,11 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
#endif
#endif
	s = find_mod_section(hdr, sechdrs, ".alt.smp.init");
	s = find_mod_section(hdr, sechdrs, ".alt.smp.init");
	if (s && !is_smp())
	if (s && !is_smp())
#ifdef CONFIG_SMP_ON_UP
		fixup_smp((void *)s->sh_addr, s->sh_size);
		fixup_smp((void *)s->sh_addr, s->sh_size);
#else
		return -EINVAL;
#endif
	return 0;
	return 0;
}
}