LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vijay Nikam <vijay.t.nikam@gmail.com>
To: linuxppc-dev@ozlabs.org
Cc: Scott Wood <scottwood@freescale.com>
Subject: CONFIG_PREEMPT and High Resolution Timers problem
Date: Sat, 4 Apr 2009 17:46:38 +0530	[thread overview]
Message-ID: <f234e2140904040516w7db57a5fsfaa6a8674d707bdd@mail.gmail.com> (raw)

Hello All,
I have mpc8313erdb eval board with Linux-2.6.20 running on it.
Recently I had a problem, I wrote a driver and from I am sending
notification to user space application using fasync driver method
(SIGIO signal). In user space applicaion process I have used
posix-timers (timer_create and timer_settime), the timer is set for
10ms. But in actual I checked on oscilloscope the expiration of timer
or signal event generation varies between 10ms - 13ms. In kerenl
driver when the interrupt occurs I am making a gpio pin high and on
the signal event when timer expires I am making another gpio pin high,
and the time between these measured varies between 10ms - 13ms i.e. it
means the timer frequency is 250Hz, which was set by default for
powerpc. So to achieve close to precise of 10ms I set the timer
frequency to 1000Hz and then I got the resolution of 10ms -10.8ms.
I would like to ask is the right approach of changing Timer Frequency
to 1000Hz from 250Hz ? ? ?
Because while searching some information regarding this I learned
about High-Res Timers. In linux-2.6.20 x86 has this feature enabled
rather you can enable it but not for powerpc arch, Right ? ? ? If yes
then is there any way to add CONFIG_HIGH_RES_TIMERS feature to
linux-2.6.20, any patch available ? ? ? =A0otherwise what could be the
option ? ? ?

In Linux by default Preemption is not enabled, CONFIG_PREEMPT_NONE=3Dy
so I tried to enabled CONFIG_PREEMPT=3Dy but when I boot the board with
preemption enabled I got the scheduling with atomic error (please
check the log below, thanks). I tried to debug and find some info but
no luck. Could anyone please explain the reason for it and how I can
fix it ? ? ?

Kindly please acknowledge ... thank you ...

Kind Regards,
Vijay Nikam

########################### Start #################################
NET: Registered protocol family 1
NET: Registered protocol family 17
BUG: scheduling while atomic: swapper/0x00000001/1
Call Trace:
[C07F5D50] [C0008938] =A0(unreliable)
[C07F5D80] [C02933CC]
[C07F5DD0] [C029472C]
[C07F5E10] [C0201AF0]
[C07F5E50] [C0201E08]
[C07F5E90] [C01FEE14]
[C07F5EB0] [C0202018]
[C07F5F30] [C0017490]
[C07F5F50] [C02FB4B0]
[C07F5F90] [C0003960]
[C07F5FF0] [C0010C74]
BUG: scheduling while atomic: swapper/0x00000001/1
########################## END ####################################
########################## Start ####################################
BUG: scheduling while atomic: jffs2_gcd_mtd4/0x00000004/719
Call Trace:
[C05BDBE0] [C0008938] =A0(unreliable)
[C05BDC10] [C02933CC]
[C05BDC60] [C029472C]
[C05BDCA0] [C01D9F14]
[C05BDCE0] [C01D5424]
[C05BDD40] [C01D74D4]
[C05BDD70] [C01C9330]
[C05BDD80] [C0127F88]
[C05BDDB0] [C011F26C]
[C05BDE20] [C0120320]
[C05BDE90] [C012327C]
--- Exception: 1[C05BDF50] [C0125F0C] =A0(unreliable)
[C05BDFF0] [C0010C74]
######################## END ########################################

             reply	other threads:[~2009-04-04 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04 12:16 Vijay Nikam [this message]
2009-04-06  0:24 ` CONFIG_PREEMPT and High Resolution Timers problem Tony Breeds

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=f234e2140904040516w7db57a5fsfaa6a8674d707bdd@mail.gmail.com \
    --to=vijay.t.nikam@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.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