lkml.org 
[lkml]   [2015]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/1] x86/cpu: kill eager_fpu_init_bp()
Now that eager_fpu_init_bp() does setup_init_fpu_buf() and nothing else
we can remove it and move this code into its "caller", eager_fpu_init().

This avoids the confusing games with "static __refdata void (*boot_func)".
init_xstate_buf can be NULL only on boot, so it is safe to the "__init"
setup_init_fpu_buf() function, just we need to add the "__init_refok"
marker.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
arch/x86/kernel/xsave.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 1cf5667..f7e8e0c 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -677,16 +677,8 @@ void xsave_init(void)
this_func();
}

-static inline void __init eager_fpu_init_bp(void)
+void __init_refok eager_fpu_init(void)
{
- if (!init_xstate_buf)
- setup_init_fpu_buf();
-}
-
-void eager_fpu_init(void)
-{
- static __refdata void (*boot_func)(void) = eager_fpu_init_bp;
-
WARN_ON(used_math());
current_thread_info()->status = 0;

@@ -698,10 +690,8 @@ void eager_fpu_init(void)
return;
}

- if (boot_func) {
- boot_func();
- boot_func = NULL;
- }
+ if (!init_xstate_buf)
+ setup_init_fpu_buf();
}

/*
--
1.5.5.1



\
 
 \ /
  Last update: 2015-03-14 16:21    [W:0.120 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site