Skip to content

Commit

Permalink
x86: kaslr: fix build due to missing ALIGN definition
Browse files Browse the repository at this point in the history
Fengguang's bot reported that 4545c89 ("x86: introduce kaslr_offset()") broke
randconfig build

   In file included from arch/x86/xen/vga.c:5:0:
   arch/x86/include/asm/setup.h: In function 'kaslr_offset':
>> arch/x86/include/asm/setup.h:77:2: error: implicit declaration of function 'ALIGN' [-Werror=implicit-function-declaration]
     return (unsigned long)&_text - __START_KERNEL;
     ^
Fix that by making setup.h self-sufficient by explicitly including
linux/kernel.h, which is needed for ALIGN() (which is what __START_KERNEL
contains in its expansion).

Reported-by: fengguang.wu@intel.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Kosina committed Apr 29, 2015
1 parent 5d4351b commit 535b3dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ static inline void x86_ce4100_early_setup(void) { }
#ifndef _SETUP

#include <asm/espfix.h>
#include <linux/kernel.h>

/*
* This is set up by the setup-routine at boot-time
Expand Down

0 comments on commit 535b3dd

Please sign in to comment.