提交 0b827537 编写于 作者: V venkatesh.pallipadi@intel.com 提交者: H. Peter Anvin

x86: bugfix wbinvd() model check instead of family check

wbinvd is supported on all CPUs 486 or later. But,
pageattr.c is checking x86_model >= 4 before wbinvd(), which looks like
an oversight bug. It was first introduced at one place by changeset
d7c8f21a and got copied over to second
place in the same file later.

[ Impact: fix missing cache flush on early-model CPUs, potential data corruption ]
Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
上级 0c752a93
...@@ -153,7 +153,7 @@ static void __cpa_flush_all(void *arg) ...@@ -153,7 +153,7 @@ static void __cpa_flush_all(void *arg)
*/ */
__flush_tlb_all(); __flush_tlb_all();
if (cache && boot_cpu_data.x86_model >= 4) if (cache && boot_cpu_data.x86 >= 4)
wbinvd(); wbinvd();
} }
...@@ -218,7 +218,7 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache, ...@@ -218,7 +218,7 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache,
/* 4M threshold */ /* 4M threshold */
if (numpages >= 1024) { if (numpages >= 1024) {
if (boot_cpu_data.x86_model >= 4) if (boot_cpu_data.x86 >= 4)
wbinvd(); wbinvd();
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册