From: Sebastian Smolorz <ssm@domain.hid>
To: adeos-main@gna.org
Subject: [Adeos-main] [PATCH] Fix ipipe_tsc2ns for ARM
Date: Wed, 29 Nov 2006 16:17:25 +0100 [thread overview]
Message-ID: <E1GpRBe-0001FR-Mq@domain.hid> (raw)
[-- Attachment #1: Type: text/plain, Size: 157 bytes --]
Hi,
the current implementation of ipipe_tsc2ns for ARM does not compile (undefined
reference to `__udivdi3'). The attached patch fixes that.
--
Sebastian
[-- Attachment #2: ipipe-arm.patch --]
[-- Type: text/x-diff, Size: 629 bytes --]
--- ipipe/v2.6/common/include/asm-arm/ipipe.h 2006-11-29 16:06:33.000000000 +0100
+++ ipipe.work/v2.6/common/include/asm-arm/ipipe.h 2006-11-29 16:08:30.000000000 +0100
@@ -124,7 +124,12 @@ extern void __ipipe_mach_demux_irq(unsig
#define __ipipe_read_timebase() __ipipe_mach_get_tsc()
#define ipipe_cpu_freq() (HZ * __ipipe_mach_ticks_per_jiffy)
-#define ipipe_tsc2ns(t) (((t) * 1000) / (ipipe_cpu_freq() / 1000000))
+#define ipipe_tsc2ns(t) \
+({ \
+ unsigned long long delta = (t)*1000; \
+ do_div(delta, ipipe_cpu_freq() / 1000000 + 1); \
+ (unsigned long)delta; \
+})
/* Private interface -- Internal use only */
next reply other threads:[~2006-11-29 15:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 15:17 Sebastian Smolorz [this message]
2006-11-29 17:27 ` [Adeos-main] [PATCH] Fix ipipe_tsc2ns for ARM Gilles Chanteperdrix
2006-11-30 9:35 ` Sebastian Smolorz
2006-11-30 14:07 ` Gilles Chanteperdrix
2006-12-04 10:29 ` Sebastian Smolorz
2006-12-04 11:15 ` Gilles Chanteperdrix
2006-12-06 11:57 ` Philippe Gerum
2006-12-06 13:17 ` Gilles Chanteperdrix
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=E1GpRBe-0001FR-Mq@domain.hid \
--to=ssm@domain.hid \
--cc=adeos-main@gna.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.