From patchwork Thu Jul 10 02:04:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 33355 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ABC79208CF for ; Thu, 10 Jul 2014 02:09:35 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id nu7sf5343854obb.11 for ; Wed, 09 Jul 2014 19:09:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=BDXBrl5vC2KnNFWud/Jmp/DLZMdP38G4bHgIsMfEOps=; b=O37xakhHoaeNuUetblAT0wZpSkYoweMwT0wzqsHnyXTi/7UllpM0CjcXZd+20oFUue jwtT7zX5ZK/spxwQfrRwMRJkviCotcXVIGB/Ljh+S3QwXxIbdf2OO4awktBTecMbUMaS Ic7tTjP/bt3QIL4RSyFDH11BnScQBai+WBM+FpzkEdAoYiGbWMfW8tbBNktPn8LLxCoB /nWFwuV+dxj/xfSRj4Hf+/3pk8OelyQSVzOe8G+xbpXdYUxJIcB1Av6tyWQ3bBANUbB+ ztI6OvuMmLhBcifYj2R9RaaT+Oof/NmRqK0yDtb5zCRtpyInbYjybJISrQiM2R0CVTFc l92g== X-Gm-Message-State: ALoCoQlW6O74VPky8cHCMbo1Og4mkfHK9/9I4j7Oh0EbfCa6GYg0bMR/oPkhTN8+HGlYJDI2D87H X-Received: by 10.182.102.34 with SMTP id fl2mr344107obb.16.1404958175240; Wed, 09 Jul 2014 19:09:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.19.173 with SMTP id 42ls2777439qgh.27.gmail; Wed, 09 Jul 2014 19:09:35 -0700 (PDT) X-Received: by 10.220.177.133 with SMTP id bi5mr595947vcb.26.1404958175152; Wed, 09 Jul 2014 19:09:35 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id dr20si2530905veb.59.2014.07.09.19.09.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Jul 2014 19:09:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ik5so9119481vcb.7 for ; Wed, 09 Jul 2014 19:09:35 -0700 (PDT) X-Received: by 10.52.116.194 with SMTP id jy2mr4483636vdb.39.1404958174885; Wed, 09 Jul 2014 19:09:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp93796vcb; Wed, 9 Jul 2014 19:09:34 -0700 (PDT) X-Received: by 10.70.33.228 with SMTP id u4mr14417431pdi.6.1404958174028; Wed, 09 Jul 2014 19:09:34 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id mn6si47415958pbc.17.2014.07.09.19.09.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jul 2014 19:09:34 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X53l6-0001AS-9b; Thu, 10 Jul 2014 02:06:52 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X53l0-00016M-Kg for linux-arm-kernel@lists.infradead.org; Thu, 10 Jul 2014 02:06:47 +0000 Received: by mail-pd0-f171.google.com with SMTP id fp1so9944798pdb.2 for ; Wed, 09 Jul 2014 19:06:31 -0700 (PDT) X-Received: by 10.68.201.68 with SMTP id jy4mr44243674pbc.64.1404957990704; Wed, 09 Jul 2014 19:06:30 -0700 (PDT) Received: from localhost.localdomain ([174.139.74.226]) by mx.google.com with ESMTPSA id nz7sm30286343pdb.48.2014.07.09.19.06.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Jul 2014 19:06:29 -0700 (PDT) From: Haojian Zhuang To: linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, linux@arm.linux.org.uk, arnd@arndb.de, olof@lixom.net, khilman@kernel.org, xuwei5@hisilicon.com, marc.zyngier@arm.com, christoffer.dall@linaro.org, Dave.Martin@arm.com, nicolas.pitre@linaro.org, jason@lakedaemon.net Subject: [PATCH v10 02/11] ARM: mcpm: support 4 clusters Date: Thu, 10 Jul 2014 10:04:01 +0800 Message-Id: <1404957850-13340-3-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1404957850-13340-1-git-send-email-haojian.zhuang@linaro.org> References: <1404957850-13340-1-git-send-email-haojian.zhuang@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140709_190646_714886_C337E5CF X-CRM114-Status: GOOD ( 10.18 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.171 listed in list.dnswl.org] -0.7 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.171 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record Cc: Haojian Zhuang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: haojian.zhuang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Add the CONFIG_MCPM_QUAD_CLUSTER configuration to enlarge cluster number from 2 to 4. Signed-off-by: Haojian Zhuang Reviewed-by: Nicolas Pitre --- arch/arm/Kconfig | 9 +++++++++ arch/arm/include/asm/mcpm.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 87b63fd..10cc6ec 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1490,6 +1490,15 @@ config MCPM for (multi-)cluster based systems, such as big.LITTLE based systems. +config MCPM_QUAD_CLUSTER + bool + depends on MCPM + help + To avoid wasting resources unnecessarily, MCPM only supports up + to 2 clusters by default. + Platforms with 3 or 4 clusters that use MCPM must select this + option to allow the additional clusters to be managed. + config BIG_LITTLE bool "big.LITTLE support (Experimental)" depends on CPU_V7 && SMP diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h index d9702eb..a4fbacc 100644 --- a/arch/arm/include/asm/mcpm.h +++ b/arch/arm/include/asm/mcpm.h @@ -20,7 +20,12 @@ * to consider dynamic allocation. */ #define MAX_CPUS_PER_CLUSTER 4 + +#ifdef CONFIG_MCPM_QUAD_CLUSTER +#define MAX_NR_CLUSTERS 4 +#else #define MAX_NR_CLUSTERS 2 +#endif #ifndef __ASSEMBLY__