forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/x86/kernel/cpu/mtrr/cleanup.c
....@@ -296,7 +296,7 @@
296296 unsigned long sizek)
297297 {
298298 unsigned long hole_basek, hole_sizek;
299
- unsigned long second_basek, second_sizek;
299
+ unsigned long second_sizek;
300300 unsigned long range0_basek, range0_sizek;
301301 unsigned long range_basek, range_sizek;
302302 unsigned long chunk_sizek;
....@@ -304,7 +304,6 @@
304304
305305 hole_basek = 0;
306306 hole_sizek = 0;
307
- second_basek = 0;
308307 second_sizek = 0;
309308 chunk_sizek = state->chunk_sizek;
310309 gran_sizek = state->gran_sizek;
....@@ -831,7 +830,8 @@
831830 {
832831 u32 l, h;
833832
834
- if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
833
+ if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
834
+ boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
835835 return 0;
836836 if (boot_cpu_data.x86 < 0xf)
837837 return 0;