From: Andrew Morton <akpm@linux-foundation.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: linux-kernel@vger.kernel.org, xiyou.wangcong@gmail.com,
andreas.herrmann3@amd.com, mingo@elte.hu
Subject: Re: [2.6.30-rc8] gcc 3.3 : __udivdi3 undefined.
Date: Fri, 5 Jun 2009 00:03:10 -0700 [thread overview]
Message-ID: <20090605000310.a5b8fa56.akpm@linux-foundation.org> (raw)
In-Reply-To: <200906050651.n556p7Vo094549@www262.sakura.ne.jp>
On Fri, 05 Jun 2009 15:51:07 +0900 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> >but I wonder why all those things are u64. They all hold virtual
> >addresses, don't they? The code doesn't test highmem. So shouldn't
> >these all be unsigned longs?
> memtest() in linux-2.6.29.4/arch/x86/mm/memtest.c is using "unsigned long".
> 2.6.30 changed to use "u64" by some reason.
No reason, really. "consistency". It made the code slower, larger
and, err, not compile.
And it was done as four patches in one, making reversion impossible.
Ho hum.
commit 570c9e69aaa84689fb8ed2a3a4af39ca54ba7a47
Author: Andreas Herrmann <andreas.herrmann3@amd.com>
AuthorDate: Wed Feb 25 11:28:58 2009 +0100
Commit: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed Feb 25 12:19:46 2009 +0100
x86: memtest: adapt log messages
- print test pattern instead of pattern number,
- show pattern as stored in memory,
- use proper priority flags,
- consistent use of u64 throughout the code
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
index 01a72d6..3232397 100644
--- a/arch/x86/mm/memtest.c
+++ b/arch/x86/mm/memtest.c
@@ -16,25 +16,22 @@ static u64 patterns[] __initdata = {
0xaaaaaaaaaaaaaaaaULL,
};
-static void __init reserve_bad_mem(u64 pattern, unsigned long start_bad,
- unsigned long end_bad)
+static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad)
{
- printk(KERN_CONT "\n %016llx bad mem addr "
- "%010lx - %010lx reserved",
- (unsigned long long) pattern, start_bad, end_bad);
+ printk(KERN_INFO " %016llx bad mem addr %010llx - %010llx reserved\n",
+ (unsigned long long) pattern,
+ (unsigned long long) start_bad,
+ (unsigned long long) end_bad);
reserve_early(start_bad, end_bad, "BAD RAM");
}
-static void __init memtest(unsigned long start_phys, unsigned long size,
- u64 pattern)
+static void __init memtest(u64 pattern, u64 start_phys, u64 size)
{
- unsigned long i;
+ u64 i, count;
u64 *start;
- unsigned long start_bad;
- unsigned long last_bad;
- unsigned long start_phys_aligned;
- unsigned long count;
- unsigned long incr;
+ u64 start_bad, last_bad;
+ u64 start_phys_aligned;
+ size_t incr;
incr = sizeof(pattern);
start_phys_aligned = ALIGN(start_phys, incr);
@@ -81,7 +78,7 @@ void __init early_memtest(unsigned long start, unsigned long end)
if (!memtest_pattern)
return;
- printk(KERN_INFO "early_memtest: pattern num %d", memtest_pattern);
+ printk(KERN_INFO "early_memtest: # of tests: %d\n", memtest_pattern);
for (i = 0; i < memtest_pattern; i++) {
unsigned int idx = i % ARRAY_SIZE(patterns);
pattern = patterns[idx];
@@ -96,14 +93,13 @@ void __init early_memtest(unsigned long start, unsigned long end)
if (t_start + t_size > end)
t_size = end - t_start;
- printk(KERN_CONT "\n %010llx - %010llx pattern %d",
- (unsigned long long)t_start,
- (unsigned long long)t_start + t_size, idx);
-
- memtest(t_start, t_size, pattern);
+ printk(KERN_INFO " %010llx - %010llx pattern %016llx\n",
+ (unsigned long long) t_start,
+ (unsigned long long) t_start + t_size,
+ (unsigned long long) cpu_to_be64(pattern));
+ memtest(pattern, t_start, t_size);
t_start += t_size;
}
}
- printk(KERN_CONT "\n");
}
next prev parent reply other threads:[~2009-06-05 7:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 0:38 [2.6.30-rc8] gcc 3.3 : __udivdi3 undefined Tetsuo Handa
2009-06-05 2:38 ` Amerigo Wang
2009-06-05 3:17 ` Andrew Morton
2009-06-05 3:39 ` Tetsuo Handa
2009-06-05 3:51 ` Andrew Morton
2009-06-05 4:00 ` Tetsuo Handa
2009-06-05 4:20 ` Andrew Morton
2009-06-05 6:26 ` Amerigo Wang
2009-06-05 6:51 ` Tetsuo Handa
2009-06-05 7:03 ` Andrew Morton [this message]
2009-06-05 9:37 ` Andreas Herrmann
2009-06-05 12:58 ` Tetsuo Handa
2009-06-05 17:24 ` Andrew Morton
2009-06-08 17:09 ` [PATCH] x86: memtest: remove 64-bit division Andreas Herrmann
2009-06-08 20:36 ` [tip:x86/urgent] " tip-bot for Andreas Herrmann
2009-06-05 3:24 ` [2.6.30-rc8] gcc 3.3 : __udivdi3 undefined Tetsuo Handa
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=20090605000310.a5b8fa56.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andreas.herrmann3@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=xiyou.wangcong@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox