From: Borislav Petkov <bp@alien8.de>
To: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: mingo@redhat.com, bp@suse.de, linux-kernel@vger.kernel.org,
Suravee.Suthikulpanit@amd.com, Joerg Rodel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
Bjorn Helgaas <bhelgaas@google.com>, x86-ml <x86@kernel.org>
Subject: Re: [PATCH V2] x86/gart: Check for GART support before accessing GART registers
Date: Wed, 8 Apr 2015 17:25:22 +0200 [thread overview]
Message-ID: <20150408152522.GH3611@pd.tnic> (raw)
In-Reply-To: <1428443197-3834-1-git-send-email-Aravind.Gopalakrishnan@amd.com>
On Tue, Apr 07, 2015 at 04:46:37PM -0500, Aravind Gopalakrishnan wrote:
> GART registers are not present in newer processors (Fam15h, Model 10h
> and later). So, avoid accesses to GART registers in PCI config
> space by returning early in early_gart_iommu_check() and
> gart_iommu_hole_init() if GART is not available.
>
> Current code doesn't break on existing processors but there are some
> side effects:
>
> We get bogus AGP aperture messages which are simply noise on
> GART-less processors:
>
> AGP: Node 0: aperture [bus addr 0x00000000-0x01ffffff] (32MB)
> AGP: Your BIOS doesn't leave aperture memory hole
> AGP: Please enable the IOMMU option in the BIOS setup
> AGP: This costs you 64MB of RAM
> AGP: Mapping aperture over RAM [mem 0xd4000000-0xd7ffffff]
>
> We can avoid calling allocate_aperture() and would not have to
> wastefully reserve 64MB of RAM with memblock_reserve(). Also, we can
> avoid having to loop through all PCI buses and devices twice, searching
> for a non-existent AGP bridge if we bail out early.
>
> Refactoring the family check used in amd_nb.c into an inline function
> so we can use it here as well as in amd_nb.c
>
> Fix some typos while at it.
> Tested the patch on Fam10h and Fam15h Model 00h-fh and this code
> runs fine. On Fam15h Model 60h-6fh and on Fam16h, we bail early
> as they don't have GART.
>
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> Reviewed-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
> Cc: Joerg Rodel <joro@8bytes.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: x86-ml <x86@kernel.org>
> ---
> Changes in V2:
> - move amd_gart_present() before any other checks as it's least intrusive (per Boris)
> - fix typos in code and commit message (per Ingo)
> - minor change to subject line (per Boris' change)
> - Link to V1:http://marc.info/?l=linux-kernel&m=142792069809730&w=2
>
> arch/x86/include/asm/amd_nb.h | 11 +++++++++++
> arch/x86/kernel/amd_nb.c | 4 +---
> arch/x86/kernel/aperture_64.c | 8 +++++++-
> 3 files changed, 19 insertions(+), 4 deletions(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
next prev parent reply other threads:[~2015-04-08 15:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 21:46 [PATCH V2] x86/gart: Check for GART support before accessing GART registers Aravind Gopalakrishnan
2015-04-08 15:25 ` Borislav Petkov [this message]
2015-05-06 10:13 ` [tip:x86/cpu] " tip-bot for Aravind Gopalakrishnan
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=20150408152522.GH3611@pd.tnic \
--to=bp@alien8.de \
--cc=Aravind.Gopalakrishnan@amd.com \
--cc=Suravee.Suthikulpanit@amd.com \
--cc=bhelgaas@google.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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