diff options
author | Chen Yucong <slaoub@gmail.com> | 2014-10-02 11:20:12 -0400 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2014-10-21 16:12:56 -0400 |
commit | 69b957583580bf40624553c64d802fefb54199cb (patch) | |
tree | 9ebb3ec22218dd0c9f99712a34340c7ba809cf32 /arch | |
parent | 44612a3ac671d7b9a9b987ab73dcc776204ac4d5 (diff) |
x86, MCE, AMD: Move invariant code out from loop body
Assigning to mce_threshold_vector is loop-invariant code in
mce_amd_feature_init(). So do it only once, out of loop body.
Signed-off-by: Chen Yucong <slaoub@gmail.com>
Link: http://lkml.kernel.org/r/1412263212.8085.6.camel@debian
[ Boris: commit message corrections. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 9ce64955559d..9af7bd74828b 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -253,7 +253,9 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c) | |||
253 | } | 253 | } |
254 | 254 | ||
255 | mce_threshold_block_init(&b, offset); | 255 | mce_threshold_block_init(&b, offset); |
256 | mce_threshold_vector = amd_threshold_interrupt; | 256 | |
257 | if (mce_threshold_vector != amd_threshold_interrupt) | ||
258 | mce_threshold_vector = amd_threshold_interrupt; | ||
257 | } | 259 | } |
258 | } | 260 | } |
259 | } | 261 | } |