Commit 8756f2ef authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

i386: mark do_test_wp_bit() noinline

As reported by Zachary Amsden <zach@vmware.com>,
some gcc versions will inline the function even when
it is declared after the call-site. This particular
function must not be inlined, since the exception
recovery doesn't like __init sections (which the caller
is in).
parent 04dceb0c
......@@ -45,7 +45,7 @@ unsigned int __VMALLOC_RESERVE = 128 << 20;
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
unsigned long highstart_pfn, highend_pfn;
static int do_test_wp_bit(void);
static int noinline do_test_wp_bit(void);
/*
* Creates a middle page table and puts a pointer to it in the
......@@ -673,7 +673,7 @@ void __init pgtable_cache_init(void)
* This function cannot be __init, since exceptions don't work in that
* section. Put this after the callers, so that it cannot be inlined.
*/
static int do_test_wp_bit(void)
static int noinline do_test_wp_bit(void)
{
char tmp_reg;
int flag;
......
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