Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp196589ybs; Tue, 26 May 2020 07:05:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKJ74dK5uzO1FH8XWG/vb9wE8wkzxnxzZY6ShLiEPyyo6Cw8fknZcrtXZUEICuIuf1mUEY X-Received: by 2002:a17:906:f155:: with SMTP id gw21mr1249730ejb.388.1590501931273; Tue, 26 May 2020 07:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590501931; cv=none; d=google.com; s=arc-20160816; b=gli2Z1b5+KPbhhEUSSkfkYArYI5+ug8VdxrHke2gQRg/vveK/1q8deZCAIsXZkkqWV NJCFBgbLDRyDswHuDPnAtYFbqUwGA3CpQZ6C+dwZHF41FA0a7TXNqY6dbGOkLNy8AJ9m KQDRmTAaD0eZln0hl6xtvnKEujUKyRJL9rpUgoCyA0tIE/J0KDo5RbPDlfxaKikKDrt7 eJwUb67FlfiEkIaCKmS7y/d5EoE1cwHI8CWZjvGHegVVha5TE7lOub9dxPor6FGSM5oz KMw918O7SlTuRzro8ZFeW3f3RDpPv9OeZq1tQMgGc0ySQpeeWMgGiGj69RB1165hgJ3V LgCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hSpkHzBcSuf4URwJXpRTkaP1oMziyVBxQxiwEYyGXyE=; b=so+3hStAmoAMfxYQcXzjEZ2hOMmQlK3nqXjIWmwqznsdlHd18d2uXQ5ndZmJMNiaeu ZJ5IITChYJpYCQc1mtLxpTPxi2pmh5d+eV0eEQ+DaPOeGNZKk1ssfUo8/geJ7tD3atcP AYn0jhKp8qPizh+xGcmkYcQ6v1qx+TAgHCRmXPo+fk0IapP7iXXTt72COCQFHemIdHx0 UD9hVXyHrivnudbpvI0jiTqtLDOxktVkXJBNRy3fqD1kxXBf8q4ssZ+O6fPq4x/Xc195 aVCRWW44ciFkV8ypcElkc7ZjUdXyoYMBIgYwdEeRI746Fz7/QJ20mMR1TbQEwL7/RI/A ceyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t6si8054895edj.110.2020.05.26.07.05.03; Tue, 26 May 2020 07:05:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388900AbgEZNlP (ORCPT + 99 others); Tue, 26 May 2020 09:41:15 -0400 Received: from foss.arm.com ([217.140.110.172]:50928 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388887AbgEZNlN (ORCPT ); Tue, 26 May 2020 09:41:13 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E6C4101E; Tue, 26 May 2020 06:41:12 -0700 (PDT) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE0D43F6C4; Tue, 26 May 2020 06:41:10 -0700 (PDT) From: James Morse To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , James Morse Subject: [PATCH v4 02/10] x86/resctrl: Remove max_delay Date: Tue, 26 May 2020 14:40:51 +0100 Message-Id: <20200526134059.1690-3-james.morse@arm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200526134059.1690-1-james.morse@arm.com> References: <20200526134059.1690-1-james.morse@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org max_delay is used by x86's __get_mem_config_intel() as a local variable. Remove it, replacing it with a local variable. Signed-off-by: James Morse Reviewed-by: Reinette Chatre --- arch/x86/kernel/cpu/resctrl/core.c | 8 ++++---- arch/x86/kernel/cpu/resctrl/internal.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 12f967c6b603..e1fed3928b59 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -254,16 +254,16 @@ static bool __get_mem_config_intel(struct rdt_resource *r) { union cpuid_0x10_3_eax eax; union cpuid_0x10_x_edx edx; - u32 ebx, ecx; + u32 ebx, ecx, max_delay; cpuid_count(0x00000010, 3, &eax.full, &ebx, &ecx, &edx.full); r->num_closid = edx.split.cos_max + 1; - r->membw.max_delay = eax.split.max_delay + 1; + max_delay = eax.split.max_delay + 1; r->default_ctrl = MAX_MBA_BW; if (ecx & MBA_IS_LINEAR) { r->membw.delay_linear = true; - r->membw.min_bw = MAX_MBA_BW - r->membw.max_delay; - r->membw.bw_gran = MAX_MBA_BW - r->membw.max_delay; + r->membw.min_bw = MAX_MBA_BW - max_delay; + r->membw.bw_gran = MAX_MBA_BW - max_delay; } else { if (!rdt_get_mb_table(r)) return false; diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index 1bb81cbdad5f..dd51e23e346b 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -368,8 +368,6 @@ struct rdt_cache { /** * struct rdt_membw - Memory bandwidth allocation related data - * @max_delay: Max throttle delay. Delay is the hardware - * representation for memory bandwidth. * @min_bw: Minimum memory bandwidth percentage user can request * @bw_gran: Granularity at which the memory bandwidth is allocated * @delay_linear: True if memory B/W delay is in linear scale @@ -377,7 +375,6 @@ struct rdt_cache { * @mb_map: Mapping of memory B/W percentage to memory B/W delay */ struct rdt_membw { - u32 max_delay; u32 min_bw; u32 bw_gran; u32 delay_linear; -- 2.19.1