public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Skip Ford <skip.ford@verizon.net>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] High-res-timers part 1 (core) take 13
Date: Wed, 06 Nov 2002 10:29:14 -0800	[thread overview]
Message-ID: <3DC95F7A.96B3A866@mvista.com> (raw)
In-Reply-To: 200211060827.gA68RoKb021008@pool-141-150-241-241.delv.east.verizon.net

Skip Ford wrote:
> 
> george anzinger wrote:
> >
> > -     tvec_base_t *old_base, *new_base;
> > +     tvec_base_t *new_base;
> > +     IF_SMP( tvec_base_t *old_base;)
> 
> Your code doesn't compile.  old_base only exists ifdef CONFIG_SMP but
> it's referneced for UP compiles @ timer.c:line 332
> 
>         if (old_base) {
>                 list_del(&timer->entry);
>                 ret = 1;
>         }
> 
> ifdeffing it out works but I don't know if it's correct.  That's one
> ugly function with your patch applied so one more ifdef won't hurt
> (unless it's wrong.)

Yes, it is wrong.  This leaves a lot of useless code in the
UP case, but this is what I will use:

--- /usr/src/linux-2.5.46-bk1-core/kernel/timer.c~	Wed Nov 
6 10:25:23 2002
+++ /usr/src/linux-2.5.46-bk1-core/kernel/timer.c	Wed Nov  6
10:22:02 2002
@@ -279,7 +279,7 @@
 #endif
 {
 	tvec_base_t *new_base;
-	IF_SMP( tvec_base_t *old_base;)
+	tvec_base_t *old_base;
 	unsigned long flags;
 	int ret = 0;
 
@@ -297,7 +297,6 @@
 
 	spin_lock_irqsave(&timer->lock, flags);
 	new_base = &per_cpu(tvec_bases, smp_processor_id());
-#ifdef CONFIG_SMP
 repeat:
 	old_base = timer->base;
 
@@ -322,7 +321,6 @@
 			goto repeat;
 		}
 	} else
-#endif
 		spin_lock(&new_base->lock);
 	/*
 	 * Delete the previous timeout (if there was any), and
install

> 
> --- linux-sk/kernel/timer.c~fix-high-res        Wed Nov  6 03:14:30 2002
> +++ linux-sk-jr/kernel/timer.c  Wed Nov  6 03:14:30 2002
> @@ -329,10 +329,12 @@ repeat:
>          * Delete the previous timeout (if there was any), and install
>          * the new one:
>          */
> +#ifdef CONFIG_SMP
>         if (old_base) {
>                 list_del(&timer->entry);
>                 ret = 1;
>         }
> +#endif
>         timer->expires = expires;
>         IF_HIGH_RES(timer->sub_expires = sub_expires);
>         internal_add_timer(new_base, timer);
> 
> --
> Skip
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
George Anzinger   george@mvista.com
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml

  parent reply	other threads:[~2002-11-06 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06  6:31 [PATCH 1/3] High-res-timers part 1 (core) take 13 george anzinger
2002-11-06  8:27 ` Skip Ford
2002-11-06 17:46   ` george anzinger
2002-11-06 18:29   ` george anzinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-06 18:37 george anzinger

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=3DC95F7A.96B3A866@mvista.com \
    --to=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skip.ford@verizon.net \
    --cc=torvalds@transmeta.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