Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968113AbdDSXt5 (ORCPT ); Wed, 19 Apr 2017 19:49:57 -0400 Received: from mga11.intel.com ([192.55.52.93]:63771 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967887AbdDSXt3 (ORCPT ); Wed, 19 Apr 2017 19:49:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,222,1488873600"; d="scan'208";a="1158497242" From: Vikas Shivappa To: vikas.shivappa@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org Cc: sai.praneeth.prakhya@intel.com, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, vikas.shivappa@linux.intel.com Subject: [PATCH 1/3] x86/intel_rdt: Fix padding when resource is enabled via mount Date: Wed, 19 Apr 2017 16:50:02 -0700 Message-Id: <1492645804-17465-2-git-send-email-vikas.shivappa@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1492645804-17465-1-git-send-email-vikas.shivappa@linux.intel.com> References: <1492645804-17465-1-git-send-email-vikas.shivappa@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 954 Lines: 27 Currently max width of 'resource name' and 'resource data' is being initialized based on 'enabled resources' during boot. But the mount can enable different capable resources at a later time which upsets the tabular format of schemata. Fix this to be based on 'all capable' resources. Signed-off-by: Vikas Shivappa Tested-by: Prakhya, Sai Praneeth --- arch/x86/kernel/cpu/intel_rdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 731f70a..5b36646 100644 --- a/arch/x86/kernel/cpu/intel_rdt.c +++ b/arch/x86/kernel/cpu/intel_rdt.c @@ -492,7 +492,7 @@ static __init void rdt_init_padding(void) struct rdt_resource *r; int cl; - for_each_enabled_rdt_resource(r) { + for_each_capable_rdt_resource(r) { cl = strlen(r->name); if (cl > max_name_width) max_name_width = cl; -- 1.9.1