Skip to content

Commit

Permalink
x86, MCE, AMD: Move invariant code out from loop body
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chen Yucong authored and Borislav Petkov committed Oct 21, 2014
1 parent 44612a3 commit 69b9575
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/x86/kernel/cpu/mcheck/mce_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c)
}

mce_threshold_block_init(&b, offset);
mce_threshold_vector = amd_threshold_interrupt;

if (mce_threshold_vector != amd_threshold_interrupt)
mce_threshold_vector = amd_threshold_interrupt;
}
}
}
Expand Down

0 comments on commit 69b9575

Please sign in to comment.