From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Jan Beulich" <jbeulich@novell.com>,
tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v2)
Date: Fri, 5 Sep 2008 09:56:23 -0700 [thread overview]
Message-ID: <86802c440809050956u1298f05ftb2ed813c5b10ad72@mail.gmail.com> (raw)
In-Reply-To: <20080905150030.GD10292@elte.hu>
On Fri, Sep 5, 2008 at 8:00 AM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * 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>
>>
>> ---
>> arch/x86/kernel/cpu/common.c | 17 +++++++++++++++++
>> arch/x86/mm/ioremap.c | 15 ++++++---------
>> include/asm-x86/processor.h | 4 ++--
>> 3 files changed, 25 insertions(+), 11 deletions(-)
>
> hm, the cpu/common.c bits just got reworked massively in tip/master.
> I've tried a blind merge (see the patch below) but at least the first
> hunk looks wrong. Mind looking at how to merge this?
>
> Ingo
>
> --------------->
> Subject: x86: x86_{phys,virt}_bits field also for i386 (v2)
> From: "Jan Beulich" <jbeulich@novell.com>
> Date: Fri, 05 Sep 2008 13:07:24 +0100
>
> 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>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
>
> ---
> arch/x86/kernel/cpu/common.c | 17 +++++++++++++++++
> arch/x86/mm/ioremap.c | 15 ++++++---------
> include/asm-x86/processor.h | 4 ++--
> 3 files changed, 25 insertions(+), 11 deletions(-)
>
> Index: tip/arch/x86/kernel/cpu/common.c
> ===================================================================
> --- tip.orig/arch/x86/kernel/cpu/common.c
> +++ tip/arch/x86/kernel/cpu/common.c
> @@ -464,6 +464,18 @@ static void __cpuinit get_cpu_cap(struct
> c->x86_capability[1] = cpuid_edx(0x80000001);
> c->x86_capability[6] = cpuid_ecx(0x80000001);
> }
> + if (xlvl >= 0x80000008) {
> + u32 eax = cpuid_eax(0x80000008);
> +
> + c->x86_phys_bits = eax & 0xff;
> + c->x86_virt_bits = (eax >> 8) & 0xff;
> + /* CPUID workaround for Intel 0F33/0F34 CPU */
> + if (c->x86_vendor == X86_VENDOR_INTEL
> + && c->x86 == 0xF && c->x86_model == 0x3
> + && (c->x86_mask == 0x3
> + || c->x86_mask == 0x4))
> + c->x86_phys_bits = 36;
> + }
> }
>
> #ifdef CONFIG_X86_64
there is the same code in the same func for 64 bit.
also could move the intel workaround code to early_init_intel and init_intel of
intel.c/intel_64.c
YH
next prev parent reply other threads:[~2008-09-05 16:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 12:07 Jan Beulich
2008-09-05 15:00 ` Ingo Molnar
2008-09-05 16:56 ` Yinghai Lu [this message]
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
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
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=86802c440809050956u1298f05ftb2ed813c5b10ad72@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=hpa@zytor.com \
--cc=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®