Skip to content

Commit

Permalink
x86: Fix a section mismatch in arch/x86/kernel/setup.c
Browse files Browse the repository at this point in the history
copy_edd() should be __init.
warning msg:
WARNING: vmlinux.o(.text+0x7759): Section mismatch in reference from the
function copy_edd() to the variable .init.data:boot_params
The function copy_edd() references
the variable __initdata boot_params.
This is often because copy_edd lacks a __initdata
annotation or the annotation of boot_params is wrong.

Signed-off-by: ZhenwenXu <helight.xu@gmail.com>
LKML-Reference: <4B139F8F.4000907@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Helight.Xu authored and H. Peter Anvin committed Nov 30, 2009
1 parent 6dbfe5a commit 9eaa192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ EXPORT_SYMBOL(edd);
* from boot_params into a safe place.
*
*/
static inline void copy_edd(void)
static inline void __init copy_edd(void)
{
memcpy(edd.mbr_signature, boot_params.edd_mbr_sig_buffer,
sizeof(edd.mbr_signature));
Expand All @@ -256,7 +256,7 @@ static inline void copy_edd(void)
edd.edd_info_nr = boot_params.eddbuf_entries;
}
#else
static inline void copy_edd(void)
static inline void __init copy_edd(void)
{
}
#endif
Expand Down

0 comments on commit 9eaa192

Please sign in to comment.