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>
This commit is contained in:
Chen Yucong 2014-10-02 23:20:12 +08:00 коммит произвёл Borislav Petkov
Родитель 44612a3ac6
Коммит 69b9575835
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -253,6 +253,8 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c)
} }
mce_threshold_block_init(&b, offset); mce_threshold_block_init(&b, offset);
if (mce_threshold_vector != amd_threshold_interrupt)
mce_threshold_vector = amd_threshold_interrupt; mce_threshold_vector = amd_threshold_interrupt;
} }
} }