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: 4634761 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 93D679F32F for ; Mon, 28 Jul 2014 14:03:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A5D920173 for ; Mon, 28 Jul 2014 14:03:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFD0120172 for ; Mon, 28 Jul 2014 14:03:19 +0000 (UTC) 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c/xm7t6lJ6nb76NognZZYiT+1xaJlRXQuoJaiCHPFhE=; b=Sz2SgJULcSgBv0ZLckFGKox4qneH0AKTUSM29AeoiJuBvk2h485Tlkc/ln/RTPOorC fQrpKOMEKm8adyCdawRdeUcfLCuT7VyinpeCEH5tk+ktjv1Q6dQAs+vu1wm4IaXr1ipf NBHWvpwOS84sfDpAGklsVsvAKwvQccJOizWYfQfIas8uhQy4k0yF1A8AVShINiJ+gwLT V/125uJTNXZ+v3ofobcapBf7rDN+PhC1qnSrcYimh5eje1x/ZutB5fUtpOXhph7nbdnW fBnL/Ed0ahQi6AXLjriCQ7UdnNJdZPIZD87LJAiY/98Sawor2mAYk4lAAsIDAeH7bxPO LQrQ== X-Gm-Message-State: ALoCoQmNkqzvIc5R5jDhN3NSslvwwOAQiX/AaflaMTSOtk5HKWcyR1lC8vzMo8VO7/aOSd3OjVQC 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 (-) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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__