From patchwork Thu Jan 5 02:27:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 134406 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 77A431007D6 for ; Thu, 5 Jan 2012 13:28:00 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754211Ab2AEC17 (ORCPT ); Wed, 4 Jan 2012 21:27:59 -0500 Received: from forward5.mail.yandex.net ([77.88.46.21]:47938 "EHLO forward5.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754126Ab2AEC17 (ORCPT ); Wed, 4 Jan 2012 21:27:59 -0500 Received: from web77.yandex.ru (web77.yandex.ru [77.88.47.202]) by forward5.mail.yandex.net (Yandex) with ESMTP id 053AE12028B0; Thu, 5 Jan 2012 06:27:55 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1325730476; bh=EE8DHKm48Rf7fsgF1Yk57tObvA2vBQF8Zpw/CrEB0eU=; h=From:To:Cc:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=FXQrDkMWCEXJqBiLJ0xVc32TiDzp1f+APv3c392tNMnBCrwb5xO11TNEBWgBCG2lC pIgldL/sdqZ33BsC7lR0ERu3v9xl0eYv2NEB1E8SUX9sLcm360pChwiEhTeojCgi0o vqeG8ePP88qneQNvLpbL81/0ordojcCh/Y4i5V+U= Received: from localhost (localhost.localdomain [127.0.0.1]) by web77.yandex.ru (Yandex) with ESMTP id CE46073801F; Thu, 5 Jan 2012 06:27:55 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1325730475; bh=EE8DHKm48Rf7fsgF1Yk57tObvA2vBQF8Zpw/CrEB0eU=; h=From:To:Cc:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=FA678VdX8UQsyJHb3v+3ERV7Q87PLQL7lT6jh5Z5jHFrbw/4CjiTiFXUOf4SjeRy5 MxIcm4PKfcvZFyhbpIOPGDfiNj1dKWlyleM6ykvdqLi0hQjtrOni9kkSDo7F+Vdv56 4/gpyF67dPhXYhmrm4+H0FbAT1lo6CoB0EvLba3I= X-Yandex-Spam: 1 Received: from 95-27-114-82.broadband.corbina.ru (95-27-114-82.broadband.corbina.ru [95.27.114.82]) by web77.yandex.ru with HTTP; Thu, 05 Jan 2012 06:27:54 +0400 From: Kirill Tkhai To: sparclinux@vger.kernel.org Cc: davem@davemloft.net, tkhai@yandex.ru In-Reply-To: <1325727738.1385.3.camel@hp> References: <1325727738.1385.3.camel@hp> Subject: [PATCH][resending] SPARC32: forced setting of mode of SUN4M per-cpu timers MIME-Version: 1.0 Message-Id: <772801325730475@web77.yandex.ru> Date: Thu, 05 Jan 2012 06:27:54 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org SPARC32: forced setting of mode of SUN4M per-cpu timers SUN4M per-cpu timers have two modes of work. These are timer mode and counter mode. SPARC32 doesn't write anything to the register, which is connected with mode choice. So, the mode is chosen by bootloader. This patch forces to use timer mode from the kernel and to be independent of bootloader. I had this problem with OpenBIOS. Timers didn't use to tick and kernel on QEMU used to fail, when it's compiled with SMP support. The patch fixes problem. Signed-off-by: Tkhai Kirill Acked-by: Sam Ravnborg --- -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index 422c16d..aa0b9df 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c @@ -414,6 +414,10 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn) for (i = 0; i < num_cpu_timers; i++) sbus_writel(0, &timers_percpu[i]->l14_limit); +#ifdef CONFIG_SMP + /* Timer-mode for every per-cpu timer (bit '0' is timer mode) */ + sbus_writel(0x00000000, &timers_global->timer_config); +#endif if (num_cpu_timers == 4) sbus_writel(SUN4M_INT_E14, &sun4m_irq_global->mask_set);