[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5523125E.2010605@amd.com>
Date: Mon, 6 Apr 2015 18:10:22 -0500
From: Aravind Gopalakrishnan <aravind.gopalakrishnan@....com>
To: Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...e.de>
CC: <tglx@...utronix.de>, <mingo@...hat.com>, <hpa@...or.com>,
<x86@...nel.org>, <bhelgaas@...gle.com>,
<linux-kernel@...r.kernel.org>, <Suravee.Suthikulpanit@....com>,
<joro@...tes.org>
Subject: Re: [PATCH] x86, aperture: Check for GART before accessing GART registers
On 4/2/2015 1:19 PM, Ingo Molnar wrote:
>
>> + if (amd_gart_present())
>> amd_northbridges.flags |= AMD_NB_GART;
>>
>> /*
>> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
>> index 76164e173a24..1cb170b06853 100644
>> --- a/arch/x86/kernel/aperture_64.c
>> +++ b/arch/x86/kernel/aperture_64.c
>> @@ -262,7 +262,7 @@ void __init early_gart_iommu_check(void)
>> u64 aper_base = 0, last_aper_base = 0;
>> int aper_enabled = 0, last_aper_enabled = 0, last_valid = 0;
>>
>> - if (!early_pci_allowed())
>> + if (!early_pci_allowed() || !amd_gart_present())
>> return;
>>
>> /* This is mostly duplicate of iommu_hole_init */
>> @@ -356,7 +356,7 @@ int __init gart_iommu_hole_init(void)
>> int i, node;
>>
>> if (gart_iommu_aperture_disabled || !fix_aperture ||
>> - !early_pci_allowed())
>> + !early_pci_allowed() || !amd_gart_present())
>> return -ENODEV;
> 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?
Thanks,
-Aravind.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists