Re: v2.6.21.4-rt11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Thomas Gleixner <[email protected]>
Date: Sun, 17 Jun 2007 18:59:18 +0200

> On Sun, 2007-06-17 at 11:49 -0500, Nelson Castillo wrote:
> > > > There are many choices and
> > > > I don't know what is the more friendly. By friendly I mean the one that
> > > > is likely to be merged and that cooperate with you.
> > >
> > > Which choices do you mean ?
> > 
> > I mean implementations. I've seen lot of them but i don't know which one
> > to try (I'm new to RT and the implementation in this thread seems to
> > be very nice).
> 
> Thanks :)
> 
> > > >   http://people.redhat.com/mingo/realtime-preempt/patch-2.6.21.4-rt14
> > > >
> > > > : undefined reference to `usecs_to_cycles'
> > > > make: *** [.tmp_vmlinux1] Error 1
> > >
> > > Which ARM sub arch ?
> > 
> > sub arch AT91 -- (Atmel AT91RM9200 processor).
> 
> It lacks support for the generic timeofday and clock event layers, which
> causes the compile breakage.

 I am working on Renesas SuperH platforms.
 I faced the similar compile errors
 because 2.6.21.X in SH does not support GENERIC_TIME yet.
 I made a workaround patch. Is this correct?

 Thanks,
---
 Katsuya Matsubara @ Igel Co., Ltd
 [email protected]
 
 diff -cr linux-2.6.21.5-rt14/kernel/hrtimer.c linux-2.6.21.5-rt14-nogt/kernel/hrtimer.c
*** linux-2.6.21.5-rt14/kernel/hrtimer.c	2007-06-18 19:55:55.000000000 +0900
--- linux-2.6.21.5-rt14-nogt/kernel/hrtimer.c	2007-06-16 16:36:10.000000000 +0900
***************
*** 119,127 ****
--- 119,131 ----
  
  	do {
  		seq = read_seqbegin(&xtime_lock);
+ #ifdef CONFIG_GENERIC_TIME
  		*ts = xtime;
  		nsecs = __get_nsec_offset();
  		timespec_add_ns(ts, nsecs);
+ #else
+ 		getnstimeofday(ts);
+ #endif
  		tomono = wall_to_monotonic;
  
  	} while (read_seqretry(&xtime_lock, seq));
diff -cr linux-2.6.21.5-rt14/kernel/time/ntp.c linux-2.6.21.5-rt14-nogt/kernel/time/ntp.c
*** linux-2.6.21.5-rt14/kernel/time/ntp.c	2007-06-18 19:55:56.000000000 +0900
--- linux-2.6.21.5-rt14-nogt/kernel/time/ntp.c	2007-06-16 16:37:46.000000000 +0900
***************
*** 120,126 ****
--- 120,128 ----
  			 */
  			time_interpolator_update(-NSEC_PER_SEC);
  			time_state = TIME_OOP;
+ #ifdef CONFIG_GENERIC_TIME
  			warp_check_clock_was_changed();
+ #endif
  			clock_was_set();
  			printk(KERN_NOTICE "Clock: inserting leap second "
  					"23:59:60 UTC\n");
***************
*** 136,142 ****
--- 138,146 ----
  			 */
  			time_interpolator_update(NSEC_PER_SEC);
  			time_state = TIME_WAIT;
+ #ifdef CONFIG_GENERIC_TIME
  			warp_check_clock_was_changed();
+ #endif
  			clock_was_set();
  			printk(KERN_NOTICE "Clock: deleting leap second "
  					"23:59:59 UTC\n");
diff -cr linux-2.6.21.5-rt14/kernel/time.c linux-2.6.21.5-rt14-nogt/kernel/time.c
*** linux-2.6.21.5-rt14/kernel/time.c	2007-06-18 19:55:56.000000000 +0900
--- linux-2.6.21.5-rt14-nogt/kernel/time.c	2007-06-16 16:36:10.000000000 +0900
***************
*** 135,141 ****
--- 135,143 ----
  	wall_to_monotonic.tv_sec -= sys_tz.tz_minuteswest * 60;
  	xtime.tv_sec += sys_tz.tz_minuteswest * 60;
  	time_interpolator_reset();
+ #ifdef CONFIG_GENERIC_TIME
  	warp_check_clock_was_changed();
+ #endif
  	write_sequnlock_irq(&xtime_lock);
  	clock_was_set();
  }
***************
*** 320,326 ****
--- 322,330 ----
  		time_esterror = NTP_PHASE_LIMIT;
  		time_interpolator_reset();
  	}
+ #ifdef CONFIG_GENERIC_TIME
  	warp_check_clock_was_changed();
+ #endif
  	write_sequnlock_irq(&xtime_lock);
  	clock_was_set();
  	return 0;
diff -cr linux-2.6.21.5-rt14/kernel/timer.c linux-2.6.21.5-rt14-nogt/kernel/timer.c
*** linux-2.6.21.5-rt14/kernel/timer.c	2007-06-18 19:55:56.000000000 +0900
--- linux-2.6.21.5-rt14-nogt/kernel/timer.c	2007-06-16 16:36:10.000000000 +0900
***************
*** 1165,1171 ****
--- 1165,1173 ----
  	clock->cycle_accumulated = 0;
  	clock->error = 0;
  	timekeeping_suspended = 0;
+ #ifdef CONFIG_GENERIC_TIME
  	warp_check_clock_was_changed();
+ #endif
  	write_sequnlock_irqrestore(&xtime_lock, flags);
  
  	touch_softlockup_watchdog();
***************
*** 1728,1736 ****
--- 1730,1742 ----
  		 * too.
  		 */
  
+ #ifdef CONFIG_GENERIC_TIME
  		tp = xtime;
  		nsecs = __get_nsec_offset();
  		timespec_add_ns(&tp, nsecs);
+ #else
+ 		getnstimeofday(&tp);
+ #endif
  
  		tp.tv_sec += wall_to_monotonic.tv_sec;
  		tp.tv_nsec += wall_to_monotonic.tv_nsec;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux