Commit 9387f774 authored by Borislav Petkov's avatar Borislav Petkov Committed by H. Peter Anvin

x86-32, amd: Move va_align definition to unbreak 32-bit build

hpa reported that dfb09f9b breaks 32-bit
builds with the following error message:

/home/hpa/kernel/linux-tip.cpu/arch/x86/kernel/cpu/amd.c:437: undefined
reference to `va_align'
/home/hpa/kernel/linux-tip.cpu/arch/x86/kernel/cpu/amd.c:436: undefined
reference to `va_align'

This is due to the fact that va_align is a global in a 64-bit only
compilation unit. Move it to mmap.c where it is visible to both
subarches.
Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
Link: http://lkml.kernel.org/r/1312633899-1131-1-git-send-email-bp@amd64.orgSigned-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 8fa8b035
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
#include <asm/ia32.h> #include <asm/ia32.h>
#include <asm/syscalls.h> #include <asm/syscalls.h>
struct __read_mostly va_alignment va_align = {
.flags = -1,
};
/* /*
* Align a virtual address to avoid aliasing in the I$ on AMD F15h. * Align a virtual address to avoid aliasing in the I$ on AMD F15h.
* *
......
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/elf.h> #include <asm/elf.h>
struct __read_mostly va_alignment va_align = {
.flags = -1,
};
static unsigned int stack_maxrandom_size(void) static unsigned int stack_maxrandom_size(void)
{ {
unsigned int max = 0; unsigned int max = 0;
...@@ -42,7 +46,6 @@ static unsigned int stack_maxrandom_size(void) ...@@ -42,7 +46,6 @@ static unsigned int stack_maxrandom_size(void)
return max; return max;
} }
/* /*
* Top of mmap area (just below the process stack). * Top of mmap area (just below the process stack).
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment