From patchwork Mon Jul 28 13:57:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 34382 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6C6E520AE8 for ; Mon, 28 Jul 2014 14:10:55 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id w10sf48813804pde.11 for ; Mon, 28 Jul 2014 07:10:54 -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=OsaYLFLIvt1DEVXj3JZiaCkKOXRj9GR/5H8V4RFK3x5s+6kW6bx2y0nn/7XQJ2V3oD 9UtUmk23lK6IJXDXU+KyEbbFcZI5ADwdGiNigtJiUY3eJHnbweqo/+cGfak0eJoRYUsx hgJIol2gNVaCzWC8TuzIYpLWc7B7JQyyvyUcBWujtXak8SjhPSJhvEdDtocUOoQfQfJo 2AT6lBRnRV3Hhxc+j38DHI6cREP8J0csarGcQ3i0Jp5Z7BIsNiyLUyKinK4SbN0gG5sH 8oyNhaT/s+taoqWZvHyzr4kKlb5oG2zQ7ebk82hj4X/5bToLZumgJHym6/LEflAWwdpK JWYw== X-Gm-Message-State: ALoCoQmFBc5GbyxvSTdaRMVFVvHO6tkSqgxTzfdwP0p12Hcoc4xCHUR7Jx614MQ7kRlonmbcF+rr X-Received: by 10.67.5.101 with SMTP id cl5mr5573050pad.41.1406556654796; Mon, 28 Jul 2014 07:10:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.82 with SMTP id y76ls2155159qgy.75.gmail; Mon, 28 Jul 2014 07:10:54 -0700 (PDT) X-Received: by 10.220.73.137 with SMTP id q9mr580700vcj.64.1406556654680; Mon, 28 Jul 2014 07:10:54 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id ke8si12480969vec.83.2014.07.28.07.10.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 07:10:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hq11so11429478vcb.10 for ; Mon, 28 Jul 2014 07:10:54 -0700 (PDT) X-Received: by 10.52.120.38 with SMTP id kz6mr1982720vdb.86.1406556654485; Mon, 28 Jul 2014 07:10:54 -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 tc5csp169572vcb; Mon, 28 Jul 2014 07:10:54 -0700 (PDT) X-Received: by 10.68.131.230 with SMTP id op6mr38714020pbb.55.1406556173808; Mon, 28 Jul 2014 07:02:53 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id fd5si11462608pbb.112.2014.07.28.07.02.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jul 2014 07:02:53 -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 1XBlUM-0003kX-3y; Mon, 28 Jul 2014 14:01:18 +0000 Received: from mail-pd0-f177.google.com ([209.85.192.177]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XBlTq-0003Oc-F8 for linux-arm-kernel@lists.infradead.org; Mon, 28 Jul 2014 14:00:50 +0000 Received: by mail-pd0-f177.google.com with SMTP id p10so9831656pdj.8 for ; Mon, 28 Jul 2014 07:00:22 -0700 (PDT) X-Received: by 10.68.194.202 with SMTP id hy10mr38910870pbc.94.1406556021898; Mon, 28 Jul 2014 07:00:21 -0700 (PDT) Received: from localhost.localdomain ([98.126.25.139]) by mx.google.com with ESMTPSA id tu10sm17773684pbc.43.2014.07.28.07.00.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jul 2014 07:00:20 -0700 (PDT) From: Haojian Zhuang To: marc.zyngier@arm.com, jason@lakedaemon.net, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, nicolas.pitre@linaro.org, khilman@linaro.org, xuwei5@hisilicon.com, arm@kernel.org, olof@lixom.net, liguozhu@hisilicon.com Subject: [PATCH v15 02/12] ARM: mcpm: support 4 clusters Date: Mon, 28 Jul 2014 21:57:46 +0800 Message-Id: <1406555876-11989-3-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1406555876-11989-1-git-send-email-haojian.zhuang@linaro.org> References: <1406555876-11989-1-git-send-email-haojian.zhuang@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140728_070046_544317_41A4A3E8 X-CRM114-Status: GOOD ( 10.02 ) X-Spam-Score: -1.4 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.192.177 listed in list.dnswl.org] -0.7 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.177 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.179 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__