From: Ingo Molnar <mingo@elte.hu>
To: Yinghai Lu <Yinghai.Lu@Sun.COM>
Cc: Andi Kleen <ak@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <clameter@sgi.com>,
ebiederm@xmission.com, Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86-64: disable the GART early v2
Date: Fri, 11 Jan 2008 09:14:46 +0100 [thread overview]
Message-ID: <20080111081446.GA6234@elte.hu> (raw)
In-Reply-To: <200801102354.46472.yinghai.lu@sun.com>
* Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -218,6 +218,73 @@ static __u32 __init search_agp_bridge(u32 *order, int *valid_agp)
> return 0;
> }
>
> +void __init early_gart_iommu_disable(void)
> +{
> + /*
> + * disable it in case it is enabled before, esp for kexec/kdump,
> + * previous kernel already enable that. otherwise memset called
> + * by allocate_aperture/__alloc_bootmem_nopanic cause restart.
> + * or second kernel have different position for GART hole. and new
> + * kernel could use hole as RAM that is still used by GART set by
> + * first kernel
> + */
hm, i'm wondering, instead of modifying the GART, why dont we simply
_detect_ whatever GART settings we have inherited, and propagate that
into our e820 maps? I.e. if there's inconsistency, then punch that out
from the memory maps and just dont use that memory.
that way it would not matter whether the GART settings came from a [old
or crashing] Linux kernel that has not called gart_iommu_shutdown(), or
whether it's a BIOS that has set up an aperture hole inconsistent with
the memory map it passed. (or the memory map we _think_ i tried to pass
us)
it would also be more robust to only read and do a memory map quirk
based on that, than actively trying to change the GART so early in the
bootup. Later on we have to re-enable the GART _anyway_ and have to
punch a hole for it.
and as a bonus, we would have shored up our defenses against crappy
BIOSes as well.
Ingo
next prev parent reply other threads:[~2008-01-11 8:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-11 3:14 [PATCH] x86-64: disable the GART early Yinghai Lu
2008-01-11 7:54 ` [PATCH] x86-64: disable the GART early v2 Yinghai Lu
2008-01-11 8:14 ` Ingo Molnar [this message]
2008-01-11 8:34 ` Yinghai Lu
2008-01-11 21:38 ` [PATCH] x86-64: fix e820 for GART or disable the GART early Yinghai Lu
2008-01-12 10:07 ` [PATCH] x86-64: disable the GART early v2 Yinghai Lu
2008-01-14 8:35 ` Ingo Molnar
2008-01-15 1:39 ` [PATCH] x86_64: checking aperture report for node instead of cpu Yinghai Lu
2008-01-15 13:22 ` Ingo Molnar
2008-01-15 18:31 ` [PATCH] x86_64: checking aperture report for node instead of cpu v2 Yinghai Lu
2008-01-18 13:02 ` [PATCH] x86_64: checking aperture report for node instead of?cpu v2 Ingo Molnar
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=20080111081446.GA6234@elte.hu \
--to=mingo@elte.hu \
--cc=Yinghai.Lu@Sun.COM \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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