Skip to content

Commit 61de9b7

Browse files
suryasaimadhubp3tk0v
authored andcommitted
x86/microcode/AMD: Rename a couple of functions
- Rename apply_microcode_early_amd() to early_apply_microcode(): simplify the name so that it is clear what it does and when does it do it. - Rename __load_ucode_amd() to find_blobs_in_containers(): the new name actually explains what it does. Document some. No functional changes. Signed-off-by: Borislav Petkov <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1b929c0 commit 61de9b7

File tree

1 file changed

+7
-7
lines changed
  • arch/x86/kernel/cpu/microcode

1 file changed

+7
-7
lines changed

arch/x86/kernel/cpu/microcode/amd.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,7 @@ static int __apply_microcode_amd(struct microcode_amd *mc)
414414
*
415415
* Returns true if container found (sets @desc), false otherwise.
416416
*/
417-
static bool
418-
apply_microcode_early_amd(u32 cpuid_1_eax, void *ucode, size_t size, bool save_patch)
417+
static bool early_apply_microcode(u32 cpuid_1_eax, void *ucode, size_t size, bool save_patch)
419418
{
420419
struct cont_desc desc = { 0 };
421420
u8 (*patch)[PATCH_MAX_SIZE];
@@ -481,7 +480,7 @@ static bool get_builtin_microcode(struct cpio_data *cp, unsigned int family)
481480
return false;
482481
}
483482

484-
static void __load_ucode_amd(unsigned int cpuid_1_eax, struct cpio_data *ret)
483+
static void find_blobs_in_containers(unsigned int cpuid_1_eax, struct cpio_data *ret)
485484
{
486485
struct ucode_cpu_info *uci;
487486
struct cpio_data cp;
@@ -511,11 +510,11 @@ void __init load_ucode_amd_bsp(unsigned int cpuid_1_eax)
511510
{
512511
struct cpio_data cp = { };
513512

514-
__load_ucode_amd(cpuid_1_eax, &cp);
513+
find_blobs_in_containers(cpuid_1_eax, &cp);
515514
if (!(cp.data && cp.size))
516515
return;
517516

518-
apply_microcode_early_amd(cpuid_1_eax, cp.data, cp.size, true);
517+
early_apply_microcode(cpuid_1_eax, cp.data, cp.size, true);
519518
}
520519

521520
void load_ucode_amd_ap(unsigned int cpuid_1_eax)
@@ -546,11 +545,11 @@ void load_ucode_amd_ap(unsigned int cpuid_1_eax)
546545
}
547546
}
548547

549-
__load_ucode_amd(cpuid_1_eax, &cp);
548+
find_blobs_in_containers(cpuid_1_eax, &cp);
550549
if (!(cp.data && cp.size))
551550
return;
552551

553-
apply_microcode_early_amd(cpuid_1_eax, cp.data, cp.size, false);
552+
early_apply_microcode(cpuid_1_eax, cp.data, cp.size, false);
554553
}
555554

556555
static enum ucode_state
@@ -816,6 +815,7 @@ static int verify_and_add_patch(u8 family, u8 *fw, unsigned int leftover,
816815
return 0;
817816
}
818817

818+
/* Scan the blob in @data and add microcode patches to the cache. */
819819
static enum ucode_state __load_microcode_amd(u8 family, const u8 *data,
820820
size_t size)
821821
{

0 commit comments

Comments
 (0)