lkml.org 
[lkml]   [2008]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v2)
On Mon, Sep 8, 2008 at 3:50 AM, Jan Beulich <jbeulich@novell.com> wrote:
>>>> Ingo Molnar <mingo@elte.hu> 05.09.08 17:00 >>>
>>
>>* 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?
>
> This is my take at it:
>
> 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 | 22 +++++++++++++++++++++-
> arch/x86/mm/ioremap.c | 13 ++++++-------
> include/asm-x86/processor.h | 4 ++--
> 3 files changed, 29 insertions(+), 10 deletions(-)
>
> --- linux-x86.orig/arch/x86/kernel/cpu/common.c
> +++ linux-x86/arch/x86/kernel/cpu/common.c
> @@ -472,14 +472,20 @@ static void __cpuinit get_cpu_cap(struct
> if (xlvl >= 0x80860001)
> c->x86_capability[2] = cpuid_edx(0x80860001);
> }
> +#endif
>
> if (c->extended_cpuid_level >= 0x80000008) {
> u32 eax = cpuid_eax(0x80000008);
>
> c->x86_virt_bits = (eax >> 8) & 0xff;
> c->x86_phys_bits = eax & 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;

these lines should be in early_init_intel/init_intel.
also need to be checked if it could be overwriten by others functions later..

BTW, did you address Peter's concern?

YH


\
 
 \ /
  Last update: 2008-09-08 16:57    [W:0.070 / U:1.136 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site