diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-03 17:32:55 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-03 17:32:55 -0500 |
| commit | 3024e4a99744f5b59704a6570524a312f94f010f (patch) | |
| tree | 52739d6ef2af3afe3dc7b0f7ee942fd43da107c1 | |
| parent | f2a4165526a9746afc4ba5413b1756614a49d450 (diff) | |
| parent | 780eef9492b16a1543a3b2ae9f9526a735fc9856 (diff) | |
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: oprofile: don't set counter width from cpuid on Core2
x86: fix init_memory_mapping() to handle small ranges
| -rw-r--r-- | arch/x86/mm/init_64.c | 2 | ||||
| -rw-r--r-- | arch/x86/oprofile/op_model_ppro.c | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index e6d36b490250..b1352250096e 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
| @@ -714,6 +714,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
| 714 | pos = start_pfn << PAGE_SHIFT; | 714 | pos = start_pfn << PAGE_SHIFT; |
| 715 | end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT) | 715 | end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT) |
| 716 | << (PMD_SHIFT - PAGE_SHIFT); | 716 | << (PMD_SHIFT - PAGE_SHIFT); |
| 717 | if (end_pfn > (end >> PAGE_SHIFT)) | ||
| 718 | end_pfn = end >> PAGE_SHIFT; | ||
| 717 | if (start_pfn < end_pfn) { | 719 | if (start_pfn < end_pfn) { |
| 718 | nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0); | 720 | nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0); |
| 719 | pos = end_pfn << PAGE_SHIFT; | 721 | pos = end_pfn << PAGE_SHIFT; |
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c index e9f80c744cf3..10131fbdaada 100644 --- a/arch/x86/oprofile/op_model_ppro.c +++ b/arch/x86/oprofile/op_model_ppro.c | |||
| @@ -78,8 +78,18 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs) | |||
| 78 | if (cpu_has_arch_perfmon) { | 78 | if (cpu_has_arch_perfmon) { |
| 79 | union cpuid10_eax eax; | 79 | union cpuid10_eax eax; |
| 80 | eax.full = cpuid_eax(0xa); | 80 | eax.full = cpuid_eax(0xa); |
| 81 | if (counter_width < eax.split.bit_width) | 81 | |
| 82 | counter_width = eax.split.bit_width; | 82 | /* |
| 83 | * For Core2 (family 6, model 15), don't reset the | ||
| 84 | * counter width: | ||
| 85 | */ | ||
| 86 | if (!(eax.split.version_id == 0 && | ||
| 87 | current_cpu_data.x86 == 6 && | ||
| 88 | current_cpu_data.x86_model == 15)) { | ||
| 89 | |||
| 90 | if (counter_width < eax.split.bit_width) | ||
| 91 | counter_width = eax.split.bit_width; | ||
| 92 | } | ||
| 83 | } | 93 | } |
| 84 | 94 | ||
| 85 | /* clear all counters */ | 95 | /* clear all counters */ |
