diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-20 18:03:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-20 18:03:07 -0800 |
commit | be71cb5b526709b8e42c707dc9e8c5b034ac8d1c (patch) | |
tree | fa9496456adce37c4c28b8f84ac6dba796fff6e5 /arch | |
parent | b5482d475c6eff1ebc0b1cee73421ef26f1d046c (diff) | |
parent | 07a66d7c53a538e1a9759954a82bb6c07365eff9 (diff) | |
download | kernel_samsung_espresso10-be71cb5b526709b8e42c707dc9e8c5b034ac8d1c.zip kernel_samsung_espresso10-be71cb5b526709b8e42c707dc9e8c5b034ac8d1c.tar.gz kernel_samsung_espresso10-be71cb5b526709b8e42c707dc9e8c5b034ac8d1c.tar.bz2 |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: use the right protections for split-up pagetables
x86, vmi: TSC going backwards check in vmi clocksource
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/vmiclock_32.c | 5 | ||||
-rw-r--r-- | arch/x86/mm/pageattr.c | 15 |
2 files changed, 9 insertions, 11 deletions
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c index c4c1f9e..bde106c 100644 --- a/arch/x86/kernel/vmiclock_32.c +++ b/arch/x86/kernel/vmiclock_32.c @@ -283,10 +283,13 @@ void __devinit vmi_time_ap_init(void) #endif /** vmi clocksource */ +static struct clocksource clocksource_vmi; static cycle_t read_real_cycles(void) { - return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL); + cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL); + return ret >= clocksource_vmi.cycle_last ? + ret : clocksource_vmi.cycle_last; } static struct clocksource clocksource_vmi = { diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 8ca0d85..7be47d1 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -508,18 +508,13 @@ static int split_large_page(pte_t *kpte, unsigned long address) #endif /* - * Install the new, split up pagetable. Important details here: + * Install the new, split up pagetable. * - * On Intel the NX bit of all levels must be cleared to make a - * page executable. See section 4.13.2 of Intel 64 and IA-32 - * Architectures Software Developer's Manual). - * - * Mark the entry present. The current mapping might be - * set to not present, which we preserved above. + * We use the standard kernel pagetable protections for the new + * pagetable protections, the actual ptes set above control the + * primary protection behavior: */ - ref_prot = pte_pgprot(pte_mkexec(pte_clrhuge(*kpte))); - pgprot_val(ref_prot) |= _PAGE_PRESENT; - __set_pmd_pte(kpte, address, mk_pte(base, ref_prot)); + __set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE))); base = NULL; out_unlock: |