From: Ingo Molnar <mingo@elte.hu>
To: Jan Beulich <jbeulich@novell.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>,
tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: Re: [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v3)
Date: Tue, 9 Sep 2008 09:47:27 +0200 [thread overview]
Message-ID: <20080909074727.GA13747@elte.hu> (raw)
In-Reply-To: <48C64524.76E4.0078.0@novell.com>
* Jan Beulich <jbeulich@novell.com> wrote:
> Make the x86_{phys,virt}_bits common for 32- and 64-bits, and use the
> former in ioremap's phys_addr_valid() check also on 32bit/PAE.
>
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
thanks, i've applied the delta below.
Ingo
---------->
>From b9397fe215791b4f83bda23b9f3c0d5200e94558 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Tue, 9 Sep 2008 09:45:32 +0200
Subject: [PATCH] x86: x86_{phys,virt}_bits field also for i386, fix
fix mismerge.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/common.c | 15 +++++----------
arch/x86/mm/ioremap.c | 2 +-
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index df6c387..b26c09e 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -439,6 +439,11 @@ void __cpuinit cpu_detect(struct cpuinfo_x86 *c)
c->x86_cache_alignment = c->x86_clflush_size;
}
}
+
+#ifdef CONFIG_X86_32
+ if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
+ c->x86_phys_bits = 36;
+#endif
}
static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
@@ -520,11 +525,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
cpu_detect(c);
-#ifdef CONFIG_X86_32
- if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
- c->x86_phys_bits = 36;
-#endif
-
get_cpu_vendor(c);
get_cpu_cap(c);
@@ -667,11 +667,6 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
generic_identify(c);
-#ifdef CONFIG_X86_32
- if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
- c->x86_phys_bits = 36;
-#endif
-
if (this_cpu->c_identify)
this_cpu->c_identify(c);
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 74d16f2..ce207ba 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -25,7 +25,7 @@
static inline int phys_addr_valid(unsigned long addr)
{
#ifdef CONFIG_RESOURCES_64BIT
- return addr < (1UL << boot_cpu_data.x86_phys_bits);
+ return !(addr >> boot_cpu_data.x86_phys_bits);
#else
return 1;
#endif
next prev parent reply other threads:[~2008-09-09 7:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 12:07 [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v2) Jan Beulich
2008-09-05 15:00 ` Ingo Molnar
2008-09-05 16:56 ` Yinghai Lu
2008-09-08 10:50 ` Jan Beulich
2008-09-08 13:40 ` Ingo Molnar
2008-09-08 18:54 ` Ingo Molnar
2008-09-09 7:22 ` Jan Beulich
2008-09-09 7:31 ` Ingo Molnar
2008-09-09 7:36 ` Jan Beulich
2008-09-09 7:43 ` [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v3) Jan Beulich
2008-09-09 7:47 ` Ingo Molnar [this message]
2008-09-09 7:58 ` Ingo Molnar
2008-09-09 8:15 ` Jan Beulich
2008-09-08 14:53 ` [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v2) Yinghai Lu
2008-09-08 15:30 ` Jan Beulich
2008-09-18 7:13 [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v3) Jan Beulich
2008-09-18 7:18 ` Ingo Molnar
2008-09-18 9:10 ` Ingo Molnar
2008-09-18 9:31 ` Jan Beulich
2008-09-18 9:57 ` Ingo Molnar
2008-09-18 11:20 ` Ingo Molnar
2008-09-18 11:58 ` Jan Beulich
2008-09-18 12:29 ` Ingo Molnar
2008-09-18 18:00 ` Jeremy Fitzhardinge
2008-09-18 18:12 ` H. Peter Anvin
2008-09-19 8:32 ` Jan Beulich
2008-09-19 21:46 ` Jeremy Fitzhardinge
2008-09-19 23:32 ` H. Peter Anvin
2008-09-18 15:25 ` H. Peter Anvin
2008-09-18 15:52 ` Jan Beulich
2008-09-18 17:25 ` H. Peter Anvin
2008-09-18 7:52 ` Yinghai Lu
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=20080909074727.GA13747@elte.hu \
--to=mingo@elte.hu \
--cc=hpa@zytor.com \
--cc=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=yhlu.kernel@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
Powered by JetHome