From: Rodolfo Giometti <giometti@linux.it>
To: linux-mips@linux-mips.org
Subject: Invalid ticks per second on PM support
Date: Sun, 24 Jul 2005 19:39:04 +0200 [thread overview]
Message-ID: <20050724173904.GC26487@enneenne.com> (raw)
Hello.
When I sent my patch to fix PM support
«http://www.linux-mips.org/archives/linux-mips/2005-07/msg00255.html»
I modified function counter0_irq() as follow:
#ifdef CONFIG_PM
-void counter0_irq(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t counter0_irq(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned long pc0;
int time_elapsed;
static int jiffie_drift = 0;
- kstat.irqs[0][irq]++;
if (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20) {
I removed line «kstat.irqs[0][irq]++;» since I supposed that counter
is managed by __do_IRQ(), but now I notice that without such line
reading from /proc/interrups I get:
hostname:~# while sleep 1 ; do grep 17: /proc/interrupts ; done
17: 31710 Au1000 Rise Edge Au1xxx TOY
17: 32236 Au1000 Rise Edge Au1xxx TOY
17: 32762 Au1000 Rise Edge Au1xxx TOY
17: 33288 Au1000 Rise Edge Au1xxx TOY
17: 33814 Au1000 Rise Edge Au1xxx TOY
17: 34340 Au1000 Rise Edge Au1xxx TOY
17: 34866 Au1000 Rise Edge Au1xxx TOY
17: 35392 Au1000 Rise Edge Au1xxx TOY
Where you can see that I have 500 ticks per second...
Applying this patch:
Index: arch/mips/au1000/common/time.c
===================================================================
RCS file: /home/develop/cvs_private/linux-mips-exadron/arch/mips/au1000/common/time.c,v
retrieving revision 1.2
diff -u -r1.2 time.c
--- a/arch/mips/au1000/common/time.c 18 Jul 2005 17:16:57 -0000 1.2
+++ b/arch/mips/au1000/common/time.c 24 Jul 2005 14:31:32 -0000
@@ -125,6 +125,8 @@
int time_elapsed;
static int jiffie_drift = 0;
+ kstat_this_cpu.irqs[irq]++;
+
if (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20) {
/* should never happen! */
printk(KERN_WARNING "counter 0 w status error\n");
Everything works well... but I'm a little puzzled about it.
Can someone of you (guru) explain it? :-p
Thanks,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@linux.it
Linux Device Driver giometti@enneenne.com
Embedded Systems home page: giometti.enneenne.com
UNIX programming phone: +39 349 2432127
reply other threads:[~2005-07-24 17:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050724173904.GC26487@enneenne.com \
--to=giometti@linux.it \
--cc=linux-mips@linux-mips.org \
/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