Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752556AbbDBHBM (ORCPT ); Thu, 2 Apr 2015 03:01:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41793 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbbDBHBJ (ORCPT ); Thu, 2 Apr 2015 03:01:09 -0400 Date: Thu, 2 Apr 2015 08:59:07 +0200 From: Borislav Petkov To: Aravind Gopalakrishnan Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org, Suravee.Suthikulpanit@amd.com, joro@8bytes.org Subject: Re: [PATCH] x86, aperture: Check for GART before accessing GART registers Message-ID: <20150402065907.GC4579@pd.tnic> References: <1427898728-3434-1-git-send-email-Aravind.Gopalakrishnan@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1427898728-3434-1-git-send-email-Aravind.Gopalakrishnan@amd.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1286 Lines: 34 On Wed, Apr 01, 2015 at 09:32:08AM -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. > > Refactoring the family check used in amd_nb into an inline function > so we can use it here as well as in amd_nb.c > > 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 > Reviewed-by: Suravee Suthikulpanit > --- > arch/x86/include/asm/amd_nb.h | 11 +++++++++++ > arch/x86/kernel/amd_nb.c | 4 +--- > arch/x86/kernel/aperture_64.c | 4 ++-- > 3 files changed, 14 insertions(+), 5 deletions(-) Applied, thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/