From: Ingo Molnar <mingo@elte.hu>
To: Andreas Herrmann3 <andreas.herrmann3@amd.com>
Cc: Venki Pallipadi <venkatesh.pallipadi@intel.com>,
ak@muc.de, ebiederm@xmission.com, rdreier@cisco.com,
torvalds@linux-foundation.org, gregkh@suse.de, airlied@skynet.ie,
davej@redhat.com, tglx@linutronix.de, hpa@zytor.com,
akpm@linux-foundation.org, arjan@infradead.org,
jesse.barnes@intel.com, davem@davemloft.net,
linux-kernel@vger.kernel.org, suresh.b.siddha@intel.com
Subject: Re: [patch 0/4] x86: PAT followup - Incremental changes and bug fixes
Date: Thu, 17 Jan 2008 22:13:08 +0100 [thread overview]
Message-ID: <20080117211308.GA7858@elte.hu> (raw)
In-Reply-To: <20080117210301.GC12631@alberich.amd.com>
* Andreas Herrmann3 <andreas.herrmann3@amd.com> wrote:
> Yes.
>
> Meanwhile I have figured out that it is some ACPI stuff that maps the
> page cached. I've changed the ioremap's in drivers/acpi/osl.c to
> ioremap_nocache. See attached patch.
>
> Now the machine boots without conflicts.
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.)
> > as an intermediate fix, how about following the attribute of the
> > already existing mapping, instead of rejecting the ioremap due to
> > the conflict? I.e. something like below?
>
> I guess it is not a good idea to use an existing cachable attribute if
> the IO-region is non-prefetchable. And in this example there are 3
> devices which are potentially affected:
>
> 00:12.0 IDE interface: ATI Technologies Inc 4379 Serial ATA Controller (rev 80) (
> ...
> Memory at c0403000 (32-bit, non-prefetchable) [size=512]
> ...
>
> 00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 82)
> ...
> Memory at c0403400 (32-bit, non-prefetchable) [size=1K]
> ...
>
> 00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller (rev 80)
> ...
> Memory at c0403800 (32-bit, non-prefetchable) [size=256]
> ...
>
> BTW, is there a need for osl.c to map all regions as cached?
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) {
next prev parent reply other threads:[~2008-01-17 21:13 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 2:39 [patch 0/4] x86: PAT followup - Incremental changes and bug fixes venkatesh.pallipadi
2008-01-16 2:39 ` [patch 1/4] x86: PAT followup - Do not fold two bits in _PAGE_PCD venkatesh.pallipadi
2008-01-16 2:39 ` [patch 2/4] x86: PAT followup - Remove KERNPG_TABLE from pte entry venkatesh.pallipadi
2008-01-16 8:14 ` Mika Penttilä
2008-01-16 18:17 ` Pallipadi, Venkatesh
2008-01-17 0:18 ` Venki Pallipadi
2008-01-16 2:39 ` [patch 3/4] x86: PAT followup - Remove reserved pages mapping to zero page and not map them venkatesh.pallipadi
2008-01-16 2:39 ` [patch 4/4] x86: PAT followup - use ioremap for devmem read of reserved regions venkatesh.pallipadi
2008-01-16 7:33 ` Ingo Molnar
2008-01-16 7:29 ` [patch 0/4] x86: PAT followup - Incremental changes and bug fixes Ingo Molnar
2008-01-16 18:57 ` Andreas Herrmann
2008-01-16 19:05 ` Pallipadi, Venkatesh
2008-01-16 19:37 ` Pallipadi, Venkatesh
2008-01-16 20:24 ` Ingo Molnar
2008-01-16 20:33 ` Venki Pallipadi
2008-01-16 22:01 ` Andi Kleen
2008-01-16 22:14 ` Pallipadi, Venkatesh
2008-01-16 22:29 ` Andi Kleen
2008-01-17 19:12 ` Andreas Herrmann3
2008-01-17 19:54 ` Andreas Herrmann3
2008-01-17 20:36 ` Ingo Molnar
2008-01-17 20:33 ` H. Peter Anvin
2008-01-17 20:56 ` Ingo Molnar
2008-01-17 20:57 ` Linus Torvalds
2008-01-17 20:44 ` Ingo Molnar
2008-01-17 21:03 ` Andreas Herrmann3
2008-01-17 21:13 ` Ingo Molnar [this message]
2008-01-17 21:22 ` Ingo Molnar
2008-01-17 21:31 ` Siddha, Suresh B
2008-01-17 21:38 ` H. Peter Anvin
2008-01-24 20:22 ` Eric W. Biederman
2008-01-24 21:36 ` H. Peter Anvin
2008-01-17 21:42 ` Ingo Molnar
2008-01-17 22:06 ` Andreas Herrmann3
2008-01-17 22:05 ` H. Peter Anvin
2008-01-17 22:15 ` Ingo Molnar
2008-01-17 22:52 ` Andreas Herrmann3
2008-01-17 23:04 ` Venki Pallipadi
2008-01-17 23:24 ` Andreas Herrmann3
2008-01-17 23:42 ` Pallipadi, Venkatesh
2008-01-18 16:10 ` Andreas Herrmann3
2008-01-18 17:13 ` Pallipadi, Venkatesh
2008-01-18 17:33 ` Balbir Singh
2008-01-18 4:25 ` Andi Kleen
2008-01-17 21:42 ` Andreas Herrmann3
2008-01-17 22:13 ` Ingo Molnar
2008-01-17 22:16 ` Andreas Herrmann3
2008-01-17 22:26 ` Andreas Herrmann3
2008-01-17 22:35 ` Ingo Molnar
2008-01-17 23:06 ` Andreas Herrmann3
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080117211308.GA7858@elte.hu \
--to=mingo@elte.hu \
--cc=airlied@skynet.ie \
--cc=ak@muc.de \
--cc=akpm@linux-foundation.org \
--cc=andreas.herrmann3@amd.com \
--cc=arjan@infradead.org \
--cc=davej@redhat.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jesse.barnes@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=venkatesh.pallipadi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox