mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Tony Lindgren <tony@atomide.com>
Cc: Christian Hesse <mail@earthworm.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Dynamic tick for x86 version 050602-2
Date: Fri, 10 Jun 2005 11:15:15 +0200	[thread overview]
Message-ID: <20050610091515.GH4173@elf.ucw.cz> (raw)
In-Reply-To: <20050610041706.GC18103@atomide.com>

Hi!

> > > +#define NS_TICK_LEN		((1 * 1000000000)/HZ)
> > > +#define DYN_TICK_MIN_SKIP	2
> > > +
> > > +#ifdef CONFIG_NO_IDLE_HZ
> > > +
> > > +extern unsigned long dyn_tick_reprogram_timer(void);
> > > +
> > > +#else
> > > +
> > > +#define arch_has_safe_halt()		0
> > > +#define dyn_tick_reprogram_timer()	{}
> > 
> > do {} while (0)
> > 
> > , else you are preparing trap for someone.
> 
> Can you please explain what the difference between these two are?
> Some compiler version specific thing?

It took me quite some remembering. Problem is that with your macros,
someone can write

	dyn_tick_reprogram_timer()
	printk();

[notice missing ; at first line], and still get it compile. If you
replace {} with do {} while (0), he'll get compile error as he should.

> > > Index: linux-dev/kernel/dyn-tick.c
> > > ===================================================================
> > > --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> > > +++ linux-dev/kernel/dyn-tick.c	2005-06-02 10:37:12.000000000 -0700
> > > @@ -0,0 +1,235 @@
> > > +/*
> > > + * linux/arch/i386/kernel/dyn-tick.c
> > > + *
> > > + * Beginnings of generic dynamic tick timer support
> > > + *
> > > + * Copyright (C) 2004 Nokia Corporation
> > > + * Written by Tony Lindgen <tony@atomide.com> and
> > > + * Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
> > > + *
> > 
> > Heh, you work for Nokia? Can I get one of those nokia 770 toys? I
> > should have 100 euros somewhere here :-).
> 
> Yes, we did dyntick originally for ARM OMAP and 770. I don't think
> I have any power who Nokia will be giving the discount developer
> 770's for though :) I think you have to apply on some webpage...

Thanks for the info (and for the ARM work).
								Pavel 

  reply	other threads:[~2005-06-10  9:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02  1:36 [PATCH] Dynamic tick for x86 version 050602-1 Tony Lindgren
2005-06-02  1:54 ` Zwane Mwaikambo
2005-06-02  2:09   ` Tony Lindgren
2005-06-02  8:30 ` Christian Hesse
2005-06-02 17:42   ` [PATCH] Dynamic tick for x86 version 050602-2 Tony Lindgren
2005-06-02 20:03     ` Christian Hesse
2005-06-02 20:32       ` Tony Lindgren
2005-06-03  6:08         ` Christian Hesse
2005-06-03 17:39           ` Tony Lindgren
2005-06-04 12:51             ` Christian Hesse
2005-06-10  4:03               ` Tony Lindgren
2005-06-05  4:06       ` Bernard Blackham
2005-06-10  4:05         ` Tony Lindgren
2005-06-03 22:37     ` Pavel Machek
2005-06-03 22:47       ` Pavel Machek
2005-06-10  4:17       ` Tony Lindgren
2005-06-10  9:15         ` Pavel Machek [this message]
2005-06-10 15:17           ` Tony Lindgren
2005-06-10 22:15             ` [PATCH] Dynamic tick for x86 version 050610-1 Tony Lindgren
2005-06-18  3:34               ` hugang
2005-06-18  6:30                 ` Benjamin Herrenschmidt
2005-06-21  1:28                   ` Tony Lindgren
2005-06-21  1:49                     ` Benjamin Herrenschmidt
2005-06-21  2:21                       ` Tony Lindgren
2005-07-19  6:51                   ` hugang
2005-07-19 13:51                     ` Benjamin Herrenschmidt
2005-07-25 10:11                       ` Tony Lindgren
2005-06-11 17:59           ` [PATCH] Dynamic tick for x86 version 050602-2 Kyle Moffett
2005-06-07 20:36 ` [PATCH] Dynamic tick for x86 version 050602-1 Jonathan Corbet
2005-06-10  4:18   ` Tony Lindgren

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=20050610091515.GH4173@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@earthworm.de \
    --cc=tony@atomide.com \
    /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

all inboxes | Powered by JetHome®