From patchwork Thu Nov 6 04:50:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel J Blueman X-Patchwork-Id: 5239091 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0CF96C11AC for ; Thu, 6 Nov 2014 04:52:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42A04201B4 for ; Thu, 6 Nov 2014 04:52:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66FA320158 for ; Thu, 6 Nov 2014 04:52:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751415AbaKFEwZ (ORCPT ); Wed, 5 Nov 2014 23:52:25 -0500 Received: from numascale.com ([213.162.240.84]:33564 "EHLO numascale.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbaKFEwY (ORCPT ); Wed, 5 Nov 2014 23:52:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=numascale.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=6I42ti+IgAixPTxo69C1T1lmj4DgmOOBVPWwVurQSUY=; b=uPZb1L6PYiXJbTDBWIHg1RU5TP+2T39tQ72KSbQ7HM4ISvkP6xngFkD63n0fs2nzkoM3B+17nOMxjNpOdaWxVJHQK00YSw/B+Rey/NRR7tjvpKwfQdZbsjSw+s75ijQSeOu+/SGMEgwPYrqIDq+q2/3t/gM0m4BWDiDgTihmEd8=; Received: from [115.42.131.38] (port=41329 helo=meiko.int.numascale.com) by cpanel21.proisp.no with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.84) (envelope-from ) id 1XmF3O-003cAV-QE; Thu, 06 Nov 2014 05:52:15 +0100 From: Daniel J Blueman To: Thomas Gleixner , Ingo Molnar , Yinghai Lu Cc: Daniel J Blueman , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Steffen Persvold , "H. Peter Anvin" , Bjorn Helgaas Subject: [PATCH] x86: Drop redundant memory-block sizing code Date: Thu, 6 Nov 2014 12:50:14 +0800 Message-Id: <1415249414-20888-1-git-send-email-daniel@numascale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel21.proisp.no X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - numascale.com X-Get-Message-Sender-Via: cpanel21.proisp.no: authenticated_id: daniel@numascale.com X-Source: X-Source-Args: X-Source-Dir: 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_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 Drop the unused code from selecting a fixed memory block size of 2GB on large-memory x86-64 systems. Signed-off-by: Daniel J Blueman --- arch/x86/mm/init_64.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index ebca30f..09c0567 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -1243,28 +1243,12 @@ int in_gate_area_no_mm(unsigned long addr) static unsigned long probe_memory_block_size(void) { - /* start from 2g */ - unsigned long bz = 1UL<<31; - if (totalram_pages >= (64ULL << (30 - PAGE_SHIFT))) { pr_info("Using 2GB memory block size for large-memory system\n"); return 2UL * 1024 * 1024 * 1024; } - /* less than 64g installed */ - if ((max_pfn << PAGE_SHIFT) < (16UL << 32)) - return MIN_MEMORY_BLOCK_SIZE; - - /* get the tail size */ - while (bz > MIN_MEMORY_BLOCK_SIZE) { - if (!((max_pfn << PAGE_SHIFT) & (bz - 1))) - break; - bz >>= 1; - } - - printk(KERN_DEBUG "memory block size : %ldMB\n", bz >> 20); - - return bz; + return MIN_MEMORY_BLOCK_SIZE; } static unsigned long memory_block_size_probed;