Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1057846imm; Tue, 15 May 2018 13:10:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp2Ker0YRyeO3IBzzYS6pCQFIYWi2cnRHJwkmeDmLD1fi8SYB4pms5wNCwKVp1H7IX0qlyq X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr15683397plk.96.1526415037810; Tue, 15 May 2018 13:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526415037; cv=none; d=google.com; s=arc-20160816; b=h65y8HXOtef2mhWmnIlFcTzNA0VBUcN3UMMW8YuZYu5ZW2vsyB2NRYnnPGR5dp1Eio qpaJMuv83d/tJdbBhqLJ6NlFcLtWQBv0zmtyIY6IjITxNU2EMjfmhd0I5GtC9LZ7NBWN p+OnSRvRU8uFotr5diZ2hlWsdwJthKm0RgWnHcHjjBJDJFpYNiJk6gyzsx1cKdzQ+i+p tDjBR3V5ZuYV8rau2Ek5vftdSntt+u6W929AMoKODbxbE6xvEUAAj7gbDkWfk/C9IsXx F0kG2faop/MohJtfqWe9wcvneJ/T3Vp3BnHPX/G2+FZ3uSHrPYX/XhahB0jSOIvNfbUv dWXw== 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 :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=aKp2jnruLcDzg5ZqW91QeTG/rw2WVOzs1iUBUEdxG3U=; b=0p7ig+P5P0BNntXQ7wJsQDxYFICwmIkYLuTTK0XaIdtY8yKhsU4JB27i9PapqBBzvW o88IPa78t68kqz5oQy+0jmia0TL3uNPymyU0Txa0pN4o1X9d0oYJt+hzI1t/3ZUFyCt6 LmJQJZTXpEm7kn09x+KjOR0ac8VeqVWX0Vyhqv6+kFmSBKocwUbasrAWUiGSmzeX3cuq h0e5kQHgcnzelJHV3uVmHiV5eEWbZD5q4QO64jHAsHFSUD+CQ/2SU9ADMptCiG5BwLkV x7Bl12NT0Syc2t1HHNNWTnFX1FraRIjzhob04UhmLpwSqqnHsBTOX0idgZgCTADvrXx5 uaqg== 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 b16-v6si794860pfd.240.2018.05.15.13.10.22; Tue, 15 May 2018 13:10:37 -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 S1752362AbeEOUIn (ORCPT + 99 others); Tue, 15 May 2018 16:08:43 -0400 Received: from mga05.intel.com ([192.55.52.43]:36545 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752133AbeEOUIm (ORCPT ); Tue, 15 May 2018 16:08:42 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 May 2018 13:08:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,404,1520924400"; d="scan'208";a="55500039" Received: from vshiva-udesk.sc.intel.com (HELO vshiva-Udesk) ([10.3.52.52]) by fmsmga001.fm.intel.com with ESMTP; 15 May 2018 13:08:41 -0700 Date: Tue, 15 May 2018 13:06:13 -0700 (PDT) From: Shivappa Vikas X-X-Sender: vikas@vshiva-Udesk To: Thomas Gleixner cc: Vikas Shivappa , vikas.shivappa@intel.com, tony.luck@intel.com, ravi.v.shankar@intel.com, fenghua.yu@intel.com, x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, ak@linux.intel.com Subject: Re: [PATCH 2/6] x86/intel_rdt/mba_sc: Enable/disable MBA software controller In-Reply-To: Message-ID: References: <1524263781-14267-1-git-send-email-vikas.shivappa@linux.intel.com> <1524263781-14267-3-git-send-email-vikas.shivappa@linux.intel.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 13 May 2018, Thomas Gleixner wrote: > On Fri, 20 Apr 2018, Vikas Shivappa wrote: > > +/* > > + * Enable or disable the MBA software controller > > + * which helps user specify bandwidth in MBps. > > + * MBA software controller is supported only if > > + * MBM is supported and MBA is in linear scale. > > + */ > > +static int set_mba_sc(bool mba_sc) > > +{ > > + struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_MBA]; > > + > > + if (!is_mbm_enabled() || !is_mba_linear() || > > + mba_sc == is_mba_sc(r)) > > + return -1; > > Please use a proper return value as this gets propagated. Will fix. -EINVAL should be better. Thanks, Vikas > > Thanks, > > tglx >