[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86 cpu: use rdmsrl/wrmsrl
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1277467846 -3600 # Node ID aae1c7606c6a545e2d4f5937e529ed6f0296952f # Parent 8e12fc391b4a7f4eebee96488538997c899853d8 x86 cpu: use rdmsrl/wrmsrl Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> --- xen/arch/x86/cpu/centaur.c | 19 +++++++++---------- xen/arch/x86/cpu/common.c | 7 +++---- 2 files changed, 12 insertions(+), 14 deletions(-) diff -r 8e12fc391b4a -r aae1c7606c6a xen/arch/x86/cpu/centaur.c --- a/xen/arch/x86/cpu/centaur.c Fri Jun 25 12:58:27 2010 +0100 +++ b/xen/arch/x86/cpu/centaur.c Fri Jun 25 13:10:46 2010 +0100 @@ -17,7 +17,7 @@ static void __init init_c3(struct cpuinfo_x86 *c) { - u32 lo, hi; + uint64_t msr_content; /* Test for Centaur Extended Feature Flags presence */ if (cpuid_eax(0xC0000000) >= 0xC0000001) { @@ -25,17 +25,17 @@ static void __init init_c3(struct cpuinf /* enable ACE unit, if present and disabled */ if ((tmp & (ACE_PRESENT | ACE_ENABLED)) == ACE_PRESENT) { - rdmsr (MSR_VIA_FCR, lo, hi); - lo |= ACE_FCR; /* enable ACE unit */ - wrmsr (MSR_VIA_FCR, lo, hi); + rdmsrl(MSR_VIA_FCR, msr_content); + /* enable ACE unit */ + wrmsrl(MSR_VIA_FCR, msr_content | ACE_FCR); printk(KERN_INFO "CPU: Enabled ACE h/w crypto\n"); } /* enable RNG unit, if present and disabled */ if ((tmp & (RNG_PRESENT | RNG_ENABLED)) == RNG_PRESENT) { - rdmsr (MSR_VIA_RNG, lo, hi); - lo |= RNG_ENABLE; /* enable RNG unit */ - wrmsr (MSR_VIA_RNG, lo, hi); + rdmsrl(MSR_VIA_RNG, msr_content); + /* enable RNG unit */ + wrmsrl(MSR_VIA_RNG, msr_content | RNG_ENABLE); printk(KERN_INFO "CPU: Enabled h/w RNG\n"); } @@ -47,9 +47,8 @@ static void __init init_c3(struct cpuinf /* Cyrix III family needs CX8 & PGE explicity enabled. */ if (c->x86_model >=6 && c->x86_model <= 9) { - rdmsr (MSR_VIA_FCR, lo, hi); - lo |= (1<<1 | 1<<7); - wrmsr (MSR_VIA_FCR, lo, hi); + rdmsrl(MSR_VIA_FCR, msr_content); + wrmsrl(MSR_VIA_FCR, msr_content | (1ULL << 1 | 1ULL << 7)); set_bit(X86_FEATURE_CX8, c->x86_capability); } diff -r 8e12fc391b4a -r aae1c7606c6a xen/arch/x86/cpu/common.c --- a/xen/arch/x86/cpu/common.c Fri Jun 25 12:58:27 2010 +0100 +++ b/xen/arch/x86/cpu/common.c Fri Jun 25 13:10:46 2010 +0100 @@ -324,10 +324,9 @@ static void __cpuinit squash_the_stupid_ { if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) { /* Disable processor serial number */ - unsigned long lo,hi; - rdmsr(MSR_IA32_BBL_CR_CTL,lo,hi); - lo |= 0x200000; - wrmsr(MSR_IA32_BBL_CR_CTL,lo,hi); + uint64_t msr_content; + rdmsrl(MSR_IA32_BBL_CR_CTL,msr_content); + wrmsrl(MSR_IA32_BBL_CR_CTL, msr_content | 0x200000); printk(KERN_NOTICE "CPU serial number disabled.\n"); clear_bit(X86_FEATURE_PN, c->x86_capability); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |