x86/mtrr: Allocate mtrr_value array dynamically
authorJuergen Gross <jgross@suse.com>
Tue, 2 May 2023 12:09:24 +0000 (14:09 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 1 Jun 2023 13:04:33 +0000 (15:04 +0200)
commit961c6a4326643e6588352b7f1f5d77364415386f
tree986f83591c9166f0be3cd06851ff65de4ebaade8
parentb5d3c72829b1f2b181cd7c5b426f7deaae452045
x86/mtrr: Allocate mtrr_value array dynamically

The mtrr_value[] array is a static variable which is used only in a few
configurations. Consuming 6kB is ridiculous for this case, especially as
the array doesn't need to be that large and it can easily be allocated
dynamically.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20230502120931.20719-10-jgross@suse.com
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
arch/x86/kernel/cpu/mtrr/legacy.c