]> git.ipfire.org Git - people/arne_f/kernel.git/commit
x86/microcode/AMD: Rework container parsing
authorBorislav Petkov <bp@suse.de>
Fri, 20 Jan 2017 20:29:46 +0000 (21:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 23 Jan 2017 09:02:47 +0000 (10:02 +0100)
commit8801b3fcb5744dc536272ba4ccfd6faca9b46705
treeb8b168cd4b63967c7d97a3f0dec7ff941d525e16
parentf454177f739e92620d84a1f42f91b03007a1cdd0
x86/microcode/AMD: Rework container parsing

It was pretty clumsy before and the whole work of parsing the microcode
containers was spread around the functions wrongly.

Clean it up so that there's a main scan_containers() function which
iterates over the microcode blob and picks apart the containers glued
together. For each container, it calls a parse_container() helper which
concentrates on one container only: sanity-checking, parsing, counting
microcode patches in there, etc.

It makes much more sense now and it is actually very readable. Oh, and
we luvz a diffstat removing more crap than adding.

Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/20170120202955.4091-8-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/microcode/amd.c