From: Kay Sievers <kay@vrfy.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Greg KH <greg@kroah.com>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
William Douglas <william.douglas@intel.com>
Subject: Re: linux-next: build failure after merge of the final tree (driver-core tree related)
Date: Tue, 08 May 2012 13:04:17 +0200 [thread overview]
Message-ID: <1336475057.1179.2.camel@mop> (raw)
In-Reply-To: <20120508180245.002eca30eee763fce1ad468b@canb.auug.org.au>
On Tue, 2012-05-08 at 18:02 +1000, Stephen Rothwell wrote:
> After merging the final tree, today's linux-next build (powerpc
> allnoconfig) failed like this:
>
> kernel/built-in.o: In function `devkmsg_read':
> printk.c:(.text+0x27e8): undefined reference to `__udivdi3'
Oops, let's use do_div().
Thanks,
Kay
From: Kay Sievers <kay@vrfy.org>
Subject: kmsg: use do_div() to divide 64bit integer
On Tue, May 8, 2012 at 10:02 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> kernel/built-in.o: In function `devkmsg_read':
> printk.c:(.text+0x27e8): undefined reference to `__udivdi3'
> Most probably the "msg->ts_nsec / 1000" since
> ts_nsec is a u64 and this is a 32 bit build ...
Signed-off-by: Kay Sievers <kay@vrfy.org>
---
kernel/printk.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -407,6 +407,7 @@ static ssize_t devkmsg_read(struct file
{
struct devkmsg_user *user = file->private_data;
struct log *msg;
+ u64 ts_usec;
size_t i;
size_t len;
ssize_t ret;
@@ -441,8 +442,10 @@ static ssize_t devkmsg_read(struct file
}
msg = log_from_idx(user->idx);
+ ts_usec = msg->ts_nsec;
+ do_div(ts_usec, 1000);
len = sprintf(user->buf, "%u,%llu,%llu;",
- msg->level, user->seq, msg->ts_nsec / 1000);
+ msg->level, user->seq, ts_usec);
/* escape non-printable characters */
for (i = 0; i < msg->text_len; i++) {
next prev parent reply other threads:[~2012-05-08 11:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 8:02 linux-next: build failure after merge of the final tree (driver-core tree related) Stephen Rothwell
2012-05-08 11:04 ` Kay Sievers [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-09 4:58 Stephen Rothwell
2011-05-09 9:34 ` Kay Sievers
2011-05-09 22:19 ` Rafael J. Wysocki
2011-05-09 23:18 ` Kay Sievers
2011-05-10 19:38 ` Rafael J. Wysocki
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=1336475057.1179.2.camel@mop \
--to=kay@vrfy.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=william.douglas@intel.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 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.