From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932206Ab3BRGcV (ORCPT ); Mon, 18 Feb 2013 01:32:21 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:60446 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757696Ab3BRGai (ORCPT ); Mon, 18 Feb 2013 01:30:38 -0500 From: Afzal Mohammed To: , , , , CC: Russell King , Tony Lindgren , Marc Zyngier , Nicolas Pitre , Santosh Shilimkar , Will Deacon , Linus Walleij , Rob Herring , Grant Likely , Rob Landley , Sekhar Nori , Syed Mohammed Khasim Subject: [RFC 2/8] ARM: twd: register clock event for 1 core SMP Date: Mon, 18 Feb 2013 12:00:15 +0530 Message-ID: X-Mailer: git-send-email 1.7.12 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Register percpu local timer for scheduler tick in the case of one core SMP configuration. In other cases - secondary cpu's as well as boot cpu's having more than one core, this is being registered as per existing boot flow, with a difference that they happens after delay calibration. Registering the clock for tick in case of one core should be done before Kernel calibrates delay (this is required to boot, unless local timer is the only one registered for tick). Registering twd local timer at init_time (which platforms are doing now) helps achieve that with the proposed change. This helps in an almost booting Kernel (minimal) by only relying on ARM parts for an A9 one core SMP. Signed-off-by: Afzal Mohammed --- arch/arm/kernel/smp_twd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 616268c..118f4f2 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -335,6 +335,9 @@ static int __init twd_local_timer_common_register(struct device_node *np) twd_get_clock(np); + if (num_possible_cpus() == 1) + twd_timer_setup(evt); + return 0; out_irq: -- 1.7.12 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Afzal Mohammed Subject: [RFC 2/8] ARM: twd: register clock event for 1 core SMP Date: Mon, 18 Feb 2013 12:00:15 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Russell King , Nicolas Pitre , Sekhar Nori , Will Deacon , Rob Herring , Santosh Shilimkar , Syed Mohammed Khasim List-Id: devicetree@vger.kernel.org Register percpu local timer for scheduler tick in the case of one core SMP configuration. In other cases - secondary cpu's as well as boot cpu's having more than one core, this is being registered as per existing boot flow, with a difference that they happens after delay calibration. Registering the clock for tick in case of one core should be done before Kernel calibrates delay (this is required to boot, unless local timer is the only one registered for tick). Registering twd local timer at init_time (which platforms are doing now) helps achieve that with the proposed change. This helps in an almost booting Kernel (minimal) by only relying on ARM parts for an A9 one core SMP. Signed-off-by: Afzal Mohammed --- arch/arm/kernel/smp_twd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 616268c..118f4f2 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -335,6 +335,9 @@ static int __init twd_local_timer_common_register(struct device_node *np) twd_get_clock(np); + if (num_possible_cpus() == 1) + twd_timer_setup(evt); + return 0; out_irq: -- 1.7.12