Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2488582imm; Sat, 30 Jun 2018 22:06:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeNaQOXV09fbMNypussVAhi5DnC6XwyvAOoxXBrGswNDnYV327kqwdyxRTbuOiYJoNnCboE X-Received: by 2002:a62:e83:: with SMTP id 3-v6mr20477269pfo.63.1530421579666; Sat, 30 Jun 2018 22:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530421579; cv=none; d=google.com; s=arc-20160816; b=oixub9hHz+sNgBAB3UxcdqIVma5JELpX5JR6/0wNNVSi4niRlR9DaRBoP87oj7oKwy vN87dE0XsbVD7NOvykA8k2mbwc4YZ8TIZllom6Ey67wkS1+R+qDWZ4cb4aag+ZlLpz2N qrgRhwxHY6EREy5ofgThQeO2qojSha/HhvGVM4sIa+5Nkn9lJMVuiuRIPm8g7gSZvMh6 eW6HEhRA38uyE81w8YYQS6TIXq6HBRz5RLY+Imk7F0hvHgC/KiX4x761Il2avoavIGTV PLF6vGaUV8Lk+1FcKnmhYXzZf9AiuQkx/47Nkm+z48jl4mTpdyizT2r1Yewzbg8Ei1rD wBLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=oFaVUU7XlmIwe5CFggc9c/NH/KMNxIk3UnnmRMq2CKg=; b=epYXN8To3E9tINoap8grBQYADqSkYUsUrQOau+u6BU8OlKZidB8iOjA9epn2F8aw7V 0HSHzjiVYg+BZlngNqQk7Tfwo0BkWZ44jExfxmEH2l3+xOnrSh9kQIZA4sBeWr+HZvgp 8XDSsBfwR89tct5WuI5Ul8zrShzJ9GW+VOkKP/32KCgB6v3Q1Qp03biCuYFLHs117vv7 8bt3Z1uN/Zvs/8XoZW/skUINjsu75ecWinmgtLfb7p6tg6ZD6ZHW9Odvl4nOGOfOoo6V 8Rr7Y9EYgvUf056NclFlpuq/BPGCWa24Em2HPGnyqmr8jt6dBznIDTBJvX+/RtydYByu lAjw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n64-v6si12866934pgn.247.2018.06.30.22.06.05; Sat, 30 Jun 2018 22:06:19 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbeGAFDs (ORCPT + 99 others); Sun, 1 Jul 2018 01:03:48 -0400 Received: from mga03.intel.com ([134.134.136.65]:48739 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751339AbeGAFDW (ORCPT ); Sun, 1 Jul 2018 01:03:22 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2018 22:03:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,293,1526367600"; d="scan'208";a="241698246" Received: from rchatre-s.jf.intel.com ([10.54.70.76]) by fmsmga005.fm.intel.com with ESMTP; 30 Jun 2018 22:03:21 -0700 From: Reinette Chatre To: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, vikas.shivappa@linux.intel.com Cc: gavin.hindman@intel.com, jithu.joseph@intel.com, dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre Subject: [PATCH 1/2] x86/intel_rdt: Move pseudo_lock_region_clear Date: Sat, 30 Jun 2018 22:03:02 -0700 Message-Id: X-Mailer: git-send-email 2.17.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 @@ static int pseudo_lock_cstates_constrain(struct pseudo_lock_region *plr) 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 -- 2.17.0