diff options
author | Juergen Gross <jgross@suse.com> | 2022-11-02 08:47:05 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-11-10 13:12:44 +0100 |
commit | 57df636cd336a1929c7ddc5fb48ed124d24cd7b2 (patch) | |
tree | baf672af3054615659ecd11eb3487fb2e493a242 /arch/x86/kernel/cpu/mtrr/mtrr.c | |
parent | 7d71db537b01a6beadbe45a4e6e302272110c2c0 (diff) |
x86/mtrr: Remove set_all callback from struct mtrr_ops
Instead of using an indirect call to mtrr_if->set_all just call the only
possible target cache_cpu_init() directly. Remove the set_all function
pointer from struct mtrr_ops.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20221102074713.21493-9-jgross@suse.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr/mtrr.c')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/mtrr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c index 4209945c4e68..a44b510ced0e 100644 --- a/arch/x86/kernel/cpu/mtrr/mtrr.c +++ b/arch/x86/kernel/cpu/mtrr/mtrr.c @@ -170,15 +170,15 @@ static int mtrr_rendezvous_handler(void *info) * saved, and we want to replicate that across all the cpus that come * online (either at the end of boot or resume or during a runtime cpu * online). If we're doing that, @reg is set to something special and on - * all the cpu's we do mtrr_if->set_all() (On the logical cpu that + * all the CPUs we do cache_cpu_init() (On the logical CPU that * started the boot/resume sequence, this might be a duplicate - * set_all()). + * cache_cpu_init()). */ if (data->smp_reg != ~0U) { mtrr_if->set(data->smp_reg, data->smp_base, data->smp_size, data->smp_type); } else if (mtrr_aps_delayed_init || !cpu_online(smp_processor_id())) { - mtrr_if->set_all(); + cache_cpu_init(); } return 0; } @@ -770,7 +770,7 @@ void __init mtrr_bp_init(void) if (mtrr_cleanup(phys_addr)) { changed_by_mtrr_cleanup = 1; - mtrr_if->set_all(); + cache_cpu_init(); } } } @@ -856,7 +856,7 @@ void mtrr_bp_restore(void) if (!memory_caching_control) return; - mtrr_if->set_all(); + cache_cpu_init(); } static int __init mtrr_init_finialize(void) |