Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3487298imm; Sun, 13 May 2018 12:30:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpr2tFfBzQJxzNy8hW4JS6HutP9mz+W0kJ9SOiTNS6AtrggFAO/8mw6Hqiie3oOf/nZZHHw X-Received: by 2002:a65:661a:: with SMTP id w26-v6mr6100237pgv.151.1526239832926; Sun, 13 May 2018 12:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526239832; cv=none; d=google.com; s=arc-20160816; b=N/e5pQXLjUNXXCechgNiBIe1nKpgliTHm7JVb+7q2kZgnWeNB6SK4zBXgqWfjTHAYu jgPtzKSVHrCTEeCDleXPv9d9ESAuqubYJBZL2Zoaq/gCTfNQ0uBrt6d1FSH9QEmt1jgI rGJTyz9OeeV0MzVDaAMpXwZICrMRftd7BQRdpV19t1/jqYv0hG5cXOYzgd6KVMHBGzMf g9lTDRiqiXmiEPYJXICzNJ1cS1l1BkIAECVafLJgp3k9Y3UP8uqAtPGo1eYtD6lH1+Om LTwGZGv3+N5tjZ/jROC9KtSw+VJ7KzHlcmVFS2PhfQOzAAz9E74nIqn+NFVMhZ02X7Po 1+lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=PBTeiu84jxb5gRgkj6GH5sBGU0fAyCIMLB7iYP5LtAs=; b=cuPp3KdxAW2yRExV/zaNwi2EMfQSAqE8lQBtZZg9/kkHfGEb1Kmq6oKp+aLZUWq70P yprAw0l0BVnoO9P3ccYb2BpeNG3jq/k4Jghegt2hO5hmhz/WtkmWB58MPyWogp859lzj /74VZYWJxDwa6cV4D95oHxk7m3IUg9Go8qCYe99eDgLnMF0U23HgpWkFSEbfrueYS7Kj vSd6tmCu1tcWjE1zS105cEQmkOq6HVwCnsQ9goNnXs076HS0X5tRUf0u8rpjUMq1L43T /zfl+7V1XZor5hya8hS6kEXlYUJGh7IjhMqTc1uxWGyKD9qJFDpdDlh6YGmml5lv4c+u /gsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a64-v6si6477919pge.386.2018.05.13.12.30.17; Sun, 13 May 2018 12:30:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbeEMT22 (ORCPT + 99 others); Sun, 13 May 2018 15:28:28 -0400 Received: from terminus.zytor.com ([198.137.202.136]:36577 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901AbeEMT21 (ORCPT ); Sun, 13 May 2018 15:28:27 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w4DJSK2n450957 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 13 May 2018 12:28:20 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w4DJSKnH450953; Sun, 13 May 2018 12:28:20 -0700 Date: Sun, 13 May 2018 12:28:20 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Joe Perches Message-ID: Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, joe@perches.com, mingo@kernel.org Reply-To: tglx@linutronix.de, joe@perches.com, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cleanups] x86/mtrr: Rename main.c to mtrr.c and remove duplicate prefixes Git-Commit-ID: e6d8c84a58380030457759ad6085f3792a76b2ce X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e6d8c84a58380030457759ad6085f3792a76b2ce Gitweb: https://git.kernel.org/tip/e6d8c84a58380030457759ad6085f3792a76b2ce Author: Joe Perches AuthorDate: Thu, 10 May 2018 08:45:31 -0700 Committer: Thomas Gleixner CommitDate: Sun, 13 May 2018 21:25:18 +0200 x86/mtrr: Rename main.c to mtrr.c and remove duplicate prefixes Kbuild uses the first file as the name for KBUILD_MODNAME. mtrr uses main.c as its first file, so rename that file to mtrr.c and fixup the Makefile. Remove the now duplicate "mtrr: " prefixes from the logging calls. Signed-off-by: Joe Perches Signed-off-by: Thomas Gleixner Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/ae1fa81a0d1fad87571967b91ea90f70f486e853.1525964384.git.joe@perches.com --- arch/x86/kernel/cpu/mtrr/Makefile | 2 +- arch/x86/kernel/cpu/mtrr/{main.c => mtrr.c} | 33 ++++++++++++++--------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/Makefile b/arch/x86/kernel/cpu/mtrr/Makefile index ad9e5ed81181..2ad9107ee980 100644 --- a/arch/x86/kernel/cpu/mtrr/Makefile +++ b/arch/x86/kernel/cpu/mtrr/Makefile @@ -1,3 +1,3 @@ -obj-y := main.o if.o generic.o cleanup.o +obj-y := mtrr.o if.o generic.o cleanup.o obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/mtrr.c similarity index 96% rename from arch/x86/kernel/cpu/mtrr/main.c rename to arch/x86/kernel/cpu/mtrr/mtrr.c index 7468de429087..0c4f4fba9ec1 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/mtrr.c @@ -100,7 +100,7 @@ static int have_wrcomb(void) if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS && dev->device == PCI_DEVICE_ID_SERVERWORKS_LE && dev->revision <= 5) { - pr_info("mtrr: Serverworks LE rev < 6 detected. Write-combining disabled.\n"); + pr_info("Serverworks LE rev < 6 detected. Write-combining disabled.\n"); pci_dev_put(dev); return 0; } @@ -110,7 +110,7 @@ static int have_wrcomb(void) */ if (dev->vendor == PCI_VENDOR_ID_INTEL && dev->device == PCI_DEVICE_ID_INTEL_82451NX) { - pr_info("mtrr: Intel 450NX MMC detected. Write-combining disabled.\n"); + pr_info("Intel 450NX MMC detected. Write-combining disabled.\n"); pci_dev_put(dev); return 0; } @@ -312,24 +312,24 @@ int mtrr_add_page(unsigned long base, unsigned long size, return error; if (type >= MTRR_NUM_TYPES) { - pr_warn("mtrr: type: %u invalid\n", type); + pr_warn("type: %u invalid\n", type); return -EINVAL; } /* If the type is WC, check that this processor supports it */ if ((type == MTRR_TYPE_WRCOMB) && !have_wrcomb()) { - pr_warn("mtrr: your processor doesn't support write-combining\n"); + pr_warn("your processor doesn't support write-combining\n"); return -ENOSYS; } if (!size) { - pr_warn("mtrr: zero sized request\n"); + pr_warn("zero sized request\n"); return -EINVAL; } if ((base | (base + size - 1)) >> (boot_cpu_data.x86_phys_bits - PAGE_SHIFT)) { - pr_warn("mtrr: base or size exceeds the MTRR width\n"); + pr_warn("base or size exceeds the MTRR width\n"); return -EINVAL; } @@ -360,8 +360,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, } else if (types_compatible(type, ltype)) continue; } - pr_warn("mtrr: 0x%lx000,0x%lx000 overlaps existing" - " 0x%lx000,0x%lx000\n", base, size, lbase, + pr_warn("0x%lx000,0x%lx000 overlaps existing 0x%lx000,0x%lx000\n", base, size, lbase, lsize); goto out; } @@ -369,7 +368,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, if (ltype != type) { if (types_compatible(type, ltype)) continue; - pr_warn("mtrr: type mismatch for %lx000,%lx000 old: %s new: %s\n", + pr_warn("type mismatch for %lx000,%lx000 old: %s new: %s\n", base, size, mtrr_attrib_to_str(ltype), mtrr_attrib_to_str(type)); goto out; @@ -395,7 +394,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, } } } else { - pr_info("mtrr: no more MTRRs available\n"); + pr_info("no more MTRRs available\n"); } error = i; out: @@ -407,8 +406,8 @@ int mtrr_add_page(unsigned long base, unsigned long size, static int mtrr_check(unsigned long base, unsigned long size) { if ((base & (PAGE_SIZE - 1)) || (size & (PAGE_SIZE - 1))) { - pr_warn("mtrr: size and base must be multiples of 4 kiB\n"); - pr_debug("mtrr: size: 0x%lx base: 0x%lx\n", size, base); + pr_warn("size and base must be multiples of 4 kiB\n"); + pr_debug("size: 0x%lx base: 0x%lx\n", size, base); dump_stack(); return -1; } @@ -499,22 +498,22 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) } } if (reg < 0) { - pr_debug("mtrr: no MTRR for %lx000,%lx000 found\n", + pr_debug("no MTRR for %lx000,%lx000 found\n", base, size); goto out; } } if (reg >= max) { - pr_warn("mtrr: register: %d too big\n", reg); + pr_warn("register: %d too big\n", reg); goto out; } mtrr_if->get(reg, &lbase, &lsize, <ype); if (lsize < 1) { - pr_warn("mtrr: MTRR %d not used\n", reg); + pr_warn("MTRR %d not used\n", reg); goto out; } if (mtrr_usage_table[reg] < 1) { - pr_warn("mtrr: reg: %d has count=0\n", reg); + pr_warn("reg: %d has count=0\n", reg); goto out; } if (--mtrr_usage_table[reg] < 1) @@ -775,7 +774,7 @@ void __init mtrr_bp_init(void) } if (!mtrr_enabled()) { - pr_info("MTRR: Disabled\n"); + pr_info("Disabled\n"); /* * PAT initialization relies on MTRR's rendezvous handler.