From patchwork Tue Apr 29 23:55:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 4089811 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 06A5D9F271 for ; Tue, 29 Apr 2014 23:55:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 253EB2021B for ; Tue, 29 Apr 2014 23:55:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E139520222 for ; Tue, 29 Apr 2014 23:55:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755325AbaD2Xzi (ORCPT ); Tue, 29 Apr 2014 19:55:38 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]:35735 "EHLO mail-ig0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755364AbaD2Xze (ORCPT ); Tue, 29 Apr 2014 19:55:34 -0400 Received: by mail-ig0-f172.google.com with SMTP id hn18so6807191igb.17 for ; Tue, 29 Apr 2014 16:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=ElCj17lKgoHlHbbQ8fOVuDZ/if4sEy+SQzCbwfSImuA=; b=iFioQcsg0R4a/vff143LGWJokdDbnEvci01w6glRuhhFqCCDxr2mVNebLoKuQsTawv 3SuohIeRnw6M36yzeb9idENSzB2mAo+0sW7hIMziOc2PCmKKjld8hwBlLoFiIA5dP+74 Gb5WBxZpqcn57MCF+grKSkE1e+14kqFDkavlhwI9GLr2imGY11sw8JXyGf9+onWhK/3r NRj9WHL/OsP57tj1jZxf1iWV5DmQgxZn3nrtQgAf9Q2epjfmu3as4he325oZRolsZ3Fy PhPuZ/cJexdrZ+Jpr6qS32l1SilKkBFfLqeaihLSTu0j6OltyMh5p6UYh99RW+mHqHSO Z5Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=ElCj17lKgoHlHbbQ8fOVuDZ/if4sEy+SQzCbwfSImuA=; b=UKO4a7cFQgPAspIpOCkk82zGCe1E9m2g3NMvIXZbp6VMPnGSWYhSHD0/oqhWDzdFMF ITPKH8rNBvq/lSD/pidO9pXI58uabwq8Xclu5BwB38brOHFZYfWCZb8Rf34gLQoMifko LOVptp38IzxgrCGzDesCOmLSKg1oXRdlpsm9ALE8nOA0IgUjVIF60R3/RF3xQVBm0Naq ruk1p6SrsgzWs0IyRGeA6o0B37EBBH5HpyZHQDVNvdAHcDTpSugMMgYQN3/XdokUarys b2jCMp3/djz1NpDTPnlyB5lqGAUS9xG1uIdDM+uvDVmiz5gBklGG9qvp76+arX7yBt8o 17Ww== X-Gm-Message-State: ALoCoQm3LAOF8VgNd22lO2RACBnJHEJHWGDSwBvT8k9hik6byc9e+uYmwWfiCb4PYQAgu/Mht1PpH+0DX5qaRTbsrRIAZIVYia8V3e3jgCObJTlH0pjmgf6yJg5KLd9MjNK48MySrCZ/uKf0wTfU+dkSkQHHm8+r714DW/hgG15VEfuiJXs6dzoCM2oUFJZSpKfPuk5Q+wEnnrZjAP8B+/sRUsAigjXhvUYwf2/fOITMIu5NOQ4G4bM= X-Received: by 10.50.147.9 with SMTP id tg9mr34718517igb.31.1398815733820; Tue, 29 Apr 2014 16:55:33 -0700 (PDT) Received: from localhost ([172.16.51.53]) by mx.google.com with ESMTPSA id n5sm11636608igr.0.2014.04.29.16.55.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 29 Apr 2014 16:55:33 -0700 (PDT) Subject: [PATCH v2 1/2] x86/gart: Replace printk() with pr_info() To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: David Airlie , x86@kernel.org, Ingo Molnar , linux-kernel@vger.kernel.org Date: Tue, 29 Apr 2014 17:55:32 -0600 Message-ID: <20140429235532.11112.48857.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20140429235015.11112.79459.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <20140429235015.11112.79459.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace printk() with pr_info(), pr_err(), etc. Define pr_fmt() to prefix output with "AGP: ". No functional change except the addition of "AGP: " prefix in dmesg output. Signed-off-by: Bjorn Helgaas --- arch/x86/kernel/aperture_64.c | 54 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 28 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 9fa8aa051f54..b11edf2b656d 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c @@ -10,6 +10,8 @@ * * Copyright 2002 Andi Kleen, SuSE Labs. */ +#define pr_fmt(fmt) "AGP: " fmt + #include #include #include @@ -75,14 +77,13 @@ static u32 __init allocate_aperture(void) addr = memblock_find_in_range(GART_MIN_ADDR, GART_MAX_ADDR, aper_size, aper_size); if (!addr) { - printk(KERN_ERR - "Cannot allocate aperture memory hole (%lx,%uK)\n", - addr, aper_size>>10); + pr_err("Cannot allocate aperture memory hole (%lx,%uK)\n", + addr, aper_size>>10); return 0; } memblock_reserve(addr, aper_size); - printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n", - aper_size >> 10, addr); + pr_info("Mapping aperture over %d KB of RAM @ %lx\n", aper_size >> 10, + addr); register_nosave_region(addr >> PAGE_SHIFT, (addr+aper_size) >> PAGE_SHIFT); @@ -126,10 +127,10 @@ static u32 __init read_agp(int bus, int slot, int func, int cap, u32 *order) u64 aper; u32 old_order; - printk(KERN_INFO "AGP bridge at %02x:%02x:%02x\n", bus, slot, func); + pr_info("AGP bridge at %02x:%02x:%02x\n", bus, slot, func); apsizereg = read_pci_config_16(bus, slot, func, cap + 0x14); if (apsizereg == 0xffffffff) { - printk(KERN_ERR "APSIZE in AGP bridge unreadable\n"); + pr_err("APSIZE in AGP bridge unreadable\n"); return 0; } @@ -153,16 +154,16 @@ static u32 __init read_agp(int bus, int slot, int func, int cap, u32 *order) * On some sick chips, APSIZE is 0. It means it wants 4G * so let double check that order, and lets trust AMD NB settings: */ - printk(KERN_INFO "Aperture from AGP @ %Lx old size %u MB\n", - aper, 32 << old_order); + pr_info("Aperture from AGP @ %Lx old size %u MB\n", + aper, 32 << old_order); if (aper + (32ULL<<(20 + *order)) > 0x100000000ULL) { - printk(KERN_INFO "Aperture size %u MB (APSIZE %x) is not right, using settings from NB\n", - 32 << *order, apsizereg); + pr_info("Aperture size %u MB (APSIZE %x) is not right, using settings from NB\n", + 32 << *order, apsizereg); *order = old_order; } - printk(KERN_INFO "Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n", - aper, 32 << *order, apsizereg); + pr_info("Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n", aper, + 32 << *order, apsizereg); if (!aperture_valid(aper, (32*1024*1024) << *order, 32<<20)) return 0; @@ -218,7 +219,7 @@ static u32 __init search_agp_bridge(u32 *order, int *valid_agp) } } } - printk(KERN_INFO "No AGP bridge found\n"); + pr_info("No AGP bridge found\n"); return 0; } @@ -310,7 +311,7 @@ void __init early_gart_iommu_check(void) if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) { /* reserve it, so we can reuse it in second kernel */ - printk(KERN_INFO "update e820 for GART\n"); + pr_info("update e820 for GART\n"); e820_add_region(aper_base, aper_size, E820_RESERVED); update_e820(); } @@ -354,7 +355,7 @@ int __init gart_iommu_hole_init(void) !early_pci_allowed()) return -ENODEV; - printk(KERN_INFO "Checking aperture...\n"); + pr_info("Checking aperture...\n"); if (!fallback_aper_force) agp_aper_base = search_agp_bridge(&agp_aper_order, &valid_agp); @@ -395,8 +396,8 @@ int __init gart_iommu_hole_init(void) aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff; aper_base <<= 25; - printk(KERN_INFO "Node %d: aperture @ %Lx size %u MB\n", - node, aper_base, aper_size >> 20); + pr_info("Node %d: aperture @ %Lx size %u MB\n", + node, aper_base, aper_size >> 20); node++; if (!aperture_valid(aper_base, aper_size, 64<<20)) { @@ -407,9 +408,9 @@ int __init gart_iommu_hole_init(void) if (!no_iommu && max_pfn > MAX_DMA32_PFN && !printed_gart_size_msg) { - printk(KERN_ERR "you are using iommu with agp, but GART size is less than 64M\n"); - printk(KERN_ERR "please increase GART size in your BIOS setup\n"); - printk(KERN_ERR "if BIOS doesn't have that option, contact your HW vendor!\n"); + pr_err("you are using iommu with agp, but GART size is less than 64M\n"); + pr_err("please increase GART size in your BIOS setup\n"); + pr_err("if BIOS doesn't have that option, contact your HW vendor!\n"); printed_gart_size_msg = 1; } } else { @@ -446,13 +447,10 @@ out: force_iommu || valid_agp || fallback_aper_force) { - printk(KERN_INFO - "Your BIOS doesn't leave a aperture memory hole\n"); - printk(KERN_INFO - "Please enable the IOMMU option in the BIOS setup\n"); - printk(KERN_INFO - "This costs you %d MB of RAM\n", - 32 << fallback_aper_order); + pr_info("Your BIOS doesn't leave a aperture memory hole\n"); + pr_info("Please enable the IOMMU option in the BIOS setup\n"); + pr_info("This costs you %d MB of RAM\n", + 32 << fallback_aper_order); aper_order = fallback_aper_order; aper_alloc = allocate_aperture();