From: Wolfram Sang <w.sang@pengutronix.de>
To: Anton Blanchard <anton@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Only print clockevent settings once
Date: Mon, 8 Feb 2010 05:53:19 +0100 [thread overview]
Message-ID: <20100208045319.GA1405@pengutronix.de> (raw)
In-Reply-To: <20100207222801.GE32246@kryten>
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
On Mon, Feb 08, 2010 at 09:28:01AM +1100, Anton Blanchard wrote:
>
> The clockevent multiplier and shift is useful information, but we
> only need to print it once.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
>
> 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);
> + }
What about printk_once from kernel.h?
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-02-08 4:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 22:28 [PATCH] powerpc: Only print clockevent settings once Anton Blanchard
2010-02-08 4:53 ` Wolfram Sang [this message]
2010-02-08 5:26 ` Anton Blanchard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100208045319.GA1405@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).