lkml.org 
[lkml]   [2015]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, aperture: Check for GART before accessing GART registers
On Mon, Apr 06, 2015 at 06:10:22PM -0500, Aravind Gopalakrishnan wrote:
> >So what happens if !early_pci_allowed() but the GART is present? We'll
> >set amd_northbridges.flags |= AMD_NB_GART, but won't run any of the
> >setup code in aperture_64.c, right? Is that a valid setup?
>
> It might be a valid setup. But it would work correctly only if BIOS did the
> right thing with setting up aperture space.
>
> If !early_pci_allowed() and BIOS did not setup aperture correctly, that
> would have caused problems already.
> But it has not been an issue so far right?

I think the right question to ask is:

What are we doing when there's no GART?

So what you probably want to do is:

if (!amd_gart_present())
return -ENODEV;

*before* the compound check.

Now, if we have detected a GART, i.e., amd_gart_present() is TRUE, the
code will behave as it used to behave before.

This should be the least intrusive change going forward IMHO.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--


\
 
 \ /
  Last update: 2015-04-07 15:01    [W:0.055 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site