Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp805803imm; Mon, 2 Jul 2018 23:45:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcJo/7Kjn84H4k6gpToLa/B0fMassOfAjaAG20Ysp3jmVCTPrEvVRIspMaatjv1FLs2T03X X-Received: by 2002:a17:902:b581:: with SMTP id a1-v6mr4405801pls.338.1530600310272; Mon, 02 Jul 2018 23:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530600310; cv=none; d=google.com; s=arc-20160816; b=qZCxVPKMEhYik960DMh1rRXcgaH8Iqw7F4waI26gDB/HHL8L0IM1EcoyWPpvkpEp5a azDOjP2utdCRjHnpB/mYrET5PbRZ+gwfA6eCc7XtN36CEW33irKhPHgQtX3WZIJDKf/S qner4PsJq6k7kBHVhJlYGJg6WttywpPcYwM6iqGp6IVYj+Tpp1imA/FGt+g29Zykchk/ bFT5cytFFQ9HHeuBVWHUlgQGKb5dWzqRHDpCuGPSAdER/f/dH3uqge9L2zDtnCqAxdSu 48Cbb+hfr/kBOpfZtQWdrsJ4QCV8HFHHcSHislTX2ij06G51kEwnqS8WOV2rBUPFfXd6 AKvA== 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=EIqx3AkeurDHgXtqidF7k2U1R6/fQM/yxPoEyUNp3dk=; b=GL8dIMrYDin4xjzAMPvLK6D5sG6dHR0mKexn83Ru0JN9kyK7nfCBYb1CKNUgGLn4fo 0t6SQXStgD410FDBGTQYDPfqzPh0wdodiMpo9TDh4ru9PWJankIssFu97cJQ9UZtALP4 KKnDx/3FrZ815tPf6ab3sbT4E0PBDfd2r1h4RvtXglfMu4fBgbfxf2yQSjD0w0rqzATJ tn1Kfq96+paa2aQk/4QJL7/nQUlcaxFVRb6Gt+CCNaJoJRHzCS8gv1IYIpiJStb++u6F s2MbeDP5Qx8Ekr+c9XHUI2LiwUq7i3xn0ixFvrBV0dl4wHTZjSpbkyvciZyMhxzAkApk 3ZNQ== 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 az9-v6si384055plb.454.2018.07.02.23.44.55; Mon, 02 Jul 2018 23:45:10 -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 S1753105AbeGCGnE (ORCPT + 99 others); Tue, 3 Jul 2018 02:43:04 -0400 Received: from terminus.zytor.com ([198.137.202.136]:56103 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbeGCGnC (ORCPT ); Tue, 3 Jul 2018 02:43:02 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w636gq13182621 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Jul 2018 23:42:52 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w636gqpT182618; Mon, 2 Jul 2018 23:42:52 -0700 Date: Mon, 2 Jul 2018 23:42:52 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Reinette Chatre Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, reinette.chatre@intel.com Reply-To: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, reinette.chatre@intel.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cache] x86/intel_rdt: Move pseudo_lock_region_clear() Git-Commit-ID: ce730f1cc1255be152c879a2bc5f295d341d8036 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: ce730f1cc1255be152c879a2bc5f295d341d8036 Gitweb: https://git.kernel.org/tip/ce730f1cc1255be152c879a2bc5f295d341d8036 Author: Reinette Chatre AuthorDate: Sat, 30 Jun 2018 22:03:02 -0700 Committer: Thomas Gleixner CommitDate: Tue, 3 Jul 2018 08:38:39 +0200 x86/intel_rdt: Move pseudo_lock_region_clear() The pseudo_lock_region_clear() function is moved to earlier in the file in preparation for its use in functions that currently appear before it. No functional change. Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: vikas.shivappa@linux.intel.com Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/ef098ec2a45501e23792289bff80ae3152141e2f.1530421026.git.reinette.chatre@intel.com --- arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c index 6e83f61552a5..1860ec10302d 100644 --- a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c +++ b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c @@ -246,6 +246,29 @@ out_err: return ret; } +/** + * pseudo_lock_region_clear - Reset pseudo-lock region data + * @plr: pseudo-lock region + * + * All content of the pseudo-locked region is reset - any memory allocated + * freed. + * + * Return: void + */ +static void pseudo_lock_region_clear(struct pseudo_lock_region *plr) +{ + plr->size = 0; + plr->line_size = 0; + kfree(plr->kmem); + plr->kmem = NULL; + plr->r = NULL; + if (plr->d) + plr->d->plr = NULL; + plr->d = NULL; + plr->cbm = 0; + plr->debugfs_dir = NULL; +} + /** * pseudo_lock_region_init - Initialize pseudo-lock region information * @plr: pseudo-lock region @@ -318,29 +341,6 @@ static int pseudo_lock_init(struct rdtgroup *rdtgrp) return 0; } -/** - * pseudo_lock_region_clear - Reset pseudo-lock region data - * @plr: pseudo-lock region - * - * All content of the pseudo-locked region is reset - any memory allocated - * freed. - * - * Return: void - */ -static void pseudo_lock_region_clear(struct pseudo_lock_region *plr) -{ - plr->size = 0; - plr->line_size = 0; - kfree(plr->kmem); - plr->kmem = NULL; - plr->r = NULL; - if (plr->d) - plr->d->plr = NULL; - plr->d = NULL; - plr->cbm = 0; - plr->debugfs_dir = NULL; -} - /** * pseudo_lock_region_alloc - Allocate kernel memory that will be pseudo-locked * @plr: pseudo-lock region