mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: Clemens Ladisch <clemens@ladisch.de>,
	lkml <linux-kernel@vger.kernel.org>,
	bob.picco@hp.com, venkatesh.pallipadi@intel.com,
	Vojtech Pavlik <vojtech@suse.cz>,
	the arch/x86 maintainers <x86@kernel.org>,
	Adrian Bunk <bunk@kernel.org>
Subject: Re: [patch 2.6.27-rc1] /dev/hpet - fixes and cleanup
Date: Thu, 31 Jul 2008 12:59:56 -0700	[thread overview]
Message-ID: <200807311259.56870.david-b@pacbell.net> (raw)
In-Reply-To: <20080731165519.GA8631@elte.hu>

On Thursday 31 July 2008, Ingo Molnar wrote:
>   drivers/built-in.o: In function `hpet_alloc':
>   : undefined reference to `__udivdi3'
>   drivers/built-in.o: In function `hpet_alloc':
>   : undefined reference to `__umoddi3'

Verified on 64 and 32 bit builds.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

--- a/drivers/char/hpet.c	2008-07-31 11:22:07.000000000 -0700
+++ b/drivers/char/hpet.c	2008-07-31 11:21:15.000000000 -0700
@@ -701,6 +701,7 @@ int hpet_alloc(struct hpet_data *hdp)
 	static struct hpets *last = NULL;
 	unsigned long period;
 	unsigned long long temp;
+	u32 remainder;
 
 	/*
 	 * hpet_alloc can be called by platform dependent code.
@@ -764,12 +765,13 @@ int hpet_alloc(struct hpet_data *hdp)
 		printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
 	printk("\n");
 
+	temp = hpetp->hp_tick_freq;
+	remainder = do_div(temp, 1000000);
 	printk(KERN_INFO
 		"hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n",
 		hpetp->hp_which, hpetp->hp_ntimer,
 		cap & HPET_COUNTER_SIZE_MASK ? 64 : 32,
-		(unsigned) (hpetp->hp_tick_freq / 1000000),
-		(unsigned) (hpetp->hp_tick_freq % 1000000));
+		(unsigned) temp, remainder);
 
 	mcfg = readq(&hpet->hpet_config);
 	if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) {


  reply	other threads:[~2008-07-31 20:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 22:08 [patch 2.6.26] " David Brownell
2008-07-23  7:44 ` Clemens Ladisch
2008-07-23 16:12   ` David Brownell
2008-07-23 16:50     ` David Brownell
2008-07-24 11:35     ` Clemens Ladisch
2008-07-25 19:55       ` David Brownell
2008-07-29 21:26         ` H. Peter Anvin
2008-07-25 19:58       ` [patch 2.6.26-git] " David Brownell
2008-07-28  7:57         ` Clemens Ladisch
2008-07-28  8:27           ` David Brownell
2008-07-28  9:10             ` Clemens Ladisch
2008-07-29 19:46               ` David Brownell
2008-07-29 19:47               ` [patch 2.6.27-rc1] " David Brownell
2008-07-31 16:46                 ` Ingo Molnar
2008-07-31 16:55                   ` Ingo Molnar
2008-07-31 19:59                     ` David Brownell [this message]
2008-07-31 20:50                       ` Ingo Molnar

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=200807311259.56870.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=bob.picco@hp.com \
    --cc=bunk@kernel.org \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=vojtech@suse.cz \
    --cc=x86@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

Powered by JetHome