Re: [patch 0/4] x86: PAT followup - Incremental changes and bug fixes

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andreas Herrmann3 <andreas.herrmann3@...>
Cc: Venki Pallipadi <venkatesh.pallipadi@...>, <ak@...>, <ebiederm@...>, <rdreier@...>, <torvalds@...>, <gregkh@...>, <airlied@...>, <davej@...>, <tglx@...>, <hpa@...>, <akpm@...>, <arjan@...>, <jesse.barnes@...>, <davem@...>, <linux-kernel@...>, <suresh.b.siddha@...>
Date: Thursday, January 17, 2008 - 5:13 pm

* Andreas Herrmann3 <andreas.herrmann3@amd.com> wrote:


ah, nice!

but in general we must be robust enough in this case and just degrade 
any overlapping page to UC (and emit a warning perhaps) - instead of 
failing the ioremap and thus failing the driver (and the bootup).

Does my third patch (which falls back to UC in case of attribute 
conflicts, also attached below) instead of your ioremap_nocache() patch 
solve your bootup problem too?

while ACPI should not hurt too much from using UC mappings, we should 
still solve this intelligently and only use UC when needed. (Sane system 
makers with a sane layout of IO areas and BIOS areas should not be 
punished with UC overhead.)


no, there should be no such need. There can be "mapping leaks", in that 
the mapped object is not unmapped. There's detection code in today's 
x86.git that should report something like this if it occurs:

  Debug warning: early ioremap leak of 1 areas detected.
  please boot with early_ioremap_debug and report the dmesg.
  ------------[ cut here ]------------
  WARNING: at arch/x86/mm/ioremap_32.c:346 ()

but i have not seen this message in your boot log. Could you boot with 
early_ioremap_debug and send us the dmesg - i'm curious which ACPI 
tables are actively mapped while those devices are initialized.

	Ingo

-------------->
Subject: x86: patches/pat-conflict-fixup.patch
From: Ingo Molnar <mingo@elte.hu>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/mm/pat.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Index: linux-x86.q/arch/x86/mm/pat.c
===================================================================
--- linux-x86.q.orig/arch/x86/mm/pat.c
+++ linux-x86.q/arch/x86/mm/pat.c
@@ -174,7 +174,12 @@ int reserve_mattr(u64 start, u64 end, un
 					current->comm, current->pid,
 					start, end,
 					cattr_name(attr), cattr_name(ml->attr));
-				err = -EBUSY;
+				/*
+				 * Force UC on a conflict:
+				 */
+				ma->attr = _PAGE_UC;
+				if (*fattr)
+					*fattr = _PAGE_UC;
 				break;
 			}
 		} else if (ml->start >= end) {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 3:12 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 5:03 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Ingo Molnar, (Thu Jan 17, 5:13 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 5:42 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 6:26 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 7:06 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 6:16 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Eric W. Biederman, (Thu Jan 24, 4:22 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 6:06 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 6:52 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Fri Jan 18, 12:10 pm)
RE: [patch 0/4] x86: PAT followup - Incremental changes and ..., Pallipadi, Venkatesh, (Fri Jan 18, 1:13 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 7:24 pm)
RE: [patch 0/4] x86: PAT followup - Incremental changes and ..., Pallipadi, Venkatesh, (Thu Jan 17, 7:42 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 3:54 pm)
RE: [patch 0/4] x86: PAT followup - Incremental changes and ..., Pallipadi, Venkatesh, (Wed Jan 16, 6:14 pm)
RE: [patch 0/4] x86: PAT followup - Incremental changes and ..., Pallipadi, Venkatesh, (Wed Jan 16, 3:05 pm)