LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2008, 08:18 AM   #1
bhagat_singh
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Rep: Reputation: 0
Making CLOCK_TICK_RATE a variable in linux


Hi
I am using linux 2.6.19, I want the CLOCK_TICK_RATE macro defined in asm-arm/arch-at91rm9200/timex.h as a variable, so that the board can work in different clock frequencies.
Is it possible to do , as many of the macros depend on the CLOCK_TICK_RATE macro.
If it is possible please tell me how to go about.

Thanks
 
Old 07-23-2008, 08:36 AM   #2
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
If you want different values for CLOCK_TICK_RATE, you will have to compile different kernels for each value. If you don't want to do that, Red Hat have figured out a way to pass a tick divider to the kernel on boot in RHEL 4.7 and 5.

Other than that, you probably should check out dynticks which is not in the 2.6.19 kernel (and may not be supportive of your arch yet) and forget about the tick rate altogether unless you have a very specific reason for either high or low tick rates.
 
Old 07-24-2008, 03:44 AM   #3
bhagat_singh
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks jcookeman for reply.

I am using linux 2.6.19 and a RFS for the Atmel sam920.
I have been able to change the u-boot 1.1.5 to support the variable clock frequency under which the board can work.

if the board is having is having 80MHz , then the kernel automaticallly takes care of working in 80MHz.
and the CLOCK_TICK_RATE in the include/asm-arm/arch-at91rm9200/timex.h has to be updated accordingly.

if the boards frequency changes to 150Mhz, then the kernel automatically takes care of working in 150MHz.
and the CLOCK_TICK_RATE in the include/asm-arm/arch-at91rm9200/timex.h need not to be updated, for the kernel to work properly. But only the date command does not work properly, as there will be drift in the seconds increment of the date command.

this can be adjusted using adjtimex .Is there a way to tell adjtimex the amount of tick , tolerance to be adjusted in accordance with the new board frequency( for 80mhz to 150Mhz ) .


Thanks for help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
making shell "export" variable permanent forever: user/system lambchops468 Linux - Software 4 10-13-2009 05:37 AM
making a .tar with a string and a variable name Anthraxnz Linux - Newbie 2 11-03-2006 04:40 AM
setting a variable variable in a script... this works, but could it be more elegant? pwc101 Programming 3 08-18-2006 11:23 AM
Odd problem with making a variable the output of a command in a shell script linux=future Programming 3 12-13-2005 09:45 PM
Best practices on making an environmental variable to store email addresses for each adseligman Linux - General 1 12-27-2004 04:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration