Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3018791imm; Sun, 1 Jul 2018 10:24:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK6xPgOxtnAO2LJd2NkFcv++gLki3MKHkGyW4fhRV6FVnxrbdNyLpmqZBh5InaCTjImhZWd X-Received: by 2002:a63:6849:: with SMTP id d70-v6mr18605136pgc.7.1530465876868; Sun, 01 Jul 2018 10:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530465876; cv=none; d=google.com; s=arc-20160816; b=xNBqEK79mr/JArx8kXW4yt280NYsk5VQ7+ZFg1fmqk8tBWYxyL4iPd+FsNBpoa/iuu nwJOAXbtjHlxh5tZKLp/RZQRu7YaXfsSaxJDkBnEl2VOvoOA21sF5hiwEDfvVAsc40iA SBK0cTbZtHo4TsVHMgcslmNVb7sRkeVbgWg7yTz9XJcl3n3mvm9WtpIBdd2CAlCK6Wq0 IJ4EZX5ce4ArFupEqjDDnza+02KtBKoJeijc6M8I4W1jaOnCyXVf2M90/RxRe5BzVnn6 L++Q6XFniZIe9X4pXEPjE1ckV4rwg3LRlBvNd/OUeA4u7A2kE/nRbCbaTwmCrkA6OCY7 Z1Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=IZvg9WqG32R1tXD9KrlT/5Uj+XAO7I2nqunQj1aUufQ=; b=XXOfs1UJOcmqdfaFUI3JbCEmAYGCjWicwiIxVvVhuxhM995+gPUhQcnJnYsT0UKRia q6fwvh4Z3poawf7ykiwBp/w+zs5+N6L8hHFGw9jEEC+FwaPraAQ4Wv3rdej9sTGOcSzl lgI18XrXb75CijyaUiJsdCTUhVRDBdJaM15kCh8SP3sd0BUfDdWzFsnULC3bmvZQAFdL Y97yxwScqulMX/F+CVx8Ur07UBcB9jKcTq5dy3stPhmhb1hZzlhpmJ2p6p1+CA3C/y9d QXvaXy394QB0YR78SKA/oVzMUYKw6BiIFalruiv96aBm/hhfzJChyLMgaXpcW8wpfky7 /5dw== 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 q18-v6si12133623pgt.529.2018.07.01.10.24.22; Sun, 01 Jul 2018 10:24:36 -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 S1030688AbeGARWY (ORCPT + 99 others); Sun, 1 Jul 2018 13:22:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36622 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031527AbeGAQiD (ORCPT ); Sun, 1 Jul 2018 12:38:03 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6D62992B; Sun, 1 Jul 2018 16:38:02 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Travis , Andrew Banman , Andrew Morton , Dimitri Sivanich , Linus Torvalds , Peter Zijlstra , Russ Anderson , Thomas Gleixner , dan.j.williams@intel.com, jgross@suse.com, kirill.shutemov@linux.intel.com, mhocko@suse.com, Ingo Molnar Subject: [PATCH 4.17 005/220] x86/platform/UV: Add kernel parameter to set memory block size Date: Sun, 1 Jul 2018 18:20:29 +0200 Message-Id: <20180701160908.520467416@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: mike.travis@hpe.com commit d7609f4210cb716c11abfe2bfb5997191095d00b upstream. Add a kernel parameter that allows setting UV memory block size. This is to provide an adjustment for new forms of PMEM and other DIMM memory that might require alignment restrictions other than scanning the global address table for the required minimum alignment. The value set will be further adjusted by both the GAM range table scan as well as restrictions imposed by set_memory_block_size_order(). Signed-off-by: Mike Travis Reviewed-by: Andrew Banman Cc: Andrew Morton Cc: Dimitri Sivanich Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Cc: dan.j.williams@intel.com Cc: jgross@suse.com Cc: kirill.shutemov@linux.intel.com Cc: mhocko@suse.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/lkml/20180524201711.854849120@stormcage.americas.sgi.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/apic/x2apic_uv_x.c | 11 +++++++++++ 1 file changed, 11 insertions(+) --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -396,6 +396,17 @@ EXPORT_SYMBOL(uv_hub_info_version); /* Default UV memory block size is 2GB */ static unsigned long mem_block_size = (2UL << 30); +/* Kernel parameter to specify UV mem block size */ +static int parse_mem_block_size(char *ptr) +{ + unsigned long size = memparse(ptr, NULL); + + /* Size will be rounded down by set_block_size() below */ + mem_block_size = size; + return 0; +} +early_param("uv_memblksize", parse_mem_block_size); + static __init int adj_blksize(u32 lgre) { unsigned long base = (unsigned long)lgre << UV_GAM_RANGE_SHFT;