lkml.org 
[lkml]   [2008]   [Sep]   [18]   [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 (v3)
On Thu, Sep 18, 2008 at 12:13 AM, 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, 24 insertions(+), 12 deletions(-)
>
> --- linux-tip.orig/arch/x86/kernel/cpu/common.c
> +++ linux-tip/arch/x86/kernel/cpu/common.c
> @@ -439,6 +439,11 @@ void __cpuinit cpu_detect(struct cpuinfo
> 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)
> @@ -464,14 +469,18 @@ static void __cpuinit get_cpu_cap(struct
> }
> }
>
> -#ifdef CONFIG_X86_64
> 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;

please move those lines to intel.c

YH


\
 
 \ /
  Last update: 2008-09-18 09:55    [W:0.069 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site