Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729AbbDBQGn (ORCPT ); Thu, 2 Apr 2015 12:06:43 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:38491 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbbDBQGj (ORCPT ); Thu, 2 Apr 2015 12:06:39 -0400 Date: Thu, 2 Apr 2015 18:06:34 +0200 From: Ingo Molnar To: Aravind Gopalakrishnan Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, bp@suse.de, 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: <20150402160634.GB8045@gmail.com> References: <1427898728-3434-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <20150402100135.GA5210@gmail.com> <551D661D.3030000@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551D661D.3030000@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: 1640 Lines: 44 * Aravind Gopalakrishnan wrote: > On 4/2/2015 5:01 AM, Ingo Molnar wrote: > >* 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. > >In what fashion did this problem manifest itself on real systems? > > > > > > This code doesn't break on existing processors. > There are some other side effects though.. > > We get "AGP:" messages on kernel logs like this- > [ 0.000000] AGP: Node 0: aperture [bus addr 0x00000000-0x01ffffff] (32MB) > [ 0.000000] AGP: Your BIOS doesn't leave a aperture memory hole > [ 0.000000] AGP: Please enable the IOMMU option in the BIOS setup > [ 0.000000] AGP: This costs you 64MB of RAM > [ 0.000000] AGP: Mapping aperture over RAM [mem 0xd4000000-0xd7ffffff] > (65536KB) > > These are just noise on processors which have no GART. agreed. > We can avoid calling allocate_aperture() and would not have to > memblock_reserve() 64MB of RAM. > Also, we can avoid having to loop through all PCI buses, devices (twice) > searching for AGP bridge if we bail out early. Makes sense. Mind adding this info to the changelog and resend? Thanks, Ingo -- 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/