From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: linux-ia64@vger.kernel.org
Subject: RE: ia64 printk_clock()
Date: Fri, 03 Feb 2006 17:43:29 +0000 [thread overview]
Message-ID: <200602031743.k13HhUg15568@unix-os.sc.intel.com> (raw)
In-Reply-To: <20060202204422.GA27082@sgi.com>
Luck, Tony wrote on Thursday, February 02, 2006 1:46 PM
> The current state of the tree is that Andrew added the patch
> to make the definition of printk_clock() in kernel/printk.c
> "__attribute__((weak))" so that architectures could override
> with their own version. Default version uses sched_clock().
Why don't we look at ar.k3, it contains per_cpu base address.
If it has a none zero value, then it is initialized by
per_cpu_init and is safe to call sched_clock.
- Ken
--- ./arch/ia64/kernel/time.c.orig 2006-02-03 10:10:10.291334310 -0800
+++ ./arch/ia64/kernel/time.c 2006-02-03 10:23:35.944644753 -0800
@@ -278,3 +278,10 @@ udelay (unsigned long usecs)
}
}
EXPORT_SYMBOL(udelay);
+
+unsigned long long printk_clock(void)
+{
+ if (ia64_get_kr(IA64_KR_PER_CPU_DATA))
+ return sched_clock();
+ return 0;
+}
--- ./arch/ia64/kernel/head.S.orig 2006-02-03 10:24:57.431948442 -0800
+++ ./arch/ia64/kernel/head.S 2006-02-03 10:30:54.306944070 -0800
@@ -352,6 +352,7 @@ start_ap:
mov ar.rsc=0 // place RSE in enforced lazy mode
;;
loadrs // clear the dirty partition
+ mov ar.k3=r0 // clear physical per-CPU base
;;
mov ar.bspstore=r2 // establish the new RSE stack
;;
next prev parent reply other threads:[~2006-02-03 17:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-02 20:44 ia64 printk_clock() Jack Steiner
2006-02-02 21:22 ` Dean Roe
2006-02-02 21:46 ` Luck, Tony
2006-02-02 21:50 ` Jack Steiner
2006-02-02 22:29 ` Luck, Tony
2006-02-02 22:52 ` Chen, Kenneth W
2006-02-03 17:43 ` Chen, Kenneth W [this message]
2006-02-03 18:04 ` Luck, Tony
2006-02-03 18:30 ` Chen, Kenneth W
2006-02-03 18:43 ` Luck, Tony
2006-02-03 18:55 ` Chen, Kenneth W
2006-02-04 0:16 ` Keith Owens
2006-02-04 0:28 ` Chen, Kenneth W
2006-02-04 0:32 ` Luck, Tony
2006-02-04 0:36 ` Keith Owens
2006-02-06 18:14 ` Luck, Tony
2006-02-06 18:34 ` Chen, Kenneth W
2006-02-06 20:40 ` Magenheimer, Dan (HP Labs Fort Collins)
2006-02-06 21:37 ` Chen, Kenneth W
2006-02-07 11:11 ` Jes Sorensen
2006-02-08 0:05 ` Luck, Tony
2006-02-08 6:29 ` Jes Sorensen
2006-02-08 18:18 ` Luck, Tony
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=200602031743.k13HhUg15568@unix-os.sc.intel.com \
--to=kenneth.w.chen@intel.com \
--cc=linux-ia64@vger.kernel.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