From patchwork Sun Feb 7 22:28:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 44745 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id D4310B82B6 for ; Mon, 8 Feb 2010 09:33:13 +1100 (EST) Received: by ozlabs.org (Postfix, from userid 1010) id A2395B7CFA; Mon, 8 Feb 2010 09:32:57 +1100 (EST) Date: Mon, 8 Feb 2010 09:28:01 +1100 From: Anton Blanchard To: benh@kernel.crashing.org Subject: [PATCH] powerpc: Only print clockevent settings once Message-ID: <20100207222801.GE32246@kryten> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org The clockevent multiplier and shift is useful information, but we only need to print it once. Signed-off-by: Anton Blanchard Index: powerpc.git/arch/powerpc/kernel/time.c =================================================================== --- powerpc.git.orig/arch/powerpc/kernel/time.c 2010-02-05 14:57:48.839716602 +1100 +++ powerpc.git/arch/powerpc/kernel/time.c 2010-02-05 14:57:53.057212067 +1100 @@ -930,13 +930,17 @@ static void __init setup_clockevent_mult static void register_decrementer_clockevent(int cpu) { + static int printed = 0; struct clock_event_device *dec = &per_cpu(decrementers, cpu).event; *dec = decrementer_clockevent; dec->cpumask = cpumask_of(cpu); - printk(KERN_DEBUG "clockevent: %s mult[%x] shift[%d] cpu[%d]\n", - dec->name, dec->mult, dec->shift, cpu); + if (!printed) { + printed = 1; + printk(KERN_DEBUG "clockevent: %s mult[%x] shift[%d] cpu[%d]\n", + dec->name, dec->mult, dec->shift, cpu); + } clockevents_register_device(dec); }