Commit b2e02b82 authored by Brian Gerst's avatar Brian Gerst Committed by Ingo Molnar

x86/compat: Make mmap_is_ia32() common compat

TIF_ADDR32 is set for both ia32 and x32 tasks, so change from
CONFIG_IA32_EMULATION to CONFIG_COMPAT.  Use config_enabled()
to make the function more readable.
Signed-off-by: default avatarBrian Gerst <brgerst@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1434974121-32575-3-git-send-email-brgerst@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent c0bfd26e
...@@ -344,14 +344,9 @@ extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm, ...@@ -344,14 +344,9 @@ extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
*/ */
static inline int mmap_is_ia32(void) static inline int mmap_is_ia32(void)
{ {
#ifdef CONFIG_X86_32 return config_enabled(CONFIG_X86_32) ||
return 1; (config_enabled(CONFIG_COMPAT) &&
#endif test_thread_flag(TIF_ADDR32));
#ifdef CONFIG_IA32_EMULATION
if (test_thread_flag(TIF_ADDR32))
return 1;
#endif
return 0;
} }
/* Do not change the values. See get_align_mask() */ /* Do not change the values. See get_align_mask() */
......
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