public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/PAT: priority the PAT warn to error to highlight the developer
@ 2019-09-29  7:20 jun.zhang
  2019-09-30 12:02 ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: jun.zhang @ 2019-09-29  7:20 UTC (permalink / raw)
  To: dave.hansen, luto, peterz, tglx, mingo, bp, hpa, bo.he
  Cc: x86, linux-kernel, zhang jun, he

From: zhang jun <jun.zhang@intel.com>

Documentation/x86/pat.txt says:
set_memory_uc() or set_memory_wc() must use together with set_memory_wb()

if break the PAT attribute, there are tons of warning like:
[   45.846872] x86/PAT: NDK MediaCodec_:3753 map pfn RAM range req
write-combining for [mem 0x1e7a80000-0x1e7a87fff], got write-back
and in the extremely case, we see kernel panic unexpected like:
list_del corruption. prev->next should be ffff88806dbe69c0,
but was ffff888036f048c0

so it's better to priority the warn to error to highlight to
remind the developer.

Signed-off-by: zhang jun <jun.zhang@intel.com>
Signed-off-by: he, bo <bo.he@intel.com>
---
 arch/x86/mm/pat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index d9fbd4f69920..43a4dfdcedc8 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -897,7 +897,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
 
 		pcm = lookup_memtype(paddr);
 		if (want_pcm != pcm) {
-			pr_warn("x86/PAT: %s:%d map pfn RAM range req %s for [mem %#010Lx-%#010Lx], got %s\n",
+			pr_err("x86/PAT: %s:%d map pfn RAM range req %s for [mem %#010Lx-%#010Lx], got %s!!!\n",
 				current->comm, current->pid,
 				cattr_name(want_pcm),
 				(unsigned long long)paddr,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-01  7:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-29  7:20 [PATCH] x86/PAT: priority the PAT warn to error to highlight the developer jun.zhang
2019-09-30 12:02 ` Borislav Petkov
2019-10-01  5:00   ` Zhang, Jun
2019-10-01  7:07     ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox